.app-body {
  background: var(--bg0);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-header {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.app-header-left { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.app-header-center { flex: 1; max-width: 720px; }
.app-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.app-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.app-logo .logo-icon { width: 28px; height: 28px; font-size: 13px; border-radius: 6px; }
.app-logo .logo-name { font-family: var(--font-brand); font-size: 14px; font-weight: 700; color: var(--text); }

.trial-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 20px;
  border: 1px solid rgba(245,158,11,0.4);
  background: rgba(245,158,11,0.08);
  font-size: 11px; color: var(--amber);
  white-space: nowrap;
}

.header-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 0 12px;
  height: 38px; transition: border-color var(--transition);
  flex: 1;
}
.header-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,165,233,0.1); }
.hs-icon { color: var(--muted); font-size: 15px; flex-shrink: 0; }
.hs-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase;
  min-width: 0;
}
.hs-input::placeholder { text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 12px; }

.ai-badge {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--border2);
  color: var(--text2); font-family: var(--font-head);
  font-size: 12px; font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.ai-mode-badge {
  padding: 1px 6px; border-radius: 3px;
  background: rgba(14,165,233,0.15); color: var(--brand);
  font-size: 8px; font-weight: 700; letter-spacing: 1px;
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--border);
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-brand); font-size: 12px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.user-chip-info { display: flex; flex-direction: column; }
.user-chip-name { font-family: var(--font-head); font-size: 12px; font-weight: 600; color: var(--text); }
.user-chip-plan { font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--muted); }

.analyze-btn {
  padding: 9px 20px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), #0369A1);
  border: none; color: #fff;
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  letter-spacing: 0.3px; white-space: nowrap;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.analyze-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 16px var(--brand-glow); }

.usage-bar {
  height: 38px; flex-shrink: 0;
  background: var(--bg1); border-bottom: 1px solid var(--border);
}
.usage-inner {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; padding: 0 14px; gap: 16px;
}
.quick-symbols { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.qs-label { font-size: 9px; color: var(--dim); letter-spacing: 1.5px; flex-shrink: 0; }
.qs-chip {
  padding: 3px 9px; border-radius: 4px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); font-family: var(--font-mono);
  font-size: 9px; font-weight: 600; letter-spacing: 0.5px;
  transition: all var(--transition); cursor: pointer;
  display: inline-flex; align-items: center;
}
.qs-chip:hover, .qs-chip.active { border-color: var(--brand); color: var(--brand); background: rgba(14,165,233,0.05); }
.usage-counter { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.usage-label { font-size: 9px; color: var(--muted); letter-spacing: 1.5px; white-space: nowrap; }
.usage-track { width: 80px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.usage-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--brand)); border-radius: 2px; }
.usage-nums { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.usage-nums strong { color: var(--text); }
.usage-upgrade { color: var(--amber); font-size: 10px; margin-left: 6px; font-weight: 700; }

.app-layout { flex: 1; display: flex; overflow: hidden; }

.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden;
}
.sidebar-section { border-bottom: 1px solid var(--border); }
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  color: var(--muted); letter-spacing: 2px; text-transform: uppercase;
  background: var(--bg3);
}
.sidebar-count { color: var(--dim); }
.market-list, .timeframe-list, .recent-list { padding: 4px 0; }
.side-link, .recent-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; cursor: pointer;
  transition: background var(--transition);
  color: var(--text2);
}
.side-link:hover, .recent-item:hover { background: var(--panel); color: var(--text); }
.side-link.active { background: rgba(14,165,233,0.08); color: var(--brand); }
.side-left { display: flex; flex-direction: column; }
.side-main { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: inherit; }
.side-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.recent-sym { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text); }
.recent-time { font-size: 9px; color: var(--muted); margin-top: 1px; }
.recent-dec { font-size: 9px; font-weight: 700; letter-spacing: 0.5px; }
.wl-empty { padding: 16px 12px; font-size: 11px; color: var(--dim); line-height: 1.5; }

.main-content {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 16px;
  background: linear-gradient(180deg, rgba(2,8,16,0.98), rgba(6,14,28,0.98));
}

.result-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.rc-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.rc-symbol { font-family: var(--font-brand); font-size: 24px; font-weight: 700; }
.rc-meta { font-size: 11px; color: var(--muted); margin-top: 3px; letter-spacing: 0.5px; line-height: 1.6; }

.verdict-wrap {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 20px 18px; border-bottom: 1px solid var(--border);
}
.verdict-left { flex: 1; }
.verdict-right { width: 260px; flex-shrink: 0; }
.verdict-label { font-size: 9px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.verdict-signal {
  font-family: var(--font-brand); font-size: 34px; font-weight: 900;
  letter-spacing: -1px; line-height: 1.1; margin-bottom: 8px;
  color: var(--brand);
}
.verdict-reason { font-size: 13px; color: var(--text2); line-height: 1.7; max-width: 620px; }
.meter-list { display: flex; flex-direction: column; gap: 10px; }
.meter-row { display: flex; align-items: center; gap: 10px; }
.meter-lbl { font-size: 10px; color: var(--muted); width: 86px; flex-shrink: 0; letter-spacing: 0.5px; }
.meter-track { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 3px; }
.meter-val { font-family: var(--font-mono); font-size: 10px; font-weight: 600; width: 34px; text-align: right; flex-shrink: 0; color: var(--brand); }

.trade-levels {
  display: flex; gap: 1px; background: var(--border);
  border-top: 1px solid var(--border);
}
.tl-item { flex: 1; padding: 12px 14px; background: var(--panel); }
.tl-label { font-size: 8px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 5px; }
.tl-val { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }

.rc-head-simple {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.rc-head-title { font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--text); text-transform: uppercase; }
.rc-head-badge { font-size: 9px; padding: 3px 8px; border-radius: 4px; font-weight: 700; background: rgba(14,165,233,0.15); color: var(--brand); }

.card-body { padding: 18px; }
.section-copy { font-size: 14px; color: var(--text2); line-height: 1.7; margin-bottom: 14px; }

.form-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr;
  gap: 14px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 10px; color: var(--muted); letter-spacing: 1.4px; text-transform: uppercase; font-weight: 700; }
.form-group input,
.form-group select {
  width: 100%; padding: 11px 14px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,165,233,0.1); }

.inline-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.muted-note { color: var(--muted); font-size: 12px; }

.request-link {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg2);
  color: var(--text); transition: all var(--transition);
}
.request-link:hover { border-color: var(--brand); color: var(--text); }
.request-link-title { font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.request-meta { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.5; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  background: rgba(14,165,233,0.15); color: var(--brand);
}
.badge.buy { background: rgba(16,185,129,0.15); color: var(--green); }
.badge.sell { background: rgba(239,68,68,0.15); color: var(--red); }
.badge.hold { background: rgba(245,158,11,0.15); color: var(--amber); }

.pipeline-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 16px;
}
.pipeline-col {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.pipeline-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.pipeline-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pipeline-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.pipeline-row:last-child { border-bottom: none; padding-bottom: 0; }
.pipeline-name { font-family: var(--font-head); font-size: 13px; font-weight: 700; }
.pipeline-copy { font-size: 12px; color: var(--text2); margin-top: 4px; line-height: 1.6; }

.right-panel {
  width: 250px; flex-shrink: 0;
  background: var(--bg2); border-left: 1px solid var(--border);
  overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 16px;
}
.rp-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
}
.rp-head {
  padding: 10px 12px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 600;
  color: var(--muted); letter-spacing: 2px; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.provider-list { display: flex; flex-direction: column; }
.provider-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.provider-item:last-child { border-bottom: none; }
.provider-name { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--text); }
.provider-role { font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

.request-shell {
  min-height: 100vh;
  background: var(--bg0);
  display: flex;
  flex-direction: column;
}
.request-topbar {
  padding: 14px 18px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.request-wrap {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.request-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.request-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.request-title { font-family: var(--font-brand); font-size: 24px; font-weight: 700; }
.request-subtitle { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.detail-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
}
.detail-card { background: var(--panel); padding: 12px 14px; }
.detail-label { font-size: 8px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 5px; }
.detail-value { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }

@media (max-width: 1100px) {
  .right-panel { display: none; }
  .app-header-center { max-width: 520px; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .trial-pill { display: none; }
  .pipeline-grid { grid-template-columns: 1fr; }
  .verdict-wrap { flex-direction: column; }
  .verdict-right { width: 100%; }
}
@media (max-width: 640px) {
  .app-header { padding: 10px; gap: 8px; height: auto; flex-wrap: wrap; }
  .app-logo .logo-name { display: none; }
  .usage-bar { display: none; }
  .header-search-form { flex-direction: column; align-items: stretch; }
  .form-grid { grid-template-columns: 1fr; }
  .trade-levels { flex-wrap: wrap; }
  .tl-item, .detail-card { min-width: 50%; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* Phase 11: spacing + normal page scrolling fix */
html, body {
  min-height: 100%;
}

.app-body {
  height: auto !important;
  min-height: 100vh;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

.app-layout {
  flex: 1 1 auto;
  min-height: calc(100vh - 98px);
  overflow: visible !important;
  align-items: flex-start;
}

.main-content {
  overflow: visible !important;
  padding: 20px 20px 40px !important;
  gap: 20px !important;
}

.result-card,
.request-card,
.rp-card,
.sidebar-section {
  margin-bottom: 0;
}

.card-body {
  padding: 20px !important;
}

.rc-header,
.request-card-head {
  padding: 18px 20px !important;
}

.verdict-wrap {
  padding: 22px 20px !important;
}

.trade-levels {
  margin-top: 0;
}

.pipeline-grid {
  align-items: start;
}

.right-panel {
  overflow: visible !important;
  padding-bottom: 32px !important;
}

.sidebar {
  overflow: visible !important;
  padding-bottom: 24px !important;
}

.wl-empty,
.section-copy,
.pipeline-copy,
.request-meta,
.rc-meta,
.request-subtitle {
  line-height: 1.7 !important;
}

@media (max-width: 1100px) {
  .app-layout {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .app-body {
    overflow-y: auto !important;
  }

  .main-content {
    padding: 16px 16px 32px !important;
    gap: 16px !important;
  }

  .result-card,
  .request-card {
    border-radius: 12px;
  }
}


.rc-meta,
.request-subtitle,
.pipeline-copy,
.section-copy,
.provider-role,
.recent-time,
.side-sub,
.muted-note {
  color: var(--text2);
}

.app-header,
.usage-bar,
.sidebar,
.right-panel {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
}


/* ── Signal badge sizes ──────────────────────────────────── */
.badge-lg {
  font-size: 15px;
  padding: 6px 16px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* ── Color helpers ───────────────────────────────────────── */
.text-green { color: var(--green, #10B981); }
.text-red   { color: var(--red,   #EF4444); }

/* ── Trade level sub-label ───────────────────────────────── */
.tl-sub {
  display: block;
  font-size: 10px;
  color: var(--muted, #6B7A99);
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: capitalize;
  margin-top: 2px;
}

/* ── Alert boxes ─────────────────────────────────────────── */
.alert-box {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.6;
}
.alert-warn {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.35);
  color: #FCD34D;
}
.alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.35);
  color: #FCA5A5;
}

/* ── Loading overlay ─────────────────────────────────────── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,8,16,0.82);
  backdrop-filter: blur(4px);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.loading-overlay.active { display: flex; }
.lo-spinner {
  width: 48px; height: 48px;
  border: 3px solid rgba(14,165,233,0.2);
  border-top-color: #0EA5E9;
  border-radius: 50%;
  animation: lo-spin 0.75s linear infinite;
}
@keyframes lo-spin { to { transform: rotate(360deg); } }
.lo-title {
  font-family: 'Orbitron', monospace;
  font-size: 13px; font-weight: 700;
  color: #D4E8FF;
  letter-spacing: 3px;
}
.lo-step {
  font-size: 12px;
  color: #0EA5E9;
  letter-spacing: 1px;
  font-family: 'Fira Code', monospace;
  text-align: center;
  max-width: 400px;
  line-height: 1.6;
}
.lo-providers {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.lo-prov {
  padding: 4px 14px; border-radius: 4px;
  border: 1px solid rgba(30,58,85,0.8);
  font-size: 11px; color: #3D6080;
  font-family: 'Fira Code', monospace;
  transition: all 0.3s;
}
.lo-prov.active {
  border-color: #0EA5E9;
  color: #0EA5E9;
  background: rgba(14,165,233,0.08);
}

/* ── Dashboard form grid ─────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 11px;
  color: var(--muted, #3D6080);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}
.form-group input,
.form-group select {
  width: 100%;
  background: var(--bg2, #0A1525);
  border: 1px solid var(--border2, #1C3048);
  border-radius: 6px;
  padding: 9px 12px;
  color: var(--text, #D4E8FF);
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  transition: border-color 0.2s;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}

/* ── Inline actions row ──────────────────────────────────── */
.inline-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.muted-note {
  font-size: 11px;
  color: var(--muted, #3D6080);
  font-style: italic;
  margin-left: 6px;
}

/* ── Select wrapper with arrow ───────────────────────────── */
.select-wrap {
  position: relative;
}
.select-wrap select {
  width: 100%;
  padding-right: 32px;
  cursor: pointer;
}
.select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted, #3D6080);
  pointer-events: none;
}

/* ── Request link row (saved analyses list) ─────────────── */
.request-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #142238);
  text-decoration: none;
  transition: background 0.15s;
  border-radius: 4px;
}
.request-link:last-child { border-bottom: none; }
.request-link:hover { background: var(--panel2, #101F35); padding-left: 8px; }
.request-link-left { display: flex; flex-direction: column; gap: 3px; }
.request-link-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #D4E8FF);
}
.request-meta {
  font-size: 11px;
  color: var(--muted, #3D6080);
  letter-spacing: 0.3px;
}

/* ════════════════════════════════════════════════════════════
   DARK MODE CONTRAST IMPROVEMENTS
   ════════════════════════════════════════════════════════════ */
[data-theme="dark"] {
  --text:    #E8F4FF;
  --text2:   #A8C8E8;
  --muted:   #6890B0;
  --dim:     #3A5A78;
  --panel:   #0F1E32;
  --panel2:  #142540;
  --bg2:     #0C1828;
  --border:  #1E3A58;
  --border2: #243E60;
}

/* Section titles — brighter */
[data-theme="dark"] .rc-head-title,
[data-theme="dark"] .rp-head,
[data-theme="dark"] .sidebar-head,
[data-theme="dark"] .pipeline-head,
[data-theme="dark"] .request-title {
  color: #C8E0F8;
  letter-spacing: 1px;
}

/* Card backgrounds — slightly lighter */
[data-theme="dark"] .result-card,
[data-theme="dark"] .request-card,
[data-theme="dark"] .rp-card {
  background: #0F1E32;
  border-color: #1E3A58;
}

/* Body text more readable */
[data-theme="dark"] .section-copy,
[data-theme="dark"] .pipeline-copy,
[data-theme="dark"] .provider-role,
[data-theme="dark"] .request-subtitle {
  color: #90B8D8;
}

/* Sidebar slightly lighter */
[data-theme="dark"] .sidebar,
[data-theme="dark"] .right-panel,
[data-theme="dark"] .analysis-sidebar {
  background: #0C1828;
}

/* Usage bar readable */
[data-theme="dark"] .usage-bar {
  background: #0C1C30;
  border-color: #1E3A58;
}

/* ════════════════════════════════════════════════════════════
   ANALYSIS PAGE LAYOUT
   ════════════════════════════════════════════════════════════ */
.analysis-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 120px);
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 16px;
  gap: 20px;
}
.analysis-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.analysis-sidebar {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Signal hero card ─────────────────────────────────────── */
.signal-hero { padding: 0; }
.signal-hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  gap: 20px;
}
.signal-symbol {
  font-family: 'Orbitron', monospace;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.signal-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.signal-verdict {
  font-family: 'Orbitron', monospace;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 8px;
}
.signal-conf {
  font-size: 13px;
  color: var(--text2);
}
.signal-hero-right { text-align: right; flex-shrink: 0; }
.signal-price {
  font-family: 'Fira Code', monospace;
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}
.signal-currency {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.signal-change { font-size: 14px; font-weight: 600; }

/* ── Market snapshot grid ─────────────────────────────────── */
.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}
.snap-item {
  background: var(--panel);
  padding: 14px 16px;
}
.snap-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.snap-val {
  font-family: 'Fira Code', monospace;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}
.snap-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  text-transform: capitalize;
}

/* ── AI Opinions list ─────────────────────────────────────── */
.opinions-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.opinion-row {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.opinion-row:last-child { border-bottom: none; }
.opinion-row:hover { background: var(--panel2); }
.opinion-failed { opacity: 0.7; }
.opinion-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.opinion-provider {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  min-width: 70px;
}
.opinion-signal {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.opinion-conf {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
}
.opinion-risk {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
}
.risk-low    { background: rgba(16,185,129,0.12); color: #10B981; }
.risk-medium { background: rgba(245,158,11,0.12);  color: #F59E0B; }
.risk-high   { background: rgba(239,68,68,0.12);   color: #EF4444; }
.opinion-body { padding-left: 2px; }
.opinion-reason {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 6px;
  line-height: 1.5;
}
.opinion-reason-label {
  font-weight: 700;
  color: var(--text);
  margin-right: 4px;
}
.opinion-summary {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 8px;
}
.opinion-levels {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.olevel {
  font-size: 12px;
  color: var(--muted);
}
.olevel strong { color: var(--text); }

/* ── Sidebar cards ────────────────────────────────────────── */
.rp-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  padding: 16px;
}
.rp-head {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Verdict mini */
.verdict-mini { text-align: center; }
.verdict-mini-signal {
  font-family: 'Orbitron', monospace;
  font-size: 28px;
  font-weight: 900;
  margin: 8px 0 4px;
  letter-spacing: -0.5px;
}
.verdict-mini-conf {
  font-size: 12px;
  color: var(--muted);
}

/* Pipeline steps */
.pipeline-steps { display: flex; flex-direction: column; gap: 8px; }
.pipeline-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.pipeline-step:last-child { border-bottom: none; }
.ps-left { display: flex; align-items: center; gap: 10px; }
.ps-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.ps-label {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
}

/* Meta list */
.meta-list { display: flex; flex-direction: column; gap: 8px; }
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.meta-lbl { color: var(--muted); }
.meta-val {
  font-family: 'Fira Code', monospace;
  color: var(--text);
  font-weight: 500;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .analysis-layout { flex-direction: column; }
  .analysis-sidebar { width: 100%; }
  .snapshot-grid { grid-template-columns: repeat(2,1fr); }
  .signal-hero-right { display: none; }
}
@media (max-width: 640px) {
  .snapshot-grid { grid-template-columns: repeat(2,1fr); }
  .opinion-header { gap: 8px; }
}

/* ════════════════════════════════════════════════════════════
   COMPACT STATS STRIP (replaces wide stats card on dashboard)
   ════════════════════════════════════════════════════════════ */
.stats-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 0;
}
.stats-strip-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 20px;
  min-width: 100px;
}
.stats-strip-item:first-child { padding-left: 0; }
.stats-strip-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.stats-strip-val {
  font-family: 'Fira Code', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.stats-strip-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
  width: 80px;
}
.stats-strip-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.stats-strip-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 4px;
}

/* ════════════════════════════════════════════════════════════
   GLOBAL CONFIDENCE BAR
   ════════════════════════════════════════════════════════════ */
.global-conf-wrap { margin-top: 14px; }
.global-conf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.global-conf-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.global-conf-pct {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  font-weight: 700;
}
.global-conf-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.global-conf-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}
.global-conf-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   PER-EXPERT CONFIDENCE BAR
   ════════════════════════════════════════════════════════════ */
.expert-conf-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
}
.expert-conf-track {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.expert-conf-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}
.expert-conf-pct {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  font-family: 'Fira Code', monospace;
}

/* ════════════════════════════════════════════════════════════
   CONFIDENCE EXPLAINER BANNER
   ════════════════════════════════════════════════════════════ */
.conf-explainer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(14,165,233,0.05);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.conf-explainer-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.conf-explainer strong { color: var(--text2); }

/* ════════════════════════════════════════════════════════════
   SUMMARIZER STEP (distinct from AI expert steps)
   ════════════════════════════════════════════════════════════ */
.pipeline-divider {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-align: center;
  padding: 6px 0 2px;
  border-top: 1px dashed var(--border);
  margin-top: 6px;
}
.summarizer-step {
  background: rgba(14,165,233,0.06);
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 2px;
}
.ps-summarizer-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #0369A1);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  font-family: 'Barlow Semi Condensed', sans-serif;
}
.ps-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

/* ════════════════════════════════════════════════════════════
   INACTIVE / NOT CONFIGURED EXPERT STATES
   ════════════════════════════════════════════════════════════ */
.opinion-inactive {
  opacity: 0.65;
  background: var(--bg2);
}
.opinion-inactive-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--border);
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.opinion-inactive-error {
  background: rgba(239,68,68,0.1);
  color: #EF4444;
}
.opinion-inactive-body {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 0 4px;
  line-height: 1.6;
}
.admin-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--amber, #F59E0B);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: 'Fira Code', monospace;
  word-break: break-word;
}

/* ════════════════════════════════════════════════════════════
   RICH ANALYSIS ROW (dashboard saved analyses)
   ════════════════════════════════════════════════════════════ */
.analysis-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s, padding-left 0.15s;
  border-radius: 4px;
}
.analysis-row:last-child { border-bottom: none; }
.analysis-row:hover { background: var(--panel2); padding-left: 8px; }

.ar-left { flex: 1; min-width: 0; }
.ar-symbol {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.ar-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-bottom: 5px;
}
.ar-summary {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  min-width: 90px;
}
.ar-conf-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.ar-conf-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.ar-conf-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.ar-conf-pct {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   PLAN CARDS (account upgrade page)
   ════════════════════════════════════════════════════════════ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.plan-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color 0.2s;
}
.plan-card:hover { border-color: var(--plan-color, var(--brand)); }
.plan-card-current {
  border-color: var(--plan-color, var(--brand));
  background: color-mix(in srgb, var(--plan-color, var(--brand)) 5%, var(--panel));
}
.plan-card-featured {
  border-color: var(--plan-color, #8B5CF6);
  box-shadow: 0 0 0 1px var(--plan-color, #8B5CF6);
}
.plan-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--plan-color, #8B5CF6);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.plan-name {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}
.plan-price {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  line-height: 1;
  margin: 4px 0;
}
.plan-currency { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.plan-amount { font-family: 'Orbitron', monospace; font-size: 36px; font-weight: 800; color: var(--text); }
.plan-period { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.plan-summary { font-size: 12px; color: var(--muted); line-height: 1.5; }
.plan-features {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 5px;
  flex: 1;
}
.plan-features li { font-size: 12px; color: var(--text2); }
.plan-btn {
  display: block;
  text-align: center;
  padding: 10px 16px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Barlow Semi Condensed', sans-serif;
  cursor: pointer;
  border: none;
  width: 100%;
  text-decoration: none;
  transition: filter 0.15s, transform 0.1s;
  letter-spacing: 0.3px;
  color: #fff;
  margin-top: auto;
}
.plan-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.plan-btn-current {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: default;
}
.plan-btn-current:hover { filter: none; transform: none; }
.plan-btn-disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}
.plan-btn-disabled:hover { filter: none; transform: none; }

/* ── Admin link in header ─────────────────────────────────── */
.admin-badge-link {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #EF4444;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  transition: background 0.15s;
}
.admin-badge-link:hover { background: rgba(239,68,68,0.2); }

/* ════════════════════════════════════════════════════════════
   AUTH PAGE — REDESIGNED
   ════════════════════════════════════════════════════════════ */

/* New SVG logo icon */
.auth-logo-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

/* Wider wrap for register (more fields) */
.auth-wrap-wide { max-width: 480px; }

/* Two-column form row */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .form-row-2 { grid-template-columns: 1fr; } }

/* Password label with forgot link */
.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.form-label-link {
  font-size: 11px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.form-label-link:hover { text-decoration: underline; }

/* Checkboxes */
.form-checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--brand);
  cursor: pointer;
}
.form-check a { color: var(--brand); text-decoration: none; }
.form-check a:hover { text-decoration: underline; }

/* Success alert */
.alert-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6EE7B7;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* ════════════════════════════════════════════════════════════
   DASHBOARD — LEFT SIDEBAR ACTIVE STATE
   ════════════════════════════════════════════════════════════ */
.provider-item.sb-active {
  background: var(--panel2);
  border-radius: 6px;
}
.provider-item.sb-active .provider-name {
  color: var(--brand);
}

/* ════════════════════════════════════════════════════════════
   LOGO — SVG BASED (used in app header too)
   ════════════════════════════════════════════════════════════ */
.app-logo .logo-icon,
.logo-icon {
  background: none !important;
}
.logo-icon svg {
  display: block;
}

/* Auth logo override */
.auth-logo .logo-icon { display: none; }

/* App header logo — replace hex with SVG */
.app-logo-svg {
  width: 28px; height: 28px; flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   PREFLIGHT ERROR — visible above Run Analysis
   ════════════════════════════════════════════════════════════ */
.preflight-error {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.35);
  border-left: 4px solid #EF4444;
  border-radius: 8px;
  margin-bottom: 16px;
}
.preflight-error-icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.preflight-error-body { display: flex; flex-direction: column; gap: 4px; }
.preflight-error-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #FCA5A5;
}
.preflight-error-msg {
  font-size: 13px;
  color: #FCD4D4;
  line-height: 1.6;
}
.preflight-error-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #FCA5A5;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.preflight-error-link:hover { color: #fff; }

/* textarea form input */
textarea.form-input {
  min-height: 120px;
  line-height: 1.6;
}

/* ── Compact inline checkboxes ───────────────────────────── */
.form-check-inline {
  flex-direction: row;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.form-check-inline span {
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

/* ════════════════════════════════════════════════════════════
   AUTH PAGES — NEURIX SYSTEMS STYLE
   ════════════════════════════════════════════════════════════ */
.nt-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: var(--bg, #F4F8FC);
  gap: 0;
}
[data-theme="dark"] .nt-auth-page { background: #070F1A; }

/* Logo */
.nt-auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 28px;
}
.nt-auth-logo-name {
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 800;
  color: var(--text, #0F172A);
  letter-spacing: -0.3px;
}
[data-theme="dark"] .nt-auth-logo-name { color: #E8F4FF; }
.nt-auth-logo-sub {
  font-size: 9px;
  color: #5BC0F8;
  letter-spacing: 2.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* Card */
.nt-auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid #E2EAF4;
  border-radius: 14px;
  padding: 36px 36px 28px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07);
}
[data-theme="dark"] .nt-auth-card {
  background: #0F1E32;
  border-color: #1E3A58;
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}

.nt-auth-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 6px;
  text-align: center;
}
[data-theme="dark"] .nt-auth-title { color: #E8F4FF; }

.nt-auth-subtitle {
  font-size: 14px;
  color: #64748B;
  text-align: center;
  margin: 0 0 24px;
}
[data-theme="dark"] .nt-auth-subtitle { color: #7A9AB8; }

/* Alerts */
.nt-auth-alert {
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.nt-auth-alert-ok { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.nt-auth-alert-err { background: #FFF1F2; border: 1px solid #FECDD3; color: #9F1239; }
[data-theme="dark"] .nt-auth-alert-ok { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: #6EE7B7; }
[data-theme="dark"] .nt-auth-alert-err { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #FCA5A5; }

/* Form */
.nt-auth-form { display: flex; flex-direction: column; gap: 16px; }

.nt-field { display: flex; flex-direction: column; gap: 6px; }
.nt-field label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
[data-theme="dark"] .nt-field label { color: #A8C8E8; }
.nt-field-link { font-size: 12px; font-weight: 500; color: #0EA5E9; text-decoration: none; }
.nt-field-link:hover { text-decoration: underline; }

.nt-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #D1D5DB;
  border-radius: 7px;
  font-size: 14px;
  color: #0F172A;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}
.nt-field input:focus {
  outline: none;
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.12);
}
[data-theme="dark"] .nt-field input {
  background: #0A1828;
  border-color: #2A4A68;
  color: #E8F4FF;
}
[data-theme="dark"] .nt-field input:focus { border-color: #5BC0F8; box-shadow: 0 0 0 3px rgba(91,192,248,0.12); }

/* Two-column field row */
.nt-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .nt-field-row { grid-template-columns: 1fr; } }

/* Checkboxes — each on its own line */
.nt-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #4B5563;
  line-height: 1.5;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 7px;
  background: #F9FAFB;
  transition: border-color 0.15s;
}
.nt-checkbox:hover { border-color: #0EA5E9; }
[data-theme="dark"] .nt-checkbox { background: #0A1828; border-color: #1E3A58; color: #A8C8E8; }
[data-theme="dark"] .nt-checkbox:hover { border-color: #5BC0F8; }
.nt-checkbox input[type="checkbox"] {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #0EA5E9;
  cursor: pointer;
}
.nt-checkbox a { color: #0EA5E9; text-decoration: none; }
.nt-checkbox a:hover { text-decoration: underline; }

/* Note above button */
.nt-auth-note {
  font-size: 12px;
  color: #6B7280;
  text-align: center;
  padding: 4px 0;
}
[data-theme="dark"] .nt-auth-note { color: #7A9AB8; }

/* Submit button */
.nt-auth-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #0EA5E9, #6366F1);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Barlow Semi Condensed', sans-serif;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: filter 0.15s, transform 0.1s;
  margin-top: 4px;
}
.nt-auth-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* OR divider */
.nt-auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: #9CA3AF;
  font-size: 12px;
}
.nt-auth-or::before, .nt-auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E7EB;
}
[data-theme="dark"] .nt-auth-or::before,
[data-theme="dark"] .nt-auth-or::after { background: #1E3A58; }

/* Alt action (sign in / create account) */
.nt-auth-alt {
  text-align: center;
  font-size: 13px;
  color: #6B7280;
  line-height: 1.8;
}
[data-theme="dark"] .nt-auth-alt { color: #7A9AB8; }
.nt-auth-alt a {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #0EA5E9;
  text-decoration: none;
  padding: 8px 20px;
  border: 1.5px solid #0EA5E9;
  border-radius: 7px;
  transition: background 0.15s;
}
.nt-auth-alt a:hover { background: rgba(14,165,233,0.08); }

/* Back to home — standalone line */
.nt-auth-back {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #F3F4F6;
}
[data-theme="dark"] .nt-auth-back { border-color: #1E3A58; }
.nt-auth-back a {
  font-size: 13px;
  color: #9CA3AF;
  text-decoration: none;
}
.nt-auth-back a:hover { color: #0EA5E9; }

/* Footer */
.nt-auth-foot {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 11px;
  color: #9CA3AF;
}
.nt-auth-foot a { color: #9CA3AF; text-decoration: none; }
.nt-auth-foot a:hover { color: #0EA5E9; }

/* Risk disclaimer below footer */
.nt-auth-disclaimer {
  margin-top: 12px;
  max-width: 440px;
  text-align: center;
  font-size: 10px;
  color: #CBD5E1;
  line-height: 1.6;
}
[data-theme="dark"] .nt-auth-disclaimer { color: #4A6A88; }

/* ════════════════════════════════════════════════════════════
   SIGNAL OUTCOME BADGE
   ════════════════════════════════════════════════════════════ */
.outcome-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 14px;
  border-left: 4px solid;
}
.outcome-win {
  background: rgba(16,185,129,0.08);
  border-color: #10B981;
}
.outcome-loss {
  background: rgba(239,68,68,0.08);
  border-color: #EF4444;
}
.outcome-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.outcome-pct {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}
.outcome-win .outcome-pct { color: #10B981; }
.outcome-loss .outcome-pct { color: #EF4444; }
.outcome-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   MOBILE — COMPLETE RESPONSIVE FIX
   ════════════════════════════════════════════════════════════ */

/* ── Dashboard header ────────────────────────────────────── */
@media (max-width: 768px) {
  .app-header {
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: wrap;
    height: auto;
  }
  .app-header-left { flex: 1; min-width: 0; }
  .app-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  /* Stack nav links vertically on mobile */
  .app-header-right .btn-ghost,
  .app-header-right .btn-primary,
  .app-header-right .admin-badge-link {
    font-size: 11px;
    padding: 5px 10px;
  }
  /* Hide "BY NEURIX SYSTEMS" on small screens */
  .app-header .logo-sub { display: none; }
}

/* ── Dashboard layout ─────────────────────────────────────── */
@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar, .right-panel {
    display: none !important;
  }
  .main-content {
    width: 100% !important;
    padding: 14px 12px 32px !important;
  }
}

/* ── Analysis form ───────────────────────────────────────── */
@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .form-grid .form-group { width: 100%; }

  .select-wrap select,
  .form-input,
  .form-group input {
    font-size: 16px !important; /* prevent iOS zoom */
  }
}

/* ── Analysis results page ───────────────────────────────── */
@media (max-width: 768px) {
  .request-topbar {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 8px;
    height: auto;
  }
  .request-topbar .inline-actions {
    gap: 6px;
    flex-wrap: wrap;
  }
  .request-topbar .btn-ghost,
  .request-topbar .btn-primary {
    font-size: 11px;
    padding: 5px 10px;
  }
  .verdict-wrap {
    flex-direction: column;
    gap: 16px;
  }
  .verdict-right { width: 100% !important; }
  .verdict-left { width: 100% !important; }
  .verdict-decision { font-size: 36px !important; }
  .trade-levels { flex-direction: column; gap: 10px; }
  .tl-item { width: 100% !important; min-width: unset !important; }
  .detail-grid { grid-template-columns: 1fr 1fr !important; }
  .pipeline-grid { grid-template-columns: 1fr !important; }
  .provider-opinions { grid-template-columns: 1fr !important; }
  .stats-strip { flex-wrap: wrap; gap: 12px; }
  .stats-strip-item { min-width: 120px; }
}

/* ── Analysis row table ──────────────────────────────────── */
@media (max-width: 640px) {
  .analysis-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
    padding: 12px 14px !important;
  }
  .ar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }
  .ar-conf-wrap { display: none; }
}

/* ── Account / Support / Watchlist pages ─────────────────── */
@media (max-width: 640px) {
  .request-wrap {
    padding: 0 10px !important;
  }
  .request-card { border-radius: 10px !important; }
  .request-card-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
    padding: 14px 16px !important;
  }
  .plans-grid {
    grid-template-columns: 1fr !important;
  }
  .plan-card { margin: 0; }
  .form-row-2 {
    grid-template-columns: 1fr !important;
  }
  .nt-field-row {
    grid-template-columns: 1fr !important;
  }
}

/* ── Watchlist table ─────────────────────────────────────── */
@media (max-width: 768px) {
  .watchlist-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Admin panel ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100% !important;
    position: relative !important;
    flex-direction: row;
    overflow-x: auto;
    padding: 0;
    border-right: none !important;
    border-bottom: 1px solid var(--border);
  }
  .admin-sidebar-logo { padding: 10px 16px; border-bottom: none; border-right: 1px solid var(--border); }
  .admin-nav {
    flex-direction: row;
    padding: 8px;
    gap: 4px;
    overflow-x: auto;
  }
  .admin-nav-link { white-space: nowrap; padding: 7px 12px; font-size: 12px; }
  .admin-nav-divider { display: none; }
  .admin-main { margin-left: 0 !important; padding: 16px; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
}

/* ── Landing page ────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    flex-direction: column !important;
    padding: 80px 20px 40px !important;
    gap: 32px;
    min-height: unset !important;
  }
  .hero-content { max-width: 100% !important; text-align: center; }
  .hero-title { font-size: 36px !important; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-stats { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .hero-card { width: 100% !important; max-width: 360px; margin: 0 auto; }
  .nav-links { display: none; }
  .nav-burger { display: flex !important; }
  .features-grid { grid-template-columns: 1fr !important; }
  .fc-wide { grid-column: span 1 !important; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); }
  .pricing-grid { grid-template-columns: 1fr !important; }
  .about-grid { grid-template-columns: 1fr !important; }
  .providers-bar { flex-wrap: wrap; justify-content: center; padding: 16px; gap: 10px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links-group { flex-direction: column; gap: 24px; }
  .value-banner-inner { flex-direction: column; text-align: center; }
  .section-inner { padding: 0 16px !important; }
  .landing-contact-card { padding: 20px 16px !important; }
}

/* ── Auth pages ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .nt-auth-card {
    padding: 24px 18px 20px !important;
    border-radius: 10px !important;
  }
  .nt-auth-page { padding: 24px 12px; }
  .nt-auth-btn { font-size: 14px !important; padding: 12px !important; }
}

/* ── Global touch targets ────────────────────────────────── */
@media (max-width: 768px) {
  .btn-ghost, .btn-primary, .btn-submit {
    min-height: 40px;
  }
  button, a.btn-ghost, a.btn-primary {
    min-height: 36px;
  }
}


/* ════════════════════════════════════════════════════════════
   MOBILE FIXES — logged-in pages
   ════════════════════════════════════════════════════════════ */

/* ── App header: hide secondary nav links on mobile ─────── */
@media (max-width: 768px) {
  .app-header-right .btn-ghost {
    display: none;
  }
  /* Keep only theme toggle, user chip, logout */
  .app-header-right .theme-toggle,
  .app-header-right .user-chip,
  .app-header-right form,
  .app-header-right .admin-badge-link {
    display: flex;
  }
  .app-header-right form .btn-primary {
    display: inline-flex;
  }
  .user-chip-info { display: none; }
  .user-chip { padding: 6px; gap: 0; }
}

/* ── Usage bar: quick symbols scrollable ────────────────── */
@media (max-width: 768px) {
  .usage-bar { padding: 8px 12px; }
  .usage-inner { flex-direction: column; gap: 10px; align-items: flex-start; }
  .quick-symbols {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
    width: 100%;
    scrollbar-width: none;
  }
  .quick-symbols::-webkit-scrollbar { display: none; }
  .qs-chip { flex-shrink: 0; }
  .usage-counter { width: 100%; }
}

/* ── History table: horizontal scroll on mobile ─────────── */
@media (max-width: 768px) {
  .request-wrap > .request-card > div[style*="grid-template-columns:50px"] {
    display: none !important;
  }
}
@media (max-width: 768px) {
  /* Wrap the history rows in a scroll container */
  .history-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* History rows become cards on mobile */
  a[style*="grid-template-columns:50px"] {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 16px !important;
    gap: 6px;
  }
  a[style*="grid-template-columns:50px"] > div {
    align-self: unset !important;
    width: 100% !important;
  }
}

/* ── Analysis page: sidebar collapses to top strip ──────── */
@media (max-width: 900px) {
  .analysis-layout {
    flex-direction: column;
    gap: 16px;
  }
  .analysis-sidebar {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    width: 100%;
  }
  .analysis-sidebar .rp-card {
    min-width: 240px;
    flex-shrink: 0;
  }
  .analysis-sidebar::-webkit-scrollbar { display: none; }
  .analysis-main { width: 100%; }
}

/* ── Snapshot grid: 2 cols on mobile ────────────────────── */
@media (max-width: 640px) {
  .snapshot-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .snap-item { padding: 10px 12px; }
}

/* ── Request topbar: simplify on mobile ─────────────────── */
@media (max-width: 640px) {
  .request-topbar { padding: 10px 14px; }
  .request-topbar .inline-actions .btn-ghost:not(:first-child) {
    display: none;
  }
}

/* ── Account trade-levels: 2 col grid on mobile ─────────── */
@media (max-width: 640px) {
  .trade-levels {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .tl-item {
    width: auto !important;
    min-width: unset !important;
    padding: 10px 12px;
  }
}

/* ── Plans grid: already 1 col, just ensure spacing ─────── */
@media (max-width: 640px) {
  .plan-card { padding: 20px 16px; }
  .plan-popular-badge { font-size: 9px; }
}

/* ── Stats strip: wrap cleanly ──────────────────────────── */
@media (max-width: 640px) {
  .stats-strip {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .stats-strip-divider { display: none; }
  .stats-strip-item {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    min-width: unset;
  }
  .stats-strip-item:nth-child(even) { border-right: none; }
}

/* ── Watchlist: hide less important columns ──────────────── */
@media (max-width: 640px) {
  .wl-col-added, .wl-col-notes { display: none !important; }
}

/* ── General: all pages get safe horizontal padding ─────── */
@media (max-width: 768px) {
  .request-shell { padding-top: 70px !important; }
  .request-wrap { padding: 0 14px 40px !important; }
  .request-card { padding: 0; }
  .request-card-head { padding: 14px 16px !important; flex-wrap: wrap; gap: 8px; }
  .request-title { font-size: 20px !important; }
  .card-body { padding: 14px 16px !important; }
  .rc-head-simple { padding: 12px 16px; }
}
