/* ============================================================
   LUMEN MOBILE COMPANION — Design System (Dark Theme)
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Instrument+Serif&family=JetBrains+Mono:wght@500&display=swap');

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  --color-bg-app: #0b0d12;
  --color-bg-page: #0a0d14;
  --color-bg-card: rgba(255,255,255,0.025);
  --color-bg-card-hover: rgba(255,255,255,0.05);
  --color-bg-elevated: rgba(255,255,255,0.04);
  --color-border: rgba(255,255,255,0.05);
  --color-border-hover: rgba(255,255,255,0.08);
  --color-border-subtle: rgba(255,255,255,0.045);
  --color-text-primary: #fafafa;
  --color-text-secondary: #9ca3af;
  --color-text-muted: #6b7280;
  --color-text-dim: #4b5563;
  --color-indigo: #6366f1;
  --color-indigo-light: #a5b4fc;
  --color-purple: #a855f7;
  --color-purple-light: #d8b4fe;
  --color-green: #34d399;
  --color-green-light: #6ee7b7;
  --color-red: #f43f5e;
  --color-red-light: #fda4af;
  --color-amber: #f59e0b;
  --color-amber-light: #fcd34d;
  --color-cyan: #22d3ee;
  --font-sans: 'Geist', 'Inter', -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-2xl: 22px;
}

/* --- Body / Page Background --- */
body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 20% 0%, #1a1f2e 0%, #0a0d14 60%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  color: #e5e7eb;
}

/* --- Device Frame --- */
.frame {
  margin-top: 20px;
  width: 390px;
  height: 844px;
  background: var(--color-bg-app);
  border-radius: 48px;
  border: 10px solid #0a0a0a;
  box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: #000;
  border-radius: 20px;
  z-index: 30;
}

/* --- Status Bar --- */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 30px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #f9fafb;
  flex-shrink: 0;
  z-index: 20;
}
.status-bar .status-icons { display: flex; gap: 5px; align-items: center; }

/* --- App Content Area --- */
#app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#app-content::-webkit-scrollbar { display: none; }

/* --- Nav Slot --- */
#nav-slot { flex-shrink: 0; }

/* --- Screen Transitions --- */
.screen-exit { opacity: 0.5; transition: opacity 80ms ease-out; }
.screen-enter { animation: screenFadeIn 200ms ease-out; }
@keyframes screenFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* --- Background Orbs --- */
.bg-orb { position: absolute; top: -50px; right: -80px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(99,102,241,.18), transparent 70%); border-radius: 50%; pointer-events: none; z-index: 0; }
.bg-orb2 { position: absolute; top: 300px; left: -100px; width: 280px; height: 280px; background: radial-gradient(circle, rgba(34,211,238,.1), transparent 70%); border-radius: 50%; pointer-events: none; z-index: 0; }

/* --- Header --- */
.header {
  position: relative;
  padding: 16px 22px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 11px; }
.logo {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 20px rgba(99,102,241,.4);
}
.logo--large { width: 52px; height: 52px; font-size: 22px; border-radius: 16px; }
.brand h1 { font-size: 15px; font-weight: 600; color: #f9fafb; letter-spacing: -0.01em; }
.brand .sub { font-size: 11px; color: var(--color-text-muted); font-weight: 500; }
.head-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--color-bg-elevated); border: 1px solid rgba(255,255,255,.06);
  display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(20px); position: relative;
  color: #cbd5e1; transition: background .15s;
}
.icon-btn:active { background: rgba(255,255,255,.08); transform: scale(0.95); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px; width: 7px; height: 7px;
  background: var(--color-red); border-radius: 50%;
  box-shadow: 0 0 8px rgba(244,63,94,.6);
}

/* --- Hero / Greeting --- */
.hero { position: relative; padding: 22px 22px 20px; z-index: 5; }
.hero h2 {
  font-family: var(--font-serif); font-size: 36px; font-weight: 400;
  color: var(--color-text-primary); letter-spacing: -0.01em; line-height: 1;
}
.hero h2 em { font-style: italic; color: var(--color-indigo-light); }
.hero .sub {
  font-size: 13px; color: var(--color-text-secondary);
  margin-top: 6px; display: flex; align-items: center; gap: 8px;
}
.live-pulse { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--color-green); font-weight: 500; }
.live-dot {
  width: 6px; height: 6px; background: var(--color-green);
  border-radius: 50%; box-shadow: 0 0 8px var(--color-green);
  animation: pulse 1.8s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* --- Priority Card --- */
.priority-card {
  position: relative; margin: 6px 18px 18px; padding: 18px; border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, rgba(244,63,94,.16) 0%, rgba(244,63,94,.04) 100%);
  border: 1px solid rgba(244,63,94,.25);
  overflow: hidden; backdrop-filter: blur(20px); z-index: 5;
  animation: cardScaleIn 0.3s ease-out;
}
.priority-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
}
@keyframes cardScaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.pc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.pc-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: #fecaca; background: rgba(244,63,94,.18);
  padding: 4px 9px; border-radius: var(--radius-sm);
  border: 1px solid rgba(244,63,94,.2);
}
.pc-time { font-size: 11px; color: var(--color-text-secondary); font-family: var(--font-mono); }
.pc-title { font-size: 17px; font-weight: 600; color: var(--color-text-primary); letter-spacing: -0.01em; margin-bottom: 4px; }
.pc-desc { font-size: 13px; color: #cbd5e1; line-height: 1.5; }
.pc-desc b { color: var(--color-text-primary); font-weight: 600; }
.pc-actions { display: flex; gap: 8px; margin-top: 14px; }

/* Breach detail inline */
.pc-breach-detail, .alert-breach-detail { margin-top: 12px; animation: slideDown 0.2s ease-out; }
.breach-info { background: rgba(0,0,0,0.2); border-radius: var(--radius-md); padding: 10px 12px; }
.breach-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; }
.breach-label { color: var(--color-text-muted); }
.breach-val { color: var(--color-text-primary); font-weight: 500; font-family: var(--font-mono); font-size: 11px; }
.breach-val--danger { color: var(--color-red-light); }
@keyframes slideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 300px; } }

/* --- Buttons --- */
.btn {
  font-size: 12.5px; padding: 9px 14px; border-radius: var(--radius-md);
  font-weight: 500; cursor: pointer; border: none; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; transition: all .15s;
}
.btn:active { transform: scale(0.96); opacity: 0.9; }
.btn-primary { background: #fafafa; color: #0b0d12; font-weight: 600; }
.btn-ghost {
  background: rgba(255,255,255,.06); color: #e5e7eb;
  border: 1px solid rgba(255,255,255,.08);
}
.btn:disabled { opacity: 0.4; cursor: default; transform: none; }

/* --- Summary Stats --- */
.summary {
  position: relative; padding: 0 22px 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; z-index: 5;
}
.stat {
  padding: 13px 12px; border-radius: var(--radius-lg);
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  backdrop-filter: blur(20px);
  animation: statScaleIn 0.3s ease-out both;
}
.stat:nth-child(1) { animation-delay: 0ms; }
.stat:nth-child(2) { animation-delay: 60ms; }
.stat:nth-child(3) { animation-delay: 120ms; }
@keyframes statScaleIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.stat .n { font-size: 21px; font-weight: 600; letter-spacing: -0.03em; color: var(--color-text-primary); }
.stat .l { font-size: 10px; color: var(--color-text-secondary); font-weight: 500; margin-top: 2px; letter-spacing: .02em; }
.stat .delta { font-size: 10px; font-weight: 500; margin-top: 2px; font-family: var(--font-mono); }
.delta.up { color: var(--color-green); }
.delta.down { color: #f87171; }

/* --- Segment Control --- */
.segm {
  position: relative; margin: 0 22px 14px; padding: 4px;
  background: var(--color-bg-elevated); border: 1px solid var(--color-border);
  border-radius: 13px; display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 2px; z-index: 5;
}
.seg {
  padding: 8px 6px; font-size: 12px; font-weight: 500;
  color: var(--color-text-secondary); text-align: center;
  border-radius: var(--radius-md); cursor: pointer; transition: .2s;
}
.seg:active { transform: scale(0.96); }
.seg.active {
  background: rgba(255,255,255,.08); color: var(--color-text-primary);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 2px 8px rgba(0,0,0,.2);
}

/* --- Section Label --- */
.section-label {
  padding: 8px 22px 8px; font-size: 10.5px; font-weight: 600;
  color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .1em;
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 5;
}
.section-label a {
  color: var(--color-indigo-light); font-size: 11px; font-weight: 500;
  text-transform: none; letter-spacing: 0; text-decoration: none; cursor: pointer;
}
.section-label a:active { opacity: 0.7; }

/* --- Alert Feed --- */
.feed { position: relative; padding: 0 18px 16px; z-index: 5; }

/* --- Alert Card --- */
.alert {
  display: flex; gap: 13px; padding: 14px; border-radius: var(--radius-xl);
  background: var(--color-bg-card); border: 1px solid var(--color-border-subtle);
  margin-bottom: 8px; cursor: pointer; transition: .2s; position: relative;
  animation: alertSlideIn 0.25s ease-out both;
}
.alert:nth-child(1) { animation-delay: 0ms; }
.alert:nth-child(2) { animation-delay: 50ms; }
.alert:nth-child(3) { animation-delay: 100ms; }
.alert:nth-child(4) { animation-delay: 150ms; }
.alert:nth-child(5) { animation-delay: 200ms; }
.alert:nth-child(6) { animation-delay: 250ms; }
@keyframes alertSlideIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.alert:active { background: var(--color-bg-card-hover); border-color: var(--color-border-hover); transform: scale(0.99); }
.alert.unread {
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(255,255,255,.02));
  border-color: rgba(99,102,241,.18);
}
.alert-ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.ico-price { background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(99,102,241,.08)); color: var(--color-indigo-light); border: 1px solid rgba(99,102,241,.2); }
.ico-idea { background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(168,85,247,.08)); color: var(--color-purple-light); border: 1px solid rgba(168,85,247,.2); }
.ico-perf { background: linear-gradient(135deg, rgba(52,211,153,.25), rgba(52,211,153,.08)); color: var(--color-green-light); border: 1px solid rgba(52,211,153,.2); }
.ico-risk { background: linear-gradient(135deg, rgba(251,146,60,.25), rgba(251,146,60,.08)); color: #fdba74; border: 1px solid rgba(251,146,60,.2); }

.alert-body { flex: 1; min-width: 0; }
.alert-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.alert-title { font-size: 14px; font-weight: 600; color: var(--color-text-primary); letter-spacing: -0.005em; line-height: 1.3; }
.alert-time { font-size: 10.5px; color: var(--color-text-muted); flex-shrink: 0; font-family: var(--font-mono); }
.alert-desc { font-size: 12.5px; color: var(--color-text-secondary); margin-top: 4px; line-height: 1.45; }
.alert-desc b { color: #e5e7eb; font-weight: 500; }
.alert-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ticker {
  font-size: 10.5px; font-weight: 600; color: #cbd5e1;
  font-family: var(--font-mono); letter-spacing: .02em;
  padding: 2px 7px; background: rgba(255,255,255,.05); border-radius: 5px;
}
.delta-pill { font-size: 11px; font-weight: 600; font-family: var(--font-mono); }
.delta-pill.up { color: var(--color-green); }
.delta-pill.down { color: #f87171; }
.alert-quick { display: flex; gap: 6px; margin-top: 10px; }
.qbtn {
  font-size: 11.5px; padding: 5px 10px; border-radius: 7px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07);
  color: #e5e7eb; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px; transition: .15s;
}
.qbtn:active { transform: scale(0.96); opacity: 0.8; }
.qbtn.primary { background: rgba(255,255,255,.92); color: #0b0d12; border-color: transparent; font-weight: 600; }

/* --- Bottom Nav --- */
.nav {
  padding: 14px 24px 8px; background: rgba(11,13,18,.85);
  backdrop-filter: blur(30px); border-top: 1px solid var(--color-border);
  display: flex; justify-content: space-around; align-items: center; z-index: 10;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 10px; color: var(--color-text-muted); font-weight: 500;
  cursor: pointer; transition: color .15s;
}
.nav-item:active { transform: scale(0.94); }
.nav-item svg { width: 21px; height: 21px; }
.nav-item.active { color: var(--color-text-primary); }
.nav-item.active .nav-ico { background: rgba(255,255,255,.08); box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.nav-ico { width: 42px; height: 30px; border-radius: var(--radius-md); display: grid; place-items: center; transition: background .15s; }
.home-ind { height: 5px; width: 130px; background: #fafafa; border-radius: 3px; margin: 6px auto 8px; opacity: 0.9; }

/* --- Toast System --- */
.toast-container {
  position: absolute; top: 60px; left: 16px; right: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}
.mobile-toast {
  padding: 10px 14px; border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 500; color: var(--color-text-primary);
  backdrop-filter: blur(20px);
  transform: translateY(-10px); opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}
.mobile-toast--show { transform: translateY(0); opacity: 1; }
.mobile-toast--hide { transform: translateY(-10px); opacity: 0; }
.mobile-toast--info { background: rgba(99,102,241,0.9); }
.mobile-toast--success { background: rgba(16,185,129,0.9); }
.mobile-toast--warning { background: rgba(245,158,11,0.9); }
.mobile-toast--error { background: rgba(244,63,94,0.9); }
.mobile-toast__icon { flex-shrink: 0; display: flex; }
.mobile-toast__msg { flex: 1; }

/* --- Login Screen --- */
.login-screen { padding: 40px 22px 20px; position: relative; z-index: 5; }
.login-brand { text-align: center; margin-bottom: 32px; }
.login-title {
  font-family: var(--font-serif); font-size: 32px; color: var(--color-text-primary);
  margin-top: 12px; letter-spacing: -0.01em;
}
.login-subtitle { font-size: 13px; color: var(--color-text-secondary); margin-top: 4px; }
.login-section-label {
  font-size: 10.5px; font-weight: 600; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px;
}
.login-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.login-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: var(--radius-xl); background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle); cursor: pointer; transition: .2s;
}
.login-card:active { transform: scale(0.98); background: var(--color-bg-card-hover); }
.login-card--active { border-color: var(--color-indigo); background: rgba(99,102,241,.08); }
.login-card--disabled { opacity: 0.5; cursor: default; }
.login-card--disabled:active { transform: none; background: var(--color-bg-card); }
.login-card__avatar {
  width: 40px; height: 40px; border-radius: 12px; display: grid;
  place-items: center; color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.login-card__info { flex: 1; }
.login-card__name { font-size: 14px; font-weight: 600; color: var(--color-text-primary); }
.login-card__role { font-size: 11.5px; color: var(--color-text-secondary); margin-top: 1px; }

.login-form {
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl); padding: 18px; animation: slideDown 0.2s ease-out;
}
.login-form__header { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 14px; }
.login-form__header strong { color: var(--color-text-primary); }
.login-field { margin-bottom: 12px; }
.login-field label { display: block; font-size: 11px; color: var(--color-text-muted); font-weight: 500; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.login-input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-md);
  background: rgba(255,255,255,.04); border: 1px solid var(--color-border);
  color: var(--color-text-primary); font-family: inherit; font-size: 13px;
  outline: none;
}
.login-input:focus { border-color: var(--color-indigo); }
.login-submit { width: 100%; justify-content: center; padding: 12px; font-size: 14px; margin-top: 4px; border-radius: 12px; }

/* --- Screen Title Section --- */
.screen-title-section { padding: 16px 22px 12px; position: relative; z-index: 5; }
.screen-title { font-size: 22px; font-weight: 700; color: var(--color-text-primary); letter-spacing: -0.02em; }
.screen-subtitle { font-size: 12.5px; color: var(--color-text-secondary); margin-top: 2px; }

/* --- Watchlist --- */
.watchlist-list { padding: 0 18px 16px; position: relative; z-index: 5; }
.watchlist-item {
  display: flex; align-items: center; gap: 10px; padding: 14px;
  border-radius: var(--radius-xl); background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle); margin-bottom: 8px;
  cursor: pointer; transition: .2s;
  animation: alertSlideIn 0.25s ease-out both;
}
.watchlist-item:nth-child(1) { animation-delay: 0ms; }
.watchlist-item:nth-child(2) { animation-delay: 40ms; }
.watchlist-item:nth-child(3) { animation-delay: 80ms; }
.watchlist-item:nth-child(4) { animation-delay: 120ms; }
.watchlist-item:nth-child(5) { animation-delay: 160ms; }
.watchlist-item:nth-child(6) { animation-delay: 200ms; }
.watchlist-item:active { background: var(--color-bg-card-hover); transform: scale(0.99); }
.watchlist-item--triggered { border-left: 3px solid var(--color-amber); }
.watchlist-item__left { flex: 1; min-width: 0; }
.watchlist-item__ticker-row { display: flex; align-items: center; gap: 6px; }
.watchlist-item__ticker { font-size: 14px; font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); }
.watchlist-item__flame { display: flex; }
.watchlist-item__name { font-size: 11px; color: var(--color-text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watchlist-item__chart { flex-shrink: 0; }
.watchlist-item__right { text-align: right; flex-shrink: 0; min-width: 70px; }
.watchlist-item__price { font-size: 14px; font-weight: 600; color: var(--color-text-primary); font-family: var(--font-mono); }
.watchlist-item__change { font-size: 11px; font-weight: 600; font-family: var(--font-mono); margin-top: 1px; }

/* FAB */
.fab {
  position: absolute; bottom: 90px; right: 22px; z-index: 15;
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-indigo), var(--color-purple));
  border: none; color: #fff; display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 8px 24px rgba(99,102,241,.5);
  transition: .15s;
}
.fab:active { transform: scale(0.92); }

/* --- Stock Detail Modal --- */
.stock-detail__header { display: flex; justify-content: space-between; align-items: flex-start; }
.stock-detail__ticker { font-size: 20px; font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); }
.stock-detail__exchange { font-size: 11px; color: var(--color-text-muted); margin-left: 6px; }
.stock-detail__price-block { text-align: right; }
.stock-detail__price { font-size: 20px; font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); }
.stock-detail__change { font-size: 12px; font-weight: 600; font-family: var(--font-mono); }
.stock-detail__name { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; }
.stock-detail__meta { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.stock-detail__meta-item { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.stock-detail__label { color: var(--color-text-muted); }
.stock-detail__value { color: var(--color-text-primary); font-weight: 500; font-family: var(--font-mono); font-size: 12px; }
.stock-detail__actions { display: flex; gap: 8px; margin-top: 16px; }
.stock-detail__actions .btn { flex: 1; justify-content: center; }

/* Add stock modal */
.add-stock-list { max-height: 350px; overflow-y: auto; }
.add-stock-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--color-border);
}
.add-stock-item__left { display: flex; gap: 8px; align-items: center; }
.add-stock-item__ticker { font-size: 13px; font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); min-width: 50px; }
.add-stock-item__name { font-size: 12px; color: var(--color-text-secondary); }
.add-stock-item__btn { padding: 6px 10px; font-size: 11px; }

/* --- Portfolio View --- */
.portfolio-pills-scroll { padding: 12px 22px 8px; overflow-x: auto; position: relative; z-index: 5; scrollbar-width: none; }
.portfolio-pills-scroll::-webkit-scrollbar { display: none; }
.portfolio-pills { display: flex; gap: 8px; }
.portfolio-pill {
  padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 500;
  color: var(--color-text-secondary); background: var(--color-bg-card);
  border: 1px solid var(--color-border); cursor: pointer; white-space: nowrap;
  transition: .15s;
}
.portfolio-pill:active { transform: scale(0.96); }
.portfolio-pill--active {
  background: rgba(255,255,255,.1); color: var(--color-text-primary);
  border-color: rgba(255,255,255,.15);
}

.portfolio-hero-card {
  margin: 8px 18px 12px; padding: 20px; border-radius: var(--radius-2xl);
  background: var(--color-bg-card); border: 1px solid var(--color-border-subtle);
  backdrop-filter: blur(20px); position: relative; z-index: 5; overflow: hidden;
  animation: cardScaleIn 0.3s ease-out;
}
.portfolio-hero-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
}
.portfolio-hero-card__label { font-size: 11px; color: var(--color-text-muted); font-weight: 500; letter-spacing: .02em; }
.portfolio-hero-card__value { font-size: 28px; font-weight: 700; color: var(--color-text-primary); margin-top: 4px; font-family: var(--font-sans); letter-spacing: -0.03em; }
.portfolio-hero-card__pnl { font-size: 14px; font-weight: 600; font-family: var(--font-mono); margin-top: 2px; }
.portfolio-hero-card__spark { margin-top: 12px; }
.portfolio-hero-card__period { font-size: 10px; color: var(--color-text-muted); margin-top: 6px; }

.positions-list { padding: 0 18px 8px; position: relative; z-index: 5; }
.position-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: var(--radius-xl); background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle); margin-bottom: 6px;
  cursor: pointer; transition: .15s;
  animation: alertSlideIn 0.25s ease-out both;
}
.position-row:active { background: var(--color-bg-card-hover); transform: scale(0.99); }
.position-row__left { display: flex; align-items: center; gap: 10px; }
.position-row__ticker { font-size: 14px; font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); }
.position-row__weight { font-size: 10px; color: var(--color-text-muted); font-family: var(--font-mono); background: rgba(255,255,255,.05); padding: 2px 6px; border-radius: 4px; }
.position-row__right { text-align: right; }
.position-row__value { font-size: 13px; font-weight: 600; color: var(--color-text-primary); font-family: var(--font-mono); }
.position-row__pnl { font-size: 11px; font-weight: 600; font-family: var(--font-mono); margin-top: 1px; }

.risk-bar {
  margin: 8px 18px 8px; padding: 12px 14px; border-radius: var(--radius-lg);
  border: 1px solid; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; position: relative; z-index: 5; transition: .15s;
}
.risk-bar:active { transform: scale(0.98); opacity: 0.9; }
.risk-bar__left { display: flex; align-items: center; gap: 8px; }

.last-updated { text-align: center; font-size: 10px; color: var(--color-text-muted); padding: 8px 0 16px; position: relative; z-index: 5; }

/* --- Execution Monitor --- */
.orders-list { padding: 0 18px 16px; position: relative; z-index: 5; }
.order-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px; border-radius: var(--radius-xl); background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle); margin-bottom: 8px;
  cursor: pointer; transition: .15s;
  animation: alertSlideIn 0.25s ease-out both;
}
.order-row:active { background: var(--color-bg-card-hover); transform: scale(0.99); }
.order-row__left { flex: 1; }
.order-row__ticker-line { display: flex; align-items: center; gap: 8px; }
.order-row__ticker { font-size: 15px; font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); }
.order-row__meta { font-size: 11px; color: var(--color-text-muted); margin-top: 3px; }
.order-row__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.order-row__time { font-size: 10px; color: var(--color-text-muted); font-family: var(--font-mono); }

.order-status-badge, .order-dir-badge {
  display: inline-flex; font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: var(--radius-sm);
  text-transform: uppercase; letter-spacing: .04em;
}

/* Order Detail Modal */
.order-detail__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.order-detail__ticker { font-size: 22px; font-weight: 700; color: var(--color-text-primary); font-family: var(--font-mono); }
.order-detail__name { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 14px; }
.order-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.order-detail__cell { padding: 8px 10px; background: rgba(255,255,255,.03); border-radius: var(--radius-md); }
.order-detail__label { display: block; font-size: 10px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .05em; }
.order-detail__value { display: block; font-size: 13px; font-weight: 600; color: var(--color-text-primary); margin-top: 2px; }
.order-detail__section-title { font-size: 11px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .08em; margin: 12px 0 6px; }
.fills-list { display: flex; flex-direction: column; gap: 4px; }
.fill-row { display: flex; justify-content: space-between; font-size: 12px; padding: 6px 10px; background: rgba(255,255,255,.03); border-radius: var(--radius-sm); }
.fill-qty { color: var(--color-text-primary); font-family: var(--font-mono); font-size: 11px; }
.fill-time { color: var(--color-text-muted); font-family: var(--font-mono); font-size: 11px; }
.order-detail__impact { font-size: 12px; color: var(--color-text-secondary); padding: 8px 10px; background: rgba(255,255,255,.03); border-radius: var(--radius-sm); font-family: var(--font-mono); }
.order-detail__reject { font-size: 12px; color: var(--color-red-light); padding: 8px 10px; background: rgba(244,63,94,.08); border-radius: var(--radius-sm); border: 1px solid rgba(244,63,94,.15); }

.order-detail__trader-actions { margin-top: 16px; border-top: 1px solid var(--color-border); padding-top: 14px; }
.order-detail__ack { width: 100%; justify-content: center; margin-bottom: 12px; }
.order-detail__annotation { margin-top: 4px; }
.order-detail__annotation-label { font-size: 11px; color: var(--color-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 4px; }
.order-detail__textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-md);
  background: rgba(255,255,255,.04); border: 1px solid var(--color-border);
  color: var(--color-text-primary); font-family: inherit; font-size: 13px;
  resize: vertical; min-height: 60px; outline: none;
}
.order-detail__textarea:focus { border-color: var(--color-indigo); }
.order-detail__textarea::placeholder { color: var(--color-text-muted); }

/* --- Mobile Modal (Bottom Sheet) --- */
.mobile-modal-overlay {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end;
  opacity: 0; transition: opacity 0.3s ease;
}
.mobile-modal--show { opacity: 1; }
.mobile-modal--show .mobile-modal-sheet { transform: translateY(0); }
.mobile-modal--hide { opacity: 0; }
.mobile-modal--hide .mobile-modal-sheet { transform: translateY(100%); }
.mobile-modal-sheet {
  width: 100%; max-height: 75%; overflow-y: auto;
  background: #13151c; border-top-left-radius: 24px; border-top-right-radius: 24px;
  padding: 12px 20px 24px; border-top: 1px solid var(--color-border);
  transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: none;
}
.mobile-modal-sheet::-webkit-scrollbar { display: none; }
.mobile-modal-handle { width: 36px; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; margin: 0 auto 14px; }
.mobile-modal-title { font-size: 16px; font-weight: 700; color: var(--color-text-primary); margin-bottom: 16px; letter-spacing: -0.01em; }
.mobile-modal-content { }

/* --- Empty State --- */
.mobile-empty-state { padding: 48px 24px; text-align: center; position: relative; z-index: 5; }
.mobile-empty-state__icon { color: var(--color-text-muted); margin-bottom: 12px; display: flex; justify-content: center; }
.mobile-empty-state__title { font-size: 16px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 4px; }
.mobile-empty-state__subtitle { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 16px; }
.mobile-empty-state__action { margin: 0 auto; }

/* --- Icon utility --- */
.icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }

/* --- Mini sparkline SVG --- */
.mini-sparkline { display: block; }
