/* ============================================================
   LIFE SYSTEM 2026 — DARK THEME DESIGN SYSTEM
   ============================================================ */

:root {
  --bg-0:      #070709;
  --bg-1:      #0e0e12;
  --bg-2:      #141418;
  --bg-3:      #1a1a20;
  --bg-4:      #222228;
  --border:    #2a2a32;
  --border-hi: #383842;

  --txt-1:     #eaeaf0;
  --txt-2:     #a0a0b0;
  --txt-3:     #606070;
  --txt-4:     #3a3a48;

  --blue:      #3a7bd5;
  --blue-dim:  #1e3a60;
  --blue-glow: rgba(58, 123, 213, 0.15);

  --green:     #3a9e6e;
  --green-dim: #1a3d2e;
  --green-glow:rgba(58, 158, 110, 0.15);

  --orange:    #c8762a;
  --orange-dim:#3d2410;

  --red:       #c04040;
  --red-dim:   #3d1010;

  --purple:    #7b5ea7;
  --purple-dim:#2a1e3d;

  --gold:      #c8a832;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --font:     'Inter', 'SF Pro Display', system-ui, sans-serif;
  --font-mono:'JetBrains Mono', 'Fira Code', monospace;

  --shadow:   0 2px 12px rgba(0,0,0,0.5);
  --shadow-lg:0 8px 32px rgba(0,0,0,0.6);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 220px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--txt-1);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 99px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.logo-icon {
  font-size: 22px;
  color: var(--blue);
  line-height: 1;
}

.logo-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--txt-1);
}

.logo-year {
  font-size: 10px;
  color: var(--txt-3);
  letter-spacing: 0.1em;
}

.nav-list {
  list-style: none;
  padding: 12px 8px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--txt-2);
  transition: all var(--transition);
  margin-bottom: 2px;
  user-select: none;
}

.nav-item:hover {
  background: var(--bg-3);
  color: var(--txt-1);
}

.nav-item.active {
  background: var(--blue-glow);
  color: var(--blue);
  border: 1px solid var(--blue-dim);
}

.nav-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.nav-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.current-date {
  font-size: 11px;
  color: var(--txt-2);
  font-family: var(--font-mono);
}

.sidebar-version {
  font-size: 10px;
  color: var(--txt-4);
  font-family: var(--font-mono);
}

/* ── Sidebar collapse ── */
.sidebar.collapsed {
  transform: translateX(calc(-1 * var(--sidebar-w)));
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  transition: margin-left var(--transition);
  display: flex;
  flex-direction: column;
}

.main-content.expanded { margin-left: 0; }

/* ── TOPBAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.sidebar-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--txt-2);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}
.sidebar-toggle:hover { border-color: var(--border-hi); color: var(--txt-1); }

.page-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--txt-1);
}

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

.discipline-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 99px;
}

.badge-label { font-size: 11px; color: var(--txt-3); letter-spacing: 0.06em; }
.badge-value { font-size: 13px; font-weight: 700; color: var(--gold); font-family: var(--font-mono); }

.day-indicator {
  font-size: 12px;
  color: var(--txt-2);
  font-family: var(--font-mono);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   MODULE SYSTEM
   ============================================================ */
.module {
  display: none;
  flex: 1;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}

.module.active { display: block; }

.module-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--transition);
}

.card:hover { border-color: var(--border-hi); }

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

.card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-2);
}

.card-badge {
  font-size: 11px;
  color: var(--txt-3);
  background: var(--bg-3);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.accent-green-badge {
  color: var(--green);
  background: var(--green-dim);
}

.mt-16 { margin-top: 4px; }
.flex-1 { flex: 1; }

/* ============================================================
   KPI GRID
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kpi-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.accent-blue::before  { background: var(--blue); }
.accent-green::before { background: var(--green); }
.accent-gray::before  { background: var(--txt-3); }
.accent-orange::before{ background: var(--orange); }

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

.kpi-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--txt-1);
  line-height: 1.1;
}

.kpi-sub {
  font-size: 11px;
  color: var(--txt-3);
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* ============================================================
   CHARTS
   ============================================================ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.chart-card { }

.chart-wrap {
  height: 240px;
  position: relative;
}

.chart-wrap-sm {
  height: 160px;
  position: relative;
}

/* ============================================================
   STATUS ROW
   ============================================================ */
.status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── Debt Timeline ── */
.debt-timeline { display: flex; flex-direction: column; gap: 10px; }

.debt-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.debt-name {
  font-size: 12px;
  color: var(--txt-2);
  width: 90px;
  flex-shrink: 0;
}

.debt-bar-bg {
  flex: 1;
  height: 5px;
  background: var(--bg-4);
  border-radius: 99px;
  overflow: hidden;
}

.debt-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--red);
  transition: width 0.6s ease;
}

.debt-bar-fill.done { background: var(--green); }

.debt-end {
  font-size: 10px;
  color: var(--txt-3);
  font-family: var(--font-mono);
  width: 48px;
  text-align: right;
}

/* ── Agenda ── */
.today-agenda { display: flex; flex-direction: column; gap: 8px; }

.agenda-block {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border-left: 3px solid transparent;
}

.agenda-block.agenda-gym   { border-color: var(--green); }
.agenda-block.agenda-work  { border-color: var(--blue); }
.agenda-block.agenda-spirit{ border-color: var(--purple); }
.agenda-block.agenda-rel   { border-color: var(--orange); }
.agenda-block.agenda-pos   { border-color: var(--gold); }

.agenda-time { font-size: 10px; color: var(--txt-3); font-family: var(--font-mono); width: 60px; flex-shrink: 0; }
.agenda-desc { font-size: 12px; color: var(--txt-2); }

/* ── Rules Reminder ── */
.rules-reminder { display: flex; flex-direction: column; gap: 8px; }

.rule-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.rule-check-item:last-child { border: none; }

.rule-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--txt-4);
  flex-shrink: 0;
}

.rule-dot.done { background: var(--green); }

.rule-check-text { font-size: 12px; color: var(--txt-2); }

/* ============================================================
   TWO COLUMN
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================================
   FINANCES MODULE
   ============================================================ */
.finance-mode-banner {
  background: var(--blue-dim);
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.expense-list { display: flex; flex-direction: column; gap: 8px; }

.expense-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.expense-row:last-child { border: none; }

.expense-name { font-size: 13px; color: var(--txt-2); }

.expense-amount {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--txt-1);
}

.expense-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--red-dim);
  color: var(--red);
  margin-left: 8px;
}

.expense-tag.ends { background: var(--orange-dim); color: var(--orange); }

/* ── Debt Cards ── */
.debt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.debt-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.debt-card-name { font-size: 11px; color: var(--txt-3); margin-bottom: 6px; }
.debt-card-amount { font-size: 14px; font-weight: 700; font-family: var(--font-mono); color: var(--txt-1); }
.debt-card-end { font-size: 10px; color: var(--orange); margin-top: 4px; }
.debt-card.liberated { border-color: var(--green-dim); }
.debt-card.liberated .debt-card-end { color: var(--green); }

/* ── Anti-impulse (Fund) ── */
.anti-impulse-card {
  text-align: center;
  position: relative;
  border-color: var(--border-hi);
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
}

.lock-icon { font-size: 28px; margin-bottom: 8px; }

.fund-display { margin: 16px 0 8px; }

.fund-amount {
  font-size: 40px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--green);
  letter-spacing: -0.02em;
}

.fund-meta { font-size: 12px; color: var(--txt-3); margin-top: 4px; }

.progress-bar-wrap {
  background: var(--bg-4);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green), #5dde9d);
  transition: width 0.6s ease;
}

.fund-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 12px 0;
}

.fund-input {
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--txt-1);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}

.fund-input:focus { border-color: var(--blue); }

.anti-impulse-rule {
  font-size: 11px;
  color: var(--orange);
  margin-top: 12px;
  padding: 8px;
  background: var(--orange-dim);
  border-radius: var(--radius-sm);
}

/* ── Projection Grid ── */
.projection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.proj-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.proj-month { font-size: 11px; color: var(--txt-3); margin-bottom: 5px; font-family: var(--font-mono); }
.proj-amount { font-size: 15px; font-weight: 700; font-family: var(--font-mono); color: var(--txt-1); }
.proj-detail { font-size: 10px; color: var(--txt-3); margin-top: 4px; }
.proj-card.milestone { border-color: var(--green-dim); }
.proj-card.milestone .proj-amount { color: var(--green); }

/* ============================================================
   PHYSICAL MODULE
   ============================================================ */
.physical-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-label { font-size: 11px; color: var(--txt-3); letter-spacing: 0.06em; }
.stat-val   { font-size: 13px; font-weight: 600; color: var(--txt-1); font-family: var(--font-mono); }

/* ── Protein tracker ── */
.protein-tracker {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
}

.protein-ring-wrap {
  position: relative;
  flex-shrink: 0;
}

.protein-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--green);
}

.protein-sources {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.protein-source-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.protein-source-name { color: var(--txt-2); }
.protein-source-g    { color: var(--green); font-family: var(--font-mono); font-weight: 600; }

.protein-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.custom-protein-wrap {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.hidden { display: none !important; }

/* ── Workout week ── */
.workout-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.workout-day {
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.workout-day.done {
  background: var(--green-dim);
  border-color: var(--green);
}

.workout-day.rest-day {
  border-style: dashed;
}

.wd-label {
  font-size: 9px;
  color: var(--txt-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wd-icon {
  font-size: 14px;
  margin: 4px 0;
  display: block;
}

.wd-type {
  font-size: 9px;
  color: var(--txt-3);
}

.workout-log-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── Heatmap ── */
.heatmap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}

.heat-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--bg-4);
  position: relative;
}

.heat-cell.level-1 { background: rgba(58,158,110,0.25); }
.heat-cell.level-2 { background: rgba(58,158,110,0.50); }
.heat-cell.level-3 { background: rgba(58,158,110,0.75); }
.heat-cell.level-4 { background: rgba(58,158,110,1.00); }

/* ============================================================
   SCHEDULE MODULE
   ============================================================ */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.week-label {
  font-size: 14px;
  color: var(--txt-2);
  font-family: var(--font-mono);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-col {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.day-col-header {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}

.day-col-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-3);
}

.day-col-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--txt-1);
  font-family: var(--font-mono);
}

.day-col.today .day-col-header { background: var(--blue-glow); border-bottom-color: var(--blue-dim); }
.day-col.today .day-col-date   { color: var(--blue); }

.day-blocks { padding: 8px 6px; display: flex; flex-direction: column; gap: 4px; }

.sched-block {
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.3;
  border-left: 2px solid transparent;
}

.sched-block .block-time { color: var(--txt-3); font-family: var(--font-mono); }
.sched-block .block-desc { color: var(--txt-2); margin-top: 1px; }

.sched-gym    { background: var(--green-dim);  border-color: var(--green); }
.sched-work   { background: var(--blue-dim);   border-color: var(--blue); }
.sched-spirit { background: var(--purple-dim); border-color: var(--purple); }
.sched-rel    { background: var(--orange-dim); border-color: var(--orange); }
.sched-pos    { background: rgba(200,168,50,0.1); border-color: var(--gold); }
.sched-sleep  { background: var(--bg-4); border-color: var(--txt-4); }
.sched-game   { background: var(--bg-4); border-color: var(--txt-4); }

/* ── Gym Split ── */
.gym-split {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.gym-day-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.gym-day-name { font-size: 10px; color: var(--txt-3); margin-bottom: 6px; letter-spacing: 0.06em; }
.gym-day-type { font-size: 12px; color: var(--txt-1); font-weight: 600; }
.gym-day-icon { font-size: 18px; margin-bottom: 4px; }

/* ── Schedule Rules ── */
.schedule-rules { display: flex; flex-direction: column; gap: 8px; }

.sched-rule-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
}

.sched-rule-marker {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

.sched-rule-text { font-size: 12px; color: var(--txt-2); }

/* ============================================================
   VISION MODULE
   ============================================================ */
.vision-header { }

.vision-identity {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.identity-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.identity-text {
  font-size: 15px;
  color: var(--txt-1);
  line-height: 1.8;
  padding: 12px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  min-height: 100px;
  outline: none;
  cursor: text;
}

.identity-text:focus { border-color: var(--blue); }

.save-btn {
  margin-top: 10px;
  float: right;
}

/* ── Priority List ── */
.priority-list { display: flex; flex-direction: column; gap: 8px; }

.priority-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.priority-rank {
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--txt-4);
  width: 28px;
}

.priority-icon { font-size: 18px; }

.priority-info .priority-name { font-size: 14px; font-weight: 600; color: var(--txt-1); }
.priority-info .priority-desc { font-size: 11px; color: var(--txt-3); margin-top: 2px; }

.priority-item.p1 { border-color: var(--orange-dim); }
.priority-item.p1 .priority-rank { color: var(--orange); }

/* ── Goals List ── */
.goals-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }

.goal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
}

.goal-check {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-hi);
  border-radius: 3px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--green);
  transition: all var(--transition);
}

.goal-check.checked { border-color: var(--green); background: var(--green-dim); }

.goal-text { font-size: 13px; color: var(--txt-2); flex: 1; }
.goal-text.done { text-decoration: line-through; color: var(--txt-3); }

.goal-delete {
  background: none;
  border: none;
  color: var(--txt-4);
  cursor: pointer;
  font-size: 14px;
  padding: 2px;
  transition: color var(--transition);
}
.goal-delete:hover { color: var(--red); }

.goal-add-row { display: flex; gap: 10px; }

/* ── Principles ── */
.principles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.principle-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.principle-num {
  font-size: 10px;
  color: var(--txt-4);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.principle-text { font-size: 13px; color: var(--txt-1); line-height: 1.5; }

/* ============================================================
   RULES MODULE
   ============================================================ */
.rules-header { padding: 8px 0 4px; }

.rules-title-big {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--txt-1);
}

.rules-subtitle {
  font-size: 12px;
  color: var(--txt-3);
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.rule-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  border-left: 3px solid var(--blue);
}

.rule-block.rule-finance { border-color: var(--green); }
.rule-block.rule-body    { border-color: var(--orange); }
.rule-block.rule-time    { border-color: var(--purple); }
.rule-block.rule-social  { border-color: var(--gold); }

.rule-block-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 10px;
}

.rule-item {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.rule-item:last-child { border: none; }

.rule-arrow { color: var(--blue); flex-shrink: 0; }
.rule-finance .rule-arrow { color: var(--green); }
.rule-body    .rule-arrow { color: var(--orange); }
.rule-time    .rule-arrow { color: var(--purple); }

.rule-text { font-size: 12px; color: var(--txt-2); }

/* ── Impulse tracker ── */
.impulse-tracker { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.impulse-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.impulse-name { flex: 1; font-size: 13px; color: var(--txt-2); }
.impulse-amount { font-size: 13px; font-weight: 600; color: var(--txt-1); font-family: var(--font-mono); }
.impulse-days { font-size: 11px; color: var(--orange); font-family: var(--font-mono); margin-left: 8px; }
.impulse-days.safe { color: var(--green); }

.impulse-add { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   TRACKING MODULE
   ============================================================ */
.tracking-nav { margin-bottom: 4px; }

.month-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.month-tab {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12px;
  color: var(--txt-2);
  cursor: pointer;
  transition: all var(--transition);
}

.month-tab:hover { border-color: var(--border-hi); color: var(--txt-1); }
.month-tab.active { background: var(--blue-glow); border-color: var(--blue); color: var(--blue); }
.month-tab.current { position: relative; }
.month-tab.current::after {
  content: '●';
  position: absolute;
  top: -3px; right: -3px;
  font-size: 6px;
  color: var(--green);
}

.tracking-month-panel { display: flex; flex-direction: column; gap: 14px; }

.tracking-section { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }

.tracking-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 12px;
}

.tracking-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.tracking-metric:last-child { border: none; }
.tracking-metric-label { color: var(--txt-2); }
.tracking-metric-value { color: var(--txt-1); font-family: var(--font-mono); font-weight: 600; }

.tracking-input {
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--txt-1);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  width: 100px;
  text-align: right;
}

/* ============================================================
   SUNDAY REVIEW
   ============================================================ */
.sunday-header {
  text-align: center;
  padding: 10px 0 20px;
}

.sunday-icon { font-size: 36px; margin-bottom: 8px; }
.sunday-title { font-size: 22px; font-weight: 700; letter-spacing: 0.06em; }
.sunday-sub { font-size: 12px; color: var(--txt-3); margin-top: 4px; }

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

.review-card { }

.review-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.review-item:last-child { border: none; }

.review-item label {
  display: block;
  font-size: 11px;
  color: var(--txt-3);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.radio-group { display: flex; gap: 6px; flex-wrap: wrap; }

.radio-btn {
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--txt-2);
  padding: 5px 12px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 11px;
  transition: all var(--transition);
}

.radio-btn:hover { border-color: var(--border-hi); color: var(--txt-1); }
.radio-btn.selected { background: var(--blue-glow); border-color: var(--blue); color: var(--blue); }

.counter-row { display: flex; align-items: center; gap: 12px; }

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

.counter-btn:hover { border-color: var(--border-hi); }

.counter-val {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--txt-1);
  min-width: 30px;
  text-align: center;
}

.discipline-meter { padding: 4px 0; }
.discipline-label { font-size: 11px; color: var(--txt-3); margin-bottom: 10px; }

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 4px;
  background: var(--bg-4);
  border-radius: 99px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  background: var(--blue);
  border-radius: 50%;
  cursor: pointer;
}

.discipline-display {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--blue);
  margin-top: 8px;
  text-align: center;
}

.review-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--txt-1);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}

.review-textarea:focus { border-color: var(--blue); }

.sunday-save-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary:hover { background: #4d8de0; transform: translateY(-1px); }

.btn-primary.btn-large { padding: 12px 32px; font-size: 14px; }

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  color: var(--txt-2);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-ghost:hover { border-color: var(--border-hi); color: var(--txt-1); }

/* ============================================================
   NOTIFICATIONS / TOASTS
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background: var(--bg-3);
  border: 1px solid var(--border-hi);
  color: var(--txt-1);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.2s ease;
}

.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .status-row { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-220px); width: 220px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .two-col { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
  .schedule-grid { grid-template-columns: repeat(4, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
