/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --bg: #f0f4f0;
  --surface: #ffffff;
  --border: #e0e8e2;
  --text: #1a2e1f;
  --text-muted: #5a7564;
  --primary: #1e7e45;
  --primary-light: #d1fae5;
  --success: #16a34a;
  --success-light: #dcfce7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.05);
  --radius: 10px;
  --sidebar-width: 230px;
  --sidebar-bg: #14532d;
  --sidebar-text: rgba(255,255,255,0.75);
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active: rgba(255,255,255,0.18);
  --transition: 0.2s ease;
}

body.dark {
  --bg: #0f1f13;
  --surface: #162b1c;
  --border: #243d2a;
  --text: #e8f5ea;
  --text-muted: #7aab85;
  --primary-light: #14532d;
  --success-light: #14532d;
  --danger-light: #7f1d1d;
  --warning-light: #78350f;
  --shadow: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============================================
   MATERIAL SYMBOLS
   ============================================ */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  vertical-align: middle;
  line-height: 1;
}
.nav-icon.material-symbols-outlined {
  font-size: 20px;
  display: block;
}
.icon-sm { font-size: 16px !important; }
.icon-md { font-size: 20px !important; }
.icon-lg { font-size: 24px !important; }
.icon-xl { font-size: 40px !important; }
.icon-xxl { font-size: 56px !important; }

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  transition: background var(--transition), color var(--transition);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ============================================
   LAYOUT
   ============================================ */
#app { display: flex; min-height: 100vh; }

#sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: none;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 50;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
}
.logo-icon { font-size: 22px; color: #ffffff; }

.theme-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
  transition: background var(--transition);
}
.theme-btn .material-symbols-outlined { font-size: 18px; }
.theme-btn:hover { background: rgba(255,255,255,0.2); }

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

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.sidebar-logout:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  transition: all var(--transition);
  font-weight: 500;
  margin-bottom: 2px;
  font-size: 14px;
}
.nav-link:hover { background: var(--sidebar-hover); color: var(--sidebar-text-active); }
.nav-link.active { background: var(--sidebar-active); color: var(--sidebar-text-active); font-weight: 600; }
.nav-icon { font-size: 16px; flex-shrink: 0; }

#main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

#view-container { padding: 24px; max-width: 1200px; }

/* ============================================
   BOTTOM NAV (mobile)
   ============================================ */
#bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 50;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 8px;
  transition: color var(--transition);
}
.bottom-nav-link .nav-icon { font-size: 18px; }
.bottom-nav-link.active { color: var(--success); }

/* ============================================
   FAB
   ============================================ */
#fab {
  position: fixed;
  bottom: 80px; right: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(20,83,45,0.45);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
#fab:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(20,83,45,0.55); }
#fab:active { transform: scale(0.96); }

/* ============================================
   MODAL
   ============================================ */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#modal-overlay.hidden { display: none; }

#modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 28px; height: 28px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text); }

#modal-content { padding: 20px 24px 24px; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: background var(--transition);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent, var(--primary));
  transition: background var(--transition);
}
.stat-card.green { --accent: var(--success); }
.stat-card.red { --accent: var(--danger); }
.stat-card.blue { --accent: var(--primary); }
.stat-card.orange { --accent: var(--warning); }

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.stat-value.green { color: var(--success); }
.stat-value.red { color: var(--danger); }
.stat-value.blue { color: var(--primary); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.15s;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: #166534; }

.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover:not(:disabled) { background: #15803d; }

.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover:not(:disabled) { background: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--text); }

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,126,69,0.12);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.toggle-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.toggle-btn {
  flex: 1;
  padding: 9px;
  text-align: center;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  transition: all 0.15s;
  border: none;
}
.toggle-btn.active { background: var(--success); color: white; }
.toggle-btn.active.success { background: var(--success); }
.toggle-btn.active.danger { background: var(--danger); }

/* ============================================
   BADGE
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-muted { background: var(--bg); color: var(--text-muted); }

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }

/* ============================================
   TABLE
   ============================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg); }
th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
.text-right { text-align: right; }
.text-success { color: var(--success); font-weight: 600; }
.text-danger { color: var(--danger); font-weight: 600; }
.text-muted { color: var(--text-muted); }

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

/* ============================================
   MONTH NAVIGATOR
   ============================================ */
.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
}
.month-nav-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.15s;
}
.month-nav-btn:hover { background: var(--bg); color: var(--text); }
.month-nav-label {
  min-width: 120px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

/* ============================================
   SECTION STATS ROW
   ============================================ */
.stats-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.stats-row .stat-item { font-size: 13px; }
.stats-row .stat-item strong { color: var(--text); }
.stats-row .divider { width: 1px; height: 16px; background: var(--border); }

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-bar select { max-width: 160px; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-desc { font-size: 13px; margin-bottom: 20px; }

/* ============================================
   CREDIT CARD VISUAL
   ============================================ */
.credit-card-visual {
  border-radius: 12px;
  padding: 20px;
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 12px;
}
.credit-card-visual::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.credit-card-visual::after {
  content: '';
  position: absolute;
  bottom: -40px; right: 20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.card-chip { font-size: 20px; margin-bottom: 8px; }
.card-number { font-size: 14px; letter-spacing: 3px; opacity: 0.8; }
.card-name { font-size: 15px; font-weight: 700; margin-top: 8px; }

/* ============================================
   CHAT (Assistente)
   ============================================ */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  min-height: 400px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.chat-bubble.user {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-bubble.assistant {
  background: var(--surface);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}
.chat-bubble.loading {
  background: var(--surface);
  color: var(--text-muted);
  align-self: flex-start;
  border: 1px solid var(--border);
}

.quick-prompts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.quick-prompt-btn {
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.quick-prompt-btn:hover { border-color: var(--primary); color: var(--primary); }

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

/* ============================================
   PARCELA CARD
   ============================================ */
.parcela-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.parcela-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.parcela-title { font-weight: 600; font-size: 15px; }
.parcela-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.parcela-actions { display: flex; gap: 6px; }

/* ============================================
   ASSINATURA CARD
   ============================================ */
.assinatura-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.assinatura-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}
.assinatura-nome { font-weight: 600; font-size: 15px; }
.assinatura-valor { font-size: 18px; font-weight: 700; color: var(--danger); }
.assinatura-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.assinatura-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================
   CONTA FIXA ITEM
   ============================================ */
.conta-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.conta-day {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.conta-day.overdue { background: var(--danger-light); color: var(--danger); }
.conta-day.paid { background: var(--success-light); color: var(--success); }
.conta-info { flex: 1; }
.conta-nome { font-weight: 600; font-size: 14px; }
.conta-cat { font-size: 12px; color: var(--text-muted); }
.conta-valor { font-weight: 700; font-size: 16px; }
.conta-actions { display: flex; gap: 6px; align-items: center; }

/* ============================================
   SETUP / WELCOME
   ============================================ */
.setup-container {
  max-width: 520px;
  margin: 40px auto;
}
.setup-step { display: none; }
.setup-step.active { display: block; }
.setup-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.setup-desc { color: var(--text-muted); margin-bottom: 24px; }

/* ============================================
   COLOR PICKER
   ============================================ */
.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-option {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.color-option:hover { transform: scale(1.15); }
.color-option.selected { border-color: var(--text); transform: scale(1.1); }

/* ============================================
   UPCOMING LIST
   ============================================ */
.upcoming-list { display: flex; flex-direction: column; gap: 8px; }
.upcoming-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg);
}
.upcoming-icon { font-size: 18px; }
.upcoming-info { flex: 1; }
.upcoming-name { font-weight: 500; font-size: 13px; }
.upcoming-date { font-size: 11px; color: var(--text-muted); }
.upcoming-value { font-weight: 600; font-size: 14px; color: var(--warning); }

/* ============================================
   CHARTS AREA
   ============================================ */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.chart-title { font-weight: 600; margin-bottom: 16px; font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ============================================
   SECTION HELPERS
   ============================================ */
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .count-badge {
  font-size: 12px;
  background: var(--border);
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 600;
}

.inline-form-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }

/* ============================================
   INSTALLMENT PREVIEW
   ============================================ */
.parcela-preview {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   ALERT
   ============================================ */
.alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 4px;
}
.alert-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(217,119,6,0.25);
}
.alert a { color: var(--primary); font-weight: 600; text-decoration: underline; }

/* ============================================
   AUTH OVERLAY
   ============================================ */
.auth-hidden { display: none !important; }

#auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

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

.auth-brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 10px;
}

.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius) - 2px);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.auth-msg {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 12px;
}

.auth-msg-error {
  background: var(--danger-light);
  color: var(--danger);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
  #sidebar { display: none; }
  #main-content { margin-left: 0; }
  #bottom-nav { display: flex; }
  #view-container { padding: 16px; padding-bottom: 80px; }
  #fab { bottom: 72px; right: 16px; }

  .page-header { flex-direction: column; align-items: flex-start; }
  .charts-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .inline-form-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stat-card, .stats-row { font-size: 13px; }
  .stat-value { font-size: 20px; }
  table { font-size: 12px; }
  td, th { padding: 8px 10px; }
}
