/* ─── NightOwl Dashboard — Shared Styles ────────────────────────────
   Color palette: deep navy/charcoal backgrounds, amber/gold accents,
   green for profit, red for loss. Mobile-first, 375px base. */

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

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #1c2128;
  --bg-hover: #1f2937;
  --border: #30363d;
  --border-light: #484f58;
  --accent: #f5a623;
  --accent-hover: #ffb840;
  --accent-glow: rgba(245, 166, 35, 0.15);
  --accent-dim: rgba(245, 166, 35, 0.6);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.15);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.15);
  --purple: #a855f7;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 150ms ease;
}

html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Typography ───────────────────────────────────────────────────── */
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }
.mono { font-family: var(--font-mono); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.5rem; }
.text-2xl { font-size: 2rem; }
.text-3xl { font-size: 2.5rem; font-weight: 700; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

.profit { color: var(--green); }
.loss { color: var(--red); }

/* ─── Layout ───────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 1rem;
  padding-bottom: 5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ─── Top Header ───────────────────────────────────────────────────── */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-header .logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-header .logo-area img {
  height: 32px;
  width: 32px;
  border-radius: 6px;
}

.top-header .logo-area .brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.top-header .header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-header .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.top-header .user-badge {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ─── Bottom Nav (Mobile) ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  z-index: 100;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.625rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  transition: color var(--transition);
  text-decoration: none;
}

.bottom-nav a:hover,
.bottom-nav a.active {
  color: var(--accent);
}

.bottom-nav a .nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

/* ─── Sidebar (Desktop) ───────────────────────────────────────────── */
.sidebar {
  display: none;
}

/* ─── Cards ────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.card-header h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-accent {
  border-left: 3px solid var(--accent);
}

/* ─── Stat Cards ───────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.875rem;
}

.stat-card .stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card .stat-change {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Hero stat (portfolio value) */
.hero-stat {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
}

.hero-stat .hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.hero-stat .hero-value {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .hero-pnl {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.375rem;
}

/* ─── Tables ───────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

thead th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

tbody tr:hover {
  background: var(--bg-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ─── Badges ───────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-green { background: var(--green-dim); color: var(--green); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-amber { background: var(--accent-glow); color: var(--accent); }
.badge-blue { background: var(--blue-dim); color: var(--blue); }
.badge-muted { background: rgba(72, 79, 88, 0.3); color: var(--text-secondary); }

/* ─── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 20px rgba(245, 166, 35, 0.25);
}

.btn-success {
  background: var(--green);
  color: #000;
}
.btn-success:hover {
  background: #16a34a;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-danger:hover {
  background: var(--red-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* ─── Form Elements ────────────────────────────────────────────────── */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="search"],
select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder { color: var(--text-muted); }

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

/* ─── Gauge / Progress ─────────────────────────────────────────────── */
.gauge-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.gauge-bar .gauge-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.gauge-bar .gauge-fill.low { background: var(--green); }
.gauge-bar .gauge-fill.medium { background: var(--accent); }
.gauge-bar .gauge-fill.high { background: var(--red); }

/* ─── Pill Tabs ────────────────────────────────────────────────────── */
.pill-tabs {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
}

.pill-tabs button {
  flex-shrink: 0;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.pill-tabs button:hover,
.pill-tabs button.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Filters Bar ──────────────────────────────────────────────────── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: flex-end;
}

.filters-bar .filter-group {
  flex: 1;
  min-width: 140px;
}

.filters-bar .filter-group label {
  font-size: 0.6875rem;
}

.filters-bar .filter-group select,
.filters-bar .filter-group input {
  padding: 0.5rem 0.625rem;
  font-size: 0.8125rem;
}

/* ─── Decision Feed ────────────────────────────────────────────────── */
.feed-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

.feed-item:last-child { border-bottom: none; }

.feed-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.feed-icon.tier-1 { background: var(--green-dim); color: var(--green); }
.feed-icon.tier-2 { background: var(--blue-dim); color: var(--blue); }
.feed-icon.tier-3 { background: var(--accent-glow); color: var(--accent); }

.feed-body { flex: 1; min-width: 0; }

.feed-body .feed-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.feed-body .feed-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.feed-body .feed-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.375rem;
  font-family: var(--font-mono);
}

/* ─── Edge Quality Score bars ──────────────────────────────────────── */
.eqs-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.eqs-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eqs-row .eqs-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  width: 120px;
  flex-shrink: 0;
}

.eqs-row .eqs-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.eqs-row .eqs-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.5s ease;
}

.eqs-row .eqs-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  width: 36px;
  text-align: right;
  color: var(--text-primary);
}

/* ─── Chart Container ──────────────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
  padding: 0.5rem 0;
}

.chart-container canvas {
  max-height: 280px;
}

/* ─── Proposal Card ────────────────────────────────────────────────── */
.proposal-detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.proposal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.proposal-actions .btn {
  flex: 1;
  padding: 0.875rem;
  font-size: 1rem;
}

/* ─── Proposal List ────────────────────────────────────────────────── */
.proposal-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color var(--transition);
}

.proposal-list-item:hover {
  border-color: var(--accent-dim);
}

.proposal-list-item .pli-info h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.proposal-list-item .pli-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.proposal-list-item .pli-meta {
  text-align: right;
}

.proposal-list-item .pli-meta .pli-score {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
}

/* ─── Divider ──────────────────────────────────────────────────────── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* ─── Page Title ───────────────────────────────────────────────────── */
.page-title {
  margin-bottom: 1rem;
}

.page-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
}

.page-title p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

/* ─── Empty State ──────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

/* ─── Login Page ───────────────────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background: radial-gradient(ellipse at 50% 30%, rgba(245,166,35,0.06) 0%, transparent 70%),
              var(--bg-primary);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

.login-logo img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}

.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.login-logo p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form .btn-primary {
  margin-top: 0.5rem;
  padding: 0.75rem;
  font-size: 0.9375rem;
}

/* ─── Section Spacing ──────────────────────────────────────────────── */
.section { margin-bottom: 1.25rem; }

/* ─── Metric Row ───────────────────────────────────────────────────── */
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.metric-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.metric-row .metric-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.metric-row .metric-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ─── Overnight Summary ────────────────────────────────────────────── */
.overnight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.overnight-grid .og-item .og-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.overnight-grid .og-item .og-label {
  font-size: 0.625rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.125rem;
}

/* ─── Scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── Animations ───────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pulse { animation: pulse 2s ease-in-out infinite; }

/* ─── Responsive: Tablet+ ─────────────────────────────────────────── */
@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-stat .hero-value { font-size: 3rem; }
  .overnight-grid { grid-template-columns: repeat(6, 1fr); }
  .main-content { padding: 1.5rem; padding-bottom: 5rem; }
}

/* ─── Responsive: Desktop ─────────────────────────────────────────── */
@media (min-width: 1024px) {
  .app-layout { flex-direction: row; }

  .bottom-nav { display: none; }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: 220px;
    min-height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    flex-shrink: 0;
  }

  .sidebar .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1.25rem 1.5rem;
  }

  .sidebar .sidebar-logo img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .sidebar .sidebar-logo .brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
  }

  .sidebar nav { flex: 1; }

  .sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    text-decoration: none;
    border-left: 3px solid transparent;
  }

  .sidebar nav a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
  }

  .sidebar nav a.active {
    color: var(--accent);
    background: var(--accent-glow);
    border-left-color: var(--accent);
  }

  .sidebar nav a .nav-icon {
    font-size: 1.125rem;
    width: 22px;
    text-align: center;
  }

  .sidebar .sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
  }

  .sidebar .sidebar-footer .status-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
  }

  .sidebar .sidebar-footer .status-dot-sm {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
  }

  .top-header { display: none; }

  .main-content {
    padding: 2rem;
    padding-bottom: 2rem;
  }
}

/* ─── Utility ──────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── What This Means ─────────────────────────────────────────────── */
.what-this-means {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.what-this-means .wtm-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue);
}

.what-this-means .wtm-icon {
  font-size: 1rem;
  line-height: 1;
}

.what-this-means .wtm-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── EQS Enhancements ───────────────────────────────────────────── */
.eqs-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.eqs-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  font-size: 0.625rem;
  font-style: normal;
  color: var(--text-secondary);
  cursor: help;
  flex-shrink: 0;
}

.eqs-tooltip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.eqs-quality-label {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.eqs-quality-label.strong {
  background: var(--green-dim);
  color: var(--green);
}

.eqs-quality-label.moderate {
  background: var(--accent-glow);
  color: var(--accent);
}

.eqs-quality-label.weak {
  background: var(--red-dim);
  color: var(--red);
}

.eqs-row-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.eqs-row .eqs-val {
  width: 44px;
}

.eqs-bar-fill.bar-strong {
  background: var(--green);
}

.eqs-bar-fill.bar-weak {
  background: var(--red);
}

.eqs-dimension-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding-left: calc(120px + 0.75rem);
}

/* ─── Dollar Context ──────────────────────────────────────────────── */
.dollar-context {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.risk-reward-summary {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.65;
  border-left: 3px solid var(--accent);
}

.risk-reward-summary strong {
  color: var(--text-primary);
}

/* ─── Status Flow Indicator ───────────────────────────────────────── */
.status-flow {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
  gap: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.status-flow::-webkit-scrollbar { display: none; }

.status-flow-step {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.status-flow-step.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.status-flow-step.completed {
  color: var(--green);
}

.status-flow-arrow {
  color: var(--text-muted);
  font-size: 0.625rem;
  padding: 0 0.125rem;
  flex-shrink: 0;
}

/* ─── Proposal Action Variants ────────────────────────────────────── */
.proposal-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
