:root {
  --bg: #04050c;
  --bg-gradient: radial-gradient(circle at 20% 20%, rgba(255, 107, 53, 0.08), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(53, 107, 255, 0.08), transparent 25%),
    var(--bg);
  --panel: rgba(8, 10, 20, 0.72);
  --panel-strong: rgba(10, 14, 26, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f5f6ff;
  --muted: rgba(245, 246, 255, 0.78);
  --accent: #00a6ff;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg-gradient);
  background-attachment: fixed;
}

.bg-blur {
  position: fixed;
  inset: -40px;
  background: radial-gradient(circle at 20% 30%, rgba(0, 166, 255, 0.4), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 107, 53, 0.25), transparent 50%);
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  z-index: -2;
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.particles span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  animation: drift 12s linear infinite;
}

.particles span:nth-child(2) {
  width: 7px;
  height: 7px;
  left: 20%;
  animation-duration: 10s;
}

.particles span:nth-child(3) {
  left: 60%;
  top: 30%;
  animation-duration: 14s;
}

.particles span:nth-child(4) {
  left: 80%;
  top: 10%;
}

.particles span:nth-child(5) {
  left: 35%;
  top: 60%;
}

.particles span:nth-child(6) {
  left: 70%;
  top: 70%;
  animation-duration: 9s;
}

@keyframes drift {
  0% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-120px);
    opacity: 0;
  }
}

.mv-header {
  width: min(1200px, 94vw);
  margin: 48px auto;
  padding: 22px 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 16px;
  background: transparent;
  color: var(--text);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left {
  justify-content: flex-start;
  cursor: pointer;
}

.header-right {
  justify-content: flex-end;
  text-align: right;
}

.header-center {
  display: flex;
  justify-content: center;
}

.logo-center {
  width: 160px;
  max-width: 40vw;
  filter: drop-shadow(0 8px 20px rgba(0, 166, 255, 0.25));
}

.header-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--muted);
}

.header-value {
  margin: 2px 0 0;
  font-size: 1rem;
}

.ip-link,
.header-right a {
  color: var(--text);
  text-decoration: none;
}

.ip-link {
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}

.ip-link.copied,
.ip-link:hover {
  color: var(--accent);
}

.layout {
  width: min(1200px, 94vw);
  margin: 0 auto 110px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(2, 6, 18, 0.55);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-list li {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.category-list li + li {
  margin-top: 4px;
}

.category-list li:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.category-list li.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 166, 255, 0.08);
}

.stat-value {
  font-size: 1.5rem;
  margin: 8px 0 0;
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.goal-bar {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.goal-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #4ed0ff);
  box-shadow: 0 6px 14px rgba(0, 166, 255, 0.35);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.currency-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.currency-select select {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 14px;
}

.auth-actions {
  display: flex;
  gap: 10px;
}

.home-panel h1 {
  margin-top: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.home-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.product-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(7, 9, 18, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.product-card h3 {
  margin: 0;
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.price {
  font-size: 1.3rem;
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn {
  border-radius: 999px;
  padding: 9px 18px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
}

.primary-btn {
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), #3ed2ff);
  color: #041225;
  box-shadow: 0 12px 25px rgba(0, 166, 255, 0.25);
}

.ghost-btn {
  border-color: var(--border);
  color: var(--text);
}

.ghost-link {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.ghost-link:hover {
  color: var(--accent);
}

.packages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hidden {
  display: none !important;
}

.empty-state {
  margin-top: 12px;
  color: var(--muted);
  text-align: center;
}

.skeleton {
  min-height: 140px;
  animation: pulse 1.6s infinite ease;
  background: rgba(255, 255, 255, 0.02);
}

@keyframes pulse {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 12, 0.85);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}

.modal-content {
  width: min(420px, 92vw);
  background: var(--panel-strong);
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  padding: 32px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-tabs button {
  flex: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  padding: 10px 0;
  color: var(--muted);
  cursor: pointer;
}

.modal-tabs button.active {
  border-color: var(--accent);
  color: var(--text);
}

form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

form input {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 11px;
}

.form-error {
  color: #ff9f9f;
  margin-bottom: 12px;
}

.full {
  width: 100%;
}

.admin-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}

.admin-container {
  width: min(1200px, 96vw);
  margin: 80px auto;
}

.admin-panel h1 {
  margin-top: 0;
}

.success-card {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.success-card p {
  margin: 0 0 8px;
}

/* Admin dashboard additions */
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
}

.dashboard-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
}

.metric-card h4 {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.7);
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 600;
}

.nested-panel {
  background: rgba(20, 23, 35, 0.85);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.tool-panel form button {
  margin-top: 0.5rem;
}

.form-grid textarea {
  resize: vertical;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.table-wrapper {
  overflow-x: auto;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.products-table th,
.products-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.products-table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pill.active {
  background: rgba(0, 255, 204, 0.15);
  color: #32ffd0;
}

.status-pill.inactive {
  background: rgba(255, 99, 71, 0.15);
  color: #ff9f90;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.code-card {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(5, 7, 14, 0.65);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout-link {
  color: var(--accent);
  font-weight: 600;
  word-break: break-all;
}

.code-snippet {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.code-snippet textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  padding: 0.75rem;
  font-family: "Space Grotesk", monospace;
  font-size: 0.85rem;
}

.snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copy-btn {
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
}

.mv-buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: #041225;
  background: linear-gradient(120deg, var(--accent), #3ed2ff);
  box-shadow: 0 12px 30px rgba(0, 166, 255, 0.35);
}

.mv-buy-button--stripe {
  background: linear-gradient(120deg, #635bff, #1f7cff);
  color: #fff;
}

.mv-buy-button--paypal {
  background: #003087;
  color: #fff;
}

.tool-panel {
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.code-snippet textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.orders-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.orders-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.orders-list li:last-child {
  border-bottom: none;
}

.order-status {
  font-weight: 600;
  text-transform: capitalize;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .mv-header {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .header-left,
  .header-right {
    justify-content: center;
    text-align: center;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .home-topline {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .admin-container {
    margin: 40px auto;
  }
}
