/* ==========================================================================
   Revenue theme for the autosurf script
   Modern, bright fintech look: crisp white panels on a cool mint ground,
   deep "money green" ink, emerald for growth and actions, gold for money
   (balances due, earnings, highlights), indigo for information and links.
   Big tabular numbers, live charts and payout chips carry the "revenue" feel.
   Uses the SAME class names as the solar and blockchain themes, so the PHP
   templates work with any of the three; revenue-only extras are at the end.
   No framework. ~26 KB unminified. Fonts: see README (self-host in production).
   ========================================================================== */

:root {
  /* --- Palette ---------------------------------------------------------- */
  --c-bg:         #F3F7F5;  /* page ground: cool mint white */
  --c-surface:    #FFFFFF;
  --c-surface-2:  #F6FAF8;  /* zebra rows, inset areas */
  --c-ink:        #0C2A22;  /* main text: money green ink */
  --c-ink-soft:   #47605A;
  --c-ink-faint:  #7D928C;
  --c-line:       #E0E9E5;
  --c-line-strong:#C7D6D0;

  --c-leaf:       #0E9F6E;  /* growth, primary actions, success */
  --c-leaf-deep:  #087A54;
  --c-leaf-soft:  #DDF5EB;
  --c-sky:        #3B5BDB;  /* information, links */
  --c-sky-deep:   #2C46B5;
  --c-sky-soft:   #E7ECFC;
  --c-sun:        #E9A23B;  /* money: earnings, amounts due, highlights */
  --c-sun-deep:   #A2650A;  /* gold text that passes contrast on white */
  --c-sun-soft:   #FDF1DC;
  --c-danger:     #D1453B;
  --c-danger-soft:#FCE9E7;

  --c-night:      #0B241D;  /* footer, admin sidebar, toasts */
  --c-night-2:    #12352B;
  --c-night-ink:  #BFD6CD;

  --g-sun:  linear-gradient(135deg, #F6C065 0%, #E9A23B 100%);
  --g-leaf: linear-gradient(135deg, #14B07C 0%, #0B8D61 100%);
  --g-sky:  radial-gradient(1100px 520px at 85% -10%, rgba(14,159,110,.16), transparent 60%), radial-gradient(700px 420px at 10% 0%, rgba(233,162,59,.10), transparent 60%), var(--c-bg);
  --g-money: linear-gradient(90deg, var(--c-leaf), #5CC99B 55%, var(--c-sun));

  /* Fine dot grid used behind the hero and auth pages */
  --dots: radial-gradient(circle, rgba(12,42,34,.07) 1px, transparent 1.2px);

  /* --- Type ------------------------------------------------------------- */
  --f-display: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-body:    "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono:    "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.375rem; --fs-2xl: 1.875rem; --fs-3xl: clamp(2.2rem, 5vw, 3.9rem);

  /* --- Shape & space ---------------------------------------------------- */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(12,42,34,.05), 0 2px 6px -2px rgba(12,42,34,.06);
  --sh-2: 0 18px 40px -18px rgba(12,42,34,.28);
  --gap: 1rem;
  --wrap: 1180px;
  --side: max(16px, env(safe-area-inset-left, 0px));
  --side-r: max(16px, env(safe-area-inset-right, 0px));
  --header-h: 66px;
}

/* ---------- Base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--c-bg); color: var(--c-ink);
  font: 400 var(--fs-md)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
img { height: auto; }
a { color: var(--c-sky-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-leaf-deep); }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.1; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.025em; font-weight: 600; }
h1 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -.04em; line-height: 1.02; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--f-mono); font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-leaf) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--c-ink-soft); }
.faint { color: var(--c-ink-faint); font-size: var(--fs-sm); }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; align-self: flex-start; padding: .3rem .7rem .3rem .45rem; border-radius: var(--r-pill); background: var(--c-surface); border: 1px solid var(--c-line); font: 600 var(--fs-xs)/1 var(--f-body); letter-spacing: .02em; color: var(--c-leaf-deep); box-shadow: var(--sh-1); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c-leaf); box-shadow: 0 0 0 3px var(--c-leaf-soft); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--side); padding-right: var(--side-r); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; justify-content: space-between; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 220px)), 1fr)); }
.grid > *, .row > * { min-width: 0; }

/* ---------- Logo (admin-uploaded transparent PNG, with fallback mark) ---- */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--c-ink); }
[hidden] { display: none !important; }
.logo img { display: block; height: var(--logo-h, 40px); width: auto; max-width: 220px; object-fit: contain; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-text { font: 700 1.3rem/1 var(--f-display); letter-spacing: -.04em; }
.logo-text b { color: var(--c-leaf); font-weight: 700; }

/* ---------- Header / nav --------------------------------------------------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--c-surface); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--c-surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; padding: .25rem; border-radius: var(--r-pill); background: var(--c-surface-2); border: 1px solid var(--c-line); }
.nav a { padding: .45rem .85rem; border-radius: var(--r-pill); color: var(--c-ink-soft); text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
.nav a:hover { color: var(--c-ink); }
.nav a[aria-current="page"] { color: var(--c-ink); background: var(--c-surface); box-shadow: var(--sh-1); }
.nav-actions { display: flex; gap: .5rem; align-items: center; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--c-line); border-radius: var(--r-sm); padding: .45rem .6rem; color: var(--c-ink); cursor: pointer; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav, .nav-actions { display: none; width: 100%; }
  .site-header.is-open .nav { display: flex; flex-direction: column; align-items: stretch; margin: 0 0 .5rem; border-radius: var(--r-md); }
  .site-header.is-open .nav a { border-radius: var(--r-sm); }
  .site-header.is-open .nav-actions { display: flex; padding-bottom: 1rem; }
  .site-header.is-open .nav-actions .btn { flex: 1; }
}

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  --b-bg: var(--c-surface); --b-fg: var(--c-ink); --b-bd: var(--c-line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .65rem 1.15rem; border-radius: var(--r-pill);
  border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font: 600 var(--fs-sm)/1.2 var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { color: var(--b-fg); box-shadow: var(--sh-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { --b-bg: var(--c-ink); --b-fg: #fff; --b-bd: var(--c-ink); }
.btn-primary::after { content: "→"; font-weight: 500; transition: transform .15s ease; }
.btn-primary:hover::after { transform: translateX(3px); }
.btn-sm.btn-primary::after, .input-group .btn-primary::after { content: none; }
.btn-sun     { --b-bg: var(--c-sun); --b-fg: #3A2400; --b-bd: #D9922B; background: var(--g-sun); }
.btn-sky     { --b-bg: var(--c-sky); --b-fg: #fff; --b-bd: var(--c-sky); }
.btn-leaf    { --b-bg: var(--c-leaf); --b-fg: #fff; --b-bd: var(--c-leaf); background: var(--g-leaf); }
.btn-ghost   { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--c-ink); }
.btn-danger  { --b-bg: var(--c-surface); --b-fg: var(--c-danger); --b-bd: color-mix(in srgb, var(--c-danger) 40%, white); }
.btn-sm { padding: .4rem .8rem; font-size: var(--fs-xs); }
.btn-lg { padding: .9rem 1.6rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }

/* ---------- Panels / cards ----------------------------------------------- */
.panel { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 1.35rem; box-shadow: var(--sh-1); min-width: 0; }
.panel > h3:first-child, .panel > h4:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap; }
.panel-head h3, .panel-head h4 { margin: 0; }
.panel-flat { background: var(--c-surface-2); box-shadow: none; }

/* Stat tile: big numbers are the hero of every dashboard */
.stat { display: flex; flex-direction: column; gap: .25rem; }
.stat-label { font: 600 var(--fs-xs)/1.3 var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink-faint); }
.stat-value { font: 650 var(--fs-2xl)/1.05 var(--f-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: var(--fs-sm); color: var(--c-ink-soft); }
.stat-up { display: inline-flex; align-items: center; gap: .15rem; padding: .05rem .45rem; border-radius: var(--r-pill); background: var(--c-leaf-soft); color: var(--c-leaf-deep); font-weight: 700; font-size: .85em; }
.stat-up::before { content: "▲"; font-size: .7em; }
.stat-down { display: inline-flex; align-items: center; gap: .15rem; padding: .05rem .45rem; border-radius: var(--r-pill); background: var(--c-danger-soft); color: var(--c-danger); font-weight: 700; font-size: .85em; }
.stat-down::before { content: "▼"; font-size: .7em; }

/* Coin balance tile */
.coin { display: flex; gap: .8rem; align-items: center; }
.coin-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 600 .62rem/1 var(--f-mono); color: #fff; flex: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.coin-usdt { background: #26A17B; } .coin-btc { background: #F7931A; } .coin-ltc { background: #345D9D; } .coin-trx { background: #D9302D; } .coin-bnb { background: #D4A208; } .coin-eth { background: #627EEA; }

/* ---------- Badges / pills ------------------------------------------------ */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; background: var(--c-surface-2); color: var(--c-ink-soft); border: 1px solid var(--c-line); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-ok      { background: var(--c-leaf-soft); color: var(--c-leaf-deep); border-color: transparent; }
.badge-info    { background: var(--c-sky-soft);  color: var(--c-sky-deep);  border-color: transparent; }
.badge-warn    { background: var(--c-sun-soft);  color: var(--c-sun-deep);  border-color: transparent; }
.badge-danger  { background: var(--c-danger-soft); color: var(--c-danger); border-color: transparent; }
.badge-plain::before { display: none; }

/* ---------- Alerts -------------------------------------------------------- */
.alert { display: flex; gap: .8rem; align-items: flex-start; padding: .95rem 1.05rem; border-radius: var(--r-md); border: 1px solid; font-size: var(--fs-sm); }
.alert > svg { flex: none; width: 22px; height: 22px; margin-top: 1px; }
.alert strong { display: block; font-size: var(--fs-md); margin-bottom: .15rem; }
.alert-info   { background: var(--c-sky-soft);  border-color: color-mix(in srgb, var(--c-sky) 25%, white);  color: var(--c-sky-deep); }
.alert-ok     { background: var(--c-leaf-soft); border-color: color-mix(in srgb, var(--c-leaf) 30%, white); color: var(--c-leaf-deep); }
.alert-warn   { background: var(--c-sun-soft);  border-color: color-mix(in srgb, var(--c-sun) 45%, white);  color: #6E4504; }
.alert-danger { background: var(--c-danger-soft); border-color: color-mix(in srgb, var(--c-danger) 35%, white); color: #8E2620; }
/* The "send the EXACT amount" warning (feature 25): loud on purpose */
.alert-exact { border-width: 2px; border-color: var(--c-sun); background: repeating-linear-gradient(-45deg, var(--c-sun-soft) 0 14px, #FBE6C0 14px 28px); color: #5E3A02; }
.alert-exact strong { font-size: var(--fs-lg); }

/* ---------- Forms --------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); }
.field .hint { font-size: var(--fs-xs); color: var(--c-ink-faint); }
.field .error { font-size: var(--fs-xs); color: var(--c-danger); font-weight: 700; }
.input, .select, .textarea {
  width: 100%; padding: .7rem .85rem; border-radius: var(--r-md);
  border: 1px solid var(--c-line-strong); background: var(--c-surface); color: var(--c-ink);
  font: inherit; font-size: var(--fs-sm);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-leaf); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-leaf) 16%, transparent); }
.input[aria-invalid="true"] { border-color: var(--c-danger); }
.textarea { min-height: 110px; resize: vertical; }
.input-group { display: flex; min-width: 0; gap: .4rem; }
.input-group .input { min-width: 0; }
.check { display: flex; gap: .55rem; align-items: center; font-size: var(--fs-sm); }
.check input { accent-color: var(--c-leaf); width: 18px; height: 18px; }
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 42px; height: 24px; border-radius: 99px; background: var(--c-line-strong); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform .2s; }
.switch input:checked + span { background: var(--c-leaf); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c-leaf) 45%, transparent); outline-offset: 2px; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.auth-btn { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; padding: .75rem 1rem; border-radius: var(--r-pill); border: 1px solid var(--c-line-strong); background: var(--c-surface); font: 600 var(--fs-sm)/1.2 var(--f-body); color: var(--c-ink); cursor: pointer; }
.auth-btn:hover { border-color: var(--c-ink); }
.auth-btn svg { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--c-ink-faint); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }

/* ---------- Tables -------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--r-md); background: var(--c-surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; font: 600 var(--fs-xs)/1.2 var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink-faint); background: var(--c-surface-2); padding: .7rem .9rem; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--c-surface-2); }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.hash { font-family: var(--f-mono); font-size: var(--fs-xs); color: var(--c-sky-deep); }

.progress { height: 8px; border-radius: 99px; background: var(--c-line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--g-leaf); }
.progress-sun > i { background: var(--g-sun); }

.pager { display: flex; gap: .3rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; padding: .4rem .6rem; text-align: center; border-radius: var(--r-sm); border: 1px solid var(--c-line); background: var(--c-surface); text-decoration: none; color: var(--c-ink-soft); font-weight: 600; font-size: var(--fs-sm); }
.pager [aria-current] { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.tabs { display: flex; gap: .25rem; padding: .25rem; border-radius: var(--r-pill); background: var(--c-surface-2); border: 1px solid var(--c-line); overflow-x: auto; scrollbar-width: none; align-self: flex-start; max-width: 100%; }
.tabs a, .tabs button { padding: .5rem .95rem; border: 0; border-radius: var(--r-pill); background: none; font: 600 var(--fs-sm)/1 var(--f-body); color: var(--c-ink-soft); text-decoration: none; white-space: nowrap; cursor: pointer; }
.tabs [aria-selected="true"], .tabs [aria-current] { color: var(--c-ink); background: var(--c-surface); box-shadow: var(--sh-1); }

/* ---------- Banner zones (feature 3, 18): same rules as every theme -------- */
.ad-slot { --w: 468; --h: 60; position: relative; display: block; flex: none; width: calc(var(--w) * 1px); max-width: 100%; aspect-ratio: var(--w) / var(--h); margin-inline: auto; border-radius: var(--r-sm); overflow: hidden; background: var(--c-surface-2); }
.ad-slot > a { display: block; width: 100%; height: 100%; }
.ad-slot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ad-slot::after { content: "Ad"; position: absolute; top: 4px; right: 4px; padding: 0 .35rem; font: 600 9px/1.6 var(--f-body); letter-spacing: .05em; color: var(--c-ink-faint); background: rgba(255,255,255,.9); border-radius: 99px; pointer-events: none; }
.ad-728 { --w: 728; --h: 90; } .ad-468 { --w: 468; --h: 60; } .ad-300 { --w: 300; --h: 250; } .ad-160 { --w: 160; --h: 600; } .ad-125 { --w: 125; --h: 125; } .ad-120 { --w: 120; --h: 600; }
.ad-text { width: auto; aspect-ratio: auto; padding: .75rem 1rem; font-size: var(--fs-sm); border: 1px solid var(--c-line); }
.ad-rotator > :not(.is-active) { display: none; }
.ad-rotator > .is-active { animation: ad-fade .6s ease; }
@keyframes ad-fade { from { opacity: 0; } to { opacity: 1; } }
.ad-zone { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; }
.ad-zone > * { min-width: 0; }
.ad-zone > .ad-rotator { width: 100%; }
.ad-zone-inline, .ad-zone-surf, .ad-zone-box, .ad-zone-side { width: 100%; }
.ad-zone-top, .ad-zone-bottom { padding-block: .9rem; }
.ad-zone-top { border-bottom: 1px solid var(--c-line); background: var(--c-surface); }
.ad-zone-inline { padding-block: .5rem; }
.ad-zone-buttons { gap: .6rem; }
.ad-zone-box { flex-direction: column; }
.ad-zone-side { flex-direction: column; padding: .5rem 0; }
.ad-rail { position: fixed; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 24px); z-index: 5; display: none; flex-direction: column; gap: .75rem; }
.ad-rail-left { right: calc(50% + var(--wrap) / 2 + 12px); }
.ad-rail-right { left: calc(50% + var(--wrap) / 2 + 12px); }
@media (min-width: 1560px) { .ad-rail { display: flex; } }
@media (max-width: 960px) { .ad-zone-side { display: none; } }

/* ---------- Public site --------------------------------------------------- */
.hero { position: relative; background: var(--dots) 0 0 / 22px 22px, var(--g-sky); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2.5rem; align-items: center; padding-block: 3.5rem 3rem; }
.hero h1 span { color: var(--c-leaf); }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--c-sun-deep), var(--c-sun)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: var(--fs-lg); color: var(--c-ink-soft); max-width: 33rem; }
.hero-scene { position: relative; width: 100%; min-width: 0; max-width: 100%; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 2rem 1.75rem; } }

.trust-row { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .5rem; font-size: var(--fs-sm); color: var(--c-ink-soft); }
.trust-row span { display: inline-flex; align-items: center; gap: .4rem; }
.trust-row svg { width: 18px; height: 18px; color: var(--c-leaf); }

.counter-strip { background: var(--c-surface); border-block: 1px solid var(--c-line); }
.counter-strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 1.4rem; }
.counter-strip .stat { align-items: flex-start; padding-left: 1rem; border-left: 2px solid var(--c-line); }
.counter-strip .stat:first-child { border-left-color: var(--c-leaf); }
.counter-strip .stat-value { font-size: clamp(1.5rem, 3vw, 2.1rem); }
@media (max-width: 640px) { .counter-strip .wrap { grid-template-columns: repeat(2, 1fr); } }

.section { padding-block: 4rem; }
.section-head { max-width: 44rem; margin-bottom: 2rem; display: flex; flex-direction: column; gap: .75rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; }
.step { display: flex; flex-direction: column; gap: .6rem; }
.step-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; }
.step-icon svg { width: 24px; height: 24px; }
.step-icon.leaf { background: var(--c-leaf-soft); color: var(--c-leaf-deep); }
.step-icon.sky { background: var(--c-sky-soft); color: var(--c-sky-deep); }
.step-icon.sun { background: var(--c-sun-soft); color: var(--c-sun-deep); }

.plan { display: flex; flex-direction: column; gap: .8rem; }
.plan-price { font: 650 2.2rem/1 var(--f-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.plan-price small { font: 500 var(--fs-sm) var(--f-body); letter-spacing: 0; color: var(--c-ink-soft); }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; font-size: var(--fs-sm); }
.plan li { display: flex; gap: .5rem; } .plan li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--c-leaf-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23087A54' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan.is-featured { background: var(--c-night); color: #E6F2ED; border-color: var(--c-night); position: relative; box-shadow: var(--sh-2); }
.plan.is-featured .faint, .plan.is-featured .plan-price small { color: #9DBDB1; }
.plan.is-featured .badge-ok { background: rgba(20,176,124,.18); color: #7FE2B8; }
.plan.is-featured .plan-price { color: #fff; }
.plan.is-featured .btn { --b-bg: var(--c-sun); --b-fg: #3A2400; --b-bd: var(--c-sun); background: var(--g-sun); }
.plan .ribbon { position: absolute; top: -12px; right: 1.25rem; }

.site-footer { position: relative; margin-top: 3rem; background: var(--c-night); color: var(--c-night-ink); }
.site-footer a { color: #E2F0EA; text-decoration: none; }
.site-footer a:hover { color: #F6C065; }
.footer-scene { display: block; width: 100%; height: 84px; background: var(--c-bg); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; padding-block: 2.5rem 1.5rem; }
.site-footer h4 { color: #fff; font-size: var(--fs-md); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: var(--fs-sm); }
.site-footer .logo { color: #fff; }
.site-footer .logo-text b { color: #4FD1A0; }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); font-size: var(--fs-xs); color: #86A79B; }
.footer-base .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-block: 1rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }

.auth-shell { min-height: 70vh; display: grid; place-items: center; padding-block: 2.5rem; background: var(--dots) 0 0 / 22px 22px, var(--g-sky); }
.auth-card { width: min(440px, 100%); }

/* ---------- App shell: member area + admin -------------------------------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - var(--header-h)); }
.app-side { background: var(--c-surface); border-right: 1px solid var(--c-line); padding: 1rem .75rem; display: flex; flex-direction: column; gap: 1rem; }
.app-main { min-width: 0; padding: 1.5rem max(16px, 2vw); display: flex; flex-direction: column; gap: 1.25rem; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-title { font: 600 11px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-faint); padding: .6rem .7rem .3rem; }
.side-link { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: var(--r-sm); color: var(--c-ink-soft); font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.side-link svg { width: 18px; height: 18px; flex: none; }
.side-link:hover { background: var(--c-surface-2); color: var(--c-ink); }
.side-link[aria-current="page"] { background: var(--c-ink); color: #fff; }
.side-link .count { margin-left: auto; min-width: 22px; padding: 0 .4rem; border-radius: 99px; background: var(--c-sun); color: #3A2400; font-size: 11px; font-weight: 700; text-align: center; line-height: 1.7; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.page-head h1 { font-size: var(--fs-2xl); margin: 0; letter-spacing: -.035em; line-height: 1.1; }
.crumbs { font-size: var(--fs-xs); color: var(--c-ink-faint); margin-bottom: .3rem; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .app-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--c-line); padding: .5rem; gap: .25rem; scrollbar-width: thin; }
  .side-group { flex-direction: row; gap: 2px; }
  .side-title { display: none; }
  .side-link { white-space: nowrap; }
}
.admin .app-side { background: var(--c-night); border-color: var(--c-night); }
.admin .side-title { color: #6B8F82; }
.admin .side-link { color: #BBD2C9; }
.admin .side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin .side-link[aria-current="page"] { background: rgba(20,176,124,.2); color: #7FE2B8; }
.admin-top { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.admin-top .input { max-width: 340px; }

.ring { position: relative; width: var(--ring, 132px); aspect-ratio: 1; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--c-line); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font: 650 1.7rem/1 var(--f-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ring-label small { font-size: var(--fs-xs); color: var(--c-ink-soft); }

.tree, .tree ul { list-style: none; margin: 0; padding-left: 1.1rem; }
.tree { padding-left: 0; }
.tree li { position: relative; padding: .3rem 0 .3rem 1rem; font-size: var(--fs-sm); }
.tree ul li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--c-line-strong); }
.tree ul li::after { content: ""; position: absolute; left: 0; top: 1.05rem; width: .8rem; border-top: 1px solid var(--c-line-strong); }
.tree summary { cursor: pointer; list-style: none; display: inline-flex; gap: .5rem; align-items: center; font-size: var(--fs-sm); }
.tree summary::-webkit-details-marker { display: none; }

/* ---------- Surf bar ------------------------------------------------------ */
.surf { display: flex; flex-direction: column; height: 100%; min-height: 520px; }
.surf-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .6rem max(16px, 1.5vw); background: var(--c-surface); border-bottom: 3px solid; border-image: var(--g-money) 1; }
.surf-timer { --ring: 46px; }
.surf-timer .ring-label b { font-size: .95rem; }
.surf-check { display: flex; gap: .4rem; }
.surf-check button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--c-line-strong); background: var(--c-surface); cursor: pointer; display: grid; place-items: center; color: var(--c-ink); }
.surf-check button:hover { border-color: var(--c-leaf); background: var(--c-leaf-soft); }
.surf-check svg { width: 22px; height: 22px; }
.surf-frame { flex: 1; background: var(--dots) 0 0 / 22px 22px, var(--c-surface-2); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding-block: 1rem; color: var(--c-ink-faint); }

.copy { display: flex; gap: .5rem; align-items: center; padding: .6rem .7rem; border: 1px solid var(--c-line-strong); border-radius: var(--r-md); background: var(--c-surface-2); min-width: 0; }
.copy code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: var(--fs-sm); color: var(--c-ink); }
.countdown { font: 500 var(--fs-xl)/1 var(--f-mono); color: var(--c-sun-deep); font-variant-numeric: tabular-nums; }

.toast { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 80; background: var(--c-night); color: #fff; padding: .7rem 1rem; border-radius: var(--r-md); box-shadow: var(--sh-2); font-size: var(--fs-sm); font-weight: 600; }

/* ==========================================================================
   Shared by the blockchain and revenue themes (optional components)
   ========================================================================== */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-leaf); display: inline-block; flex: none; animation: live 2.2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(14,159,110,.45); } 70%,100% { box-shadow: 0 0 0 9px rgba(14,159,110,0); } }

/* Activity ticker: light chips. Partial prints events twice for a seamless loop. */
.ticker { background: var(--c-surface); border-block: 1px solid var(--c-line); font-size: var(--fs-sm); overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: .6rem; padding: .7rem .6rem .7rem 0; animation: ticker 70s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track > span { display: inline-flex; gap: .4rem; align-items: center; padding: .3rem .75rem; border-radius: var(--r-pill); background: var(--c-surface-2); border: 1px solid var(--c-line); color: var(--c-ink-soft); }
.ticker-track b { color: var(--c-ink); font-weight: 600; }
.ticker-track i { font-style: normal; font-weight: 700; color: var(--c-leaf-deep); }
.ticker-track em { font-style: normal; font-weight: 700; color: var(--c-sun-deep); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Panel header strip: label left, meta right (e.g. "Live activity" · "live", "QUOTE #Q-20931" · "USDT · TRC20") */
.block-tag { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; font: 600 var(--fs-xs)/1.4 var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: var(--c-ink-faint); }
.block-tag b { color: var(--c-ink); font-weight: 600; }

.ledger { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ledger li { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--c-line); }
.ledger li:last-child { border-bottom: 0; }
.ledger .cube { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--c-sky-soft); color: var(--c-sky-deep); }
.ledger .cube svg { width: 18px; height: 18px; }
.ledger .cube.ok { background: var(--c-leaf-soft); color: var(--c-leaf-deep); }
.ledger .cube.sun { background: var(--c-sun-soft); color: var(--c-sun-deep); }
.ledger .what { min-width: 0; font-size: var(--fs-sm); font-weight: 600; }
.ledger .what small { display: block; font: 400 var(--fs-xs)/1.4 var(--f-body); color: var(--c-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger .amt { font: 650 var(--fs-md)/1.2 var(--f-display); letter-spacing: -.02em; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger .amt.plus { color: var(--c-leaf-deep); }
.ledger li.is-new { animation: ledger-in .8s ease; }
@keyframes ledger-in { from { background: var(--c-leaf-soft); } to { background: transparent; } }

.confirm-blocks { display: flex; flex-wrap: wrap; gap: 4px; }
.confirm-blocks i { width: 14px; height: 14px; border-radius: 50%; background: var(--c-line); }
.confirm-blocks i.on { background: var(--c-leaf); }
.confirm-blocks i.now { background: var(--c-sun); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ==========================================================================
   Revenue-only components
   ========================================================================== */

/* Hero scene: a white dashboard card; revenue.js draws the counter, chart, coins and event cards inside it */
.hero-scene { aspect-ratio: 5 / 3.5; min-height: 290px; border-radius: 22px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--sh-2); }
.hero-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: inherit; }
.scene-chip { position: absolute; left: 18px; bottom: -18px; display: inline-flex; gap: .55rem; align-items: center; padding: .55rem .9rem; border-radius: 14px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--sh-2); font-size: var(--fs-sm); color: var(--c-ink-soft); }
.scene-chip .num { font: 650 var(--fs-md)/1 var(--f-display); color: var(--c-ink); letter-spacing: -.02em; }
.sun-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--g-sun); display: inline-block; flex: none; box-shadow: 0 0 0 3px var(--c-sun-soft); }
@media (max-width: 900px) { .hero .wrap { padding-bottom: 2.75rem; } }

/* Optional floating chip for any card (e.g. a payout notice) */
.payout-chip { position: absolute; display: flex; align-items: center; gap: .6rem; padding: .55rem .85rem .55rem .55rem; border-radius: 14px; background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--sh-2); font-size: var(--fs-xs); color: var(--c-ink-soft); white-space: nowrap; animation: chip-float 6s ease-in-out infinite; }
.payout-chip b { display: block; font: 650 var(--fs-md)/1.1 var(--f-display); color: var(--c-ink); letter-spacing: -.02em; }
.payout-chip .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--c-leaf-soft); color: var(--c-leaf-deep); flex: none; }
.payout-chip .ico.gold { background: var(--c-sun-soft); color: var(--c-sun-deep); }
.payout-chip .ico svg { width: 18px; height: 18px; }
.payout-chip.c1 { top: -18px; right: 18px; }
@keyframes chip-float { 50% { transform: translateY(-6px); } }

/* Advertiser reach calculator: budget -> views and clicks at current prices */
.calc { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; align-items: stretch; }
.calc-out { border-radius: var(--r-lg); background: var(--c-night); color: #DCEDE6; padding: 1.35rem; display: flex; flex-direction: column; gap: .9rem; }
.calc-out .stat-label { color: #8FB3A6; }
.calc-out .stat-value { color: #fff; font-size: clamp(2rem, 4vw, 2.6rem); }
.calc-out .stat-value.gold { color: #F6C065; }
.calc-range { width: 100%; accent-color: var(--c-leaf); }
.calc-note { font-size: var(--fs-xs); color: #8FB3A6; margin: 0; }
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; } }

/* Value flow (advertisers -> network -> members) */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: .75rem; align-items: stretch; }
.flow-node { min-width: 0; }
.flow-link { align-self: center; width: 44px; height: 2px; background: repeating-linear-gradient(90deg, var(--c-leaf) 0 6px, transparent 6px 11px); background-size: 22px 2px; animation: flow 1.2s linear infinite; position: relative; }
.flow-link::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--c-leaf); border-right: 0; }
@keyframes flow { to { background-position: 22px 0; } }
@media (max-width: 860px) {
  .flow { grid-template-columns: 1fr; }
  .flow-link { justify-self: center; width: 2px; height: 28px; background: repeating-linear-gradient(180deg, var(--c-leaf) 0 6px, transparent 6px 11px); background-size: 2px 22px; animation-name: flow-v; }
  .flow-link::after { right: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top-color: var(--c-leaf); border-bottom: 0; }
}
@keyframes flow-v { to { background-position: 0 22px; } }

.format { display: flex; flex-direction: column; gap: .7rem; }
.format-shot { height: 96px; border-radius: var(--r-md); background: var(--c-surface-2); border: 1px solid var(--c-line); position: relative; overflow: hidden; }
.format-shot i { position: absolute; display: block; border-radius: 4px; background: var(--c-line); }
.format-shot i.ad { background: var(--g-leaf); }
.format-shot i.ad.sun { background: var(--g-sun); }
.format-price { font: 600 var(--fs-sm)/1.3 var(--f-body); color: var(--c-leaf-deep); }

.logo-mark .bar3 { transform-origin: 30px 33px; animation: bar-grow 3.2s ease-in-out infinite; }
@keyframes bar-grow { 50% { transform: scaleY(1.12); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ticker { white-space: normal; }
  .ticker-track { flex-wrap: wrap; padding-left: var(--side); transform: none !important; }
  .ticker-track [aria-hidden="true"] { display: none; }
}
