/* ============================================================
   FINTRACKER × PORTFOLIO — Dark Fintech SPA
   Theme: Navy/Near-black + Cyan/Magenta/Purple/Gold accents
   Fonts: Cabinet Grotesk (display) + Satoshi (body)
   ============================================================ */

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

:root {
  --bg:           #0b0d15;
  --sidebar-bg:   #0d1020;
  --card-bg:      #161b2e;
  --card-border:  #1e2640;
  --surface:      #1a2035;
  --surface-2:    #202840;

  --cyan:         #00d4ff;
  --cyan-dim:     rgba(0, 212, 255, 0.12);
  --cyan-mid:     rgba(0, 212, 255, 0.25);
  --magenta:      #e91e8c;
  --magenta-dim:  rgba(233, 30, 140, 0.12);
  --purple:       #7c3aed;
  --purple-dim:   rgba(124, 58, 237, 0.12);
  --gold:         #f59e0b;
  --gold-dim:     rgba(245, 158, 11, 0.12);
  --green:        #22c55e;
  --green-dim:    rgba(34, 197, 94, 0.12);
  --red:          #ef4444;
  --red-dim:      rgba(239, 68, 68, 0.12);

  --text:         #e8eaf6;
  --text-muted:   #8892b0;
  --text-faint:   #4a5578;
  --text-white:   #ffffff;

  --sidebar-w:    240px;
  --header-h:     56px;

  --r-sm:         6px;
  --r:            10px;
  --r-lg:         14px;
  --r-xl:         20px;

  --font-display: 'Cabinet Grotesk', system-ui, sans-serif;
  --font-body:    'Satoshi', system-ui, sans-serif;

  --shadow-card:  0 2px 16px rgba(0,0,0,0.4);
  --shadow-glow:  0 0 24px rgba(0,212,255,0.15);
  --transition:   0.2s ease;
}

html { font-size: 15px; scroll-behavior: smooth; }

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

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

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

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 2px; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

.logo-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-white);
  letter-spacing: -0.3px;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 400;
}

/* Nav Groups */
.nav-manage {
  flex: 1;
  padding: 12px 0 80px;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--transition);
}

.nav-group-btn:hover { color: var(--text-muted); }

.chevron {
  width: 12px; height: 12px;
  transition: transform var(--transition);
  color: var(--text-faint);
}

.nav-group-items {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  max-height: 600px;
  opacity: 1;
}

.nav-group-items.collapsed {
  max-height: 0;
  opacity: 0;
}

.nav-group-items.collapsed + .nav-section .chevron,
.nav-section:has(.nav-group-items.collapsed) .chevron {
  transform: rotate(-90deg);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border-left: 2px solid transparent;
  user-select: none;
}

.nav-item:hover {
  background: var(--cyan-dim);
  color: var(--text);
  border-left-color: var(--cyan-mid);
}

.nav-item.active {
  background: var(--cyan-dim);
  color: var(--cyan);
  border-left-color: var(--cyan);
  font-weight: 600;
}

.nav-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--card-border);
  background: var(--sidebar-bg);
}

.nav-footer .nav-item {
  border-radius: var(--r-sm);
}

/* ─── Main Content ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.topbar {
  height: var(--header-h);
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(8px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.dot-live {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  cursor: pointer;
}

/* Page Container */
#page-container {
  flex: 1;
  padding: 28px 28px 60px;
  max-width: 1400px;
  width: 100%;
}

/* ─── Page Header ─────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.sub-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

/* ─── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 16px;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.card-header-row .card-title { margin-bottom: 0; }

.card-meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: -12px;
  margin-bottom: 16px;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 20px 0 8px;
}

/* ─── KPI Grid ────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), transform var(--transition);
}

.kpi-card:hover {
  border-color: var(--cyan-mid);
  transform: translateY(-1px);
}

.kpi-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.kpi-value-xl {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: -1px;
}

.kpi-big-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.kpi-icon {
  width: 40px; height: 40px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.kpi-cyan    { background: var(--cyan-dim);    color: var(--cyan); }
.kpi-magenta { background: var(--magenta-dim); color: var(--magenta); }
.kpi-purple  { background: var(--purple-dim);  color: var(--purple); }
.kpi-gold    { background: var(--gold-dim);    color: var(--gold); }
.kpi-green   { background: var(--green-dim);   color: var(--green); }
.kpi-red     { background: var(--red-dim);     color: var(--red); }

.kpi-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 2px;
  width: fit-content;
}

.badge-up   { background: var(--green-dim);   color: var(--green); }
.badge-down { background: var(--red-dim);     color: var(--red); }
.badge-flat { background: var(--surface);     color: var(--text-muted); }

/* ─── Badges / Pills ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.badge-green  { background: var(--green-dim);   color: var(--green); }
.badge-blue   { background: rgba(59,130,246,0.12); color: #60a5fa; }
.badge-purple { background: var(--purple-dim);  color: #a78bfa; }
.badge-gold   { background: var(--gold-dim);    color: var(--gold); }
.badge-red    { background: var(--red-dim);     color: var(--red); }
.badge-cyan   { background: var(--cyan-dim);    color: var(--cyan); }
.badge-magenta{ background: var(--magenta-dim); color: var(--magenta); }

/* ─── Charts ──────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.charts-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.chart-wrap {
  position: relative;
  height: 220px;
  margin-bottom: 12px;
}

.chart-wrap canvas { width: 100% !important; height: 100% !important; }

.chart-wrap-wide {
  height: 200px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 4px;
}

.leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.leg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Tables ──────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  border-bottom: 1px solid var(--card-border);
}

.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(30,38,64,0.6);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.total-row td {
  border-top: 1px solid var(--card-border);
  border-bottom: none;
  padding-top: 10px;
  font-weight: 700;
}

.actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bank-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 12px 10px 4px;
}

/* ─── Two-column layout ───────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* ─── Buttons ─────────────────────────────────────────────── */
button { cursor: pointer; font-family: var(--font-body); }

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cyan);
  color: #000;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}

.btn-add:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--text-faint);
}

.btn-link {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: opacity var(--transition);
}

.btn-link:hover { opacity: 0.7; }

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-size: 13px;
}

.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.del:hover { background: var(--red-dim); color: var(--red); border-color: var(--red); }

.quick-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.qbtn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
}

.qbtn:hover, .qbtn.active {
  background: var(--cyan-dim);
  border-color: var(--cyan-mid);
  color: var(--cyan);
}

.strat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.strat-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.strat-btn {
  background: var(--surface);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.strat-btn:hover { background: var(--purple-dim); color: #a78bfa; border-color: var(--purple); }
.strat-btn.active { background: var(--purple-dim); color: #a78bfa; border-color: var(--purple); }

/* ─── Progress Bars ───────────────────────────────────────── */
.progress-track {
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 3px;
  transition: width 0.6s ease;
}

.progress-fill-gold {
  background: linear-gradient(90deg, var(--gold), var(--magenta));
}

.progress-fill-green {
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.savings-bar-section { margin-top: 16px; }

.savings-bar-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.capacity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

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

.cap-sep {
  color: var(--card-border);
  font-size: 20px;
  font-weight: 200;
}

.cap-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--cyan);
}

.progress-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 8px;
}

.progress-card .prog-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* ─── Banners & Alerts ────────────────────────────────────── */
.info-banner-green {
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--green);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.info-banner-cyan {
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--cyan);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-banner {
  background: var(--gold-dim);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.banner-icon { flex-shrink: 0; margin-top: 1px; }

/* ─── Empty States ────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 12px;
  text-align: center;
}

.empty-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
}

.empty-state p { font-size: 14px; color: var(--text-muted); }

/* ─── Budget Quick Grid ───────────────────────────────────── */
.budget-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ─── Filter Tabs ─────────────────────────────────────────── */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover { color: var(--text); }
.filter-tab.active {
  background: var(--card-bg);
  color: var(--cyan);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ─── Day Tabs (Menus) ────────────────────────────────────── */
.day-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.day-tab {
  background: var(--surface);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--transition);
}

.day-tab:hover { border-color: var(--text-faint); color: var(--text); }
.day-tab.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.menu-content { display: none; }
.menu-content.active { display: block; }

.menu-day {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.meal-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  overflow: hidden;
}

.meal-tag {
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meal-matin { background: var(--gold-dim); color: var(--gold); }
.meal-midi  { background: var(--cyan-dim); color: var(--cyan); }
.meal-soir  { background: var(--purple-dim); color: #a78bfa; }

.meal-body {
  padding: 12px;
}

.meal-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.meal-kcal { font-size: 11px; color: var(--text-faint); margin-bottom: 8px; }
.meal-ingr { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.meal-method { font-size: 12px; color: var(--text-faint); font-style: italic; }

/* Meal times (daily-life page) */
.meal-times {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meal-time {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--r);
}

.meal-hour {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
  white-space: nowrap;
  min-width: 50px;
}

/* Routine List */
.routine-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.routine-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--card-border);
  transition: border-color var(--transition);
}

.routine-item:hover { border-color: var(--cyan-mid); }

.routine-hour {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
  min-width: 44px;
}

.routine-emoji { font-size: 16px; }

.routine-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.routine-dur {
  font-size: 11px;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ─── Forms ───────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-input:focus { border-color: var(--cyan); }
.form-input::placeholder { color: var(--text-faint); }

select.form-input option { background: var(--card-bg); }

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

.result-block {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 14px;
  text-align: center;
}

.result-block .rb-val {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--cyan);
}

.result-block .rb-label {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--card-border);
  font-size: 13px;
}

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

.bareme-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--card-border);
  padding: 7px 0;
  font-size: 12px;
}

.bareme-row:first-child {
  font-weight: 700;
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
}

/* Counter (enfants) */
.counter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.counter-btn {
  width: 28px; height: 28px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.counter-btn:hover { background: var(--surface-2); }

.counter-val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--cyan);
  min-width: 24px;
  text-align: center;
}

/* ─── Timeline ────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--card-border);
  z-index: 0;
}

.tl-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  position: relative;
  z-index: 1;
}

.tl-dot {
  width: 38px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}

.tl-dot-inner {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  border: 2px solid var(--bg);
  flex-shrink: 0;
}

.tl-dot-inner.done { background: var(--green); }
.tl-dot-inner.warn { background: var(--gold); }
.tl-dot-inner.future { background: var(--text-faint); }

.tl-alert {
  background: var(--magenta-dim);
  border-left: 3px solid var(--magenta);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 8px 12px;
}

.tl-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.tl-text {
  font-size: 13px;
  color: var(--text);
}

/* ─── Tunnel (Immobilier) ─────────────────────────────────── */
.tunnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.tunnel-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tunnel-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
}

.tunnel-name { font-weight: 700; font-size: 14px; }
.tunnel-cost { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--cyan); }
.tunnel-specs { font-size: 11px; color: var(--text-muted); }

/* ─── Phase Grid (Phases Immobilier) ──────────────────────── */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.phase-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.phase-num {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.phase-title { font-weight: 700; font-size: 14px; margin: 4px 0; }
.phase-years { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.phase-cost  { font-size: 13px; color: var(--magenta); font-weight: 600; }
.phase-income { font-size: 13px; color: var(--green); font-weight: 600; }

/* ─── Coins / Metals ──────────────────────────────────────── */
.coins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.coin-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.coin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.coin-name { font-weight: 700; font-size: 14px; }

.coin-rec {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.rec-green  { background: var(--green-dim);   color: var(--green); }
.rec-yellow { background: var(--gold-dim);    color: var(--gold); }
.rec-orange { background: rgba(251,146,60,0.12); color: #fb923c; }

.coin-specs { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.coin-desc  { font-size: 12px; color: var(--text-faint); }

.metals-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--r);
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Recommendations Grid ────────────────────────────────── */
.reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.reco-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.reco-card h4 {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-white);
}

.reco-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ─── Livrets / Savings Accounts ─────────────────────────── */
.livret-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.livret-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.livret-name { font-weight: 700; font-size: 14px; }
.livret-rate {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--cyan);
}

.livret-cap { font-size: 12px; color: var(--text-muted); }
.livret-note { font-size: 11px; color: var(--text-faint); }

/* ─── Income Grid ─────────────────────────────────────────── */
.income-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.income-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.income-card h4 { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.income-card .amount {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--green);
}

/* ─── Empire / Projects ───────────────────────────────────── */
.empire-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.empire-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.ec-name { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.ec-inv  { font-size: 12px; color: var(--text-muted); }
.ec-marge { font-size: 12px; color: var(--green); font-weight: 600; }

.empire-project {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.ep-info { flex: 1; }
.ep-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.ep-type { font-size: 12px; color: var(--text-muted); }
.ep-budget { font-size: 12px; color: var(--gold); font-weight: 600; }

/* ─── Bank Recommendations ────────────────────────────────── */
.bank-reco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bank-reco-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.bank-reco-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.bank-reco-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ─── Niche / Source / Tips Lists ────────────────────────── */
.niche-list, .source-list, .tips-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.niche-item, .source-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  font-size: 13px;
  gap: 12px;
}

.niche-name { font-weight: 600; }

.tips-box {
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--cyan);
  line-height: 1.6;
}

.tips-box li { margin-left: 16px; margin-top: 4px; }

/* ─── Genre / Config ──────────────────────────────────────── */
.genre-list, .cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.genre-item, .cat-chip {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.genre-item:hover, .cat-chip:hover,
.genre-item.active, .cat-chip.active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
  color: var(--cyan);
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.config-item {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 12px;
  font-size: 12px;
  text-align: center;
}

.config-item strong { display: block; font-size: 16px; color: var(--cyan); }

.banner-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: var(--r);
  margin-bottom: 16px;
}

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

.bs-val { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--cyan); }
.bs-label { font-size: 11px; color: var(--text-faint); }

/* ─── Insurance List ──────────────────────────────────────── */
.insurance-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.insurance-item {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.ins-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.ins-name { font-weight: 700; font-size: 14px; }
.ins-priority { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.ins-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ins-price { font-size: 13px; color: var(--gold); font-weight: 600; }
.ins-cat   { font-size: 12px; color: var(--text-muted); }
.ins-desc  { font-size: 12px; color: var(--text-faint); line-height: 1.5; }

/* ─── Marriage Steps ──────────────────────────────────────── */
.marriage-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.marriage-step {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  gap: 16px;
}

.ms-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-faint);
  min-width: 36px;
  flex-shrink: 0;
}

.ms-content { flex: 1; }

.ms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 8px;
}

.ms-title { font-weight: 700; font-size: 14px; }
.ms-cost { font-size: 13px; color: var(--gold); font-weight: 600; }
.ms-when { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ─── Dividends Grid ──────────────────────────────────────── */
.divid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.divid-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.divid-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.divid-sym {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--cyan);
}

.divid-ticker { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.divid-type { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.divid-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.divid-desc { font-size: 12px; color: var(--text-faint); line-height: 1.5; }

/* ─── Search Bar ──────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 8px 14px;
  margin-bottom: 16px;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
}

.search-bar input::placeholder { color: var(--text-faint); }

/* ─── Recipes ─────────────────────────────────────────────── */
.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.recipe-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}

.recipe-card:hover { transform: translateY(-2px); border-color: var(--cyan-mid); }

.recipe-img {
  height: 140px;
  background: linear-gradient(135deg, var(--surface-2), var(--card-bg));
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}

.recipe-body { padding: 14px; }

.recipe-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.recipe-name { font-weight: 700; font-size: 14px; }
.recipe-rating { font-size: 12px; color: var(--gold); }
.recipe-meta { display: flex; gap: 10px; margin-bottom: 6px; }
.recipe-info { font-size: 11px; color: var(--text-faint); }
.recipe-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.tag-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Toulouse ────────────────────────────────────────────── */
.toulouse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.toulouse-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.tc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tc-name  { font-weight: 700; font-size: 14px; }
.tc-type  { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.tc-addr  { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.tc-desc  { font-size: 12px; color: var(--text-faint); line-height: 1.5; margin-bottom: 8px; }
.tc-opps  { font-size: 12px; color: var(--cyan); }

.toulouse-chips, .chip-row, .profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

/* ─── Certifications (Diplômes) ───────────────────────────── */
.cert-sections { display: flex; flex-direction: column; gap: 16px; }

.cert-group {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
}

.cert-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cert-items { display: flex; flex-direction: column; gap: 8px; }

.cert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--card-bg);
  border-radius: var(--r-sm);
  font-size: 13px;
  gap: 12px;
}

/* ─── FAQ / Legal ─────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 14px 16px;
}

.faq-item h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.faq-item p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* Legal Chat */
.legal-chat {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  min-height: 200px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-faint);
  font-size: 13px;
  min-height: 120px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}

.chat-input-row input:focus { border-color: var(--cyan); }

/* Resource List */
.resource-list { display: flex; flex-direction: column; gap: 8px; }

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  font-size: 13px;
}

/* ─── Upload / Drop Zone ──────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--card-border);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.upload-zone:hover { border-color: var(--cyan-mid); }

.drop-zone {
  border: 2px dashed var(--cyan-mid);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  text-align: center;
  background: var(--cyan-dim);
  margin-bottom: 16px;
}

.upload-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ─── Steps List ──────────────────────────────────────────── */
.steps-list { display: flex; flex-direction: column; gap: 10px; }

.step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cyan-dim);
  border: 2px solid var(--cyan-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--cyan);
  flex-shrink: 0;
}

/* ─── Roadmap ─────────────────────────────────────────────── */
.roadmap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roadmap-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  transition: border-color var(--transition);
}

.roadmap-step:hover { border-color: var(--cyan-mid); }

.rm-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-faint);
  min-width: 32px;
  flex-shrink: 0;
  line-height: 1;
}

.rm-done .rm-num  { color: var(--green); }
.rm-active .rm-num { color: var(--cyan); }
.rm-todo .rm-num  { color: var(--text-faint); }

.rm-content { flex: 1; }

.rm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 6px;
}

.rm-title  { font-weight: 700; font-size: 14px; }
.rm-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.rm-desc   { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.rm-action { margin-top: 8px; }

/* ─── Quests / Gamification ───────────────────────────────── */
.quest-list { display: flex; flex-direction: column; gap: 8px; }

.quest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  font-size: 13px;
  transition: border-color var(--transition);
}

.quest-item:hover { border-color: var(--gold-dim); }

.quest-check {
  width: 20px; height: 20px;
  border: 2px solid var(--card-border);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.quest-check.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.quest-text { flex: 1; }
.quest-xp { font-size: 11px; font-weight: 700; color: var(--gold); }

/* ─── Book / Course ───────────────────────────────────────── */
.book-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  margin-bottom: 10px;
}

.book-info { flex: 1; }
.book-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.book-progress { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* ─── Method Grid (Learning) ──────────────────────────────── */
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.method-item {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 16px;
  position: relative;
}

.method-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--cyan-dim);
  position: absolute;
  top: 8px; right: 12px;
}

.method-item h4 { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.method-item p  { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ─── Season Grid ─────────────────────────────────────────── */
.season-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.season-item {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r);
  padding: 14px;
  text-align: center;
}

.season-item .s-emoji { font-size: 28px; margin-bottom: 8px; }
.season-item h4 { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.season-item p  { font-size: 12px; color: var(--text-muted); }

/* ─── Profile ─────────────────────────────────────────────── */
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(30,38,64,0.6);
  font-size: 13px;
}

.profile-row:last-child { border-bottom: none; }
.profile-label { color: var(--text-muted); }
.profile-value { font-weight: 600; color: var(--text); }

/* ─── Lock Card ───────────────────────────────────────────── */
.page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  gap: 16px;
}

.lock-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--r-xl);
  padding: 40px 32px;
  max-width: 400px;
  text-align: center;
}

.lock-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--cyan-dim);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: var(--cyan);
}

.lock-input-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.lock-input-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  text-align: center;
  letter-spacing: 3px;
  font-weight: 700;
}

.lock-input-row input:focus { border-color: var(--cyan); }

/* ─── Text Utilities ──────────────────────────────────────── */
.text-cyan    { color: var(--cyan); }
.text-magenta { color: var(--magenta); }
.text-purple  { color: #a78bfa; }
.text-gold    { color: var(--gold); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-muted   { color: var(--text-muted); }
.text-faint   { color: var(--text-faint); }
.text-white   { color: var(--text-white); }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-xs      { font-size: 11px; }
.text-sm      { font-size: 12px; }
.font-bold    { font-weight: 700; }
.mb-0         { margin-bottom: 0; }
.mb-8         { margin-bottom: 8px; }
.mb-16        { margin-bottom: 16px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; gap: 8px; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }

/* ─── Overlay (mobile) ────────────────────────────────────── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.overlay.open { display: block; }

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

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

#page-container > * {
  animation: fadeInUp 0.25s ease both;
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .season-grid { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .charts-row, .charts-row-3 { grid-template-columns: 1fr; }
  .two-col, .budget-quick-grid, .form-grid, .three-col { grid-template-columns: 1fr; }
  .menu-day { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0,0,0,0.5);
  }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }
  #page-container { padding: 20px 16px 40px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 20px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-grid-3 { grid-template-columns: 1fr; }
  .kpi-grid-2 { grid-template-columns: 1fr; }
  .tunnel-grid, .phase-grid, .coins-grid, .livret-grid,
  .income-grid, .empire-grid, .divid-grid, .reco-grid,
  .recipes-grid, .toulouse-grid, .method-grid {
    grid-template-columns: 1fr;
  }
  .season-grid { grid-template-columns: repeat(2, 1fr); }
  .day-tabs { gap: 4px; }
  .day-tab { padding: 6px 10px; font-size: 11px; }
}
