/* =====================================================
   IMPERIO REAL — Sistema de Gestión de Condominios
   ADFEC S.A. DE C.V. / NEW COMMUNITY
   ===================================================== */

:root {
  /* Brand */
  --primary:      #1a2e4a;
  --primary-l:    #233d63;
  --accent:       #3b82f6;
  --accent-l:     #60a5fa;
  --accent-dark:  #2563eb;

  /* Semantic */
  --success:   #10b981;
  --warning:   #f59e0b;
  --danger:    #ef4444;
  --orange:    #f97316;
  --purple:    #8b5cf6;
  --teal:      #14b8a6;

  /* Grays */
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-300:  #cbd5e1;
  --gray-400:  #94a3b8;
  --gray-500:  #64748b;
  --gray-600:  #475569;
  --gray-700:  #334155;
  --gray-800:  #1e293b;
  --gray-900:  #0f172a;
  --white:     #ffffff;

  /* Shadows */
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.20);

  /* Layout */
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --navbar-h:  58px;
  --sidebar-w: 248px;
  --transition: .18s ease;

  /* Typography */
  --font-ui:   'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-data: 'Space Grotesk', 'DM Sans', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  font-family: var(--font-ui);
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-l); }

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--navbar-h);
  background: var(--primary);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem;
  box-shadow: var(--shadow);
}
.navbar-brand { display: flex; align-items: center; gap: .75rem; }
.menu-toggle {
  background: none; border: none; color: #fff; font-size: 1.4rem;
  cursor: pointer; padding: .25rem .5rem; border-radius: 4px;
  transition: background var(--transition);
}
.menu-toggle:hover { background: rgba(255,255,255,.1); }
.brand-name { color: #fff; font-size: 1.1rem; font-weight: 600; letter-spacing: .3px; }
.navbar-right { display: flex; align-items: center; gap: 1rem; }
.user-name { color: rgba(255,255,255,.8); font-size: .875rem; }
.btn-logout {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .9rem; transition: background var(--transition);
  text-decoration: none;
}
.btn-logout:hover { background: rgba(255,255,255,.3); color: #fff; }

/* ── LAYOUT ── */
.layout {
  display: flex;
  padding-top: var(--navbar-h);
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--navbar-h));
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  overflow-y: auto;
  display: flex; flex-direction: column;
  transition: transform var(--transition);
  transform: translateX(-100%);
  z-index: 1100;
}
.sidebar-logo {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.logo-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.logo-text strong { display: block; font-size: .9rem; color: var(--primary); }
.logo-text small { font-size: .75rem; color: var(--gray-600); }
.sidebar-nav { flex: 1; padding: .5rem 0; }
.nav-section {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--gray-600);
  padding: 1rem 1rem .3rem;
}
.nav-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem 1rem; color: var(--gray-800);
  font-size: .875rem; transition: all var(--transition);
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--gray-100); color: var(--primary); }
.nav-item.active {
  background: #e8f0fe; color: var(--accent);
  border-left-color: var(--accent); font-weight: 600;
}
.nav-icon { width: 18px; text-align: center; font-size: .9rem; }
.sidebar-footer {
  padding: 1rem; border-top: 1px solid var(--gray-200);
  font-size: .75rem; color: var(--gray-600); line-height: 1.6;
}

/* ── SIDEBAR OVERLAY (mobile) ── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 850;
}
.sidebar-overlay.show { display: block; }

@media (min-width: 769px) {
  .sidebar-overlay.show { display: none !important; }
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  margin-left: 0;
  min-width: 0;
  display: flex; flex-direction: column;
  transition: margin-left var(--transition);
}
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
}
.page-title { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.page-body { padding: 1.5rem; flex: 1; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--primary); }
.card-body { padding: 1.25rem; }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 1rem;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon.blue   { background: #dbeafe; }
.stat-icon.green  { background: #dcfce7; }
.stat-icon.yellow { background: #fef9c3; }
.stat-icon.red    { background: #fee2e2; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--primary); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--gray-600); margin-top: .2rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .9rem; border-radius: 6px; border: none;
  font-size: .875rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition); line-height: 1.4;
  text-decoration: none;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-l); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { opacity: .9; color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; color: #fff; }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-warning:hover { opacity: .9; color: #fff; }
.btn-secondary { background: var(--gray-200); color: var(--gray-800); }
.btn-secondary:hover { background: var(--gray-400); }
.btn-outline   { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }
.btn-sm { padding: .3rem .65rem; font-size: .8rem; }
.btn-lg { padding: .65rem 1.4rem; font-size: 1rem; }

/* ── TABLES ── */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .65rem .9rem; text-align: left; font-size: .875rem; }
thead th {
  background: var(--gray-100);
  color: var(--gray-600);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--gray-200); transition: background var(--transition); }
tbody tr:hover { background: var(--gray-100); }
tbody tr:last-child { border-bottom: none; }

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success  { background: #dcfce7; color: #166534; }
.badge-warning  { background: #fef9c3; color: #854d0e; }
.badge-danger   { background: #fee2e2; color: #991b1b; }
.badge-orange   { background: #fed7aa; color: #9a3412; }
.badge-gray     { background: var(--gray-200); color: var(--gray-600); }
.badge-primary  { background: #dbeafe; color: #1e40af; }

/* ── FORMS ── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block; font-size: .85rem; font-weight: 600;
  color: var(--gray-800); margin-bottom: .35rem;
}
.form-control {
  width: 100%; padding: .5rem .75rem;
  border: 1.5px solid var(--gray-400);
  border-radius: 6px; font-size: .9rem;
  transition: border-color var(--transition);
  background: var(--white); color: var(--gray-800);
}
.form-control:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(41,128,185,.15);
}
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { appearance: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── ALERTS ── */
.alert {
  padding: .85rem 1rem; border-radius: var(--radius);
  font-size: .875rem; margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: .6rem;
}
.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid var(--success); }
.alert-danger  { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning { background: #fef9c3; color: #854d0e; border-left: 4px solid var(--warning); }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--accent); }

/* ── MODAL ── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 2000;
  align-items: center; justify-content: center;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--white); border-radius: var(--radius-lg);
  width: 90%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideUp .2s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-weight: 700; font-size: 1rem; color: var(--primary); }
.modal-close {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  color: var(--gray-600); line-height: 1; padding: .2rem .4rem;
  border-radius: 4px; transition: background var(--transition);
}
.modal-close:hover { background: var(--gray-200); }
.modal-body { padding: 1.25rem; }
.modal-footer {
  padding: 1rem 1.25rem; border-top: 1px solid var(--gray-200);
  display: flex; justify-content: flex-end; gap: .6rem;
}

/* ── TIMELINE (Seguimiento) ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute;
  left: .6rem; top: 0; bottom: 0;
  width: 2px; background: var(--gray-200);
}
.timeline-item { position: relative; margin-bottom: 1.25rem; }
.timeline-dot {
  position: absolute; left: -1.6rem; top: .4rem;
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--gray-400);
}
.timeline-dot.green  { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-dot.blue   { background: var(--accent);  box-shadow: 0 0 0 2px var(--accent); }
.timeline-dot.orange { background: var(--orange);  box-shadow: 0 0 0 2px var(--orange); }
.timeline-dot.gray   { background: var(--gray-400); }
.timeline-card {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius); padding: .9rem 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.timeline-meta {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .3rem; flex-wrap: wrap;
}
.timeline-user { color: var(--accent); font-weight: 600; font-size: .875rem; }
.timeline-date { color: var(--gray-600); font-size: .8rem; margin-left: auto; }
.timeline-title { font-weight: 700; font-size: .9rem; color: var(--gray-800); }
.timeline-body { color: var(--gray-600); font-size: .85rem; margin-top: .2rem; }

/* ── GANTT ── */
.gantt-container { overflow-x: auto; }
.gantt-header { display: flex; font-size: .75rem; color: var(--gray-600); font-weight: 600; border-bottom: 1px solid var(--gray-200); margin-bottom: .5rem; }
.gantt-row { display: flex; align-items: center; min-height: 36px; margin-bottom: .4rem; }
.gantt-label { width: 220px; flex-shrink: 0; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: .75rem; }
.gantt-bar-wrap { flex: 1; position: relative; height: 28px; background: var(--gray-100); border-radius: 4px; overflow: hidden; }
.gantt-bar {
  position: absolute; top: 4px; height: 20px; border-radius: 4px;
  display: flex; align-items: center; padding: 0 .5rem;
  font-size: .72rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; min-width: 6px;
  transition: opacity var(--transition);
}
.gantt-bar.green  { background: var(--success); }
.gantt-bar.yellow { background: var(--warning); }
.gantt-bar.orange { background: var(--orange); }
.gantt-bar.red    { background: var(--danger); }
.gantt-bar.gray   { background: var(--gray-400); }
.gantt-today {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--danger); opacity: .7;
}

/* ── SEMAFORO DOTS ── */
.semaforo { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.sema-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  margin-top: -3px;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.15);
}
.sema-dot.green  { background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.5); }
.sema-dot.yellow { background: var(--warning); box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }
.sema-dot.red    { background: var(--danger);  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.sema-dot.gray   { background: var(--gray-400); }
.sema-dot.orange { background: var(--orange);  box-shadow: 0 0 8px rgba(249, 115, 22, 0.5); }

/* ── PAYMENT GRID ── */
.payment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: .4rem; }
.pay-cell {
  height: 44px; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all var(--transition);
}
.pay-cell.paid   { background: #dcfce7; color: #166534; border-color: #86efac; }
.pay-cell.unpaid { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.pay-cell.future { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-200); }
.pay-cell.partial { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.pay-cell:hover { transform: scale(1.05); }

/* ── PROGRESS BAR ── */
.progress { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width .3s; }
.progress-bar.green  { background: var(--success); }
.progress-bar.yellow { background: var(--warning); }
.progress-bar.red    { background: var(--danger); }

/* ── TABS ── */
.tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; gap: 0; overflow-x: auto; }
.tab {
  padding: .7rem 1.2rem; font-size: .875rem; font-weight: 500;
  color: var(--gray-600); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all var(--transition); background: none; border-top: none; border-left: none; border-right: none;
}
.tab:hover { color: var(--accent); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── SEARCH / FILTER BAR ── */
.filter-bar {
  display: flex; gap: .75rem; align-items: center;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.filter-bar .form-control { flex: 1; min-width: 180px; max-width: 300px; }

/* ── CONDOMINIOS GRID ── */
.condo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.condo-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.condo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.condo-card-header {
  padding: 1rem 1.1rem; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.condo-card-name { font-weight: 700; font-size: .95rem; }
.condo-card-sub { font-size: .78rem; opacity: .8; }
.condo-card-body { padding: 1rem 1.1rem; }
.condo-stat { display: flex; justify-content: space-between; margin-bottom: .4rem; font-size: .85rem; }
.condo-stat-label { color: var(--gray-600); }
.condo-stat-value { font-weight: 600; }
.condo-card-footer {
  padding: .75rem 1.1rem; border-top: 1px solid var(--gray-200);
  display: flex; gap: .5rem;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 3rem 1rem; color: var(--gray-600);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }
.empty-state-text { font-size: 1rem; margin-bottom: .5rem; }
.empty-state-sub  { font-size: .875rem; }

/* ── LOGIN PAGE ── */
.login-page {
  min-height: 100vh; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 2.5rem; width: 90%; max-width: 400px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  text-align: center; margin-bottom: 2rem;
}
.login-logo-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; margin: 0 auto .75rem;
}
.login-title { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.login-sub { font-size: .85rem; color: var(--gray-600); }

/* ── DETAIL PAGE ── */
.detail-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.meta-item { display: flex; flex-direction: column; }
.meta-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-600); font-weight: 600; }
.meta-value { font-size: .95rem; font-weight: 500; color: var(--gray-800); }

/* ── CHECKBOX LIST (checklist asamblea) ── */
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem; }
.check-item { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.check-icon { width: 20px; height: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: .75rem; flex-shrink: 0; }
.check-icon.yes { background: #dcfce7; color: #166534; }
.check-icon.no  { background: #fee2e2; color: #991b1b; }
.check-icon.na  { background: var(--gray-200); color: var(--gray-600); }

/* ── LOADER ── */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--gray-200); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 3000; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  background: var(--gray-800); color: #fff; padding: .75rem 1.1rem;
  border-radius: var(--radius); font-size: .875rem; max-width: 320px;
  animation: toastIn .2s ease; box-shadow: var(--shadow-lg);
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── PAGINATION ── */
.pagination { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.page-btn {
  padding: .35rem .65rem; border-radius: 5px; font-size: .85rem;
  border: 1px solid var(--gray-200); background: var(--white); cursor: pointer;
  transition: all var(--transition); color: var(--gray-800);
}
.page-btn:hover { background: var(--gray-100); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar.open { transform: translateX(0); }
  .form-row { grid-template-columns: 1fr; }
  .form-row.cols-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .condo-grid { grid-template-columns: 1fr; }
  .detail-meta { gap: 1rem; }
  .page-body { padding: 1rem; }
  .payment-grid { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); }
  .gantt-label { width: 140px; }
  .card-header { flex-wrap: wrap; gap: .5rem; }
  .card-title { word-break: break-word; }
  .timeline-meta { flex-wrap: wrap; gap: .3rem; }
  .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

@media (min-width: 769px) {
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .main-content { margin-left: var(--sidebar-w); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .form-control { max-width: none; }
}
