/* ============================================
   GST PRO — Design System
   Palette: Alpine Frost + Copper & Slate hybrid
   Fonts: Plus Jakarta Sans + Instrument Serif
   ============================================ */

:root {
  --bg-base: #f0f4f8;
  --bg-surface: #ffffff;
  --bg-surface2: #f8fafc;
  --bg-sidebar: #0f1e3c;
  --bg-sidebar-hover: #1a2f54;
  --bg-sidebar-active: #1a56db;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #ffffff;

  --accent-blue: #1a56db;
  --accent-blue-light: #dbeafe;
  --accent-green: #059669;
  --accent-green-light: #d1fae5;
  --accent-amber: #d97706;
  --accent-amber-light: #fef3c7;
  --accent-red: #dc2626;
  --accent-red-light: #fee2e2;
  --accent-purple: #7c3aed;
  --accent-purple-light: #ede9fe;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);

  --sidebar-width: 240px;
  --topbar-height: 60px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Instrument Serif', serif;

  --transition: 0.18s ease;
}

[data-theme="dark"] {
  --bg-base: #0a0f1e;
  --bg-surface: #111827;
  --bg-surface2: #1a2235;
  --bg-sidebar: #060d1a;
  --bg-sidebar-hover: #0f1e3c;
  --bg-sidebar-active: #1a56db;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --text-sidebar: #64748b;

  --border: #1e293b;
  --border-strong: #334155;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);

  --accent-blue-light: #1e3a6e;
  --accent-green-light: #064e3b;
  --accent-amber-light: #451a03;
  --accent-red-light: #450a0a;
  --accent-purple-light: #2e1065;
}

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo-text { display: flex; flex-direction: column; }
.logo-main { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.logo-sub { font-size: 10px; color: #4a6fa5; text-transform: uppercase; letter-spacing: 0.8px; }

.sidebar-gstin {
  margin: 12px 12px 8px;
  background: rgba(26,86,219,0.15);
  border: 1px solid rgba(26,86,219,0.3);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.gstin-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: #4a6fa5; margin-bottom: 3px; }
.gstin-value { font-size: 11px; font-weight: 600; color: #93c5fd; font-family: monospace; letter-spacing: 0.5px; }
.gstin-period { font-size: 10px; color: #4a6fa5; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 8px 8px; }

.nav-section-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #2d4a7a;
  padding: 12px 8px 4px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover { background: var(--bg-sidebar-hover); color: #cbd5e1; }
.nav-item.active { background: var(--bg-sidebar-active); color: #fff; }
.nav-item.active .nav-icon { color: #fff; }

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

.nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  background: rgba(26,86,219,0.3);
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-badge.warning { background: rgba(217,119,6,0.25); color: #fbbf24; }
.nav-badge.error { background: rgba(220,38,38,0.25); color: #f87171; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  color: #64748b;
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); color: #94a3b8; }

/* ============ MAIN WRAPPER ============ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============ TOPBAR ============ */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

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

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

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

.period-selector select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface2);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

/* ============ CONTENT AREA ============ */
.content-area {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* ============ BUTTONS ============ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary:hover { background: #1648c0; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,86,219,0.3); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-surface2);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover { background: var(--border); }

.btn-success {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--accent-green); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.btn-success:hover { background: #047857; }

.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--accent-red); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-xs { padding: 3px 8px; font-size: 10px; }

/* ============ CARDS ============ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.card-body { padding: 20px; }

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

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.kpi-card.blue::before { background: var(--accent-blue); }
.kpi-card.green::before { background: var(--accent-green); }
.kpi-card.amber::before { background: var(--accent-amber); }
.kpi-card.red::before { background: var(--accent-red); }
.kpi-card.purple::before { background: var(--accent-purple); }

.kpi-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.kpi-icon.blue { background: var(--accent-blue-light); color: var(--accent-blue); }
.kpi-icon.green { background: var(--accent-green-light); color: var(--accent-green); }
.kpi-icon.amber { background: var(--accent-amber-light); color: var(--accent-amber); }
.kpi-icon.red { background: var(--accent-red-light); color: var(--accent-red); }
.kpi-icon.purple { background: var(--accent-purple-light); color: var(--accent-purple); }

.kpi-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.kpi-value { font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.kpi-change { font-size: 11px; font-weight: 600; margin-top: 6px; }
.kpi-change.up { color: var(--accent-green); }
.kpi-change.down { color: var(--accent-red); }

/* ============ TABLES ============ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead th {
  background: var(--bg-surface2);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

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

tbody td {
  padding: 10px 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

tfoot td {
  padding: 10px 14px;
  font-weight: 700;
  background: var(--bg-surface2);
  border-top: 2px solid var(--border-strong);
  font-size: 12px;
}

/* ============ FORMS ============ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-input, .form-select, .form-textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.form-input::placeholder { color: var(--text-muted); }

/* ============ TABS ============ */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { background: var(--bg-surface); color: var(--text-primary); }
.tab-btn.active { background: var(--bg-surface); color: var(--accent-blue); box-shadow: var(--shadow-sm); }

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

/* ============ STATUS BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.badge-green { background: var(--accent-green-light); color: var(--accent-green); }
.badge-red { background: var(--accent-red-light); color: var(--accent-red); }
.badge-amber { background: var(--accent-amber-light); color: var(--accent-amber); }
.badge-blue { background: var(--accent-blue-light); color: var(--accent-blue); }
.badge-purple { background: var(--accent-purple-light); color: var(--accent-purple); }
.badge-gray { background: var(--bg-surface2); color: var(--text-muted); border: 1px solid var(--border); }

/* ============ PAGE HEADER ============ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header-left h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
.page-header-left p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
}
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ SECTION DIVIDER ============ */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
}

/* ============ GRID LAYOUTS ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* ============ PROGRESS BAR ============ */
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}
.progress-fill.blue { background: var(--accent-blue); }
.progress-fill.green { background: var(--accent-green); }
.progress-fill.amber { background: var(--accent-amber); }
.progress-fill.red { background: var(--accent-red); }

/* ============ UPLOAD ZONE ============ */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-surface2);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent-blue);
  background: var(--accent-blue-light);
}
.upload-zone-icon { font-size: 36px; margin-bottom: 12px; }
.upload-zone h3 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.upload-zone p { font-size: 12px; color: var(--text-muted); }

/* ============ RECON STATUS ROWS ============ */
.recon-matched { background: rgba(5,150,105,0.04); }
.recon-mismatch { background: rgba(217,119,6,0.04); }
.recon-missing { background: rgba(220,38,38,0.04); }

/* ============ SUMMARY BOX ============ */
.summary-box {
  background: var(--bg-surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.summary-row:last-child { border-bottom: none; }
.summary-row.total {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  padding-top: 10px;
  margin-top: 4px;
  border-top: 2px solid var(--border-strong);
  border-bottom: none;
}
.summary-label { color: var(--text-secondary); }
.summary-value { font-weight: 600; color: var(--text-primary); font-family: monospace; }
.summary-value.credit { color: var(--accent-green); }
.summary-value.debit { color: var(--accent-red); }

/* ============ ALERT BOXES ============ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  margin-bottom: 16px;
}
.alert-info { background: var(--accent-blue-light); color: var(--accent-blue); border: 1px solid rgba(26,86,219,0.2); }
.alert-success { background: var(--accent-green-light); color: var(--accent-green); border: 1px solid rgba(5,150,105,0.2); }
.alert-warning { background: var(--accent-amber-light); color: var(--accent-amber); border: 1px solid rgba(217,119,6,0.2); }
.alert-error { background: var(--accent-red-light); color: var(--accent-red); border: 1px solid rgba(220,38,38,0.2); }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: #1e293b;
  color: #f1f5f9;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--accent-green); }
.toast.error { background: var(--accent-red); }
.toast.warning { background: var(--accent-amber); }

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

.modal-box {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none; border: none;
  color: var(--text-muted); font-size: 16px;
  cursor: pointer; padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-surface2); color: var(--text-primary); }
.modal-body { padding: 24px; }

/* ============ FILING STATUS TRACKER ============ */
.filing-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filing-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 80px;
  position: relative;
}
.filing-step::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.filing-step:last-child::after { display: none; }
.filing-step.done::after { background: var(--accent-green); }

.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--border);
  color: var(--text-muted);
  position: relative; z-index: 1;
  border: 2px solid var(--border);
}
.filing-step.done .step-circle { background: var(--accent-green); color: #fff; border-color: var(--accent-green); }
.filing-step.active .step-circle { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.step-label { font-size: 10px; font-weight: 600; color: var(--text-muted); text-align: center; }
.filing-step.done .step-label { color: var(--accent-green); }
.filing-step.active .step-label { color: var(--accent-blue); }

/* ============ CHART BARS ============ */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
  margin-top: 8px;
}
.mini-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--accent-blue-light);
  transition: height 0.4s ease;
  cursor: pointer;
  position: relative;
}
.mini-bar:hover { background: var(--accent-blue); }
.mini-bar.current { background: var(--accent-blue); }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 12px; }

/* ============ CALCULATOR ============ */
.calc-display {
  background: var(--bg-sidebar);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  text-align: right;
}
.calc-display .calc-expr { font-size: 12px; color: #4a6fa5; min-height: 18px; }
.calc-display .calc-result { font-size: 28px; font-weight: 700; color: #fff; font-family: monospace; }

.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.calc-btn {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface2);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.calc-btn:hover { background: var(--border); }
.calc-btn.op { background: var(--accent-blue-light); color: var(--accent-blue); }
.calc-btn.eq { background: var(--accent-blue); color: #fff; }
.calc-btn.clear { background: var(--accent-red-light); color: var(--accent-red); }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .menu-toggle { display: block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .content-area { padding: 16px; }
  .filing-steps { gap: 0; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .tabs { flex-direction: column; }
  .page-header { flex-direction: column; }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: fadeIn 0.25s ease; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.loading { animation: pulse 1.5s infinite; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============ UTILITY ============ */
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-mono { font-family: monospace; }
.font-bold { font-weight: 700; }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-amber { color: var(--accent-amber); }
.text-blue { color: var(--accent-blue); }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }