/* ============================================================
   FinanceFlow - Main CSS
   Design: Modern SaaS Dark/Light Theme
   Font: Plus Jakarta Sans
   ============================================================ */

:root {
  --bg-base:      #0d0f14;
  --bg-surface:   #161922;
  --bg-elevated:  #1e2230;
  --bg-hover:     #252a3a;
  --border:       rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.12);

  --text-primary:   #f0f2f8;
  --text-secondary: #8b93a8;
  --text-muted:     #555d72;

  --accent:        #6c63ff;
  --accent-light:  rgba(108,99,255,0.15);
  --accent-hover:  #7b73ff;

  --green:         #22d3a5;
  --green-light:   rgba(34,211,165,0.12);
  --red:           #ff5c7c;
  --red-light:     rgba(255,92,124,0.12);
  --yellow:        #fbbf24;
  --yellow-light:  rgba(251,191,36,0.12);
  --blue:          #38bdf8;
  --blue-light:    rgba(56,189,248,0.12);

  --sidebar-w:     240px;
  --topbar-h:      64px;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;
  --shadow:        0 4px 24px rgba(0,0,0,0.35);
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.2);

  --font:     'Plus Jakarta Sans', sans-serif;
  --font-mono:'JetBrains Mono', monospace;

  --transition: 0.18s ease;
}

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

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

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

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

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

.app-layout {
  display: flex;
  min-height: 100vh;
}

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

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

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

.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #fff; font-weight: 700;
}

.logo-text {
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.logo-text strong { color: var(--accent); }

.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
  display: flex; align-items: center;
  transition: color var(--transition);
}
.sidebar-toggle:hover { color: var(--text-primary); }

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }

.nav-section { padding: 8px 0; }

.nav-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  position: relative;
  cursor: pointer;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  color: var(--accent);
  background: var(--accent-light);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-logout { color: var(--red) !important; }
.nav-logout:hover { background: var(--red-light) !important; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; color: var(--text-muted); }

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

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

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

.mobile-menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); padding: 6px;
}

.breadcrumb {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.topbar-date {
  font-size: 13px;
  color: var(--text-muted);
}

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

/* ── Page Content ─────────────────────────────────────────── */
.page-content {
  padding: 28px;
  flex: 1;
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  margin: 16px 28px 0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.flash svg { width: 18px; height: 18px; flex-shrink: 0; }
.flash-success { background: var(--green-light); color: var(--green); border: 1px solid rgba(34,211,165,0.2); }
.flash-error   { background: var(--red-light);   color: var(--red);   border: 1px solid rgba(255,92,124,0.2); }
.flash-close   { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; font-size: 18px; line-height: 1; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   STAT CARDS (Dashboard KPIs)
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); }

.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }

.stat-icon.green  { background: var(--green-light);  color: var(--green); }
.stat-icon.red    { background: var(--red-light);    color: var(--red); }
.stat-icon.accent { background: var(--accent-light); color: var(--accent); }
.stat-icon.yellow { background: var(--yellow-light); color: var(--yellow); }
.stat-icon.blue   { background: var(--blue-light);   color: var(--blue); }

.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value.income { color: var(--green); }
.stat-value.expense { color: var(--red); }
.stat-change { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-60-40 { display: grid; grid-template-columns: 60fr 40fr; gap: 16px; }
.grid-40-60 { display: grid; grid-template-columns: 40fr 60fr; gap: 16px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }

.btn-success {
  background: var(--green);
  color: #0d0f14;
  border-color: var(--green);
}
.btn-success:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border-color: rgba(255,92,124,0.3);
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-full { width: 100%; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 16px; }

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
select option { background: var(--bg-elevated); }
textarea { resize: vertical; min-height: 80px; }

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

/* Radio type tabs */
.type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.type-tab {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}
.type-tab.income.active { background: var(--green-light); color: var(--green); border-color: rgba(34,211,165,0.3); }
.type-tab.expense.active { background: var(--red-light); color: var(--red); border-color: rgba(255,92,124,0.3); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child { border-bottom: none; }

tbody td {
  padding: 13px 14px;
  font-size: 13.5px;
  color: var(--text-secondary);
  vertical-align: middle;
}

.td-desc { color: var(--text-primary); font-weight: 500; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-income  { background: var(--green-light);  color: var(--green); }
.badge-expense { background: var(--red-light);    color: var(--red); }
.badge-active  { background: var(--green-light);  color: var(--green); }
.badge-completed { background: var(--accent-light); color: var(--accent); }
.badge-cancelled { background: var(--bg-hover); color: var(--text-muted); }

.amount-positive { font-family: var(--font-mono); font-weight: 700; color: var(--green); }
.amount-negative { font-family: var(--font-mono); font-weight: 700; color: var(--red); }

/* Category badge with dot */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}
.cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress-bar {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* ============================================================
   HEALTH SCORE WIDGET
   ============================================================ */
.health-score-widget {
  display: flex;
  align-items: center;
  gap: 20px;
}

.health-ring {
  position: relative;
  width: 90px; height: 90px;
  flex-shrink: 0;
}
.health-ring svg { transform: rotate(-90deg); }
.health-ring-bg { fill: none; stroke: var(--bg-elevated); stroke-width: 8; }
.health-ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.health-score-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}
.health-score-num small { font-size: 9px; font-weight: 500; color: var(--text-muted); font-family: var(--font); margin-top: 2px; }

.health-info { flex: 1; }
.health-label { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.health-tip { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease;
}
.modal-overlay.open { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
  box-shadow: var(--shadow);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-size: 17px; font-weight: 700; }
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 22px; line-height: 1;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

/* ============================================================
   GOAL CARDS
   ============================================================ */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.goal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition), transform var(--transition);
}
.goal-card:hover { border-color: var(--border-light); transform: translateY(-2px); }

.goal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

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

.goal-name { font-weight: 600; font-size: 14px; }
.goal-deadline { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.goal-amounts {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.goal-current { font-family: var(--font-mono); font-size: 18px; font-weight: 700; }
.goal-target  { font-family: var(--font-mono); font-size: 12px; }

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

.alert-warning { background: var(--yellow-light); border: 1px solid rgba(251,191,36,0.2); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--yellow); margin-top: 8px; }
.alert-danger   { background: var(--red-light);    border: 1px solid rgba(255,92,124,0.2); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--red); margin-top: 8px; }
.alert-success  { background: var(--green-light);  border: 1px solid rgba(34,211,165,0.2); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; color: var(--green); margin-top: 8px; }

/* ============================================================
   AI ASSISTANT
   ============================================================ */
.ai-widget {
  background: linear-gradient(135deg, rgba(108,99,255,0.1), rgba(168,85,247,0.1));
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--radius);
  padding: 20px;
}
.ai-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ai-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent-light); color: var(--accent);
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.ai-content { font-size: 13.5px; line-height: 1.7; color: var(--text-secondary); }
.ai-loading { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.ai-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite; }
.ai-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0%,100%{opacity:0.3;transform:scale(0.8)} 50%{opacity:1;transform:scale(1)} }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-bar select,
.filter-bar input[type="text"],
.filter-bar input[type="search"] {
  width: auto;
  padding: 7px 12px;
  font-size: 13px;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h1 { font-size: 22px; font-weight: 800; }
.page-header p  { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at 20% 50%, rgba(108,99,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(168,85,247,0.06) 0%, transparent 50%),
              var(--bg-base);
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}

.auth-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-sub   { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }
.auth-link  { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-link a { color: var(--accent); font-weight: 600; }

.input-group { position: relative; }
.input-group input { padding-left: 40px; }
.input-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px; height: 16px;
}

/* ============================================================
   PLANNING COMPARISON TABLE
   ============================================================ */
.comparison-table td { padding: 11px 14px; }
.positive { color: var(--green) !important; font-weight: 600; }
.negative { color: var(--red)   !important; font-weight: 600; }

/* ============================================================
   CHART CONTAINER
   ============================================================ */
.chart-container {
  position: relative;
  height: 220px;
}
.chart-container-sm {
  position: relative;
  height: 170px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .grid-2, .grid-60-40, .grid-40-60 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

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

  .sidebar {
    transform: translateX(-240px);
    width: 240px;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 30px rgba(0,0,0,0.5);
  }

  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .sidebar-toggle  { display: none; }

  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .topbar-date { display: none; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .auth-box { padding: 24px 20px; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-accent { color: var(--accent); }
.font-mono   { font-family: var(--font-mono); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-1 { flex: 1; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
