/* ================================================================
   ROAD OF BILLIONAIRE — Master Design System
   Aesthetic: Premium Bloomberg Terminal × Luxury Fintech
   Font: DM Mono (data) + Syne (display) + DM Sans (body)
   Color: Deep Navy + Teal (#29d3b4) + Amber (#f5a623) + Crimson
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Mono:wght@300;400;500&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg-void:       #060912;
  --bg-deep:       #0b0f1e;
  --bg-surface:    #0f1628;
  --bg-elevated:   #141c33;
  --bg-glass:      rgba(14, 22, 42, 0.85);

  --teal:          #29d3b4;
  --teal-dim:      rgba(41, 211, 180, 0.15);
  --teal-border:   rgba(41, 211, 180, 0.25);
  --amber:         #f5a623;
  --amber-dim:     rgba(245, 166, 35, 0.12);
  --amber-border:  rgba(245, 166, 35, 0.25);
  --crimson:       #ef4444;
  --crimson-dim:   rgba(239, 68, 68, 0.12);
  --emerald:       #22c55e;
  --emerald-dim:   rgba(34, 197, 94, 0.10);
  --sapphire:      #3b82f6;
  --sapphire-dim:  rgba(59, 130, 246, 0.10);
  --violet:        #a78bfa;
  --violet-dim:    rgba(167, 139, 250, 0.10);

  --text-primary:  #f0f4ff;
  --text-secondary:#8b9ab8;
  --text-muted:    #4a5878;
  --text-label:    #6b7fa0;

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-mild:   rgba(255, 255, 255, 0.09);
  --border-glow:   rgba(41, 211, 180, 0.3);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  --shadow-card:  0 4px 24px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow:  0 0 40px rgba(41,211,180,0.08);

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

/* ── Global Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Noise texture overlay ──────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── Animated background grid ──────────────────────────────── */
.app-body, .landing-body {
  background:
    linear-gradient(180deg, var(--bg-void) 0%, #080d1e 50%, var(--bg-void) 100%);
  position: relative;
}

.app-body::after, .landing-body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(41,211,180,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41,211,180,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ================================================================
   LANDING PAGE
   ================================================================ */

.landing-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

/* Radial glow behind card */
.landing-body .glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.landing-body .orb-teal {
  width: 500px; height: 500px;
  background: rgba(41,211,180,0.07);
  top: -100px; left: -100px;
}
.landing-body .orb-amber {
  width: 400px; height: 400px;
  background: rgba(245,166,35,0.05);
  bottom: -80px; right: -80px;
}

.landing-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  animation: fadeSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Live ticker at top */
.landing-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}

.landing-ticker .tick-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

.landing-ticker .tick-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-ticker .tick-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.06em;
}

/* Main landing card */
.landing-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-mild);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(41,211,180,0.06) inset;
  position: relative;
  overflow: hidden;
}

/* Top accent line */
.landing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

.landing-brand {
  margin-bottom: 32px;
}

.landing-brand .brand-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.landing-brand .brand-eyebrow::before,
.landing-brand .brand-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--teal-border);
}

.landing-brand h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.landing-brand h1 span { color: var(--teal); }

.landing-brand .brand-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

/* Step blocks */
.landing-step {
  margin-bottom: 28px;
}

.landing-step .step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.landing-step .step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.landing-step .step-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* Divider */
.landing-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 24px 0;
  position: relative;
}

/* Form fields */
.rob-field {
  margin-bottom: 14px;
}

.rob-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: 7px;
}

.rob-field input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-mild);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: all 0.2s ease;
  outline: none;
}

.rob-field input:focus {
  border-color: var(--teal-border);
  background: rgba(41,211,180,0.04);
  box-shadow: 0 0 0 3px rgba(41,211,180,0.08);
}

.rob-field input::placeholder { color: var(--text-muted); }

/* Buttons */
.rob-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.rob-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--teal) 0%, #1fb89f 100%);
  color: #061210;
  box-shadow: 0 4px 16px rgba(41,211,180,0.3);
}

.rob-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(41,211,180,0.4);
}

.rob-btn-primary:active { transform: translateY(0); }

.rob-btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-mild);
  color: var(--text-secondary);
}

.rob-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.rob-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.rob-btn-row .rob-btn-primary { flex: 1; }

/* Alert messages */
.rob-alert {
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 13px;
  margin-top: 14px;
  display: none;
  border-left: 3px solid;
}

.rob-alert.error {
  background: var(--crimson-dim);
  border-color: var(--crimson);
  color: #fca5a5;
  display: block;
}

.rob-alert.success {
  background: var(--emerald-dim);
  border-color: var(--emerald);
  color: #86efac;
  display: block;
}

/* Info note */
.rob-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.rob-note code {
  color: var(--amber);
  background: var(--amber-dim);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
}

/* Signed-in badge */
.signed-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: var(--emerald-dim);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #4ade80;
  margin-bottom: 16px;
}

.signed-badge .s-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

/* ================================================================
   DASHBOARD — APP HEADER
   ================================================================ */

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 9, 18, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-border), transparent);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-brand .hb-indicator {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 12px;
  border-right: 1px solid var(--border-subtle);
}

.header-brand .hb-dot {
  width: 16px; height: 3px;
  border-radius: 2px;
}

.hb-dot:nth-child(1) { background: var(--teal); width: 16px; }
.hb-dot:nth-child(2) { background: var(--amber); width: 10px; }
.hb-dot:nth-child(3) { background: var(--sapphire); width: 6px; }

.header-brand .hb-text { display: flex; flex-direction: column; }

.hb-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hb-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Token timer chip */
.token-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.2);
  color: var(--amber);
  letter-spacing: 0.04em;
}

.token-chip.alert-success {
  background: var(--emerald-dim);
  border-color: rgba(34,197,94,0.2);
  color: #4ade80;
}

.token-chip.alert-danger {
  background: var(--crimson-dim);
  border-color: rgba(239,68,68,0.2);
  color: #f87171;
}

.token-chip.alert-warning {
  background: var(--amber-dim);
  border-color: var(--amber-border);
  color: var(--amber);
}

/* Settings button */
.btn-settings {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-mild);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-settings:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text-primary);
  border-color: var(--border-glow);
}

/* ================================================================
   DASHBOARD — MAIN AREA
   ================================================================ */

.app-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 56px);
}

.dash-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* Welcome heading */
.welcome-heading {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
  position: relative;
}

.welcome-heading .wh-accent { color: var(--teal); }

/* ── Dashboard Grid ─────────────────────────────────────────── */
.dash-row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.dash-row-1 {
  grid-template-columns: 180px 200px 200px 1fr;
}

.dash-row-2 {
  grid-template-columns: 1fr 1fr;
}

/* ── Cards ──────────────────────────────────────────────────── */
.d-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.d-card:hover {
  border-color: var(--border-mild);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* Card top accent */
.d-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  opacity: 0.4;
}

.d-card.accent-teal::before   { background: linear-gradient(90deg, transparent, var(--teal), transparent); }
.d-card.accent-amber::before  { background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.d-card.accent-emerald::before{ background: linear-gradient(90deg, transparent, var(--emerald), transparent); }
.d-card.accent-sapphire::before{ background: linear-gradient(90deg, transparent, var(--sapphire), transparent); }
.d-card.accent-violet::before { background: linear-gradient(90deg, transparent, var(--violet), transparent); }
.d-card.accent-crimson::before{ background: linear-gradient(90deg, transparent, var(--crimson), transparent); }

/* Card Header */
.d-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.d-card-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.d-card-title .ct-icon {
  font-size: 13px;
  opacity: 0.7;
}

/* Accent colors on title */
.accent-teal    .d-card-title { color: var(--teal); }
.accent-amber   .d-card-title { color: var(--amber); }
.accent-emerald .d-card-title { color: var(--emerald); }
.accent-sapphire .d-card-title{ color: var(--sapphire); }
.accent-violet  .d-card-title { color: var(--violet); }
.accent-crimson .d-card-title { color: var(--crimson); }

/* Status pill */
.status-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
}

.pill-live {
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.2);
  animation: pill-pulse 2.5s ease-in-out infinite;
}

@keyframes pill-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.pill-stream {
  background: var(--teal-dim);
  color: var(--teal);
  border: 1px solid var(--teal-border);
  animation: pill-pulse 2.5s ease-in-out infinite;
}

.pill-static {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Card body */
.d-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.d-card-body.p-0 { padding: 0; }

/* ── Data rows (Profile, Funds, etc.) ──────────────────────── */
.data-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 8px;
}

.data-row:last-child { border-bottom: none; }

.data-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.data-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-primary);
  text-align: right;
  word-break: break-all;
}

/* ── Funds values ───────────────────────────────────────────── */
.fund-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--teal);
}

/* ── Predictive Outlook ─────────────────────────────────────── */
.pred-timestamp {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pred-timestamp::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--violet);
  animation: pulse-dot 2s ease-in-out infinite;
}

.pred-content {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
  word-break: break-word;
  flex: 1;
}

/* ── NIFTY Options ──────────────────────────────────────────── */
.opts-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.opt-metric-box {
  background: rgba(41,211,180,0.04);
  border: 1px solid rgba(41,211,180,0.12);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.opt-metric-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.opt-metric-value {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: -0.01em;
}

.opt-metric-box.expiry .opt-metric-value { color: var(--amber); font-size: 14px; }

.opts-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

.opt-side-box {
  border-radius: var(--radius-sm);
  padding: 11px 12px;
}

.opt-ce-box {
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.15);
}

.opt-pe-box {
  background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.15);
}

.opt-side-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.opt-ce-box .opt-side-label { color: #4ade80; }
.opt-pe-box .opt-side-label { color: #f87171; }

.opt-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
}

.opt-ce-box .opt-dot { background: #4ade80; box-shadow: 0 0 5px #4ade80; }
.opt-pe-box .opt-dot { background: #f87171; box-shadow: 0 0 5px #f87171; }

.opt-side-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ── Signal & Trigger tables ────────────────────────────────── */
.sig-table {
  width: 100%;
  border-collapse: collapse;
}

.sig-table tr { border-bottom: 1px solid var(--border-subtle); }
.sig-table tr:last-child { border-bottom: none; }

.sig-table th {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  width: 38%;
  text-align: left;
}

.sig-table td {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  text-align: left;
}

.sig-table tr:hover { background: rgba(255,255,255,0.02); }

.signal-positive { color: #4ade80; font-weight: 600; }
.signal-negative { color: #f87171; font-weight: 600; }
.signal-neutral  { color: var(--text-muted); }

/* ── Large data tables (Positions, Signals, History) ────────── */
.data-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 320px;
  scrollbar-width: thin;
  scrollbar-color: rgba(41,211,180,0.15) transparent;
}

.data-table-wrap::-webkit-scrollbar { width: 4px; height: 4px; }
.data-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(41,211,180,0.15);
  border-radius: 2px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}

.data-table thead tr {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 2;
}

.data-table th {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-mild);
}

.data-table td {
  padding: 9px 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.data-table tbody tr:last-child td { border-bottom: none; }

.pnl-positive { color: #4ade80 !important; }
.pnl-negative { color: #f87171 !important; }

/* Exit button */
.btn-exit {
  padding: 4px 12px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-exit:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: #fca5a5;
}

/* PnL summary chips */
.pnl-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
}

.pnl-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.pnl-chip-realized { background: rgba(148,163,184,0.08); color: #94a3b8; border: 1px solid rgba(148,163,184,0.15); }
.pnl-chip-open     { background: var(--sapphire-dim); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.pnl-chip-net      { background: var(--emerald-dim); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }

/* ── Full-width card ────────────────────────────────────────── */
.dash-row-full {
  margin-bottom: 14px;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-mild);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
}

.modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 20px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-body { padding: 20px; }
.modal-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 14px 20px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .dash-row-1 { grid-template-columns: 1fr 1fr; }
  .dash-row-1 > .col-options { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .dash-row-1,
  .dash-row-2   { grid-template-columns: 1fr; }
  .opts-metrics { grid-template-columns: 1fr 1fr 1fr; }
  .opts-sides   { grid-template-columns: 1fr; }
  .landing-card { padding: 28px 20px; }
  .welcome-heading { font-size: 17px; }
}

/* ── Bootstrap row override (dashboard only) ────────────────── */
.app-main .row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0 !important;
  margin-right: calc(-0.5 * var(--bs-gutter-x, 12px)) !important;
  margin-left:  calc(-0.5 * var(--bs-gutter-x, 12px)) !important;
}

/* ── Utility ─────────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }
.text-teal   { color: var(--teal); }
.text-amber  { color: var(--amber); }
.text-muted-rob { color: var(--text-muted); }
.mt-auto { margin-top: auto; }