/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  /* Colors - Light Mode */
  --slate-1: #fcfcfd;
  --slate-2: #f9f9fb;
  --slate-3: #f0f0f3;
  --slate-4: #e8e8ec;
  --slate-5: #e0e1e6;
  --slate-6: #d9d9e0;
  --slate-7: #cdced6;
  --slate-8: #b9bbc6;
  --slate-9: #8b8d98;
  --slate-10: #80828d;
  --slate-11: #60646c;
  --slate-12: #1c2024;

  --indigo-1: #fdfdfe;
  --indigo-2: #f7f9ff;
  --indigo-3: #edf2fe;
  --indigo-4: #e1e9ff;
  --indigo-5: #d2deff;
  --indigo-6: #c1d0ff;
  --indigo-7: #abbdf9;
  --indigo-8: #8da4ef;
  --indigo-9: #3e63dd;
  --indigo-10: #3358d4;
  --indigo-11: #3a5bc7;
  --indigo-12: #1f2d5c;

  --green-1: #fbfefc;
  --green-2: #f4fbf6;
  --green-3: #e6f6eb;
  --green-4: #d6f1df;
  --green-5: #c4e8d1;
  --green-6: #adddc0;
  --green-7: #8eceaa;
  --green-8: #5bb98b;
  --green-9: #30a46c;
  --green-10: #2b9a66;
  --green-11: #218358;
  --green-12: #193b2d;

  --red-1: #fffcfc;
  --red-2: #fff7f7;
  --red-3: #feebec;
  --red-4: #ffdbdc;
  --red-5: #ffcdce;
  --red-6: #fdbdbe;
  --red-7: #f4a9aa;
  --red-8: #eb8e90;
  --red-9: #e5484d;
  --red-10: #dc3e42;
  --red-11: #ce2c31;
  --red-12: #641723;

  --purple-1: #fefcfe;
  --purple-2: #fbf7fe;
  --purple-3: #f7edfe;
  --purple-4: #f2e2fc;
  --purple-5: #ead5f9;
  --purple-6: #e0c4f4;
  --purple-7: #d1afec;
  --purple-8: #be93e4;
  --purple-9: #8e4ec6;
  --purple-10: #8347b9;
  --purple-11: #8145b5;
  --purple-12: #402060;

  --amber-1: #fefdfb;
  --amber-2: #fefbe9;
  --amber-3: #fff7c2;
  --amber-4: #ffee9c;
  --amber-5: #fbe577;
  --amber-6: #f3d768;
  --amber-7: #e9c162;
  --amber-8: #e2a336;
  --amber-9: #ffc53d;
  --amber-10: #ffba18;
  --amber-11: #ab6400;
  --amber-12: #4f3422;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 64px;

  /* Radius */
  --radius-1: 2px;
  --radius-2: 4px;
  --radius-3: 6px;
  --radius-4: 8px;
  --radius-5: 12px;

  /* Shadows */
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-3: 0 4px 16px rgba(0, 0, 0, 0.12);
}

html[data-color-scheme="dark"] {
  --slate-1: #1a1d2e;
  --slate-2: #16192a;
  --slate-3: #1e2235;
  --slate-4: #262b3f;
  --slate-5: #2e3348;
  --slate-6: #363c52;
  --slate-7: #40475f;
  --slate-8: #4d5570;
  --slate-9: #5c6380;
  --slate-10: #6b7290;
  --slate-11: #9ca3bc;
  --slate-12: #e8eaf0;

  --indigo-1: #13152a;
  --indigo-2: #171a32;
  --indigo-3: #1e2549;
  --indigo-4: #253165;
  --indigo-5: #2e3d7c;
  --indigo-6: #384a92;
  --indigo-7: #4359ab;
  --indigo-8: #5069c7;
  --indigo-9: #5b7de8;
  --indigo-10: #6d8ef0;
  --indigo-11: #a5b9ff;
  --indigo-12: #dce4ff;

  --green-1: #0e1512;
  --green-2: #121b17;
  --green-3: #132d21;
  --green-4: #113b29;
  --green-5: #174933;
  --green-6: #20573e;
  --green-7: #28684a;
  --green-8: #2f7c57;
  --green-9: #30a46c;
  --green-10: #33b074;
  --green-11: #3dd68c;
  --green-12: #b1f1cb;

  --red-1: #1f1315;
  --red-2: #291415;
  --red-3: #3c181a;
  --red-4: #481a1d;
  --red-5: #541b1f;
  --red-6: #671e22;
  --red-7: #822025;
  --red-8: #aa2429;
  --red-9: #e5484d;
  --red-10: #f2555a;
  --red-11: #ff6369;
  --red-12: #feecee;

  --purple-1: #18111b;
  --purple-2: #1e1523;
  --purple-3: #301a3a;
  --purple-4: #3a1e48;
  --purple-5: #432155;
  --purple-6: #4e2667;
  --purple-7: #5f2d84;
  --purple-8: #7938b2;
  --purple-9: #8e4ec6;
  --purple-10: #9d5bd2;
  --purple-11: #bf7af0;
  --purple-12: #f7ecfc;

  --amber-1: #1f1a0e;
  --amber-2: #271e11;
  --amber-3: #3a2c15;
  --amber-4: #4b3619;
  --amber-5: #5c411d;
  --amber-6: #6f4e23;
  --amber-7: #866029;
  --amber-8: #a67831;
  --amber-9: #ffb84d;
  --amber-10: #ffc966;
  --amber-11: #ffd380;
  --amber-12: #ffe8b3;
}

/* Dark Mode Enhancements */
html[data-color-scheme="dark"] .hero {
  background: linear-gradient(135deg, #047857, #10b981, #34d399);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
}

html[data-color-scheme="dark"] .card {
  background: var(--slate-1);
  border-color: var(--slate-5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html[data-color-scheme="dark"] .header {
  background: var(--slate-1);
  border-bottom-color: var(--slate-5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html[data-color-scheme="dark"] .nav {
  background: var(--slate-1);
  border-right-color: var(--slate-5);
}

html[data-color-scheme="dark"] .stat-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--slate-2);
  color: var(--slate-12);
  line-height: 1.6;
}

/* Layout */
.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background: var(--slate-1);
  border-bottom: 1px solid var(--slate-6);
  box-shadow: var(--shadow-1);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--indigo-9), var(--indigo-10));
  color: white;
  border-radius: var(--radius-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 24px;
  height: 24px;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-12);
  margin: 0;
  line-height: 1.2;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--slate-11);
  margin: 0;
}

.actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-right: var(--space-3);
  border-right: 1px solid var(--slate-6);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--indigo-9);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-12);
  line-height: 1.2;
}

.user-role {
  font-size: 0.75rem;
  color: var(--slate-11);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--slate-7);
  background: var(--slate-1);
  border-radius: var(--radius-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--slate-11);
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--slate-3);
  color: var(--slate-12);
}

/* Theme Toggle Slider */
.theme-toggle {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 28px;
  cursor: pointer;
}

.theme-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle .slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--slate-6);
  border-radius: 34px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.theme-toggle .slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle input:checked + .slider {
  background: var(--indigo-9);
}

.theme-toggle input:checked + .slider::before {
  transform: translateX(28px);
}

.theme-toggle .slider-icon {
  position: relative;
  z-index: 1;
  pointer-events: none;
  transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
  color: var(--amber-11);
  opacity: 1;
}

.theme-toggle .moon-icon {
  color: white;
  opacity: 0.7;
}

.theme-toggle input:checked + .slider .sun-icon {
  opacity: 0.5;
}

.theme-toggle input:checked + .slider .moon-icon {
  opacity: 1;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--red-9);
  color: white;
  border: none;
  border-radius: var(--radius-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-logout:hover {
  background: var(--red-10);
}

/* Main */
.main {
  display: flex;
  flex: 1;
}

/* Navigation */
.nav {
  width: 260px;
  background: var(--slate-1);
  border-right: 1px solid var(--slate-6);
  padding: var(--space-4);
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  color: var(--slate-11);
  text-decoration: none;
  border-radius: var(--radius-2);
  margin-bottom: var(--space-2);
  transition: all 0.2s;
  font-size: 0.875rem;
}

.nav-item:hover {
  background: var(--slate-3);
  color: var(--slate-12);
}

.nav-item.active {
  background: var(--green-3);
  color: var(--green-11);
  font-weight: 500;
}

.nav-item svg {
  flex-shrink: 0;
}

/* Nav Section (Collapsible Groups) */
.nav-section {
  margin-bottom: var(--space-4);
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-2);
  transition: all 0.2s;
}

.nav-section-header:hover {
  background: var(--slate-3);
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-11);
}

.nav-section-header .chevron {
  transition: transform 0.2s;
  color: var(--slate-9);
}

.nav-section-header .chevron.rotated {
  transform: rotate(-180deg);
}

.nav-section-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: var(--space-2);
}

.nav-section-items.active {
  max-height: 1000px;
  transition: max-height 0.5s ease-in;
}

/* Content */
.content {
  flex: 1;
  padding: var(--space-6);
  overflow-y: auto;
  max-width: 100%;
}

/* Hero */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6);
  background: linear-gradient(135deg, #056608, #00d084, #2ecc71);
  color: white;
  border-radius: var(--radius-4);
  margin-bottom: var(--space-6);
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 var(--space-2) 0;
}

.hero p {
  margin: 0;
  opacity: 0.9;
}

.period {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-icon {
  opacity: 0.9;
}

.period-label {
  display: block;
  font-size: 0.75rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.period-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2px;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: var(--slate-1);
  border: 1px solid var(--slate-6);
  border-radius: var(--radius-4);
  padding: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-1);
  transition: all 0.2s;
  border-left: 5px solid var(--slate-8);
}

.stat-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.stat-content {
  flex: 1;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.stat-title {
  font-size: 0.875rem;
  color: var(--slate-11);
  font-weight: 500;
}

.trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-1);
}

.trend-up {
  background: var(--green-3);
  color: var(--green-11);
}

.trend-down {
  background: var(--red-3);
  color: var(--red-11);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-12);
}

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

.stat-card.green {
  background: var(--green-2);
  border-color: var(--green-6);
  border-left: 5px solid var(--green-9);
}

.stat-card.green .stat-icon {
  background: var(--green-9);
  color: white;
}

.stat-card.red {
  background: var(--red-2);
  border-color: var(--red-6);
  border-left: 5px solid var(--red-9);
}

.stat-card.red .stat-icon {
  background: var(--red-9);
  color: white;
}

.stat-card.blue {
  background: var(--indigo-2);
  border-color: var(--indigo-6);
  border-left: 5px solid var(--indigo-9);
}

.stat-card.blue .stat-icon {
  background: var(--indigo-9);
  color: white;
}

.stat-card.purple {
  background: var(--purple-2);
  border-color: var(--purple-6);
  border-left: 5px solid var(--purple-9);
}

.stat-card.purple .stat-icon {
  background: var(--purple-9);
  color: white;
}

/* Charts */
.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

/* Card */
.card {
  background: var(--slate-1);
  border: 1px solid var(--slate-6);
  border-radius: var(--radius-4);
  box-shadow: var(--shadow-1);
}

.card-header {
  padding: var(--space-5);
  border-bottom: 1px solid var(--slate-6);
}

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--slate-12);
}

.card-content {
  padding: var(--space-5);
}

.card-content canvas {
  max-width: 100%;
}

/* Tables */
.tables {
  display: grid;
  gap: var(--space-4);
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table thead {
  background: var(--slate-3);
}

.table th {
  padding: var(--space-3);
  text-align: left;
  font-weight: 600;
  color: var(--slate-12);
  border-bottom: 2px solid var(--slate-6);
  white-space: nowrap;
}

.table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--slate-5);
  color: var(--slate-11);
}

.table tbody tr:hover {
  background: var(--slate-3);
}

.align-right {
  text-align: right !important;
}

.code {
  display: inline-block;
  padding: 2px 8px;
  background: var(--indigo-3);
  color: var(--indigo-11);
  border-radius: var(--radius-1);
  font-family: monospace;
  font-size: 0.8125rem;
  font-weight: 500;
}

.description {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Balance Summary */
.balance-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.balance-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--slate-3);
  border-radius: var(--radius-2);
}

.balance-label {
  font-weight: 500;
  color: var(--slate-11);
}

.balance-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-12);
}

.balance-divider {
  height: 2px;
  background: var(--slate-6);
  margin: var(--space-2) 0;
}

.balance-check {
  text-align: center;
  padding: var(--space-3);
}

.balanced {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--green-3);
  color: var(--green-11);
  border-radius: var(--radius-2);
  font-weight: 600;
}

.unbalanced {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--red-3);
  color: var(--red-11);
  border-radius: var(--radius-2);
  font-weight: 600;
}

/* Loading */
.loading {
  color: var(--slate-11);
  font-style: italic;
}

/* Page Header */
.page-header {
  margin-bottom: var(--space-6);
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--slate-12);
  margin: 0 0 var(--space-2) 0;
}

.page-header p {
  font-size: 0.875rem;
  color: var(--slate-11);
  margin: 0;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-2);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: var(--green-3);
  color: var(--green-11);
}

.badge-danger {
  background: var(--red-3);
  color: var(--red-11);
}

.badge-blue {
  background: var(--indigo-3);
  color: var(--indigo-11);
}

.badge-orange {
  background: var(--amber-3);
  color: var(--amber-11);
}

.badge-purple {
  background: var(--purple-3);
  color: var(--purple-11);
}

.badge-secondary {
  background: var(--slate-4);
  color: var(--slate-11);
}

/* Stat Highlight */
.stat-highlight {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--green-3);
  color: var(--green-11);
  border-radius: var(--radius-2);
  font-weight: 600;
  font-size: 1rem;
}

.stat-highlight.danger {
  background: var(--red-3);
  color: var(--red-11);
}

/* Amount Styling */
.amount-positive {
  color: var(--green-11);
  font-weight: 600;
}

.amount-negative {
  color: var(--red-11);
  font-weight: 600;
}

/* Loading Page */
.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  font-size: 1.125rem;
  color: var(--slate-11);
}

/* Error Page */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  font-size: 1.125rem;
  color: var(--red-11);
  background: var(--red-2);
  border-radius: var(--radius-4);
  padding: var(--space-6);
  text-align: center;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  color: var(--slate-11);
}

.empty-state svg {
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-12);
  margin: 0 0 var(--space-2) 0;
}

.empty-state p {
  margin: 0;
  font-size: 0.875rem;
}

/* Settings Form */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 500px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-12);
}

.form-control {
  padding: var(--space-3);
  border: 1px solid var(--slate-7);
  border-radius: var(--radius-2);
  background: var(--slate-1);
  color: var(--slate-12);
  font-size: 0.875rem;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--indigo-9);
  box-shadow: 0 0 0 3px var(--indigo-3);
}

.btn-primary {
  padding: var(--space-3) var(--space-5);
  background: var(--indigo-9);
  color: white;
  border: none;
  border-radius: var(--radius-2);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--indigo-10);
}

/* Ledger Account */
.ledger-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.ledger-account {
  border: 1px solid var(--slate-6);
  border-radius: var(--radius-3);
  overflow: hidden;
}

.ledger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  background: var(--slate-3);
  border-bottom: 1px solid var(--slate-6);
}

.ledger-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-12);
  margin: 0;
}

.ledger-balance {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--indigo-11);
}

.table-sm {
  font-size: 0.8125rem;
}

.table-sm th,
.table-sm td {
  padding: var(--space-2) var(--space-3);
}

/* Income Statement & Balance Sheet */
.income-statement,
.balance-sheet {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.statement-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.statement-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-12);
  margin: 0 0 var(--space-3) 0;
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--slate-6);
}

.statement-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  color: var(--slate-11);
}

.statement-item:nth-child(even) {
  background: var(--slate-2);
}

.statement-subtotal {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3);
  margin-top: var(--space-2);
  background: var(--slate-3);
  border-top: 1px solid var(--slate-6);
  border-radius: var(--radius-2);
}

.statement-total {
  display: flex;
  justify-content: space-between;
  padding: var(--space-4);
  margin-top: var(--space-3);
  background: var(--indigo-3);
  border-radius: var(--radius-3);
  font-size: 1.125rem;
}

/* Balance Sheet */
.balance-sheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.bs-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.bs-column h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-12);
  margin: 0 0 var(--space-3) 0;
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--slate-6);
}

.align-center {
  text-align: center !important;
}

.total-row {
  background: var(--slate-4) !important;
  font-weight: 600;
}

.total-row td {
  border-top: 2px solid var(--slate-7);
  border-bottom: 2px solid var(--slate-7);
}

/* Responsive */
@media (max-width: 1024px) {
  .charts {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  .content {
    padding: var(--space-4);
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
  }
  .period {
    width: 100%;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .balance-sheet {
    grid-template-columns: 1fr;
  }
  .card-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-start !important;
  }
}
