/* ================================================
   TPSNIPER DASHBOARD — AURORA DESIGN SYSTEM
   ================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-void: #0A0B14;
  --bg-surface: #11131F;
  --bg-elevated: #171A2B;
  --bg-hover: #1D2138;
  --bg-input: rgba(255, 255, 255, 0.03);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(139, 92, 246, 0.3);

  --accent-primary: #6366F1;
  --accent-purple: #8B5CF6;
  --accent-pink: #EC4899;
  --accent-blue: #3B82F6;
  --accent-success: #10B981;
  --accent-warning: #F59E0B;
  --accent-danger: #EF4444;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #EC4899 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  --gradient-text: linear-gradient(135deg, #F8FAFC 0%, #C7D2FE 100%);
  --gradient-accent-text: linear-gradient(135deg, #818CF8 0%, #C084FC 100%);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sidebar-w: 244px;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-void);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: -15%;
  left: -5%;
  width: 40%;
  height: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: -15%;
  right: -5%;
  width: 40%;
  height: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

/* ================================================
   LAYOUT SHELL
   ================================================ */

.dashboard-wrap {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ================================================
   SIDEBAR
   ================================================ */

.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  padding: 28px 20px 24px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  padding: 0 4px;
}

.sidebar-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-brand-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.sidebar-brand-mark svg {
  width: 17px;
  height: 17px;
  color: white;
  position: relative;
  z-index: 1;
}

.sidebar-brand span {
  background: var(--gradient-accent-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 2px;
}

.sidebar-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding: 0 10px;
  font-weight: 700;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-link,
.primary-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s var(--ease-out);
  position: relative;
  border: 1px solid transparent;
}

.menu-link:hover,
.primary-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.menu-link.active {
  color: var(--text-primary);
  background: var(--gradient-subtle);
  border-color: rgba(99, 102, 241, 0.2);
  font-weight: 600;
}

.primary-btn {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: #C7D2FE;
  font-weight: 600;
  margin: 4px 0;
}

.primary-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: var(--text-primary);
}

.sidebar-spacer {
  margin-top: auto;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
}

.btn-secondary.full {
  width: 100%;
}

/* ================================================
   MAIN CONTENT
   ================================================ */

.main {
  flex: 1;
  max-width: calc(100vw - var(--sidebar-w));
  padding: 32px 36px 60px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.topbar p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ================================================
   SECTIONS
   ================================================ */

.section {
  margin-top: 28px;
  scroll-margin-top: 24px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* ================================================
   CARDS
   ================================================ */

.card {
  position: relative;
  background: var(--bg-surface);
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-pill);
  font-size: 11px;
  color: #6EE7B7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 10px;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-success);
  box-shadow: 0 0 6px var(--accent-success);
}

#userInfo div,
#statsBox div {
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

#userInfo div strong,
#statsBox div strong {
  color: var(--text-primary);
  margin-right: 4px;
  font-weight: 600;
}

/* ================================================
   ANALYSIS SHELL
   ================================================ */

.analysis-shell {
  width: 100%;
  padding: 30px;
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.analysis-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

.analysis-title {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.analysis-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.55;
  max-width: 640px;
  margin-bottom: 24px;
}

/* ================================================
   UPLOAD PANEL
   ================================================ */

.upload-panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border-default);
  background: rgba(255, 255, 255, 0.015);
  margin-bottom: 24px;
  transition: all 0.2s var(--ease-out);
}

.upload-panel:hover {
  border-color: var(--border-hover);
  background: rgba(99, 102, 241, 0.02);
}

.upload-panel h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.upload-panel p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.file-input {
  width: 100%;
  padding: 13px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s var(--ease-out);
  outline: none;
}

.file-input:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.file-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.03);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.file-input[type="file"] {
  padding: 12px 14px;
  cursor: pointer;
}

.file-input[type="file"]::-webkit-file-upload-button {
  visibility: hidden;
  width: 0;
  padding: 0;
  border: 0;
}

.file-input[type="file"]::file-selector-button {
  visibility: hidden;
  width: 0;
  padding: 0;
  border: 0;
}

.preview-wrap {
  margin-top: 16px;
}

.preview-image {
  width: 100%;
  max-width: 780px;
  border-radius: var(--radius-lg);
  display: none;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
}

/* ================================================
   BUTTONS
   ================================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  margin-top: 20px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  border: 0;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.2s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-primary:hover:not(:disabled)::before {
  opacity: 1;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ================================================
   RESULT PANEL
   ================================================ */

.result-panel {
  margin-top: 16px;
}

.result-heading {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.result-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.bias-hero,
.confidence-card {
  padding: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

.mini-label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bias-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
}

.bias-badge.bullish {
  background: rgba(16, 185, 129, 0.12);
  color: #6EE7B7;
  border-color: rgba(16, 185, 129, 0.25);
}

.bias-badge.bearish {
  background: rgba(239, 68, 68, 0.12);
  color: #FCA5A5;
  border-color: rgba(239, 68, 68, 0.25);
}

.bias-badge.neutral {
  background: rgba(245, 158, 11, 0.12);
  color: #FCD34D;
  border-color: rgba(245, 158, 11, 0.25);
}

.confidence-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.confidence-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-family: 'JetBrains Mono', monospace;
}

.confidence-track {
  height: 8px;
  width: 100%;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  transition: width 0.5s var(--ease-out);
  background: linear-gradient(90deg, #EF4444 0%, #F59E0B 50%, #10B981 100%);
}

.confidence-note {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

/* ================================================
   FINAL VERDICT CARD
   ================================================ */

.final-verdict-card,
.market-state-card,
.trade-score-card,
.rr-warning-card,
.why-trade-card,
.invalidation-card,
.coach-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 22px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  margin-bottom: 14px;
}

.final-verdict-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, transparent 50%), var(--bg-elevated);
}

.final-verdict-card.verdict-take {
  border-color: rgba(16, 185, 129, 0.25);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, transparent 50%), var(--bg-elevated);
}

.final-verdict-card.verdict-watch {
  border-color: rgba(245, 158, 11, 0.25);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, transparent 50%), var(--bg-elevated);
}

.final-verdict-card.verdict-skip {
  border-color: rgba(239, 68, 68, 0.25);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, transparent 50%), var(--bg-elevated);
}

.final-verdict-head,
.market-state-head,
.trade-score-top,
.rr-warning-head,
.why-trade-head,
.invalidation-head,
.coach-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.final-verdict-label,
.trade-score-label {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.final-verdict-title,
.market-state-title,
.rr-warning-title,
.why-trade-title,
.invalidation-title,
.coach-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.trade-score-title {
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.trade-score-subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  max-width: 500px;
  margin-top: 6px;
}

.final-verdict-badge,
.market-state-badge,
.why-trade-badge,
.invalidation-badge,
.coach-badge,
.rr-warning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.coach-badge {
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

.invalidation-badge {
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}

.rr-warning-badge.low {
  color: #FCA5A5;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.rr-warning-badge.medium {
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
}

.final-verdict-main {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
  align-items: start;
}

.final-verdict-value {
  font-size: 40px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.final-verdict-subtext {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
  max-width: 420px;
}

.final-verdict-metrics {
  display: grid;
  gap: 8px;
}

.final-verdict-metric,
.rr-warning-box,
.score-box,
.market-state-box,
.coach-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px;
}

.final-verdict-metric span,
.rr-warning-box span,
.score-box span,
.market-state-box span,
.coach-box span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.final-verdict-metric strong,
.rr-warning-box strong,
.score-box strong,
.market-state-box strong {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  font-family: 'JetBrains Mono', monospace;
  word-break: break-word;
}

.score-box strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.score-box em {
  display: block;
  margin-top: 5px;
  font-style: normal;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ================================================
   MARKET STATE / TRADE SCORE / RR / WHY / INVALID / COACH GRIDS
   ================================================ */

.market-state-grid,
.trade-score-grid,
.rr-warning-meta,
.coach-grid {
  display: grid;
  gap: 10px;
}

.market-state-grid { grid-template-columns: repeat(4, 1fr); }
.trade-score-grid { grid-template-columns: repeat(4, 1fr); }
.rr-warning-meta { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.coach-grid { grid-template-columns: repeat(3, 1fr); }

.trade-score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: var(--gradient-subtle);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  min-width: 100px;
}

.score-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.score-scale {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.rr-warning-text {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

/* ================================================
   WHY / INVALIDATION LISTS
   ================================================ */

.why-trade-list,
.invalidation-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
}

.why-trade-item,
.invalidation-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
}

.why-dot,
.invalidation-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.why-dot {
  background: linear-gradient(180deg, #818CF8, #A78BFA);
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.4);
}

.invalidation-dot {
  background: linear-gradient(180deg, #FCD34D, #FCA5A5);
  box-shadow: 0 0 8px rgba(252, 211, 77, 0.3);
}

/* ================================================
   COACH
   ================================================ */

.coach-copy {
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
  word-break: break-word;
}

.coach-warning-copy {
  color: #FCD34D;
  font-weight: 600;
}

.coach-box-warning {
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.15);
}

/* ================================================
   RESULT TABLE
   ================================================ */

.result-table {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  margin-top: 14px;
}

.result-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s var(--ease-out);
}

.result-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}

.result-value {
  color: var(--text-primary);
  text-align: right;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  font-family: 'JetBrains Mono', monospace;
}

.rr-good { color: #6EE7B7 !important; }
.rr-medium { color: #FCD34D !important; }
.rr-low { color: #FCA5A5 !important; }

/* ================================================
   QUICK ACTIONS (Copy buttons)
   ================================================ */

.quick-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-action-btn {
  padding: 9px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.quick-action-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.quick-action-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.quick-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================================================
   PLAN LOCKS
   ================================================ */

.plan-locked {
  position: relative;
}

.plan-locked.locked-content > .lock-target {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, rgba(10, 11, 20, 0.5), rgba(10, 11, 20, 0.75));
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lock-overlay.show {
  display: flex;
}

.lock-box {
  width: min(460px, 100%);
  border-radius: var(--radius-xl);
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.lock-box.pro { border-color: rgba(99, 102, 241, 0.3); }
.lock-box.elite { border-color: rgba(245, 158, 11, 0.3); }

.lock-kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.lock-box.pro .lock-kicker {
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
}

.lock-box.elite .lock-kicker {
  color: #FCD34D;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}

.lock-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.lock-text {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.lock-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  transition: all 0.2s var(--ease-out);
}

.lock-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

/* ================================================
   MESSAGES
   ================================================ */

#analysisMessage {
  margin-top: 14px;
  padding: 0;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.message-success {
  padding: 10px 14px !important;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
}

.message-error {
  padding: 10px 14px !important;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
}

/* ================================================
   RISK CARD
   ================================================ */

.risk-card {
  margin-top: 24px;
  padding: 26px;
  background: var(--bg-elevated);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.risk-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  text-transform: none;
  letter-spacing: -0.01em;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.risk-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.risk-field input,
.risk-field select {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: all 0.2s var(--ease-out);
}

.risk-field input:focus,
.risk-field select:focus {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.03);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.risk-field select {
  cursor: pointer;
}

.risk-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.risk-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.risk-box span {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.risk-box strong {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
}

.risk-disclaimer {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ================================================
   COPY TOAST
   ================================================ */

.copy-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   BACK TO TOP
   ================================================ */

.back-to-top-btn {
  position: fixed;
  right: 22px;
  bottom: 80px;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  pointer-events: none;
  transition: all 0.22s var(--ease-out);
}

.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.back-to-top-btn svg {
  width: 18px;
  height: 18px;
}

/* ================================================
   DISCLAIMER
   ================================================ */

.dashboard-disclaimer {
  margin-top: 32px;
  padding: 18px 22px;
  background: rgba(245, 158, 11, 0.03);
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: var(--radius-lg);
  font-size: 12px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1200px) {
  .market-state-grid,
  .trade-score-grid,
  .coach-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-trade-list,
  .invalidation-list {
    grid-template-columns: 1fr;
  }

  .rr-warning-meta {
    grid-template-columns: 1fr;
  }

  .risk-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .risk-results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    z-index: 999;
    transition: left 0.3s var(--ease-out);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    left: 0;
  }

  .main {
    max-width: 100vw;
    padding: 20px 20px 60px;
  }

  .mobile-menu-toggle {
    display: inline-flex !important;
  }

  .analysis-shell {
    padding: 20px;
  }

  .analysis-title {
    font-size: 26px;
  }

  .final-verdict-main {
    grid-template-columns: 1fr;
  }

  .final-verdict-value {
    font-size: 32px;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }

  .result-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 18px;
  }

  .result-value {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 16px 14px 60px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .analysis-shell {
    padding: 18px;
  }

  .analysis-title {
    font-size: 22px;
  }

  .market-state-grid,
  .trade-score-grid,
  .coach-grid {
    grid-template-columns: 1fr;
  }

  .risk-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .risk-results {
    grid-template-columns: 1fr;
  }

  .final-verdict-value {
    font-size: 28px;
  }

  .card,
  .final-verdict-card,
  .market-state-card,
  .trade-score-card,
  .rr-warning-card,
  .why-trade-card,
  .invalidation-card,
  .coach-card {
    padding: 18px;
  }

  .risk-card {
    padding: 18px;
  }

  .back-to-top-btn {
    bottom: 20px;
  }
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  margin-right: 10px;
}

.mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
}
