/* BlankTrail Proxy Cabinet — deep-black neon theme, blue→cyan→violet accent. */
/* Webfonts (Sora display + Manrope body) are loaded via <link> in each page head.
   They were previously avoided because the external Google Fonts request tripped an
   RKN throttle stall on the Cloudflare path; that constraint was removed by a hosting
   change (2026-07). Manrope carries Cyrillic; Sora (Latin-only) falls back to it. */

/* ─── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Deep-black neon palette */
  --bg:        #04050a;
  --bg-2:      #06070e;
  --bg-card:   #0b0f1c;
  --bg-input:  #0c101d;
  --border:    #1b2237;
  --border-soft: #161c2e;
  --border-bright: rgba(110,130,255,0.35);
  --border-focus: #5b8bff;

  /* Text */
  --text:      #e7ebf5;
  --text-muted:#8b96b5;
  --text-faint:#5f6a88;
  --text-link: #7fa5ff;

  /* Accent: blue → cyan → violet (name --accent-teal kept so existing rules recolor) */
  --accent-teal:   #5b8bff;
  --accent-indigo: #8b5cf6;
  --accent-cyan:   #22d3ee;
  --accent-grad:   linear-gradient(100deg, #5b8bff 8%, #22d3ee 55%, #8b5cf6 100%);
  --accent-grad-btn: linear-gradient(180deg, #4f8bff, #2f5cf0);

  /* Status colours */
  --success: #4ade80;
  --error:   #ef4444;
  --info:    #38bdf8;
  --warning: #fbbf24;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
  /* Manrope = body/UI (has Cyrillic). Sora = Latin display; falls back to Manrope
     for Cyrillic (Sora ships no Cyrillic subset), so RU headings stay consistent. */
  --font: 'Manrope', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Sora', 'Manrope', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Display font (Sora → Manrope) on headings + numeric emphasis. */
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }

/* Atmosphere: subtle neon auroras behind every page (fixed, non-interactive). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(760px 500px at 12% -12%, rgba(59,91,255,0.11), transparent 70%),
    radial-gradient(680px 460px at 100% -6%, rgba(139,92,246,0.09), transparent 70%);
}

/* ─── Layout containers ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto; margin-right: auto;
  padding-left: var(--space-6); padding-right: var(--space-6);
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(5,6,12,0.9), rgba(5,6,12,0.62));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(27,34,55,0.7);
}

/* The header bar is wider than the content container so the full nav fits;
   it wraps onto a second row instead of showing a horizontal scrollbar. */
.site-header .container { max-width: 1320px; }
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 3.5rem;
  flex-wrap: wrap;
  padding-top: var(--space-2); padding-bottom: var(--space-2);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

/* ─── Navigation ───────────────────────────────────────────────────────────── */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  flex-wrap: wrap;
}

.nav-link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(90,110,220,0.10); text-decoration: none; }
.nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(74,100,255,0.22), rgba(74,100,255,0.04)); box-shadow: inset 0 0 0 1px rgba(91,120,255,0.28); }

/* Logout sits at the right end */
.nav-end { margin-left: auto; }

/* Sign-out button — ghost style, not a default browser button */
.nav-logout {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  /* inherits all nav-link colour + size rules */
}

/* Unread-count pill on the Support nav link (JS-driven; hidden when 0) */
.nav-badge {
  display: inline-block;
  min-width: 1.1em;
  margin-left: var(--space-1);
  padding: 0 0.35em;
  border-radius: 999px;
  background: linear-gradient(180deg,#ff6b81,#e0344f);
  color: #fff;
  box-shadow: 0 0 10px rgba(224,52,79,0.5);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  vertical-align: text-top;
}
.nav-badge[hidden] { display: none; }

/* ─── Main ─────────────────────────────────────────────────────────────────── */
.site-main {
  flex: 1;
  padding-top: var(--space-8); padding-bottom: var(--space-8);
}

/* ─── Flash messages ───────────────────────────────────────────────────────── */
.flash-region {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.flash {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border-left: 4px solid;
  font-size: 0.9rem;
}

.flash-success {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.flash-error {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.flash-info {
  border-color: var(--info);
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
}

/* ─── Card ─────────────────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: linear-gradient(180deg, #0b0f1c, #090c16);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.card + .card { margin-top: var(--space-4); }

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--text);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

/* ─── Table ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: #7c88ad;
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #0c1120;
  border-bottom: 1px solid var(--border);
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover td { background: rgba(84,104,255,0.06); }

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-4); }

.form-label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Base element rules — unclassed native controls inherit the dark theme.
   Classed variants (.form-input etc.) stay authoritative (defined below). */
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=search],
input[type=url],
input[type=date],
input[type=tel],
select,
textarea {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=number]:focus,
input[type=search]:focus,
input[type=url]:focus,
input[type=date]:focus,
input[type=tel]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(45,212,191,0.15);
}

/* Restore select caret after appearance reset */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Multi-select: no caret needed, allow height */
select[multiple] {
  background-image: none;
  padding-right: var(--space-3);
}

/* Fieldset: remove browser default box; use subtle card-like look */
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  background: transparent;
}

legend {
  padding-left: var(--space-2); padding-right: var(--space-2);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Checkboxes and radios: teal accent, aligned */
input[type=radio],
input[type=checkbox] {
  width: auto;
  display: inline;
  accent-color: var(--accent-teal);
  cursor: pointer;
  vertical-align: middle;
  margin-right: var(--space-1);
}

/* Hint / helper text under form fields */
.form-hint {
  margin-top: var(--space-1);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea,
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(45,212,191,0.15);
}

.form-error {
  margin-top: var(--space-1);
  font-size: 0.8rem;
  color: #fca5a5;
}

/* ─── Admin form layout ──────────────────────────────────────────────────────── */
.admin-form {
  max-width: 560px;
}

.admin-form .form-group label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.admin-form .btn + .btn {
  margin-left: var(--space-3);
}

/* ─── Changelog admin: dynamic item rows ─────────────────────────────────────── */
.changelog-locale-group,
.changelog-items-group { margin-bottom: var(--space-4); }

.changelog-items-rows { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-2); }

.changelog-item-row { display: flex; align-items: center; gap: var(--space-2); }
.changelog-item-row .form-input { flex: 1 1 auto; width: auto; }
.changelog-item-row .changelog-item-remove { flex: 0 0 auto; }

/* ─── Table alias — .data-table maps to .table styles ───────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, filter 0.15s;
  white-space: nowrap;
}

.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:active { filter: brightness(0.95); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Keyboard focus ring for interactive landing elements (a11y). Shown only on
   keyboard navigation (:focus-visible), on-brand accent; existing focus styling
   elsewhere is left intact. */
.btn:focus-visible,
.nav-link:focus-visible,
.landing-nav-link:focus-visible,
.locale-link:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

/* Primary: neon blue gradient with glow */
.btn-primary {
  background: var(--accent-grad-btn);
  color: #fff;
  box-shadow: 0 4px 16px rgba(38,66,180,0.42), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 6px 22px rgba(48,86,230,0.5), inset 0 1px 0 rgba(255,255,255,0.2); }

.btn-secondary {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-danger {
  background: var(--error);
  color: #fff;
}

.btn-warning {
  background: var(--warning);
  color: #0f1117;
}

.btn-success {
  background: var(--success);
  color: #0f1117;
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: 0.8rem;
}

/* ─── Badge / status pill ────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-active    { background: rgba(34,197,94,0.15);  color: #86efac; }
.badge-inactive  { background: rgba(148,163,184,0.15); color: #94a3b8; }
.badge-pending   { background: rgba(245,158,11,0.15); color: #fcd34d; }
.badge-paid      { background: rgba(34,197,94,0.15);  color: #86efac; }
.badge-expired   { background: rgba(239,68,68,0.15);  color: #fca5a5; }
.badge-suspended { background: rgba(239,68,68,0.15);  color: #fca5a5; }
.badge-trial     { background: rgba(99,102,241,0.15); color: #a5b4fc; }

/* ─── Page section headings ─────────────────────────────────────────────────── */
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}

/* ─── Key/code display ───────────────────────────────────────────────────────── */
.key-display {
  font-family: 'Fira Mono', 'Consolas', monospace;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 0.85rem;
  color: var(--accent-teal);
  word-break: break-all;
}

/* ─── Grid helpers ────────────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

/* ─── Stat block (home page) ──────────────────────────────────────────────── */
.stat-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: var(--space-6); padding-bottom: var(--space-6);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
}

/* Footer bottom bar: copyright + security badge + social (matches the mockup). */
.footer-bottom {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-soft);
  font-size: 0.8rem;
  color: var(--text-faint);
}
.footer-secure {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 11px;
  background: #0a0e1a; border: 1px solid var(--border);
  color: #aeb8d6; font-size: 0.78rem; font-weight: 600;
}
.footer-secure svg { color: var(--success); flex: none; }
.footer-social { margin-left: auto; display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: #0c101d; border: 1px solid var(--border); color: #8f9abb;
  transition: color 0.16s, border-color 0.16s;
}
.footer-social a:hover { color: #fff; border-color: var(--border-bright); text-decoration: none; }

/* ─── Locale switcher ────────────────────────────────────────────────────────── */
.locale-switcher {
  display: flex;
  gap: var(--space-1);
}

.locale-link {
  font-size: 0.75rem;
  font-weight: 600;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color 0.15s;
}

.locale-link:hover { color: var(--text); text-decoration: none; }
.locale-link.locale-active { color: var(--accent-teal); }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .container { padding-left: var(--space-4); padding-right: var(--space-4); }
  .site-nav { gap: 0; }
  .nav-link { padding: var(--space-2); font-size: 0.8rem; }
  .card { padding: var(--space-4); }
  .page-title { font-size: 1.25rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
}

/* ─── Auth pages ─────────────────────────────────────────────────────────── */
/* Narrow centered card used by login / register / verify */
.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: var(--space-12); padding-bottom: var(--space-12);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card .card-title {
  font-size: 1.35rem;
  margin-bottom: var(--space-6);
}

.auth-alt-link {
  margin-top: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .auth-page { padding-top: var(--space-8); padding-bottom: var(--space-8); }
}

/* ─── Plans page (cabinet) ───────────────────────────────────────────────────── */
.plans-page .page-subtitle {
  color: var(--text-muted);
  margin-bottom: var(--space-8);
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  align-items: start;
}

/* Each plan card inherits the landing pricing-card look */
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  transition: border-color 0.2s;
}

.plan-card:hover {
  border-color: rgba(45,212,191,0.35);
}

/* Recommended tier highlight (matches landing pricing-card-recommended) */
.plan-card-recommended {
  border-color: var(--accent-teal);
  background: linear-gradient(160deg, rgba(45,212,191,0.06) 0%, rgba(99,102,241,0.06) 100%);
  box-shadow: 0 0 0 1px var(--accent-teal), 0 8px 32px rgba(45,212,191,0.12);
}

.plan-recommended-badge {
  position: absolute;
  top: -1px;
  right: var(--space-4);
  transform: translateY(-50%);
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.plan-card-header { display: flex; flex-direction: column; gap: var(--space-2); }

.plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.plan-price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.plan-period {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-meta { font-size: 0.85rem; color: var(--text-muted); }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  padding: 0;
}

.plan-features li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
}

.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-teal);
  font-weight: 700;
}

/* Promo code row inside a plan card */
.promo-row {
  margin-bottom: var(--space-3);
}

.promo-row input {
  font-size: 0.875rem;
  padding: var(--space-2) var(--space-3);
}

/* ─── Promo-code page (/app/promo) ──────────────────────────────────────────── */
.promo-page { max-width: 560px; }
.promo-intro { color: var(--text-muted); margin-bottom: var(--space-6); }
.promo-form { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.promo-form input[type=text] { flex: 1; min-width: 220px; }
.promo-hint { color: var(--text-muted); font-size: 0.85rem; margin-top: var(--space-3); }
.promo-saved {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); padding: var(--space-6);
}
.promo-saved p { margin: 0 0 var(--space-4); }
.promo-saved-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Payment method radio group */
.pay-options {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  background: transparent;
  margin-bottom: var(--space-3);
}

.pay-options legend {
  padding-left: var(--space-2); padding-right: var(--space-2);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pay-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-1); padding-bottom: var(--space-1);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.pay-option input[type=radio] {
  width: auto;
  display: inline;
  flex-shrink: 0;
}

.btn-block { width: 100%; }

/* Responsive: stack on narrow screens */
@media (max-width: 768px) {
  .plan-cards {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto; margin-right: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE — public marketing sections
   Mobile-first; no authed cabinet chrome.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Extra spacing scale used by landing only */
:root {
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

/* ── Landing body resets ────────────────────────────────────────────────── */
.landing-body { display: block; } /* override cabinet flex-column */
/* Landing headings match the mockup EXACTLY: Sora for Latin, the browser default
   sans-serif for Cyrillic (Sora ships no Cyrillic subset) — NOT Manrope, which
   renders rounder/heavier. Scoped to the landing so the cabinet keeps Manrope. */
.landing-body h1, .landing-body h2, .landing-body h3 { font-family: 'Sora', sans-serif; }

/* ── Landing header ─────────────────────────────────────────────────────── */
.landing-header .header-inner {
  gap: var(--space-4);
}

/* Wraps rather than scrolls. `overflow-x: auto` here used to zero out the flex
   item's automatic minimum size, so the nav shrank below its own content and
   grew a horizontal scrollbar inside the header — which is exactly what the
   .site-header comment above says must not happen. Keeping overflow visible
   restores min-width:auto, and flex-wrap lets the links fall onto a second row
   instead of overflowing the page. Mirrors .site-nav. */
.landing-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  row-gap: var(--space-1);
  flex: 1;
  flex-wrap: wrap;
}

.landing-nav-link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.landing-nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.landing-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ── Section layout helpers ─────────────────────────────────────────────── */
.landing-kicker {
  text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  color: #5b8bff; margin-bottom: 14px;
}
.landing-section-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  margin-bottom: var(--space-3);
}

.landing-section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 680px;
  margin-left: auto; margin-right: auto;
  margin-bottom: var(--space-12);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.landing-hero {
  padding-top: var(--space-20); padding-bottom: var(--space-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow behind the headline */
.landing-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45,212,191,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(59,91,255,0.12), rgba(139,92,246,0.08));
  border: 1px solid rgba(91,120,255,0.28);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #a9c2ff;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-6);
}
.hero-pip { width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent-cyan); box-shadow: 0 0 10px var(--accent-cyan); }

/* ── JS Solver announcement band (full-width, below the hero) ───────────────
   Centered neon callout linking to #features. Graphic left, copy middle, CTA
   right; stacks + centers on narrow viewports. Deliberately a standalone
   section — it never sits inside the hero column, so it can't cramp the hero. */
.landing-solver-section { padding: var(--space-4) 0 var(--space-8); }

.solver-band {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  padding: clamp(20px, 3vw, 30px) clamp(22px, 3.5vw, 44px);
  border: 1.5px solid transparent;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(20,26,48,0.90), rgba(11,15,28,0.93)) padding-box,
    var(--accent-grad) border-box;
  box-shadow: 0 0 0 1px rgba(91,120,255,0.05), 0 26px 64px -30px rgba(70,110,255,0.6);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.solver-band::before {
  content: ''; position: absolute; left: 2%; top: 50%; transform: translateY(-50%);
  width: 340px; height: 340px; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(45,140,255,0.18), transparent 62%);
}
.solver-band:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(91,120,255,0.16), 0 32px 74px -26px rgba(70,110,255,0.8);
}
.solver-band:focus-visible { outline: 2px solid var(--accent-teal); outline-offset: 4px; }
.solver-band > * { position: relative; z-index: 1; }

.solver-band-art { flex: none; width: clamp(104px, 12vw, 150px); }
.solver-band-art img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 8px 26px rgba(40,140,255,0.42));
}

.solver-band-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.solver-band-badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 11px; border-radius: 100px;
  background: linear-gradient(90deg, rgba(34,211,238,0.16), rgba(139,92,246,0.12));
  border: 1px solid rgba(34,211,238,0.34);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: #bdeaff;
}
.solver-band-pip {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan);
  animation: solverPipPulse 1.8s ease-in-out infinite;
}
@keyframes solverPipPulse {
  0%, 100% { opacity: 1;    box-shadow: 0 0 8px var(--accent-cyan); }
  50%      { opacity: 0.45; box-shadow: 0 0 16px var(--accent-cyan); }
}
.solver-band-title {
  font-size: clamp(1.15rem, 1.1vw + 0.85rem, 1.55rem);
  font-weight: 800; line-height: 1.22; color: #fff; letter-spacing: -0.01em;
}
.solver-band-desc {
  font-size: 0.94rem; line-height: 1.55; color: var(--text-muted); max-width: 780px;
}
.solver-band-note { font-size: 0.76rem; line-height: 1.5; color: var(--text-faint); }

.solver-band-cta {
  flex: none; align-self: center; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px;
  border: 1px solid rgba(120,150,255,0.4);
  background: rgba(30,42,74,0.5);
  color: #d3e2ff; font-weight: 700; font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.solver-band-cta svg { transition: transform 0.2s ease; }
.solver-band:hover .solver-band-cta { border-color: rgba(120,150,255,0.8); background: rgba(46,62,104,0.65); }
.solver-band:hover .solver-band-cta svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .solver-band-pip { animation: none; }
  .solver-band, .solver-band-cta svg { transition: none; }
}

@media (max-width: 820px) {
  .solver-band { flex-direction: column; text-align: center; gap: 18px; padding: 26px 22px; }
  .solver-band::before { display: none; }
  .solver-band-body { align-items: center; }
  .solver-band-badge { align-self: center; }
  .solver-band-cta { width: 100%; justify-content: center; }
}

/* White headline with a single gradient-accent phrase (matches the mockup). */
.hero-headline {
  font-size: clamp(2.1rem, 4vw + 1rem, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.05;
  color: var(--text);
  max-width: 640px;
  margin-left: auto; margin-right: auto;
  margin-bottom: var(--space-6);
}
.hero-accent {
  background: linear-gradient(100deg, #5b8bff 10%, #22d3ee 55%, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subhead {
  font-size: clamp(1rem, 1vw + 0.65rem, 1.125rem);
  color: var(--text-muted);
  max-width: 590px;
  margin-left: auto; margin-right: auto;
  margin-bottom: var(--space-8);
  line-height: 1.62;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
}

.btn-lg {
  padding: 0.8rem 1.65rem;
  font-size: 1rem;
  border-radius: 13px;
}
/* Secondary hero button: dark "how it works" with a play chip (matches mockup). */
.btn-play {
  background: #0c101d;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-play:hover { border-color: var(--border-bright); color: #fff; filter: none; }
.btn-play-ic {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(91,139,255,0.16); border: 1px solid rgba(91,139,255,0.4); color: #bcd0ff;
}

/* Hero two-column: copy left, product screenshot right.
   The hero breaks out wider than the 1100px content container so the dashboard
   screenshot renders large + crisp (matches the approved mockup ~800px). */
.landing-body .container { max-width: 1300px; }
.landing-hero .hero-inner { max-width: 1440px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0,0.8fr) minmax(0,1.2fr);
  gap: var(--space-12);
  align-items: center;
  text-align: left;
}
.hero-copy { min-width: 0; }
.hero-grid .hero-headline,
.hero-grid .hero-subhead { max-width: none; margin-left: 0; margin-right: 0; }
.hero-grid .hero-ctas,
.hero-grid .hero-tech { justify-content: flex-start; }
.hero-media { min-width: 0; position: relative; animation: heroFloat 7s ease-in-out infinite; }
@keyframes heroFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
@media (prefers-reduced-motion: reduce) { .hero-media { animation: none; } }
.hero-media::before {
  content: ''; position: absolute; inset: -10% -6% -14% -6%; z-index: 0;
  background: radial-gradient(60% 55% at 60% 30%, rgba(70,100,255,0.20), transparent 70%);
  pointer-events: none;
}
.hero-dash {
  position: relative; z-index: 1;
  /* height:auto is REQUIRED — the <img> has width/height attributes, so without it
     the presentational height="784" hint sticks and width:100% squishes the image
     horizontally. */
  width: 100%; height: auto; display: block; border-radius: var(--radius-lg);
  border: 1px solid #1c2440;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(90,120,255,0.06);
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-grid .hero-headline, .hero-grid .hero-subhead { margin-left: auto; margin-right: auto; }
  .hero-grid .hero-ctas, .hero-grid .hero-tech { justify-content: center; }
  .hero-media { max-width: 660px; margin: var(--space-8) auto 0; }
}

/* Cases carousel pulled below the hero into its own section */
.landing-cases-section { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.landing-cases-section .hero-cases { margin-top: 0; }

/* Scale showcase band — image cards (chain / cache / detect) */
.landing-scale { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.scale-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-6); margin-top: var(--space-8); }
.scale-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: #090c16; display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.2s; }
.scale-card:hover { transform: translateY(-4px); border-color: rgba(91,120,255,0.32); }
.scale-art { position: relative; height: 176px; overflow: hidden; background: radial-gradient(120% 100% at 50% 0%, #0d1226, #090c16); }
.scale-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0.95; }
.scale-art::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(9,12,22,0.55) 0%, transparent 30%, transparent 55%, #090c16); }
.scale-body { padding: 0 var(--space-6) var(--space-6); margin-top: -14px; position: relative; }
.scale-body h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: var(--space-2); }
.scale-body p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
@media (max-width: 860px) { .scale-grid { grid-template-columns: 1fr; } }

/* CTA globe illustration */
.cta-globe { position: absolute; left: -40px; top: 50%; transform: translateY(-50%);
  width: 360px; max-width: 46%; opacity: 0.5; pointer-events: none; z-index: 0;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
  mask-image: radial-gradient(closest-side, #000, transparent); }
.landing-cta-strip .cta-strip-inner { z-index: 1; }

/* ── Features grid ──────────────────────────────────────────────────────── */
.landing-features {
  padding-top: var(--space-16); padding-bottom: var(--space-16);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}

.feature-card {
  background: linear-gradient(180deg, #0b0f1c, #090c16);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(91,120,255,0.3);
  transform: translateY(-4px);
}

/* Boxed icon (matches the mockup .fi), colour cycles per card. */
.feature-icon {
  width: 50px; height: 50px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(120,130,255,0.05);
  border: 1.5px solid rgba(96,150,250,0.5);
  color: #7fb0ff;
  margin-bottom: var(--space-2);
  transition: box-shadow 0.2s;
}
.feature-card:nth-child(3n+2) .feature-icon { border-color: rgba(150,130,255,0.5); color: #b7a5ff; }
.feature-card:nth-child(3n) .feature-icon { border-color: rgba(74,222,128,0.55); color: #5ee79b; }
.feature-card:hover .feature-icon { box-shadow: 0 0 22px rgba(80,120,255,0.35), inset 0 0 14px rgba(80,120,255,0.12); }

/* Newest feature (JS Solver) — subtle neon accent so it stands out in the grid. */
.feature-card-solver {
  border-color: rgba(91,139,255,0.45);
  box-shadow: 0 0 0 1px rgba(91,139,255,0.10), 0 18px 44px -26px rgba(70,100,255,0.5);
}
.feature-card-solver .feature-icon {
  border-color: rgba(34,211,238,0.55);
  color: #7fe0ff;
  box-shadow: 0 0 18px rgba(34,211,238,0.22), inset 0 0 12px rgba(34,211,238,0.10);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }

/* ── Pricing ────────────────────────────────────────────────────────────── */
.landing-pricing {
  padding-top: var(--space-16); padding-bottom: var(--space-16);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
}

.pricing-card-recommended {
  border-color: var(--accent-teal);
  background: linear-gradient(160deg, rgba(45,212,191,0.06) 0%, rgba(99,102,241,0.06) 100%);
  box-shadow: 0 0 0 1px var(--accent-teal), 0 8px 32px rgba(45,212,191,0.12);
}

.pricing-badge-recommended {
  position: absolute;
  top: -1px;
  right: var(--space-4);
  transform: translateY(-50%);
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.pricing-plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.pricing-amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.pricing-period {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.pricing-seats {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.pricing-feature-item {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
}

.pricing-feature-item::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-teal);
  font-weight: 700;
}

.pricing-cta {
  display: block;
  text-align: center;
  margin-top: auto;
}

/* Consistent price-row height so the amount and "By request" line up across cards. */
.pricing-price { min-height: 2.4rem; }

/* Gap between the plan grid and the money-back note. */
.pricing-moneyback {
  margin-top: var(--space-8);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pricing-unavailable {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-top: var(--space-8); padding-bottom: var(--space-8);
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.landing-faq {
  padding-top: var(--space-16); padding-bottom: var(--space-16);
  background: rgba(255,255,255,0.015);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.faq-inner {
  max-width: 720px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  cursor: pointer;
  padding: var(--space-4) var(--space-6);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: color 0.15s;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent-teal);
  flex-shrink: 0;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-question:hover { color: var(--accent-teal); }

.faq-question:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: -2px;
}

.faq-answer {
  padding: 0 var(--space-6) var(--space-4);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Bottom CTA strip ───────────────────────────────────────────────────── */
.landing-cta-strip {
  padding-top: var(--space-16); padding-bottom: var(--space-16);
  position: relative;
}
/* CTA band: headline + subtext left, button + links right (matches the mockup). */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(91,120,255,0.3);
  background: linear-gradient(120deg, #0a0f22, #0b1020 55%, #0e0c22);
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 40px 48px;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 120% at 12% 40%, rgba(34,120,255,0.28), transparent 60%),
    radial-gradient(60% 130% at 92% 60%, rgba(139,92,246,0.24), transparent 62%);
}
.cta-copy { position: relative; z-index: 1; flex: 1; text-align: left; }
.cta-strip-headline {
  font-size: clamp(1.5rem, 2vw + 0.9rem, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--text);
}
.cta-strip-sub { font-size: 0.95rem; color: var(--text-muted); margin-top: 10px; }
.cta-side {
  position: relative; z-index: 1; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.cta-strip-links { font-size: 0.8rem; color: var(--text-muted); }
@media (max-width: 760px) {
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px; }
  .cta-side { align-items: flex-start; }
}

/* ── Footer landing extras ──────────────────────────────────────────────── */
/* Wraps: this nav grew to five links (changelog, terms, privacy, login,
   register) and must not push the footer wider than the viewport. */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  row-gap: var(--space-2);
}

/* ── Landing responsive ─────────────────────────────────────────────────── */
/* Below ~1200px the six nav links can no longer share a row with the brand and
   the action buttons. Give the nav its own full-width row rather than letting it
   wrap raggedly around them: two tidy rows instead of three, and still never a
   scrollbar. Actions stay right-aligned on the first row. */
@media (max-width: 1200px) {
  .landing-header-actions { margin-left: auto; }
  .landing-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .landing-nav { display: none; }
  .landing-header-actions { gap: var(--space-2); }
  .landing-section-title { font-size: 1.4rem; }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto; margin-right: auto;
  }
  .pricing-badge-recommended { right: var(--space-3); }
}

@media (max-width: 640px) {
  .landing-hero { padding-top: var(--space-12); padding-bottom: var(--space-8); }
  .hero-ctas { flex-direction: column; }
  .btn-lg { width: 100%; max-width: 280px; }
  .feature-grid { grid-template-columns: 1fr; }
  .landing-features,
  .landing-pricing,
  .landing-faq,
  .landing-cta-strip { padding-top: var(--space-12); padding-bottom: var(--space-12); }
  .landing-section-sub { margin-bottom: var(--space-8); }
}

/* ─── Brand mark — BlankTrail Proxy shield (single master: /static/favicon.svg) ───── */
.brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand::before {
  content: "";
  width: 1.2em; height: 1.2em;
  background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3E%20%3Cdefs%3E%20%3ClinearGradient%20id='g'%20x1='0'%20y1='0'%20x2='0'%20y2='1'%3E%20%3Cstop%20offset='0'%20stop-color='%23818cf8'/%3E%20%3Cstop%20offset='1'%20stop-color='%236366f1'/%3E%20%3C/linearGradient%3E%20%3C/defs%3E%20%3Crect%20width='64'%20height='64'%20rx='15'%20fill='url(%23g)'/%3E%20%3Cpath%20d='M32%209%2053%2016.5V34c0%2011.5-9%2019.5-21%2023-12-3.5-21-11.5-21-23V16.5Z'%20fill='%23fff'/%3E%20%3Ccircle%20cx='32'%20cy='29'%20r='5.5'%20fill='%236366f1'/%3E%20%3Cpath%20d='M28.8%2030h6.4l-1.6%2013h-3.2Z'%20fill='%236366f1'/%3E%20%3C/svg%3E") center / contain no-repeat;
  flex: none;
}

/* ─── Hero technical mentions ──────────────────────────────────────────────── */
.hero-tech {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: var(--space-8); max-width: 600px;
}
.hero-tech .chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 15px; border-radius: 9px;
  background: #0a0e1a; border: 1px solid var(--border);
  color: #c3cadf; font-size: 0.8rem; font-weight: 700; white-space: nowrap;
}
.hero-tech .chip svg { flex: none; color: var(--accent-cyan); }
.hero-tech .chip:nth-child(2n) svg { color: #a5b4fc; }
.hero-tech .chip:nth-child(3n) svg { color: var(--success); }

/* ─── Hero use-case carousel ───────────────────────────────────────────────── */
.hero-cases { position: relative; max-width: 960px; margin: var(--space-12) auto 0; }
/* Match the other section kickers (centered, blue, bold). */
.cases-eyebrow {
  text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; color: #5b8bff; margin-bottom: 14px;
}
.cases-viewport { overflow: hidden; border-radius: var(--radius); }
.cases-track {
  display: flex; align-items: flex-start;
  transition: transform 0.5s cubic-bezier(0.22,0.61,0.36,1);
}
.case-slide { flex: 0 0 100%; min-width: 0; padding: 0 4px; }

/* Text-only case card (no screenshot): neon-bordered panel. */
.case-cap {
  text-align: center; padding: var(--space-8) var(--space-6);
  background: linear-gradient(180deg, #0b0f1c, #090c16);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.03);
}
.case-tag {
  display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; color: #aecaff;
  border: 1px solid rgba(91,120,255,0.32); border-radius: 9999px;
  padding: 0.3rem 0.85rem; margin-bottom: var(--space-4);
  background: linear-gradient(90deg, rgba(59,91,255,0.14), rgba(139,92,246,0.09));
}
.case-title { font-size: 1.5rem; font-weight: 700; line-height: 1.22; margin-bottom: var(--space-3); letter-spacing: -0.01em; }
.case-desc { color: var(--text-muted); font-size: 1rem; line-height: 1.62; max-width: 680px; margin: 0 auto; }

.cases-controls {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-4); margin-top: var(--space-6);
}
.cases-arrow {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  font-size: 1.3rem; line-height: 1; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.cases-arrow:hover { border-color: var(--border-bright); color: #fff; box-shadow: 0 0 14px rgba(80,110,255,0.22); }
.cases-dots { display: flex; gap: 0.5rem; }
.cases-dots button {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%;
  background: var(--border); cursor: pointer; transition: background 0.15s, transform 0.15s;
}
.cases-dots button[aria-selected="true"] { background: #5b8bff; transform: scale(1.35); box-shadow: 0 0 8px rgba(91,139,255,0.7); }
.cases-dots button:hover { background: var(--text-muted); }

/* Flex-gap fallback (probe may false-positive on modern browsers). */
.no-flexgap .cases-controls > * + * { margin-left: var(--space-4); }
.no-flexgap .cases-dots > * + * { margin-left: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  .cases-track { transition: none; }
}
@media (max-width: 560px) {
  .case-title { font-size: 1.12rem; }
  .cases-eyebrow { text-align: center; }
}

/* ─── Advanced capabilities grid ───────────────────────────────────────────── */
.adv-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  margin-top: var(--space-12); text-align: left;
}
.feature-example {
  margin-top: 0.9rem; padding-top: 0.85rem; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.9rem; line-height: 1.6;
}
@media (max-width: 760px) { .adv-grid { grid-template-columns: 1fr; } }

/* ─── Downloads page (OS-grouped) ────────────────────────────────────────────── */
.download-license-head {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-2);
  padding-bottom: var(--space-4); margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}
.download-plan { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.download-meta { color: var(--text-muted); font-size: 0.85rem; }

/* One OS group (Linux / Windows) — distinct bordered card inside the license. */
.download-os {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  background: rgba(255,255,255,0.015);
}
.download-os + .download-os { margin-top: var(--space-6); }
.download-os-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  margin-bottom: var(--space-4);
}

/* Each option (recommended primary + secondary subgroup). */
.download-option { padding: var(--space-4) 0; }
.download-option + .download-option { border-top: 1px solid var(--border); }
.download-option-primary {
  border-left: 3px solid var(--accent-teal);
  padding-left: var(--space-4); margin-left: calc(-1 * var(--space-4) - 3px);
}
.download-option-head {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
}
.download-subhead { font-size: 0.95rem; font-weight: 600; color: var(--text); margin: 0; }
.download-recommended { text-transform: uppercase; letter-spacing: 0.04em; }
.download-help { color: var(--text-muted); font-size: 0.875rem; margin: var(--space-2) 0 var(--space-3); }

.install-oneliner {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4);
  font-family: 'Fira Mono', 'Consolas', monospace; font-size: 0.85rem;
  color: var(--accent-teal); overflow-x: auto;
}
.download-archives {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-2);
}

/* Downloads: muted advisory note (e.g. the MITM/antivirus exclusion hint). */
.page-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 var(--space-4);
}

/* ─── Support page (channel chooser + web chat) ─────────────────────────────── */
.support-page { max-width: 760px; }

.support-intro {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 var(--space-8);
  max-width: 56ch;
}

/* Channel chooser — two cards (Telegram recommended + web chat). */
.support-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  align-items: stretch;
}

.support-channel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-8) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  transition: border-color 0.2s, transform 0.2s;
}
.support-channel:hover { border-color: rgba(45,212,191,0.4); transform: translateY(-2px); }

.support-channel-recommended {
  border-color: var(--accent-teal);
  background: linear-gradient(160deg, rgba(45,212,191,0.06) 0%, rgba(99,102,241,0.06) 100%);
  box-shadow: 0 0 0 1px var(--accent-teal), 0 8px 32px rgba(45,212,191,0.12);
}

.support-channel-badge {
  position: absolute;
  top: -1px;
  right: var(--space-4);
  transform: translateY(-50%);
  background: var(--accent-grad);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.support-channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: var(--accent-grad);
}
.support-channel-icon-web {
  color: var(--accent-teal);
  background: rgba(45,212,191,0.12);
}

.support-channel-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.support-channel-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  flex: 1; /* push the button to the bottom so both cards align */
}
.support-channel-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}
.support-channel-connected { color: var(--accent-teal); }
.support-channel .btn { margin-top: var(--space-2); }

/* Web chat panel */
.support-chat { margin-top: var(--space-2); }

.support-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  margin-bottom: var(--space-4);
}
.support-back:hover { color: var(--accent-teal); }

.support-chat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.support-thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-height: 52vh;
  min-height: 160px;
  overflow-y: auto;
  padding-right: var(--space-2);
}

.support-msg { display: flex; }
.support-msg-user { justify-content: flex-end; }
.support-msg-staff { justify-content: flex-start; }

.support-bubble {
  max-width: 78%;
  padding: var(--space-3) var(--space-4);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.support-msg-user .support-bubble {
  background: var(--accent-grad);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.support-msg-staff .support-bubble {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.support-msg-sender {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.8;
  text-transform: uppercase;
}
.support-msg-body {
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.support-msg-time { font-size: 0.68rem; opacity: 0.6; align-self: flex-end; }

.support-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  margin: 0;
}

.support-compose { display: flex; flex-direction: column; gap: var(--space-3); }
.support-compose-body { resize: vertical; min-height: 3.5rem; }
.support-compose-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.support-compose-hint { font-size: 0.8rem; color: var(--accent-teal); }

@media (max-width: 768px) {
  .support-channels { grid-template-columns: 1fr; }
  .support-bubble { max-width: 88%; }
}

/* ─── Detail pages (license / order): header, definition list, actions ──────── */
.page-header { margin-bottom: var(--space-6); }
.back-link {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-3);
}
.back-link:hover { color: var(--accent-teal); }

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: var(--space-6) var(--space-4);
}

.license-info-card { max-width: 560px; }

/* Label / value pairs rendered as a clean two-column grid (was an unstyled dl). */
.detail-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-3) var(--space-8);
  margin: 0;
  align-items: baseline;
}
.detail-list dt {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.detail-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  word-break: break-word;
}
.detail-list .license-key {
  font-family: 'Fira Mono', 'Consolas', monospace;
  letter-spacing: 0.02em;
}

.license-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.devices-section { margin-top: var(--space-8); }
.devices-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
}
.device-id {
  font-family: 'Fira Mono', 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Per-device actions cell — keep deactivate + rename controls on one tidy row. */
.device-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.device-actions form {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}
.input-sm {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  max-width: 160px;
}
.input-sm:focus { outline: none; border-color: var(--border-focus); }

@media (max-width: 560px) {
  .detail-list { grid-template-columns: 1fr; gap: var(--space-1) 0; }
  .detail-list dd { margin-bottom: var(--space-3); }
}

/* ═══ Admin + cabinet shared components (previously unstyled classes) ═══════════ */

/* Metric / stat cards (analytics, home, balance, referrals). stat-value/stat-label
   are already styled; these give the missing card + row layout. */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.stat-card .stat-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.stat-card .stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.stat-link { text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.stat-link:hover { border-color: rgba(45,212,191,0.4); transform: translateY(-2px); }
.stat-held .stat-value { color: var(--warning); }

/* Per-day bar list (analytics) */
.day-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.day-bar-row { display: grid; grid-template-columns: 108px 1fr auto; align-items: center; gap: var(--space-3); font-size: 0.85rem; }
.day-bar-label { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.day-bar-track { height: 8px; background: var(--bg-input); border-radius: 9999px; overflow: hidden; }
.day-bar-fill { display: block; height: 100%; min-width: 2px; background: var(--accent-grad); border-radius: 9999px; }
.day-bar-value { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Analytics range form + states */
.analytics-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); margin: var(--space-4) 0 var(--space-6); }
.analytics-range label { display: flex; flex-direction: column; gap: var(--space-1); font-size: 0.85rem; color: var(--text-muted); }
.analytics-section { margin-top: var(--space-8); }
.analytics-unavailable {
  color: #fcd34d; background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4); font-size: 0.9rem;
}

/* Status pill + status color variants (support tickets, updates, payouts, etc.) */
.status-badge, .badge-status {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 9999px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  background: rgba(148,163,184,0.15); color: var(--text-muted);
}
.status-open, .status-answered { background: rgba(45,212,191,0.15); color: #5eead4; }
.status-closed { background: rgba(148,163,184,0.15); color: var(--text-muted); }
.status-active { background: rgba(34,197,94,0.15); color: #86efac; }
.status-suspended, .status-revoked, .status-failed { background: rgba(239,68,68,0.15); color: #fca5a5; }
.status-pending, .status-awaiting_payment { background: rgba(245,158,11,0.15); color: #fcd34d; }
.status-paid { background: rgba(34,197,94,0.15); color: #86efac; }
.badge-muted { background: rgba(148,163,184,0.15); color: var(--text-muted); }

/* Telegram link pills */
.tg-badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 9999px; font-size: 0.78rem; font-weight: 600; }
.tg-linked { background: rgba(56,189,248,0.15); color: #7dd3fc; }
.tg-none { background: rgba(148,163,184,0.15); color: var(--text-muted); }

/* Support thread (admin support_detail) + message list (user_detail history) */
.support-ticket-thread, .message-list { display: flex; flex-direction: column; gap: var(--space-3); }
.thread-message, .message-item {
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  background: var(--bg-input); border: 1px solid var(--border);
}
.thread-staff { border-color: rgba(45,212,191,0.3); }
.thread-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; margin-bottom: var(--space-2); font-size: 0.75rem; }
.thread-sender, .message-sender { font-weight: 600; color: var(--text); }
.thread-source { color: var(--accent-teal); text-transform: uppercase; letter-spacing: 0.04em; }
.thread-time, .message-time { color: var(--text-muted); margin-left: auto; font-size: 0.75rem; }
.thread-body, .message-body { font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.ticket-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: var(--space-3); }

/* Consistent vertical spacing for the many action/section wrapper divs */
.status-actions, .upgrade-actions, .admin-license-devices, .support-reply-section,
.balance-overview-section, .apply-balance-section, .mark-paid-section, .mark-refunded-section,
.refund-section, .payout-request-section, .payout-history-section, .ledger-section,
.referral-code-section, .referral-summary-section, .referral-list-section,
.payment-instructions, .home-actions { margin-top: var(--space-8); }
.support-close-section { margin-top: var(--space-4); }
.status-actions h2, .upgrade-actions h2 { margin-bottom: var(--space-4); }
.status-actions form, .upgrade-actions form { display: inline-block; margin: 0 var(--space-2) var(--space-2) 0; }
.home-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Labeled select/input forms (upgrade, filters) */
.upgrade-form, .filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); }
.upgrade-form label, .filter-bar label { display: flex; flex-direction: column; gap: var(--space-1); font-size: 0.85rem; color: var(--text-muted); }

/* Hints / notices / advisory text */
.hint, .page-hint, .page-intro, .info-state, .instructions-text, .support-owner, .payout-owner {
  color: var(--text-muted); font-size: 0.9rem; line-height: 1.5;
}
.hint, .page-hint, .page-intro { margin-bottom: var(--space-4); }
.notice, .notice-warning, .flash-warning {
  border-radius: var(--radius); padding: var(--space-3) var(--space-4); font-size: 0.9rem; margin-bottom: var(--space-4);
  background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.25); color: var(--text);
}
.notice-warning, .flash-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); }

/* Table action links + responsive scroll + link-styled button */
.table-responsive { overflow-x: auto; }
.action-link { color: var(--text-link); font-size: 0.85rem; white-space: nowrap; }
.action-link + .action-link { margin-left: var(--space-3); }
.btn-link, .stat-link { cursor: pointer; }
.btn-link { background: none; border: none; color: var(--text-link); font: inherit; padding: 0; }

/* Monospace code-ish values */
.ref-code, .promo-code, .referral-code-value, .referral-share-link,
.bundle-file-ref, .bundle-version, .dist-version, .payout-address {
  font-family: 'Fira Mono', 'Consolas', monospace; font-size: 0.85rem;
}
.payout-address, .referral-share-link { word-break: break-all; }

/* Money + numeric cells */
.money-cell, .money-value, .ledger-amount, .seats-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-value { font-weight: 600; }
.seats-sep { color: var(--text-muted); margin: 0 0.15rem; }
.ledger-kind { color: var(--text); }
.ledger-ref { color: var(--text-muted); font-size: 0.85rem; }
.referral-reward-rate { color: var(--accent-teal); font-weight: 700; }
.referral-user-label { color: var(--text); }

/* Audit table cells */
.audit-action { font-weight: 600; color: var(--text); }
.audit-actor, .audit-target { color: var(--text-muted); }
.audit-at { color: var(--text-muted); white-space: nowrap; font-size: 0.85rem; }
.audit-meta { font-family: 'Fira Mono', 'Consolas', monospace; font-size: 0.78rem; color: var(--text-muted); word-break: break-all; }

/* Filter tabs (support, bug-reports) */
.filter-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.filter-tab {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.9rem; border: 1px solid var(--border);
}
.filter-tab:hover { color: var(--text); text-decoration: none; }
.filter-tab-active { color: var(--accent-teal); border-color: var(--accent-teal); background: rgba(45,212,191,0.1); }

/* Checkbox row (payments toggles) */
.checkbox-label { display: flex; align-items: center; gap: var(--space-2); font-size: 0.95rem; }

/* Generic detail card + order detail bits */
.detail-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-6); max-width: 560px;
}

/* Error page */
.error-page { text-align: center; padding: var(--space-12) var(--space-4); }
.error-404 { font-size: 3rem; font-weight: 800; color: var(--accent-teal); line-height: 1; }
.error-message { color: var(--text-muted); margin-top: var(--space-3); }

@media (max-width: 560px) {
  .day-bar-row { grid-template-columns: 80px 1fr auto; }
  .thread-time, .message-time { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DOCUMENTATION (/docs) — sidebar + content layout
   ═══════════════════════════════════════════════════════════════════════════ */
.docs-layout {
  max-width: 1320px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
  padding-top: var(--space-8);
  padding-bottom: var(--space-12);
}

/* ─── Sidebar ─── */
.docs-sidebar {
  position: sticky;
  top: var(--space-4);
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
.docs-sidebar-toggle {
  display: none;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.docs-nav-group { margin-bottom: var(--space-6); }
.docs-nav-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  padding-left: var(--space-3);
}
.docs-nav-list { list-style: none; margin: 0; padding: 0; }
.docs-nav-link {
  display: block;
  padding: 0.35rem var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border-left: 2px solid transparent;
  font-size: 0.9rem;
}
.docs-nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); text-decoration: none; }
.docs-nav-link.active {
  color: var(--accent-teal);
  background: rgba(45,212,191,0.1);
  border-left-color: var(--accent-teal);
  font-weight: 600;
}

/* ─── Content column ─── */
.docs-content { min-width: 0; }
.docs-breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-4); }
.docs-breadcrumb a { color: var(--text-muted); }
.docs-breadcrumb a:hover { color: var(--accent-teal); }
.docs-breadcrumb-sep { margin: 0 var(--space-2); opacity: 0.5; }
.docs-title { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: var(--space-3); }
.docs-lede { font-size: 1.05rem; color: var(--text-muted); margin-bottom: var(--space-6); max-width: 46rem; }

/* On-page table of contents */
.docs-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-8);
}
.docs-toc-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: var(--space-2); }
.docs-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); }
.docs-toc a { color: var(--text-link); font-size: 0.9rem; }

/* Sections + typography */
.docs-block-section { margin-bottom: var(--space-8); scroll-margin-top: var(--space-6); }
.docs-h2 { font-size: 1.4rem; font-weight: 700; margin: var(--space-8) 0 var(--space-4); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border); }
.docs-h2 .docs-anchor { color: var(--text); }
.docs-h2 .docs-anchor:hover { color: var(--accent-teal); text-decoration: none; }
.docs-h3 { font-size: 1.1rem; font-weight: 700; margin: var(--space-6) 0 var(--space-3); }
.docs-p { margin-bottom: var(--space-4); max-width: 46rem; }
.docs-ul, .docs-ol, .docs-steps { margin: 0 0 var(--space-4) 1.4rem; max-width: 46rem; }
.docs-ul li, .docs-ol li { margin-bottom: var(--space-2); }
.docs-steps { counter-reset: step; list-style: none; margin-left: 0; }
.docs-steps li { position: relative; padding-left: 2.4rem; margin-bottom: var(--space-4); }
.docs-steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 1.7rem; height: 1.7rem;
  display: grid; place-items: center;
  background: var(--accent-grad); color: #0f1117;
  border-radius: 50%; font-size: 0.8rem; font-weight: 700;
}

/* Code blocks */
.docs-code {
  background: #0b0d13;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  overflow-x: auto;
  margin-bottom: var(--space-4);
  font-size: 0.85rem;
  line-height: 1.55;
}
.docs-code code { font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace; color: #d6deeb; white-space: pre; }
.docs-p code, .docs-ul code, .docs-ol code, .docs-table code {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.05rem 0.35rem;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 0.85em; color: var(--accent-teal);
}

/* Callouts */
.docs-callout {
  display: flex; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left-width: 3px;
  background: var(--bg-card);
  margin-bottom: var(--space-4);
  max-width: 46rem;
}
.docs-callout-label { font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; padding-top: 0.1rem; }
.docs-note { border-left-color: var(--info); }
.docs-note .docs-callout-label { color: var(--info); }
.docs-tip { border-left-color: var(--success); }
.docs-tip .docs-callout-label { color: var(--success); }
.docs-warn { border-left-color: var(--warning); }
.docs-warn .docs-callout-label { color: var(--warning); }

/* Figures / screenshots */
.docs-figure { margin: 0 0 var(--space-6); }
.docs-figure img {
  max-width: 100%; height: auto; display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.docs-figure figcaption { color: var(--text-muted); font-size: 0.85rem; margin-top: var(--space-2); text-align: center; }

/* Tables */
.docs-table-wrap { overflow-x: auto; margin-bottom: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); }
.docs-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.docs-table th, .docs-table td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.docs-table th { background: var(--bg-input); color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.docs-table tr:last-child td { border-bottom: none; }

/* API endpoint blocks */
.docs-endpoint {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
}
.docs-endpoint-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.docs-method { font-weight: 700; font-size: 0.7rem; letter-spacing: 0.05em; padding: 0.2rem 0.5rem; border-radius: var(--radius-sm); color: #0f1117; }
.docs-method-GET { background: var(--info); }
.docs-method-POST { background: var(--success); }
.docs-method-PUT { background: var(--warning); }
.docs-method-DELETE { background: var(--error); }
.docs-endpoint-path { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 0.9rem; color: var(--text); word-break: break-all; }
.docs-auth { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); }
.docs-auth-req { color: var(--warning); border-color: var(--warning); }
.docs-auth-none { color: var(--text-muted); }
.docs-endpoint-summary { color: var(--text-muted); margin-bottom: var(--space-3); }
.docs-example-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: var(--space-3) 0 var(--space-2); }
.docs-endpoint-notes { margin: var(--space-3) 0 0 1.2rem; color: var(--text-muted); font-size: 0.875rem; }
.docs-params td code { color: var(--accent-teal); }

/* Prev / next pager */
.docs-pager { display: flex; justify-content: space-between; gap: var(--space-4); margin-top: var(--space-12); border-top: 1px solid var(--border); padding-top: var(--space-6); }
.docs-pager-link { display: flex; flex-direction: column; gap: 0.2rem; padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); max-width: 48%; }
.docs-pager-link:hover { border-color: var(--accent-teal); text-decoration: none; }
.docs-pager-next { text-align: right; margin-left: auto; }
.docs-pager-dir { font-size: 0.75rem; color: var(--text-muted); }
.docs-pager-title { font-weight: 600; color: var(--text); }

/* Responsive: collapse the sidebar into a toggle on narrow screens */
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: var(--space-4); }
  .docs-sidebar { position: static; max-height: none; margin-bottom: var(--space-4); }
  .docs-sidebar-toggle { display: block; }
  .docs-nav { display: none; margin-top: var(--space-3); }
  .docs-sidebar.open .docs-nav { display: block; }
  .docs-title { font-size: 1.6rem; }
}

/* ─── Cabinet sidebar shell (/app) — ports design/site-mockup/cabinet.html ─────
   Everything is scoped under body.cab (set by layout.tmpl's /app branch) so the
   admin panel + landing keep their own styling. Colors are the mockup's own
   scale, held in .cab-scoped custom properties so they never leak. */
body.cab {
  --cbg: #04050a; --cpanel: #0a0d17; --ccard: #0b0f1c;
  --cline: #1b2237; --cline-soft: #161c2e; --cline-bright: rgba(110,130,255,.35);
  --ctxt: #e7ebf5; --ctxt-dim: #c3cadf; --ctxt-mute: #8b96b5; --ctxt-faint: #5f6a88;
  --cblue: #3b5bff; --cblue-hi: #5b8bff; --cgreen: #4ade80; --cviolet: #8b5cf6; --camber: #fbbf24;
  background: var(--cbg); color: var(--ctxt);
  font-variant-numeric: tabular-nums;
}
/* The HTML `hidden` attribute must win over the component display rules in this
   section — otherwise a JS-toggled panel (e.g. the support channel chooser, which
   gets display:grid below) stays visible after being hidden. */
.cab [hidden] { display: none !important; }
.cab .cab-aurora { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.cab .cab-aurora span { position: absolute; border-radius: 50%; filter: blur(30px); }
.cab .cab-aurora .a1 { top: -260px; left: 200px; width: 820px; height: 520px; background: radial-gradient(closest-side, rgba(59,91,255,.14), transparent 70%); }
.cab .cab-aurora .a2 { top: -160px; right: -140px; width: 720px; height: 480px; background: radial-gradient(closest-side, rgba(139,92,246,.12), transparent 70%); }

.cab-shell { position: relative; z-index: 2; display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

/* Sidebar */
.cab-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #080b14, #070912); border-right: 1px solid var(--cline-soft); padding: 20px 16px; }
.cab-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 20px; }
.cab-brand:hover { text-decoration: none; }
.cab-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: linear-gradient(180deg, #818cf8, #6366f1); box-shadow: 0 0 20px rgba(99,102,241,.5), inset 0 1px 0 rgba(255,255,255,.35); }
.cab-brand b { font-family: 'Sora', sans-serif; font-size: 17.5px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.cab-brand b i { font-style: normal; color: var(--cblue-hi); }

.cab-nav { display: flex; flex-direction: column; }
.cab-nav-cap { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #5b658a; font-weight: 800; padding: 14px 12px 8px; }
.cab-nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: #93a0c2; transition: .15s; position: relative; margin-bottom: 2px; }
.cab-nav-link:hover { background: rgba(90,110,220,.08); color: #e7ecfa; text-decoration: none; }
.cab-nav-link svg { width: 18px; height: 18px; color: #7c88ad; transition: .15s; flex: none; }
.cab-nav-link:hover svg { color: #aab6d8; }
.cab-nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(74,100,255,.22), rgba(74,100,255,.04)); box-shadow: inset 0 0 0 1px rgba(91,120,255,.3); }
.cab-nav-link.active svg { color: var(--cblue-hi); }
.cab-nav-link.active::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #5b8bff, #7c4bff); box-shadow: 0 0 10px rgba(91,120,255,.8); }
.cab-nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 20px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #ff5f7a, #e0344f); box-shadow: 0 0 10px rgba(224,52,79,.5); }
.cab-nav-badge[hidden] { display: none; }

.cab-spacer { flex: 1; }
.cab-userbox { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 12px; background: #0a0e1a; border: 1px solid var(--cline); margin-top: 8px; }
.cab-userbox-guest { justify-content: center; gap: 9px; color: var(--ctxt-dim); font-weight: 700; font-size: 13.5px; }
.cab-userbox-guest:hover { color: #fff; border-color: var(--cline-bright); text-decoration: none; }
.cab-avatar { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; text-transform: uppercase;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; color: #dfe6ff;
  background: linear-gradient(155deg, #2a3566, #1a2247); border: 1px solid rgba(120,140,255,.3); }
.cab-u-meta { min-width: 0; }
.cab-u-mail { font-size: 12.5px; font-weight: 700; color: #dbe2f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-u-sub { font-size: 11px; color: #7ee0a6; font-weight: 700; }
.cab-u-out-form { margin-left: auto; display: flex; }
.cab-u-out { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #8b96b5; border: 1px solid transparent; background: transparent; cursor: pointer; transition: .15s; }
.cab-u-out:hover { color: #fff; border-color: #2a3352; background: #121736; }

/* Sidebar fine-print: legal reference links, deliberately quieter than .cab-nav-link. */
/* Wraps: measured at 231px inside a 232px sidebar box — zero slack, so a longer
   translation or a different font fallback would have overflowed it. */
.cab-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 10px; }
.cab-legal a { font-size: 11px; font-weight: 600; color: var(--ctxt-faint); }
.cab-legal a:hover { color: var(--ctxt-mute); text-decoration: none; }

/* Main column + topbar */
.cab-main { min-width: 0; display: flex; flex-direction: column; }
/* flex-wrap + a breakable title: the home greeting is "<hello> <email>", and an
   email is one unbreakable token, so without both the topbar pushed the whole
   cabinet into a horizontal scroll on narrow viewports. */
.cab-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 16px 32px;
  background: linear-gradient(180deg, rgba(5,6,12,.9), rgba(5,6,12,.62)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27,34,55,.7); }
.cab-pt-title { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 700; color: #fff;
  overflow-wrap: anywhere; }
.cab-pt-sub { font-size: 13px; color: var(--ctxt-mute); margin-top: 1px; }
.cab-tb-right { margin-left: auto; display: flex; align-items: center; gap: 11px; }
.cab-balance-chip { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 15px; border-radius: 11px;
  background: linear-gradient(180deg, #0c1120, #0a0e1a); border: 1px solid var(--cline); }
.cab-balance-chip:hover { border-color: var(--cline-bright); text-decoration: none; }
.cab-bc-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #5ee79b; flex: none;
  border: 1px solid rgba(74,222,128,.4); background: rgba(46,200,120,.08); }
.cab-bc-txt { display: flex; flex-direction: column; }
.cab-bc-l { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #7986a8; font-weight: 800; }
.cab-bc-v { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 700; color: #eef2fd; line-height: 1.1; }

/* Cabinet buttons (scoped override of the global .btn) — mockup pill style */
.cab .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: inherit;
  cursor: pointer; border: 0; transition: .18s; font-weight: 700; white-space: nowrap; text-decoration: none; }
.cab .btn:hover { text-decoration: none; }
.cab .btn-primary { height: 42px; padding: 0 20px; border-radius: 11px; font-size: 13.5px; color: #fff;
  background: linear-gradient(180deg, #4f8bff, #2f5cf0); box-shadow: 0 4px 16px rgba(38,66,180,.45), inset 0 1px 0 rgba(255,255,255,.22); }
.cab .btn-primary:hover { filter: brightness(1.1); }
.cab .btn-ghost { height: 42px; padding: 0 18px; border-radius: 11px; background: #0c101d; border: 1px solid var(--cline); color: var(--ctxt-dim); font-size: 13.5px; }
.cab .btn-ghost:hover { border-color: var(--cline-bright); color: #fff; }
.cab .btn-sm { height: 36px; padding: 0 15px; font-size: 12.5px; border-radius: 9px; }

.cab-content { padding: 26px 32px 46px; max-width: 1320px; width: 100%; }

/* Stat cards */
.cab-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.cab-stat { display: flex; align-items: center; gap: 15px; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(180deg, #0c101f, #0a0e1a); border: 1px solid var(--cline); }
.cab-stat-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(120,130,255,.05); }
.cab-stat-ic.green { border: 1.5px solid rgba(74,222,128,.5); color: #5ee79b; box-shadow: 0 0 14px rgba(52,211,120,.15); }
.cab-stat-ic.blue { border: 1.5px solid rgba(96,150,250,.5); color: #7fb0ff; box-shadow: 0 0 14px rgba(80,130,255,.15); }
.cab-stat-ic.violet { border: 1.5px solid rgba(150,130,255,.5); color: #b7a5ff; box-shadow: 0 0 14px rgba(139,102,255,.15); }
.cab-stat-ic.amber { border: 1.5px solid rgba(251,191,36,.5); color: #fcd34d; box-shadow: 0 0 14px rgba(251,191,36,.15); }
.cab-stat-l { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8b96b5; font-weight: 800; margin-bottom: 6px; }
.cab-stat-v { font-family: 'Sora', sans-serif; font-size: 24px; font-weight: 700; line-height: 1; color: #fff; }
.cab-stat-v small { font-size: 13px; color: var(--ctxt-mute); font-weight: 600; }

/* Content grid + panels */
.cab-grid2 { display: grid; grid-template-columns: 1.62fr 1fr; gap: 20px; margin-bottom: 22px; }
.cab-col { display: flex; flex-direction: column; gap: 20px; }
.cab-panel { border-radius: 16px; border: 1px solid var(--cline); background: linear-gradient(180deg, #0b0f1c, #090c16); overflow: hidden; }
.cab-panel-h { display: flex; align-items: center; gap: 12px; padding: 17px 22px; border-bottom: 1px solid var(--cline-soft); }
.cab-panel-h h3 { font-size: 15.5px; font-weight: 600; color: #fff; }
.cab-panel-h .cab-link { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--cblue-hi); }
.cab-panel-h .cab-link:hover { color: #9fbcff; }

/* License card */
.cab-license { position: relative; border-radius: 16px; border: 1px solid rgba(91,120,255,.28); overflow: hidden; margin-bottom: 22px;
  background: linear-gradient(100deg, #0a0e1c 0%, #0b0f20 52%, #0e0c22 100%); }
.cab-license .cab-art { position: absolute; right: 0; top: 0; bottom: 0; width: 470px; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%); mask-image: linear-gradient(90deg, transparent 0, #000 42%); }
.cab-license .cab-art img { position: absolute; right: -24px; top: 50%; transform: translateY(-50%); height: 132%; width: auto; max-width: none; }
.cab-license .cab-glow { position: absolute; right: -40px; top: -90px; width: 520px; height: 320px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124,90,255,.22), transparent 72%); }
.cab-lic-in { position: relative; z-index: 2; padding: 26px 30px; display: flex; flex-direction: column; gap: 18px; }
.cab-lic-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cab-badge-pro { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 13px; border-radius: 8px; font-size: 12px; font-weight: 800; letter-spacing: .03em;
  color: #0a0d17; background: linear-gradient(90deg, #7fd0ff, #5b8bff); box-shadow: 0 0 18px rgba(91,139,255,.45); }
.cab-badge-live { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 800;
  color: #4ee79b; background: rgba(46,200,120,.1); border: 1px solid rgba(46,200,120,.32); }
.cab-badge-live .pip { width: 7px; height: 7px; border-radius: 50%; background: #3ee585; box-shadow: 0 0 9px #3ee585; }
.cab-lic-title { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.cab-lic-meta { display: flex; gap: 34px; flex-wrap: wrap; }
.cab-lm { display: flex; flex-direction: column; gap: 5px; }
.cab-lm .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7986a8; font-weight: 800; }
.cab-lm .v { font-size: 15px; font-weight: 700; color: #e7ecfa; }
.cab-lm .v.g { color: #5ee79b; }
.cab-lic-bar { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.cab-lic-bar .row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ctxt-mute); font-weight: 600; }
.cab-lic-bar .row b { color: #d4dbf0; }
.cab-track { height: 8px; border-radius: 5px; background: #141a30; overflow: hidden; }
.cab-track i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #38bdf8, #818cf8); box-shadow: 0 0 10px rgba(90,130,255,.6); }
.cab-lic-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cab-keyrow { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--cline-soft); position: relative; z-index: 2; }
.cab-keyrow .kk { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7986a8; font-weight: 800; }
.cab-keyrow code { font-family: 'Sora', sans-serif; font-size: 13.5px; color: #cdd6ef; letter-spacing: .04em; }
.cab-copy { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid #262f4e; background: #10152a; color: #8b96b5; transition: .15s; }
.cab-copy:hover { color: #fff; border-color: var(--cline-bright); }

/* Orders table (scoped so the global table styles are untouched) */
.cab-panel table { width: 100%; border-collapse: collapse; }
.cab-panel thead th { padding: 12px 22px; text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #7c88ad; font-weight: 800;
  background: #0c1120; border-bottom: 1px solid var(--cline-soft); white-space: nowrap; }
.cab-panel tbody td { padding: 14px 22px; border-bottom: 1px solid #12172a; font-size: 13.5px; color: #c9d1e8; }
.cab-panel tbody tr:last-child td { border-bottom: none; }
.cab-panel tbody tr { transition: background .15s; }
.cab-panel tbody tr:hover { background: rgba(84,104,255,.05); }
.cab-oid { font-family: 'Sora', sans-serif; font-weight: 700; color: #e7ecfa; }
.cab-pill { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 11px; border-radius: 20px; font-size: 11.5px; font-weight: 800; }
.cab-pill.paid { color: #5ee79b; background: rgba(46,200,120,.1); border: 1px solid rgba(46,200,120,.3); }
.cab-pill.wait { color: #fcd34d; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); }
.cab-pill.cancel { color: #95a0be; background: rgba(120,130,160,.08); border: 1px solid rgba(120,130,160,.24); }
.cab-pill .pip { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Right-column mini panels */
.cab-mini { padding: 20px 22px; }
.cab-mini h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 9px; color: #fff; }
.cab-mini h3 svg { width: 18px; height: 18px; color: var(--cblue-hi); flex: none; }
.cab-mini p { font-size: 13px; color: var(--ctxt-mute); line-height: 1.55; margin-bottom: 14px; }
.cab-ref-code { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 11px; background: #0a0e1a; border: 1px dashed #2a3352; margin-bottom: 14px; }
.cab-ref-code code { font-family: 'Sora', sans-serif; font-size: 14px; color: #cdd6ef; font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-ref-stat { display: flex; gap: 10px; }
.cab-ref-stat .rs { flex: 1; padding: 12px; border-radius: 11px; background: #0a0e1a; border: 1px solid var(--cline); text-align: center; }
.cab-ref-stat .rn { font-family: 'Sora', sans-serif; font-size: 20px; font-weight: 700; color: #eef2fd; }
.cab-ref-stat .rl { font-size: 11px; color: var(--ctxt-mute); margin-top: 3px; }
.cab-support-card { background: linear-gradient(150deg, #0b1226, #0c0f20); border-color: rgba(91,120,255,.24); }

/* Downloads */
.cab-sec-h { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600; margin: 6px 2px 14px; letter-spacing: .01em; color: #fff; }
.cab-dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cab-dl { display: flex; flex-direction: column; gap: 13px; padding: 20px; border-radius: 14px; background: #0a0e1a; border: 1px solid var(--cline); transition: .2s; }
.cab-dl:hover { border-color: rgba(91,120,255,.32); transform: translateY(-3px); }
.cab-dl-top { display: flex; align-items: center; gap: 13px; }
.cab-dl-os { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(120,130,255,.05); border: 1px solid var(--cline); color: #c5cef0; flex: none; }
.cab-dl-name { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 700; color: #fff; }
.cab-dl-ver { font-size: 12px; color: var(--ctxt-mute); margin-top: 2px; }
.cab-dl .btn { width: 100%; }

/* Cabinet responsive: collapse the sidebar into a top strip under 1080px so the
   nav stays reachable (the mockup hides it outright; keeping it is better UX). */
@media (max-width: 1080px) {
  .cab-shell { grid-template-columns: 1fr; }
  .cab-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 6px 10px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--cline-soft); }
  .cab-brand { padding: 0 8px 0 0; }
  .cab-side .cab-nav { flex-direction: row; flex-wrap: wrap; }
  .cab-nav-cap, .cab-spacer, .cab-userbox { display: none; }
  .cab-nav-link { margin-bottom: 0; }
  .cab-nav-link.active::before { display: none; }
  .cab-topbar { padding: 14px 16px; }
  .cab-content { padding: 20px 16px 40px; }
  .cab-stats { grid-template-columns: 1fr 1fr; }
  .cab-grid2 { grid-template-columns: 1fr; }
  .cab-license .cab-art { display: none; }
  .cab-dl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cab-stats { grid-template-columns: 1fr; }
  .cab-pt-title { font-size: 17px; }
}

/* ─── Cabinet inner pages — restyle the shared content classes to the mockup
   language WITHOUT touching page HTML. All scoped under body.cab so admin/auth
   keep the global styling. The sticky topbar already carries the page title, so
   the in-content .page-title/.page-subtitle are hidden. */
.cab h1, .cab h2, .cab h3 { font-family: 'Sora', sans-serif; }
.cab .page-title, .cab .page-subtitle { display: none; }
.cab .page-header { margin-bottom: 18px; }
.cab .back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cblue-hi); }
.cab .back-link:hover { color: #9fbcff; text-decoration: none; }
.cab .page-intro, .cab .page-note { color: var(--ctxt-mute); font-size: 14px; max-width: 720px; margin-bottom: 14px; }
.cab .section-title { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600; color: #fff; margin: 6px 2px 14px; letter-spacing: .01em; }
.cab section { margin-bottom: 22px; }

/* Panels / cards */
.cab .card { border-radius: 16px; border: 1px solid var(--cline); background: linear-gradient(180deg, #0b0f1c, #090c16); padding: 22px 24px; margin-bottom: 20px; }

/* Tables */
.cab .table-responsive { border: 1px solid var(--cline); border-radius: 14px; overflow: hidden; overflow-x: auto; background: linear-gradient(180deg, #0b0f1c, #090c16); margin-bottom: 20px; }
.cab .data-table, .cab table.table { width: 100%; border-collapse: collapse; }
.cab .data-table th, .cab table.table th { padding: 12px 18px; text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #7c88ad; font-weight: 800; background: #0c1120; border-bottom: 1px solid var(--cline-soft); white-space: nowrap; }
.cab .data-table td, .cab table.table td { padding: 13px 18px; border-bottom: 1px solid #12172a; font-size: 13.5px; color: #c9d1e8; }
.cab .data-table tbody tr:last-child td { border-bottom: none; }
.cab .data-table tbody tr { transition: background .15s; }
.cab .data-table tbody tr:hover { background: rgba(84,104,255,.05); }
.cab .money-cell, .cab .money-value, .cab .ledger-amount { font-variant-numeric: tabular-nums; }

/* Badges → pills (mapped by status modifier) */
.cab .badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px; border-radius: 20px; font-size: 11.5px; font-weight: 800;
  color: #95a0be; background: rgba(120,130,160,.08); border: 1px solid rgba(120,130,160,.24); }
.cab .badge-active, .cab .badge-paid, .cab .badge-credited, .cab .badge-completed, .cab .badge-done, .cab .badge-approved { color: #5ee79b; background: rgba(46,200,120,.1); border-color: rgba(46,200,120,.3); }
.cab .badge-pending, .cab .badge-awaiting_payment, .cab .badge-held_aml, .cab .badge-requested, .cab .badge-processing { color: #fcd34d; background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.3); }
.cab .badge-cancelled, .cab .badge-expired, .cab .badge-refunded, .cab .badge-inactive, .cab .badge-suspended, .cab .badge-rejected, .cab .badge-failed { color: #95a0be; background: rgba(120,130,160,.08); border-color: rgba(120,130,160,.24); }

/* Buttons — extend the earlier .cab button set with the remaining variants */
.cab .btn-secondary { height: 38px; padding: 0 15px; border-radius: 10px; background: #0c101d; border: 1px solid var(--cline); color: var(--ctxt-dim); font-size: 12.5px; }
.cab .btn-secondary:hover { border-color: var(--cline-bright); color: #fff; }
.cab .btn-danger { height: 38px; padding: 0 15px; border-radius: 10px; background: rgba(224,52,79,.12); border: 1px solid rgba(224,52,79,.4); color: #ff8ba0; font-size: 12.5px; }
.cab .btn-danger:hover { background: rgba(224,52,79,.2); color: #fff; }
.cab .btn-warning { height: 42px; padding: 0 18px; border-radius: 11px; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.4); color: #fcd34d; font-size: 13px; }
.cab .btn-warning:hover { background: rgba(251,191,36,.2); color: #fff; }
.cab .btn-block { width: 100%; }

/* Empty / info / notice states */
.cab .empty-state, .cab .info-state { padding: 26px 22px; text-align: center; color: var(--ctxt-mute); font-size: 14px; border: 1px dashed #26304e; border-radius: 14px; background: rgba(10,14,26,.5); }
.cab .notice { padding: 14px 16px; border-radius: 12px; background: #0a0e1a; border: 1px solid var(--cline); color: var(--ctxt-dim); font-size: 13.5px; margin-bottom: 16px; }
.cab .notice-warning { border-color: rgba(251,191,36,.4); color: #fcd34d; background: rgba(251,191,36,.06); }

/* Stat tiles (inner pages: label + value, no icon) */
.cab .stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.cab .stat-card { padding: 18px 20px; border-radius: 14px; background: linear-gradient(180deg, #0c101f, #0a0e1a); border: 1px solid var(--cline); }
.cab .stat-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #8b96b5; font-weight: 800; margin-bottom: 8px; }
.cab .stat-value { font-family: 'Sora', sans-serif; font-size: 24px; font-weight: 700; line-height: 1; color: #fff; }
.cab .stat-held { font-size: 11.5px; color: var(--ctxt-mute); margin-top: 6px; }

/* Definition list (license detail) */
.cab .detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 12px 28px; align-items: center; }
.cab .detail-list dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7986a8; font-weight: 800; }
.cab .detail-list dd { font-size: 14px; font-weight: 600; color: #e7ecfa; }
.cab .license-key, .cab .device-id { font-family: 'Sora', sans-serif; letter-spacing: .03em; color: #cdd6ef; }

/* Forms */
.cab .form-group { margin-bottom: 14px; }
.cab .form-label { display: block; font-size: 12px; font-weight: 700; color: var(--ctxt-dim); margin-bottom: 6px; }
.cab .form-hint, .cab .form-note { font-size: 13px; color: var(--ctxt-mute); margin-bottom: 12px; }
.cab input[type=text], .cab input[type=email], .cab input[type=password], .cab input[type=number], .cab .input, .cab .input-sm, .cab textarea, .cab select {
  width: 100%; background: #0a0e1a; border: 1px solid var(--cline); border-radius: 10px; color: var(--ctxt); font-family: inherit; font-size: 13.5px; padding: 10px 13px; }
.cab .input-sm { padding: 7px 10px; font-size: 12.5px; }
.cab input:focus, .cab .input:focus, .cab textarea:focus, .cab select:focus { outline: none; border-color: var(--cline-bright); }
.cab input::placeholder { color: var(--ctxt-faint); }

/* Plans */
.cab .plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cab .plan-card { display: flex; flex-direction: column; border-radius: 16px; border: 1px solid var(--cline); background: linear-gradient(180deg, #0b0f1c, #090c16); overflow: hidden; }
.cab .plan-card-header { padding: 24px 24px 18px; border-bottom: 1px solid var(--cline-soft); }
.cab .plan-name { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.cab .plan-price { font-size: 30px; font-weight: 800; color: #fff; }
.cab .plan-price .plan-period { font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 600; color: var(--ctxt-mute); }
.cab .plan-meta, .cab .plan-ports { font-size: 13px; color: var(--ctxt-mute); margin-top: 8px; }
.cab .plan-features { list-style: none; margin: 0; padding: 18px 24px; display: flex; flex-direction: column; gap: 10px; }
.cab .plan-features li { position: relative; padding-left: 26px; font-size: 13.5px; color: var(--ctxt-dim); }
.cab .plan-features li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: rgba(46,200,120,.12); border: 1px solid rgba(46,200,120,.4); }
.cab .plan-features li::after { content: ""; position: absolute; left: 5px; top: 5px; width: 4px; height: 8px; border-right: 2px solid #5ee79b; border-bottom: 2px solid #5ee79b; transform: rotate(40deg); }
.cab .plan-card-footer { margin-top: auto; padding: 18px 24px 24px; border-top: 1px solid var(--cline-soft); }
.cab .promo-row { margin-bottom: 12px; }
.cab .pay-options { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.cab .pay-options legend { font-size: 12px; font-weight: 700; color: var(--ctxt-dim); margin-bottom: 6px; padding: 0; }
.cab .pay-option { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 10px; border: 1px solid var(--cline); background: #0a0e1a; cursor: pointer; font-size: 13.5px; color: var(--ctxt-dim); }
.cab .pay-option input { width: auto; }

/* Self-serve renewal (subscribed Plans page) — term picker */
.cab .renew-form { display: flex; flex-direction: column; gap: 12px; }
.cab .renew-title { font-size: 13px; font-weight: 700; color: var(--ctxt-dim); }
.cab .renew-terms { display: flex; flex-direction: column; gap: 8px; }
.cab .renew-term { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--cline); background: #0a0e1a; cursor: pointer; transition: .15s; }
.cab .renew-term:hover { border-color: var(--cline-bright); }
.cab .renew-term:has(input:checked) { border-color: rgba(91,120,255,.5); background: linear-gradient(90deg, rgba(74,100,255,.12), rgba(74,100,255,.03)); box-shadow: inset 0 0 0 1px rgba(91,120,255,.3); }
.cab .renew-term input { width: auto; flex: none; accent-color: #5b8bff; }
.cab .renew-term-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cab .renew-term-dur { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; color: #e7ecfa; }
.cab .renew-term-price { font-size: 13.5px; color: var(--ctxt-mute); }
.cab .renew-term-badge { font-size: 11px; font-weight: 800; color: #5ee79b; background: rgba(46,200,120,.12); border: 1px solid rgba(46,200,120,.35); border-radius: 20px; padding: 2px 9px; white-space: nowrap; }

/* License detail extras */
.cab .license-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.cab .devices-section h2 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.cab .device-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cab .device-actions form { display: flex; gap: 6px; align-items: center; margin: 0; }
.cab .device-actions .input-sm { width: auto; min-width: 120px; }

/* Referrals */
.cab .referral-code-display { margin: 10px 0 14px; }
.cab .referral-code-value { display: inline-block; font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: .08em; color: #fff; padding: 8px 18px; border-radius: 12px; background: #0a0e1a; border: 1px dashed #2a3352; }
.cab .referral-reward-rate { font-size: 14px; color: var(--ctxt-dim); margin-bottom: 8px; }
.cab .referral-share-link { margin-top: 12px; }
.cab .referral-user-label { font-family: 'Sora', sans-serif; font-weight: 700; color: #e7ecfa; }

/* Balance / ledger */
.cab .ledger-amount { font-weight: 700; }
.cab .payout-address, .cab .ledger-ref { font-family: 'Sora', sans-serif; font-size: 12.5px; color: #aab6d8; word-break: break-all; }

/* Downloads */
.cab .download-license { padding: 0; overflow: hidden; }
.cab .download-license-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--cline-soft); }
.cab .download-plan { font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 700; color: #fff; }
.cab .download-meta { margin-left: auto; font-size: 12.5px; color: var(--ctxt-mute); }
.cab .download-os { padding: 20px 24px; border-bottom: 1px solid var(--cline-soft); }
.cab .download-os:last-child { border-bottom: none; }
.cab .download-os-title { font-size: 15px; font-weight: 700; color: #dfe6ff; margin-bottom: 14px; }
.cab .download-option { margin-bottom: 16px; }
.cab .download-option:last-child { margin-bottom: 0; }
.cab .download-option-primary { padding: 16px; border-radius: 12px; background: #0a0e1a; border: 1px solid var(--cline); }
.cab .download-option-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cab .download-subhead { font-size: 14px; font-weight: 700; color: #e7ecfa; }
.cab .download-help { font-size: 13px; color: var(--ctxt-mute); margin-bottom: 10px; }
.cab .download-recommended { margin-left: auto; }
.cab .download-archives { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cab .install-oneliner { background: #06080f; border: 1px solid var(--cline); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 0; }
.cab .install-oneliner code { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 12.5px; color: #cdd6ef; white-space: pre; }

/* Support — channel chooser + web chat */
.cab .support-intro { color: var(--ctxt-mute); font-size: 14px; max-width: 720px; margin-bottom: 18px; }
.cab .support-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cab .support-channel { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 16px; border: 1px solid var(--cline); background: linear-gradient(180deg, #0b0f1c, #090c16); }
.cab .support-channel-recommended { border-color: rgba(91,120,255,.35); }
.cab .support-channel-badge { position: absolute; top: 14px; right: 14px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #8fb4ff; padding: 3px 9px; border-radius: 20px; background: rgba(91,120,255,.12); border: 1px solid rgba(91,120,255,.35); }
.cab .support-channel-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: rgba(120,130,255,.05); border: 1px solid var(--cline); color: var(--cblue-hi); margin-bottom: 6px; }
.cab .support-channel-name { font-size: 16px; font-weight: 700; color: #fff; }
.cab .support-channel-desc { font-size: 13px; color: var(--ctxt-mute); flex: 1; }
.cab .support-channel-note { font-size: 12px; color: var(--ctxt-faint); }
.cab .support-channel-connected { color: #5ee79b; }
.cab .support-channel .btn { margin-top: 10px; }
.cab .support-back { background: none; border: 0; color: var(--cblue-hi); cursor: pointer; font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 14px; }
.cab .support-back:hover { color: #9fbcff; }
.cab .support-chat-card { border: 1px solid var(--cline); border-radius: 16px; background: linear-gradient(180deg, #0b0f1c, #090c16); overflow: hidden; }
.cab .support-thread { display: flex; flex-direction: column; gap: 12px; padding: 20px; max-height: 460px; overflow-y: auto; }
.cab .support-msg { display: flex; }
.cab .support-msg-user { justify-content: flex-end; }
.cab .support-msg-staff { justify-content: flex-start; }
.cab .support-bubble { max-width: 72%; padding: 11px 14px; border-radius: 14px; background: #0f1526; border: 1px solid var(--cline); }
.cab .support-msg-user .support-bubble { background: linear-gradient(180deg, #274093, #1c2f6b); border-color: rgba(91,120,255,.4); }
.cab .support-msg-sender { font-size: 11px; font-weight: 800; color: var(--ctxt-mute); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.cab .support-msg-body { font-size: 13.5px; color: #e7ecfa; white-space: pre-wrap; word-break: break-word; }
.cab .support-msg-time { font-size: 10.5px; color: var(--ctxt-faint); margin-top: 5px; }
.cab .support-empty { text-align: center; color: var(--ctxt-mute); padding: 30px; font-size: 14px; }
.cab .support-compose { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--cline-soft); }
.cab .support-compose-body { resize: vertical; min-height: 70px; }
.cab .support-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cab .support-compose-hint { font-size: 12px; color: var(--ctxt-mute); }

/* Order detail — definition card, payment instructions, refund states */
.cab .detail-card { border-radius: 16px; border: 1px solid var(--cline); background: linear-gradient(180deg, #0b0f1c, #090c16); padding: 22px 24px; margin-bottom: 20px; }
.cab .payment-instructions h2, .cab .refund-section h2 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.cab .apply-balance-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cline-soft); }
.cab .apply-balance-section h3 { font-size: 14px; font-weight: 700; color: #e7ecfa; margin-bottom: 10px; }
.cab .instructions-text { white-space: pre-wrap; word-break: break-word; font-size: 13px; color: var(--ctxt-dim); background: #06080f; border: 1px solid var(--cline); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.cab .ref-code { font-family: 'Sora', sans-serif; letter-spacing: .03em; color: #cdd6ef; }
.cab .refund-done { color: #5ee79b; font-size: 13.5px; }
.cab .refund-pending { color: #fcd34d; font-size: 13.5px; }
.cab .refund-section .hint, .cab .hint { color: var(--ctxt-mute); font-size: 13px; margin-bottom: 12px; }
.cab .refund-section label { display: block; font-size: 12px; font-weight: 700; color: var(--ctxt-dim); margin-bottom: 12px; }
.cab .refund-section label input { margin-top: 6px; }
.cab .btn-link { background: none; border: 0; padding: 0; height: auto; color: var(--cblue-hi); font-weight: 600; }
.cab .btn-link:hover { color: #9fbcff; }
.cab .seats-cell { font-variant-numeric: tabular-nums; }
.cab .seats-used { color: #e7ecfa; font-weight: 700; }
.cab .seats-total { color: var(--ctxt-mute); }
.cab .seats-sep { color: var(--ctxt-faint); margin: 0 2px; }

/* Promo entry */
.cab .promo-intro { color: var(--ctxt-mute); font-size: 14px; max-width: 620px; margin-bottom: 18px; }
.cab .promo-form { display: flex; gap: 10px; max-width: 520px; flex-wrap: wrap; }
.cab .promo-form input[type=text] { flex: 1; min-width: 220px; }
.cab .promo-hint { font-size: 13px; color: var(--ctxt-mute); margin-top: 12px; }
.cab .promo-saved { max-width: 560px; padding: 20px 22px; border-radius: 14px; border: 1px solid rgba(46,200,120,.32); background: rgba(46,200,120,.06); }
.cab .promo-saved p { color: #e7ecfa; margin-bottom: 14px; }
.cab .promo-saved-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cab .form-error { color: #ff8ba0; font-size: 13.5px; padding: 10px 14px; border-radius: 10px; background: rgba(224,52,79,.1); border: 1px solid rgba(224,52,79,.3); margin-bottom: 14px; max-width: 520px; }

@media (max-width: 700px) {
  .cab .support-channels { grid-template-columns: 1fr; }
  .cab .support-bubble { max-width: 86%; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   FLEX-GAP FALLBACK — pre-84 Chromium (older Vivaldi/Opera) lack flexbox `gap`.
   A tiny <head> probe adds `.no-flexgap` to <html> ONLY when flex `gap` is
   unsupported, so every rule below is dead on modern browsers (their native
   `gap` stands, byte-for-byte). Grid `gap` works since Chromium 57, so grid
   layouts need no fallback. Technique: column flex → margin-top between
   children; row flex → margin-left. Containers using justify-content:
   space-between already self-space and are intentionally omitted.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Column flex: vertical spacing between stacked children ──────────────── */
.no-flexgap .flash-region > * + * { margin-top: var(--space-2); }
.no-flexgap .stat-block > * + * { margin-top: var(--space-1); }
.no-flexgap .plan-card > * + * { margin-top: var(--space-4); }
.no-flexgap .plan-card-header > * + * { margin-top: var(--space-2); }
.no-flexgap .plan-features > * + * { margin-top: var(--space-2); }
.no-flexgap .feature-card > * + * { margin-top: var(--space-3); }
.no-flexgap .pricing-card > * + * { margin-top: var(--space-4); }
.no-flexgap .pricing-features > * + * { margin-top: var(--space-2); }
/* Keep the CTA bottom-aligned even in the flex-gap fallback (the generic rule
   above would otherwise pin it right under the note). */
.no-flexgap .pricing-card > .pricing-cta { margin-top: auto; }
/* The recommended badge is absolutely positioned; don't let the generic sibling
   margin push the plan name (and everything below it) down by one gap. */
.no-flexgap .pricing-card > .pricing-badge-recommended + * { margin-top: 0; }
.no-flexgap .faq-list > * + * { margin-top: var(--space-2); }
.no-flexgap .cta-strip-inner > * + * { margin-top: var(--space-6); }
.no-flexgap .support-channel > * + * { margin-top: var(--space-3); }
.no-flexgap .support-chat-card > * + * { margin-top: var(--space-4); }
.no-flexgap .support-thread > * + * { margin-top: var(--space-3); }
.no-flexgap .support-bubble > * + * { margin-top: 2px; }
.no-flexgap .support-compose > * + * { margin-top: var(--space-3); }
.no-flexgap .stat-card > * + * { margin-top: var(--space-1); }
.no-flexgap .day-bars > * + * { margin-top: var(--space-2); }
.no-flexgap .analytics-range label > * + * { margin-top: var(--space-1); }
.no-flexgap .upgrade-form label > * + *,
.no-flexgap .filter-bar label > * + * { margin-top: var(--space-1); }
.no-flexgap .support-ticket-thread > * + *,
.no-flexgap .message-list > * + * { margin-top: var(--space-3); }
.no-flexgap .docs-pager-link > * + * { margin-top: 0.2rem; }

/* ── Row flex: horizontal spacing between children ──────────────────────── */
.no-flexgap .header-inner > * + * { margin-left: var(--space-4); }
.no-flexgap .site-nav > * + * { margin-left: var(--space-1); }
.no-flexgap .footer-inner > * + * { margin-left: var(--space-4); }
.no-flexgap .locale-switcher > * + * { margin-left: var(--space-1); }
.no-flexgap .landing-nav > * + * { margin-left: var(--space-1); }
.no-flexgap .landing-header-actions > * + * { margin-left: var(--space-3); }
.no-flexgap .hero-ctas > * + * { margin-left: var(--space-4); }
.no-flexgap .pricing-price > * + * { margin-left: 0.25rem; }
.no-flexgap .footer-links > * + * { margin-left: var(--space-3); }
.no-flexgap .hero-tech > * + * { margin-left: 0.6rem; }
.no-flexgap .fp-dots > * + * { margin-left: 0.35rem; }
.no-flexgap .download-option-head > * + * { margin-left: var(--space-3); }
.no-flexgap .download-archives > * + * { margin-left: var(--space-2); }
.no-flexgap .device-actions > * + * { margin-left: var(--space-2); }
.no-flexgap .device-actions form > * + * { margin-left: var(--space-2); }
.no-flexgap .license-actions > * + * { margin-left: var(--space-3); }
.no-flexgap .analytics-range > * + * { margin-left: var(--space-4); }
.no-flexgap .home-actions > * + * { margin-left: var(--space-3); }
.no-flexgap .upgrade-form > * + *,
.no-flexgap .filter-bar > * + * { margin-left: var(--space-4); }
.no-flexgap .thread-meta > * + * { margin-left: var(--space-2); }
.no-flexgap .filter-tabs > * + * { margin-left: var(--space-2); }
.no-flexgap .checkbox-label > * + * { margin-left: var(--space-2); }
.no-flexgap .pay-option > * + * { margin-left: var(--space-2); }
.no-flexgap .docs-toc ul > * + * { margin-left: var(--space-6); }
.no-flexgap .docs-callout > * + * { margin-left: var(--space-3); }
.no-flexgap .docs-endpoint-head > * + * { margin-left: var(--space-3); }

/* Inline-flex text pairs whose gap sits between an ::before / icon and text */
.no-flexgap .brand::before { margin-right: 0.5rem; }
.no-flexgap .btn > * + * { margin-left: var(--space-2); }

/* Containers that switch to a column at a breakpoint — swap the margin axis */
@media (max-width: 640px) {
  .no-flexgap .hero-ctas > * + * { margin-left: 0; margin-top: var(--space-4); }
  .no-flexgap .footer-inner > * + * { margin-left: 0; margin-top: var(--space-2); }
}


/* ══ Changelog / release timeline ═══════════════════════════════════════════ */
.changelog-section{padding:clamp(2.5rem,6vw,4.5rem) 0 5rem}
.changelog-section .container{max-width:840px}
.changelog-heading{
  font-size:clamp(1.9rem,4.5vw,2.75rem);font-weight:800;letter-spacing:-.025em;line-height:1.1;
  margin:0 0 .6rem;color:var(--text);
}
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  .changelog-heading{
    background:var(--accent-grad);-webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;color:transparent;
  }
}
.changelog-intro{color:var(--text-muted);font-size:1.05rem;line-height:1.6;max-width:58ch;margin:0 0 2.75rem}

.changelog-timeline{list-style:none;margin:0;padding:0;position:relative}
.changelog-timeline::before{
  content:"";position:absolute;left:9px;top:8px;bottom:8px;width:2px;
  background:linear-gradient(180deg,rgba(45,212,191,.55),rgba(99,102,241,.35) 30%,var(--border) 100%);
}
.changelog-release{position:relative;padding:0 0 2.25rem 2.5rem}
.changelog-release:last-child{padding-bottom:.25rem}
.changelog-release::before{
  content:"";position:absolute;left:2px;top:6px;width:16px;height:16px;border-radius:50%;
  background:var(--bg);border:2px solid var(--accent-teal);box-shadow:0 0 0 4px rgba(45,212,191,.12);
}
.changelog-release:first-child::before{
  background:var(--accent-grad);border-color:transparent;
  box-shadow:0 0 0 4px rgba(45,212,191,.20),0 0 14px rgba(45,212,191,.45);
}
.changelog-version{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem;margin:0 0 .85rem;line-height:1.25}
.cl-ver{
  display:inline-flex;align-items:center;flex:none;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.8rem;font-weight:700;letter-spacing:.02em;padding:.22rem .6rem;border-radius:2rem;
  color:var(--accent-teal);background:rgba(99,102,241,.12);border:1px solid rgba(45,212,191,.28);
}
.changelog-release:first-child .cl-ver{color:#0b0e14;background:var(--accent-grad);border-color:transparent}
.cl-title{font-size:1.2rem;font-weight:700;letter-spacing:-.01em;color:var(--text)}
.changelog-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7rem}
.changelog-item{position:relative;padding-left:1.4rem;color:var(--text-muted);font-size:.975rem;line-height:1.65}
.changelog-item::before{
  content:"";position:absolute;left:.05rem;top:.62rem;width:6px;height:6px;border-radius:50%;
  background:var(--accent-teal);opacity:.8;
}
@media (max-width:640px){.changelog-release{padding-left:2rem}.cl-title{font-size:1.08rem}}
.no-flexgap .changelog-version>*+*{margin-left:.6rem}
.no-flexgap .changelog-items>*+*{margin-top:.7rem}

/* ══ Contacts page (/contacts) ═══════════════════════════════════════════════ */
.contacts-section { padding: clamp(2.5rem,6vw,4.5rem) 0 5rem; }
.contacts-inner { max-width: 640px; text-align: center; }
.contacts-heading { font-size: clamp(1.9rem,4.5vw,2.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .6rem; }
.contacts-intro { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; max-width: 52ch; margin: 0 auto 2.5rem; }
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-8) var(--space-6);
  max-width: 420px;
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
}
.contact-card-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-grad); color: #0b0e14;
}
.contact-card-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.contact-card-desc { color: var(--text-muted); margin: 0 0 var(--space-2); }
.contact-card .btn { min-width: 200px; }
.no-flexgap .contact-card > * + * { margin-top: var(--space-3); }

/* ══ Legal documents (/terms, /privacy) ══════════════════════════════════════ */
.legal-section { padding: clamp(2.5rem,6vw,4.5rem) 0 5rem; }
.legal-container { max-width: 52rem; }
.legal-heading { font-size: clamp(1.9rem,4.5vw,2.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .6rem; }
.legal-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.legal-intro { margin-bottom: 1rem; line-height: 1.7; }
.legal-fallback-notice,
.legal-unavailable {
  border-left: 3px solid var(--accent-teal);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  color: var(--text-muted);
}
.legal-toc { margin: 2rem 0 2.5rem; }
.legal-toc ol { padding-left: 1.25rem; line-height: 1.9; }
.legal-clause { margin-bottom: 2rem; scroll-margin-top: 5rem; }
.legal-clause-heading { font-size: 1.15rem; margin-bottom: 0.75rem; color: var(--text); }
.legal-clause p { line-height: 1.7; margin-bottom: 0.75rem; }
.legal-list { padding-left: 1.25rem; line-height: 1.7; margin-bottom: 0.75rem; }
.legal-list li { margin-bottom: 0.35rem; }
.legal-print { margin-top: 3rem; }

/* Print: drop the site chrome so a clause list prints as a clean document. */
@media print {
  .site-header, .site-footer, .legal-print, .locale-switch { display: none; }
  .legal-section { padding: 0; }
  .legal-container { max-width: none; }
  .legal-clause { page-break-inside: avoid; }
  a[href^="/"]::after { content: ""; }
}

/* Admin editor rows (/admin/legal) */
.legal-section-row {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 0.5rem;
  align-items: start;
  margin-bottom: 0.75rem;
}
.legal-section-row .legal-body { grid-column: 1 / -1; font-family: inherit; }
