/* ─── Design tokens ──────────────────────────────────────────────── */
:root {
  --bg:        #F9FAFB;
  --surface:   #FFFFFF;
  --border:    #E5E7EB;
  --border-strong: #D1D5DB;

  --text:      #111827;
  --text-muted:#6B7280;
  --text-light:#9CA3AF;

  --brand:     #f5c116;
  --brand-hover:#d4a614;
  --green:     #22C55E;
  --green-hover:#16A34A;
  --red:       #EF4444;

  --radius:    10px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
}

/* ─── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1,h2,h3,h4 { font-weight: 600; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.hidden { display: none !important; }

/* ─── App Shell ──────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  width: 72px;
  min-width: 72px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  gap: 0;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.nav-btn:hover {
  background: #F3F4F6;
  color: var(--text);
}
.nav-btn.active {
  background: var(--brand);
  color: #1A1A1A;
}
.nav-btn.active::before {
  content: '';
  position: absolute;
  left: -14px;
  width: 3px;
  height: 28px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}

/* ─── Main wrapper ───────────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ─── Top nav ────────────────────────────────────────────────────── */
.top-nav {
  height: 60px;
  min-height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.brand-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.2;
}
.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.2;
}
.nav-center { flex: 1; max-width: 400px; margin: 0 auto; }
.search-box {
  position: relative;
  width: 100%;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 16px 8px 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245, 193, 22, 0.15);
}
.search-input::placeholder { color: var(--text-light); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.icon-btn:hover { background: #F3F4F6; }
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
/* ─── Reaction bar & Feedback ────────────────────────────────────── */
.reaction-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}
.reaction-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.reaction-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--bg);
}
.reaction-btn.active-like {
  border-color: var(--green);
  color: var(--green);
  background: #F0FDF4;
}
.reaction-btn.active-dislike {
  border-color: var(--red);
  color: var(--red);
  background: #FEF2F2;
}
.reaction-count {
  font-variant-numeric: tabular-nums;
}
.feedback-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.feedback-btn {
  text-decoration: none;
}
.feedback-btn:hover {
  border-color: var(--brand);
  color: var(--brand-hover);
  background: #FFFBEB;
}

/* Feedback modal */
.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.feedback-overlay.hidden { display: none; }
.feedback-modal {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 440px;
  padding: 24px;
}
.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.feedback-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.feedback-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s;
}
.feedback-close:hover { background: #F3F4F6; }
.feedback-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.9rem;
  color: var(--text);
  resize: vertical;
  min-height: 100px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.feedback-textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245,193,22,0.15);
}
.feedback-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.user-menu-wrap {
  position: relative;
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
  cursor: pointer;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: #1A1A1A;
  text-transform: uppercase;
  line-height: 1;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 160px;
  z-index: 100;
  padding: 6px;
}
.user-dropdown.hidden { display: none; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
.dropdown-item:hover { background: #F3F4F6; }
.logout-item { color: var(--red); }
.logout-item:hover { background: #FEF2F2; }

/* ─── Content area ───────────────────────────────────────────────── */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px;
}

/* ─── Page system ────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

.page-greeting {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header-row .page-title { margin-bottom: 0; }

/* ─── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card + .card { margin-top: 20px; }
.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Stats row ──────────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.stat-icon { flex-shrink: 0; }
.stat-icon.gold { color: var(--brand); }
.stat-icon.green { color: var(--green); }
.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}
.stat-value.green { color: var(--green); }

/* ─── Dashboard grid ─────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  margin-bottom: 24px;
}

/* Chart card */
.chart-card { padding: 24px; }
.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.chart-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.chart-value-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.chart-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}
.chart-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.85rem;
  font-weight: 600;
}
.chart-change.green { color: var(--green); }
.chart-change.red { color: var(--red); }
.chart-period {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Time range buttons */
.time-range {
  display: flex;
  background: var(--bg);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.range-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.range-btn:hover { color: var(--text); }
.range-btn.active {
  background: var(--brand);
  color: #1A1A1A;
}

/* Sub-metrics */
.sub-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.sub-metric {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px 14px;
}
.sub-metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.sub-metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 3px;
}
.sub-metric-value.green { color: var(--green); }

/* Dashboard chart */
.dashboard-chart-wrap {
  border-radius: 8px;
  min-height: 260px;
}
.dashboard-chart-wrap svg {
  width: 100%;
  height: 260px;
  display: block;
}

/* Active models card */
.active-models-card {
  align-self: start;
  padding: 24px;
}
.am-icon { color: var(--brand); margin-bottom: 10px; }
.am-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}
.am-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1;
}
.am-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}
.am-change.green { color: var(--green); }

/* ─── Predictions list ───────────────────────────────────────────── */
.section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}
.predictions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prediction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 8px;
  transition: background 0.15s;
  cursor: pointer;
}
.prediction-row:hover { background: #F3F4F6; }
.prediction-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pred-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.pred-dot.active { background: var(--green); }
.pred-dot.closed { background: var(--text-light); }
.pred-name { font-weight: 500; color: var(--text); }
.prediction-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.pred-prob {
  font-weight: 700;
  color: var(--text);
}
.pred-change {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.85rem;
  font-weight: 600;
}
.pred-change.up { color: var(--green); }
.pred-change.down { color: var(--red); }

/* ─── Forecast page ──────────────────────────────────────────────── */

/* Step headers with numbered badges */
.fc-step-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.fc-step-badge {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #1A1A1A;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fc-step-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.fc-step-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* Signal chips (replacing plain checkboxes) */
.fc-signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fc-signal-chip {
  cursor: pointer;
}
.fc-signal-chip input { display: none; }
.fc-chip-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
}
.fc-signal-chip input:checked + .fc-chip-inner {
  border-color: var(--brand);
  background: #FFFBEB;
  color: var(--text);
}
.fc-signal-chip:hover .fc-chip-inner {
  border-color: var(--brand);
}

/* Run forecast button (premium) */
.btn-run-forecast {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-hover) 100%);
  color: #1A1A1A;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(245,193,22,0.3);
}
.btn-run-forecast:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(245,193,22,0.4);
}
.btn-run-forecast:active { transform: translateY(0); }
.btn-run-forecast:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Empty state (premium) */
.fc-empty-card {
  border-style: solid;
  border-color: var(--border);
  padding: 0;
}
.fc-empty-inner {
  text-align: center;
  padding: 52px 28px;
}
.fc-empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #FFFBEB;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: var(--brand);
}
.fc-empty-inner p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.55;
}

/* Result stats (dashboard-style metric cards) */
.fc-result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.fc-result-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.fc-result-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.fc-result-stat.yes-card::before { background: var(--green); }
.fc-result-stat.no-card::before { background: var(--red); }
.fc-result-stat.conf-card::before { background: var(--brand); }
.fc-rs-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fc-rs-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.fc-result-stat.yes-card .fc-rs-value { color: var(--green); }
.fc-result-stat.no-card .fc-rs-value { color: var(--red); }

/* Summary card */
.fc-summary-card {
  padding: 14px 18px;
  margin-bottom: 16px;
  background: #F0FDF4;
  border-color: #BBF7D0;
}
.fc-summary-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #166534;
}

/* Section titles with icons */
.fc-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
  flex-shrink: 0;
}
.live-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: pulseGreen 2s ease-out infinite;
}
.live-dot.offline {
  background: var(--red);
}
@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.45); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.live-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.live-timestamp {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Forecast layout */
.forecast-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  max-width: 1200px;
}
.forecast-form-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.forecast-form-col form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.forecast-output-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form cards */
.form-card { padding: 22px; }
.form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.form-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Form inputs */
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(245,193,22,0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-light); }
textarea { resize: vertical; min-height: 72px; line-height: 1.5; }

/* Buttons */
button { border: none; cursor: pointer; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--brand);
  color: #1A1A1A;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-primary.small {
  padding: 7px 14px;
  font-size: 0.82rem;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.btn-outline:hover { background: #F3F4F6; }
.full-width { width: 100%; }

/* Event meta */
.event-meta-text {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Hint */
.hint-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Advanced parameters */
.advanced-details summary {
  cursor: pointer;
  list-style: none;
}
.advanced-details summary::-webkit-details-marker { display: none; }
.advanced-details[open] .chevron-icon { transform: rotate(180deg); }
.chevron-icon { transition: transform 0.2s; }
.clickable { cursor: pointer; }
.advanced-content {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.signals-section {}
.signal-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.signal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.model-controls {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.full-span { grid-column: span 2; }

/* Run status */
.run-status {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}
.run-status.ok { color: var(--green); }
.run-status.error { color: var(--red); }
.run-status.warn { color: var(--brand-hover); }

/* ─── Forecast output ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* Decomposition grid */
.decomp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.decomp-item {
  padding: 10px;
}
.decomp-name {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.decomp-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

/* Chart wrap */
.chart-wrap {
  border-radius: 8px;
  min-height: 160px;
}
.chart-wrap svg {
  width: 100%;
  height: 160px;
  display: block;
}

/* Drivers (hidden) */
.drivers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.driver-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.driver-table th, .driver-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.driver-table th {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Evidence lists */
.evidence-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
  list-style: disc;
}
.evidence-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.evidence-list a {
  color: var(--brand-hover);
  text-decoration: none;
}
.evidence-list a:hover { text-decoration: underline; }

/* Weather */
.weather-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.weather-info p {
  margin: 0 0 4px;
  line-height: 1.55;
}

/* Text helpers */
.text-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.green { color: var(--green); }
.red { color: var(--red); }

/* ─── Models page ────────────────────────────────────────────────── */
.models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.model-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.model-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.model-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  transition: background 0.15s, color 0.15s;
}
.model-card:hover .model-icon-wrap {
  background: var(--brand);
  color: #1A1A1A;
}
.model-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.model-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.model-status-dot.active { background: var(--green); }
.model-status-dot.paused { background: var(--brand); }
.model-status-dot.draft { background: var(--text-light); }
.model-status-dot.archived { background: var(--text-light); }
.model-card-name {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.model-card-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.model-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.model-accuracy-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.model-accuracy-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.model-last-run {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Markets page ───────────────────────────────────────────────── */
.markets-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.market-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: box-shadow 0.15s;
}
.market-card:hover { box-shadow: var(--shadow-md); }
.market-card.highlight { border-color: var(--brand); }
.market-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.market-question {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.market-badge {
  display: inline-flex;
  padding: 3px 8px;
  background: var(--brand);
  color: #1A1A1A;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}
.market-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.market-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.market-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.market-stat-value.brand { color: var(--brand); }

/* ─── API page ───────────────────────────────────────────────────── */
.api-wrap {
  max-width: 720px;
}
.api-key-section {}
.api-key-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
}
.api-key-display {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.85rem;
  color: var(--text);
}
.api-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.api-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.api-stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
}
.api-stat-value.green { color: var(--green); }

.code-block {
  background: #1A1A1A;
  border-radius: 10px;
  padding: 18px;
  margin-top: 14px;
  overflow-x: auto;
}
.code-block code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.82rem;
  color: #e5e7eb;
  white-space: pre;
  line-height: 1.6;
}

/* ─── Backtest / Settings placeholders ───────────────────────────── */
.backtest-wrap,
.settings-wrap {
  max-width: 720px;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .active-models-card { display: none; }
  .forecast-layout { grid-template-columns: 1fr; }
  .models-grid { grid-template-columns: repeat(2, 1fr); }
  .market-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .sub-metrics { grid-template-columns: 1fr; }
  .fc-result-stats { grid-template-columns: repeat(2, 1fr); }
  .fc-signal-grid { grid-template-columns: 1fr; }
  .decomp-grid { grid-template-columns: repeat(2, 1fr); }
  .models-grid { grid-template-columns: 1fr; }
  .api-stats { grid-template-columns: 1fr; }
  .content-area { padding: 18px; }
}
@media (max-width: 768px) {
  .sidebar { width: 56px; min-width: 56px; }
  .nav-btn { width: 38px; height: 38px; }
  .nav-center { display: none; }
  .top-nav { padding: 0 16px; }
  .stats-row { grid-template-columns: 1fr; }
  .fc-result-stats { grid-template-columns: 1fr; }
  .fc-signal-grid { grid-template-columns: 1fr; }
  .decomp-grid { grid-template-columns: 1fr; }
  .form-fields { grid-template-columns: 1fr; }
  .controls-grid { grid-template-columns: 1fr; }
  .full-span { grid-column: span 1; }
  .banner-content { flex-direction: column; }
  .live-status-card { min-width: unset; }
  .market-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════
   EVAL DASHBOARD (User-Friendly)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────────────────────────── */
.eval-hero {
  margin-bottom: 20px;
}
.eval-hero-sub {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 600px;
}

/* ── Health banner ────────────────────────────────────────────────── */
.eval-health-banner {
  margin-bottom: 24px;
}
.eval-health-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.eval-health-inner.eval-grade--excellent { border-left: 4px solid #22C55E; background: linear-gradient(90deg, #F0FDF4 0%, var(--surface) 40%); }
.eval-health-inner.eval-grade--strong { border-left: 4px solid #22C55E; background: linear-gradient(90deg, #F0FDF4 0%, var(--surface) 40%); }
.eval-health-inner.eval-grade--good { border-left: 4px solid var(--brand); background: linear-gradient(90deg, #FFFBEB 0%, var(--surface) 40%); }
.eval-health-inner.eval-grade--fair { border-left: 4px solid #F59E0B; background: linear-gradient(90deg, #FFFBEB 0%, var(--surface) 40%); }
.eval-health-inner.eval-grade--poor { border-left: 4px solid #EF4444; background: linear-gradient(90deg, #FEF2F2 0%, var(--surface) 40%); }
.eval-health-grade {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.eval-health-icon { font-size: 1.6rem; }
.eval-health-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.eval-health-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.eval-health-summary strong { color: var(--text); }

/* ── Section hints ────────────────────────────────────────────────── */
.eval-section-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: -8px 0 16px;
  line-height: 1.5;
}

/* ── Summary cards grid ───────────────────────────────────────────── */
.eval-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.eval-loading-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.eval-loading-placeholder code {
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.eval-sport-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.eval-sport-card:hover {
  box-shadow: var(--shadow-md);
}
.eval-sport-card.eval-grade--excellent,
.eval-sport-card.eval-grade--strong { border-top: 3px solid #22C55E; }
.eval-sport-card.eval-grade--good { border-top: 3px solid var(--brand); }
.eval-sport-card.eval-grade--fair { border-top: 3px solid #F59E0B; }
.eval-sport-card.eval-grade--poor { border-top: 3px solid #EF4444; }
.eval-sport-card--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.eval-sc-empty { color: var(--text-light); font-size: 0.85rem; }
.eval-sc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.eval-sc-sport-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eval-sc-emoji { font-size: 1.3rem; }
.eval-sc-sport {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.eval-sc-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.eval-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.eval-badge--green { background: #DCFCE7; color: #166534; }
.eval-badge--gray { background: #F3F4F6; color: #6B7280; }
.eval-badge--blue { background: #DBEAFE; color: #1E40AF; }
.eval-badge--orange { background: #FEF3C7; color: #92400E; }

/* ── Ring chart in sport cards ────────────────────────────────────── */
.eval-sc-ring-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.eval-sc-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}
.eval-sc-ring svg {
  width: 80px;
  height: 80px;
}
.eval-sc-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.eval-sc-ring-meta {
  flex: 1;
  min-width: 0;
}
.eval-sc-ring-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.eval-sc-edge {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}
.eval-positive { color: #16A34A; }
.eval-negative { color: #EF4444; }
.eval-sc-grade-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.eval-sc-grade-pill.eval-grade--excellent { background: #DCFCE7; color: #166534; }
.eval-sc-grade-pill.eval-grade--strong { background: #DCFCE7; color: #166534; }
.eval-sc-grade-pill.eval-grade--good { background: #FEF9C3; color: #854D0E; }
.eval-sc-grade-pill.eval-grade--fair { background: #FEF3C7; color: #92400E; }
.eval-sc-grade-pill.eval-grade--poor { background: #FEE2E2; color: #991B1B; }

.eval-sc-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.eval-sc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  cursor: help;
}
.eval-sc-stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.eval-sc-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}
.eval-sc-footer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Section titles ───────────────────────────────────────────────── */
.eval-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ── Targets ──────────────────────────────────────────────────────── */
.eval-targets-card { margin-bottom: 24px; }
.eval-targets-list { display: flex; flex-direction: column; gap: 14px; }
.eval-target-row {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  align-items: center;
  gap: 16px;
}
.eval-target-sport {
  font-weight: 700;
  font-size: 0.9rem;
}
.eval-target-bar-wrap { flex: 1; }
.eval-target-bar {
  height: 10px;
  background: #F3F4F6;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 4px;
}
.eval-target-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.4s ease;
}
.eval-target--pass .eval-target-fill { background: #22C55E; }
.eval-target--partial .eval-target-fill { background: var(--brand); }
.eval-target--fail .eval-target-fill { background: #EF4444; }
.eval-target--pending .eval-target-fill { background: #D1D5DB; }

.eval-target-nums {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.eval-target-of { color: var(--text-light); }
.eval-target-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.eval-target--pass .eval-target-status { color: #16A34A; }
.eval-target--partial .eval-target-status { color: #CA8A04; }
.eval-target--fail .eval-target-status { color: #EF4444; }
.eval-target--pending .eval-target-status { color: #9CA3AF; }

/* ── Metrics table ────────────────────────────────────────────────── */
.eval-table-card { margin-bottom: 24px; }
.eval-table-wrap { overflow-x: auto; }
.eval-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.eval-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.eval-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.eval-table tbody tr:hover { background: #FAFAFA; }
.eval-metric-name {
  font-weight: 600;
  color: var(--text);
}
.eval-empty-row {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 14px !important;
}

/* ── Calibration (user-friendly) ──────────────────────────────────── */
.eval-cal-wrap-card { margin-bottom: 24px; }
.eval-cal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.eval-cal-card {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.eval-cal-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.eval-cal-table td, .eval-cal-table th {
  padding: 5px 8px;
  font-size: 0.78rem;
}
.eval-cal-good { color: #16A34A; font-weight: 600; }
.eval-cal-ok { color: #CA8A04; font-weight: 600; }
.eval-cal-bad { color: #EF4444; font-weight: 600; }
.eval-cal-accuracy-wrap {
  height: 8px;
  background: #F3F4F6;
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}
.eval-cal-accuracy-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.eval-cal-accuracy-bar.eval-cal-good { background: #22C55E; }
.eval-cal-accuracy-bar.eval-cal-ok { background: var(--brand); }
.eval-cal-accuracy-bar.eval-cal-bad { background: #EF4444; }

/* ── Weights ──────────────────────────────────────────────────────── */
.eval-weights-card { margin-bottom: 24px; }
.eval-weights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.eval-weight-sport {}
.eval-weight-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.eval-weight-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.eval-weight-name {
  font-size: 0.75rem;
  font-weight: 600;
  width: 70px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.eval-weight-bar-wrap {
  flex: 1;
  height: 8px;
  background: #F3F4F6;
  border-radius: 4px;
  overflow: hidden;
}
.eval-weight-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.eval-wbar-pos { background: #22C55E; }
.eval-wbar-neg { background: #EF4444; }
.eval-weight-val {
  font-size: 0.72rem;
  font-weight: 600;
  width: 55px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ── Advanced collapsible ─────────────────────────────────────────── */
.eval-advanced-card {
  margin-bottom: 24px;
  padding: 0;
  overflow: hidden;
}
.eval-advanced-details summary {
  cursor: pointer;
  list-style: none;
}
.eval-advanced-details summary::-webkit-details-marker { display: none; }
.eval-advanced-summary {
  padding: 18px 22px;
}
.eval-advanced-summary-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.eval-advanced-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.eval-advanced-subtitle {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.eval-advanced-summary-inner .chevron-icon {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.eval-advanced-details[open] .chevron-icon { transform: rotate(180deg); }
.eval-advanced-content {
  padding: 0 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.eval-adv-section {}
.eval-adv-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* ── Gaps ─────────────────────────────────────────────────────────── */
.eval-gaps-card { margin-bottom: 24px; }
.eval-gaps-list { display: flex; flex-direction: column; gap: 10px; }
.eval-gap-item {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: #FEF2F2;
  border-radius: var(--radius);
  border-left: 3px solid #EF4444;
}
.eval-gap-sport {
  font-size: 0.72rem;
  font-weight: 700;
  color: #EF4444;
  text-transform: uppercase;
  min-width: 60px;
  flex-shrink: 0;
  padding-top: 1px;
}
.eval-gap-desc {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.4;
}

/* ── History ──────────────────────────────────────────────────────── */
.eval-history-card { margin-bottom: 24px; }

/* ── Confidence Intervals ─────────────────────────────────────────── */
.eval-ci {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 2px;
}
.eval-sig-yes { color: #22c55e; font-weight: 700; }
.eval-sig-no { color: #ef4444; font-weight: 600; }
.eval-test-label { font-size: 0.72rem; color: var(--muted); margin-left: 4px; }
.eval-val-pos { color: #22c55e; font-weight: 600; }
.eval-val-neg { color: #ef4444; font-weight: 600; }

/* ── Walk-Forward Validation ──────────────────────────────────────── */
.eval-wf-card { margin-bottom: 16px; }
.eval-section-desc { font-size: 0.82rem; color: var(--muted); margin: -4px 0 14px; line-height: 1.4; }
.eval-wf-grid { display: flex; flex-direction: column; gap: 20px; }
.eval-wf-sport { }
.eval-wf-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: baseline; gap: 10px; }
.eval-wf-summary { font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.eval-wf-table { font-size: 0.82rem; }
.eval-wf-dates { font-size: 0.74rem; color: var(--muted); white-space: nowrap; }
.eval-empty-msg { font-size: 0.85rem; color: var(--muted); padding: 16px 0; }

/* ── BSS Decomposition ────────────────────────────────────────────── */
.eval-bss-card { margin-bottom: 16px; }
.eval-bss-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.eval-bss-sport { background: var(--surface); border-radius: 10px; padding: 16px; border: 1px solid var(--border); }
.eval-bss-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; }
.eval-bss-value { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.eval-bss-bars { display: flex; flex-direction: column; gap: 8px; }
.eval-bss-row { display: flex; align-items: center; gap: 8px; }
.eval-bss-label { font-size: 0.75rem; font-weight: 600; min-width: 72px; flex-shrink: 0; }
.eval-bss-bar-wrap { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.eval-bss-bar { height: 100%; border-radius: 4px; }
.eval-bss-rel { background: #ef4444; }
.eval-bss-res { background: #22c55e; }
.eval-bss-unc { background: #6366f1; }
.eval-bss-num { font-size: 0.72rem; color: var(--muted); min-width: 64px; text-align: right; }

/* ── Per-Season Breakdown ─────────────────────────────────────────── */
.eval-season-card { margin-bottom: 16px; }
.eval-season-grid { display: flex; flex-direction: column; gap: 20px; }
.eval-season-sport { }
.eval-season-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.eval-season-table { font-size: 0.82rem; }

/* ── Warnings ─────────────────────────────────────────────────────── */
.eval-warnings-card { margin-bottom: 16px; }
.eval-warnings-list { display: flex; flex-direction: column; gap: 8px; }
.eval-warning-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 0.84rem; }
.eval-warning--leak { background: rgba(239, 68, 68, 0.08); border-left: 3px solid #ef4444; }
.eval-warning--info { background: rgba(99, 102, 241, 0.08); border-left: 3px solid #6366f1; }
.eval-warning-sport { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; min-width: 60px; flex-shrink: 0; padding-top: 1px; color: var(--brand); }
.eval-warning-desc { line-height: 1.4; color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .eval-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .eval-weights-grid { grid-template-columns: repeat(2, 1fr); }
  .eval-bss-grid { grid-template-columns: repeat(2, 1fr); }
  .eval-health-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 768px) {
  .eval-summary-grid { grid-template-columns: 1fr; }
  .eval-cal-grid { grid-template-columns: 1fr; }
  .eval-weights-grid { grid-template-columns: 1fr; }
  .eval-bss-grid { grid-template-columns: 1fr; }
  .eval-target-row { grid-template-columns: 1fr; gap: 6px; }
  .eval-sc-ring-row { flex-direction: column; text-align: center; }
  .eval-advanced-summary-inner { flex-wrap: wrap; }
}

/* ═════════════════════════════════════════════════════════════════════
   Documentation Page
   ═════════════════════════════════════════════════════════════════════ */

.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  min-height: calc(100vh - 160px);
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
.docs-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.docs-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
}
.docs-nav-item:hover {
  background: var(--bg);
  color: var(--text);
}
.docs-nav-item.active {
  background: #FFFBEB;
  color: var(--text);
  font-weight: 700;
  border-left: 3px solid var(--brand);
}

/* ── Main ─────────────────────────────────────────────────────────── */
.docs-main {
  overflow-y: auto;
  padding: 32px 48px 64px;
  background: var(--bg);
}
.docs-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.docs-search-bar svg { color: var(--text-light); flex-shrink: 0; }
.docs-search-input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 4px 0 !important;
  font-size: 0.9rem;
  outline: none;
  box-shadow: none !important;
}
.docs-search-input:focus { border: none !important; box-shadow: none !important; }

/* ── Content typography ───────────────────────────────────────────── */
.docs-content {
  max-width: 780px;
  line-height: 1.7;
  color: var(--text);
}
.docs-content h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.docs-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.docs-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
}
.docs-content p {
  margin-bottom: 14px;
  font-size: 0.92rem;
}
.docs-content ul, .docs-content ol {
  padding-left: 24px;
  margin-bottom: 14px;
}
.docs-content li {
  margin-bottom: 6px;
  font-size: 0.92rem;
  list-style: disc;
}
.docs-content ol li { list-style: decimal; }
.docs-content code {
  background: #F3F4F6;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.84rem;
  color: #B45309;
}
.docs-content strong { font-weight: 700; }
.docs-content em { font-style: italic; color: var(--text-muted); }
.docs-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.docs-highlight {
  background: #FEF9C3;
  padding: 1px 3px;
  border-radius: 2px;
}

/* ── Callouts ─────────────────────────────────────────────────────── */
.docs-callout {
  padding: 18px 20px;
  border-radius: 10px;
  margin: 20px 0;
  border-left: 4px solid;
}
.docs-callout-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.docs-callout p { margin-bottom: 0; font-size: 0.9rem; }
.docs-callout--info {
  background: #EFF6FF;
  border-color: #3B82F6;
}
.docs-callout--info .docs-callout-title { color: #1D4ED8; }
.docs-callout--tip {
  background: #F0FDF4;
  border-color: #22C55E;
}
.docs-callout--tip .docs-callout-title { color: #16A34A; }
.docs-callout--warning {
  background: #FFFBEB;
  border-color: #F59E0B;
}
.docs-callout--warning .docs-callout-title { color: #B45309; }

/* ── Feature grid ─────────────────────────────────────────────────── */
.docs-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.docs-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.docs-feature-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.docs-feature-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.docs-feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.docs-feature-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Steps ────────────────────────────────────────────────────────── */
.docs-steps {
  counter-reset: step;
  list-style: none !important;
  padding-left: 0 !important;
}
.docs-steps li {
  counter-increment: step;
  list-style: none !important;
  padding: 12px 16px 12px 52px;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}
.docs-steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 11px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #1A1A1A;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Tables ───────────────────────────────────────────────────────── */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 0.85rem;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.docs-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}
.docs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.docs-table tbody tr:last-child td { border-bottom: none; }
.docs-table tbody tr:hover { background: #FAFAFA; }

/* ── API method badges ────────────────────────────────────────────── */
.docs-method {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
}
.docs-method--get { background: #DBEAFE; color: #1E40AF; }
.docs-method--post { background: #DCFCE7; color: #166534; }
.docs-method--patch { background: #FEF9C3; color: #854D0E; }
.docs-method--delete { background: #FEE2E2; color: #991B1B; }
.docs-api-table td:first-child { white-space: nowrap; }
.docs-api-table code { font-size: 0.8rem; }

/* ── Code blocks ──────────────────────────────────────────────────── */
.docs-code {
  background: #1E293B;
  border-radius: 10px;
  padding: 20px;
  margin: 16px 0;
  overflow-x: auto;
}
.docs-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.82rem;
  color: #E2E8F0;
  background: transparent;
  padding: 0;
  line-height: 1.6;
  white-space: pre;
  display: block;
}
.docs-arch code { font-size: 0.78rem; color: #94A3B8; }

/* ── Layer list (How it works) ────────────────────────────────────── */
.docs-layer-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}
.docs-layer {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}
.docs-layer:hover { border-color: var(--brand); }
.docs-layer-num {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-hover));
  color: #1A1A1A;
  font-weight: 800;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.docs-layer-body { flex: 1; }
.docs-layer-body h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.docs-layer-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ── Sport grid ───────────────────────────────────────────────────── */
.docs-sport-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0;
}
.docs-sport-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.docs-sport-emoji { font-size: 2rem; margin-bottom: 10px; }
.docs-sport-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 10px;
}
.docs-sport-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 6px;
  line-height: 1.5;
}

/* ── Glossary ─────────────────────────────────────────────────────── */
.docs-glossary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.docs-glossary-item {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.docs-glossary-item dt {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.docs-glossary-item dd {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ── FAQ ──────────────────────────────────────────────────────────── */
.docs-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.docs-faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.docs-faq[open] { border-color: var(--brand); }
.docs-faq summary {
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s;
}
.docs-faq summary::-webkit-details-marker { display: none; }
.docs-faq summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.docs-faq[open] summary::after {
  content: "−";
  color: var(--brand);
}
.docs-faq summary:hover { background: var(--bg); }
.docs-faq p {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* ── Docs responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: 1fr; height: auto; }
  .docs-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
  }
  .docs-sidebar-title { display: none; }
  .docs-nav-item { width: auto; white-space: nowrap; font-size: 0.82rem; padding: 7px 12px; }
  .docs-main { padding: 24px 20px 48px; }
  .docs-feature-grid { grid-template-columns: 1fr; }
  .docs-sport-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .docs-content h1 { font-size: 1.4rem; }
  .docs-content h2 { font-size: 1.05rem; }
}

/* ═════════════════════════════════════════════════════════════════════
   Profile Page
   ═════════════════════════════════════════════════════════════════════ */

.profile-layout {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Profile card ─────────────────────────────────────────────────── */
.profile-card { padding: 28px 32px; }

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #818cf8);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.profile-info { flex: 1; }

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.profile-email {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.profile-role-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand);
}
.profile-role--admin {
  background: rgba(234, 179, 8, 0.12);
  color: #ca8a04;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}
.profile-meta-item svg { opacity: 0.5; flex-shrink: 0; }
.profile-meta-item strong { color: var(--text); }

/* ── Stats grid ───────────────────────────────────────────────────── */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: stretch;
}

.profile-stats-grid > .profile-stat-card {
  padding: 24px 16px;
  text-align: center;
  margin-top: 0 !important;
  min-width: 0;
  box-sizing: border-box;
}

.profile-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.profile-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Section cards (common) ───────────────────────────────────────── */
.profile-section-card { padding: 24px 32px; }

.profile-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

.profile-empty {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 8px 0;
}

/* ── Sport breakdown ──────────────────────────────────────────────── */
.profile-sport-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-sport-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
}
.profile-sport-name { color: var(--text); font-weight: 500; }
.profile-sport-count {
  font-weight: 700;
  color: var(--brand);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.78rem;
}

/* ── Recent forecasts ─────────────────────────────────────────────── */
.profile-forecast-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-fc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 12px;
}
.profile-fc-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.profile-fc-sport {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.profile-fc-teams {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-fc-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.profile-fc-prob {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.profile-fc-conf {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 12px;
}
.profile-conf--high {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}
.profile-conf--med {
  background: rgba(234, 179, 8, 0.12);
  color: #ca8a04;
}
.profile-conf--low {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}
.profile-fc-date {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Action buttons ───────────────────────────────────────────────── */
.profile-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.profile-action-btn:hover { background: var(--border); }
.profile-action--logout {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}
.profile-action--logout:hover { background: rgba(239, 68, 68, 0.08); }
.profile-action--danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.04);
}
.profile-action--danger:hover { background: rgba(239, 68, 68, 0.1); }

/* ── Danger Zone ──────────────────────────────────────────────────── */
.profile-danger-card {
  padding: 24px 32px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.02);
}
.profile-danger-title { color: #ef4444; }
.profile-danger-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Edit / Password forms ─────────────────────────────────────────── */
.profile-field {
  margin-bottom: 16px;
}

.profile-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.profile-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.profile-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.profile-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.profile-save-btn {
  padding: 10px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.profile-save-btn:hover { opacity: 0.9; }
.profile-save-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.profile-cancel-btn {
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.profile-cancel-btn:hover { background: var(--border); }

/* ── Toast notifications ──────────────────────────────────────────── */
.profile-toast {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 16px;
  transition: opacity 0.3s;
}
.profile-toast.hidden { display: none; }
.profile-toast--success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.profile-toast--error {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Profile responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .profile-layout { max-width: 100%; }
  .profile-stats-grid { grid-template-columns: 1fr; }
  .profile-card,
  .profile-section-card,
  .profile-danger-card { padding: 20px; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-fc-item { flex-direction: column; align-items: flex-start; }
  .profile-fc-right { margin-top: 6px; }
}
