/* ============================================================
   Tamil Streams Ads — application UI
   Neutral, professional design system (light + dark)
   ============================================================ */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #f0f1f4;
  --text: #17191c;
  --text-muted: #626772;
  --text-subtle: #9298a2;
  --border: #e6e8ec;
  --border-strong: #d5d8dd;

  --accent: #4f46e5;
  --accent-2: #6366f1;
  --accent-hover: #4338ca;
  --accent-fg: #ffffff;
  --accent-soft: rgba(79, 70, 229, .10);
  --accent-ring: rgba(79, 70, 229, .18);

  --ok: #157347;
  --ok-soft: rgba(21, 115, 71, .10);
  --err: #c02626;
  --err-soft: rgba(192, 38, 38, .10);
  --warn: #b45309;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;

  /* legacy aliases (kept so older rules/inline styles resolve) */
  --card: var(--surface);
  --card-2: var(--surface-2);
  --line: var(--border);
  --line-soft: var(--border);
  --muted: var(--text-muted);
  --accent-ink: var(--accent-fg);
  --glass: rgba(255, 255, 255, .85);

  --sb-w: 240px;
  --sb-w-mini: 64px;
}

:root[data-theme="dark"] {
  --bg: #0c0e12;
  --surface: #15171c;
  --surface-2: #1a1d23;
  --surface-3: #21242c;
  --text: #e7e9ec;
  --text-muted: #969ba5;
  --text-subtle: #6b7079;
  --border: #282b33;
  --border-strong: #363a44;

  --accent-soft: rgba(99, 102, 241, .16);
  --accent-ring: rgba(99, 102, 241, .30);

  --ok: #3ec07a;
  --ok-soft: rgba(62, 192, 122, .14);
  --err: #f26a6a;
  --err-soft: rgba(242, 106, 106, .14);
  --warn: #e0a44a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 1px 3px rgba(0, 0, 0, .5), 0 10px 28px rgba(0, 0, 0, .45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, .55);

  --glass: rgba(21, 23, 28, .85);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 4px; }
.sub, .card-sub { color: var(--text-muted); font-size: 13px; }
.hint { color: var(--text-subtle); font-size: 12px; margin-top: 6px; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }

.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ---------- Brand ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo .dot {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--accent);
  flex-shrink: 0;
}
.logo-text { font-size: 14.5px; letter-spacing: -.01em; white-space: nowrap; }

/* ---------- Buttons ---------- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
button:hover, .btn:hover { filter: brightness(.93); text-decoration: none; }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
button:disabled { opacity: .55; cursor: not-allowed; }

button.ghost, .btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
button.ghost:hover, .btn.ghost:hover { background: var(--surface-2); filter: none; }
.icon-btn:hover, .theme-toggle:hover, .profile-btn:hover, .hmenu a:hover, .hmenu button:hover, .subnav-link:hover, .sidebar nav a:hover { filter: none; }

button.danger, .btn.danger { background: var(--err); }
button.danger:hover, .btn.danger:hover { background: var(--err); filter: brightness(.92); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { height: auto; padding: 9px 11px; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
input:disabled, select:disabled { background: var(--surface-3); color: var(--text-muted); cursor: not-allowed; }
input[type="color"] { padding: 3px; height: 38px; width: 46px; cursor: pointer; }
input[type="checkbox"] { width: auto; height: auto; accent-color: var(--accent); }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.row .cc { flex: 0 0 auto; width: 46px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.formlinks { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.otp-input { letter-spacing: 6px; text-align: center; font-size: 18px; font-weight: 600; }

.pw-show { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-muted); font-weight: 400; cursor: pointer; }

.fixed-prefix { display: flex; }
.fixed-prefix .pfx {
  display: inline-flex; align-items: center;
  padding: 0 11px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-right: 0;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  white-space: nowrap;
}
.fixed-prefix input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ---------- Flash ---------- */
.flash {
  padding: 10px 13px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.flash-error { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.flash-success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.flash-info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ============================================================
   Auth pages
   ============================================================ */
body.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(60% 50% at 50% 0%, var(--surface-2), transparent 70%),
    var(--bg);
}
.auth-wrap { width: 100%; display: flex; justify-content: center; }
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 30px;
  box-shadow: var(--shadow);
}
.auth-card.wide { max-width: 680px; }
.auth-card .auth-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.auth-card h1 { font-size: 19px; margin-top: 4px; }
.auth-card .sub { margin-bottom: 20px; }
.auth-card form button { width: 100%; margin-top: 20px; }
.auth-card .form-grid button { margin-top: 20px; }

/* ============================================================
   App shell: sidebar + header + footer
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sb-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width .16s ease, transform .2s ease;
}
.sidebar .side-brand { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sidebar nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidebar .nav-label {
  padding: 14px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-subtle);
  white-space: nowrap;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.sidebar nav a .icon { color: var(--text-subtle); }
.sidebar nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.sidebar nav a:hover .icon { color: var(--text-muted); }
.sidebar nav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.sidebar nav a.active .icon { color: var(--accent-text); }
.sidebar .side-foot { padding: 12px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-subtle); white-space: nowrap; }
.sidebar .lbl, .sidebar .logo-text, .sidebar .nav-label { transition: opacity .1s ease; }

/* Collapsed rail — expands on hover as an overlay */
:root[data-sidebar="collapsed"] .sidebar { width: var(--sb-w-mini); }
:root[data-sidebar="collapsed"] .sidebar:not(:hover) .lbl,
:root[data-sidebar="collapsed"] .sidebar:not(:hover) .logo-text,
:root[data-sidebar="collapsed"] .sidebar:not(:hover) .nav-label,
:root[data-sidebar="collapsed"] .sidebar:not(:hover) .side-foot { opacity: 0; pointer-events: none; }
:root[data-sidebar="collapsed"] .sidebar:not(:hover) nav a { justify-content: center; }
:root[data-sidebar="collapsed"] .sidebar:hover { width: var(--sb-w); box-shadow: var(--shadow-lg); z-index: 60; }

.app-body {
  margin-left: var(--sb-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .16s ease;
}
:root[data-sidebar="collapsed"] .app-body { margin-left: var(--sb-w-mini); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  padding: 0 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.app-header .h-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-header .page-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.app-header .h-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* Header dropdowns */
.hwrap { position: relative; }
.profile-btn {
  height: 34px;
  width: auto;
  padding: 0 8px 0 4px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px; font-weight: 500;
}
.profile-btn:hover { background: var(--surface-2); }
.profile-btn .icon { color: var(--text-subtle); }
.avatar {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 11px; font-weight: 700;
}
.badge-dot {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
}
.hmenu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 232px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 5px;
  display: none;
  z-index: 80;
}
.hmenu.open { display: block; }
.hmenu-head { padding: 9px 11px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.hmenu-head small { display: block; font-weight: 400; color: var(--text-muted); margin-top: 2px; }
.hmenu a, .hmenu button.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: auto;
  padding: 8px 11px;
  border: 0; border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  font-size: 13.5px; font-weight: 500; text-align: left;
}
.hmenu a .icon, .hmenu button.menu-item .icon { color: var(--text-subtle); }
.hmenu a:hover, .hmenu button.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.hmenu-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 12px; text-align: center; color: var(--text-muted); font-size: 13px; }
.hmenu-empty .icon { color: var(--text-subtle); }

/* Theme toggle */
.theme-toggle {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-muted);
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle .i-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .i-dark { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .i-light { display: none; }

.app-content { flex: 1; width: 100%; max-width: 1280px; padding: 28px 24px 48px; }
.app-content > h1 { margin-bottom: 2px; }
.app-content > .sub { margin-bottom: 24px; }

.app-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-subtle);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Settings sub-navigation */
.subnav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin: 4px 0 24px;
}
.subnav-link {
  padding: 9px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.subnav-link:hover { color: var(--text); text-decoration: none; }
.subnav-link.active { color: var(--accent-text); border-bottom-color: var(--accent); font-weight: 600; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 18px;
  max-width: 560px;
  box-shadow: var(--shadow-sm);
}
.card > h2 { margin: 0 0 3px; }
.card .card-sub { margin: 0 0 18px; }
.card form button { margin-top: 20px; }
.card .inline-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.card .inline-actions button { margin-top: 0; }
.card hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; color: var(--text); }

.swatch-preview {
  margin-top: 18px;
  height: 40px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 13px;
}

/* Empty state */
.empty-state {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 52px 24px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.empty-state .icon { color: var(--text-subtle); margin-bottom: 10px; }
.empty-state p { margin: 4px 0; }
.empty-state p:first-of-type { color: var(--text); font-weight: 600; font-size: 14px; }

.app-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 35; }

@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  :root[data-sidebar="collapsed"] .sidebar { width: var(--sb-w); }
  .app-body, :root[data-sidebar="collapsed"] .app-body { margin-left: 0; }
  body.sb-mobile-open .sidebar { transform: none; }
  body.sb-mobile-open .app-backdrop { display: block; }
  .app-content { padding: 20px 16px 40px; }
  .app-header { padding: 0 14px; }
  .profile-btn .pname { display: none; }
}

/* ============================================================
   Landing / showcase
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 28px;
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header nav { display: flex; align-items: center; gap: 8px; }
.site-header nav a.navlink {
  padding: 7px 11px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
}
.site-header nav a.navlink:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

.hero { text-align: center; padding: 88px 0 64px; }
.hero .eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
}
.hero h1 { font-size: clamp(30px, 5vw, 50px); line-height: 1.08; margin: 20px auto 14px; max-width: 15ch; letter-spacing: -.03em; }
.hero p.lead { font-size: 17px; color: var(--text-muted); max-width: 54ch; margin: 0 auto 28px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .cta-row .btn { height: 42px; padding: 0 22px; font-size: 14px; }

.mock {
  margin: 56px auto 0;
  max-width: 900px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}
.mock .bar { display: flex; gap: 6px; padding: 6px 8px 12px; }
.mock .bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock .screen {
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface-2);
  height: 300px;
  display: grid;
  place-items: center;
  color: var(--text-subtle);
  font-size: 13.5px;
}

section.features { padding: 64px 0; }
section.features h2 { text-align: center; font-size: 27px; letter-spacing: -.02em; margin: 0 0 8px; }
section.features .section-sub { text-align: center; color: var(--text-muted); margin: 0 0 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.feature .ficon {
  width: 38px; height: 38px; border-radius: var(--r);
  display: grid; place-items: center;
  font-size: 18px;
  background: var(--accent-soft);
  color: var(--accent-text);
  margin-bottom: 13px;
}
.feature h3 { margin: 0 0 5px; font-size: 15.5px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 13.5px; }

.cta-band { text-align: center; padding: 64px 0; }
.cta-band .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 44px 28px;
  box-shadow: var(--shadow-sm);
}
.cta-band h2 { font-size: 24px; margin: 0 0 10px; letter-spacing: -.02em; }
.cta-band p { color: var(--text-muted); margin: 0 0 22px; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 28px;
  color: var(--text-subtle);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 560px) {
  .site-header { padding: 11px 16px; }
  .site-header nav a.navlink { display: none; }
  .container { padding: 0 16px; }
}

/* ---- Data tables / chips (admin + portal lists) ---- */
.card.wide { max-width: none; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--surface-2); text-transform: uppercase; letter-spacing: .03em; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .muted { color: var(--text-subtle); font-size: 12.5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.chip .icon { width: 13px; height: 13px; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .sub { margin: 4px 0 0; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .row3 { grid-template-columns: 1fr; } }

/* ---- Stat tiles (wallet / dashboards) ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.stat-value { font-size: 28px; font-weight: 650; letter-spacing: -.02em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-foot { font-size: 12px; color: var(--text-subtle); margin-top: 6px; }
.stat.topup .fixed-prefix { margin-top: 10px; }
.topup-form button[type="submit"] { width: 100%; margin-top: 10px; }
.quick-amounts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick-amounts .btn { margin: 0; }
.section-title { font-size: 15px; margin: 26px 0 12px; }
table.data td.pos { color: var(--ok); }
table.data td.neg { color: var(--text); }
.search-form input { width: 280px; max-width: 100%; }

/* ============================================================
   Phase 3 — campaigns
   ============================================================ */
:root { --warn-soft: rgba(180, 83, 9, .10); }
:root[data-theme="dark"] { --warn-soft: rgba(224, 164, 74, .14); }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(21,115,71,.45); } 70% { box-shadow: 0 0 0 6px rgba(21,115,71,0); } 100% { box-shadow: 0 0 0 0 rgba(21,115,71,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

.btn .icon, button .icon { margin-right: 2px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-row > * { margin: 0 !important; }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.num { font-variant-numeric: tabular-nums; }

/* Tabs used as filters on list pages */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; font-size: 13.5px; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs .count { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-muted); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.tabs a.active .count { background: var(--accent-soft); color: var(--accent-text); }
.nav-count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
:root[data-sidebar="collapsed"] .sidebar:not(:hover) .nav-count { display: none; }

/* Progress bar */
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; min-width: 90px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 5px; gap: 10px; }

/* Wizard */
.wizard { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .wizard { grid-template-columns: minmax(0, 1fr); } }
.stepper { display: flex; align-items: center; gap: 0; margin: 4px 0 22px; counter-reset: step; overflow-x: auto; }
.stepper a, .stepper span.step { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; color: var(--text-subtle); white-space: nowrap; }
.stepper a:hover { text-decoration: none; color: var(--text); }
.stepper .n { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: var(--surface); }
.stepper .done { color: var(--text-muted); }
.stepper .done .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper .current { color: var(--text); }
.stepper .current .n { border-color: var(--accent); color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.stepper .sep { flex: 1 1 24px; min-width: 18px; height: 1.5px; background: var(--border); margin: 0 12px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.panel-body { padding: 24px; }
.panel-head { padding: 18px 24px; border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; }
.panel-head p { margin: 3px 0 0; color: var(--text-muted); font-size: 13px; }
.panel-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.panel-foot button, .panel-foot .btn { margin: 0; }
.panel + .panel { margin-top: 18px; }

/* Placement picker */
.app-group { margin-bottom: 22px; }
.app-group:last-child { margin-bottom: 0; }
.app-group-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.pick { position: relative; display: block; margin: 0; cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-card { height: 100%; border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 14px; background: var(--surface); transition: border-color .12s, box-shadow .12s; display: flex; flex-direction: column; gap: 10px; }
.pick:hover .pick-card { border-color: var(--border-strong); }
.pick input:checked + .pick-card { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.pick input:focus-visible + .pick-card { box-shadow: 0 0 0 3px var(--accent-ring); }
.pick-thumb { height: 92px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pick-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.pick-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; flex: 1; }
.pick-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-subtle); border-top: 1px dashed var(--border); padding-top: 9px; }
.pick-meta b { color: var(--text); font-weight: 600; }
.pick.disabled { cursor: not-allowed; opacity: .55; }

/* Mini schematic thumbnails for placement cards */
.sch { position: relative; background: var(--surface); border: 1.5px solid var(--border-strong); }
.sch-phone { width: 46px; height: 80px; border-radius: 8px; }
.sch-tv { width: 120px; height: 68px; border-radius: 4px; }
.sch i { position: absolute; background: var(--surface-3); border-radius: 2px; }
.sch b { position: absolute; background: var(--accent); opacity: .85; border-radius: 2px; }

/* Summary sidebar */
.summary { position: sticky; top: 76px; }
.summary .panel-body { padding: 20px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 7px 0; }
.sum-row span:first-child { color: var(--text-muted); }
.sum-row span:last-child { text-align: right; font-weight: 500; }
.sum-total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; display: flex; justify-content: space-between; align-items: baseline; }
.sum-total b { font-size: 22px; letter-spacing: -.02em; }
.sum-preview { margin: -4px 0 14px; display: flex; justify-content: center; }
.sum-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; margin-top: 14px; }
.sum-note .icon { margin-top: 1px; color: var(--text-subtle); }

/* Budget / estimate */
.est-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-top: 18px; }
.est-grid > div { background: var(--surface); padding: 14px 16px; }
.est-grid .k { font-size: 12px; color: var(--text-muted); }
.est-grid .v { font-size: 20px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .est-grid { grid-template-columns: 1fr; } }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); font-size: 13px; margin-top: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.callout.err { background: var(--err-soft); border-color: transparent; color: var(--err); }
.callout.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.callout.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.callout .icon { margin-top: 1px; }
.avail { margin-top: 18px; }
.avail-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(8px, 1fr); gap: 3px; height: 34px; align-items: end; }
.avail-strip span { border-radius: 3px 3px 0 0; background: var(--accent); opacity: .85; min-height: 3px; position: relative; }
.avail-strip span.full { background: var(--err); opacity: .6; }
.avail-strip span.sel { outline: 2px solid var(--text); outline-offset: 1px; }
.avail-legend { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-subtle); margin-top: 6px; }
.budget-input { display: flex; align-items: stretch; }
.budget-input .pfx { display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--surface-2); color: var(--text-muted); font-weight: 600; }
.budget-input input { border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 18px; font-weight: 600; height: 46px; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* Dropzone + creative list */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); padding: 28px 18px; background: var(--surface-2); cursor: pointer; transition: border-color .12s, background .12s; margin: 0; font-weight: 400; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .icon { color: var(--accent-text); }
.dropzone strong { font-size: 14px; }
.dropzone small { color: var(--text-muted); font-size: 12.5px; }
.dropzone input { display: none; }
.dropzone .pick-name { font-size: 12.5px; color: var(--text); font-weight: 500; }
.creatives { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.creative { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.creative-media { aspect-ratio: 16 / 9; background: var(--surface-3) repeating-conic-gradient(var(--surface-2) 0 25%, transparent 0 50%) 0 0 / 16px 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.creative-media img, .creative-media video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.creative-body { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }
.creative-body b { color: var(--text); font-weight: 500; display: block; font-size: 12.5px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn.icon-danger:hover { color: var(--err); background: var(--err-soft); }
.spec-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 18px; }
.spec-list div { border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; background: var(--surface-2); }
.spec-list dt { font-size: 11.5px; color: var(--text-muted); }
.spec-list dd { margin: 2px 0 0; font-weight: 600; font-size: 13.5px; }

/* Campaign detail */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 24px; }
.kv-grid dt { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.kv-grid dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 13px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 2px; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline b { font-weight: 600; }
.timeline .when { display: block; font-size: 11.5px; color: var(--text-subtle); }
.timeline .note { display: block; color: var(--text-muted); margin-top: 2px; }
.preview-strip { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; justify-content: center; padding: 22px; background: var(--surface-2); border-radius: var(--r-lg); border: 1px solid var(--border); }
.table-link { color: var(--text); font-weight: 600; }
.table-link:hover { color: var(--accent-text); }
dialog.modal { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 0; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10, 12, 16, .45); }
dialog.modal form { margin: 0; }
dialog.modal textarea { min-height: 96px; }

/* ---------- Device previews ---------- */
.pv { margin: 0; display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.pv figcaption { font-size: 11.5px; color: var(--text-subtle); text-align: center; max-width: 260px; }
.pv-phone { width: 210px; aspect-ratio: 9 / 19; border-radius: 30px; background: #0d0f13; padding: 8px; box-shadow: var(--shadow); position: relative; }
.pv-notch { position: absolute; top: 12px; left: 50%; width: 58px; height: 15px; border-radius: 10px; background: #0d0f13; transform: translateX(-50%); z-index: 3; }
.pv-phone .pv-screen { width: 100%; height: 100%; border-radius: 23px; background: #12141a; overflow: hidden; position: relative; display: flex; flex-direction: column; gap: 7px; padding: 30px 9px 9px; }
.pv-apphead { display: flex; align-items: center; gap: 6px; color: #e9ebef; font-size: 9.5px; }
.pv-dot { width: 13px; height: 13px; border-radius: 4px; background: var(--accent); flex-shrink: 0; }
.pv-dot.sm { width: 11px; height: 11px; border-radius: 50%; }
.pv-hero { height: 70px; border-radius: 8px; background: linear-gradient(135deg, #2a2f3a, #1d2029); flex-shrink: 0; }
.pv-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; flex-shrink: 0; }
.pv-thumb { aspect-ratio: 16 / 10; border-radius: 5px; background: #23262f; }
.pv-slot { position: relative; overflow: hidden; background: #1b1e26; flex-shrink: 0; }
.pv-slot img, .pv-slot video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-banner { aspect-ratio: 6 / 1; border-radius: 4px; outline: 1.5px solid var(--accent); outline-offset: 1px; }
.pv-169 { aspect-ratio: 16 / 9; border-radius: 6px; }
.pv-native { background: #1b1e26; border-radius: 8px; padding: 7px; display: flex; flex-direction: column; gap: 6px; outline: 1.5px solid var(--accent); outline-offset: 1px; flex-shrink: 0; }
.pv-native-h { display: flex; align-items: center; gap: 5px; color: #c9ccd3; font-size: 8.5px; position: relative; }
.pv-native-h .pv-adtag { position: static; margin-left: auto; }
.pv-line { height: 6px; width: 60%; background: #2a2e38; border-radius: 3px; }
.pv-cta { align-self: flex-start; font-size: 8.5px; color: #fff; background: var(--accent); padding: 3px 8px; border-radius: 4px; display: inline-flex; gap: 3px; align-items: center; }
.pv-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 34px 12px 18px; z-index: 2; }
.pv-fullm { width: 100%; aspect-ratio: 9 / 16; border-radius: 8px; max-height: 100%; outline: 1.5px solid var(--accent); outline-offset: 1px; }
.pv-overlay .pv-cta { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); }
.pv-overlay .pv-adtag { top: 36px; left: 16px; }
.pv-close { position: absolute; top: 32px; right: 14px; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.9); color: #111; font-size: 13px; line-height: 18px; text-align: center; z-index: 3; }
.pv-continue { position: absolute; top: 34px; right: 14px; font-size: 8px; color: #fff; background: rgba(0,0,0,.55); padding: 3px 7px; border-radius: 10px; z-index: 3; }
.pv-adtag { position: absolute; top: 4px; left: 4px; font-size: 7.5px; font-weight: 700; background: #f5c518; color: #111; padding: 1px 4px; border-radius: 2px; z-index: 2; letter-spacing: .03em; }
.pv-player { position: relative; margin: 0 -9px; flex-shrink: 0; }
.pv-player .pv-169 { border-radius: 0; outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
.pv-adbadge { position: absolute; left: 6px; bottom: 7px; font-size: 7.5px; color: #fff; background: rgba(0,0,0,.6); padding: 2px 5px; border-radius: 3px; z-index: 2; }
.pv-skip { position: absolute; right: 0; bottom: 7px; font-size: 8px; color: #fff; background: rgba(0,0,0,.7); padding: 3px 7px; border: 1px solid rgba(255,255,255,.35); border-right: 0; z-index: 2; }
.pv-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.25); z-index: 2; }
.pv-progress i { position: absolute; left: 0; top: 0; bottom: 0; background: #e5352b; }
.pv-progress b { position: absolute; top: -1px; width: 3px; height: 4px; background: #f5c518; }
.pv-meta { display: flex; justify-content: space-between; color: #e9ebef; font-size: 9px; }
.pv-meta i { color: #e5352b; font-style: normal; font-weight: 700; }
.pv-ph { width: 100%; height: 100%; min-height: 18px; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #1d2029 0 6px, #22262f 6px 12px); color: #8a909b; }
.pv-ph span { display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; }
.pv-ph b { font-weight: 600; }
.pv-tv-wrap { gap: 0; }
.pv-tv-wrap figcaption { margin-top: 10px; }
.pv-tv { width: 380px; max-width: 100%; aspect-ratio: 16 / 9; background: #0d0f13; border-radius: 8px; padding: 7px; box-shadow: var(--shadow); }
.pv-tv .pv-screen { width: 100%; height: 100%; background: #12141a; border-radius: 3px; overflow: hidden; position: relative; }
.pv-stand { width: 90px; height: 7px; background: #0d0f13; border-radius: 0 0 6px 6px; }
.pv-tv-grid { position: absolute; inset: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.pv-tv-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.pv-tile { aspect-ratio: 16 / 10; background: #23262f; border-radius: 3px; }
.pv-tv-banner { aspect-ratio: 3 / 1; border-radius: 4px; outline: 1.5px solid var(--accent); outline-offset: 1px; }
.pv-tv-player { position: absolute; inset: 0; }
.pv-scene { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 30%, #3a4152, #14161c 70%); }
.pv-tv-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; background: linear-gradient(transparent, rgba(0,0,0,.85)); display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.pv-ch { display: flex; gap: 7px; align-items: center; color: #fff; font-size: 9px; }
.pv-ch b { display: block; font-size: 10px; }
.pv-ch i { font-style: normal; color: #b6bac4; font-size: 8px; }
.pv-chlogo { width: 22px; height: 22px; border-radius: 4px; background: #2d323e; }
.pv-tv-rect { width: 92px; aspect-ratio: 420 / 192; border-radius: 3px; outline: 1.5px solid var(--accent); outline-offset: 1px; }
.pv-full { position: absolute; inset: 0; outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
.pv-qr { position: absolute; right: 10px; bottom: 12px; width: 44px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgba(0,0,0,.55); padding: 4px; border-radius: 4px; z-index: 2; }
.pv-qr svg { width: 36px; height: 36px; display: block; }
.pv-qr i { font-style: normal; font-size: 7px; color: #fff; }
.pv.sm .pv-phone { width: 150px; border-radius: 22px; padding: 6px; }
.pv.sm .pv-phone .pv-screen { border-radius: 17px; }
.pv.sm .pv-tv { width: 280px; }
@media (max-width: 480px) { .pv-tv { width: 300px; } }
button.danger-text, .btn.danger-text { color: var(--err); }
button.danger-text:hover { background: var(--err-soft); }
.cell-campaign { display: flex; align-items: center; gap: 12px; }
.cell-campaign > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.cell-thumb { width: 54px; height: 34px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; color: var(--text-subtle); flex-shrink: 0; }
.cell-thumb img, .cell-thumb video { width: 100%; height: 100%; object-fit: cover; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 760px; margin: 36px auto 0; text-align: left; }
.how-steps > div { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; background: var(--surface-2); }
.how-steps span { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 12px; align-items: center; justify-content: center; margin-bottom: 8px; }
.how-steps b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.how-steps small { color: var(--text-muted); font-size: 12.5px; line-height: 1.45; display: block; }
@media (max-width: 720px) { .how-steps { grid-template-columns: 1fr; } }

/* Responsive fixes: mockups never overflow their panel; tighter spacing on phones */
.pv { max-width: 100%; }
.pv-tv-wrap { width: 380px; max-width: 100%; }
.pv-tv { width: 100%; }
.pv.sm.pv-tv-wrap { width: 280px; }
.summary .pv-tv-wrap { width: 280px; }
.pv-tabbar { margin-top: auto; display: flex; justify-content: space-around; padding: 7px 0 2px; border-top: 1px solid #23262f; flex-shrink: 0; }
.pv-tabbar span { width: 14px; height: 14px; border-radius: 4px; background: #2a2e38; }
.pv-tabbar span:first-child { background: var(--accent); }
@media (max-width: 640px) {
  .panel-body, .panel-head, .panel-foot { padding-left: 16px; padding-right: 16px; }
  .preview-strip { padding: 14px 10px; }
  .page-head .btn-row { width: 100%; }
  .stepper .step:not(.current) { font-size: 0; gap: 0; }
  .stepper a { font-size: 0; gap: 0; }
  .stepper .sep { margin: 0 6px; }
  .summary { position: static; }
}

/* Accent used as TEXT: lifted toward white in dark mode so links/active states stay readable. */
:root { --accent-text: var(--accent); }
:root[data-theme="dark"] { --accent-text: color-mix(in srgb, var(--accent) 58%, #ffffff); }
.section-row { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 12px; }

/* ---- Delivery chart (single series: no legend; table below is the accessible view) ---- */
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .baseline { stroke: var(--border-strong); stroke-width: 1; }
.chart .axis { fill: var(--text-subtle); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--accent); }
.chart .bar.today { fill: var(--accent); opacity: .55; }
.chart .hit { fill: transparent; }
.chart .bar-g { cursor: default; outline: none; }
.chart .bar-g:hover .bar, .chart .bar-g:focus .bar { fill: var(--accent-hover, var(--accent)); filter: brightness(1.12); }
.chart .bar-g:hover .hit, .chart .bar-g:focus .hit { fill: var(--surface-3); opacity: .6; }
.chart .goal { stroke: var(--text-muted); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .goal-label { fill: var(--text-muted); font-size: 11px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: var(--r); padding: 8px 10px; font-size: 12px; color: var(--text); white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); }
.chart-tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.chart-tip span { display: block; color: var(--text-muted); }
.metric-row { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 14px; }
.metric-row div { font-size: 12px; color: var(--text-muted); }
.metric-row b { display: block; font-size: 17px; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---- Notification bell ---- */
.notif-btn { position: relative; }
.notif-count { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--err); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; border: 2px solid var(--surface); box-sizing: content-box; }
.notif-menu { width: 360px; max-width: calc(100vw - 24px); max-height: 440px; overflow-y: auto; }
.notif-item { display: flex !important; gap: 10px; align-items: flex-start; padding: 10px 11px !important; border-radius: var(--r-sm); color: var(--text) !important; white-space: normal !important; }
.notif-item:hover { text-decoration: none; background: var(--surface-2); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread:hover { background: var(--accent-soft); filter: brightness(.98); }
.notif-ic { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-muted); margin-top: 1px; }
.notif-ic.ok { background: var(--ok-soft); color: var(--ok); }
.notif-ic.err { background: var(--err-soft); color: var(--err); }
.notif-ic.warn { background: var(--warn-soft); color: var(--warn); }
.notif-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-txt b { font-size: 13px; font-weight: 600; line-height: 1.35; }
.notif-txt span { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.notif-txt i { font-style: normal; font-size: 11.5px; color: var(--text-subtle); }
.notif-count { top: -3px; right: -5px; }
.notif-ic { background: var(--surface); border: 1px solid var(--border); }
.notif-ic.ok, .notif-ic.err, .notif-ic.warn { background: var(--surface); }

/* ============================================================
   Landing page (public). Hero band is intentionally dark in both
   themes (cinema feel); everything else follows the theme tokens.
   ============================================================ */
body.landing { background: var(--bg); }
.lp-header { position: sticky; top: 0; z-index: 50; }
.lp-hero { background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%), linear-gradient(180deg, #0b0d12 0%, #11131a 100%); color: #f3f4f7; padding: 72px 0 80px; overflow: hidden; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; max-width: 1180px; }
.lp-eyebrow { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.lp-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -.035em; margin: 20px 0 16px; font-weight: 700; color: #fff; }
.lp-lead { font-size: 17px; line-height: 1.6; color: #b9bdc8; margin: 0 0 28px; max-width: 54ch; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-btn { height: 46px; padding: 0 22px; font-size: 14.5px; display: inline-flex; align-items: center; gap: 8px; }
.lp-hero .lp-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.lp-hero .lp-btn-ghost:hover { background: rgba(255,255,255,.08); }
.lp-ticks { list-style: none; padding: 0; margin: 26px 0 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: #b9bdc8; }
.lp-ticks li { display: inline-flex; align-items: center; gap: 6px; }
.lp-ticks .icon { color: #6ee7a8; }
.lp-hero-visual { position: relative; min-height: 380px; }
.lp-hv-tv { position: absolute; left: 0; top: 18px; }
.lp-hv-tv .pv-tv-wrap { width: 440px; }
.lp-hv-tv figcaption, .lp-hv-phone figcaption { display: none; }
.lp-hv-phone { position: absolute; right: 0; top: 70px; }
.lp-hv-phone .pv-phone { width: 190px; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.lp-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin: -36px auto 0; position: relative; z-index: 2; max-width: 1080px; padding: 0; box-shadow: var(--shadow); }
.lp-facts > div { background: var(--surface); padding: 20px 22px; }
.lp-facts b { display: block; font-size: 20px; letter-spacing: -.02em; font-weight: 700; }
.lp-facts span { font-size: 12.5px; color: var(--text-muted); }
.lp-section { padding-top: 84px; max-width: 1180px; }
.lp-section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.lp-section-head h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; margin: 0 0 10px; }
.lp-section-head p { color: var(--text-muted); font-size: 15px; margin: 0; }
.lp-tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 26px; }
.lp-tab { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 500; display: inline-flex; gap: 7px; align-items: center; }
.lp-tab:hover { filter: none; color: var(--text); }
.lp-tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.lp-formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.lp-format { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.lp-format-visual { background: linear-gradient(180deg, var(--surface-2), var(--surface-3)); display: flex; justify-content: center; align-items: center; padding: 22px 16px; min-height: 280px; border-bottom: 1px solid var(--border); }
.lp-format-visual figcaption { display: none; }
.lp-format-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lp-format-body h3 { margin: 0; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lp-format-body p { margin: 0; color: var(--text-muted); font-size: 13.5px; flex: 1; }
.lp-format-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-subtle); border-top: 1px dashed var(--border); padding-top: 10px; }
.lp-format-meta b { color: var(--text); }
.lp-band { max-width: none; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 84px; padding: 72px 0; }
.lp-band .container { max-width: 1180px; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.lp-steps li { position: relative; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg); }
.lp-steps span { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.lp-steps h3 { margin: 0 0 6px; font-size: 15px; }
.lp-steps p { margin: 0; color: var(--text-muted); font-size: 13.5px; }
.lp-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-why > div { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.lp-why-ic { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 14px; }
.lp-why h3 { margin: 0 0 6px; font-size: 15px; }
.lp-why p { margin: 0; color: var(--text-muted); font-size: 13.5px; }
.lp-price td, .lp-price th { white-space: normal; }
.lp-faq { max-width: 780px; }
.lp-faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.lp-faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; color: var(--text-subtle); }
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq details p { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.lp-final { margin-top: 84px; padding: 72px 0; text-align: center; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); color: #fff; }
.lp-final h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.025em; margin: 0 0 10px; color: #fff; }
.lp-final p { color: rgba(255,255,255,.82); margin: 0 0 26px; font-size: 15px; }
.lp-final .lp-btn { background: #fff; color: #111; }
.lp-final .lp-btn:hover { filter: none; background: #f1f1f4; }
.lp-footer { max-width: none; }
.lp-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.lp-footer-links a { color: var(--text-muted); }
@media (max-width: 1000px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-hero-visual { min-height: 320px; max-width: 520px; margin: 0 auto; width: 100%; }
  .lp-steps, .lp-why { grid-template-columns: repeat(2, 1fr); }
  .lp-facts { grid-template-columns: repeat(2, 1fr); margin: -28px 16px 0; }
}
@media (max-width: 600px) {
  .lp-hero { padding: 44px 0 64px; }
  .lp-hv-tv .pv-tv-wrap { width: 300px; }
  .lp-hv-phone { top: 110px; }
  .lp-hv-phone .pv-phone { width: 140px; }
  .lp-hero-visual { min-height: 300px; }
  .lp-steps, .lp-why { grid-template-columns: 1fr; }
  .lp-formats { grid-template-columns: 1fr; }
  .lp-section { padding-top: 60px; }
}
[hidden] { display: none !important; }

/* ---- Policies page ---- */
.policy { max-width: 820px; padding-bottom: 80px; }
.policy-head { padding: 48px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.policy-head h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.03em; margin: 0 0 8px; }
.policy-head p { color: var(--text-muted); margin: 0 0 18px; }
.policy-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.policy-toc a { font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); }
.policy-toc a:hover { color: var(--text); text-decoration: none; border-color: var(--border-strong); }
.policy section { padding-top: 36px; scroll-margin-top: 72px; }
.policy h2 { font-size: 20px; letter-spacing: -.015em; margin: 0 0 12px; }
.policy h3 { font-size: 14.5px; margin: 18px 0 8px; }
.policy p, .policy li { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; }
.policy ul { padding-left: 20px; margin: 0; }
.policy li { margin-bottom: 6px; }
.policy li strong, .policy p strong { color: var(--text); }
.policy-table td, .policy-table th { white-space: normal; }
.dash-2col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-2col .panel + .panel { margin-top: 0; }
.dash-2col table.data th, .dash-2col table.data td { padding-left: 0; }
.dash-2col table.data th { background: transparent; }
.fill-table td:first-child { white-space: normal; }
@media (max-width: 1180px) { .dash-2col { grid-template-columns: minmax(0, 1fr); } }

/* ======================================================================
   DESIGN SYSTEM v2: "cinema" look (dark navy shell + brand gradient).
   This layer overrides the earlier rules; tokens first, then components.
   The brand colours come from Settings › Appearance (--accent / --accent-2).
   ====================================================================== */
:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --surface-3: #eef0f5;
  --text: #0e1220;
  --text-muted: #5a6175;
  --text-subtle: #8a91a5;
  --border: #e3e6ee;
  --border-strong: #cfd4df;
  --r-sm: 8px; --r: 10px; --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 20, 40, .05);
  --shadow: 0 2px 6px rgba(15, 20, 40, .05), 0 12px 32px rgba(15, 20, 40, .07);
  --shadow-lg: 0 20px 50px rgba(15, 20, 40, .14);
  --brand-grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --sb-bg: #0b0f1d;
  --sb-bg-2: #121834;
  --sb-text: #aab1c5;
  --sb-text-strong: #ffffff;
  --sb-border: rgba(255, 255, 255, .07);
  --sb-w: 252px;
  --header-h: 64px;
}
:root[data-theme="dark"] {
  --bg: #090c16;
  --surface: #10141f;
  --surface-2: #151a28;
  --surface-3: #1c2233;
  --text: #eef0f6;
  --text-muted: #9aa1b6;
  --text-subtle: #6b7287;
  --border: #222839;
  --border-strong: #2f3649;
  --sb-bg: #070a13;
  --sb-bg-2: #0d1222;
}

/* ---------- Base type ---------- */
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 14.5px; line-height: 1.55; letter-spacing: -.003em; font-feature-settings: "cv11", "ss01"; }
h1, h2, h3 { color: var(--text); font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.sub, .card-sub { font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.hint { font-size: 12.5px; }
code { font-size: .88em; }
a { color: var(--accent-text); font-weight: 500; }

/* ---------- Brand mark ---------- */
.logo .dot {
  width: 30px; height: 30px; border-radius: 9px; position: relative;
  background: var(--brand-grad);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent);
}
.logo .dot::after {
  content: ""; position: absolute; left: 11px; top: 9px; width: 10px; height: 12px;
  background: #fff; clip-path: polygon(0 0, 100% 50%, 0 100%); border-radius: 1px;
}
.logo-text { font-size: 15.5px; font-weight: 700; letter-spacing: -.02em; }

/* ---------- Buttons ---------- */
button, .btn {
  height: 40px; padding: 0 18px; border-radius: var(--r); font-size: 14px; font-weight: 600; letter-spacing: -.005em;
  background: var(--brand-grad); color: #fff; border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 20, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .12);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
}
button:hover, .btn:hover { filter: brightness(1.07); }
button.ghost, .btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
button.ghost:hover, .btn.ghost:hover { background: var(--surface-2); filter: none; }
button.danger, .btn.danger { background: var(--err); }
.btn-sm, button.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.icon-btn { box-shadow: none; background: transparent; color: var(--text-muted); height: 38px; width: 38px; padding: 0; border-radius: var(--r); }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
button.danger-text, .btn.danger-text { color: var(--err); }

/* ---------- Forms ---------- */
label { font-size: 13.5px; font-weight: 600; margin: 16px 0 7px; color: var(--text); }
input, select, textarea {
  height: 42px; border-radius: var(--r); border: 1px solid var(--border-strong); background-color: var(--surface);
  font-size: 14.5px; padding: 0 13px; color: var(--text); font-family: inherit; transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 10px 13px; min-height: 92px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-subtle); }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--border-strong) 60%, var(--text-subtle)); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.fixed-prefix .pfx, .budget-input .pfx { border-radius: var(--r) 0 0 var(--r); border-color: var(--border-strong); background: var(--surface-2); font-weight: 600; color: var(--text-muted); }
.fixed-prefix input, .budget-input input { border-radius: 0 var(--r) var(--r) 0; }
label.pw-show { font-weight: 500; color: var(--text-muted); display: flex; gap: 9px; align-items: center; }
input[type="checkbox"] { width: 17px; height: 17px; }

/* ---------- App shell ---------- */
body.app { background: var(--bg); }
.sidebar { width: var(--sb-w); background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%); border-right: 0; color: var(--sb-text); }
.sidebar .side-brand { height: var(--header-h); border-bottom: 1px solid var(--sb-border); padding: 0 20px; display: flex; align-items: center; }
.sidebar .logo, .sidebar .logo-text { color: #fff; }
.sidebar nav { padding: 14px 12px; }
.sidebar .nav-label { color: #5f6782; font-size: 11px; font-weight: 700; letter-spacing: .09em; padding: 6px 12px 8px; }
.sidebar nav a { color: var(--sb-text); height: 42px; border-radius: 10px; padding: 0 12px; gap: 12px; font-weight: 500; font-size: 14px; margin-bottom: 2px; position: relative; }
.sidebar nav a .icon { color: #737b95; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; text-decoration: none; }
.sidebar nav a:hover .icon { color: #c9cee0; }
.sidebar nav a.active { background: rgba(255, 255, 255, .08); color: #fff; font-weight: 600; }
.sidebar nav a.active .icon { color: #fff; }
.sidebar nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-grad); }
.sidebar .nav-count { background: var(--brand-grad); }
.sidebar .side-foot { color: #5f6782; border-top: 1px solid var(--sb-border); font-size: 12px; }
.app-body { margin-left: var(--sb-w); }
:root[data-sidebar="collapsed"] .app-body { margin-left: var(--sb-w-mini); }
.app-header { height: var(--header-h); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); padding: 0 28px; }
.app-header .page-title { font-weight: 600; font-size: 15px; color: var(--text-muted); }
@media (min-width: 761px) { .app-header .page-title { display: none; } }
.h-right { gap: 8px; }
.head-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-sm); }
.head-chip:hover { text-decoration: none; border-color: var(--border-strong); }
.head-chip .icon { color: var(--text-muted); }
.head-chip b { font-variant-numeric: tabular-nums; }
.head-chip .pill { background: var(--brand-grad); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.head-sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.profile-btn { height: 40px; border-radius: 999px; padding: 0 10px 0 4px; border-color: var(--border); }
.avatar { background: var(--brand-grad); width: 32px; height: 32px; font-size: 12px; }
.app-content { padding: 32px 36px 64px; max-width: 1320px; }
.app-footer { padding: 18px 36px; }
@media (max-width: 760px) {
  .app-body, :root[data-sidebar="collapsed"] .app-body { margin-left: 0; }
  .app-content { padding: 22px 16px 48px; }
  .app-header { padding: 0 12px; }
  .head-chip.hide-sm, .head-sep { display: none; }
}

/* ---------- Page header ---------- */
.page-head { align-items: flex-start; margin-bottom: 26px; gap: 20px; }
.page-head h1 { font-size: 26px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .sub { margin-top: 6px; font-size: 14.5px; max-width: 70ch; }
.page-head .btn-row { flex-shrink: 0; }
.app-content > h1 { font-size: 26px; }
.app-content > .sub { margin: 6px 0 26px; font-size: 14.5px; }
.crumbs { font-size: 13px; color: var(--text-subtle); margin: 0 0 8px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--text-muted); font-weight: 500; }

/* ---------- Surfaces ---------- */
.card, .panel, .stat, .table-wrap { border-radius: var(--r-lg); border-color: var(--border); box-shadow: var(--shadow-sm); }
.card { max-width: none; padding: 26px 28px; }
.panel-head { padding: 20px 26px; }
.panel-head h2 { font-size: 16px; }
.panel-head p { font-size: 13.5px; margin-top: 4px; }
.panel-body { padding: 24px 26px; }
.panel-foot { padding: 16px 26px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
.panel + .panel { margin-top: 20px; }
.flash { border-radius: var(--r); font-size: 14px; padding: 12px 16px; }
.callout { border-radius: var(--r); font-size: 14px; padding: 13px 16px; line-height: 1.5; }
.empty-state { border-radius: var(--r-lg); background: var(--surface); padding: 56px 24px; }

/* Two-column settings sections: description left, fields right. */
.card { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); column-gap: 48px; grid-auto-flow: row dense; align-items: start; }
.card > * { grid-column: 2; min-width: 0; }
.card > .card-head { grid-column: 1; grid-row: 1 / span 40; }
.card > .card-head h2 { margin: 0 0 6px; font-size: 16px; }
.card > .card-head .card-sub { margin: 0; }
.card > :nth-child(2) > label:first-child, .card > :nth-child(2) label:first-of-type { margin-top: 0; }
.card form > label:first-of-type, .card > label:first-of-type { margin-top: 0; }
.card hr { grid-column: 1 / -1; margin: 26px 0; }
.card + .card { margin-top: 20px; }
.card form button[type="submit"], .card > form > button { margin-top: 22px; }
@media (max-width: 900px) { .card { grid-template-columns: minmax(0, 1fr); } .card > *, .card > .card-head { grid-column: 1; grid-row: auto; } .card > .card-head { margin-bottom: 18px; } }

/* Stat tiles */
.stat-grid { gap: 18px; margin-bottom: 28px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.stat { padding: 20px 22px; display: flex; flex-direction: column; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.stat-value { font-size: 28px; font-weight: 750; letter-spacing: -.03em; margin: 8px 0 2px; line-height: 1.15; }
.stat-foot { font-size: 12.5px; margin-top: auto; padding-top: 8px; line-height: 1.45; }

/* Tables */
table.data { font-size: 14px; }
table.data th { font-size: 11.5px; letter-spacing: .06em; font-weight: 650; color: var(--text-subtle); background: var(--surface-2); padding: 12px 16px; }
table.data td { padding: 14px 16px; border-color: var(--border); vertical-align: middle; }
table.data tbody tr { transition: background .1s; }
table.data tbody tr:hover { background: var(--surface-2); }
.table-link { font-weight: 600; }
.chip { height: 24px; padding: 0 10px; font-size: 12px; font-weight: 600; border-radius: 999px; }

/* Tabs + settings sub-navigation look the same */
.tabs, .subnav { border-bottom: 1px solid var(--border); margin-bottom: 26px; gap: 4px; }
.tabs a, .subnav-link { padding: 11px 14px; font-size: 14px; font-weight: 550; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active, .subnav-link.active { color: var(--text); border-bottom: 2px solid var(--accent); font-weight: 650; }
.subnav-link:hover, .tabs a:hover { color: var(--text); text-decoration: none; }

/* Dropdown menus */
.hmenu { border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; }

/* ---------- Auth: split screen ---------- */
body.auth { display: block; padding: 0; min-height: 100vh; background: var(--bg); }
.auth-split { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(900px 500px at 110% -10%, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 60%),
              radial-gradient(700px 500px at -20% 110%, color-mix(in srgb, var(--accent) 50%, transparent), transparent 60%), #090c18;
}
.auth-brand .logo, .auth-brand .logo-text { color: #fff; }
.auth-brand-copy { max-width: 440px; }
.auth-brand-copy h2 { color: #fff; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 30px; font-weight: 750; }
.auth-brand-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.auth-brand-copy li { display: flex; gap: 14px; align-items: flex-start; color: #b7bdd0; font-size: 14px; line-height: 1.5; }
.auth-brand-copy li .icon { flex-shrink: 0; width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: rgba(255, 255, 255, .08); color: #fff; }
.auth-brand-copy li b { display: block; color: #fff; font-size: 14.5px; margin-bottom: 2px; }
.auth-brand-foot { font-size: 12.5px; color: #7d84a0; }
.auth-brand-foot a { color: #b7bdd0; }
.auth-main { display: flex; flex-direction: column; padding: 28px 40px 40px; }
.auth-main-top { display: flex; justify-content: space-between; align-items: center; }
.auth-back { font-size: 13.5px; color: var(--text-muted); }
.auth-main .auth-card { margin: auto; width: 100%; max-width: 420px; background: transparent; border: 0; box-shadow: none; padding: 32px 0; }
.auth-main .auth-card.wide { max-width: 560px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 8px; }
.auth-card .sub { font-size: 14.5px; margin: 0 0 26px; }
.auth-card form button[type="submit"]:not(.ghost) { width: 100%; height: 46px; font-size: 15px; margin-top: 24px; }
.auth-card form button.ghost { width: 100%; height: 44px; margin-top: 10px; }
.auth-card .formlinks { margin-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-muted); }
.auth-mobile-logo { display: none; margin-bottom: 28px; }
.auth-card input { height: 46px; }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: inline-flex; }
  .auth-main { padding: 20px 20px 32px; }
}

/* ---------- Wallet hero ---------- */
.wallet-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-bottom: 32px; }
.wallet-balance {
  border-radius: var(--r-lg); padding: 28px 30px; color: #fff; display: flex; flex-direction: column; position: relative; overflow: hidden;
  background: radial-gradient(600px 300px at 100% 0%, color-mix(in srgb, var(--accent-2) 70%, transparent), transparent 70%), linear-gradient(135deg, #10142a, color-mix(in srgb, var(--accent) 75%, #0b0f1d));
  box-shadow: var(--shadow);
}
.wb-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,.75); }
.wb-value { font-size: clamp(32px, 4vw, 44px); font-weight: 800; letter-spacing: -.035em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.wb-sub { color: rgba(255,255,255,.65); font-size: 13.5px; }
.wb-held { margin-top: auto; padding-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wb-held div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 14px; }
.wb-held span { display: block; font-size: 12px; color: rgba(255,255,255,.65); }
.wb-held b { font-size: 17px; font-variant-numeric: tabular-nums; }
.wallet-topup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 28px; box-shadow: var(--shadow-sm); }
.wallet-topup h2 { margin: 0 0 4px; }
.wallet-topup .card-sub { margin: 0 0 4px; }
.wallet-topup .quick-amounts { margin-top: 10px; }
.wallet-pay { width: 100%; height: 46px; margin-top: 18px; font-size: 15px; }
@media (max-width: 960px) { .wallet-hero { grid-template-columns: 1fr; } }
.sectioned-form .card + .card { margin-top: 20px; }
.form-bar { position: sticky; bottom: 0; z-index: 5; margin-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); box-shadow: var(--shadow); }
.form-bar button, .form-bar .btn { margin: 0 !important; }

select { padding-right: 38px; }
.sectioned-form { padding-bottom: 8px; }
.kv-lg { grid-template-columns: 140px 1fr; gap: 12px 18px; font-size: 14.5px; }
.sum-row span:last-child { white-space: nowrap; }
.sum-row span:first-child { min-width: 0; }
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; }
  .stat-value { font-size: 22px; }
  .page-head h1, .app-content > h1 { font-size: 23px; }
}

/* ---------- Sidebar: collapsed (icon rail) + hover-expand that PUSHES content ---------- */
:root { --sb-w-mini: 72px; }
.sidebar { transition: width .18s ease; overflow-x: hidden; }
.sidebar nav a, .sidebar .side-brand { white-space: nowrap; }
.app-body { transition: margin-left .18s ease; }
@media (min-width: 761px) {
  :root[data-sidebar="collapsed"] .sidebar { width: var(--sb-w-mini); }
  :root[data-sidebar="collapsed"] .sidebar:hover { width: var(--sb-w); box-shadow: none; }
  :root[data-sidebar="collapsed"] .app-body { margin-left: var(--sb-w-mini); }
  /* Opening the rail on hover moves the page over instead of covering it. */
  :root[data-sidebar="collapsed"] .sidebar:hover ~ .app-body { margin-left: var(--sb-w); }

  :root[data-sidebar="collapsed"] .sidebar:not(:hover) .side-brand { padding: 0; justify-content: center; }
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) .logo { gap: 0; }
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) .logo-text,
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) .lbl,
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) .side-foot { display: none; }
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) .nav-label { display: block; height: 8px; padding: 0; overflow: hidden; opacity: 0; }
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) nav { padding: 14px 12px; }
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) nav a { justify-content: center; padding: 0; gap: 0; width: 48px; }
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) nav a .icon { width: 20px; height: 20px; }
  /* Unread/review count becomes a small dot on the icon. */
  :root[data-sidebar="collapsed"] .sidebar:not(:hover) .nav-count { display: block; position: absolute; top: 9px; right: 10px; min-width: 0; width: 8px; height: 8px; padding: 0; font-size: 0; border-radius: 50%; }
}
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 13.5px; color: var(--text-muted); }
.pager-info b { color: var(--text); font-weight: 600; }
.pager-links { display: flex; gap: 4px; align-items: center; }
.pager-links a, .pager-links span { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13.5px; }
.pager-links a { color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.pager-links a:hover { text-decoration: none; border-color: var(--border-strong); background: var(--surface-2); }
.pager-links .current { background: var(--brand-grad); color: #fff; }
.pager-links .disabled { color: var(--text-subtle); border: 1px solid var(--border); opacity: .6; }
.pager-links .gap { min-width: 20px; padding: 0; color: var(--text-subtle); }
.brand-thumb { display: inline-flex; width: 110px; height: 44px; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.brand-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.file-input { padding: 8px 10px; height: 42px; }
.brand-add button { margin-top: 14px !important; }

/* ---------- Public site: header ---------- */
.lp-header { height: 76px; padding: 0; display: block; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(170%) blur(14px); border-bottom: 1px solid var(--border); }
.lp-header-inner { max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 28px; }
.lp-logo .dot { width: 36px; height: 36px; border-radius: 10px; }
.lp-logo .dot::after { left: 13px; top: 11px; width: 12px; height: 14px; }
.lp-logo .logo-text { font-size: 18px; }
.lp-nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; flex: 1; }
.lp-nav .navlink { padding: 9px 13px; border-radius: 9px; color: var(--text-muted); font-size: 15px; font-weight: 550; }
.lp-nav .navlink:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.lp-actions { display: flex; align-items: center; gap: 10px; }
.lp-actions .btn { height: 42px; padding: 0 18px; font-size: 14.5px; }
.lp-menu { display: none; }
@media (max-width: 1000px) {
  .lp-header-inner { padding: 0 16px; gap: 12px; }
  .lp-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 10px 16px 18px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .lp-nav.open { display: flex; }
  .lp-nav .navlink { padding: 13px 8px; font-size: 16px; border-radius: 8px; }
  .lp-actions { margin-left: auto; }
  .lp-menu { display: inline-flex; }
  .lp-signin { display: none !important; }
}
@media (max-width: 520px) { .lp-actions .btn { height: 38px; padding: 0 12px; font-size: 13.5px; } .lp-logo .logo-text { font-size: 16px; } .lp-actions .theme-toggle { display: none; } }

/* ---------- Public site: footer ---------- */
.lp-foot { background: #070a14; color: #9aa1b8; margin-top: 0; }
.lp-foot-inner { max-width: 1240px; margin: 0 auto; padding: 64px 28px 48px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.lp-foot .logo, .lp-foot .logo-text { color: #fff; }
.lp-foot-brand p { font-size: 14.5px; line-height: 1.6; margin: 16px 0 22px; max-width: 40ch; color: #9aa1b8; }
.lp-foot h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 8px 0 16px; }
.lp-foot-inner > div:not(.lp-foot-brand) { display: flex; flex-direction: column; gap: 11px; }
.lp-foot a { color: #b4bad0; font-size: 14.5px; font-weight: 500; }
.lp-foot a:hover { color: #fff; text-decoration: none; }
.lp-foot-bottom { max-width: 1240px; margin: 0 auto; padding: 22px 28px 28px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #6f7690; }
@media (max-width: 900px) { .lp-foot-inner { grid-template-columns: 1fr 1fr; padding: 48px 20px 32px; } .lp-foot-brand { grid-column: 1 / -1; } .lp-foot-bottom { padding: 20px; } }

/* ---------- Store badges ---------- */
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px 0 14px; border-radius: 12px; background: #000; color: #fff !important; border: 1px solid rgba(255,255,255,.22); text-decoration: none !important; transition: transform .12s, border-color .12s; }
.store-badge:hover { border-color: rgba(255,255,255,.5); transform: translateY(-1px); }
.store-badge svg { width: 24px; height: 24px; flex-shrink: 0; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.store-badge small { font-size: 10.5px; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; opacity: .8; margin-bottom: 2px; }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 70; width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-grad); color: #fff; box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .15s, opacity .15s; }
.to-top .icon { transform: rotate(180deg); }
.to-top:hover { transform: translateY(-2px); text-decoration: none; }
.to-top:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 3px; }
@media (max-width: 520px) { .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; } }

/* ---------- Landing: trusted brands + app section ---------- */
.lp-brands { padding: 64px 0 0; text-align: center; max-width: 1180px; }
.lp-brands p { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--text-subtle); margin: 0 0 24px; }
.lp-brand-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px 48px; }
.lp-brand-row a, .lp-brand-row span { display: inline-flex; height: 48px; align-items: center; }
.lp-brand-row img { max-height: 44px; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .65; transition: filter .15s, opacity .15s; }
.lp-brand-row a:hover img, .lp-brand-row span:hover img { filter: none; opacity: 1; }
:root[data-theme="dark"] .lp-brand-row img { filter: grayscale(1) invert(1) brightness(1.4); opacity: .55; }
.lp-app { margin-top: 84px; }
.lp-app-card { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 48px 52px; border-radius: 24px; color: #fff; overflow: hidden; position: relative;
  background: radial-gradient(700px 360px at 100% 0%, color-mix(in srgb, var(--accent-2) 55%, transparent), transparent 70%), linear-gradient(135deg, #0b0f1d, #151a36); }
.lp-app-card h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; margin: 0 0 12px; }
.lp-app-card p { color: #b7bdd0; font-size: 15.5px; line-height: 1.6; margin: 0 0 26px; }
.lp-app-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.lp-app-stats div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 20px 22px; }
.lp-app-stats b { display: block; font-size: 30px; letter-spacing: -.03em; color: #fff; }
.lp-app-stats span { font-size: 13.5px; color: #aab1c5; }
@media (max-width: 900px) { .lp-app-card { grid-template-columns: 1fr; padding: 32px 24px; } }


/* ---------- Brand logo / favicon (Admin › Settings › Brand) ---------- */
.logo-img { height: 38px; width: auto; max-width: 200px; object-fit: contain; display: block; flex-shrink: 0; }
.lp-logo .logo-img { height: 44px; max-width: 240px; }
.auth-brand .logo .logo-img { height: 44px; }
.logo:has(.logo-img) { gap: 11px; }
.logo-img-d { display: none; }
:root[data-theme="dark"] .logo-img-d { display: block; }
:root[data-theme="dark"] .logo-img-l { display: none; }
.logo-img-mini { display: none; height: 32px; width: 32px; object-fit: contain; }
:root[data-sidebar="collapsed"] .sidebar:not(:hover) .logo-img:has(~ .logo-img-mini) { display: none; }
:root[data-sidebar="collapsed"] .sidebar:not(:hover) .logo-img-mini { display: block; }
.brand-preview { display: flex; align-items: center; justify-content: center; min-height: 84px; padding: 16px; border: 1px dashed var(--border, #2a3050); border-radius: 10px; background: #fff; }
.brand-preview.dark { background: #0d1224; }
.brand-preview img { max-height: 56px; max-width: 100%; object-fit: contain; }
.brand-preview.fav img { height: 48px; width: 48px; }

/* ---------- Analytics & reports ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.filter-bar select, .filter-bar input[type="date"] { width: auto; min-width: 140px; height: 38px; }
.filter-bar .custom-dates { display: inline-flex; gap: 8px; }
.filter-bar .custom-dates[hidden] { display: none; }
a.tip { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 4px; border-radius: 50%; border: 1px solid var(--border-strong, #888); color: var(--text-muted); font-size: 10px; font-weight: 700; line-height: 1; text-decoration: none; vertical-align: 1px; cursor: help; }
a.tip:hover { color: var(--accent-text); border-color: var(--accent); }
dl.glossary { display: grid; grid-template-columns: 190px 1fr; gap: 14px 22px; margin: 0; font-size: 13.5px; }
dl.glossary dt { font-weight: 650; color: var(--text); scroll-margin-top: 90px; }
dl.glossary dd { margin: 0; color: var(--text-muted); line-height: 1.55; }
dl.glossary dt:target, dl.glossary dt:target + dd { background: var(--accent-soft); border-radius: 6px; }
@media (max-width: 700px) { dl.glossary { grid-template-columns: 1fr; gap: 2px; } dl.glossary dd { margin-bottom: 12px; } }
.callout.explain { align-items: flex-start; }

/* ---------- State targeting ---------- */
.audience { display: grid; gap: 6px; }
.audience .pw-show { margin-top: 0; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; margin: 12px 0; padding: 12px; border: 1px solid var(--border); border-radius: 10px; max-height: 260px; overflow: auto; font-size: 13.5px; }
.state-grid label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 450; cursor: pointer; }
.state-grid input { width: auto; height: auto; }
.target-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }
