/* =====================================================================
   SMMCloudX Design System
   Light/dark themes via [data-theme]; brand colours injected from
   Admin → Appearance as --brand / --brand-2 on :root.
   ===================================================================== */

:root {
  --brand: #2563eb;
  --brand-2: #06b6d4;
  --brand-ink: color-mix(in oklab, var(--brand) 82%, #000);
  --brand-soft: color-mix(in oklab, var(--brand) 10%, transparent);
  --brand-soft-2: color-mix(in oklab, var(--brand-2) 12%, transparent);
  --grad: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);

  --bg: #f4f7fc;
  --bg-elev: #eef3fa;
  --surface: #ffffff;
  --surface-2: #f6f9fd;
  --surface-3: #edf2f9;
  --border: #e1e8f2;
  --border-strong: #cfd9e8;
  --text: #0b1a31;
  --text-2: #3e4f6a;
  --muted: #72829c;
  --on-brand: #ffffff;

  --success: #16a34a; --success-bg: #e9f8ef;
  --warning: #c77c02; --warning-bg: #fff5e0;
  --danger:  #dc2626; --danger-bg:  #fdecec;
  --info:    #0784a6; --info-bg:    #e3f6fb;
  --purple:  #7c3aed; --purple-bg:  #f1ebfe;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-xs: 0 1px 2px rgba(15, 35, 70, .06);
  --shadow-sm: 0 1px 3px rgba(15, 35, 70, .06), 0 1px 2px rgba(15, 35, 70, .04);
  --shadow: 0 6px 24px -8px rgba(15, 35, 70, .14), 0 2px 6px -2px rgba(15, 35, 70, .06);
  --shadow-lg: 0 24px 60px -20px rgba(15, 35, 70, .28);
  --ring: 0 0 0 4px color-mix(in oklab, var(--brand) 18%, transparent);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Chart series (validated: light surface, CVD-safe) */
  --series-1: #2563eb;
  --series-2: #c2660c;

  --sidebar-w: 264px;
  --topbar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #060c18;
  --bg-elev: #0a1222;
  --surface: #0d1628;
  --surface-2: #111c31;
  --surface-3: #16233b;
  --border: #1d2a43;
  --border-strong: #2a3a58;
  --text: #e7eef9;
  --text-2: #b1bed3;
  --muted: #7a8aa6;
  --brand-soft: color-mix(in oklab, var(--brand) 20%, transparent);
  --brand-soft-2: color-mix(in oklab, var(--brand-2) 18%, transparent);
  --success: #34d27b; --success-bg: rgba(52, 210, 123, .12);
  --warning: #f5b642; --warning-bg: rgba(245, 182, 66, .12);
  --danger:  #f87171; --danger-bg:  rgba(248, 113, 113, .12);
  --info:    #38c6e8; --info-bg:    rgba(56, 198, 232, .12);
  --purple:  #a78bfa; --purple-bg:  rgba(167, 139, 250, .14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .35);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .75);
  /* Chart series (validated against #0d1628) */
  --series-1: #5b8def;
  --series-2: #c97a1c;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-ink); }
[data-theme="dark"] a:hover { color: color-mix(in oklab, var(--brand) 70%, #fff); }
h1, h2, h3, h4, h5 { font-family: var(--font-display); color: var(--text); margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2.2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; color: var(--text-2); }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
code, pre, kbd { font-family: var(--font-mono); font-size: .86em; }
code { background: var(--surface-3); padding: .15em .4em; border-radius: 6px; color: var(--text); word-break: break-word; }
::selection { background: color-mix(in oklab, var(--brand) 25%, transparent); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 8px; top: 8px; transform: translateY(-200%); z-index: 999; background: var(--surface); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { transform: none; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 820px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.span-2 { grid-column: span 2; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: .85rem; }
.xs { font-size: .76rem; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.break { word-break: break-word; overflow-wrap: anywhere; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.w-100 { width: 100%; }
.hidden, [hidden] { display: none !important; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.success { color: var(--success); } .danger { color: var(--danger); } .warning { color: var(--warning); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 11px; border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); font: 600 .92rem/1 var(--font); cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
  white-space: nowrap; user-select: none; text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--btn-fg); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-bd: transparent; background: var(--grad); box-shadow: 0 8px 20px -10px color-mix(in oklab, var(--brand) 70%, transparent); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 26px -10px color-mix(in oklab, var(--brand) 80%, transparent); filter: saturate(1.1) brightness(1.03); }
.btn-solid { --btn-bg: var(--brand); --btn-fg: #fff; --btn-bd: transparent; }
.btn-solid:hover { color: #fff; background: var(--brand-ink); }
.btn-soft { --btn-bg: var(--brand-soft); --btn-fg: var(--brand); --btn-bd: transparent; }
[data-theme="dark"] .btn-soft { --btn-fg: color-mix(in oklab, var(--brand) 60%, #fff); }
.btn-soft:hover { --btn-bg: color-mix(in oklab, var(--brand) 16%, transparent); }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn-ghost:hover { --btn-bg: var(--surface-3); box-shadow: none; }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: transparent; }
.btn-danger:hover { color: #fff; filter: brightness(1.05); }
.btn-success { --btn-bg: var(--success); --btn-fg: #fff; --btn-bd: transparent; }
.btn-success:hover { color: #fff; filter: brightness(1.05); }
.btn-white { --btn-bg: #fff; --btn-fg: #0b1a31; --btn-bd: transparent; }
.btn-outline-light { --btn-bg: rgba(255,255,255,.08); --btn-fg: #fff; --btn-bd: rgba(255,255,255,.28); }
.btn-outline-light:hover { color: #fff; --btn-bg: rgba(255,255,255,.16); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 9px; }
.btn-xs { min-height: 28px; padding: 0 10px; font-size: .78rem; border-radius: 8px; gap: 6px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn .spinner { width: 16px; height: 16px; }

.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); min-width: 0; }
.card-body { padding: 22px; }
.card-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1.05rem; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-family: var(--font-display); }
.card-hover { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.glass { background: color-mix(in oklab, var(--surface) 72%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }

/* Stat cards */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.stat { position: relative; display: flex; gap: 14px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; min-width: 0; }
.stat-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.stat-icon .icon { width: 22px; height: 22px; }
.stat-icon.cyan { background: var(--brand-soft-2); color: var(--brand-2); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.stat-value { font: 700 1.3rem/1.2 var(--font-display); color: var(--text); letter-spacing: -.02em; overflow-wrap: anywhere; }
.stat-sub { font-size: .76rem; color: var(--muted); }
.stat.highlight { background: var(--grad); border-color: transparent; color: #fff; }
.stat.highlight .stat-label, .stat.highlight .stat-sub { color: rgba(255,255,255,.8); }
.stat.highlight .stat-value { color: #fff; }
.stat.highlight .stat-icon { background: rgba(255,255,255,.18); color: #fff; }
.stat.highlight::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.12); }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; min-width: 0; }
.label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .86rem; color: var(--text); margin-bottom: 7px; }
.label .muted { font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2); color: var(--text); font: 400 .95rem/1.4 var(--font);
  transition: border-color .15s, box-shadow .15s, background .15s; appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: var(--ring); }
.input[readonly] { background: var(--surface-3); }
.textarea { min-height: 120px; resize: vertical; }
.select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2372829c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; cursor: pointer; }
.input-sm, .select.input-sm { min-height: 38px; padding: 7px 12px; font-size: .88rem; border-radius: 10px; }
.select.input-sm { padding-right: 34px; }
.input-group { display: flex; align-items: stretch; position: relative; }
.input-group .input { border-radius: 12px 0 0 12px; }
.input-group .btn { border-radius: 0 12px 12px 0; min-height: 46px; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 42px; }
.input-affix { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.help { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.field-error { display: block; margin-top: 6px; font-size: .8rem; color: var(--danger); font-weight: 500; }
.is-invalid { border-color: var(--danger) !important; }
.is-invalid:focus { box-shadow: 0 0 0 4px color-mix(in oklab, var(--danger) 18%, transparent) !important; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .9rem; color: var(--text-2); line-height: 1.45; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding-bottom: 8px; margin-bottom: 20px; border-bottom: 1px dashed var(--border); }
.form-section:last-child { border-bottom: 0; }
.form-section-title { font: 700 .95rem var(--font-display); margin: 0 0 14px; display: flex; gap: 8px; align-items: center; }
.color-input { display: flex; gap: 10px; align-items: center; }
.color-input input[type=color] { width: 46px; height: 46px; border: 1px solid var(--border); border-radius: 12px; padding: 4px; background: var(--surface-2); cursor: pointer; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .74rem; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: .76rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.id-pill { display: inline-block; font: 600 .75rem/1 var(--font-mono); padding: 5px 7px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); }
[data-theme="dark"] .id-pill { color: color-mix(in oklab, var(--brand) 55%, #fff); }

/* Category chips (order page) */
.chips { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.chip {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 13px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 600 .88rem var(--font);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s; text-align: left; min-width: 0;
}
.chip:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.chip .pi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; }
.chip .pi .icon { width: 16px; height: 16px; }
.chip.is-active { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.chip span.lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* platform colours (neutral, brand-evocative tints) */
.pi-all { background: var(--grad); }
.pi-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.pi-facebook { background: #1877f2; }
.pi-tiktok { background: #111827; }
.pi-youtube { background: #ef4444; }
.pi-whatsapp { background: #22c55e; }
.pi-telegram { background: #229ed9; }
.pi-twitter { background: #0f172a; }
.pi-spotify { background: #16a34a; }
.pi-threads { background: #1f2937; }
.pi-pinterest { background: #e11d48; }
.pi-linkedin { background: #0a66c2; }
.pi-traffic { background: #f59e0b; }
.pi-other { background: #6366f1; }
[data-theme="dark"] .pi-tiktok, [data-theme="dark"] .pi-twitter, [data-theme="dark"] .pi-threads { background: #334155; }

/* ---------- Alerts / toasts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid transparent; font-size: .9rem; margin-bottom: 16px; }
.alert .icon { margin-top: 2px; }
.alert p { margin: 0; color: inherit; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: color-mix(in oklab, var(--success) 22%, transparent); }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 22%, transparent); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: color-mix(in oklab, var(--warning) 22%, transparent); }
.alert-info { background: var(--info-bg); color: var(--info); border-color: color-mix(in oklab, var(--info) 22%, transparent); }
.alert-brand { background: var(--brand-soft); color: var(--text); border-color: color-mix(in oklab, var(--brand) 22%, transparent); }
.alert b, .alert strong { color: inherit; }

.toasts { position: fixed; z-index: 1000; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .9rem; animation: toastIn .35s var(--ease); }
.toast .t-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.toast.success .t-icon { background: var(--success-bg); color: var(--success); }
.toast.error .t-icon { background: var(--danger-bg); color: var(--danger); }
.toast.info .t-icon { background: var(--info-bg); color: var(--info); }
.toast.warning .t-icon { background: var(--warning-bg); color: var(--warning); }
.toast .t-body { flex: 1; color: var(--text); padding-top: 3px; }
.toast .t-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; }
.toast.leaving { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .link-cell { max-width: 260px; }
.table-compact td { padding: 10px 14px; }
.card > .table-wrap:first-child .table th:first-child { border-top-left-radius: var(--radius-lg); }
.card > .table-wrap:first-child .table th:last-child { border-top-right-radius: var(--radius-lg); }

/* ---------- Toolbars / filters ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: .9rem; }
.toolbar .grow { flex: 1 1 220px; min-width: 0; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 12px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a, .seg button { padding: 7px 12px; border-radius: 9px; font: 600 .82rem var(--font); color: var(--text-2); white-space: nowrap; background: none; border: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg a.is-active, .seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg .count { font-size: .72rem; padding: 1px 6px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--border); }
.pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pages a, .pages span { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 10px; font: 600 .85rem var(--font); color: var(--text-2); border: 1px solid transparent; }
.pages a:hover { background: var(--surface-3); color: var(--text); }
.pages .is-current { background: var(--brand); color: #fff; }
.pages .gap { color: var(--muted); }

/* ---------- Empty / skeleton ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty-icon .icon { width: 28px; height: 28px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px; min-height: 14px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- Modal / dropdown ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-xl); background: var(--surface); color: var(--text); width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); max-height: calc(100vh - 40px); }
dialog.modal[open] { animation: modalIn .25s var(--ease); }
dialog.modal::backdrop { background: rgba(4, 10, 24, .55); backdrop-filter: blur(4px); }
.modal-head { padding: 20px 22px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 16px 22px; }
.modal-foot { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal-lg { width: min(760px, calc(100vw - 32px)) !important; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; display: none; }
.dropdown.is-open .dropdown-menu { display: block; animation: modalIn .18s var(--ease); }
.dropdown-menu a, .dropdown-menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 9px; color: var(--text); font: 500 .9rem var(--font); background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); color: var(--text); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-head { padding: 10px 12px; }

/* ---------- Tabs / accordion ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 12px 16px; font: 600 .9rem var(--font); color: var(--muted); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover, .tabs button:hover { color: var(--text); }
.tabs .is-active { color: var(--brand); border-bottom-color: var(--brand); }

.accordion { display: grid; gap: 12px; }
.accordion details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: box-shadow .2s, border-color .2s; }
.accordion details[open] { box-shadow: var(--shadow); border-color: var(--border-strong); }
.accordion summary { list-style: none; cursor: pointer; padding: 18px 20px; font: 600 1rem var(--font-display); display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--text); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.2rem; transition: transform .2s; }
.accordion details[open] summary::after { content: "–"; }
.accordion .acc-body { padding: 0 20px 18px; color: var(--text-2); }
.accordion .acc-body p:last-child { margin: 0; }

/* ---------- Avatar ---------- */
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font: 700 .85rem var(--font-display); flex: none; }
.avatar-sm { width: 30px; height: 30px; border-radius: 9px; font-size: .72rem; }
.avatar-lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.3rem; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem var(--font-display); letter-spacing: -.03em; color: var(--text); }
.brand:hover { color: var(--text); }
.brand img { height: 34px; width: auto; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 6px 16px -6px color-mix(in oklab, var(--brand) 70%, transparent); flex: none; }
.brand-mark svg { width: 20px; height: 20px; }
.brand .x { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* =====================================================================
   PUBLIC SITE
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background .2s, border-color .2s, box-shadow .2s; }
.site-header.is-scrolled, .site-header.solid { background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border-bottom-color: var(--border); }
.nav { height: 72px; display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 10px; color: var(--text-2); font: 600 .9rem var(--font); }
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: var(--surface-3); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn.nav-toggle { display: none; }
.mobile-nav { display: none; }

.hero { position: relative; overflow: hidden; padding: 56px 0 90px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg::before { content: ""; position: absolute; width: 900px; height: 900px; left: -300px; top: -420px; background: radial-gradient(closest-side, color-mix(in oklab, var(--brand) 22%, transparent), transparent); }
.hero-bg::after { content: ""; position: absolute; width: 800px; height: 800px; right: -300px; top: -200px; background: radial-gradient(closest-side, color-mix(in oklab, var(--brand-2) 20%, transparent), transparent); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); opacity: .55; }
.hero .container { position: relative; z-index: 1; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font: 600 .8rem var(--font); color: var(--text-2); box-shadow: var(--shadow-xs); }
.eyebrow .dot { padding: 3px 9px; border-radius: 99px; background: var(--grad); color: #fff; font-size: .72rem; }
.hero h1 { margin: 18px 0 16px; }
.hero .lead { font-size: 1.1rem; max-width: 560px; color: var(--text-2); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 28px; }
.hero-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; max-width: 560px; padding: 0; margin: 0; list-style: none; }
.hero-points li { display: flex; gap: 10px; align-items: center; font: 600 .9rem var(--font); color: var(--text); }
.hero-points .ck { width: 22px; height: 22px; border-radius: 7px; background: var(--success-bg); color: var(--success); display: grid; place-items: center; flex: none; }
.hero-points .ck .icon { width: 14px; height: 14px; }

/* Hero visual: product mock */
.hero-visual { position: relative; }
.mock { position: relative; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 16px; transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform .6s var(--ease); }
.hero-visual:hover .mock { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }
.mock-bar { display: flex; gap: 6px; margin-bottom: 14px; align-items: center; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); display: block; }
.mock-bar .url { margin-left: 10px; flex: 1; height: 24px; border-radius: 8px; background: var(--surface-3); font: 500 .72rem/24px var(--font-mono); color: var(--muted); padding: 0 10px; overflow: hidden; white-space: nowrap; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.mock-stat { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.mock-stat b { display: block; font: 700 1.05rem var(--font-display); color: var(--text); }
.mock-stat span { font-size: .7rem; color: var(--muted); }
.mock-stat.hl { background: var(--grad); border-color: transparent; }
.mock-stat.hl b, .mock-stat.hl span { color: #fff; }
.mock-chart { height: 120px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); padding: 12px; position: relative; overflow: hidden; }
.mock-chart svg { width: 100%; height: 100%; }
.mock-rows { margin-top: 12px; display: grid; gap: 8px; }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .78rem; }
.mock-row .pi { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.mock-row .pi .icon { width: 14px; height: 14px; }
.mock-row .grow { flex: 1; min-width: 0; }
.mock-row .bar { height: 6px; border-radius: 99px; background: var(--surface-3); margin-top: 5px; overflow: hidden; }
.mock-row .bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.float-card { position: absolute; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; font-size: .8rem; animation: floaty 6s ease-in-out infinite; }
.float-card b { display: block; font-size: .9rem; color: var(--text); }
.float-card .fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.float-card.one { left: -28px; bottom: 40px; }
.float-card.two { right: -18px; top: -18px; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }

.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.section-head .kicker { display: inline-block; font: 700 .78rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.section-alt { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.announce { margin-top: -46px; position: relative; z-index: 2; }
.announce-card { display: flex; gap: 16px; align-items: center; padding: 18px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.announce-card .ai { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.announce-card p { margin: 0; color: var(--text); font-weight: 600; }

.public-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pstat { padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); text-align: left; }
.pstat .n { font: 800 1.9rem/1.1 var(--font-display); letter-spacing: -.03em; color: var(--text); }
.pstat .l { color: var(--muted); font-size: .88rem; margin-top: 6px; display: flex; gap: 8px; align-items: center; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature { padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .fi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.feature .fi .icon { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; font-size: .93rem; }

.platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.platform { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font: 600 .92rem var(--font); color: var(--text); transition: transform .2s, box-shadow .2s; }
.platform:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.platform .pi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font: 800 .9rem var(--font-mono); color: var(--brand); display: block; margin-bottom: 14px; }
.step h3 { font-size: 1.02rem; }
.step p { margin: 0; font-size: .9rem; }

.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 54px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 90% 0%, rgba(255,255,255,.22), transparent 60%), radial-gradient(500px 260px at 0% 100%, rgba(0,0,0,.18), transparent 60%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: rgba(255,255,255,.86); margin: 0; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-2); font-size: .92rem; }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.socials a:hover { background: var(--brand-soft); color: var(--brand); }

.page-hero { padding: 56px 0 40px; position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); margin-bottom: 10px; }
.page-hero p { max-width: 640px; font-size: 1.05rem; }
.prose { color: var(--text-2); font-size: 1rem; line-height: 1.75; max-width: 780px; }
.prose h2 { margin-top: 1.8em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose img { border-radius: 14px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 1.5em 0; padding: 12px 18px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 12px 12px 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; }

/* Public services catalog */
.catalog-cat { margin-bottom: 28px; }
.catalog-cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.catalog-cat-head .pi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .2s, box-shadow .2s; color: var(--text); }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.post-cover { aspect-ratio: 16/9; background: var(--grad); display: grid; place-items: center; color: rgba(255,255,255,.9); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.post-body h3 { font-size: 1.08rem; }
.post-body p { font-size: .92rem; flex: 1; }
.post-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; }

/* Code (API docs) */
.code { position: relative; background: #0b1426; color: #d7e3f7; border-radius: 14px; padding: 18px 20px; overflow-x: auto; font: 400 .84rem/1.65 var(--font-mono); border: 1px solid #1c2a44; white-space: pre; }
.code .c { color: #7f93b5; } .code .k { color: #7cc4ff; } .code .s { color: #a5e3a1; } .code .n { color: #f7c77e; }
.code-copy { position: absolute; right: 10px; top: 10px; }
.code-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.code-tabs button { padding: 6px 12px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); border: 0; font: 600 .78rem var(--font); cursor: pointer; }
.code-tabs button.is-active { background: var(--brand); color: #fff; }
.endpoint { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font: 500 .88rem var(--font-mono); overflow-wrap: anywhere; }
.method { padding: 3px 8px; border-radius: 7px; font: 700 .72rem var(--font-mono); background: var(--success-bg); color: var(--success); }
.api-nav { position: sticky; top: 96px; display: grid; gap: 2px; }
.api-nav a { padding: 8px 12px; border-radius: 9px; color: var(--text-2); font: 500 .9rem var(--font); }
.api-nav a:hover { background: var(--surface-3); color: var(--text); }

/* Auth pages */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { position: relative; overflow: hidden; background: #071023; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 500px at 10% 10%, color-mix(in oklab, var(--brand) 55%, transparent), transparent 60%), radial-gradient(600px 500px at 100% 100%, color-mix(in oklab, var(--brand-2) 45%, transparent), transparent 60%); }
.auth-aside.has-bg::before { background: linear-gradient(180deg, rgba(7,16,35,.35), rgba(7,16,35,.85)); }
.auth-aside > * { position: relative; }
.auth-aside .brand { color: #fff; }
.auth-aside h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
.auth-aside p { color: rgba(255,255,255,.78); }
.auth-aside ul { list-style: none; padding: 0; display: grid; gap: 12px; margin: 24px 0 0; }
.auth-aside li { display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.9); font-weight: 500; }
.auth-aside li .icon { color: var(--brand-2); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 430px; }
.auth-card h1 { font-size: 1.8rem; margin-bottom: 6px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--border); }

/* =====================================================================
   APP SHELL (client + admin)
   ===================================================================== */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 70; }
.sidebar-head { height: var(--topbar-h); display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border); flex: none; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 14px 12px 20px; scrollbar-width: thin; }
.nav-group { margin-bottom: 18px; }
.nav-title { font: 700 .68rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: var(--text-2); font: 600 .9rem var(--font); position: relative; transition: background .15s, color .15s; }
.side-link .icon { width: 19px; height: 19px; color: var(--muted); transition: color .15s; }
.side-link:hover { background: var(--surface-3); color: var(--text); }
.side-link:hover .icon { color: var(--text); }
.side-link.is-active { background: var(--brand-soft); color: var(--brand); }
[data-theme="dark"] .side-link.is-active { color: color-mix(in oklab, var(--brand) 55%, #fff); }
.side-link.is-active .icon { color: currentColor; }
.side-link.is-active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side-link .count { margin-left: auto; font-size: .7rem; padding: 2px 7px; border-radius: 99px; background: var(--danger); color: #fff; }
.side-link.primary-cta { background: var(--grad); color: #fff; margin-bottom: 10px; box-shadow: 0 10px 22px -12px color-mix(in oklab, var(--brand) 80%, transparent); }
.side-link.primary-cta .icon { color: #fff; }
.side-link.primary-cta::before { display: none; }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--border); flex: none; }
.balance-card { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.balance-card .v { font: 800 1.15rem var(--font-display); color: var(--text); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--border); }
.topbar .page-title { font: 700 1.05rem var(--font-display); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.topbar .balance-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font: 700 .9rem var(--font-display); color: var(--text); }
.topbar .balance-pill .btn { min-height: 30px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--text-2); background: transparent; border: 1px solid transparent; cursor: pointer; }
.icon-btn:hover { background: var(--surface); border-color: var(--border); color: var(--text); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg); }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 12px; background: none; border: 1px solid transparent; cursor: pointer; color: var(--text); }
.user-btn:hover { background: var(--surface); border-color: var(--border); }
.content { padding: 24px; width: 100%; max-width: 1480px; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); margin: 0 0 4px; }
.page-head p { margin: 0; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.app-footer { padding: 18px 24px 24px; color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.backdrop { position: fixed; inset: 0; background: rgba(4, 10, 24, .5); backdrop-filter: blur(3px); z-index: 65; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-open .backdrop { opacity: 1; pointer-events: auto; }
.bottom-nav { display: none; }

/* Admin accent: slightly different sidebar */
.app.admin .sidebar { background: #0a1224; border-right-color: #16223a; }
.app.admin .sidebar .brand { color: #fff; }
.app.admin .sidebar-head { border-bottom-color: #16223a; }
.app.admin .nav-title { color: #5d6f8f; }
.app.admin .sidebar .side-link { color: #b4c1d8; }
.app.admin .sidebar .side-link .icon { color: #6f82a4; }
.app.admin .sidebar .side-link:hover { background: #121d33; color: #fff; }
.app.admin .sidebar .side-link:hover .icon { color: #fff; }
.app.admin .sidebar .side-link.is-active { background: color-mix(in oklab, var(--brand) 26%, #0a1224); color: #fff; }
.app.admin .sidebar .side-link.is-active .icon { color: #fff; }
.app.admin .sidebar-foot { border-top-color: #16223a; }
.app.admin .sidebar-foot .muted { color: #6f82a4; }

/* ---------- Order page ---------- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.order-side { display: grid; gap: 20px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.service-select { position: relative; }
.service-trigger { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 44px 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 500 .92rem/1.35 var(--font); text-align: left; cursor: pointer; position: relative; }
.service-trigger:hover { border-color: var(--border-strong); }
.service-trigger:focus-visible, .service-select.is-open .service-trigger { outline: none; border-color: var(--brand); box-shadow: var(--ring); background: var(--surface); }
.service-trigger::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.service-trigger .name { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.service-trigger .price { font: 700 .82rem var(--font); color: var(--brand); white-space: nowrap; }
.service-panel { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); display: none; overflow: hidden; }
.service-select.is-open .service-panel { display: block; animation: modalIn .15s var(--ease); }
.service-panel .ps { padding: 10px; border-bottom: 1px solid var(--border); }
.service-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.service-opt { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px; border-radius: 10px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font: 500 .88rem/1.4 var(--font); }
.service-opt:hover, .service-opt.is-focus { background: var(--surface-3); }
.service-opt.is-selected { background: var(--brand-soft); }
.service-opt .n { flex: 1; min-width: 0; }
.service-opt .r { font-weight: 700; color: var(--brand); white-space: nowrap; font-size: .82rem; }
.service-group-label { padding: 10px 10px 4px; font: 700 .7rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fav-btn { background: none; border: 0; padding: 2px; cursor: pointer; color: var(--muted); line-height: 0; }
.fav-btn.is-fav { color: #f59e0b; }
.fav-btn.is-fav svg { fill: currentColor; }

.svc-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.svc-meta { padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.svc-meta .k { font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.svc-meta .v { font: 700 .92rem var(--font-display); color: var(--text); margin-top: 3px; overflow-wrap: anywhere; }
.svc-desc { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; color: var(--text-2); white-space: pre-line; max-height: 220px; overflow-y: auto; }
.charge-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--brand-soft); border: 1px solid color-mix(in oklab, var(--brand) 22%, transparent); flex-wrap: wrap; }
.charge-box .amount { font: 800 1.6rem var(--font-display); color: var(--text); letter-spacing: -.02em; }
.charge-box .lbl { font-size: .8rem; color: var(--text-2); }
.news-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: 0; padding-bottom: 0; }
.news-item:first-child { padding-top: 0; }
.news-item h4 { font-size: .92rem; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.news-item p { font-size: .85rem; margin: 0; }
.support-links { display: grid; gap: 8px; }
.support-link { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .9rem; }
.support-link:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-3); }
.support-link .si { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; }
.support-link .arrow { margin-left: auto; color: var(--muted); }

/* Detail lists */
.dl { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr); gap: 0; }
.dl dt, .dl dd { padding: 11px 0; border-bottom: 1px solid var(--border); margin: 0; font-size: .9rem; }
.dl dt { color: var(--muted); }
.dl dd { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.dl dt:last-of-type, .dl dd:last-of-type { border-bottom: 0; }

/* Ticket thread */
.thread { display: grid; gap: 14px; }
.msg { display: flex; gap: 12px; max-width: 86%; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg-bubble { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.msg.me .msg-bubble { background: var(--brand-soft); border-color: color-mix(in oklab, var(--brand) 20%, transparent); }
.msg.internal .msg-bubble { background: var(--warning-bg); border-style: dashed; }
.msg-meta { font-size: .76rem; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: .92rem; }
.attachment { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; padding: 7px 10px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); font-size: .8rem; }

/* Progress */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }

/* Charts */
.chart { width: 100%; height: 260px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; display: block; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font: 500 11px var(--font); }
.chart .area { opacity: .16; }
.chart .line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .bar { transition: opacity .15s; }
.chart .hover-line { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 10px; padding: 8px 10px; font-size: .78rem; white-space: nowrap; transform: translate(-50%, -110%); z-index: 5; }
.chart-tip b { font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Misc */
.kv-inline { display: flex; gap: 18px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.kv-inline b { color: var(--text); font-weight: 600; }
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field .input { font-family: var(--font-mono); font-size: .85rem; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.notif { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; }
.notif:hover { background: var(--surface-3); }
.notif.unread { background: var(--brand-soft); }
.notif .ni { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.notif-menu { width: min(380px, calc(100vw - 24px)); max-height: 440px; overflow-y: auto; }
.whatsapp-fab { position: fixed; left: 20px; bottom: 20px; z-index: 55; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #22c55e; color: #fff; box-shadow: 0 12px 28px -10px rgba(34, 197, 94, .7); transition: transform .2s; }
.whatsapp-fab:hover { transform: scale(1.06); color: #fff; }
.whatsapp-fab .icon { width: 26px; height: 26px; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--muted); }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 4px var(--success-bg); }
.status-dot.bad { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); }
.status-dot.warn { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-bg); }
.bulk-bar { position: sticky; bottom: 16px; z-index: 30; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; margin-top: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; background: var(--bg); position: relative; overflow: hidden; }
.error-code { font: 800 clamp(5rem, 3rem + 10vw, 9rem)/1 var(--font-display); letter-spacing: -.06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.install-shell { min-height: 100vh; padding: 40px 16px; display: flex; justify-content: center; align-items: flex-start; }
.install-card { width: 100%; max-width: 760px; }
.stepper { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.stepper span { padding: 6px 12px; border-radius: 99px; background: var(--surface-3); color: var(--muted); font: 600 .8rem var(--font); }
.stepper span.is-active { background: var(--brand); color: #fff; }
.stepper span.is-done { background: var(--success-bg); color: var(--success); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1200px) {
  .order-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .svc-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .hero-layout { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-layout { grid-template-columns: 1fr; }
  .order-side { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  .drawer-open .sidebar { transform: none; }
  .icon-btn.nav-toggle { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
@media (max-width: 920px) {
  .nav-links, .nav-actions .desktop-only { display: none; }
  .icon-btn.nav-toggle { display: inline-grid; }
  .nav { gap: 12px; }
  .nav-actions { margin-left: auto; flex: none; }
  .mobile-nav { display: block; position: fixed; inset: 72px 0 0 0; background: var(--surface); z-index: 49; padding: 16px 20px 32px; overflow-y: auto; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
  .menu-open .mobile-nav { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-nav a.m-link { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--border); font: 600 1.02rem var(--font); color: var(--text); }
  .mobile-nav .m-actions { display: grid; gap: 10px; margin-top: 20px; }
  .public-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { padding: 36px 28px; }
  .float-card.one { left: -8px; }
  .float-card.two { right: -6px; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
  .hero { padding: 36px 0 76px; }
  .hero-points { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .features, .steps, .posts, .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .mock { transform: none !important; }
  .mock-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .float-card { display: none; }
  .announce-card { align-items: flex-start; }
  .card-body { padding: 18px; }
  .card-header { padding: 16px 18px; }
  .page-head { align-items: flex-start; }
  .page-head .row { width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat-icon { width: 38px; height: 38px; border-radius: 11px; }
  .stat-value { font-size: 1.1rem; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding-bottom: 0; }
  .msg { max-width: 100%; }
  .topbar .balance-pill .lbl-hide { display: none; }
  .topbar .page-title { font-size: .98rem; }
  .user-btn .u-name { display: none; }
  .app-footer { padding: 12px 16px 90px; }
  .has-bottom-nav .content { padding-bottom: 90px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: color-mix(in oklab, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--muted); font: 600 .68rem var(--font); }
  .bottom-nav a .icon { width: 22px; height: 22px; }
  .bottom-nav a.is-active { color: var(--brand); }
  .bottom-nav a.fab { color: #fff; }
  .bottom-nav a.fab span.fab-circle { width: 46px; height: 46px; margin-top: -22px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 10px 22px -8px color-mix(in oklab, var(--brand) 80%, transparent); }
  .bottom-nav a.fab span.lbl { color: var(--text-2); }
  .whatsapp-fab { bottom: 88px; left: auto; right: 16px; width: 48px; height: 48px; }
  .guest .whatsapp-fab { bottom: 16px; }
  .toasts { right: 16px; left: 16px; width: auto; bottom: 90px; }

  /* Responsive tables → cards */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .table-cards tbody tr:hover { background: transparent; }
  .table-cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border: 0; text-align: right; min-width: 0; }
  .table-cards td::before { content: attr(data-label); font: 600 .74rem var(--font); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: left; flex: none; }
  .table-cards td[data-label=""]::before, .table-cards td:not([data-label])::before { display: none; }
  .table-cards td.num { text-align: right; }
  .table-cards td.link-cell { max-width: none; }
  .table-cards td > .truncate, .table-cards td > a.truncate { max-width: 62vw; }
  .table-cards .actions { justify-content: flex-end; }
  .table-cards td.cell-primary { font-weight: 600; padding-bottom: 8px; }
  .table-cards td.cell-primary::before { display: none; }
  .table-cards td.cell-primary { justify-content: flex-start; text-align: left; }
  .toolbar .select, .toolbar .input { flex: 1 1 140px; }
  .auth-main { padding: 28px 16px; align-items: flex-start; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .cta-band .btn { width: 100%; }
}
@media (max-width: 400px) {
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .chip { padding: 10px; gap: 8px; font-size: .82rem; }
  .chip .pi { width: 26px; height: 26px; }
  .public-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pstat { padding: 16px; }
  .pstat .n { font-size: 1.45rem; }
  .mock-stats { grid-template-columns: 1fr 1fr; }
  .mock-stats .mock-stat:last-child { display: none; }
  .svc-info { grid-template-columns: 1fr 1fr; }
  .btn-lg { min-height: 50px; padding: 0 18px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .whatsapp-fab, .toasts { display: none !important; }
  .app { display: block; }
}

/* Extras */
.hide-desktop { display: none; }
@media (max-width: 1024px) { .hide-desktop { display: inline-flex; } }
.method-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.method-card { position: relative; display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.method-card:hover { border-color: var(--border-strong); }
.method-card input { position: absolute; opacity: 0; }
.method-card.is-active { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.method-card .mi { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--brand); flex: none; }
.method-card b { display: block; font-size: .9rem; }
.method-card .xs { color: var(--muted); }
.amount-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 480px) {
  .topbar { gap: 6px; padding: 0 10px; }
  .topbar .theme-toggle { display: none; }
  .topbar .page-title { flex: 1; min-width: 0; }
  .topbar .balance-pill { padding: 4px 4px 4px 10px; font-size: .85rem; }
  .user-btn > .icon { display: none; }
}
