/* AlphaScreen design system — one stylesheet shared by the subscriber and admin apps.
   Dark "research terminal" theme: deep slate surfaces, emerald accent, tabular data. */
:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #070b10;
  --bg-2: #0b1118;
  --surface: #0e1620;
  --card: #111a24;
  --card-2: #17222e;
  --card-3: #1d2a38;
  --border: #1e2b39;
  --border-soft: rgba(148, 177, 207, 0.10);
  --border-strong: #2a3b4e;

  /* Text */
  --text: #e8eef6;
  --text-dim: #c5d1df;
  --muted: #8fa1b5;

  /* Brand */
  --accent: #35d399;
  --accent-2: #16b981;
  --accent-ink: #04140d;
  --accent-soft: rgba(53, 211, 153, 0.12);
  --blue: #5ea2ff;
  --neg: #f87171;
  --warn: #fbbf24;

  /* Shape + depth */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  --shadow-lg: 0 32px 72px -24px rgba(0, 0, 0, 0.8);
  --ring: 0 0 0 3px rgba(53, 211, 153, 0.22);

  /* Type */
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 1.5rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 560px at 10% -12%, rgba(53, 211, 153, 0.10), transparent 60%),
    radial-gradient(900px 520px at 104% -4%, rgba(94, 162, 255, 0.08), transparent 58%),
    radial-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: auto, auto, 22px 22px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(53, 211, 153, 0.28); color: #fff; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #24313f; border: 3px solid var(--bg); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #314152; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1rem; }
h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); font-weight: 600; }
p { margin: 0.35rem 0; }
code {
  font-family: var(--mono);
  font-size: 0.84em;
  color: #b9cade;
  background: rgba(148, 177, 207, 0.09);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 0.08em 0.38em;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* ---------- App shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  flex: 0 0 250px;
  background: linear-gradient(180deg, rgba(16, 24, 34, 0.96), rgba(7, 11, 16, 0.98));
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  backdrop-filter: blur(14px);
}
.brand {
  display: flex; align-items: center; gap: 0.7rem;
  font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; color: var(--text);
  padding: 0.3rem 0.55rem 1.4rem;
  white-space: nowrap;
}
.brand-tag {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(53, 211, 153, 0.28); border-radius: 5px;
  padding: 0.16rem 0.36rem; margin-left: 0.1rem;
}
.brand-mark {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px;
  background: radial-gradient(circle at 30% 20%, rgba(94, 162, 255, 0.35), rgba(9, 14, 20, 0.9) 70%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 1px rgba(53, 211, 153, 0.10), 0 8px 20px -8px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.sidebar a, .sidebar button.nav-btn {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font: inherit; font-size: 0.875rem; font-weight: 500;
  background: none; border: 0; box-shadow: none; cursor: pointer; text-align: left; width: 100%;
  justify-content: flex-start; white-space: normal;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.sidebar a:hover, .sidebar button.nav-btn:hover {
  background: rgba(148, 177, 207, 0.07); color: var(--text); text-decoration: none;
  box-shadow: none; filter: none;
}
.sidebar a.active {
  background: linear-gradient(90deg, rgba(53, 211, 153, 0.14), rgba(53, 211, 153, 0.03));
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--accent);
}
.sidebar a.active .nav-icon { color: var(--accent); opacity: 1; }
.sidebar .nav-icon {
  width: 18px; height: 18px; flex: 0 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0.72; color: currentColor;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.sidebar .nav-icon svg { width: 18px; height: 18px; display: block; }
.sidebar .spacer { flex: 1; }

.main {
  flex: 1; min-width: 0; width: 100%;
  max-width: 1560px; margin: 0 auto;
  padding: 2.1rem 2.4rem 4rem;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.page-head h1 { font-size: 1.7rem; letter-spacing: -0.03em; }
.page-head h1::after {
  content: ""; display: block; width: 40px; height: 2px; margin-top: 0.55rem;
  border-radius: 2px; background: linear-gradient(90deg, var(--accent), transparent);
}
.page-head .sub { color: var(--muted); margin-top: 0.35rem; max-width: 62ch; }

/* ---------- KPI tiles ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.kpi {
  position: relative;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 55%), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.kpi::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 211, 153, 0.55), transparent);
  opacity: 0; transition: opacity 0.2s ease;
}
.kpi:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.kpi:hover::before { opacity: 1; }
.kpi .label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.075em; font-weight: 600; }
.kpi .value {
  font-size: 1.8rem; font-weight: 700; line-height: 1.15; margin-top: 0.35rem;
  letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
}
.kpi .value.pos { color: var(--accent); }
.kpi .value.neg { color: var(--neg); }
.kpi .hint { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.028), transparent 45%), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.45rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-bottom: 0.9rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.card-head h2 { font-size: 1.02rem; }
.card-head .sub { color: var(--muted); font-size: 0.83rem; margin-top: 0.2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

details { margin: 0.25rem 0 0.9rem; }
summary {
  cursor: pointer; color: var(--text-dim); font-size: 0.86rem;
  font-weight: 500; list-style: none; display: flex; align-items: center; gap: 0.45rem;
  padding: 0.2rem 0;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: ""; width: 0; height: 0;
  border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform 0.15s ease; transform-origin: 30% 50%;
}
details[open] > summary::before { transform: rotate(90deg); }
summary:hover { color: var(--accent); }
details ol, details ul { color: var(--muted); font-size: 0.88rem; line-height: 1.6; padding-left: 1.25rem; }
details li { margin: 0.35rem 0; }
details strong { color: var(--text-dim); }

/* ---------- Forms ---------- */
form { display: flex; flex-direction: column; gap: 0.85rem; }
form.inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 0.7rem; }
label { display: flex; flex-direction: column; gap: 0.38rem; color: var(--text-dim); font-size: 0.79rem; font-weight: 500; }
input, textarea, select {
  font: inherit; font-size: 0.9rem; color: var(--text);
  background: rgba(7, 12, 18, 0.65);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
input:hover, textarea:hover, select:hover { border-color: #38506a; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); background: rgba(7, 12, 18, 0.9);
  box-shadow: var(--ring);
}
input::placeholder, textarea::placeholder { color: #5d6f83; }
input[type="number"] { font-variant-numeric: tabular-nums; }
button:focus-visible, a:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
button, .btn {
  font: inherit; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  background: linear-gradient(180deg, #40dda4, #1fbd86);
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 4px 12px -8px rgba(31, 189, 134, 0.55);
  transition: filter 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  white-space: nowrap;
}
button:hover, .btn:hover { filter: brightness(1.07); text-decoration: none; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 6px 16px -8px rgba(31, 189, 134, 0.65); }
button:active, .btn:active { transform: translateY(1px); filter: brightness(0.98); }
button.secondary, .btn.secondary {
  background: var(--card-2); color: var(--text-dim); border-color: var(--border-strong);
  box-shadow: none; font-weight: 500;
}
button.secondary:hover, .btn.secondary:hover {
  background: var(--card-3); color: var(--text); filter: none; box-shadow: none;
}
button.danger {
  background: rgba(248, 113, 113, 0.10); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35);
  box-shadow: none;
}
button.danger:hover { background: rgba(248, 113, 113, 0.18); color: #fecaca; filter: none; box-shadow: none; }
button.sm { padding: 0.3rem 0.7rem; font-size: 0.78rem; }
button.block, .btn.block { width: 100%; }
.google-btn {
  background: #fff; color: #1f1f1f; border-color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.google-btn:hover { background: #eef1f4; filter: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }

/* ---------- Alerts ---------- */
.error, .ok, .banner {
  border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; margin: 0.6rem 0; font-size: 0.87rem;
  border: 1px solid transparent; line-height: 1.45;
}
.error { background: rgba(248, 113, 113, 0.10); border-color: rgba(248, 113, 113, 0.32); color: #fca5a5; }
.ok { background: rgba(53, 211, 153, 0.10); border-color: rgba(53, 211, 153, 0.32); color: #7fe8bf; }
.banner { background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.36); color: #fcd679; }
.banner a { color: #fcd679; font-weight: 600; text-decoration: underline; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.88rem; }
th, td { padding: 0.62rem 0.7rem; text-align: left; vertical-align: middle; }
th {
  color: var(--muted); font-size: 0.69rem; text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 600; border-bottom: 1px solid var(--border-strong);
  background: rgba(7, 12, 18, 0.35);
}
th:first-child { border-top-left-radius: 6px; }
th:last-child { border-top-right-radius: 6px; }
td { border-bottom: 1px solid var(--border-soft); }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover td { background: rgba(53, 211, 153, 0.045); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.muted { font-size: inherit; }
.ticker-link {
  cursor: pointer; font-weight: 650; color: var(--text);
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.03em;
  border-bottom: 1px solid transparent; transition: color 0.15s ease, border-color 0.15s ease;
}
.ticker-link:hover { color: var(--accent); border-bottom-color: rgba(53, 211, 153, 0.45); }
.ticker-cell { display: inline-flex; align-items: center; gap: 0.55rem; }
/* Brand logo tile: the img covers the letter, so a missing logo leaves a clean initial. */
.ticker-logo {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: none; overflow: hidden;
  border-radius: 7px; border: 1px solid var(--border-soft); background: var(--card-3);
  color: var(--muted); font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
}
.ticker-logo::before { content: attr(data-initial); }
.ticker-logo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: #fff;
}
.ticker-logo.lg { width: 34px; height: 34px; font-size: 0.85rem; margin-right: 0.55rem; vertical-align: middle; }
.rank-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 26px; padding: 0 0.45rem; border-radius: 7px;
  background: var(--card-2); border: 1px solid var(--border-soft);
  font-weight: 650; font-size: 0.76rem; font-variant-numeric: tabular-nums; color: var(--text-dim);
}
.rank-pill.top {
  background: rgba(53, 211, 153, 0.12); border-color: rgba(53, 211, 153, 0.35); color: var(--accent);
}
.badge {
  display: inline-flex; align-items: center;
  padding: 0.16rem 0.5rem; border-radius: 6px;
  font-weight: 600; font-size: 0.75rem; font-variant-numeric: tabular-nums;
  border: 1px solid transparent; text-transform: capitalize;
}
.badge.pos { background: rgba(53, 211, 153, 0.12); border-color: rgba(53, 211, 153, 0.25); color: var(--accent); }
.badge.neg { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.25); color: #fca5a5; }
.badge.flat { background: var(--card-2); border-color: var(--border-soft); color: var(--muted); }
.badge.pending { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.28); color: var(--warn); }
.badge.approved { background: rgba(53, 211, 153, 0.12); border-color: rgba(53, 211, 153, 0.25); color: var(--accent); }
.badge.rejected { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.25); color: #fca5a5; }
.score { display: flex; align-items: center; gap: 0.6rem; min-width: 150px; }
.score-bar { flex: 1; height: 5px; background: rgba(148, 177, 207, 0.14); border-radius: 999px; overflow: hidden; }
.score-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent)); border-radius: 999px; }
.score-val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3.4ch; text-align: right; color: var(--text-dim); }
.row-actions { display: flex; gap: 0.4rem; justify-content: flex-end; align-items: center; }
.empty {
  color: var(--muted); padding: 1.6rem 1rem; text-align: center; font-size: 0.88rem;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: rgba(148, 177, 207, 0.025); margin: 0.5rem 0;
}
pre {
  background: rgba(7, 12, 18, 0.7); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.9rem; overflow: auto;
  font-size: 0.79rem; line-height: 1.55; color: #aebfd2;
}
.emails { font-size: 0.85rem; color: var(--text-dim); line-height: 1.55; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.chip {
  background: var(--card-2); border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 0.16rem 0.5rem; font-size: 0.78rem; font-family: var(--mono); color: var(--text-dim);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 8, 13, 0.72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
  animation: fade-in 0.15s ease;
}
.modal-inner {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.035), transparent 40%), var(--card);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 1.4rem 1.75rem; max-width: 44rem; width: 100%; max-height: 86vh; overflow: auto;
  box-shadow: var(--shadow-lg); position: relative;
}
.modal-inner #modal-close { position: absolute; top: 1rem; right: 1rem; }
.modal-inner h2 {
  font-size: 1.3rem; font-family: var(--mono); letter-spacing: 0.02em;
  margin-bottom: 0.9rem; padding-right: 5rem;
}
.ctx-section { border-top: 1px solid var(--border-soft); padding: 0.9rem 0; }
.ctx-section h3 { margin-bottom: 0.45rem; }
.plain-list { margin: 0; padding-left: 1.2rem; }
.plain-list li { margin-bottom: 0.25rem; }
.ctx-stats { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.45rem; }
.ctx-stat {
  background: rgba(7, 12, 18, 0.6); border: 1px solid var(--border); border-radius: 7px;
  padding: 0.32rem 0.65rem; font-size: 0.82rem; color: var(--muted);
}
.ctx-stat b { color: var(--text); font-variant-numeric: tabular-nums; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.75rem;
  background:
    radial-gradient(720px 420px at 12% 8%, rgba(53, 211, 153, 0.14), transparent 62%),
    radial-gradient(720px 420px at 88% 92%, rgba(94, 162, 255, 0.12), transparent 62%),
    linear-gradient(rgba(148, 177, 207, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(148, 177, 207, 0.035) 1px, transparent 1px) 0 0 / 64px 64px,
    var(--bg);
}
.auth-card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%), var(--card);
  border: 1px solid var(--border-strong); border-radius: 18px;
  padding: 2.25rem 2.1rem; box-shadow: var(--shadow-lg);
}
.auth-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--blue), transparent);
  opacity: 0.85;
}
.auth-card .brand { justify-content: center; padding-bottom: 1rem; }
.auth-card h1 { text-align: center; font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 1.35rem; font-size: 0.88rem; }
.auth-card form { margin-top: 0.6rem; }
.auth-card .links { text-align: center; margin-top: 1.25rem; color: var(--muted); font-size: 0.88rem; }
.auth-card .links a { font-weight: 500; }
.divider { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.76rem; margin: 1.1rem 0; text-transform: uppercase; letter-spacing: 0.06em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Billing ---------- */
.plan {
  border: 1px solid rgba(53, 211, 153, 0.28); border-radius: var(--radius-lg); padding: 1.5rem;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(53, 211, 153, 0.14), transparent 65%),
    linear-gradient(160deg, rgba(53, 211, 153, 0.06), transparent 55%),
    var(--card);
  box-shadow: var(--shadow);
}
.plan .price { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.035em; margin-top: 0.45rem; }
.plan ul { margin: 0.85rem 0 1.25rem; padding-left: 1.1rem; color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; }
.plan li { margin: 0.3rem 0; }
.plan li::marker { color: var(--accent); }

/* ---------- Headlines in ticker modal ---------- */
.hl-list { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; }
.hl-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--border-soft); }
.hl-list li:last-child { border-bottom: 0; }
.hl-score { display: inline-block; min-width: 2.9rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.hl-score.pos { color: var(--accent); }
.hl-score.neg { color: var(--neg); }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sortable[aria-sort="ascending"]::after { content: " \25B2"; font-size: 0.6rem; }
th.sortable[aria-sort="descending"]::after { content: " \25BC"; font-size: 0.6rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .main { padding: 1.75rem 1.5rem 3rem; }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: auto; flex: none; height: auto; position: sticky; top: 0;
    flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 0.7rem 0.9rem; gap: 0.15rem;
    border-right: 0; border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
  .sidebar .brand { padding: 0 0.65rem 0 0; width: auto; font-size: 0.95rem; }
  .sidebar .brand-mark { width: 30px; height: 30px; flex-basis: 30px; }
  .sidebar .spacer { display: none; }
  .sidebar a, .sidebar button.nav-btn { width: auto; padding: 0.45rem 0.6rem; font-size: 0.82rem; }
  .sidebar a.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .main { padding: 1.4rem 1rem 2.5rem; }
  section[id] { scroll-margin-top: 5.5rem; }
  .page-head h1 { font-size: 1.4rem; }
}
@media (max-width: 620px) {
  .kpis { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .card { padding: 1.05rem 1rem; border-radius: var(--radius); }
  .card-head { gap: 0.6rem; }
  table { font-size: 0.82rem; }
  th, td { padding: 0.5rem 0.45rem; }
  form.inline { width: 100%; }
  form.inline label { flex: 1 1 100%; }
  form.inline input { width: 100% !important; }
  input, textarea, select { max-width: 100%; }
  .modal-inner { padding: 1.2rem 1.1rem; }
  .auth-card { padding: 1.75rem 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
