/* Hook: frosted-glass design, plain CSS so cPanel needs no build step */
:root {
  --bg-1: #eef2ff;
  --bg-2: #f5f3ff;
  --blob-1: rgba(99, 102, 241, .35);
  --blob-2: rgba(236, 72, 153, .22);
  --blob-3: rgba(34, 211, 238, .25);
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-border: rgba(255, 255, 255, .75);
  --glass-edge: rgba(15, 23, 42, .06);
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .09);
  --field: rgba(255, 255, 255, .9);
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: rgba(79, 70, 229, .1);
  --ok: #047857;
  --ok-bg: rgba(16, 185, 129, .14);
  --warn: #b45309;
  --warn-bg: rgba(245, 158, 11, .16);
  --bad: #be123c;
  --bad-bg: rgba(244, 63, 94, .12);
  --shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(30, 41, 99, .22);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 2px 4px rgba(15, 23, 42, .05), 0 24px 48px -16px rgba(30, 41, 99, .32);
  --radius: 18px;
  --radius-sm: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #0b1020;
    --bg-2: #120c24;
    --blob-1: rgba(99, 102, 241, .32);
    --blob-2: rgba(236, 72, 153, .18);
    --blob-3: rgba(34, 211, 238, .16);
    --glass: rgba(23, 28, 48, .58);
    --glass-strong: rgba(23, 28, 48, .85);
    --glass-border: rgba(255, 255, 255, .1);
    --glass-edge: rgba(0, 0, 0, .2);
    --ink: #e2e8f0;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, .09);
    --field: rgba(15, 20, 38, .85);
    --brand: #818cf8;
    --brand-2: #a78bfa;
    --brand-soft: rgba(129, 140, 248, .16);
    --ok: #34d399;
    --warn: #fbbf24;
    --bad: #fb7185;
    --shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lift: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 24px 48px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 15.5px/1.6 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(40rem 40rem at 8% -5%, var(--blob-1), transparent 60%),
    radial-gradient(34rem 34rem at 100% 10%, var(--blob-2), transparent 60%),
    radial-gradient(38rem 38rem at 60% 110%, var(--blob-3), transparent 60%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 18px; }
h2 { font-size: 18px; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }
.bad-text { color: var(--bad); }
.nowrap { white-space: nowrap; }
code { font-size: 13px; background: var(--brand-soft); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Glass surfaces (solid fallback where blur is not supported) */
.glass, .card, .kpi, .plan-card, .topbar, .auth-card {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .card, .kpi, .plan-card, .topbar, .auth-card {
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
  }
}

/* Top bar */
.topbar {
  position: sticky; top: 10px; z-index: 20; display: flex; align-items: center; gap: 18px;
  max-width: 1160px; margin: 10px auto 0; padding: 10px 14px 10px 18px; border-radius: 999px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, #6366f1, #a855f7 60%, #ec4899);
  box-shadow: 0 6px 14px -4px rgba(99, 102, 241, .6), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.topbar nav a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.topbar nav a:hover { background: var(--brand-soft); text-decoration: none; }
.topbar nav a.active { background: var(--ink); color: var(--bg-1); }
@media (prefers-color-scheme: dark) { .topbar nav a.active { background: #fff; color: #0b1020; } }
.topbar .link { font-size: 14px; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; border-radius: var(--radius); margin: 8px 8px 0; top: 8px; }
  .topbar nav { order: 3; flex-basis: 100%; }
  .topbar form { margin-left: auto; }
}
.page { max-width: 1160px; margin: 0 auto; padding: 28px 16px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }

.card { border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.empty { text-align: center; padding: 44px 22px; }
.empty p { max-width: 460px; margin: 0 auto 16px; color: var(--ink-2); }

/* Forms */
form { margin: 0; }
label { display: block; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 14.5px; color: var(--ink); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) inset; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--brand); }
input[type=file] { padding: 9px; }
textarea { resize: vertical; }
fieldset { min-width: 0; }

/* Buttons */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 18px;
  font: inherit; font-size: 14.5px; font-weight: 700; color: #fff; text-decoration: none; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; border-radius: 999px;
  box-shadow: 0 10px 22px -10px rgba(79, 70, 229, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
button:hover, .button:hover { transform: translateY(-1px); filter: brightness(1.05); text-decoration: none; box-shadow: 0 14px 26px -10px rgba(79, 70, 229, .85), inset 0 1px 0 rgba(255, 255, 255, .25); }
button:active, .button:active { transform: translateY(0); }
button.ghost, .button.ghost { color: var(--ink); background: var(--field); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
button.link, button.link-blue { padding: 0; background: none; box-shadow: none; font-weight: 500; }
button.link { color: var(--muted); }
button.link-blue { color: var(--brand); font-size: 14px; }
button.link:hover, button.link-blue:hover { transform: none; text-decoration: underline; }
.button.big { padding: 14px 26px; font-size: 16px; }

/* Notices */
.notice { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14.5px; margin: 0 0 16px; border: 1px solid transparent; }
.notice.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(16, 185, 129, .25); }
.notice.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(244, 63, 94, .25); }
.plan-banner { display: block; max-width: 1160px; margin: 10px auto 0; padding: 9px 16px; border-radius: 999px; text-align: center; font-size: 14px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border: 1px solid rgba(245, 158, 11, .3); }
.plan-banner.bad { color: var(--bad); background: var(--bad-bg); border-color: rgba(244, 63, 94, .3); }
@media (max-width: 760px) { .plan-banner { margin: 8px 8px 0; border-radius: var(--radius-sm); } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 10px; }
.filters label { margin: 0; }
.filters select { min-width: 210px; }
.presets { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); }
.pill { padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.pill:hover { background: var(--brand-soft); text-decoration: none; }
.pill.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .8); }
.custom-range { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.custom-range label { margin: 0; }
.custom-range input { padding: 8px 10px; }
.sync-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }

/* KPI cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 520px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 21px; }
  .card { padding: 18px; }
}
.kpis.compact { margin-bottom: 10px; }
.kpi { position: relative; border-radius: var(--radius); padding: 16px 18px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2), #ec4899); opacity: .7; }
.kpi-label { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-change { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi-change.up { color: var(--ok); }
.kpi-change.down { color: var(--bad); }
a.kpi-link { color: var(--ink); }
a.kpi-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lift); }
a.kpi-link.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow); }

/* Chart */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 190px; padding-top: 6px; }
.bar { flex: 1; min-width: 2px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); opacity: .9; transition: opacity .15s, transform .15s; transform-origin: bottom; }
.bar:hover { opacity: 1; transform: scaleY(1.02); }
.bars-axis { display: flex; justify-content: space-between; margin-top: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--brand-soft); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { min-width: 150px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

/* Orders */
.status-select { width: auto !important; margin: 0 !important; padding: 6px 30px 6px 12px !important; font-size: 13.5px !important; font-weight: 600; border-radius: 999px !important; }
.status-delivered { color: var(--ok) !important; }
.status-returned, .status-cancelled { color: var(--bad) !important; }
.shop-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.shop-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 10px; }
.shop-forms form { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--glass); }

/* Alerts */
.badge { display: inline-block; min-width: 19px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: linear-gradient(135deg, #f43f5e, #ec4899); color: #fff; font-size: 11.5px; line-height: 19px; text-align: center; font-weight: 800; }
.alert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alert-item { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-left: 4px solid var(--warn); background: var(--field); }
.alert-item.sev-critical { border-left-color: var(--bad); }
.alert-item.sev-info { border-left-color: var(--brand); }
.alert-item.unread { box-shadow: 0 0 0 3px var(--warn-bg); }
.alert-title { font-weight: 700; }
.alert-body { margin: 3px 0 6px; color: var(--ink-2); }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--bad); vertical-align: middle; box-shadow: 0 0 0 4px var(--bad-bg); }
fieldset.alert-account { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px 2px; margin: 0 0 14px; }
fieldset.alert-account legend { font-weight: 700; padding: 0 6px; }
fieldset.alert-account input { max-width: 240px; }

/* Posts */
.post-form { max-width: 680px; }
fieldset.when { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px 4px; margin: 0 0 16px; }
fieldset.when legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.when-time label { flex: 1; min-width: 150px; }
.post-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-text { min-width: 0; overflow-wrap: anywhere; }
.post-status { margin-left: 6px; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); }

/* Plans and billing */
.plan-now { margin: 0 0 4px; font-size: 16px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 18px; }
.plan-card { position: relative; border-radius: var(--radius); padding: 22px; transition: transform .2s, box-shadow .2s; }
.plan-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.plan-card.current, .plan-card.featured { border-color: transparent; box-shadow: 0 0 0 2px var(--brand), var(--shadow-lift); }
.plan-card .plan-tag { position: absolute; top: -11px; left: 22px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.plan-card h3 { margin-bottom: 6px; font-size: 17px; }
.plan-card ul { list-style: none; padding: 0; margin: 14px 0 18px; font-size: 14.5px; }
.plan-card li { position: relative; padding-left: 24px; margin-bottom: 7px; color: var(--ink-2); }
.plan-card li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--brand); background: var(--brand-soft); }
.plan-price { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 8px; }
.bkash { font-size: 19px; letter-spacing: .5px; }
.pay-form .row label { flex: 1; min-width: 200px; }
.pay-total { font-size: 18px; }
.pay-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
fieldset.methods { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.methods legend { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; color: var(--ink-2); }
.method-pill { margin: 0; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--field); cursor: pointer; font-weight: 600; }
.method-pill:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Admin */
.small-input { width: auto !important; min-width: 140px; margin: 0 !important; padding: 8px 12px !important; }
.days-input { width: 84px !important; margin: 0 !important; padding: 8px 10px !important; }
.muted-row td { opacity: .5; }
.tag { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; }
.tag.method-bkash { background: rgba(226, 19, 110, .12); color: #c2185b; }
.tag.method-nagad { background: rgba(247, 148, 29, .16); color: #b45309; }
.tag.method-rocket { background: rgba(124, 58, 237, .14); color: #6d28d9; }
.bm-name { margin: 14px 0 8px; font-weight: 700; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* Report tabs and analysis */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; margin: 0 0 18px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tab:hover { background: var(--brand-soft); text-decoration: none; }
.tab.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .8); }
.funnel { display: grid; gap: 10px; }
.funnel-row { display: grid; grid-template-columns: 170px 1fr minmax(160px, auto); gap: 14px; align-items: center; }
.funnel-label { font-weight: 600; font-size: 14px; }
.funnel-bar { height: 26px; border-radius: 8px; background: var(--brand-soft); overflow: hidden; }
.funnel-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--brand), var(--brand-2), #ec4899); }
.funnel-num { font-variant-numeric: tabular-nums; font-size: 14px; }
.funnel-num .muted { display: block; font-size: 12.5px; }
.retention { display: grid; gap: 10px; max-width: 640px; }
.ret-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 12px; align-items: center; }
.ret-label { font-size: 14px; font-weight: 600; }
.ret-bar { height: 12px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; }
.ret-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; }
.share-bar { display: block; height: 4px; margin-top: 5px; border-radius: 999px; background: var(--brand-soft); overflow: hidden; max-width: 220px; }
.share-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.highlight-value { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 4px 0 2px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 18px; max-height: 420px; overflow-y: auto; padding: 4px 2px 10px; margin-bottom: 12px; }
.check-grid label.check { margin-bottom: 8px; align-items: flex-start; }
@media (max-width: 620px) {
  .funnel-row { grid-template-columns: 1fr; gap: 4px; }
  .funnel-num .muted { display: inline; }
  .ret-row { grid-template-columns: 90px 1fr 56px; }
}

.state { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--brand-soft); color: var(--ink-2); vertical-align: 1px; }
.state.on { background: var(--ok-bg); color: var(--ok); }
.state.bad { background: var(--bad-bg); color: var(--bad); }
.small { font-size: 12px; }
td.warn { color: var(--warn); font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.grid-2 > .card { margin: 0; }
.grid-2 { margin-bottom: 18px; }
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ad-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--glass-strong); border: 1px solid var(--line); }
.ad-top { display: flex; gap: 12px; align-items: flex-start; }
.ad-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--brand-soft); }
.ad-name { font-weight: 700; font-size: 14px; line-height: 1.3; word-break: break-word; }
.ad-parent { font-size: 12px; margin-top: 2px; }
.ad-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ad-stats div { font-size: 12px; color: var(--muted); }
.ad-stats b { display: block; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rankings { display: flex; flex-wrap: wrap; gap: 6px; }
.rank { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--ink-2); }
.rank.up { background: var(--ok-bg); color: var(--ok); }
.rank.down { background: var(--bad-bg); color: var(--bad); }
.hour-chart { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 150px; }
.hour-chart .col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.hour-chart .col i { display: block; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); min-height: 2px; }
.hour-chart .col.best i { background: linear-gradient(180deg, #34d399, #059669); }
.hour-axis { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 4px; }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--ink); font-size: 14px; margin-bottom: 18px; }
@media (max-width: 620px) {
  .hour-axis span:nth-child(odd) { visibility: hidden; }
  .grid-2 { grid-template-columns: 1fr; }
}
.legal-wrap { max-width: 860px; margin: 0 auto; padding: 36px 16px 20px; }
.legal { border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); line-height: 1.7; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.02em; margin: 0 0 4px; }
.legal h2 { font-size: 20px; margin: 30px 0 8px; scroll-margin-top: 20px; }
.legal h3 { font-size: 16px; margin: 18px 0 4px; }
.legal p, .legal li { color: var(--ink-2); font-size: 15.5px; }
.legal ul, .legal ol { padding-left: 22px; margin: 8px 0 12px; }
.legal li { margin-bottom: 6px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.legal-links { text-align: center; font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.legal-links a { color: var(--muted); }

/* Auth pages */
.guest { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; border-radius: 24px; padding: 30px; }
.auth-card h1 { margin: 18px 0 6px; font-size: 26px; }
.auth-card .lead { color: var(--muted); margin-bottom: 22px; }
.auth-card button[type=submit] { width: 100%; margin-top: 4px; }
.auth-links { margin-top: 18px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }

/* Public home page */
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1160px; margin: 14px auto 0; padding: 10px 12px 10px 18px; border-radius: 999px; }
.site-nav .actions { display: flex; align-items: center; gap: 10px; }
.site-nav .actions a:not(.button) { color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.hero { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; max-width: 1160px; margin: 0 auto; padding: 72px 16px 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border: 1px solid rgba(99, 102, 241, .2); }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.05; letter-spacing: -.035em; margin: 18px 0; }
.gradient-text { background: linear-gradient(120deg, #4f46e5, #a855f7 45%, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18px; color: var(--ink-2); max-width: 520px; margin-bottom: 28px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .fine { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* 3D glass scene in the hero */
.scene { position: relative; height: 440px; perspective: 1200px; }
.orb { position: absolute; border-radius: 50%; filter: saturate(120%); }
.orb.one { width: 190px; height: 190px; top: 10px; right: 30px; background: radial-gradient(circle at 32% 28%, #fff 0, #c7d2fe 14%, #6366f1 52%, #312e81 100%); box-shadow: 0 40px 60px -20px rgba(49, 46, 129, .55); }
.orb.two { width: 120px; height: 120px; bottom: 30px; left: 10px; background: radial-gradient(circle at 32% 28%, #fff 0, #fbcfe8 16%, #ec4899 55%, #831843 100%); box-shadow: 0 30px 50px -18px rgba(131, 24, 67, .5); }
.orb.three { width: 70px; height: 70px; top: 40px; left: 60px; background: radial-gradient(circle at 32% 28%, #fff 0, #a5f3fc 18%, #06b6d4 58%, #164e63 100%); box-shadow: 0 20px 34px -12px rgba(22, 78, 99, .5); }
.glass-panel {
  position: absolute; inset: 70px 40px 60px 50px; border-radius: 26px; padding: 22px;
  transform: rotateY(-14deg) rotateX(8deg); transform-style: preserve-3d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 40px 50px 80px -30px rgba(30, 41, 99, .45);
}
.glass-panel .mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.glass-panel .mini { padding: 10px 12px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); }
.glass-panel .mini b { display: block; font-size: 20px; letter-spacing: -.02em; }
.glass-panel .mini span { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.glass-panel .mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.glass-panel .mini-bars i { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #a78bfa, #4f46e5); }
.glass-panel .float-alert { position: absolute; right: -26px; bottom: -22px; padding: 12px 14px; border-radius: 16px; font-size: 13px; font-weight: 600; max-width: 230px; transform: translateZ(60px); }
.glass-panel .float-alert b { color: var(--bad); }
@media (prefers-reduced-motion: no-preference) {
  .orb.one { animation: float 7s ease-in-out infinite; }
  .orb.two { animation: float 9s ease-in-out infinite reverse; }
  .orb.three { animation: float 6s ease-in-out infinite; }
  .glass-panel { animation: tilt 10s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-16px); } }
  @keyframes tilt { 50% { transform: rotateY(-8deg) rotateX(5deg) translateY(-6px); } }
}
.section { max-width: 1160px; margin: 0 auto; padding: 56px 16px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -.03em; margin: 12px 0 10px; }
.section-head p { color: var(--ink-2); font-size: 16.5px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature { padding: 22px; border-radius: var(--radius); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.feature .icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; margin-bottom: 14px; background: linear-gradient(135deg, rgba(99, 102, 241, .18), rgba(236, 72, 153, .16)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.cta-band { text-align: center; padding: 44px 24px; border-radius: 28px; }
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
.site-footer { max-width: 1160px; margin: 0 auto; padding: 28px 16px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 14px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; gap: 10px; }
  .scene { height: 360px; }
}
@media (max-width: 520px) {
  .site-nav .actions a:not(.button) { display: none; }
  .scene { height: 320px; }
  .glass-panel { inset: 60px 12px 50px 12px; }
  .glass-panel .float-alert { right: -4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
