/* ================================================
   Vision 2026 — Premium Dark Arabic RTL Design
   ================================================ */

:root {
  --bg-primary:    #0a0e1a;
  --bg-secondary:  #0f1629;
  --bg-card:       #111827;
  --bg-card-hover: #162033;
  --border:        #1e2d45;
  --border-light:  #253652;

  --gold:    #f0a500;
  --gold-dim: #b87800;
  --blue:    #3b82f6;
  --green:   #10b981;
  --red:     #ef4444;
  --purple:  #8b5cf6;
  --pink:    #ec4899;
  --orange:  #f97316;
  --cyan:    #06b6d4;

  --text-primary:   #f8fafc;
  --text-secondary: #c1d0e0;
  --text-muted:     #7a90a8;

  --sidebar-width:  260px;
  --topbar-height:  64px;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow:         0 4px 24px rgba(0,0,0,0.4);
  --transition:     0.2s ease;
}

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

html { font-size: 15px; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */

.sidebar {
  position: fixed;
  top: 0; right: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition);
}

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

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--gold), #ff8c00);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: #000;
  flex-shrink: 0;
}

.logo-title { font-size: 1.15rem; font-weight: 900; color: var(--text-primary); line-height: 1.1; }
.logo-sub   { font-size: 0.75rem; color: var(--gold); font-weight: 700; }

.sidebar-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.nav-item.active {
  background: linear-gradient(135deg, rgba(240,165,0,0.15), rgba(240,165,0,0.05));
  color: var(--gold);
  border: 1px solid rgba(240,165,0,0.2);
}

.nav-item i { width: 20px; text-align: center; font-size: 0.95rem; }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), #ff8c00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #000;
  font-size: 1rem;
  flex-shrink: 0;
}

.user-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.user-details { flex: 1; overflow: hidden; }
.user-name { display: block; font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.7rem; color: var(--gold); }

.logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.logout-btn:hover { background: rgba(239,68,68,0.15); border-color: var(--red); color: var(--red); }

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 999;
}

/* Main wrapper */
.main-wrapper {
  margin-right: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 8px;
}

.topbar-center { flex: 1; }

.current-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.current-date i { color: var(--gold); }

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

.topbar-btn, .topbar-notif {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.9rem;
}

.topbar-btn:hover, .topbar-notif:hover { color: var(--gold); border-color: var(--gold); }

/* Page content */
.page-content {
  flex: 1;
  padding: 28px 28px 40px;
  max-width: 1400px;
  width: 100%;
}

/* ═══════════════════════════════════════════
   PAGE HEADERS
═══════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

.page-title i { color: var(--gold); margin-left: 10px; }

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════
   CARDS
═══════════════════════════════════════════ */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition);
}

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

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

.card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i { color: var(--gold); }

.card-link {
  font-size: 0.8rem;
  color: var(--gold);
  opacity: 0.8;
  transition: opacity var(--transition);
}

.card-link:hover { opacity: 1; }

/* ═══════════════════════════════════════════
   DASHBOARD LAYOUT
═══════════════════════════════════════════ */

/* Overall Score Ring */
.header-badge {
  flex-shrink: 0;
}

.overall-score {
  position: relative;
  width: 80px;
  height: 80px;
}

.score-ring { width: 80px; height: 80px; transform: rotate(-90deg); }

.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3.5;
}

.ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.8s ease;
}

.score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-num  { font-size: 1.1rem; font-weight: 900; color: var(--gold); line-height: 1; }
.score-label { font-size: 0.65rem; color: var(--text-muted); }

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all var(--transition);
  border-top: 3px solid var(--cat-color);
}

.cat-card:hover { background: var(--bg-card-hover); transform: translateY(-2px); }

.cat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cat-color) 15%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cat-color);
  font-size: 1rem;
  flex-shrink: 0;
}

.cat-info { flex: 1; min-width: 0; }

.cat-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}

.cat-progress-fill {
  height: 100%;
  background: var(--cat-color);
  border-radius: 2px;
  transition: width 0.8s ease;
}

.cat-pct { font-size: 0.75rem; font-weight: 700; color: var(--cat-color); }

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

/* Tasks in dashboard */
.task-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }

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

.task-item:hover { background: var(--bg-secondary); }

.task-item.completed .task-title { text-decoration: line-through; color: var(--text-muted); }

.task-check {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0;
  transition: color var(--transition);
}

.task-item.completed .task-check { color: var(--green); }

.task-text { flex: 1; min-width: 0; }
.task-title { font-size: 0.85rem; color: var(--text-primary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-tag { font-size: 0.7rem; font-weight: 600; }

.task-priority { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.priority-high   { background: var(--red); }
.priority-medium { background: var(--gold); }
.priority-low    { background: var(--text-muted); }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mini-progress { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin: 0 10px; }
.mini-progress-fill { height: 100%; background: var(--gold); border-radius: 2px; }

/* KPI rows in dashboard */
.kpi-list { display: flex; flex-direction: column; gap: 10px; }

.kpi-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.kpi-row-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.kpi-row-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.kpi-row-title { font-size: 0.82rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kpi-row-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.kpi-row-value { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.kpi-row-unit  { font-size: 0.7rem; color: var(--text-muted); }

.kpi-mini-bar { width: 60px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.kpi-mini-bar div { height: 100%; border-radius: 2px; }

.kpi-row-pct { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); min-width: 28px; text-align: left; }

/* Financial summary */
.financial-summary { padding: 4px 0; }

.fin-total { text-align: center; padding: 12px; margin-bottom: 12px; }
.fin-total-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.fin-total-value { display: block; font-size: 1.6rem; font-weight: 900; color: var(--gold); }
.fin-total-value small { font-size: 0.7rem; }
.fin-total-date { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.fin-breakdown { display: flex; flex-direction: column; gap: 8px; }

.fin-item { display: flex; align-items: center; gap: 8px; }
.fin-item-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fin-item-label { font-size: 0.8rem; color: var(--text-secondary); flex: 1; }
.fin-item-pct { font-size: 0.75rem; font-weight: 700; color: var(--text-primary); min-width: 35px; text-align: left; }
.fin-item-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.fin-item-bar div { height: 100%; border-radius: 2px; }

/* Reviews in dashboard */
.review-list { display: flex; flex-direction: column; gap: 8px; }

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

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

.review-type-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.review-daily    { background: rgba(6,182,212,0.15); color: var(--cyan); }
.review-weekly   { background: rgba(59,130,246,0.15); color: var(--blue); }
.review-monthly  { background: rgba(240,165,0,0.15); color: var(--gold); }
.review-quarterly{ background: rgba(139,92,246,0.15); color: var(--purple); }
.review-annual   { background: rgba(16,185,129,0.15); color: var(--green); }

.review-date { font-size: 0.78rem; color: var(--text-muted); flex: 1; }
.review-score { display: flex; align-items: center; gap: 3px; }
.score-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border); }
.score-dot.filled { background: var(--gold); }
.score-num-sm { font-size: 0.72rem; color: var(--text-muted); margin-right: 4px; }

/* Timeline */
.timeline-card { margin-top: 4px; }

.timeline-track {
  position: relative;
  display: flex;
  gap: 0;
  margin-top: 8px;
}

.timeline-step {
  flex: 1;
  padding: 0 8px 24px;
  position: relative;
}

.step-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: all var(--transition);
}

.timeline-step.done .step-marker { background: var(--green); border-color: var(--green); color: #fff; }
.timeline-step.current .step-marker { background: var(--gold); border-color: var(--gold); color: #000; box-shadow: 0 0 10px var(--gold); }

.step-info { display: flex; flex-direction: column; gap: 2px; }
.step-range { font-size: 0.7rem; color: var(--gold); font-weight: 700; }
.step-label { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); }
.step-desc  { font-size: 0.7rem; color: var(--text-muted); }

.timeline-bar {
  position: absolute;
  bottom: 0;
  right: 14px;
  left: 14px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.timeline-fill {
  height: 100%;
  background: linear-gradient(to left, var(--gold), var(--green));
  border-radius: 2px;
  transition: width 0.8s ease;
}

/* Empty state */
.empty-state-small {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.9rem; margin-bottom: 16px; }

/* ═══════════════════════════════════════════
   PLAN VIEW
═══════════════════════════════════════════ */

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

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border-right: 3px solid var(--section-color);
}

.plan-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--section-color) 5%, transparent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.plan-card:hover { transform: translateY(-4px); border-color: var(--section-color); }
.plan-card:hover::before { opacity: 1; }

.plan-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--section-color) 15%, transparent);
  color: var(--section-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.plan-card-num {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--section-color);
  opacity: 0.7;
}

.plan-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.plan-card-warning {
  font-size: 0.72rem;
  color: var(--orange);
}

.plan-card-arrow {
  position: absolute;
  bottom: 16px;
  left: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform var(--transition);
}

.plan-card:hover .plan-card-arrow { transform: translateX(-4px); }

/* Section layout */
.section-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

.section-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
  max-height: calc(100vh - var(--topbar-height) - 40px);
  overflow-y: auto;
}

.section-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 6px 8px 10px;
}

.section-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  margin-bottom: 2px;
}

.section-nav-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.section-nav-item.active { background: rgba(240,165,0,0.12); color: var(--gold); }
.section-nav-item i { width: 16px; text-align: center; font-size: 0.8rem; flex-shrink: 0; }

.section-main { min-width: 0; }

.section-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-right: 4px solid var(--section-color);
}

.section-icon-lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--section-color) 15%, transparent);
  color: var(--section-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.section-title { font-size: 1.3rem; font-weight: 900; }
.section-file  { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.section-actions { margin-right: auto; }

/* Markdown Content */
.markdown-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  line-height: 1.8;
  font-size: 0.9rem;
  color: #d4e0ed;
}

.markdown-content h1 { font-size: 1.5rem; font-weight: 900; color: var(--gold); margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.markdown-content h2 { font-size: 1.15rem; font-weight: 700; color: #f0f6ff; margin: 20px 0 10px; }
.markdown-content h3 { font-size: 1rem; font-weight: 700; color: #7dd3fc; margin: 16px 0 8px; }
.markdown-content p  { margin-bottom: 12px; }
.markdown-content strong { color: #f8fafc; font-weight: 700; }
.markdown-content em { color: var(--gold); }
.markdown-content hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.markdown-content ul { margin: 8px 0 12px 20px; }
.markdown-content li { margin-bottom: 6px; color: #d4e0ed; }
.markdown-content li::marker { color: var(--gold); }

.markdown-content code {
  background: var(--bg-secondary);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--cyan);
  font-family: 'Courier New', monospace;
}

.markdown-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
}

.markdown-content pre code { background: none; padding: 0; }

.md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.85rem;
}

.md-table th, .md-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  text-align: right;
  color: #d4e0ed;
}

.md-table th {
  background: var(--bg-secondary);
  color: var(--gold);
  font-weight: 700;
}

.md-table tr:hover td { background: var(--bg-secondary); color: #f0f6ff; }

/* Notes panel */
.notes-panel {
  position: fixed;
  left: 0;
  top: var(--topbar-height);
  width: 320px;
  height: calc(100vh - var(--topbar-height));
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  box-shadow: var(--shadow);
}

.notes-panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notes-panel-header h3 { font-size: 0.9rem; font-weight: 700; }
.close-btn { background: none; border: none; color: var(--text-muted); font-size: 1rem; }
.close-btn:hover { color: var(--text-primary); }

.add-note-form {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-note-form textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  resize: none;
  font-size: 0.85rem;
}

.notes-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.note-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.note-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; }

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-date { font-size: 0.72rem; color: var(--text-muted); }
.note-delete { background: none; border: none; color: var(--text-muted); font-size: 0.8rem; }
.note-delete:hover { color: var(--red); }

/* ═══════════════════════════════════════════
   KPI CARDS
═══════════════════════════════════════════ */

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all var(--transition);
  border-top: 3px solid var(--kpi-color);
  position: relative;
}

.kpi-card:hover { transform: translateY(-4px); border-color: var(--kpi-color); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

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

.kpi-cat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--kpi-color) 15%, transparent);
  padding: 2px 8px;
  border-radius: 20px;
}

.kpi-update-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0;
  transition: all var(--transition);
}

.kpi-card:hover .kpi-update-btn { opacity: 1; color: var(--kpi-color); }

.kpi-card-title { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }

.kpi-card-value { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.kpi-current { font-size: 1.5rem; font-weight: 900; color: var(--text-primary); }
.kpi-unit { font-size: 0.75rem; color: var(--text-muted); }

.kpi-target-line { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 10px; }

.kpi-card-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.kpi-bar-fill { height: 100%; background: var(--kpi-color); border-radius: 3px; transition: width 0.8s ease; }

.kpi-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
}

.kpi-pct-text { color: var(--kpi-color); font-weight: 700; }
.kpi-last-update { color: var(--text-muted); }

.kpi-sparkline { margin-top: 8px; width: 100%; }

/* ═══════════════════════════════════════════
   TASKS
═══════════════════════════════════════════ */

.tasks-progress-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.progress-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill  { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.6s ease; }

.task-group { margin-bottom: 16px; }

.task-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  margin-bottom: 4px;
}

.task-row:hover { background: var(--bg-secondary); }
.task-row.done .task-row-title { text-decoration: line-through; color: var(--text-muted); }

.task-checkbox {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  padding: 0;
  transition: color var(--transition);
  flex-shrink: 0;
}

.task-row.done .task-checkbox { color: var(--green); }

.task-row-content { flex: 1; min-width: 0; }
.task-row-title { font-size: 0.87rem; color: var(--text-primary); }
.task-row-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.task-tag { font-size: 0.72rem; font-weight: 600; }
.task-due { font-size: 0.72rem; color: var(--text-muted); }
.task-due.overdue { color: var(--red); }
.task-due i { margin-left: 3px; }

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

.priority-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.priority-high   .priority-badge, .priority-badge.priority-high   { background: rgba(239,68,68,0.15); color: var(--red); }
.priority-medium .priority-badge, .priority-badge.priority-medium { background: rgba(240,165,0,0.15); color: var(--gold); }
.priority-low    .priority-badge, .priority-badge.priority-low    { background: rgba(100,116,139,0.15); color: var(--text-muted); }

.task-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0;
  transition: all var(--transition);
}

.task-row:hover .task-delete { opacity: 1; }
.task-delete:hover { color: var(--red); }

/* ═══════════════════════════════════════════
   REVIEWS
═══════════════════════════════════════════ */

.reviews-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.review-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.review-form-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-duration {
  font-size: 0.72rem;
  background: rgba(240,165,0,0.15);
  color: var(--gold);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.review-form { display: flex; flex-direction: column; gap: 16px; }

.score-selector { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.score-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  transition: all var(--transition);
}

.score-btn:hover, .score-btn.selected {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
}

/* Review History */
.review-history {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.review-history h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; }

.avg-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

.avg-score-val { font-size: 1.2rem; font-weight: 900; color: var(--gold); }

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

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

.history-date { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }

.history-score { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.score-bar { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.score-bar div { height: 100%; border-radius: 3px; }
.history-score span { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

.history-wins { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.history-wins i { color: var(--green); margin-left: 4px; }

.review-questions { display: flex; flex-direction: column; gap: 12px; }

/* ═══════════════════════════════════════════
   FINANCIAL
═══════════════════════════════════════════ */

.fin-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.fin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.fin-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fin-stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 2px; }
.fin-stat-val   { display: block; font-size: 1.15rem; font-weight: 900; color: var(--text-primary); }

.fire-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  border-right: 3px solid var(--orange);
}

.fire-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.fire-header i { margin-left: 6px; }

.fire-bar-track {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  margin-bottom: 6px;
}

.fire-bar-fill {
  height: 100%;
  background: linear-gradient(to left, var(--orange), var(--gold));
  border-radius: 5px;
  transition: width 0.8s ease;
}

.fire-bar-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

.fire-note { font-size: 0.75rem; color: var(--text-muted); }

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

.fin-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.fin-chart-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

/* Table */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.table-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.data-table th {
  text-align: right;
  padding: 8px 12px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.data-table tr:hover td { background: var(--bg-secondary); }
.data-table .num { text-align: left; font-weight: 600; font-variant-numeric: tabular-nums; }

.text-green { color: var(--green) !important; }
.text-red   { color: var(--red) !important; }

.total-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(240,165,0,0.06);
  border: 1px solid rgba(240,165,0,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.9rem;
  margin: 4px 0;
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ═══════════════════════════════════════════
   FORMS & MODALS
═══════════════════════════════════════════ */

.form-group { margin-bottom: 0; }

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

.form-label i { margin-left: 5px; }

.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-input:focus { border-color: var(--gold); }

.form-input::placeholder { color: var(--text-muted); }

textarea.form-input { resize: vertical; min-height: 80px; }

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

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open { display: flex; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-lg { max-width: 680px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 1rem; font-weight: 700; }

.modal-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
}

.modal-header button:hover { color: var(--text-primary); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Buttons */
.btn-primary {
  background: var(--gold);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: opacity var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover { opacity: 0.9; }
.btn-full { width: 100%; justify-content: center; }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-secondary:hover { border-color: var(--text-muted); color: var(--text-primary); }

.badge {
  background: var(--gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Tabs */
.tab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-badge {
  background: var(--border);
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 10px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }

/* Chart container */
.chart-container { padding: 4px 0; }

/* ═══════════════════════════════════════════
   AUTH PAGE
═══════════════════════════════════════════ */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 70% 30%, #0f1f3d 0%, #0a0e1a 60%);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: rgba(17,24,39,0.9);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 36px;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}

.auth-logo { text-align: center; margin-bottom: 28px; }

.auth-logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--gold), #ff8c00);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: #000;
  margin: 0 auto 14px;
}

.auth-title { font-size: 1.8rem; font-weight: 900; color: var(--text-primary); }
.auth-title span { color: var(--gold); }
.auth-subtitle { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.input-with-toggle { position: relative; }
.input-with-toggle .form-input { padding-left: 42px; }

.input-toggle-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-footer { text-align: center; margin-top: 20px; font-size: 0.75rem; color: var(--text-muted); }

/* Background decorations */
.auth-bg-decor { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.decor-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.c1 { width: 400px; height: 400px; background: rgba(240,165,0,0.06); top: -100px; right: -100px; }
.c2 { width: 300px; height: 300px; background: rgba(59,130,246,0.05); bottom: 0; left: -100px; }
.c3 { width: 200px; height: 200px; background: rgba(16,185,129,0.04); bottom: 200px; right: 30%; }

/* Empty section */
.empty-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 64px;
  text-align: center;
  color: var(--text-muted);
}

.empty-section i { font-size: 3rem; margin-bottom: 14px; display: block; color: var(--border-light); }

/* ═══════════════════════════════════════════
   ANALYTICS
═══════════════════════════════════════════ */

.analytics-stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.astat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color var(--transition);
}

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

.astat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.astat-body { flex: 1; }

.astat-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
}

.astat-label {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.astat-trend { font-size: .85rem; }

.analytics-main-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.analytics-chart-card { min-width: 0; }

.analytics-three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Heatmap */
.heatmap-scroll { overflow-x: auto; padding-bottom: 6px; }

.heatmap-labels-row { display: flex; gap: 4px; }

.heatmap-day-labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 2px;
}

.heatmap-day-labels span {
  font-size: .62rem;
  color: var(--text-muted);
  height: 13px;
  line-height: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.heatmap-grid { display: flex; gap: 2px; }

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

.heatmap-cell {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  cursor: default;
  transition: transform .15s;
}

.heatmap-cell:hover { transform: scale(1.3); }

.heatmap-cell.level-0 { background: var(--bg-secondary); border: 1px solid var(--border); }
.heatmap-cell.level-1 { background: #1a4731; }
.heatmap-cell.level-2 { background: #166534; }
.heatmap-cell.level-3 { background: #15803d; }
.heatmap-cell.level-4 { background: #10b981; }
.heatmap-cell.level-f { background: transparent; border: 1px solid var(--border); opacity: .3; }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

/* Monthly bars */
.monthly-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 180px;
  gap: 6px;
  margin-top: 12px;
  padding-bottom: 24px;
  position: relative;
}

.monthly-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  height: 100%;
}

.monthly-bar-track {
  flex: 1;
  width: 100%;
  background: var(--bg-secondary);
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.monthly-bar-fill {
  width: 100%;
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: height .6s ease;
  position: relative;
  min-height: 4px;
}

.monthly-bar-val {
  font-size: .65rem;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  margin-top: 3px;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.monthly-bar-label {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* Habits performance list (analytics) */
.habits-perf-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }

.habit-perf-row { display: flex; gap: 10px; align-items: flex-start; }

.habit-perf-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.habit-perf-info { flex: 1; min-width: 0; }

.habit-perf-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.habit-perf-meta {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* Suggestions bar */
.suggestions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.suggestion-info,
.suggestion-blue    { background: rgba(59,130,246,0.12); color: #93c5fd; border-color: rgba(59,130,246,0.2); }
.suggestion-warning,
.suggestion-orange  { background: rgba(249,115,22,0.12); color: #fdba74; border-color: rgba(249,115,22,0.2); }
.suggestion-success,
.suggestion-green   { background: rgba(16,185,129,0.12); color: #6ee7b7; border-color: rgba(16,185,129,0.2); }
.suggestion-tip,
.suggestion-gold    { background: rgba(240,165,0,0.12);  color: #fcd34d; border-color: rgba(240,165,0,0.2); }
.suggestion-red     { background: rgba(239,68,68,0.12);  color: #fca5a5; border-color: rgba(239,68,68,0.2); }
.suggestion-purple  { background: rgba(139,92,246,0.12); color: #c4b5fd; border-color: rgba(139,92,246,0.2); }

/* ═══════════════════════════════════════════
   HABIT CARDS (habits/index.php)
═══════════════════════════════════════════ */

.habit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.habit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  transition: border-color var(--transition), transform var(--transition);
  border-top: 3px solid var(--hc, var(--gold));
}

.habit-card:hover { border-color: var(--border-light); transform: translateY(-1px); }
.habit-card.done  { background: color-mix(in srgb, var(--hc, var(--gold)) 8%, var(--bg-card)); }

.habit-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.habit-icon-wrap {
  width: 44px;
  height: 44px;
  background: color-mix(in srgb, var(--hc, var(--gold)) 15%, transparent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.habit-icon { font-size: 1.4rem; }

.habit-meta { flex: 1; min-width: 0; }

.habit-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.habit-streak {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.habit-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all var(--transition);
}

.habit-toggle-btn:hover { border-color: var(--hc, var(--gold)); color: var(--hc, var(--gold)); }

.habit-toggle-btn.done {
  background: color-mix(in srgb, var(--hc, var(--gold)) 20%, transparent);
  border-color: var(--hc, var(--gold));
  color: var(--hc, var(--gold));
}

.habit-month-label {
  font-size: .72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.habit-month-map {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 10px;
}

.month-cell {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: background var(--transition);
}

.month-cell.done {
  background: color-mix(in srgb, var(--hc, var(--gold)) 80%, transparent);
  border-color: transparent;
}

.month-cell.today {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--text-primary);
}

.habit-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.habit-progress-track {
  flex: 1;
  height: 5px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.habit-progress-fill {
  height: 100%;
  background: var(--hc, var(--gold));
  border-radius: 3px;
  transition: width .5s ease;
}

.habit-pct-label { font-size: .72rem; color: var(--text-muted); min-width: 30px; text-align: left; }

.habit-delete-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  opacity: 0;
  transition: all var(--transition);
}

.habit-card:hover .habit-delete-btn { opacity: 1; }
.habit-delete-btn:hover { background: rgba(239,68,68,0.15); border-color: var(--red); color: var(--red); }

/* ═══════════════════════════════════════════
   PLANNER
═══════════════════════════════════════════ */

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

.planner-greeting {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--text-primary);
}

.planner-date {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Life Score Ring */
.life-score-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 20px;
}

.ls-ring-wrap { position: relative; width: 72px; height: 72px; flex-shrink: 0; }

.ls-ring-wrap svg { transform: rotate(-90deg); }

.ls-ring-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-primary);
}

.ls-info-label {
  font-size: .72rem;
  color: var(--text-muted);
}

.ls-info-title {
  font-size: .92rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Planner ring (SVG inline) */
.life-score-svg { display: block; overflow: visible; }

.life-score-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ls-num {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.ls-lbl {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Planner stats row */
.planner-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

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

.pstat-val {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text-primary);
}

.pstat-lbl {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Planner grid */
.planner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.planner-col { display: flex; flex-direction: column; gap: 16px; }

.planner-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.planner-section-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Energy buttons */
.energy-row { display: flex; gap: 8px; margin-bottom: 14px; }

.energy-btn {
  flex: 1;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.energy-btn:hover { border-color: var(--gold); }

.energy-btn.active {
  background: rgba(240,165,0,0.15);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(240,165,0,0.2);
}

/* Evening score buttons */
.evening-score-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }

.escore-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 700;
  transition: all var(--transition);
}

.escore-btn:hover { border-color: var(--blue); color: var(--blue); }

.escore-btn.active {
  background: rgba(59,130,246,0.15);
  border-color: var(--blue);
  color: var(--blue);
}

/* Planner habits & tasks checklists */
.planner-habits-list,
.planner-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.planner-habit-row,
.planner-task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-size: .85rem;
  color: var(--text-secondary);
}

.planner-habit-row:hover,
.planner-task-row:hover { border-color: var(--border-light); }

.planner-habit-row.done,
.planner-task-row.done {
  opacity: .6;
  text-decoration: line-through;
  background: var(--bg-card);
}

.planner-habit-icon { font-size: 1rem; flex-shrink: 0; }

.planner-task-priority {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.priority-high   { background: var(--red); }
.priority-medium { background: var(--gold); }
.priority-low    { background: var(--green); }

/* ═══════════════════════════════════════════
   TASKS — REDESIGNED UX
═══════════════════════════════════════════ */

/* Top bar */
.tasks-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tasks-progress-wrap { flex: 1; min-width: 200px; }

.tasks-date-badge {
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
}

.tasks-main-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.tasks-main-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #34d399);
  border-radius: 4px;
  transition: width .5s ease;
}

.tasks-pct {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 40px;
}

.tasks-quick-add { flex-shrink: 0; min-width: 300px; }

.tasks-quick-input {
  flex: 1;
  min-width: 180px;
}

/* Overdue bar */
.tasks-overdue-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: .82rem;
  margin-bottom: 14px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--blue);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* Layout */
.tasks-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: start;
}

.tasks-main-col { display: flex; flex-direction: column; gap: 12px; }
.tasks-sidebar-col { display: flex; flex-direction: column; gap: 12px; }

/* Section containers */
.tasks-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tasks-section-done { opacity: .85; }

.tasks-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.tasks-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--bg-secondary);
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tasks-section-count.done { background: rgba(16,185,129,0.12); color: var(--green); }

.tasks-collapse-icon {
  margin-right: auto;
  font-size: .75rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.tasks-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px;
  color: var(--text-muted);
  font-size: .9rem;
}

/* Task rows — the magic */
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), opacity var(--transition), transform 0.35s ease;
  position: relative;
  cursor: default;
}

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

.task-row:hover { background: var(--bg-card-hover); }

/* Completing animation */
.task-row.completing {
  opacity: .4;
  transform: translateX(-8px);
}

/* Done state */
.task-row.done {
  opacity: .55;
}

.task-row.done .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Skipped state */
.task-row.skipped { opacity: .45; }
.task-row.skipped .task-title { color: var(--text-muted); font-style: italic; }

/* Checkbox button */
.task-check-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--border-light);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color var(--transition), transform var(--transition);
  cursor: pointer;
}

.task-check-btn:hover { color: var(--green); transform: scale(1.15); }
.task-check-btn.done  { color: var(--green); }

/* Body */
.task-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.task-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition), text-decoration var(--transition);
}

.task-section-tag {
  font-size: .68rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 7px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.task-due {
  font-size: .72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.task-due.overdue { color: var(--red); }

/* Priority dot */
.task-priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.task-priority-dot.priority-high   { background: var(--red); }
.task-priority-dot.priority-medium { background: var(--gold); }
.task-priority-dot.priority-low    { background: var(--green); }

/* Hover action buttons */
.task-hover-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.task-row:hover .task-hover-actions { opacity: 1; }

.task-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  cursor: pointer;
  transition: all var(--transition);
}

.task-action-btn:hover         { border-color: var(--green); color: var(--green); }
.task-action-btn.skip:hover    { border-color: var(--gold); color: var(--gold); }
.task-action-btn.delete:hover  { border-color: var(--red); color: var(--red); }

/* Weekly / one-time rows */
.task-row.task-weekly { cursor: pointer; padding: 8px 12px; }
.task-row.task-onetime { padding: 8px 12px; }

/* ═══════════════════════════════════════════
   PEOPLE / RELATIONSHIP LAYER
═══════════════════════════════════════════ */

.people-alert-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(240,165,0,0.08);
  border: 1px solid rgba(240,165,0,0.2);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: .82rem;
  margin-bottom: 10px;
}

.people-alert-tag {
  background: rgba(240,165,0,0.12);
  border: 1px solid rgba(240,165,0,0.25);
  color: #fcd34d;
  border-radius: 20px;
  padding: 3px 10px;
  cursor: pointer;
  transition: background var(--transition);
}

.people-alert-tag:hover { background: rgba(240,165,0,0.2); }
.people-alert-tag em { color: var(--text-muted); font-style: normal; font-size: .75rem; }

.people-silent-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 14px;
}

.people-silent-tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .78rem;
  color: var(--text-muted);
}

.people-silent-tag small { font-size: .68rem; color: var(--border-light); }

/* Tabs */
.people-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.people-tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.people-tab:hover { border-color: var(--border-light); color: var(--text-secondary); }
.people-tab.active { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.3); color: #93c5fd; }

/* People grid */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.person-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color var(--transition), transform var(--transition);
}

.person-card:hover { border-color: var(--border-light); transform: translateY(-1px); }
.person-card.overdue { border-color: rgba(240,165,0,0.3); }
.person-card.silent-warn { border-color: rgba(249,115,22,0.2); }

.person-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.person-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.person-info { flex: 1; min-width: 0; }

.person-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-sub {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-tags { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }

.person-badge {
  font-size: .68rem;
  font-weight: 700;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  color: var(--text-muted);
}

.person-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }

.person-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: all var(--transition);
}

.person-btn:hover { border-color: var(--blue); color: var(--blue); }

.person-last-contact {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  margin-bottom: 6px;
}

.person-followup {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-secondary);
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  margin-bottom: 6px;
}

.person-followup.overdue {
  background: rgba(240,165,0,0.08);
  border-color: rgba(240,165,0,0.2);
  color: #fcd34d;
}

.person-followup i { color: var(--green); }
.person-followup.overdue i { color: var(--gold); }
.person-followup span { flex: 1; }

.followup-done-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  flex-shrink: 0;
  transition: all var(--transition);
}

.followup-done-btn:hover { background: var(--green); color: #000; }

.person-notes {
  font-size: .75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
  line-height: 1.4;
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

/* Channel buttons */
.channel-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.channel-btn:hover { border-color: var(--blue); color: var(--blue); }
.channel-btn.active { background: rgba(59,130,246,0.15); border-color: var(--blue); color: #93c5fd; }

/* Importance stars */
.importance-row { display: flex; gap: 6px; }
.importance-star { font-size: 1.4rem; color: var(--border-light); cursor: pointer; transition: color var(--transition); }
.importance-star:hover, .importance-star.active { color: var(--gold); }

/* ═══════════════════════════════════════════
   DASHBOARD LIFE OS STRIP
═══════════════════════════════════════════ */

.lifeos-strip {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: stretch;
}

.lifeos-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), background var(--transition);
  min-width: 0;
}

.lifeos-tile:hover { border-color: var(--border-light); background: var(--bg-card-hover); }

.lifeos-score { flex-shrink: 0; }

.lifeos-ring-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.lifeos-ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
}

.lifeos-tile-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.lifeos-tile-val {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
}

.lifeos-tile-lbl {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.lifeos-mini-bar {
  width: 6px;
  height: 44px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
}

.lifeos-mini-bar div {
  width: 100%;
  border-radius: 3px;
  transition: height .5s ease;
  min-height: 3px;
}

.lifeos-suggestion {
  flex: 1;
  min-width: 200px;
  max-width: 340px;
}

.lifeos-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.lifeos-shortcut {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.lifeos-shortcut:hover { border-color: var(--gold); color: var(--gold); }

.lifeos-shortcut i { width: 14px; text-align: center; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */

@media (max-width: 1200px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .kpi-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .fin-summary-row { grid-template-columns: repeat(2, 1fr); }
  .fin-charts-row  { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-stats-row { grid-template-columns: repeat(3, 1fr); }
  .analytics-three-col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 0px; }

  .sidebar {
    transform: translateX(100%);
    width: 260px;
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }

  .main-wrapper { margin-right: 0; }
  .topbar-toggle { display: flex; }

  .section-layout { grid-template-columns: 1fr; }
  .section-sidebar { display: none; }

  .reviews-layout { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .analytics-main-row { grid-template-columns: 1fr; }
  .analytics-three-col { grid-template-columns: 1fr; }
  .planner-grid { grid-template-columns: 1fr; }
  .planner-stats-row { grid-template-columns: repeat(2, 1fr); }
  .tasks-layout { grid-template-columns: 1fr; }
  .tasks-quick-add { min-width: 100%; }
  .people-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page-content { padding: 16px 16px 32px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .kpi-cards-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .fin-summary-row { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .header-badge { align-self: flex-start; }
  .auth-card { padding: 24px; }
  .timeline-track { flex-direction: column; gap: 8px; }
  .step-info { flex-direction: row; gap: 10px; align-items: center; }
  .timeline-bar { display: none; }
  .tab-btn { padding: 8px 10px; font-size: 0.8rem; }
  .analytics-stats-row { grid-template-columns: 1fr 1fr; }
  .habit-grid { grid-template-columns: 1fr; }
  .planner-stats-row { grid-template-columns: 1fr 1fr; }
  .energy-row { flex-wrap: wrap; }
}

/* Utilities */
.table-responsive { overflow-x: auto; }
