/* ============================================================
   BHCPF DATA TOOL - Main Stylesheet
   Basic Healthcare Provision Fund
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --primary: #0a5c3e;
  --primary-dark: #073d29;
  --primary-light: #0e7a53;
  --primary-glow: rgba(10,92,62,0.15);
  --accent: #17a95c;
  --accent-light: #1ec972;
  --secondary: #1a6b8a;
  --warning: #e67e22;
  --danger: #c0392b;
  --success: #27ae60;
  --info: #2980b9;

  --bg-body: #f0f4f2;
  --bg-card: #ffffff;
  --bg-sidebar: #073d29;
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;

  --text-primary: #1a2e25;
  --text-secondary: #5a7269;
  --text-muted: #8fa89e;
  --text-white: #ffffff;

  --border: #d6e4dc;
  --border-light: #ebf3ef;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.07);
  --shadow: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --transition: all 0.25s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; }
ul { list-style: none; }

/* ---- Login Page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #073d29 0%, #0a5c3e 40%, #0e7a53 70%, #17a95c 100%);
  position: relative;
  overflow: hidden;
  padding: 24px;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-box {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  width: 100%; max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  position: relative; z-index: 1;
}
.login-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 8px;
}
.login-logo .logo-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.login-logo .logo-text { line-height: 1.2; }
.login-logo .logo-text h1 { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.login-logo .logo-text span { font-size: 0.75rem; color: var(--text-secondary); }
.login-subtitle { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 32px; }
.login-subtitle strong { color: var(--primary); }

/* ---- Layout ---- */
.app-wrapper { display: flex; min-height: 100vh; }

/* ---- 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;
  transition: var(--transition);
  box-shadow: 4px 0 20px rgba(0,0,0,.2);
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-header .s-logo {
  width: 42px; height: 42px; min-width: 42px;
  background: linear-gradient(135deg, var(--accent), #0ea55c);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: white;
}
.sidebar-header .s-brand { overflow: hidden; }
.sidebar-header .s-brand h2 { font-size: .85rem; font-weight: 700; color: white; white-space: nowrap; }
.sidebar-header .s-brand p { font-size: .68rem; color: rgba(255,255,255,.5); white-space: nowrap; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 0; }
.nav-section-label {
  font-size: .65rem; font-weight: 600; letter-spacing: .08em;
  color: rgba(255,255,255,.3); text-transform: uppercase;
  padding: 16px 20px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,.7);
  font-size: .88rem; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: white; }
.nav-item.active {
  background: rgba(23,169,92,.15);
  color: var(--accent-light);
  border-left-color: var(--accent);
}
.nav-item .nav-icon { font-size: 1.1rem; min-width: 22px; text-align: center; }
.nav-item .nav-label { white-space: nowrap; overflow: hidden; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--danger); color: white;
  font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.07);
}
.sidebar-user .su-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0ea55c);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: white; font-weight: 700; flex-shrink: 0;
}
.sidebar-user .su-info { overflow: hidden; }
.sidebar-user .su-name { font-size: .8rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .su-role { font-size: .68rem; color: rgba(255,255,255,.45); }

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex; flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

/* ---- Top Bar ---- */
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title h2 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.topbar-title p { font-size: .75rem; color: var(--text-secondary); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-body); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); font-size: 1rem;
  position: relative; transition: var(--transition);
}
.topbar-btn:hover { background: var(--primary-glow); color: var(--primary); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid white;
}
.sidebar-toggle { display: none; }

/* ---- Page Content ---- */
.page-content { flex: 1; padding: 28px; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.page-header p { color: var(--text-secondary); font-size: .9rem; margin-top: 4px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-muted); margin-bottom: 8px; }
.breadcrumb span { color: var(--text-muted); }
.breadcrumb a { color: var(--accent); }

/* ---- Stats Cards ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex; align-items: flex-start; gap: 16px;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute;
  top: 0; right: 0; width: 80px; height: 80px;
  border-radius: 50%; opacity: .07;
  transform: translate(25px,-25px);
}
.stat-card.green::before { background: var(--success); }
.stat-card.blue::before { background: var(--info); }
.stat-card.orange::before { background: var(--warning); }
.stat-card.red::before { background: var(--danger); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon.green { background: rgba(39,174,96,.12); color: var(--success); }
.stat-icon.blue  { background: rgba(41,128,185,.12); color: var(--info); }
.stat-icon.orange{ background: rgba(230,126,34,.12); color: var(--warning); }
.stat-icon.red   { background: rgba(192,57,43,.12);  color: var(--danger); }
.stat-icon.teal  { background: rgba(10,92,62,.12);   color: var(--primary); }
.stat-body { flex: 1; }
.stat-body .stat-value { font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-body .stat-label { font-size: .78rem; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }
.stat-body .stat-sub { font-size: .72rem; color: var(--text-muted); margin-top: 6px; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: .95rem; font-weight: 700; color: var(--text-primary); }
.card-header .card-actions { display: flex; gap: 8px; }
.card-body { padding: 24px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border-light); background: var(--bg-body); }

/* ---- Tables ---- */
.table-wrapper { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead th {
  background: var(--bg-body); color: var(--text-secondary);
  font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
  padding: 12px 16px; text-align: left; white-space: nowrap;
  border-bottom: 2px solid var(--border);
}
.data-table tbody tr { border-bottom: 1px solid var(--border-light); transition: var(--transition); }
.data-table tbody tr:hover { background: rgba(10,92,62,.035); }
.data-table tbody td { padding: 13px 16px; vertical-align: middle; }
.data-table tbody tr:last-child { border-bottom: none; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
}
.badge-draft     { background: #f1f5f9; color: #64748b; }
.badge-submitted { background: rgba(41,128,185,.12); color: #2980b9; }
.badge-approved  { background: rgba(39,174,96,.12);  color: #1a7a40; }
.badge-rejected  { background: rgba(192,57,43,.12);  color: #c0392b; }
.badge-active    { background: rgba(39,174,96,.12);  color: #1a7a40; }
.badge-inactive  { background: #f1f5f9; color: #64748b; }
.badge-warning   { background: rgba(230,126,34,.12); color: #b85c0a; }
.badge-default   { background: #f1f5f9; color: #64748b; }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: .82rem; font-weight: 600; color: var(--text-secondary); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem; font-family: inherit;
  color: var(--text-primary);
  background: white;
  transition: var(--transition);
  outline: none; width: 100%;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-control.error { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: .75rem; color: var(--text-muted); }
.form-error { font-size: .75rem; color: var(--danger); }
.form-section {
  background: var(--bg-body);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--primary);
}
.form-section-title {
  font-size: .9rem; font-weight: 700; color: var(--primary);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; box-shadow: 0 4px 12px rgba(10,92,62,.3); }
.btn-success { background: linear-gradient(135deg, #27ae60, #1ec972); color: white; box-shadow: 0 4px 12px rgba(39,174,96,.3); }
.btn-danger  { background: linear-gradient(135deg, #c0392b, #e74c3c); color: white; box-shadow: 0 4px 12px rgba(192,57,43,.3); }
.btn-warning { background: linear-gradient(135deg, #e67e22, #f39c12); color: white; box-shadow: 0 4px 12px rgba(230,126,34,.3); }
.btn-info    { background: linear-gradient(135deg, #2980b9, #3498db); color: white; box-shadow: 0 4px 12px rgba(41,128,185,.3); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); transform: none; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); width: 36px; height: 36px; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Alerts / Flash ---- */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .875rem; display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 20px;
  border-left: 4px solid transparent;
}
.alert-success { background: rgba(39,174,96,.1);  color: #1a7a40; border-color: #27ae60; }
.alert-danger  { background: rgba(192,57,43,.1);  color: #c0392b; border-color: #c0392b; }
.alert-warning { background: rgba(230,126,34,.1); color: #b85c0a; border-color: #e67e22; }
.alert-info    { background: rgba(41,128,185,.1); color: #2980b9; border-color: #2980b9; }
.alert-close { margin-left: auto; cursor: pointer; opacity: .6; } 
.alert-close:hover { opacity: 1; }

/* ---- Filter Bar ---- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: white; border-radius: var(--radius); padding: 18px 20px;
  margin-bottom: 20px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: .75rem; font-weight: 600; color: var(--text-secondary); }
.filter-control {
  padding: 8px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .85rem; font-family: inherit;
  color: var(--text-primary); background: white;
  min-width: 150px; outline: none; transition: var(--transition);
}
.filter-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--primary-glow); }

/* ---- Charts / Graph ---- */
.chart-container { position: relative; height: 260px; }

/* ---- Compliance Grid ---- */
.compliance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }
.compliance-card {
  border-radius: var(--radius); padding: 18px;
  border: 1.5px solid var(--border);
  transition: var(--transition);
  background: white;
}
.compliance-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.compliance-card.submitted { border-color: rgba(39,174,96,.4); background: rgba(39,174,96,.04); }
.compliance-card.not-submitted { border-color: rgba(192,57,43,.4); background: rgba(192,57,43,.04); }
.compliance-card.rejected { border-color: rgba(230,126,34,.4); background: rgba(230,126,34,.04); }
.cc-name { font-weight: 700; font-size: .88rem; color: var(--text-primary); margin-bottom: 4px; }
.cc-meta { font-size: .75rem; color: var(--text-secondary); margin-bottom: 10px; }
.cc-status { margin-top: 8px; }

/* ---- Progress Bar ---- */
.progress-bar { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.progress-fill.green { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.progress-fill.red   { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.progress-fill.orange{ background: linear-gradient(90deg, #e67e22, #f39c12); }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 20px; }
.page-btn {
  min-width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--border); background: white;
  color: var(--text-secondary); transition: var(--transition);
  text-decoration: none; padding: 0 10px;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.empty-state p  { font-size: .875rem; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 200; display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 540px;
  max-height: 90vh; display: flex; flex-direction: column;
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: .95rem; font-weight: 700; }
.modal-close { cursor: pointer; opacity: .5; font-size: 1.2rem; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ---- Notification Dropdown ---- */
.notif-dropdown {
  position: absolute; top: 50px; right: 0;
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 320px;
  border: 1px solid var(--border); z-index: 300;
  display: none;
  animation: fadeDown .2s ease;
}
.notif-dropdown.show { display: block; }
@keyframes fadeDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.notif-header { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .85rem; display: flex; justify-content: space-between; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border-light); display: flex; gap: 10px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(10,92,62,.03); }
.notif-dot-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; flex-shrink: 0; }
.notif-title { font-size: .8rem; font-weight: 600; color: var(--text-primary); }
.notif-msg   { font-size: .76rem; color: var(--text-secondary); margin-top: 2px; }
.notif-time  { font-size: .7rem; color: var(--text-muted); margin-top: 4px; }
.notif-footer { padding: 10px 16px; text-align: center; font-size: .8rem; border-top: 1px solid var(--border); }

/* ---- Util ---- */
.d-flex   { display: flex; }
.align-center { align-items: center; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.gap-16   { gap: 16px; }
.text-right { text-align: right; }
.text-center{ text-align: center; }
.text-muted { color: var(--text-muted) !important; font-size: .82rem; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.fw-bold { font-weight: 700; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.divider { height: 1px; background: var(--border-light); margin: 20px 0; }
.loading-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-overlay { display: block !important; }
  .sidebar-toggle { display: flex !important; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }
  .filter-bar { flex-direction: column; }
  .filter-control { min-width: 100%; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-box { padding: 32px 24px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---- Sidebar Overlay (mobile) ---- */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 99;
}
