/* ============================================================
   FacilityOS — Design System & Global Styles
   assets/css/main.css
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties ───────────────────────────────── */
:root {
  /* Brand Palette */
  --primary:        #1B4F8A;
  --primary-light:  #2563EB;
  --primary-dark:   #0F2D4E;
  --primary-glow:   rgba(37, 99, 235, 0.12);

  --accent:         #0EA5E9;
  --accent-light:   #E0F2FE;

  --success:        #059669;
  --success-light:  #D1FAE5;
  --warning:        #D97706;
  --warning-light:  #FEF3C7;
  --danger:         #DC2626;
  --danger-light:   #FEE2E2;
  --info:           #0891B2;
  --info-light:     #CFFAFE;

  /* Neutrals */
  --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;

  /* Layout */
  --sidebar-w:      260px;
  --topbar-h:       64px;
  --sidebar-bg:     #0F2D4E;
  --topbar-bg:      #ffffff;
  --body-bg:        #F1F5F9;
  --card-bg:        #ffffff;

  /* Typography */
  --font-main:      'Plus Jakarta Sans', sans-serif;
  --font-mono:      'DM Mono', monospace;

  /* Shadows */
  --shadow-xs:      0 1px 2px rgba(15,23,42,0.06);
  --shadow-sm:      0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:      0 4px 6px -1px rgba(15,23,42,0.07), 0 2px 4px -1px rgba(15,23,42,0.04);
  --shadow-lg:      0 10px 15px -3px rgba(15,23,42,0.08), 0 4px 6px -2px rgba(15,23,42,0.04);
  --shadow-xl:      0 20px 25px -5px rgba(15,23,42,0.10), 0 10px 10px -5px rgba(15,23,42,0.04);

  /* Radius */
  --r-sm:    6px;
  --r-md:    10px;
  --r-lg:    14px;
  --r-xl:    20px;
  --r-full:  9999px;

  /* Transitions */
  --t-fast:  150ms ease;
  --t-base:  250ms ease;
  --t-slow:  400ms ease;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-main);
  background: var(--body-bg);
  color: var(--gray-800);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--primary); }

img { max-width: 100%; display: block; }

/* ── App Layout ──────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--t-base);
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.06), transparent);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary-light) 100%);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
  flex-shrink: 0;
}

.brand-text { flex: 1; min-width: 0; }
.brand-name {
  font-size: 15px; font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.brand-tagline {
  font-size: 10px; color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Nav Sections */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 12px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  transition: all var(--t-fast);
  position: relative;
  text-decoration: none;
  margin: 0 8px;
  border-radius: var(--r-md);
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.nav-item.active {
  background: rgba(37,99,235,0.25);
  color: #fff;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  left: -8px;
}

.nav-item .nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-item.active .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px;
  flex-shrink: 0;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast);
}
.user-card:hover { background: rgba(255,255,255,0.07); }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name {
  font-size: 13px; font-weight: 600;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role {
  font-size: 11px; color: rgba(255,255,255,0.4);
  text-transform: capitalize;
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 90;
  box-shadow: var(--shadow-xs);
}

.topbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--gray-600);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}
.topbar-toggle:hover { background: var(--gray-100); color: var(--gray-800); }

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  position: relative;
}
.topbar-btn:hover { background: var(--gray-100); color: var(--gray-800); }

.notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid #fff;
}

.topbar-divider {
  width: 1px; height: 24px;
  background: var(--gray-200);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
}
.topbar-user:hover { background: var(--gray-100); }

.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  color: #fff;
}

.topbar-user-info { display: none; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 6px;
  display: none;
  z-index: 200;
}
.dropdown.open .dropdown-menu { display: block; animation: fadeDown 0.15s ease; }

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

.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  color: var(--gray-700);
  font-size: 13px; font-weight: 500;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast);
  text-decoration: none;
  border: none; background: none; width: 100%; text-align: left;
}
.dropdown-item:hover { background: var(--gray-100); color: var(--gray-900); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-light); }
.dropdown-divider { height: 1px; background: var(--gray-200); margin: 4px 0; }

/* ── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  flex: 1;
  padding: 28px;
  min-height: calc(100vh - var(--topbar-h));
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.page-header p {
  color: var(--gray-500);
  font-size: 13.5px;
  margin-top: 4px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--gray-500); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb-sep { font-size: 10px; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--r-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 14px; font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.01em;
}
.card-subtitle {
  font-size: 12px; color: var(--gray-400); font-weight: 400;
  margin-top: 1px;
}
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* ── STAT CARDS ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--r-lg);
  border: 1px solid var(--gray-200);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--t-base), transform var(--t-base);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.05;
  transform: translate(20px, -20px);
}

.stat-card.blue::after   { background: var(--primary-light); }
.stat-card.green::after  { background: var(--success); }
.stat-card.amber::after  { background: var(--warning); }
.stat-card.red::after    { background: var(--danger); }
.stat-card.cyan::after   { background: var(--accent); }
.stat-card.violet::after { background: #7C3AED; }
.stat-card.teal::after   { background: var(--info); }

.stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  font-size: 18px;
}
.stat-icon.blue   { background: #DBEAFE; color: var(--primary-light); }
.stat-icon.green  { background: var(--success-light); color: var(--success); }
.stat-icon.amber  { background: var(--warning-light); color: var(--warning); }
.stat-icon.red    { background: var(--danger-light); color: var(--danger); }
.stat-icon.cyan   { background: var(--accent-light); color: var(--info); }
.stat-icon.violet { background: #EDE9FE; color: #7C3AED; }
.stat-icon.teal   { background: var(--info-light); color: var(--info); }

.stat-delta {
  font-size: 11px; font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--r-full);
  display: flex; align-items: center; gap: 3px;
}
.stat-delta.up   { background: var(--success-light); color: var(--success); }
.stat-delta.down { background: var(--danger-light); color: var(--danger); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-label {
  font-size: 12.5px;
  color: var(--gray-500);
  font-weight: 500;
}

/* ── GRID LAYOUTS ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-main);
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-light);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37,99,235,0.25);
}
.btn-primary:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-200); color: var(--gray-900); }

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover { background: #047857; color: #fff; }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #B91C1C; color: #fff; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover { border-color: var(--primary-light); color: var(--primary-light); background: var(--primary-glow); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ── FORMS ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-family: var(--font-main);
  color: var(--gray-800);
  background: #fff;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
  appearance: none;
}
.form-control:hover { border-color: var(--gray-300); }
.form-control:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-control::placeholder { color: var(--gray-400); }
.form-control:disabled { background: var(--gray-100); cursor: not-allowed; color: var(--gray-400); }

.form-hint { font-size: 11.5px; color: var(--gray-400); margin-top: 4px; }
.form-error { font-size: 11.5px; color: var(--danger); margin-top: 4px; font-weight: 500; }

.input-group {
  display: flex;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input-group:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.input-group .form-control { border: none; box-shadow: none; border-radius: 0; }
.input-group-text {
  padding: 9px 13px;
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 13px;
  display: flex; align-items: center;
  border-right: 1px solid var(--gray-200);
  flex-shrink: 0;
}

/* ── TABLES ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--r-lg);
}

table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--gray-50);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
  text-align: left;
}
tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13.5px;
  color: var(--gray-700);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-open      { background: var(--info-light);    color: var(--info); }
.badge-assigned  { background: #FEF3C7;              color: #92400E; }
.badge-progress  { background: var(--primary-glow);  color: var(--primary); }
.badge-resolved  { background: var(--success-light); color: var(--success); }
.badge-closed    { background: var(--gray-200);      color: var(--gray-600); }
.badge-cancelled { background: var(--danger-light);  color: var(--danger); }
.badge-default   { background: var(--gray-100);      color: var(--gray-600); }

/* Priority */
.priority-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 11px; font-weight: 700;
}
.priority-tag::before {
  content: '●';
  font-size: 8px;
}
.priority-low    { background: var(--success-light); color: var(--success); }
.priority-medium { background: var(--accent-light);  color: var(--info); }
.priority-high   { background: var(--warning-light); color: var(--warning); }
.priority-urgent { background: var(--danger-light);  color: var(--danger); }

/* ── ALERTS / FLASH ──────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  font-size: 13.5px;
  margin-bottom: 20px;
}
.alert-success { background: var(--success-light); color: #065F46; border-left: 3px solid var(--success); }
.alert-error   { background: var(--danger-light);  color: #991B1B; border-left: 3px solid var(--danger); }
.alert-warning { background: var(--warning-light); color: #92400E; border-left: 3px solid var(--warning); }
.alert-info    { background: var(--info-light);    color: #0E7490; border-left: 3px solid var(--info); }

/* ── CHART PLACEHOLDERS ──────────────────────────────────── */
.chart-placeholder {
  height: 200px;
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border-radius: var(--r-md);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  color: var(--gray-400);
  border: 2px dashed var(--gray-200);
}
.chart-placeholder .chart-icon { font-size: 32px; opacity: 0.5; }
.chart-placeholder p { font-size: 12.5px; font-weight: 500; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-500);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── ACTIVITY FEED ───────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 2px;
}
.activity-text { flex: 1; min-width: 0; }
.activity-text strong { font-weight: 600; color: var(--gray-800); }
.activity-text p { font-size: 12.5px; color: var(--gray-600); margin-top: 1px; }
.activity-time { font-size: 11px; color: var(--gray-400); white-space: nowrap; margin-top: 3px; }

/* ── SKELETON LOADER ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── OVERLAY / SIDEBAR BACKDROP ─────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  .sidebar-overlay.active { display: block; }

  .topbar { left: 0; }
  .topbar-toggle { display: flex; }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
  }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .topbar-user-info { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .main-content { padding: 16px 12px; }
  .page-header h1 { font-size: 18px; }
}

/* ── UTILITIES ───────────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.text-sm    { font-size: 12px; }
.text-muted { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.text-right { text-align: right; }
