:root {
  /* === SURFACES === */
  --bg: #0a0b14;
  --bg-2: #0f1120;
  --panel: #14172a;
  --panel-2: #1a1d33;
  --border: #232744;
  --border-light: #2c3052;
  --text: #eef0fb;
  --text-dim: #8a91ad;
  --text-muted: #5a6080;

  /* === BRAND === */
  --primary: #6366f1;
  --primary-2: #4f46e5;
  --primary-rgb: 99, 102, 241;
  --primary-soft: rgba(99, 102, 241, 0.14);
  --accent: #06b6d4;
  --accent-rgb: 6, 182, 212;
  --accent-soft: rgba(6, 182, 212, 0.14);

  /* === STATUS === */
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.14);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.14);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --pink: #ec4899;
  --pink-soft: rgba(236, 72, 153, 0.14);

  /* === RADIUS === */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* === SPACING SCALE === */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* === TYPE SCALE === */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 32px;

  /* === DENSITY === */
  --row-h: 44px;
  --header-h: 60px;
  --sidebar-w: 248px;
  --grid-gap: 16px;
  --card-pad: 18px;

  /* === ELEVATION === */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);
  --ring: 0 0 0 3px rgba(99, 102, 241, 0.38);

  /* === MOTION === */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 120ms var(--ease);
  --t-base: 180ms var(--ease);
  --t-slow: 280ms var(--ease);
}

[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f3f5fb;
  --border: #e3e6f0;
  --border-light: #eef0f7;
  --text: #0e1326;
  --text-dim: #4d5573;
  --text-muted: #7a8198;
  --primary-soft: rgba(99, 102, 241, 0.10);
  --accent-soft: rgba(6, 182, 212, 0.10);
  --success-soft: rgba(16, 185, 129, 0.10);
  --warning-soft: rgba(245, 158, 11, 0.10);
  --danger-soft: rgba(239, 68, 68, 0.10);
  --pink-soft: rgba(236, 72, 153, 0.10);
  --shadow-xs: 0 1px 2px rgba(15, 20, 38, 0.06);
  --shadow-sm: 0 2px 6px rgba(15, 20, 38, 0.08);
  --shadow: 0 6px 20px rgba(15, 20, 38, 0.10);
  --shadow-lg: 0 18px 44px rgba(15, 20, 38, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto !important; }
}

/* === GLOBAL INTERACTIVITY GUIDELINES === */
[role="button"],
.task-item[data-edit-invoice],
.task-item[data-cancel-booking],
.task-item[data-add-booking],
[data-mtab],
[data-stab],
[data-pos-tab],
[data-pos-cat],
[data-hist-row],
[data-hist-detail],
[data-hist-zreport],
[onclick],
.toggle,
.row-action-btn { cursor: pointer; }

/* Subtle hover for any clickable card-like element */
.panel[data-clickable], .task-item[data-edit-invoice], .task-item[data-cancel-booking] {
  transition: background var(--t-fast), border-color var(--t-fast);
}
.panel[data-clickable]:hover, .task-item[data-edit-invoice]:hover {
  background: var(--panel-2);
}

/* Selection */
::selection { background: rgba(var(--primary-rgb), 0.3); color: var(--text); }

/* Global scrollbar polish */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
*::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

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

html, body {
  min-height: 100%;
  /* System font stack — 0 dépendance externe (RGPD compliant, App Store ready) */
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: var(--fs-base);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
body:has(.app-shell) { height: 100%; overflow: hidden; }

/* Tabular numbers + monospace stack for KPIs, IDs, amounts — admin density best practice */
.num, .kpi-value, .stat-value, kbd, code, [data-num] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum', 'cv11';
}
kbd, code {
  font-family: ui-monospace, 'SF Mono', Menlo, Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  font-size: 0.92em;
}
kbd {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  color: var(--text-dim);
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}
input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.75; }

/* === LAYOUT === */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w, 248px) 1fr;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.brand-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  /* Violet → indigo gradient (Binguo CRM brand) */
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: white;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.42);
  letter-spacing: -0.02em;
}

.brand-text h1 { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.brand-text span {
  font-size: 10px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600;
}

.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.nav-section {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 16px 12px 6px;
  font-weight: 700;
}
.nav-section:first-child { padding-top: 4px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 500;
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  font-size: 13px;
  width: 100%;
  position: relative;
}
.nav-item svg { width: 16px; height: 16px; opacity: 0.85; transition: opacity var(--t-fast); }

.nav-item:hover {
  background: var(--panel);
  color: var(--text);
}
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-item.active svg { color: var(--primary); opacity: 1; }
.nav-item .badge-count {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.nav-item:not(.active) .badge-count {
  background: var(--panel-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.sidebar-footer { padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }

.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 6px; border-radius: var(--radius-sm);
}

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #f093fb, #f5576c);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: white;
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.avatar.accent { background: linear-gradient(135deg, var(--accent), #0891b2); }
.avatar.success { background: linear-gradient(135deg, var(--success), #059669); }
.avatar.warning { background: linear-gradient(135deg, var(--warning), #d97706); }

.user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11px; color: var(--text-dim); }

.main { display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-height: 60px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.search-wrap { flex: 1; position: relative; max-width: 480px; }
.search-wrap > svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); width: 15px; height: 15px;
  pointer-events: none;
  transition: color var(--t-fast);
}
.search-wrap input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  font-size: 13px;
}
.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.search-wrap input:focus + .search-kbd,
.search-wrap input:not(:placeholder-shown) + .search-kbd { opacity: 0; }
.search-kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: inline-flex; gap: 2px;
  font-size: 10px; color: var(--text-muted);
  pointer-events: none;
  transition: opacity var(--t-fast);
}

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

.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--panel-2);
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .dot {
  position: absolute;
  top: 7px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--panel);
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 4px 14px rgba(var(--primary-rgb), 0.32);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 8px 24px rgba(var(--primary-rgb), 0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--border-light);
  background: var(--panel-2);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid transparent;
}
.btn-danger:hover {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.32);
}
.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 4px 14px rgba(16, 185, 129, 0.28);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 8px 24px rgba(16, 185, 129, 0.4); }
.btn-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid transparent;
}
.btn-warning:hover { background: var(--warning); color: white; }
.btn-sm { padding: 6px 11px; font-size: 12px; }

.view-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 32px;
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}
.view-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.view-header .subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}

/* === KPI === */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.kpi-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  position: relative; overflow: hidden;
  transition: border-color var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
}
.kpi-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.85;
}
@keyframes kpiReveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.kpi-card .kpi-value {
  animation: kpiReveal 320ms var(--ease) both;
}
.kpi-card.success::before { background: linear-gradient(90deg, var(--success), #34d399); }
.kpi-card.warning::before { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.kpi-card.pink::before { background: linear-gradient(90deg, var(--pink), #ec4899); }

.kpi-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.kpi-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.kpi-trend { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full); letter-spacing: 0.01em; }
.kpi-trend.up { background: var(--success-soft); color: var(--success); }
.kpi-trend.down { background: var(--danger-soft); color: var(--danger); }
.kpi-trend.flat { background: var(--panel-2); color: var(--text-dim); }
.kpi-trend svg { width: 11px; height: 11px; }

/* === PANELS === */
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-header h3 { font-size: 15px; font-weight: 700; }
.panel-header .subtitle { font-size: 11px; color: var(--text-dim); }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.grid-12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-bottom: 24px; }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }

.chart-wrap { height: 280px; position: relative; }

/* === TABLE === */
.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.table-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.filter-chip:hover { color: var(--text); border-color: var(--border-light); }
.filter-chip.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: 0 1px 2px rgba(var(--primary-rgb), 0.15);
}

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 11px 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}
td { padding: 13px 20px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
td.num, th.num, td[align="right"], th[align="right"] { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
tbody tr {
  transition: background var(--t-fast), box-shadow var(--t-fast);
  cursor: pointer;
  position: relative;
}
tbody tr:hover { background: var(--panel-2); }
tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
tbody tr:last-child td { border-bottom: none; }

.cell-primary { display: flex; align-items: center; gap: 10px; }
.cell-name { font-weight: 600; }
.cell-meta { font-size: 11px; color: var(--text-dim); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-pink { background: var(--pink-soft); color: var(--pink); }
.badge-muted { background: var(--panel-2); color: var(--text-dim); border: 1px solid var(--border); }

.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-action-btn {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); transition: all 0.15s;
}
.row-action-btn:hover { background: var(--panel); color: var(--text); }
.row-action-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.row-action-btn svg { width: 14px; height: 14px; }

/* === MODAL === */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%;
  max-width: 560px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease-out;
}
.modal.wide { max-width: 800px; }
.modal.xl { max-width: 1000px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; color: var(--text-dim);
}
.modal-close:hover { background: var(--panel-2); color: var(--text); }
.modal-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; background: var(--panel); flex-wrap: wrap; }
.modal-footer .btn { white-space: nowrap; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}
.field input, .field select, .field textarea {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
  width: 100%;
  font-size: 13px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--border-light); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}
.field input:disabled, .field select:disabled, .field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.field textarea { resize: vertical; min-height: 80px; }
.field .hint { font-size: 11px; color: var(--text-muted); }
.field .error { font-size: 11px; color: var(--danger); font-weight: 600; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--danger); }

/* === TOAST === */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-sm); padding: 12px 18px;
  box-shadow: var(--shadow); font-size: 13px; font-weight: 500;
  opacity: 0; transform: translateY(20px);
  transition: all 0.3s; pointer-events: none; z-index: 200;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

/* === KANBAN === */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; height: calc(100vh - 220px); padding-bottom: 8px; }
.kanban-col { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.kanban-col-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.kanban-col-header h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 8px; }
.kanban-col-header h4::before { content: ''; width: 8px; height: 8px; border-radius: 50%; }
.kanban-col-count { font-size: 11px; color: var(--text-dim); background: var(--panel-2); padding: 2px 8px; border-radius: 10px; }
.kanban-col-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.deal-card {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; cursor: grab; transition: all 0.15s;
}
.deal-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.deal-card.dragging { opacity: 0.4; }
.deal-card h5 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.deal-card .deal-company { font-size: 11px; color: var(--text-dim); margin-bottom: 10px; }
.deal-card .deal-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border); }
.deal-amount { font-weight: 700; font-size: 13px; color: var(--success); }

/* === TASKS === */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: all 0.15s;
}
.task-item:hover { border-color: var(--primary); }
.task-item.done { opacity: 0.55; }
.task-item.done .task-title { text-decoration: line-through; }
.task-checkbox {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--border); display: flex;
  align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: all 0.15s;
}
.task-checkbox.checked { background: var(--primary); border-color: var(--primary); }
.task-checkbox.checked::after { content: '✓'; color: white; font-size: 12px; font-weight: 800; }
.task-info { flex: 1; min-width: 0; }
.task-title { font-weight: 500; font-size: 14px; margin-bottom: 2px; }
.task-meta { font-size: 11px; color: var(--text-dim); display: flex; gap: 10px; align-items: center; }

.priority-pill { padding: 3px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.priority-high { background: var(--danger-soft); color: var(--danger); }
.priority-medium { background: var(--warning-soft); color: var(--warning); }
.priority-low { background: var(--success-soft); color: var(--success); }

/* === CALENDAR === */
.calendar-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-month { font-size: 18px; font-weight: 700; text-transform: capitalize; }
.calendar-nav { display: flex; gap: 6px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-day-header { text-align: center; font-size: 11px; color: var(--text-dim); text-transform: uppercase; font-weight: 600; padding: 8px 0; }
.calendar-day {
  aspect-ratio: 1; background: var(--panel-2); border-radius: 8px; padding: 6px;
  font-size: 12px; display: flex; flex-direction: column;
  transition: all 0.15s; cursor: pointer; min-height: 80px;
  border: 1px solid transparent;
}
.calendar-day:hover { border-color: var(--primary); }
.calendar-day.other-month { opacity: 0.3; }
.calendar-day.today { background: var(--primary-soft); border-color: var(--primary); }
.calendar-day .day-number { font-weight: 600; margin-bottom: 4px; }
.calendar-day .day-events { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.day-event { font-size: 9.5px; padding: 2px 5px; border-radius: 4px; background: var(--primary-soft); color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.day-event.primary  { background: var(--primary-soft);              color: var(--primary); }
.day-event.accent   { background: var(--accent-soft);               color: var(--accent); }
.day-event.success  { background: var(--success-soft);              color: var(--success); }
.day-event.warning  { background: var(--warning-soft);              color: var(--warning); }
.day-event.danger   { background: var(--danger-soft);               color: var(--danger); }
.day-event.pink     { background: rgba(236,72,153,.13);             color: var(--pink); }

/* === PRODUCTS === */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.product-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: all 0.15s; cursor: pointer; }
.product-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.product-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.product-icon svg { color: white; width: 22px; height: 22px; }
.product-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.product-desc { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; min-height: 32px; }
.product-price { font-size: 20px; font-weight: 800; color: var(--primary); }
.product-price small { font-size: 12px; color: var(--text-dim); font-weight: 500; }

/* === SETTINGS === */
.settings-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.settings-tabs { display: flex; flex-direction: column; gap: 2px; }
.settings-tab { padding: 10px 14px; border-radius: var(--radius-sm); color: var(--text-dim); font-weight: 500; text-align: left; font-size: 13px; transition: all 0.15s; }
.settings-tab:hover { background: var(--panel); color: var(--text); }
.settings-tab.active { background: var(--primary-soft); color: var(--primary); }

.settings-section { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); gap: 20px; }
.settings-row:last-child { border-bottom: none; }
.settings-row-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.settings-row-info p { font-size: 12px; color: var(--text-dim); }

.toggle {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: background var(--t-base);
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}
.toggle::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: left var(--t-base), background var(--t-base);
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.toggle.on { background: var(--primary); border-color: var(--primary); }
.toggle.on::after { left: 20px; }
.toggle:hover:not(.on) { background: var(--border-light); }

/* === ACTIVITY === */
.activity-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; }
.activity-item { display: flex; gap: 12px; padding: 10px; border-radius: var(--radius-sm); transition: background 0.15s; }
.activity-item:hover { background: var(--panel-2); }
.activity-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.activity-icon svg { width: 14px; height: 14px; }
.activity-icon.success { background: var(--success-soft); color: var(--success); }
.activity-icon.warning { background: var(--warning-soft); color: var(--warning); }
.activity-icon.danger { background: var(--danger-soft); color: var(--danger); }
.activity-content { flex: 1; min-width: 0; }
.activity-title { font-weight: 500; font-size: 13px; margin-bottom: 2px; }
.activity-time { font-size: 11px; color: var(--text-muted); }

/* === DETAIL DRAWER === */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; z-index: 90; }
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 480px; max-width: 100vw;
  background: var(--panel);
  border-left: 1px solid var(--border);
  z-index: 91;
  transform: translateX(100%);
  transition: transform var(--t-slow);
  overflow-y: auto;
  box-shadow: -16px 0 40px rgba(0,0,0,0.25);
}
.drawer.open { transform: translateX(0); }

.drawer-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; position: sticky; top: 0; background: var(--panel); z-index: 2; }
.drawer-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 20px; }
/* Defensive wrap for action rows inside narrow drawer (480px) */
.drawer-body .flex.gap-2 { flex-wrap: wrap; }
.drawer-body .btn-sm { padding: 6px 10px; font-size: 12px; }

.detail-section h4 { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; font-weight: 700; }
.detail-kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 13px; }
.detail-kv dt { color: var(--text-dim); }
.detail-kv dd { font-weight: 500; }

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  position: relative;
}
.tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* === CLASS / BOOKING CARDS === */
.class-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  transition: all 0.15s; cursor: pointer; position: relative; overflow: hidden;
}
.class-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.class-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.class-card.yoga::before     { background: var(--pink); }
.class-card.pilates::before  { background: var(--accent); }
.class-card.hiit::before     { background: var(--danger); }
.class-card.crossfit::before { background: var(--warning); }
/* Couleurs par nom sémantique (utilisé dans data.classes[].color) */
.class-card.primary::before  { background: var(--primary); }
.class-card.accent::before   { background: var(--accent); }
.class-card.success::before  { background: var(--success); }
.class-card.warning::before  { background: var(--warning); }
.class-card.danger::before   { background: var(--danger); }
.class-card.pink::before     { background: var(--pink); }

.class-time { font-size: 12px; color: var(--text-dim); font-weight: 600; margin-bottom: 4px; }
.class-name { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.class-coach { font-size: 12px; color: var(--text-dim); }
.class-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.progress { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width 0.3s; }

/* === EMPTY === */
.empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty h3 { font-size: 16px; margin-bottom: 6px; color: var(--text); }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === LOGIN === */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at top, rgba(124, 92, 255, 0.12), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-lg); }
.login-card .brand { justify-content: center; border-bottom: none; margin-bottom: 26px; padding-bottom: 0; }
.login-card h2 { text-align: center; margin-bottom: 6px; }
.login-card .subtitle { text-align: center; color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }

/* === PORTAL === */
.portal-wrap { min-height: 100vh; display: flex; flex-direction: column; padding: 40px 20px; background: radial-gradient(ellipse at top, rgba(124, 92, 255, 0.15), transparent 55%), radial-gradient(ellipse at bottom, rgba(0, 212, 255, 0.08), transparent 55%), var(--bg); }
.portal-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.portal-head .brand { justify-content: center; border-bottom: none; padding: 0; margin: 0 0 20px; }
.portal-head h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; background: linear-gradient(135deg, #fff, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.portal-head p { font-size: 16px; color: var(--text-dim); max-width: 560px; margin: 0 auto; }

.portal-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 1080px; margin: 0 auto 40px; width: 100%; }
.portal-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; transition: all 0.25s; cursor: pointer; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 16px;
}
.portal-card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.portal-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, transparent 50%, rgba(124, 92, 255, 0.08));
  opacity: 0; transition: opacity 0.25s;
}
.portal-card:hover::after { opacity: 1; }

.portal-icon {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.3);
}
.portal-icon.accent { background: linear-gradient(135deg, var(--accent), #0891b2); box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3); }
.portal-icon.success { background: linear-gradient(135deg, var(--success), #059669); box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3); }
.portal-icon svg { width: 28px; height: 28px; color: white; }

.portal-card h3 { font-size: 22px; font-weight: 700; }
.portal-card p { font-size: 13px; color: var(--text-dim); min-height: 40px; }
.portal-card .feat { list-style: none; font-size: 12px; color: var(--text-dim); display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.portal-card .feat li { display: flex; align-items: center; gap: 8px; }
.portal-card .feat li::before { content: '✓'; color: var(--success); font-weight: 700; }

.portal-foot { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: auto; padding-top: 24px; }

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-12 { grid-template-columns: 1fr; }
  .span-8, .span-4, .span-6 { grid-column: span 1; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 100; transform: translateX(-100%); transition: transform 0.25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .view-container { padding: 16px; }
  .mobile-menu-btn { display: flex !important; }
  .topbar { padding: 10px 14px; min-height: 58px; }
  .search-wrap { min-width: 0; }
  .drawer { width: 100vw; max-width: 100vw; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .product-grid { grid-template-columns: 1fr !important; }
  .view-header { flex-direction: column; align-items: stretch; }
  .modal { max-width: 100vw; border-radius: var(--radius) var(--radius) 0 0; margin-bottom: 0; max-height: 85vh; }
  .modal-overlay { align-items: flex-end; }
  h2 { font-size: 20px !important; }
  #chatbotWidget { bottom: 80px !important; right: 12px !important; left: 12px !important; width: auto !important; }
}
.mobile-menu-btn { display: none; width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--border); align-items: center; justify-content: center; color: var(--text); cursor: pointer; }

/* === ANIMATIONS === */
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.view-container > * { animation: viewFadeIn 0.22s ease-out; }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(124,92,255,0.45); } 70% { box-shadow: 0 0 0 10px rgba(124,92,255,0); } 100% { box-shadow: 0 0 0 0 rgba(124,92,255,0); } }
.pulse { animation: pulseRing 1.6s infinite; }

/* === FOCUS STATES === */
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}
button, a { -webkit-tap-highlight-color: transparent; }

/* === SCROLL === */
html { scroll-behavior: smooth; }

/* === PRINT === */
@media print {
  body, html { background: white !important; color: black !important; }
  .sidebar, .topbar, .modal-footer, .drawer, #chatbotFab, #chatbotWidget, .toast, .btn, .modal-close { display: none !important; }
  .modal-overlay { position: static !important; background: none !important; padding: 0 !important; display: block !important; backdrop-filter: none !important; }
  .modal { max-width: 100% !important; max-height: none !important; box-shadow: none !important; border: none !important; background: white !important; color: black !important; }
  .modal-header { background: white !important; border: none !important; color: black !important; }
  .panel, .panel-2 { background: white !important; border-color: #ddd !important; color: black !important; }
  table, td, th { border-color: #ddd !important; }
  @page { margin: 16mm; }
}

/* === THEME TOGGLE BUTTON === */
.theme-toggle { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); transition: all 0.15s; }
.theme-toggle:hover { border-color: var(--primary); }

/* === LIGHT MODE SPECIFIC === */
[data-theme="light"] .brand-logo, [data-theme="light"] .portal-icon { color: white; }
[data-theme="light"] .modal-overlay { background: rgba(15, 20, 32, 0.5); }
[data-theme="light"] .chat-bubble.bot { background: #f1f3f9; color: #0f1420; }
[data-theme="light"] .kpi-card, [data-theme="light"] .panel, [data-theme="light"] .class-card, [data-theme="light"] .deal-card, [data-theme="light"] .product-card { background: #fff; box-shadow: 0 2px 6px rgba(15,20,32,0.04); }
[data-theme="light"] .kpi-card::before { height: 4px; }
[data-theme="light"] th { background: #f8f9fd; }
[data-theme="light"] .filter-chip { background: #fff; }
[data-theme="light"] tbody tr:hover { background: #f8f9fd; }
[data-theme="light"] .task-item { background: #fff; }
[data-theme="light"] .badge-muted { background: #f1f3f9; color: #616a85; border-color: #e4e7ef; }
[data-theme="light"] .avatar { color: white; }
[data-theme="light"] .search-wrap input, [data-theme="light"] .field input, [data-theme="light"] .field select, [data-theme="light"] .field textarea { background: #fff; }
[data-theme="light"] .icon-btn { background: #fff; }
[data-theme="light"] .btn-ghost { background: #fff; }
[data-theme="light"] .toggle { background: #d8dce8; }
[data-theme="light"] .progress { background: #e4e7ef; }
[data-theme="light"] .mobile-menu-btn { background: #fff; }

/* === UTILITIES === */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.text-sm { font-size: 12px; }
.text-dim { color: var(--text-dim); }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.full-w { width: 100%; }
