:root {
  --bg: #0b0f17;
  --bg-soft: #111826;
  --card: #141d2e;
  --card-2: #182238;
  --border: #26324a;
  --text: #e8eefc;
  --muted: #93a4c4;
  --brand: #4f8cff;
  --brand-2: #3b6fe0;
  --green: #2fd08a;
  --amber: #f5b544;
  --red: #ff6b6b;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #16233f 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 15, 23, 0.7);
  border-bottom: 1px solid var(--border);
}
.site-header .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); white-space: nowrap; flex: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #7aa8ff);
  display: grid; place-items: center; font-size: 16px;
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.btn-primary { color: #fff; } /* the nav's muted link color must not dim the CTA */

/* ---------- Buttons ---------- */
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s ease;
  background: var(--card-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 24px rgba(79, 140, 255, 0.35); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(79, 140, 255, 0.5); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-danger { background: rgba(255, 107, 107, 0.12); color: var(--red); border-color: rgba(255, 107, 107, 0.3); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero { padding-top: 72px; padding-bottom: 40px; text-align: center; }
.hero .eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(79, 140, 255, 0.12); border: 1px solid rgba(79, 140, 255, 0.3);
  color: #a9c4ff; font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: 46px; line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero h1 .grad { background: linear-gradient(90deg, #7aa8ff, #4f8cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .price-note { margin-top: 16px; color: var(--muted); font-size: 14px; }

/* ---------- Features ---------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section h2 { font-size: 30px; margin: 0 0 8px; letter-spacing: -0.01em; }
.section .sub { color: var(--muted); margin: 0 0 34px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(79, 140, 255, 0.12); font-size: 22px; margin-bottom: 16px;
}
/* ---------- Pricing ---------- */
.price-card {
  max-width: 420px; margin: 0 auto; text-align: center;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid rgba(79, 140, 255, 0.4); border-radius: 18px; padding: 36px;
  box-shadow: var(--shadow);
}
.price-card .amount { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; }
.price-card .amount span { font-size: 18px; color: var(--muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 24px 0; text-align: left; }
.price-card li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.price-card li:last-child { border-bottom: none; }
.price-card li::before { content: "✓"; color: var(--green); margin-right: 10px; font-weight: 700; }
.price-card .tier { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #a9c4ff; margin-bottom: 10px; }
.price-card .tier-sub { font-size: 13.5px; color: var(--muted); margin: 2px 0 0; }
.grid .price-card { max-width: none; }

/* ---------- Forms ---------- */
.form-card { max-width: 440px; margin: 40px auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.form-card h2 { margin: 0 0 6px; font-size: 24px; }
.form-card .hint { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.input, select.input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text); font-size: 15px;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2); }
.form-actions { margin-top: 22px; }
.form-actions .btn { width: 100%; }

/* ---------- Plan selector ---------- */
.plan-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-option {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-soft); cursor: pointer; transition: all .15s ease;
}
.plan-option:hover { border-color: var(--brand); }
.plan-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.plan-option .plan-check {
  flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 2px solid var(--border); display: grid; place-items: center; transition: all .15s ease;
}
.plan-option .plan-check::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
  transform: scale(0); transition: transform .15s ease;
}
.plan-option .plan-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-option .plan-name { font-size: 14px; font-weight: 700; }
.plan-option .plan-price { font-size: 15px; font-weight: 700; }
.plan-option .plan-per { font-size: 12px; font-weight: 500; color: var(--muted); }
.plan-option .plan-desc { font-size: 12px; color: var(--muted); }
.plan-option.selected { border-color: var(--brand); background: rgba(79, 140, 255, 0.08); box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15); }
.plan-option.selected .plan-check { border-color: var(--brand); }
.plan-option.selected .plan-check::after { transform: scale(1); }
.price-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 12px; background: var(--card-2);
  border: 1px solid var(--border); margin-bottom: 4px;
}
.price-total-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.price-total-amount { font-size: 18px; font-weight: 700; }
@media (max-width: 480px) { .plan-options { grid-template-columns: 1fr; } }

/* ---------- Alerts ---------- */
.alert { padding: 13px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.alert-error { background: rgba(255, 107, 107, 0.1); border-color: rgba(255, 107, 107, 0.35); color: #ffb3b3; }
.alert-success { background: rgba(47, 208, 138, 0.1); border-color: rgba(47, 208, 138, 0.35); color: #9ff0c8; }
.alert-info { background: rgba(79, 140, 255, 0.1); border-color: rgba(79, 140, 255, 0.35); color: #b9d0ff; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; }
.badge-active { background: rgba(47, 208, 138, 0.14); color: #7fe6b6; }
.badge-active .dot { background: var(--green); }
.badge-pending { background: rgba(245, 181, 68, 0.14); color: #ffd58a; }
.badge-pending .dot { background: var(--amber); }
.badge-suspended { background: rgba(255, 107, 107, 0.14); color: #ffb3b3; }
.badge-suspended .dot { background: var(--red); }
.badge-none { background: rgba(147, 164, 196, 0.14); color: var(--muted); }
.badge-none .dot { background: var(--muted); }

/* ---------- Stat cards (admin overview) ---------- */
.stat { display: flex; flex-direction: column; }
.stat-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 32px; font-weight: 800; margin: 10px 0 6px; letter-spacing: -0.02em; }
.stat-sub { font-size: 13px; color: var(--muted); }
.stat-sub b { color: var(--text); font-weight: 700; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
tr:last-child td { border-bottom: none; }
td .muted { color: var(--muted); font-size: 13px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 30px 0; margin-top: 40px; }
.site-footer .inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13.5px; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .nav { gap: 14px; }
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .site-header .inner { height: 58px; gap: 10px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand .logo { width: 28px; height: 28px; }
  .brand .badge { margin-left: 2px !important; padding: 3px 8px; }
  .nav { gap: 6px; }
  /* Text links (Features, Pricing) and "Home" (the logo already goes home) don't fit. */
  .nav a:not(.btn), .nav a[href="/"] { display: none; }
  .nav .btn-sm { padding: 7px 10px; }
  .hero { padding-top: 40px; padding-bottom: 24px; }
  .hero h1 { font-size: 30px; }
  .hero p.lead { font-size: 17px; }
  .hero .cta .btn { width: 100%; }
  .section { padding-top: 36px; padding-bottom: 36px; }
  .section h2 { font-size: 24px; }
  .form-card { margin: 20px auto; padding: 22px 18px; }
  .price-card { padding: 26px 20px; }
  .price-card .amount { font-size: 42px; }
  th, td { padding: 11px 12px; }
  /* Admin stats: three small tiles in a row instead of three full-screen cards. */
  #summary-cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  #summary-cards .card { padding: 12px 10px; }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 22px; margin: 6px 0 4px; }
  .stat-sub { font-size: 11px; }
  /* Tables become stacked cards: one block per row, each cell labelled. */
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .table-wrap tr:last-child { border-bottom: none; }
  .table-wrap td { border: none; padding: 4px 14px; }
  .table-wrap td[data-label]::before {
    content: attr(data-label); display: block; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
  }
}

