/* ============================================================
   flowbot design tokens — emerald + warm-dark, own identity
   ============================================================ */
:root {
  /* Warm dark backgrounds */
  --bg: #0b0f0d;
  --surface: #141a17;
  --surface-2: #1b2220;
  --surface-3: #232b27;
  --border: #2a3330;
  --border-soft: #1d2421;

  /* Text */
  --text: #e8ece9;
  --text-soft: #aab2ad;
  --muted: #6e7773;

  /* Brand emerald (own — not Robinhood lime) */
  --accent: #10b981;
  --accent-bright: #34d399;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --accent-glow: rgba(16, 185, 129, 0.28);

  /* Directional colors */
  --bullish: #10b981;
  --bearish: #f43f5e;
  --neutral: #fbbf24;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 4px 8px -4px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.14);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
}

/* ============================================================
   reset / base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg); }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 5px; }
*::-webkit-scrollbar-thumb:hover { background: var(--border); }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

/* ============================================================
   header / nav
   ============================================================ */
header {
  background: rgba(11, 15, 13, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3));
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 15px;
}

main { padding: 24px 0 0; }

.bottom-spacer {
  height: calc(72px + env(safe-area-inset-bottom));
  width: 100%;
  pointer-events: none;
}

/* ============================================================
   bottom tab bar (TradingView-style)
   ============================================================ */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  background: rgba(11, 15, 13, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border-soft);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bn-item {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text-soft);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.15s;
}
.bn-item svg {
  width: 22px;
  height: 22px;
}
.bn-item:hover { color: var(--text); }
.bn-item.active {
  color: var(--accent-bright);
}

/* ============================================================
   menu drawer (bottom sheet)
   ============================================================ */
.menu-drawer {
  border: 0;
  padding: 0;
  background: linear-gradient(180deg, #161d1a 0%, var(--surface) 100%);
  color: var(--text);
  border-top: 1px solid var(--accent);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 540px;
  margin: auto auto 0;
  position: fixed;
  inset: auto 0 0 0;
  box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.6), 0 -1px 0 var(--accent-glow);
  overflow: hidden;
}
.menu-drawer::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}
.menu-form {
  display: flex;
  flex-direction: column;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  position: relative;
}
.menu-form::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
}
.menu-close {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  color: var(--text-soft);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  position: absolute;
  top: 14px;
  right: 14px;
}
.menu-close:hover {
  color: var(--text);
  background: var(--surface-3);
  border-color: var(--border);
}
.menu-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 0 4px;
}
.menu-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 14px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 8px;
}
.menu-user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), var(--surface));
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.install-banner[hidden] { display: none; }
.install-banner-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.install-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.install-banner-text strong { font-size: 14px; }
.install-banner-text .muted { font-size: 12px; line-height: 1.35; }
.install-banner .btn { padding: 8px 14px; font-size: 13px; flex-shrink: 0; }
.install-banner-close {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}
.install-banner-close:hover { color: var(--text); }

.menu-user-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.menu-link {
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.menu-link:hover { background: var(--surface-2); }
.menu-link.active {
  background: var(--accent-soft);
  color: var(--accent-bright);
}
.menu-logout {
  color: var(--bearish);
  margin-top: 6px;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.menu-logout:hover { background: rgba(244, 63, 94, 0.08); color: var(--bearish); }

.menu-push {
  appearance: none;
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  margin-top: 4px;
}
.menu-push:disabled { opacity: 0.55; cursor: default; }
.menu-push .push-icon { font-size: 17px; line-height: 1; }
.menu-push[data-state="subscribed"] { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-soft); }

/* ---- admin invites ---- */
.invite-form {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
  flex-wrap: wrap;
}
.invite-form input[type="text"] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.invite-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}
.invite-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}
.invite-status-open    { background: var(--accent-soft); color: var(--accent-bright); border: 1px solid rgba(16,185,129,0.35); }
.invite-status-used    { background: var(--surface-3); color: var(--text-soft); border: 1px solid var(--border-soft); }
.invite-status-revoked { background: rgba(244,63,94,0.12); color: #fda4af; border: 1px solid rgba(244,63,94,0.3); }
.invite-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  letter-spacing: 0;
}
.invite-card.invite-used    { opacity: 0.6; }
.invite-card.invite-revoked { opacity: 0.5; }

/* ---- owner email banner ---- */
.email-banner {
  background: linear-gradient(90deg, rgba(16,185,129,0.06), var(--surface));
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.email-banner h3 { margin: 0 0 4px; font-size: 14px; }
.email-banner p { margin: 0 0 10px; color: var(--text-soft); font-size: 13px; }
.email-banner-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.email-banner-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
.email-banner-form input[type="email"]:focus { outline: none; border-color: var(--accent); }
.email-banner-pending {
  background: rgba(251, 191, 36, 0.06);
  border-left-color: var(--neutral);
}

/* ============================================================
   typography
   ============================================================ */
h1 {
  font-size: 28px;
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 18px;
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h2.section {
  margin-top: 36px;
  color: var(--text-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.bucket-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
}
.bucket-section-header a,
.bucket-section-header a:link,
.bucket-section-header a:visited,
.bucket-section-header a:hover,
.bucket-section-header a:active {
  color: var(--text);
  text-decoration: none;
}
.bucket-count {
  background: var(--surface-3);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0;
}
h3 { font-size: 15px; margin: 0 0 4px; font-weight: 600; letter-spacing: -0.01em; }

.muted { color: var(--muted); font-size: 13px; }

/* ============================================================
   hero
   ============================================================ */
.hero { padding: 12px 0 28px; }
.hero h1 {
  font-size: 36px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tagline {
  color: var(--text-soft);
  font-size: 15px;
  max-width: 640px;
  margin: 0;
}

/* ============================================================
   stat grid
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 16px 0 8px;
}
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.stat:hover {
  border-color: var(--border);
  transform: translateY(-1px);
}

.stat-link,
.stat-link:link,
.stat-link:visited,
.stat-link:hover,
.stat-link:active {
  text-decoration: none;
  color: var(--text);
}
.stat-link { display: block; cursor: pointer; }
.stat-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.stat-link .stat-label { color: var(--muted); }
.stat-link .stat-value { color: var(--text); }

.stat-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.stat-value.tiny { font-size: 16px; font-weight: 600; }

.stat-sub {
  color: var(--text-soft);
  font-size: 12px;
  margin-top: 6px;
}

/* ============================================================
   cards
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.card-link, .bucket-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.card-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}
.card-link p { margin: 6px 0 0; color: var(--text-soft); font-size: 13px; }

/* ============================================================
   bucket card on home (matches alert-card schema)
   ============================================================ */
.bucket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 12px;
}
.bucket-link {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
  position: relative;
}
.bucket-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}
.bucket-link-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}
.bucket-link-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bucket-link-meta {
  font-size: 12px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}
.bucket-link-stats {
  display: flex;
  gap: 14px;
  align-items: center;
}
.bucket-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}
.bucket-stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.bucket-stat-value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bucket-link-tickers {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--border-soft);
  margin-top: 2px;
}

/* Legacy classes kept for any remaining references (no longer rendered on home) */
.bucket-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bucket-stats { display: flex; gap: 18px; text-align: right; }
.mini-stat { display: flex; flex-direction: column; gap: 2px; }
.mini-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.mini-val { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bucket-tickers { margin-top: 12px; }

/* ============================================================
   bucket page
   ============================================================ */
.bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 6px;
}

.bucket-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0 8px;
}

.meta-pill {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.meta-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.meta-value {
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   slot bar (bucket status)
   ============================================================ */
.slot-bar {
  display: flex;
  gap: 4px;
  align-items: center;
  margin: 12px 0 14px;
}

.slot {
  flex: 1;
  height: 8px;
  background: var(--surface-3);
  border-radius: 2px;
  transition: background 0.2s;
}
.slot.filled {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.slot-count {
  margin-left: 10px;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   ticker chip
   ============================================================ */
.ticker-chip {
  display: inline-block;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 9px;
  margin: 2px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* ============================================================
   tables
   ============================================================ */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
}

.trades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 760px;
}

.trades-table th,
.trades-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  white-space: nowrap;
}
.trades-table tr:last-child td { border-bottom: none; }

.trades-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: sticky;
  top: 0;
}

.trades-table td { font-variant-numeric: tabular-nums; }
.trades-table tr:hover td { background: var(--surface-2); }
.trades-table .row-related td { opacity: 0.62; }
.trades-table .row-related:hover td { opacity: 1; }

/* When trades-table isn't inside a .table-scroll wrapper (existing templates) */
.trades-table:not(.table-scroll > *) {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
}

/* ============================================================
   bias colors
   ============================================================ */
.bias-bullish { color: var(--bullish); font-weight: 600; }
.bias-bearish { color: var(--bearish); font-weight: 600; }
.bias-neutral { color: var(--neutral); font-weight: 600; }

/* ============================================================
   code / monospace
   ============================================================ */
code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--text-soft);
}

/* ============================================================
   "updated" pill with pulsing dot
   ============================================================ */
.updated {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.updated::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* ============================================================
   empty state
   ============================================================ */
.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 14px;
}
.empty .icon { font-size: 36px; margin-bottom: 14px; opacity: 0.55; }
.empty p { margin: 4px 0; }

/* ============================================================
   dialog (filter popup)
   ============================================================ */
.filter-dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-lg);
}
.filter-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}

.dialog-head, .dialog-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
}
.dialog-head { border-bottom: 1px solid var(--border-soft); }
.dialog-head h2 { margin: 0; }
.dialog-foot { border-top: 1px solid var(--border-soft); gap: 10px; justify-content: flex-end; }
.dialog-body { padding: 20px; display: grid; gap: 18px; }

.dialog-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.dialog-close:hover { background: var(--surface-2); color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field input, .field textarea {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input { font-variant-numeric: tabular-nums; }
.field textarea { font-family: var(--font-mono); resize: vertical; min-height: 60px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { color: var(--muted); font-size: 12px; }
.label-text {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ============================================================
   buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--accent);
  color: #04211a;
}
.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: var(--shadow-glow);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent-bright); }

/* ============================================================
   banners
   ============================================================ */
.banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 14px 0;
  font-size: 13px;
  border: 1px solid;
}
.banner-success { background: rgba(16, 185, 129, 0.08); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
.banner-warning { background: rgba(251, 191, 36, 0.08); color: #fde68a; border-color: rgba(251, 191, 36, 0.3); }

/* ============================================================
   chart wrap
   ============================================================ */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin: 16px 0;
}
.chart-wrap canvas { width: 100% !important; height: 220px !important; }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  main { padding: 22px 0 0; }
  .hero h1 { font-size: 28px; }
  .bucket-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .bucket-row { flex-direction: column; gap: 10px; }
  .bucket-stats { justify-content: flex-start; text-align: left; }
  .field-row { grid-template-columns: 1fr; }
}

/* Mobile: hide non-essential table columns marked .mobile-hide */
@media (max-width: 700px) {
  .mobile-hide { display: none !important; }
  .trades-table { min-width: 0; font-size: 12px; }
  .trades-table th, .trades-table td { padding: 8px 6px; white-space: nowrap; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

.legend {
  font-size: 11px;
  margin-top: 8px;
}

/* ---------- action buttons in tables ---------- */
.actions-cell {
  white-space: nowrap;
}
.act-btn {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  margin-right: 4px;
  transition: all 0.12s;
}
.act-btn:hover { transform: translateY(-1px); }
.act-btn:active { transform: translateY(0); }
.act-take:hover    { background: rgba(16, 185, 129, 0.2); border-color: var(--bullish); }
.act-exit:hover    { background: rgba(16, 185, 129, 0.2); border-color: var(--bullish); }
.act-dismiss:hover { background: rgba(244, 63, 94, 0.18); border-color: var(--bearish); }
.state-done {
  font-size: 14px;
  opacity: 0.7;
}

/* Non-interactive state indicator (filled chip showing current action state) */
.act-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  font-size: 14px;
  line-height: 1;
  border-radius: 6px;
  margin-right: 4px;
  cursor: default;
  user-select: none;
  flex-shrink: 0;
}
.act-state.act-dismiss-filled {
  background: rgba(244, 63, 94, 0.22);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fda4af;
}

/* Exit-signal badge on active trade cards when the bot has detected a
   closing fill on the underlying contract. The user still has to ✅
   manually — the badge is just a heads-up, not an auto-exit. */
.exit-signal-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.18);
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: #fda4af;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Skew tier pill — different color from the red EXIT? pill so the user can
   tell at a glance which detector fired. Skew = cumulative bid-side volume
   reaching a tier (40/50/60/70/80%); EXIT? = a single large closing fill. */
.skew-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fbbf24;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bot trader page — paper-trading dashboard for the owner account. */
.bot-header { margin-bottom: 16px; }
.bot-header h1 { margin: 0 0 4px; font-size: 22px; }
.bot-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.bot-stat {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.bot-stat-label {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.bot-stat-value {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bot-stat-sub {
  font-size: 12px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.bot-pnl {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

/* Bias stack — wraps the BULL/BEAR pill. When an exit/skew alert is firing,
   the wrapper switches to a vertical column with the alert pill on TOP and
   a slightly shrunk bias pill below. With no alert, it's just the normal
   bias pill — looks identical to before. Score chip stays in its slot. */
.bias-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
}
.bias-stack--alert .bias-pill {
  font-size: 9px;
  padding: 1px 5px;
  height: 15px;
  letter-spacing: 0.06em;
}
.bias-stack--alert .skew-pill,
.bias-stack--alert .exit-signal-pill {
  font-size: 9px;
  padding: 1px 5px;
  letter-spacing: 0.04em;
  line-height: 1.1;
}
.alert-card.has-exit-signal .exit-signal-pill {
  animation: exit-pulse 2.4s ease-in-out infinite;
}
@keyframes exit-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.0); }
  50%      { box-shadow: 0 0 8px 1px rgba(244, 63, 94, 0.35); }
}

@media (max-width: 640px) {
  header .container { padding: 0 14px; }
  header { padding: 10px 0; }
  .header-inner { gap: 14px; }
  .stat-grid, .stat-grid-3, .stat-grid-2 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 22px; }
  .stat-value.tiny { font-size: 13px; }
  .meta-pill { padding: 8px 12px; }
  .filter-dialog { max-width: calc(100vw - 24px); margin: 12px; }
  .dialog-body { padding: 16px; }
  .ticker-chip { font-size: 10px; padding: 2px 6px; }
  .bn-item { font-size: 10px; }
  .bn-item svg { width: 20px; height: 20px; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 24px; }
  .stat-value { font-size: 20px; }
  h1 { font-size: 22px; }
}

/* ============================================================
   login page
   ============================================================ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.08) 0%, var(--bg) 60%);
}

.login-shell {
  width: 100%;
  max-width: 380px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.login-mark {
  width: 32px;
  height: 32px;
  color: var(--accent);
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.login-brand h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.login-tag {
  margin: 0 0 22px;
  font-size: 13px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-submit {
  width: 100%;
  justify-content: center;
  padding: 11px 16px;
  margin-top: 4px;
}

.login-meta {
  margin-top: 20px;
  font-size: 12px;
  text-align: center;
}

/* ============================================================
   confirm modal (replaces browser's "amyotrades.com says" prompt)
   ============================================================ */
.confirm-dialog {
  background: linear-gradient(180deg, #161d1a 0%, var(--surface) 100%);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 340px;
  width: calc(100vw - 40px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--accent-glow);
}
.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}
.confirm-body { padding: 24px 22px 18px; }
#confirm-message {
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  margin: 0 0 20px;
  color: var(--text);
  line-height: 1.45;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-confirm {
  appearance: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.1s, background 0.15s, border-color 0.15s;
  min-width: 100px;
}
.btn-confirm:active { transform: translateY(1px); }
.btn-confirm-cancel {
  background: var(--surface-2);
  border-color: var(--border-soft);
  color: var(--text-soft);
}
.btn-confirm-cancel:hover { background: var(--surface-3); color: var(--text); border-color: var(--border); }
.btn-confirm-ok {
  background: var(--accent);
  color: #052e1c;
}
.btn-confirm-ok:hover { background: var(--accent-bright); }

/* ============================================================
   alert cards (expandable rows, replaces trades-table)
   ============================================================ */
.alert-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.alert-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.alert-card[open] {
  border-color: var(--border);
}
.alert-card.alert-related { opacity: 0.78; }

.alert-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 32px 10px 12px;  /* extra right padding reserves space for the abs-positioned chevron */
  cursor: pointer;
  list-style: none;
  user-select: none;
  position: relative;
  /* Let the browser keep vertical scrolling but hand horizontal pans to our
     swipe-to-action handler. Without this, the browser fights the JS for
     horizontal touch events and the swipe never registers. */
  touch-action: pan-y;
}
.alert-summary .actions { flex-shrink: 0; }
/* Chevron pinned to the top-right of the summary regardless of how much
   content sits in the row. Pills are free to wrap below; the chev stays put. */
.alert-summary .chev {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  flex-shrink: 0;
}
.alert-card[open] .alert-summary .chev {
  transform: translateY(-50%) rotate(180deg);
}
.alert-summary .multi-chip { flex-shrink: 0; }
.alert-summary .score-chip { flex-shrink: 0; }
.summary-sweep {
  color: var(--neutral);
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.4));
}
.alert-summary::-webkit-details-marker { display: none; }
.alert-summary::marker { content: ""; }

.alert-summary .ticker {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.side-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.side-ask  { background: var(--bullish); color: var(--bullish); }
.side-bid  { background: var(--bearish); color: var(--bearish); }
.side-mid  { background: var(--neutral); color: var(--neutral); }

.contract-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.contract-call {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.contract-put {
  background: rgba(244, 63, 94, 0.16);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.expiry {
  font-size: 12px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.score-chip {
  background: var(--surface-3);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  padding: 3px 0;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  width: 34px;
  text-align: center;
  flex-shrink: 0;
}
.score-chip.high {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #052e1c;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

/* P&L chips (closed-trade cards) */
.pnl-chip {
  font-weight: 700;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
}
.pnl-chip-win {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.pnl-chip-loss {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
}
.pnl-chip-na {
  background: var(--surface-3);
  color: var(--text-soft);
}
/* Closed-trade cards intentionally have no accent border — the green/red
   pnl-chip alone communicates win/loss without doubling up on the card. */

.alert-summary .actions {
  display: inline-flex;
  gap: 4px;
}
.alert-summary .act-btn { margin: 0; }

.chev {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.alert-card[open] .chev {
  transform: rotate(180deg);
}

.alert-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.015);
}
.detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.detail-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.detail-value {
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.detail-value code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
}
.oi-detail { font-size: 11px; }
.oi-stamp {
  font-size: 9px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}

.sweep { color: var(--neutral); }

/* Tighter pack on phones; ticker + pill stay readable, score + actions stay tappable */
@media (max-width: 640px) {
  .alert-summary {
    gap: 7px;
    padding: 10px 11px;
  }
  .alert-summary .ticker { font-size: 14px; }
  .contract-pill { font-size: 12px; padding: 3px 7px; }
  .expiry { font-size: 11px; }
  .score-chip { font-size: 12px; width: 30px; }
  .alert-detail { grid-template-columns: 1fr 1fr; padding: 11px 12px 13px; gap: 8px 14px; }
  .act-btn { padding: 5px 8px; font-size: 13px; margin-right: 2px; }
}
@media (max-width: 380px) {
  .alert-summary { gap: 5px; padding: 10px 9px; }
  .alert-summary .actions { gap: 2px; }
  .act-btn { padding: 4px 6px; }
  .expiry { font-size: 10px; }
}

/* Notification badges — top-right pill on bucket cards (home), inline pill
   on menu links, small red dot on the bottom-nav menu button. Visibility is
   controlled by the .is-visible class rather than the [hidden] attribute —
   Safari has quirky behavior toggling the boolean attribute via el.hidden on
   absolute-positioned elements after htmx swaps. */
.notif-badge {
  display: none;
  position: absolute;
  top: 10px;
  right: 12px;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  pointer-events: none;
  z-index: 100;
}
.notif-badge.is-visible { display: inline-flex; }
.notif-badge-inline {
  position: static;
  margin-left: auto;
}
.bn-menu-icon-wrap {
  position: relative;
  display: inline-flex;
}
.notif-dot {
  display: none;
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bearish, #e74c3c);
  box-shadow: 0 0 0 2px var(--surface);
  pointer-events: none;
}
.notif-dot.is-visible { display: block; }

/* Swipe-to-action visual feedback. The .alert-card gets overflow:hidden so
   the translated summary doesn't escape the card; colored gradients reveal
   on either side as the user drags, signaling what action will fire if they
   complete the swipe (left = take/exit green, right = dismiss red). */
.alert-card { overflow: hidden; }
.alert-card.swiping summary.alert-summary {
  will-change: transform;
  position: relative;
  z-index: 1;
}
.alert-card::before,
.alert-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #fff;
  z-index: 0;
}
/* Left half — revealed when swiping LEFT (positive action) */
.alert-card::before {
  left: 0;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.95), rgba(34, 197, 94, 0));
  content: "✓ TAKE";
  justify-content: flex-start;
}
.alert-card.swiping-left::before { opacity: 1; }
.alert-card.swipe-armed.swiping-left::before {
  background: linear-gradient(90deg, rgba(34, 197, 94, 1), rgba(34, 197, 94, 0.2));
}
/* Right half — revealed when swiping RIGHT (negative action) */
.alert-card::after {
  right: 0;
  background: linear-gradient(270deg, rgba(239, 68, 68, 0.95), rgba(239, 68, 68, 0));
  content: "DISMISS ✕";
  justify-content: flex-end;
}
.alert-card.swiping-right::after { opacity: 1; }
.alert-card.swipe-armed.swiping-right::after {
  background: linear-gradient(270deg, rgba(239, 68, 68, 1), rgba(239, 68, 68, 0.2));
}
/* On active-trade cards the swipe-left action is EXIT not TAKE — re-label
   based on which action button the card actually carries. */
.alert-card:has(.act-btn.act-exit)::before { content: "✓ EXIT"; }

/* Action buttons inside the expanded details — desktop / fallback when swipe
   isn't practical. Spans full width, two side-by-side. */
.detail-actions {
  display: flex;
  gap: 10px;
  padding: 8px 14px 14px;
  border-top: 1px dashed var(--border-soft);
}
.detail-actions .act-btn {
  flex: 1 1 0;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
}
.detail-actions .act-state {
  flex: 1 1 0;
  text-align: center;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text-soft);
}
.detail-actions .state-done {
  flex: 1 1 0;
  text-align: center;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--bullish);
}

/* Inline "5.40 ASK" cell — option contract price + trigger side, sitting next
   to the expiry. Same font-size as expiry; only the side label is color-coded. */
.price-cell {
  font-size: 12px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-side { color: var(--text-soft); font-weight: 700; }
.price-side[data-side="ask"],
.price-side[data-side="bid"],
.price-side[data-side="mid"] { color: var(--text-soft); }

/* Yellow "new since last visit" dot — inline inside the summary, half the
   size of the side-dot so it reads as a marker, not a competing indicator.
   Hidden once the user expands the card or after a tap (.alert-seen) so we
   never depend on the flaky toggle-event capture path to dismiss it. */
.alert-card { position: relative; }
.alert-card[open] .new-dot,
.alert-card.alert-seen .new-dot { display: none; }
.new-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 6px 1px rgba(251, 191, 36, 0.85);
  pointer-events: none;
}

/* MID side gets blue — the original neutral color was yellow, which clashed
   with the new-since-last-visit dot. */
.side-dot.side-mid { background: #3b82f6; color: #3b82f6; }

/* Bias pill in the alert summary row — shows the directional read of the
   flow (Bullish = call buys / put sells, Bearish = call sells / put buys). */
.bias-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.bias-pill.bias-bullish { background: rgba(46, 204, 113, 0.18); color: var(--bullish, #2ECC71); }
.bias-pill.bias-bearish { background: rgba(244, 63, 94, 0.18); color: var(--bearish, #f43f5e); }
.bias-pill.bias-neutral { background: rgba(59, 130, 246, 0.18); color: #3b82f6; }

/* Multi-fill chip on the alert summary — shown when one contract had more
   than one alert today and they've been consolidated into a single card. */
.multi-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-soft);
  border: 1px solid var(--border-soft);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* "Related fills" sub-list inside an expanded alert card. Shown when there
   are sibling alerts on the same contract grouped under this primary one. */
.related-fills {
  border-top: 1px dashed var(--border-soft);
  padding: 8px 14px 12px;
}
.related-fills-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.related-fills-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.related-fill {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.related-fill:not(:last-child) {
  border-bottom-color: rgba(255, 255, 255, 0.03);
}
.related-fill-time { color: var(--text-soft); min-width: 64px; }
.related-fill-side { font-weight: 700; min-width: 36px; }
.related-fill-side.side-ask { color: var(--bullish, #2ECC71); }
.related-fill-side.side-bid { color: var(--bearish, #E74C3C); }
.related-fill-side.side-mid { color: var(--text-soft); }
.related-fill-vol { color: var(--text); }
.related-fill-prem { color: var(--text); margin-left: auto; }
.related-fill-score { color: var(--text-soft); }
