/* ============================================================
   HouseOS Design System
   Mobile-first, dark/light mode, accessible
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; line-height: 1.6; transition: background 0.2s, color 0.2s; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ── CSS Variables (Light) ────────────────────────────────── */
:root {
  --primary:        #6366f1;
  --primary-hover:  #4f46e5;
  --primary-light:  #eef2ff;
  --primary-text:   #ffffff;
  --border-color:   #e5e7eb;
  --bg-secondary:   #f9fafb;

  --success:        #10b981;
  --success-light:  #d1fae5;
  --warning:        #f59e0b;
  --warning-light:  #fef3c7;
  --danger:         #ef4444;
  --danger-light:   #fee2e2;
  --info:           #3b82f6;
  --info-light:     #dbeafe;

  --bg-base:        #f5f6fb;
  --bg-surface:     #ffffff;
  --bg-elevated:    #ffffff;
  --bg-hover:       #f9fafb;
  --bg-selected:    #eef2ff;

  --border:         #e5e7eb;
  --border-focus:   #6366f1;

  --text-primary:   #111827;
  --text-secondary: #6b7280;
  --text-muted:     #9ca3af;
  --text-inverse:   #ffffff;

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 10px 15px rgba(0,0,0,0.07), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl:  0 20px 25px rgba(0,0,0,0.08), 0 10px 10px rgba(0,0,0,0.04);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  --sidebar-width: 256px;
  --topbar-height: 60px;
  --bottom-nav-h:  64px;

  --transition: 0.18s ease;
}

/* ── Dark Mode ────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg-base:        #0d0e18;
  --bg-surface:     #161728;
  --bg-elevated:    #1e1f32;
  --bg-hover:       #1e2035;
  --bg-selected:    #2a2b4a;

  --border:         #2a2b3d;
  --border-color:   #2a2b3d;
  --bg-secondary:   #1a1b2e;
  --border-focus:   #818cf8;

  --text-primary:   #f0f1fb;
  --text-secondary: #a0a3b8;
  --text-muted:     #6b7280;

  --shadow-xs:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 6px rgba(0,0,0,0.4);
  --shadow-lg:  0 10px 15px rgba(0,0,0,0.5);
  --shadow-xl:  0 20px 25px rgba(0,0,0,0.6);

  --primary-light: #1e2050;
}

body { background: var(--bg-base); color: var(--text-primary); }

/* ── Typography ───────────────────────────────────────────── */
h1 { font-size: 1.5rem;  font-weight: 700; line-height: 1.3; }
h2 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; }
h3 { font-size: 1.1rem;  font-weight: 600; line-height: 1.4; }
h4 { font-size: 0.95rem; font-weight: 600; line-height: 1.4; }
p  { color: var(--text-secondary); }
small { font-size: 0.8rem; }

/* ── Layout ───────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.logo-icon--lg { width: 44px; height: 44px; font-size: 1.3rem; border-radius: var(--radius-lg); }
.logo-text { color: var(--text-primary); }
.logo-text--lg { font-size: 1.4rem; }

.sidebar-close { display: none; color: var(--text-secondary); padding: 4px; border-radius: var(--radius-sm); }

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-item:hover  { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item--danger { color: var(--danger); }
.nav-item--danger:hover { background: var(--danger-light); color: var(--danger); }
.nav-item svg { flex-shrink: 0; opacity: 0.85; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 0.75rem 0.625rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem;
  margin-top: 0.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-name { font-size: 0.85rem; font-weight: 600; truncate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
  backdrop-filter: blur(2px);
}

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
}

.topbar-left { display: flex; align-items: center; gap: 0.75rem; }
.topbar-right { display: flex; align-items: center; gap: 0.5rem; }

.menu-btn {
  display: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.menu-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.page-title { font-size: 1.1rem; font-weight: 600; }

.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Theme toggle icons */
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="dark"]  .icon-moon { display: none; }

/* Notifications */
.notif-wrapper, .user-menu-wrapper { position: relative; }
.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.user-avatar-btn { display: flex; align-items: center; border-radius: var(--radius-full); }

/* ── Dropdowns ────────────────────────────────────────────── */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 300;
  min-width: 220px;
  display: none;
  animation: dropIn 0.15s ease;
}
.dropdown.open { display: block; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.85rem;
}

.notif-dropdown { min-width: 320px; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item--unread { background: var(--primary-light); }
.notif-item:last-child { border-bottom: none; }
.notif-item-title { font-size: 0.875rem; font-weight: 500; margin-bottom: 2px; }
.notif-item-msg   { font-size: 0.8rem; color: var(--text-secondary); }
.notif-item-time  { font-size: 0.75rem; color: var(--text-muted); margin-top: 3px; }
.notif-empty { padding: 2rem 1rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }

.dropdown-user-info { padding: 0.75rem 1rem; }
.dropdown-user-info strong { display: block; font-size: 0.9rem; }
.dropdown-user-info small  { color: var(--text-muted); font-size: 0.8rem; }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.dropdown-item {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-item--danger:hover { background: var(--danger-light); color: var(--danger); }

/* ── Page Content ─────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + var(--bottom-nav-h));
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 0.95rem; font-weight: 600; }
.card-body  { padding: 1.25rem; }
.card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-hover);
}

/* Stat card */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-card-header { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon--primary  { background: var(--primary-light); color: var(--primary); }
.stat-icon--success  { background: var(--success-light);  color: var(--success); }
.stat-icon--warning  { background: var(--warning-light);  color: var(--warning); }
.stat-icon--danger   { background: var(--danger-light);   color: var(--danger); }
.stat-icon--info     { background: var(--info-light);     color: var(--info); }

.stat-value { font-size: 1.875rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-sub   { font-size: 0.8rem; color: var(--text-secondary); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; pointer-events: none; }

.btn--primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: 0 0 0 3px rgba(99,102,241,0.2); }

.btn--success   { background: var(--success); color: #fff; }
.btn--success:hover { background: #059669; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }

.btn--danger    { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #dc2626; box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }

.btn--ghost     { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg-hover); color: var(--text-primary); }

.btn--outline   { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn--outline:hover { background: var(--primary-light); }

.btn--sm  { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn--xs  { padding: 0.25rem 0.625rem; font-size: 0.75rem; }
.btn--lg  { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn--full { width: 100%; }
.btn--icon { padding: 0.625rem; }

.btn-link { background: none; border: none; color: var(--primary); font-size: inherit; font-weight: 500; cursor: pointer; padding: 0; }
.btn-link:hover { text-decoration: underline; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group  { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label  { font-size: 0.875rem; font-weight: 500; color: var(--text-primary); }
.form-label--required::after { content: ' *'; color: var(--danger); }

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--bg-hover); opacity: 0.7; cursor: not-allowed; }
.form-control--error { border-color: var(--danger); }
.form-control--error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint  { font-size: 0.78rem; color: var(--text-muted); }
.form-error { font-size: 0.78rem; color: var(--danger); font-weight: 500; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--primary);
}

.form-section { margin-bottom: 1.5rem; }
.form-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge--ok,      .badge--free     { background: var(--success-light); color: var(--success); }
.badge--overdue, .badge--danger   { background: var(--danger-light);  color: var(--danger); }
.badge--due-soon,.badge--warning  { background: var(--warning-light); color: #92400e; }
.badge--primary, .badge--premium  { background: var(--primary-light); color: var(--primary); }
.badge--info,    .badge--family   { background: var(--info-light);    color: var(--info); }
.badge--muted                     { background: var(--bg-hover);      color: var(--text-muted); }

/* ── Table / List ─────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); background: var(--bg-hover); }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

.item-list { list-style: none; }
.item-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.item-list-row:hover { background: var(--bg-hover); }
.item-list-row:last-child { border-bottom: none; }

/* ── Dashboard Grid ───────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.25rem; }
.page-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* ── Flash / Toast ────────────────────────────────────────── */
.flash-container { padding: 0 1.5rem; padding-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}
.flash--success { background: var(--success-light); color: #065f46; }
.flash--error   { background: var(--danger-light);  color: #991b1b; }
.flash--warning { background: var(--warning-light); color: #92400e; }
.flash--info    { background: var(--info-light);    color: #1e40af; }
.flash-close { margin-left: 1rem; font-size: 1.1rem; line-height: 1; opacity: 0.6; cursor: pointer; }
.flash-close:hover { opacity: 1; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 1rem);
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  max-width: 320px;
  pointer-events: all;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Avatar ───────────────────────────────────────────────── */
.avatar {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  flex-shrink: 0;
}
.avatar--sm { width: 30px; height: 30px; font-size: 0.75rem; }
.avatar--lg { width: 52px; height: 52px; font-size: 1.2rem; }

/* ── Maintenance Status ───────────────────────────────────── */
.status-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.status-dot--ok       { background: var(--success); }
.status-dot--due-soon { background: var(--warning); }
.status-dot--overdue  { background: var(--danger); }

/* ── Priority Indicator ───────────────────────────────────── */
.priority-bar {
  width: 3px;
  border-radius: var(--radius-full);
  align-self: stretch;
  flex-shrink: 0;
}
.priority-bar--low    { background: var(--success); }
.priority-bar--medium { background: var(--info); }
.priority-bar--high   { background: var(--warning); }
.priority-bar--urgent { background: var(--danger); }

/* ── Category Icon ────────────────────────────────────────── */
.cat-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3   { color: var(--text-primary); margin-bottom: 0.5rem; }
.empty-state p    { font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ── Progress Bar ─────────────────────────────────────────── */
.progress { height: 6px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--primary);
  transition: width 0.5s ease;
}
.progress-bar--success { background: var(--success); }
.progress-bar--warning { background: var(--warning); }
.progress-bar--danger  { background: var(--danger); }

/* ── Task Checkbox ────────────────────────────────────────── */
.task-check {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.task-check:hover { border-color: var(--primary); background: var(--primary-light); }
.task-check--done { border-color: var(--success); background: var(--success); }
.task-check--done::after { content: '✓'; color: #fff; font-size: 0.65rem; font-weight: 700; }

.task-title--done { text-decoration: line-through; color: var(--text-muted); }

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.page-header-left {}
.page-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Filter Bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.filter-chip:hover  { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Bottom Nav (mobile) ──────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  z-index: 150;
  padding: 0 0.25rem;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.bottom-nav-item:hover  { color: var(--text-secondary); }
.bottom-nav-item.active { color: var(--primary); }

/* ── Modals ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}
.modal-overlay.open .modal { transform: translateY(0); }

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
  .modal {
    border-radius: var(--radius-xl);
    max-width: 520px;
    transform: translateY(16px) scale(0.98);
    padding-bottom: 1.5rem;
  }
  .modal-overlay.open .modal { transform: translateY(0) scale(1); }
}

.modal-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 0 auto 1.25rem;
}
.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.modal-header .modal-title { margin-bottom: 0; }
.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { display: flex; flex-direction: column; gap: 1rem; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ── Landing Page ─────────────────────────────────────────── */
.landing-body { background: var(--bg-base); }

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.landing-nav-links { display: flex; align-items: center; gap: 1.5rem; font-size: 0.9rem; }
.landing-nav-links a:not(.btn) { color: var(--text-secondary); font-weight: 500; }
.landing-nav-links a:not(.btn):hover { color: var(--text-primary); }

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; margin-bottom: 1.25rem; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.05rem; margin-bottom: 2rem; color: var(--text-secondary); }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.hero-visual {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  overflow: hidden;
}

.features { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.features-header { text-align: center; margin-bottom: 3rem; }
.features-header h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.feature-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-base);
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card-icon { font-size: 2rem; margin-bottom: 0.875rem; }
.feature-card h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.feature-card p { font-size: 0.875rem; }

.cta-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
}
.cta-section h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.cta-section p  { font-size: 1rem; margin-bottom: 2rem; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: 960px; margin: 0 auto; }
.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  transition: all var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pricing-card--featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15), var(--shadow-lg);
}
.pricing-popular {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.875rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pricing-name  { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.pricing-price { font-size: 2.5rem; font-weight: 800; line-height: 1; margin: 1rem 0 0.25rem; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.pricing-period { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.pricing-features { list-style: none; margin: 1.5rem 0; display: flex; flex-direction: column; gap: 0.625rem; }
.pricing-features li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.pricing-features li::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── Auth Layout ──────────────────────────────────────────── */
.auth-body { background: var(--bg-base); }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

.auth-brand {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 50%, #818cf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-brand-inner { max-width: 400px; color: #fff; }
.auth-brand .sidebar-logo { color: #fff; margin-bottom: 2.5rem; }
.auth-brand .logo-icon { background: rgba(255,255,255,0.2); }
.auth-tagline { font-size: 2.5rem; font-weight: 800; line-height: 1.2; color: #fff; margin-bottom: 0.875rem; }
.auth-sub { font-size: 1rem; opacity: 0.85; color: #fff; margin-bottom: 2rem; }
.auth-features { display: flex; flex-direction: column; gap: 0.625rem; }
.auth-feature { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; opacity: 0.9; color: #fff; }
.auth-feature-icon { font-size: 1.1rem; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-base);
}
.auth-panel-inner { width: 100%; max-width: 400px; }

.auth-logo--mobile { display: none; margin-bottom: 2rem; }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.375rem; }
.auth-subtitle { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 2rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.875rem; color: var(--text-secondary); }
.auth-footer a { color: var(--primary); font-weight: 500; }

.auth-theme-toggle { position: fixed; top: 1rem; right: 1rem; z-index: 100; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); }

/* ── Footer ───────────────────────────────────────────────── */
.landing-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-grid a { display: block; font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.375rem; }
.footer-grid a:hover { color: var(--primary); }
.footer-grid h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.75rem; }
.footer-desc { font-size: 0.875rem; margin-top: 0.5rem; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); }

/* ── Impersonation banner ─────────────────────────────────── */
.impersonation-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1100;
  background: #f59e0b;
  color: #1c1917;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.impersonation-bar + * { padding-top: 32px; }
.impersonation-stop {
  color: #1c1917;
  font-weight: 700;
  text-decoration: none;
  padding: 0.2rem 0.75rem;
  border: 1.5px solid rgba(0,0,0,0.25);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  white-space: nowrap;
  transition: background var(--transition);
}
.impersonation-stop:hover { background: rgba(0,0,0,0.1); }

/* ── Announcement banner ──────────────────────────────────── */
.announcement-bar {
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ── Settings ─────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.settings-section { margin-bottom: 1.5rem; }

/* ── Toggle switch ────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.toggle-row > span:first-child { flex: 1; }
.toggle-checkbox { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  transition: background 0.2s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-checkbox:checked + .toggle-slider { background: var(--primary); }
.toggle-checkbox:checked + .toggle-slider::after { transform: translateX(20px); }

/* ── Utility ──────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-muted   { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-4  { padding: 1rem; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Responsive ───────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .stats-grid       { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid   { grid-template-columns: 1fr; }
  .features-grid    { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid     { grid-template-columns: 1fr; max-width: 420px; }
  .settings-grid    { grid-template-columns: 1fr; }
  .form-row         { grid-template-columns: 1fr; }
  .form-row--3      { grid-template-columns: 1fr; }
  .footer-grid      { grid-template-columns: 1fr 1fr; }
  .hero             { grid-template-columns: 1fr; }
  .hero-visual      { display: none; }
  .auth-brand       { display: none; }
  .auth-layout      { grid-template-columns: 1fr; }
  .auth-logo--mobile{ display: flex; }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --topbar-height: 54px; }

  /* Show hamburger, hide sidebar by default */
  .menu-btn     { display: flex; }
  .sidebar      { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .sidebar-overlay.open { display: block; }

  /* Show bottom nav */
  .bottom-nav { display: flex; }

  .main-content { margin-left: 0; }

  .page-content {
    padding: 1rem;
    padding-bottom: calc(1rem + var(--bottom-nav-h) + env(safe-area-inset-bottom));
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  .landing-nav-links .btn:first-child { display: none; }

  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid  { grid-template-columns: 1fr; padding: 0 1rem; max-width: none; }
  .footer-grid   { grid-template-columns: 1fr; }
  .hero          { padding: 2.5rem 1rem; }
  .hero h1       { font-size: 1.875rem; }

  .data-table { font-size: 0.85rem; }
  .data-table th, .data-table td { padding: 0.625rem 0.75rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .topbar { padding: 0 1rem; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { flex: 1; justify-content: center; }
}

/* ── Calendar ─────────────────────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-month-label {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}
.cal-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.cal-legend-item { display: flex; align-items: center; gap: 0.35rem; }
.cal-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--border-color, #e5e7eb);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cal-dow {
  background: var(--bg-secondary);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.25rem;
}
.cal-cell {
  background: var(--bg-surface);
  min-height: 100px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-cell--empty { background: var(--bg-secondary); }
.cal-cell--past  { background: var(--bg-secondary); }
.cal-cell--past .cal-day-num { color: var(--text-muted); }
.cal-cell--today { background: var(--primary-light); }
.cal-cell--today .cal-day-num {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}

.cal-day-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
}
.cal-event {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0,0,0,.06);
  color: var(--text-primary, #111);
  border-left: 2px solid var(--ev-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  line-height: 1.6;
}
.cal-event:hover { opacity: 0.85; }
.cal-overflow {
  font-size: 0.68rem;
  color: var(--text-muted);
  padding-left: 4px;
}

@media (max-width: 640px) {
  .cal-cell    { min-height: 60px; padding: 0.25rem; }
  .cal-dow     { font-size: 0.65rem; padding: 0.35rem 0.1rem; }
  .cal-event   { display: none; }
  .cal-has-events .cal-day-num::after {
    content: '';
    display: block;
    width: 4px; height: 4px;
    background: var(--primary);
    border-radius: 50%;
    margin: 1px auto 0;
  }
}

/* ── Mobile audit fixes ───────────────────────────────────── */

/* Tables: horizontal scroll on small screens */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}
/* Constrain .data-table width so its card scrolls, not the page */
.data-table { min-width: 500px; }

@media (max-width: 768px) {
  /* Tables scroll horizontally on mobile */
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: unset; width: 100%; }
  .table-responsive { overflow-x: auto; }

  /* Ensure all action button groups in card footers wrap */
  .card-footer { flex-wrap: wrap; }

  /* Minimum touch target size for interactive elements */
  .btn          { min-height: 40px; }
  .icon-btn     { min-width: 40px; min-height: 40px; }
  .nav-item     { min-height: 44px; }
  .bottom-nav-item { min-height: 52px; }

  /* Form controls: full tap height */
  .form-control { min-height: 44px; }
  select.form-control { min-height: 44px; }

  /* Prevent topbar from cramping on narrow screens */
  .topbar-right { gap: 0.25rem; }

  /* Item list rows: allow wrapping for long content */
  .item-list-row { flex-wrap: wrap; }

  /* Stat cards: ensure values don't overflow */
  .stat-value { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  /* Full-width buttons in card footers on very small screens */
  .card-footer .btn--primary { width: 100%; }

  /* Topbar title can be clipped */
  .topbar-title { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ── Form hints ───────────────────────────────────────── */
.form-hint {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .3rem;
  line-height: 1.4;
}

/* ── Contacts ─────────────────────────────────────────── */
.contact-card { transition: box-shadow 0.15s; }
.contact-card:hover { box-shadow: var(--shadow-md); }
.contact-icon { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}
.contact-link:hover { text-decoration: underline; }

/* ── Home Value ────────────────────────────────────────── */
.text-success { color: #22c55e; }
.text-danger  { color: #ef4444; }

/* ── Grid utilities ────────────────────────────────────── */
.grid    { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

/* ── Button secondary (alias for ghost) ─────────────────── */
.btn--secondary { background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Alert ──────────────────────────────────────────────── */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius-md); font-size: 0.875rem; }
.alert--error   { background: var(--danger-light);  color: #991b1b; border: 1px solid #fca5a5; }
.alert--success { background: var(--success-light); color: #065f46; border: 1px solid #6ee7b7; }
.alert--warning { background: var(--warning-light); color: #92400e; border: 1px solid #fcd34d; }
.alert--info    { background: var(--info-light);    color: #1e40af; border: 1px solid #93c5fd; }
.alert p { color: inherit; margin: 0; }

/* ── Page subtitle ──────────────────────────────────────── */
.page-subtitle { font-size: 0.9rem; font-weight: 400; color: var(--text-secondary); margin: 0; }

/* ── Mobile filter bar ──────────────────────────────────── */
@media (max-width: 640px) {
  .filter-bar .form-control { max-width: 100% !important; width: 100%; }
  .filter-bar > div { width: 100%; }
}
