/* ============================================================
   BCC DESIGN SYSTEM — Blantyre City Council
   Version 1.0.0
   Fonts: Albert Sans (Bunny CDN)
   Icons: Phosphor Icons
   Theme: Deep Navy (#1e3a8a) + Gold (#eab308)
   ============================================================ */

/* ─────────────────────────────────────────
   1. DESIGN TOKENS (CSS Custom Properties)
   ───────────────────────────────────────── */
:root {
  /* === PRIMARY (Deep Navy Blue) === */
  --color-primary-50:  #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3b82f6;
  --color-primary-600: #2563eb;
  --color-primary-700: #1d4ed8;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;
  --color-primary-950: #172554;

  /* === ACCENT (Gold) === */
  --color-accent-300: #fde047;
  --color-accent-400: #facc15;
  --color-accent-500: #eab308;
  --color-accent-600: #ca8a04;
  --color-accent-700: #a16207;

  /* === SEMANTIC === */
  --color-success-light: #dcfce7;
  --color-success:       #16a34a;
  --color-success-dark:  #15803d;
  --color-warning-light: #fef9c3;
  --color-warning:       #d97706;
  --color-warning-dark:  #b45309;
  --color-error-light:   #fee2e2;
  --color-error:         #dc2626;
  --color-error-dark:    #b91c1c;
  --color-info-light:    #dbeafe;
  --color-info:          #2563eb;
  --color-info-dark:     #1d4ed8;

  /* === MALAWIAN BRAND COLOURS === */
  --color-airtel:        #e00000;
  --color-tnm:           #00a859;
  --color-nbm:           #006b3f;
  --color-standard-bank: #0033a1;
  --color-paychangu:     #7c3aed;

  /* === SURFACE (Light Mode) === */
  --surface-bg:          #f8fafc;
  --surface-card:        #ffffff;
  --surface-card-hover:  #f8fafc;
  --surface-sidebar:     var(--color-primary-950);
  --surface-navbar:      #ffffff;
  --surface-input:       #f1f5f9;
  --surface-input-focus: #ffffff;
  --surface-overlay:     rgba(15, 23, 42, 0.5);
  --surface-table-head:  #f1f5f9;
  --surface-table-row-hover: #f8fafc;

  /* === BORDER === */
  --border-default:      #e2e8f0;
  --border-strong:       #cbd5e1;
  --border-focus:        var(--color-primary-500);
  --border-sidebar:      rgba(30, 58, 138, 0.4);

  /* === TEXT === */
  --text-primary:        #0f172a;
  --text-secondary:      #475569;
  --text-muted:          #94a3b8;
  --text-inverse:        #ffffff;
  --text-link:           var(--color-primary-600);
  --text-on-accent:      var(--color-primary-950);

  /* === TYPOGRAPHY === */
  --font-family:         '"Albert Sans", sans-serif';
  --font-size-xs:        0.6875rem;  /* 11px */
  --font-size-sm:        0.8125rem;  /* 13px */
  --font-size-base:      0.9375rem;  /* 15px */
  --font-size-md:        1rem;       /* 16px */
  --font-size-lg:        1.125rem;   /* 18px */
  --font-size-xl:        1.25rem;    /* 20px */
  --font-size-2xl:       1.5rem;     /* 24px */
  --font-size-3xl:       1.875rem;   /* 30px */

  /* === SPACING === */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* === RADIUS === */
  --radius-sm:   0.375rem;
  --radius-md:   0.625rem;
  --radius-lg:   0.875rem;
  --radius-xl:   1.125rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* === SHADOW === */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:  0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl:  0 20px 25px rgba(0,0,0,0.10), 0 10px 10px rgba(0,0,0,0.04);
  --shadow-modal: 0 25px 50px rgba(0,0,0,0.25);
  --shadow-card-hover: 0 8px 25px rgba(30,58,138,0.12);

  /* === TRANSITION === */
  --transition-fast:   120ms ease;
  --transition-normal: 220ms ease;
  --transition-slow:   350ms ease;

  /* === Z-INDEX === */
  --z-sidebar:  40;
  --z-navbar:   30;
  --z-dropdown: 50;
  --z-modal:    60;
  --z-toast:    70;
}

/* === DARK MODE OVERRIDES === */
.dark {
  --surface-bg:          #0a0f1e;
  --surface-card:        #0f172a;
  --surface-card-hover:  #1e293b;
  --surface-navbar:      #0f172a;
  --surface-input:       #1e293b;
  --surface-input-focus: #1e293b;
  --surface-overlay:     rgba(0,0,0,0.7);
  --surface-table-head:  #1e293b;
  --surface-table-row-hover: #1e293b;
  --border-default:      #1e293b;
  --border-strong:       #334155;
  --text-primary:        #f1f5f9;
  --text-secondary:      #94a3b8;
  --text-muted:          #475569;
}

/* ─────────────────────────────────────────
   2. RESET & BASE
   ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Albert Sans", sans-serif;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background-color: var(--surface-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  min-height: 100vh;
}

/* ─────────────────────────────────────────
   3. SCROLLBAR
   ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.dark ::-webkit-scrollbar-thumb { background: #334155; }
.dark ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ─────────────────────────────────────────
   4. TYPOGRAPHY UTILITIES
   ───────────────────────────────────────── */
.text-display {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.text-heading  { font-size: var(--font-size-2xl); font-weight: 700; letter-spacing: -0.01em; }
.text-title    { font-size: var(--font-size-xl);  font-weight: 700; }
.text-subtitle { font-size: var(--font-size-lg);  font-weight: 600; }
.text-body     { font-size: var(--font-size-base); font-weight: 400; }
.text-sm       { font-size: var(--font-size-sm); }
.text-xs       { font-size: var(--font-size-xs); }
.text-label    { font-size: var(--font-size-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.text-mono     { font-family: 'Courier New', monospace; font-size: var(--font-size-sm); }
.text-muted    { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium   { font-weight: 500; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─────────────────────────────────────────
   5. LAYOUT — APP SHELL
   ───────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* === SIDEBAR === */
.sidebar {
  width: 256px;
  flex-shrink: 0;
  background-color: var(--color-primary-950);
  border-right: 1px solid var(--border-sidebar);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: var(--z-sidebar);
  transition: transform var(--transition-slow);
  overflow: hidden;
}

/* Diagonal pattern texture on sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  /*background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");*/
  pointer-events: none;
}

.sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 var(--space-5);
  background: rgba(30, 58, 138, 0.5);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.sidebar-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: #fff;
  object-fit: contain;
  padding: 2px;
  margin-right: var(--space-3);
  flex-shrink: 0;
}

.sidebar-brand-name {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar-section-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  padding: var(--space-4) var(--space-3) var(--space-2);
  margin-top: var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  transition: background var(--transition-fast), color var(--transition-fast);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  text-decoration: none;
  line-height: 1;
}

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

.nav-item.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 600;
}

.nav-item .nav-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition-fast);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: var(--color-accent-400);
}

.nav-item .nav-badge {
  margin-left: auto;
  font-size: var(--font-size-xs);
  font-weight: 700;
  background: var(--color-accent-500);
  color: var(--color-primary-950);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  line-height: 1.5;
}

/* Active indicator bar */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  height: 60%;
  width: 3px;
  background: var(--color-accent-400);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.nav-item { position: relative; }

.sidebar-user {
  padding: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-accent-500);
  color: var(--color-primary-950);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--font-size-sm);
  flex-shrink: 0;
}

.sidebar-user-name  { font-size: var(--font-size-sm); font-weight: 600; color: #fff; }
.sidebar-user-role  { font-size: var(--font-size-xs); color: rgba(255,255,255,0.4); }

/* === MAIN CONTENT === */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* === NAVBAR (TOP) === */
.navbar {
  height: 64px;
  background: var(--surface-navbar);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  flex-shrink: 0;
  z-index: var(--z-navbar);
  box-shadow: var(--shadow-xs);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.navbar-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: capitalize;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.navbar-search {
  display: flex;
  align-items: center;
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-2) var(--space-3);
  gap: var(--space-2);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.navbar-search:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.navbar-search input {
  background: transparent;
  border: none;
  outline: none;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  width: 180px;
  font-family: "Albert Sans", sans-serif;
}

.navbar-search input::placeholder { color: var(--text-muted); }

.navbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: background var(--transition-fast), color var(--transition-fast);
  position: relative;
}

.navbar-icon-btn:hover { background: var(--surface-input); color: var(--text-primary); }

.navbar-icon-btn .badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--color-error);
  border-radius: var(--radius-full);
  border: 2px solid var(--surface-navbar);
}

/* === PAGE CONTENT === */
.page-content {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--space-6) var(--space-8);
  background: var(--surface-bg);
  transition: background var(--transition-normal);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.page-header-title { font-size: var(--font-size-2xl); font-weight: 800; color: var(--text-primary); margin: 0; }
.page-header-sub   { font-size: var(--font-size-sm);  color: var(--text-secondary); margin-top: var(--space-1); }

/* ─────────────────────────────────────────
   6. CARD COMPONENT
   ───────────────────────────────────────── */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal), background var(--transition-normal), border-color var(--transition-normal);
}

.card:hover { box-shadow: var(--shadow-md); }
.card-hover:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }
.card-flat { box-shadow: none; }

.card-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.card-title   { font-size: var(--font-size-base); font-weight: 700; color: var(--text-primary); }
.card-body    { padding: var(--space-6); }
.card-footer  { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--border-default); background: var(--surface-input); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.card-p-0     { padding: 0 !important; }
.card-gradient {
  background: linear-gradient(135deg, var(--color-primary-800) 0%, var(--color-primary-950) 100%);
  color: #fff;
  border: none;
}

/* === KPI / STAT CARD === */
.stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-card-label { font-size: var(--font-size-sm); color: var(--text-secondary); font-weight: 500; }
.stat-card-value { font-size: var(--font-size-2xl); font-weight: 800; color: var(--text-primary); line-height: 1.2; margin-top: 2px; }
.stat-card-delta {
  font-size: var(--font-size-xs);
  font-weight: 600;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.stat-card-delta.up   { color: var(--color-success); }
.stat-card-delta.down { color: var(--color-error);   }

/* ─────────────────────────────────────────
   7. BUTTON SYSTEM
   ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-md);
  font-family: "Albert Sans", sans-serif;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* Sizes */
.btn-xs  { padding: 3px 10px;  font-size: var(--font-size-xs); gap: 4px; }
.btn-sm  { padding: 6px 14px;  font-size: var(--font-size-sm); }
.btn-md  { padding: 9px 20px;  font-size: var(--font-size-sm); }
.btn-lg  { padding: 12px 28px; font-size: var(--font-size-base); }
.btn-xl  { padding: 14px 36px; font-size: var(--font-size-md); font-weight: 700; }

/* Variants */
.btn-primary {
  background: var(--color-primary-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) { background: var(--color-primary-800); box-shadow: var(--shadow-md); }

.btn-accent {
  background: var(--color-accent-500);
  color: var(--color-primary-950);
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover:not(:disabled) { background: var(--color-accent-400); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--surface-card);
  color: var(--text-primary);
  border-color: var(--border-default);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-input); border-color: var(--border-strong); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-input); color: var(--text-primary); }

.btn-danger {
  background: var(--color-error);
  color: #fff;
}
.btn-danger:hover:not(:disabled) { background: var(--color-error-dark); }

.btn-danger-ghost {
  background: transparent;
  color: var(--color-error);
  border-color: transparent;
}
.btn-danger-ghost:hover:not(:disabled) { background: var(--color-error-light); }

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

/* Icon only */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}
.btn-icon.btn-lg { width: 44px; height: 44px; }

/* Loading state */
.btn-loading { position: relative; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Full width */
.btn-block { width: 100%; }

/* ─────────────────────────────────────────
   8. FORM ELEMENTS
   ───────────────────────────────────────── */
.form-group { margin-bottom: var(--space-5); }

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-label-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  margin-left: var(--space-1);
}

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.form-error-msg {
  font-size: var(--font-size-xs);
  color: var(--color-error);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-family: "Albert Sans", sans-serif;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  line-height: 1.5;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--border-focus);
  background: var(--surface-input-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input::placeholder,
.textarea::placeholder { color: var(--text-muted); }

.input-error { border-color: var(--color-error) !important; }
.input-error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important; }
.input-success { border-color: var(--color-success) !important; }

.textarea { resize: vertical; min-height: 100px; }

/* Input with prefix/suffix */
.input-group { display: flex; }
.input-group .input-prefix,
.input-group .input-suffix {
  display: flex;
  align-items: center;
  padding: 0 var(--space-3);
  background: var(--surface-table-head);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}
.input-group .input-prefix { border-right: none; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group .input-suffix { border-left: none;  border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.input-group .input        { border-radius: 0; }
.input-group .input:first-child  { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group .input:last-child   { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* Input with icon */
.input-with-icon { position: relative; }
.input-with-icon .input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}
.input-with-icon .input-icon-left  { left: var(--space-3);  }
.input-with-icon .input-icon-right { right: var(--space-3); }
.input-with-icon.has-left  .input { padding-left: 2.4rem;  }
.input-with-icon.has-right .input { padding-right: 2.4rem; }

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--color-primary-700);
  cursor: pointer;
}

/* Toggle / Switch */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.toggle-input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-track {
  width: 44px;
  height: 24px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.toggle-input:checked + .toggle-track { background: var(--color-primary-700); }

.toggle-track::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: var(--radius-full);
  top: 3px; left: 3px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.toggle-input:checked + .toggle-track::after { transform: translateX(20px); }

.toggle-label { font-size: var(--font-size-sm); font-weight: 500; color: var(--text-primary); }

/* ─────────────────────────────────────────
   9. TABLE COMPONENT
   ───────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--font-size-sm);
  white-space: nowrap;
}

.data-table thead tr {
  background: var(--surface-table-head);
  border-bottom: 1px solid var(--border-default);
}

.data-table thead th {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-default);
  transition: background var(--transition-fast);
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-table-row-hover); }

.data-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table td.td-mono {
  font-family: 'Courier New', monospace;
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

.data-table .col-actions { width: 80px; text-align: right; }

/* Table toolbar */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-default);
  gap: var(--space-3);
  flex-wrap: wrap;
  background: var(--surface-input);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-default);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.pagination-pages { display: flex; gap: var(--space-1); }

.page-btn {
  min-width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.page-btn:hover { border-color: var(--color-primary-500); color: var(--color-primary-600); }
.page-btn.active { background: var(--color-primary-900); color: #fff; border-color: var(--color-primary-900); }

/* ─────────────────────────────────────────
   10. BADGE / TAG / STATUS PILL
   ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.badge-success { background: var(--color-success-light);  color: var(--color-success-dark); }
.badge-warning { background: var(--color-warning-light);  color: var(--color-warning-dark); }
.badge-error   { background: var(--color-error-light);    color: var(--color-error-dark);   }
.badge-info    { background: var(--color-info-light);     color: var(--color-info-dark);    }
.badge-primary { background: var(--color-primary-100);   color: var(--color-primary-800);  }
.badge-accent  { background: var(--color-accent-300);    color: var(--color-accent-700);   }
.badge-neutral { background: var(--surface-input);       color: var(--text-secondary);     }

.dark .badge-success { background: rgba(22,163,74,0.15);  color: #4ade80; }
.dark .badge-warning { background: rgba(217,119,6,0.15);  color: #fbbf24; }
.dark .badge-error   { background: rgba(220,38,38,0.15);  color: #f87171; }
.dark .badge-info    { background: rgba(37,99,235,0.15);  color: #60a5fa; }
.dark .badge-primary { background: rgba(30,58,138,0.3);   color: #93c5fd; }
.dark .badge-neutral { background: rgba(255,255,255,0.07); color: var(--text-secondary); }

/* ─────────────────────────────────────────
   11. MODAL COMPONENT
   ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--surface-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
  border: 1px solid var(--border-default);
  overflow: hidden;
}

.modal-sm  { max-width: 400px; }
.modal-lg  { max-width: 720px; }
.modal-xl  { max-width: 960px; }
.modal-full{ max-width: 95vw; max-height: 95vh; }

.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  flex-shrink: 0;
}

.modal-title   { font-size: var(--font-size-lg); font-weight: 700; color: var(--text-primary); }
.modal-subtitle{ font-size: var(--font-size-sm); color: var(--text-secondary); margin-top: 2px; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--surface-input); color: var(--text-primary); }

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  background: var(--surface-input);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────
   12. ALERT / NOTIFICATION BANNER
   ───────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
}

.alert-icon    { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.alert-title   { font-weight: 700; margin-bottom: 2px; }
.alert-text    { color: inherit; opacity: 0.85; line-height: 1.5; }
.alert-dismiss { margin-left: auto; font-size: 1rem; cursor: pointer; opacity: 0.6; flex-shrink: 0; }
.alert-dismiss:hover { opacity: 1; }

.alert-success { background: var(--color-success-light);  border-color: rgba(22,163,74,0.2);  color: var(--color-success-dark); }
.alert-warning { background: var(--color-warning-light);  border-color: rgba(217,119,6,0.2);  color: var(--color-warning-dark); }
.alert-error   { background: var(--color-error-light);    border-color: rgba(220,38,38,0.2);  color: var(--color-error-dark);   }
.alert-info    { background: var(--color-info-light);     border-color: rgba(37,99,235,0.2);  color: var(--color-info-dark);    }

.dark .alert-success { background: rgba(22,163,74,0.12);   border-color: rgba(22,163,74,0.25);   color: #4ade80; }
.dark .alert-warning { background: rgba(217,119,6,0.12);   border-color: rgba(217,119,6,0.25);   color: #fbbf24; }
.dark .alert-error   { background: rgba(220,38,38,0.12);   border-color: rgba(220,38,38,0.25);   color: #f87171; }
.dark .alert-info    { background: rgba(37,99,235,0.12);   border-color: rgba(37,99,235,0.25);   color: #60a5fa; }

/* ─────────────────────────────────────────
   13. TOAST / SNACKBAR
   ───────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
  max-width: 380px;
}

.toast {
  background: #1e293b;
  color: #f1f5f9;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  pointer-events: all;
  font-size: var(--font-size-sm);
  font-weight: 500;
  animation: toastIn 0.3s ease;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  min-width: 280px;
}

.dark .toast { background: #0f172a; border-color: var(--border-default); }

.toast-icon   { font-size: 1.1rem; flex-shrink: 0; }
.toast-msg    { flex: 1; line-height: 1.4; }
.toast-close  { cursor: pointer; opacity: 0.5; font-size: 1rem; flex-shrink: 0; padding: 2px; }
.toast-close:hover { opacity: 1; }

.toast.toast-success .toast-icon { color: #4ade80; }
.toast.toast-error   .toast-icon { color: #f87171; }
.toast.toast-warning .toast-icon { color: #fbbf24; }
.toast.toast-info    .toast-icon { color: #60a5fa; }

/* Progress bar */
.toast-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(255,255,255,0.3);
  animation: toastProgress 4s linear forwards;
}

.toast { position: relative; overflow: hidden; }

/* ─────────────────────────────────────────
   14. DROPDOWN / POPOVER
   ───────────────────────────────────────── */
.dropdown-wrapper { position: relative; display: inline-block; }

.dropdown {
  position: absolute;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  min-width: 200px;
  z-index: var(--z-dropdown);
  overflow: hidden;
  animation: fadeIn 0.15s ease;
}

.dropdown-right  { right: 0; }
.dropdown-left   { left: 0; }
.dropdown-bottom { top: calc(100% + 8px); }
.dropdown-top    { bottom: calc(100% + 8px); }

.dropdown-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  transition: background var(--transition-fast);
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover { background: var(--surface-input); }
.dropdown-item.danger { color: var(--color-error); }
.dropdown-item.danger:hover { background: var(--color-error-light); }
.dropdown-divider { height: 1px; background: var(--border-default); margin: var(--space-1) 0; }

/* ─────────────────────────────────────────
   15. TABS
   ───────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-default);
  gap: 0;
}

.tab-item {
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.tab-item:hover { color: var(--text-primary); }
.tab-item.active { color: var(--color-primary-700); border-bottom-color: var(--color-primary-700); }

/* Pills tabs variant */
.tabs-pills { border-bottom: none; background: var(--surface-input); border-radius: var(--radius-lg); padding: 4px; gap: 2px; }
.tabs-pills .tab-item { border-radius: var(--radius-md); border-bottom: none; margin-bottom: 0; }
.tabs-pills .tab-item.active { background: var(--surface-card); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.tabs-pills .tab-item:hover:not(.active) { background: rgba(255,255,255,0.5); }

/* ─────────────────────────────────────────
   16. AVATAR
   ───────────────────────────────────────── */
.avatar {
  border-radius: var(--radius-full);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--color-primary-100);
  color: var(--color-primary-800);
}

.avatar-xs  { width: 24px;  height: 24px;  font-size: var(--font-size-xs);  }
.avatar-sm  { width: 32px;  height: 32px;  font-size: var(--font-size-xs);  }
.avatar-md  { width: 40px;  height: 40px;  font-size: var(--font-size-sm);  }
.avatar-lg  { width: 52px;  height: 52px;  font-size: var(--font-size-base);}
.avatar-xl  { width: 64px;  height: 64px;  font-size: var(--font-size-xl);  }
.avatar-2xl { width: 80px;  height: 80px;  font-size: var(--font-size-2xl); }

.avatar-accent  { background: var(--color-accent-500);   color: var(--color-primary-950); }
.avatar-primary { background: var(--color-primary-900);  color: #fff; }
.avatar-success { background: var(--color-success-light); color: var(--color-success-dark); }

.avatar-group { display: flex; }
.avatar-group .avatar { border: 2px solid var(--surface-card); margin-left: -8px; }
.avatar-group .avatar:first-child { margin-left: 0; }

/* ─────────────────────────────────────────
   17. PROGRESS BAR
   ───────────────────────────────────────── */
.progress-wrap { height: 8px; background: var(--surface-input); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar  { height: 100%; border-radius: var(--radius-full); transition: width 0.5s ease; }

.progress-bar-primary { background: var(--color-primary-700); }
.progress-bar-accent  { background: var(--color-accent-500);  }
.progress-bar-success { background: var(--color-success);     }
.progress-bar-error   { background: var(--color-error);       }
.progress-bar-warning { background: var(--color-warning);     }

/* Striped + animated */
.progress-bar-striped {
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 10px,
    rgba(255,255,255,0.15) 10px, rgba(255,255,255,0.15) 20px
  );
}

.progress-bar-animated { animation: stripes 1.2s linear infinite; }
.progress-lg .progress-wrap { height: 12px; }
.progress-sm .progress-wrap { height: 4px;  }

/* ─────────────────────────────────────────
   18. EMPTY STATE
   ───────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  gap: var(--space-4);
}

.empty-state-icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-2xl);
  background: var(--surface-input);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}

.empty-state-title { font-size: var(--font-size-lg); font-weight: 700; color: var(--text-primary); margin: 0; }
.empty-state-text  { font-size: var(--font-size-sm); color: var(--text-secondary); max-width: 320px; margin: 0; }

/* ─────────────────────────────────────────
   19. BREADCRUMB
   ───────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  flex-wrap: wrap;
}

.breadcrumb-item { color: var(--text-muted); text-decoration: none; }
.breadcrumb-item:hover { color: var(--color-primary-600); }
.breadcrumb-sep   { color: var(--text-muted); font-size: 0.75rem; }
.breadcrumb-item.active { color: var(--text-primary); font-weight: 600; pointer-events: none; }

/* ─────────────────────────────────────────
   20. WIZARD / STEPPER
   ───────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: var(--space-6) var(--space-4);
}

.stepper-track {
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 100%; height: 2px;
  background: var(--border-default);
}

.stepper-progress {
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  height: 2px;
  background: var(--color-primary-700);
  transition: width 0.4s ease;
}

.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--font-size-sm);
  border: 3px solid var(--surface-card);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.step-dot-pending   { background: var(--border-default);       color: var(--text-muted);  }
.step-dot-active    { background: var(--color-primary-700);    color: #fff;               }
.step-dot-complete  { background: var(--color-success);        color: #fff;               }

.step-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-muted);
  margin-top: var(--space-2);
  text-align: center;
  width: 80px;
  line-height: 1.3;
}

.step-dot-active ~ .step-label { color: var(--color-primary-700); }

/* ─────────────────────────────────────────
   21. UTILITY CLASSES
   ───────────────────────────────────────── */

/* Flexbox */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); } .gap-6 { gap: var(--space-6); }
.flex-1    { flex: 1; }
.flex-none { flex: none; }
.min-w-0   { min-width: 0; }
.shrink-0  { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }

/* Grid */
.grid { display: grid; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-full { grid-column: 1 / -1; }

@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; }
  .col-span-2, .col-span-3 { grid-column: span 1; }
}

/* Spacing */
.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }   .p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }   .p-8 { padding: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); } .mt-6 { margin-top: var(--space-6); }
.mb-4 { margin-bottom: var(--space-4); } .mb-6 { margin-bottom: var(--space-6); }
.ml-auto { margin-left: auto; }

/* Colors */
.bg-primary-900 { background: var(--color-primary-900); }
.bg-accent-500  { background: var(--color-accent-500); }
.text-white     { color: #fff; }
.text-accent    { color: var(--color-accent-500); }
.text-primary-color { color: var(--color-primary-700); }
.text-success   { color: var(--color-success); }
.text-error     { color: var(--color-error); }

/* Misc */
.rounded-full { border-radius: var(--radius-full); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-lg   { border-radius: var(--radius-lg); }
.overflow-hidden { overflow: hidden; }
.w-full  { width: 100%; }
.h-full  { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.block   { display: block; }
.hidden  { display: none; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.opacity-0 { opacity: 0; } .opacity-50 { opacity: 0.5; } .opacity-100 { opacity: 1; }

/* Icon sizing */
.icon-sm { font-size: 1rem;  }
.icon-md { font-size: 1.2rem;}
.icon-lg { font-size: 1.5rem;}
.icon-xl { font-size: 2rem;  }

/* Divider */
.divider        { height: 1px;  background: var(--border-default); }
.divider-v      { width: 1px;   background: var(--border-default); align-self: stretch; }
.divider-dashed { background: none; border-top: 1px dashed var(--border-default); }

/* ─────────────────────────────────────────
   22. PRINT STYLES
   ───────────────────────────────────────── */
@media print {
  @page { margin: 0; size: 80mm auto; }
  body * { visibility: hidden; }
  #printable-receipt, #printable-receipt * { visibility: visible; }
  #printable-receipt {
    position: absolute; left: 0; top: 0;
    width: 80mm; margin: 0; padding: 5mm;
    box-shadow: none; border: none;
    color: #000; background: #fff;
    font-family: monospace;
  }
  .no-print { display: none !important; }
}

/* ─────────────────────────────────────────
   23. ANIMATIONS & KEYFRAMES
   ───────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes stripes {
  to { background-position: 40px 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Transition helpers */
.fade-enter { animation: fadeIn 0.25s ease; }
.slide-up   { animation: slideUp 0.3s ease; }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--surface-input) 25%, var(--border-default) 50%, var(--surface-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}

/* ─────────────────────────────────────────
   24. MOBILE OVERRIDES
   ───────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 320px);
    box-shadow: var(--shadow-xl);
    z-index: calc(var(--z-sidebar) + 1);
  }
  .sidebar.hidden-mobile { transform: translateX(-102%); }
  .page-content { padding: var(--space-4); padding-bottom: var(--space-6); }
  .navbar { padding: 0 var(--space-4); }
  .modal  { max-width: 100%; border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; max-height: 92vh; }
  .modal-overlay { align-items: flex-end; }
  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: var(--surface-overlay);
    backdrop-filter: blur(2px);
    z-index: var(--z-sidebar);
  }
  .toast-container { left: var(--space-4); right: var(--space-4); bottom: var(--space-4); }
  .page-header { flex-direction: column; gap: var(--space-3); }
  .table-toolbar { gap: var(--space-2); }
  .table-wrapper { overflow-x: auto; }
  .card { border-radius: var(--radius-xl); }
}
