:root {
  --brand-primary: #1a7a5e;
  --brand-dark: #0f2e28;
}
body { font-family: 'Segoe UI', system-ui, sans-serif; }
.sidebar { background: var(--brand-dark) !important; width: 240px; flex-shrink: 0; position: sticky; top: 0; }

/* Mobile: sidebar becomes an off-canvas drawer instead of squeezing content */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    height: 100dvh !important;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.sidebar-open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
  }
  .sidebar-backdrop.show { display: block; }
  main { width: 100%; min-width: 0; padding: 1rem !important; }
}
.nav-pills .nav-link.active, .nav-pills .nav-link:hover { background-color: var(--brand-primary); }
.card { border-radius: 0.75rem; }
.stat-card { border-left: 4px solid var(--brand-primary); }
.badge-status-paid { background-color: #198754; }
.badge-status-overdue { background-color: #dc3545; }
.badge-status-partially_paid { background-color: #fd7e14; }
.badge-status-unpaid { background-color: #6c757d; }
.table thead { background-color: #f1f5f3; }
.btn-primary { background-color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-primary:hover { background-color: #145d47; border-color: #145d47; }

/* Dark mode (toggled via body.dark-mode) */
body.dark-mode { background-color: #121417 !important; color: #e6e6e6; }
body.dark-mode .card { background-color: #1c1f24; color: #e6e6e6; }
body.dark-mode .table { color: #e6e6e6; }
body.dark-mode .table thead { background-color: #23262b; }
body.dark-mode .bg-light { background-color: #121417 !important; }
