/* ===================================================================
   Growzy Labs Ads & Earn — Design System
   Premium dark default + light mode. No external dependencies.
   =================================================================== */

:root {
  /* Growzy blue-and-white system. Light is the default surface. */
  --bg: #f4f7fd;
  --bg-elev: #ffffff;
  --bg-elev-2: #ffffff;
  --surface: rgba(13, 42, 92, .025);
  --surface-2: rgba(13, 42, 92, .052);
  --border: rgba(13, 42, 92, .12);
  --border-strong: rgba(13, 42, 92, .22);
  --text: #0d1b31;
  --text-dim: #465a7a;
  --text-mute: #7488a5;
  --brand: #1d6ff2;
  --brand-2: #0b4fd0;
  --brand-soft: #e8f0fe;
  --brand-ink: #ffffff;
  --ok: #12855a;
  --warn: #a86a08;
  --bad: #ce2f43;
  --info: #1173a8;
  --ring: rgba(29, 111, 242, .42);
  --shadow-1: 0 1px 2px rgba(13, 42, 92, .07);
  --shadow-2: 0 8px 24px -10px rgba(13, 42, 92, .18);
  --shadow-3: 0 24px 60px -22px rgba(13, 42, 92, .26);
  --r-sm: 8px;  --r: 12px;  --r-lg: 16px;  --r-xl: 22px;
  --maxw: 1180px;
  --nav-h: 66px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #060d1c;
  --bg-elev: #0c1729;
  --bg-elev-2: #122036;
  --surface: rgba(255, 255, 255, .03);
  --surface-2: rgba(255, 255, 255, .055);
  --border: rgba(146, 183, 255, .15);
  --border-strong: rgba(146, 183, 255, .28);
  --text: #eaf1fb;
  --text-dim: #a3b6d4;
  --text-mute: #6f83a3;
  --brand: #4f95ff;
  --brand-2: #2f6fe4;
  --brand-soft: rgba(79, 149, 255, .14);
  --ok: #2fbf80;
  --warn: #e2a13c;
  --bad: #f2626c;
  --info: #46b0d9;
  --ring: rgba(79, 149, 255, .5);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, .6);
  --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .72);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background wash — subtle, not a "cheap gradient" */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(29,111,242,.07), transparent 60%),
    radial-gradient(680px 400px at 92% 4%, rgba(11,79,208,.05), transparent 62%);
  pointer-events: none; z-index: 0;
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(79,149,255,.13), transparent 60%),
    radial-gradient(680px 400px at 92% 4%, rgba(47,111,228,.10), transparent 62%);
}

h1,h2,h3,h4 { margin: 0 0 .5em; line-height: 1.18; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.5rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.55rem, 3.4vw, 2.35rem); letter-spacing: -.028em; }
h3 { font-size: 1.16rem; }
p { margin: 0 0 1rem; color: var(--text-dim); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }

/* ---------------- Navbar ---------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-in { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; height: 100%;
  display: flex; align-items: center; gap: 28px; }

.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.03rem;
  color: var(--text); letter-spacing: -.02em; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .92rem;
  box-shadow: 0 4px 14px -4px rgba(29,111,242,.5);
}

.nav-links { display: flex; gap: 3px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--text-dim); padding: 8px 13px; border-radius: var(--r-sm);
  font-size: .93rem; font-weight: 500; transition: color .18s, background .18s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 9px; margin-left: 14px; }

.theme-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); cursor: pointer;
  display: grid; place-items: center; transition: all .18s; flex-shrink: 0;
}
.theme-btn:hover { color: var(--text); border-color: var(--border-strong); }
.theme-btn svg { width: 17px; height: 17px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.burger { display: none; width: 38px; height: 38px; border-radius: var(--r-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; padding: 0; place-items: center; }
.burger svg { width: 19px; height: 19px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r); border: 1px solid transparent;
  font-size: .94rem; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: transform .16s cubic-bezier(.34,1.4,.64,1), box-shadow .2s, background .2s, border-color .2s, opacity .2s;
  white-space: nowrap; text-decoration: none; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }

.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  box-shadow: 0 6px 20px -8px rgba(91,140,255,.7); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -10px rgba(91,140,255,.85); color: #fff; }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }

.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(1.08); color: #fff; }

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-sm { padding: 7px 13px; font-size: .85rem; border-radius: var(--r-sm); }
.btn-xs { padding: 4px 9px; font-size: .78rem; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---------------- Cards & surfaces ---------------- */
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-1);
}
.card-pad-lg { padding: 28px; }
.card-hover { transition: transform .22s cubic-bezier(.34,1.2,.64,1), border-color .22s, box-shadow .22s; }
.card-hover:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-2); }

.panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.panel-head {
  padding: 15px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.panel-head h3 { margin: 0; font-size: 1rem; }
.panel-body { padding: 20px; }
.panel-body-flush { padding: 0; }

/* ---------------- Badges & chips ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 100px; font-size: .755rem; font-weight: 650; letter-spacing: .015em;
  border: 1px solid transparent; white-space: nowrap; line-height: 1.5;
}
.badge-ok    { background: color-mix(in srgb, var(--ok) 15%, transparent);   color: var(--ok);   border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.badge-warn  { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.badge-bad   { background: color-mix(in srgb, var(--bad) 15%, transparent);  color: var(--bad);  border-color: color-mix(in srgb, var(--bad) 32%, transparent); }
.badge-info  { background: color-mix(in srgb, var(--info) 15%, transparent); color: var(--info); border-color: color-mix(in srgb, var(--info) 32%, transparent); }
.badge-muted { background: var(--surface-2); color: var(--text-mute); border-color: var(--border); }

.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px;
  border-radius: 100px; background: var(--surface); border: 1px solid var(--border);
  font-size: .82rem; color: var(--text-dim);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.dot-live { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent); animation: pulse 2.2s infinite; }
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------------- Forms ---------------- */
.field { margin-bottom: 16px; }
.label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.label .req { color: var(--bad); }
.hint { font-size: .8rem; color: var(--text-mute); margin-top: 5px; line-height: 1.5; }
.err { font-size: .8rem; color: var(--bad); margin-top: 5px; font-weight: 500; }

.input, .select, .textarea {
  width: 100%; padding: 11px 13px; font-size: .94rem; font-family: inherit;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r);
  transition: border-color .18s, box-shadow .18s; line-height: 1.5;
}
[data-theme="dark"] .input, [data-theme="dark"] .select, [data-theme="dark"] .textarea { background: var(--bg-elev); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring);
}
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input.has-err, .textarea.has-err, .select.has-err { border-color: var(--bad); }
.textarea { resize: vertical; min-height: 100px; }
.select {
  appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7488' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
.input-group { display: flex; align-items: stretch; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 13px; background: var(--surface-2);
  border: 1px solid var(--border); border-right: 0;
  border-radius: var(--r) 0 0 var(--r); color: var(--text-dim); font-weight: 600; font-size: .92rem;
}
.input-group .input { border-radius: 0 var(--r) var(--r) 0; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .9rem; color: var(--text-dim); }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ---------------- Alerts ---------------- */
.alert {
  padding: 13px 16px; border-radius: var(--r); margin-bottom: 16px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; line-height: 1.55;
}
.alert-success { border-color: color-mix(in srgb, var(--ok) 38%, transparent);  background: color-mix(in srgb, var(--ok) 11%, transparent);  color: var(--ok); }
.alert-error   { border-color: color-mix(in srgb, var(--bad) 38%, transparent); background: color-mix(in srgb, var(--bad) 11%, transparent); color: var(--bad); }
.alert-warning { border-color: color-mix(in srgb, var(--warn) 38%, transparent);background: color-mix(in srgb, var(--warn) 11%, transparent);color: var(--warn); }
.alert-info    { border-color: color-mix(in srgb, var(--info) 38%, transparent);background: color-mix(in srgb, var(--info) 11%, transparent);color: var(--info); }
.alert strong { color: inherit; }

.toast-wrap { position: fixed; top: 76px; right: 18px; z-index: 400; display: flex; flex-direction: column; gap: 9px; max-width: 350px; }
.toast {
  padding: 12px 16px; border-radius: var(--r); background: var(--bg-elev-2);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-3);
  font-size: .89rem; animation: toastIn .3s cubic-bezier(.34,1.3,.64,1);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }
.toast.success { border-left: 3px solid var(--ok); }
.toast.error   { border-left: 3px solid var(--bad); }
.toast.info    { border-left: 3px solid var(--info); }
.toast.warning { border-left: 3px solid var(--warn); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.table th {
  text-align: left; padding: 11px 16px; font-weight: 600; font-size: .765rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute);
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface);
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .14s; }
.table tbody tr:hover { background: var(--surface); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table a { font-weight: 500; }

.empty { text-align: center; padding: 52px 20px; color: var(--text-mute); }
.empty-icon {
  width: 54px; height: 54px; margin: 0 auto 14px;
  display: grid; place-items: center; border-radius: 15px;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
}
.empty-icon svg { display: block; }
.empty h4 { color: var(--text-dim); margin-bottom: 6px; font-size: 1rem; }
.empty p { font-size: .89rem; margin: 0 auto; max-width: 380px; }

/* ---------------- Stats ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 15px; }
.stat {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px; position: relative; overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.stat:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.stat-label { font-size: .755rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-mute); font-weight: 650; margin-bottom: 7px; }
.stat-value { font-size: 1.75rem; font-weight: 750; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--text); }
.stat-sub { font-size: .8rem; color: var(--text-dim); margin-top: 5px; }
.stat-accent { position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* ---------------- Hero ---------------- */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 80px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { font-size: clamp(1rem, 1.9vw, 1.155rem); color: var(--text-dim); max-width: 560px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-trust { display: flex; gap: 22px; flex-wrap: wrap; font-size: .84rem; color: var(--text-mute); }
.hero-trust span { display: flex; align-items: center; gap: 7px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px;
  border-radius: 100px; background: var(--surface); border: 1px solid var(--border);
  font-size: .8rem; color: var(--text-dim); margin-bottom: 22px; font-weight: 500;
}

.gradient-text {
  background: linear-gradient(120deg, var(--brand) 10%, var(--brand-2) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------------- Dashboard preview (hero visual) ---------------- */
.preview {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 17px; box-shadow: var(--shadow-3);
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform .6s cubic-bezier(.2,.8,.3,1);
}
.preview:hover { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }
.preview-bar { display: flex; gap: 6px; margin-bottom: 15px; align-items: center; }
.preview-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); display: block; }
.preview-title { margin-left: 8px; font-size: .76rem; color: var(--text-mute); }
.preview-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 13px; }
.preview-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 11px 13px; }
.preview-stat .l { font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); margin-bottom: 4px; }
.preview-stat .v { font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.spark { display: flex; align-items: flex-end; gap: 5px; height: 88px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.spark i {
  flex: 1; background: linear-gradient(180deg, var(--brand), var(--brand-2));
  border-radius: 3px 3px 0 0; display: block; min-height: 4px;
  animation: growBar .9s cubic-bezier(.2,.9,.3,1) backwards;
}
@keyframes growBar { from { height: 2px !important; opacity: .3; } }

/* ---------------- Sections ---------------- */
.section { padding: clamp(52px, 8vw, 88px) 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 46px; }
.section-head p { font-size: 1.02rem; }
.section-alt { background: var(--bg-elev); border-block: 1px solid var(--border); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 18px; }
.feature { padding: 24px; border-radius: var(--r-lg); background: var(--bg-elev);
  border: 1px solid var(--border); transition: transform .22s cubic-bezier(.34,1.2,.64,1), border-color .22s, box-shadow .22s; }
.feature:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.feature-icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
  margin-bottom: 14px;
}
.feature-icon svg { display: block; }
.feature h3 { font-size: 1.03rem; margin-bottom: 7px; }
.feature p { font-size: .9rem; margin: 0; }

/* Flow steps with animated connectors */
.flow { display: grid; gap: 18px; position: relative; }
.flow-step { display: flex; gap: 16px; align-items: flex-start; position: relative; }
.flow-num {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  font-weight: 700; font-size: .85rem; z-index: 1; box-shadow: 0 3px 12px -3px rgba(91,140,255,.6);
}
.flow-step:not(:last-child) .flow-num::after {
  content: ""; position: absolute; top: 34px; left: 16px; width: 2px; height: calc(100% - 26px);
  background: linear-gradient(180deg, var(--brand), transparent);
  opacity: .35;
}
.flow-body h4 { margin: 5px 0 5px; font-size: .98rem; }
.flow-body p { font-size: .88rem; margin: 0; }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }

/* ---------------- Telegram ad preview ---------------- */
.tg-preview {
  background: #17212b; border-radius: var(--r-lg); padding: 17px;
  border: 1px solid rgba(255,255,255,.08); font-size: .9rem; color: #fff;
}
.tg-bubble { background: #182533; border-radius: 12px; padding: 13px 15px; max-width: 100%; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.tg-sponsored { font-size: .77rem; color: #6ab3f3; font-weight: 600; margin-bottom: 8px; }
.tg-body { white-space: pre-wrap; word-break: break-word; line-height: 1.5; color: #f0f3f6; }
.tg-img { width: 100%; border-radius: 9px; margin-bottom: 10px; max-height: 220px; object-fit: cover; }
.tg-btn {
  margin-top: 11px; padding: 9px; text-align: center; background: #2b5278;
  border-radius: 8px; color: #fff; font-weight: 500; font-size: .88rem; cursor: default;
}
.tg-meta { font-size: .7rem; color: #7d8e9e; margin-top: 7px; text-align: right; }

/* ---------------- Wizard ---------------- */
.steps { display: flex; gap: 6px; margin-bottom: 26px; overflow-x: auto; padding-bottom: 4px; }
.step-pill {
  flex: 1; min-width: 92px; padding: 9px 11px; border-radius: var(--r); text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .78rem; color: var(--text-mute); font-weight: 600; transition: all .22s;
}
.step-pill.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.step-pill.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 34%, transparent); }
.wizard-step { display: none; animation: fadeUp .32s cubic-bezier(.2,.9,.3,1); }
.wizard-step.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(9px); } }

/* ---------------- FAQ accordion ---------------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; padding: 17px 0; background: none; border: 0;
  color: var(--text); font-size: 1rem; font-weight: 600; cursor: pointer; font-family: inherit;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-q:hover { color: var(--brand); }
.faq-icon { flex-shrink: 0; transition: transform .28s cubic-bezier(.34,1.3,.64,1); font-size: 1.3rem;
  color: var(--text-mute); line-height: 1; font-weight: 300; }
.faq-item.open .faq-icon { transform: rotate(45deg); color: var(--brand); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .34s cubic-bezier(.4,0,.2,1); }
.faq-a-in { padding: 0 0 17px; color: var(--text-dim); font-size: .93rem; line-height: 1.65; }

/* ---------------- Dashboard shell ---------------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  background: var(--bg-elev); border-right: 1px solid var(--border);
  padding: 18px 13px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 9px; padding: 5px 9px 20px; font-weight: 800; color: var(--text); }
.side-brand:hover { text-decoration: none; }
.side-group { margin-bottom: 20px; }
.side-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-mute); font-weight: 700; padding: 0 10px; margin-bottom: 6px; }
.side a.side-link {
  position: relative;
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm);
  color: var(--text-dim); font-size: .885rem; font-weight: 500; margin-bottom: 2px;
  transition: background .16s, color .16s;
}
.side a.side-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side a.side-link:hover .side-ico { color: var(--brand); }
.side a.side-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side a.side-link.active .side-ico { color: var(--brand); }
/* Active rail marker — reads as deliberate structure, not decoration */
.side a.side-link.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--brand);
}
.side-ico {
  width: 18px; height: 18px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--text-mute); transition: color .16s;
}
.side-ico svg { width: 18px; height: 18px; display: block; }

/* Inline icons inside dropdown items and buttons */
.dropdown-menu a .ico, .dropdown-menu button .ico {
  width: 16px; height: 16px; flex-shrink: 0; vertical-align: -3px; margin-right: 7px;
  color: var(--text-mute);
}
.dropdown-menu a:hover .ico, .dropdown-menu button:hover .ico { color: var(--brand); }

/* Error-page glyph: a framed icon rather than a giant emoji */
.err-ico {
  width: 68px; height: 68px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 20px;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; border-bottom: 1px solid var(--border); display: flex; align-items: center;
  gap: 14px; padding: 0 22px; position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar h1 { font-size: 1.06rem; margin: 0; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.content { padding: 24px 22px 60px; flex: 1; }

.avatar {
  width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  font-weight: 700; font-size: .82rem; flex-shrink: 0; text-transform: uppercase;
}

.bell { position: relative; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
  cursor: pointer; display: grid; place-items: center; }
.bell:hover { color: var(--text); }
.bell-count {
  position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 100px; background: var(--bad); color: #fff; font-size: .64rem;
  font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg);
}

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 218px; z-index: 200;
  background: var(--bg-elev-2); border: 1px solid var(--border-strong);
  border-radius: var(--r); box-shadow: var(--shadow-3); padding: 6px; display: none;
}
.dropdown.open .dropdown-menu { display: block; animation: fadeUp .18s ease; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px;
  border-radius: var(--r-sm); color: var(--text-dim); font-size: .885rem;
  background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown-divider { height: 1px; background: var(--border); margin: 5px 0; }

/* ---------------- Progress ---------------- */
.progress { height: 6px; background: var(--surface-2); border-radius: 100px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 100px; transition: width .6s cubic-bezier(.2,.9,.3,1); }
.progress-bar.warn { background: var(--warn); }
.progress-bar.bad { background: var(--bad); }
.progress-bar.ok { background: var(--ok); }

/* Quality ring */
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg-elev); }
.ring-val { position: relative; font-weight: 750; font-size: 1.3rem; font-variant-numeric: tabular-nums; }

/* Chart (pure CSS/SVG) */
.chart { width: 100%; height: 190px; }
.chart-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { fill: url(#chartGrad); opacity: .22; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-dot { fill: var(--brand); }
.chart-labels { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-mute); margin-top: 6px; }

/* ---------------- Pagination ---------------- */
.pager { display: flex; gap: 5px; justify-content: center; padding: 18px; flex-wrap: wrap; align-items: center; }
.pager a, .pager span {
  min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: .85rem;
  border: 1px solid var(--border); color: var(--text-dim); background: var(--surface);
}
.pager a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pager .current { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.pager .disabled { opacity: .38; pointer-events: none; }

/* ---------------- Footer ---------------- */
.footer { border-top: 1px solid var(--border); padding: 52px 0 26px; margin-top: 60px; background: var(--bg-elev); }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 36px; margin-bottom: 36px; }
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-mute); margin-bottom: 13px; font-weight: 700; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: var(--text-dim); font-size: .885rem; }
.footer-links a:hover { color: var(--brand); }
.footer-about p { font-size: .885rem; max-width: 320px; margin-top: 13px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 22px; display: flex;
  justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center;
  font-size: .83rem; color: var(--text-mute);
}
.footer-credit a { color: var(--text-dim); font-weight: 600; }
.footer-credit a:hover { color: var(--brand); }
.footer-credit .team { color: var(--text-mute); opacity: .8; }

/* ---------------- Utilities ---------------- */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 6px; } .gap-2 { gap: 11px; } .gap-3 { gap: 17px; }
.wrap-flex { flex-wrap: wrap; }
.mt-0{margin-top:0}.mt-1{margin-top:7px}.mt-2{margin-top:14px}.mt-3{margin-top:22px}.mt-4{margin-top:32px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:7px}.mb-2{margin-bottom:14px}.mb-3{margin-bottom:22px}.mb-4{margin-bottom:32px}
.text-center{text-align:center}.text-right{text-align:right}
.text-dim{color:var(--text-dim)}.text-mute{color:var(--text-mute)}
.text-ok{color:var(--ok)}.text-bad{color:var(--bad)}.text-warn{color:var(--warn)}.text-brand{color:var(--brand)}
.small{font-size:.855rem}.xs{font-size:.775rem}
.bold{font-weight:650}.semibold{font-weight:600}
.tabular{font-variant-numeric:tabular-nums}
.hidden{display:none !important}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.w-full{width:100%}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.demo-tag{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:5px;
  background:color-mix(in srgb,var(--warn) 17%,transparent);color:var(--warn);
  font-size:.66rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(.2,.9,.3,1), transform .6s cubic-bezier(.2,.9,.3,1); }
.reveal.in { opacity: 1; transform: none; }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.28);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .preview { transform: none; }
  .split-2 { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .shell { grid-template-columns: 200px 1fr; }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column;
    background: var(--bg-elev); border-bottom: 1px solid var(--border);
    padding: 14px; gap: 3px; display: none; margin: 0; box-shadow: var(--shadow-2);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; width: 100%; }
  .burger { display: grid; }
  .nav-actions { margin-left: auto; }
  .nav-actions .btn { display: none; }
  .nav-actions .theme-btn { display: grid; }

  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 300;
    transform: translateX(-100%); transition: transform .28s cubic-bezier(.3,.9,.3,1); height: 100dvh;
  }
  .side.open { transform: none; box-shadow: var(--shadow-3); }
  .side-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 299; display: none; }
  .side-backdrop.show { display: block; }
  .content { padding: 18px 15px 50px; }
  .topbar { padding: 0 15px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 11px; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 1.45rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .card { padding: 17px; }
  .card-pad-lg { padding: 20px; }
  .panel-body { padding: 16px; }
  .table th, .table td { padding: 10px 12px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 9px; }
  .toast-wrap { left: 12px; right: 12px; max-width: none; }
  .section { padding: 44px 0; }
}

@media (max-width: 390px) {
  .wrap, .wrap-narrow { padding: 0 14px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------- Accessibility: reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .preview { transform: none; }
}

@media print {
  .nav, .side, .footer, .topbar, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Homepage additions ---------- */
/* Inline tick badge used in hero bullet rows */
span.check {
  display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent);
  flex-shrink: 0; vertical-align: -3px; margin-right: 2px;
}
span.check svg { display: block; stroke-width: 2.6; }
.preview-line { display: flex; align-items: center; gap: 10px; font-size: .85rem;
  padding: 8px 11px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); }
.preview-line span:nth-child(3) { margin-left: auto; font-variant-numeric: tabular-nums; }
.items-center { align-items: center; }
.gap-2 { gap: 10px; }
.steps { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 9px; }
.steps li { position: relative; padding-left: 24px; font-size: .9rem; color: var(--text-dim); }
.steps li::before {
  content: ""; position: absolute; left: 2px; top: 6px;
  width: 10px; height: 5.5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.feature-icon { width: 38px; height: 38px; border-radius: 11px; }
.grid-2 > .panel, .grid-3 > .panel { height: 100%; }

/* ---------- Role picker (registration) ---------- */
.role-pick { position: relative; display: block; cursor: pointer; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--surface);
  transition: border-color .18s, background .18s, transform .18s; }
.role-pick:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.role-pick.on { border-color: var(--brand); background: rgba(91,140,255,.08); }
.role-pick input { position: absolute; opacity: 0; pointer-events: none; }
.role-pick strong { display: block; font-size: .95rem; margin-bottom: 3px; }
.role-pick span { display: block; font-size: .78rem; color: var(--text-dim); line-height: 1.4; }
.role-pick:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.justify-between { justify-content: space-between; }
.mb-3 { margin-bottom: 16px; }
.xs { font-size: .78rem; }
.text-mute { color: var(--text-mute); }

/* ---------- Chart labels ---------- */
.chart-labels { display: flex; justify-content: space-between; font-size: .74rem;
  color: var(--text-mute); padding: 8px 2px 0; }
.chart { width: 100%; height: 120px; display: block; }

/* ---------------- Campaign wizard ---------------- */
.wizard-head { margin-bottom: 22px; }
.step-pills { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.step-pills::-webkit-scrollbar { display: none; }
.step-pill { display: flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 100px; background: var(--surface);
  font-size: .82rem; color: var(--text-mute); white-space: nowrap; transition: all .2s; flex-shrink: 0; }
.step-pill:hover { border-color: var(--border-strong); color: var(--text-dim); }
.step-pill .sp-n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.step-pill.on { border-color: var(--brand); color: var(--text); background: rgba(91,140,255,.09); }
.step-pill.on .sp-n { background: var(--brand); color: #fff; }
.step-pill.done { color: var(--text-dim); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.step-pill.done .sp-n { background: var(--ok); color: #fff; }
.step-pill.done .sp-n::after { content: ""; display: block; width: 8px; height: 4.5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translate(1px,-1px); }
.step-pill.done .sp-n { font-size: .72rem; }
.step-pill.done .sp-n { color: #fff; }

.wizard-step { display: none; }
.wizard-step.on { display: block; animation: wizIn .3s cubic-bezier(.2,.9,.3,1); }
@keyframes wizIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.wizard-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

.wizard-layout { align-items: start; }
.sticky-preview { position: sticky; top: 88px; }

.review-list { margin: 0 0 18px; display: grid; gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.review-list > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px;
  background: var(--bg-elev); padding: 12px 15px; }
.review-list dt { font-size: .8rem; color: var(--text-mute); margin: 0; }
.review-list dd { margin: 0; font-size: .88rem; word-break: break-word; }

@media (max-width: 1024px) {
  .wizard-layout { grid-template-columns: 1fr; }
  .sticky-preview { position: static; }
}
@media (max-width: 640px) {
  .review-list > div { grid-template-columns: 1fr; gap: 3px; }
  .wizard-nav { flex-wrap: wrap; }
  .wizard-nav .btn { flex: 1; }
}

/* Step pill "done" checkmark replaces the number cleanly */
.step-pill.done .sp-n { font-size: 0; }
.step-pill.done .sp-n::after { font-size: .72rem; }
