:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --green: #16a34a;
  --red: #dc2626;
  --bg: #f4f6fb;
  --card-radius: 14px;
}
body {
  background: var(--bg);
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
}
.sidebar {
  min-height: 100vh;
  background: #111827;
  color: #e5e7eb;
}
.sidebar .brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  padding: 1.2rem 1rem;
  display: block;
  text-decoration: none;
}
.sidebar a.nav-link {
  color: #cbd5e1;
  padding: .6rem 1.1rem;
  border-radius: 8px;
  margin: 2px 8px;
  font-size: .93rem;
}
.sidebar a.nav-link:hover, .sidebar a.nav-link.active {
  background: var(--brand);
  color: #fff;
}
.sidebar .nav-section {
  text-transform: uppercase;
  font-size: .7rem;
  color: #6b7280;
  padding: 1rem 1.1rem .3rem;
  letter-spacing: .05em;
}
.topbar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: .8rem 1.5rem;
}
.card {
  border: none;
  border-radius: var(--card-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.kpi-card {
  border-radius: var(--card-radius);
  padding: 1.2rem;
  color: #fff;
}
.kpi-card.blue { background: linear-gradient(135deg,#2563eb,#1d4ed8); }
.kpi-card.green { background: linear-gradient(135deg,#16a34a,#15803d); }
.kpi-card.red { background: linear-gradient(135deg,#dc2626,#b91c1c); }
.kpi-card.purple { background: linear-gradient(135deg,#7c3aed,#6d28d9); }
.kpi-card .label { font-size: .8rem; opacity: .9; }
.kpi-card .value { font-size: 1.5rem; font-weight: 700; margin-top: .2rem; }
.badge-income { background: #dcfce7; color: #15803d; }
.badge-expense { background: #fee2e2; color: #b91c1c; }
.progress { border-radius: 20px; height: 10px; background:#e5e7eb; }
.progress-bar.bg-danger-soft { background: #f87171; }
.table thead th { font-size: .8rem; text-transform: uppercase; color: #6b7280; border-bottom: 2px solid #eee; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.link-code-box {
  font-family: monospace;
  font-size: 1.6rem;
  letter-spacing: .3rem;
  background: #111827;
  color: #4ade80;
  padding: .8rem 1.2rem;
  border-radius: 10px;
  text-align: center;
}
@media (max-width: 767px) {
  .sidebar { min-height: auto; }
}
