/* ======================================================
   KaamOS — Design System v1.0
   "Your Work, Your Way"

   Forked from: Mascot ERP Design System v2.0
   Palette: Brown (#7e481c) + Cyan (#06b6d4)
   Font: Inter
   ====================================================== */

/* ═══════════════════════════════════════
   1. DESIGN TOKENS
   ═══════════════════════════════════════ */
:root {
  /* Primary — Warm Brown */
  --primary: #7e481c;
  --primary-hover: #6a3c17;
  --primary-active: #563112;
  --primary-light: #d4a574;
  --primary-50: #fdf8f3;
  --primary-100: #f9edd9;
  --primary-200: #f0d5b0;

  /* Accent — Cyan Contrast */
  --accent: #06b6d4;
  --accent-hover: #0891b2;
  --accent-light: #67e8f9;
  --accent-50: #ecfeff;

  /* Neutral Scale */
  --gray-25: #fcfcfd;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;

  /* Semantic */
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --info: #3b82f6;
  --info-light: #eff6ff;

  /* Shadows — Layered depth system */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 24px 48px -8px rgba(0, 0, 0, 0.1), 0 8px 16px -4px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.04);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* Layout */
  --sidebar-width: 240px;
  --sidebar-collapsed: 68px;
  --header-height: 56px;
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.2s;
  --duration-slow: 0.3s;

  /* Focus — DESIGNGOD S20 */
  --focus-ring: 0 0 0 2px #fff, 0 0 0 4px var(--primary);
  --focus-ring-inset: inset 0 0 0 2px var(--primary);

  /* Content-area theming (overridden by immersive themes) */
  --card-bg: #fff;
  --card-border: var(--gray-200);
  --card-hover-shadow: var(--shadow-card-hover);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-500);
  --text-quaternary: var(--gray-400);
  --header-bg: rgba(255, 255, 255, 0.95);
  --header-border: rgba(126, 72, 28, 0.08);
  --input-bg: #fff;
  --input-border: var(--gray-200);
  --hover-bg: var(--gray-50);
  --divider-color: var(--gray-100);

  /* Calendar event type colors — derived from theme by JS, defaults below */
  --cal-meeting: #3b82f6;
  --cal-task: #10b981;
  --cal-holiday: #ef4444;
  --cal-leave: #d97706;
  --cal-company-event: #06b6d4;
  --cal-birthday: #ec4899;
  --cal-reminder: #f59e0b;
  --cal-personal: #8b5cf6;
  --cal-block: #6b7280;
  --cal-shared: #6366f1;
}


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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--page-bg, #faf8f5);
  color: var(--text-primary, var(--gray-900));
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
}

a { color: var(--primary); text-decoration: none; transition: color var(--duration-fast) var(--ease-in-out); }
a:hover { color: var(--primary-hover); }

::selection { background: var(--primary-100); color: var(--primary-active); }

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


/* ═══════════════════════════════════════
   2.1 FOCUS VISIBLE — DESIGNGOD S20
   ═══════════════════════════════════════ */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
.sidebar :focus-visible {
  box-shadow: var(--focus-ring-inset);
}
button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary);
}


/* ═══════════════════════════════════════
   2.2 REDUCED MOTION — DESIGNGOD S20
   ═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ═══════════════════════════════════════
   3. CUSTOM SCROLLBAR
   ═══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
* { scrollbar-width: thin; scrollbar-color: var(--gray-300) transparent; }


/* ═══════════════════════════════════════
   4. TYPOGRAPHY
   ═══════════════════════════════════════ */
.text-xs { font-size: 11px; line-height: 1.45; }
.text-sm { font-size: 12px; line-height: 1.5; }
.text-base { font-size: 13px; line-height: 1.55; }
.text-md { font-size: 14px; line-height: 1.5; }
.text-lg { font-size: 16px; line-height: 1.4; }
.text-xl { font-size: 20px; line-height: 1.3; }
.text-2xl { font-size: 24px; line-height: 1.2; }
.text-3xl { font-size: 28px; line-height: 1.15; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-muted { color: var(--gray-500); }
.text-secondary { color: var(--gray-600); }
.text-primary-color { color: var(--primary); }

.label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-600);
}

.mono { font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace; font-size: 0.92em; }
.tabular { font-variant-numeric: tabular-nums; }


/* ═══════════════════════════════════════
   5. SIDEBAR — Elite Dark Navigation
   ═══════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, #1e1208 0%, #140c04 100%);
  z-index: 1040;
  transition: width var(--duration-slow) var(--ease-out);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 2px 0 32px rgba(0, 0, 0, 0.18);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); overflow: visible; }
.sidebar.collapsed .sidebar-nav { overflow: visible; }


.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 2px; }
.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.15); }

/* Brand Area */
.sidebar-brand {
  padding: 20px 18px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: var(--header-height);
  position: relative;
  flex-shrink: 0;
}
.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.08) 70%, transparent 100%);
}
.sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #9a5a25 0%, #c47d3e 50%, #e0a86e 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(126, 72, 28, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all var(--duration-normal) var(--ease-spring);
}
.sidebar-brand:hover .brand-icon {
  box-shadow: 0 4px 20px rgba(126, 72, 28, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: scale(1.05) rotate(-2deg);
}
.sidebar-brand .brand-icon i { color: #fff; font-size: 15px; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.sidebar-brand .brand-text {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  letter-spacing: -0.025em;
}
.sidebar-brand .brand-sub {
  color: rgba(255, 255, 255, 0.3);
  font-size: 9.5px;
  display: block;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 1px;
}
.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-sub { display: none; }

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px 0 8px;
  overflow-y: auto;
}

/* Nav Group — Collapsible Sections */
.nav-group { margin-bottom: 2px; }
.sidebar-nav .nav-section {
  padding: 6px 12px;
  margin: 10px 12px 4px;
  font-size: 10.5px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--theme-section-text, rgba(255, 255, 255, 0.35));
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease-out);
}
.sidebar-nav .nav-section:hover {
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.03);
}
.nav-group.open > .nav-section {
  color: rgba(255, 255, 255, 0.5);
}
.sidebar-nav .nav-section .nav-section-icon {
  font-size: 9px;
  width: 14px;
  text-align: center;
  opacity: 0.5;
  flex-shrink: 0;
}
.nav-group.open > .nav-section .nav-section-icon { opacity: 0.8; }
.sidebar-nav .nav-section .nav-chevron {
  font-size: 7px;
  margin-left: auto;
  transition: transform 0.25s var(--ease-out);
  transform: rotate(-90deg);
  opacity: 0.25;
  flex-shrink: 0;
}
.nav-group.open > .nav-section .nav-chevron { transform: rotate(0deg); opacity: 0.4; }
.nav-group-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-out);
}
.nav-group.open > .nav-group-items { max-height: 600px; }
.sidebar-nav .nav-group:first-child .nav-section { margin-top: 0; }
/* Collapsed: Nav sections become icon-only triggers */
.sidebar.collapsed .nav-section {
  justify-content: center;
  padding: 14px 0;
  margin: 4px 6px;
  font-size: 0;
  color: transparent;
  border-radius: 8px;
  position: relative;
}
.sidebar.collapsed .nav-section .nav-section-icon {
  font-size: 15px !important;
  opacity: 0.6;
  color: rgba(255,255,255,0.65);
  margin: 0;
  width: auto;
}
.sidebar.collapsed .nav-section:hover {
  background: rgba(255,255,255,0.06);
}
.sidebar.collapsed .nav-section:hover .nav-section-icon {
  opacity: 1;
  color: #fff;
}
.sidebar.collapsed .nav-section span { display: none; }
.sidebar.collapsed .nav-chevron { display: none; }
/* Collapsed: Hide sub-items (flyout handles them) */
.sidebar.collapsed .nav-group-items { display: none !important; }
/* Collapsed: Remove group margin */
.sidebar.collapsed .nav-group { margin-bottom: 0; }

/* Nav Items */
.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  margin: 2px 10px;
  color: var(--theme-nav-text, rgba(255, 255, 255, 0.75));
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 460;
  cursor: pointer;
  transition: all 0.18s var(--ease-out);
  border-radius: 9px;
  white-space: nowrap;
  position: relative;
  letter-spacing: -0.008em;
  text-decoration: none;
}

.sidebar-nav .nav-item:hover {
  background: var(--theme-hover-bg, rgba(255, 255, 255, 0.08));
  color: var(--theme-text-hover, #fff);
  transform: translateX(2px);
}
.sidebar-nav .nav-item:hover i {
  opacity: 0.9;
  color: var(--theme-text-hover, #fff);
}

.sidebar-nav .nav-item:active {
  transform: translateX(2px) scale(0.985);
  transition-duration: 0.06s;
}

.sidebar-nav .nav-item.active {
  background: var(--theme-active-bg, rgba(6, 182, 212, 0.14));
  color: var(--theme-text-hover, #fff);
  font-weight: 600;
}
.sidebar-nav .nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--theme-accent, var(--accent));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 14px var(--theme-glow, rgba(6, 182, 212, 0.5)),
              6px 0 20px var(--theme-glow, rgba(6, 182, 212, 0.12));
}

.sidebar-nav .nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: all 0.18s var(--ease-out);
}
.sidebar-nav .nav-item.active i {
  opacity: 1;
  color: var(--theme-accent, var(--accent-light));
  filter: drop-shadow(0 0 8px var(--theme-glow, rgba(6, 182, 212, 0.4)));
}

/* Nav Badge */
.nav-badge {
  margin-left: auto;
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-light, #67e8f9);
  font-size: 9.5px;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 6px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(6, 182, 212, 0.08);
}
.sidebar.collapsed .nav-badge { display: none; }

/* ═══════════════════════════════════════
   FLYOUT SUBMENU — Collapsed sidebar hover
   ═══════════════════════════════════════ */
.submenu-flyout {
  position: fixed;
  min-width: 220px;
  background: var(--flyout-bg, linear-gradient(135deg, #1e1208 0%, #2a1a0e 100%));
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.08);
  padding: 8px 0;
  z-index: 9999;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: flyoutSlide 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Arrow pointer */
.submenu-flyout::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 14px;
  border: 8px solid transparent;
  border-right-color: var(--flyout-arrow, #1e1208);
}
.submenu-flyout-header {
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 4px;
}
.submenu-flyout-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
}
.submenu-flyout-item {
  display: block;
  padding: 10px 16px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.submenu-flyout-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, var(--primary), transparent);
  transition: width 0.2s ease;
}
.submenu-flyout-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  padding-left: 20px;
}
.submenu-flyout-item:hover::before {
  width: 3px;
}
.submenu-flyout-item.active-item {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.submenu-flyout-item.active-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}
.submenu-flyout-item .flyout-badge {
  float: right;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.submenu-flyout-item i {
  width: 16px;
  text-align: center;
  margin-right: 10px;
  font-size: 12px;
  opacity: 0.6;
}
.submenu-flyout-item:hover i {
  opacity: 1;
}
@keyframes flyoutSlide {
  0% { opacity: 0; transform: translateX(-10px) scale(0.95); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* Light theme flyout */
.sidebar.light-theme ~ .submenu-flyout,
body .submenu-flyout.flyout-light {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.08);
}
body .submenu-flyout.flyout-light::before {
  border-right-color: #ffffff;
}
body .submenu-flyout.flyout-light .submenu-flyout-title {
  color: rgba(0,0,0,0.4);
}
body .submenu-flyout.flyout-light .submenu-flyout-header {
  border-bottom-color: rgba(0,0,0,0.08);
}
body .submenu-flyout.flyout-light .submenu-flyout-item {
  color: rgba(0,0,0,0.75);
}
body .submenu-flyout.flyout-light .submenu-flyout-item:hover {
  color: rgba(0,0,0,0.95);
  background: rgba(0,0,0,0.04);
}

/* Profile flyout (collapsed sidebar) */
.profile-flyout { min-width: 240px; max-height: calc(100vh - 80px); overflow-y: auto; }
.profile-flyout-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px;
}
.profile-flyout-avatar { flex-shrink: 0; }
.profile-flyout-info { overflow: hidden; min-width: 0; }
.profile-flyout-name {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-flyout-role {
  font-size: 10.5px; color: rgba(255,255,255,0.4); font-weight: 450;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-flyout-xp { padding: 6px 16px 10px; }
.profile-flyout-xp-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px; color: rgba(255,255,255,0.55); font-weight: 500;
}
.profile-flyout-divider {
  height: 1px; margin: 4px 12px;
  background: rgba(255,255,255,0.08);
}
.profile-flyout-logout { color: rgba(255,120,120,0.85) !important; }
.profile-flyout-logout:hover { color: #ff6b6b !important; background: rgba(255,100,100,0.08) !important; }
.profile-flyout-logout i { color: rgba(255,120,120,0.7) !important; }

/* Light theme profile flyout overrides */
body .submenu-flyout.flyout-light .profile-flyout-name { color: rgba(0,0,0,0.85); }
body .submenu-flyout.flyout-light .profile-flyout-role { color: rgba(0,0,0,0.4); }
body .submenu-flyout.flyout-light .profile-flyout-xp-top { color: rgba(0,0,0,0.45); }
body .submenu-flyout.flyout-light .profile-flyout-divider { background: rgba(0,0,0,0.08); }
body .submenu-flyout.flyout-light .profile-flyout-logout { color: #dc2626 !important; }
body .submenu-flyout.flyout-light .profile-flyout-logout:hover { background: rgba(220,38,38,0.06) !important; }
body .submenu-flyout.flyout-light .profile-flyout-logout i { color: #dc2626 !important; }

/* XP row — distinct click target above user footer */
.sidebar-xp-row {
  padding: 10px 18px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
  margin-top: auto;
}
.sidebar-xp-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.08) 70%, transparent 100%);
}
.sidebar-xp-row:hover { background: rgba(255,255,255,0.04); }
.sidebar-xp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.sidebar-xp-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-xp-lv {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
}

/* Footer — user identity row */
.sidebar-footer {
  padding: 10px 18px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: default;
}
.sidebar-footer .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #9a5a25 0%, #c47d3e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sidebar-footer .user-avatar::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #140c04;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
  animation: status-pulse 3s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 12px rgba(16, 185, 129, 0.6); }
}
.sidebar-footer .user-info {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.sidebar-footer .user-name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.sidebar-footer .user-role {
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-weight: 450;
}
.sidebar-footer-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.sidebar.collapsed .sidebar-footer .user-info { display: none; }
.sidebar.collapsed .sidebar-footer-actions { display: none; }
.sidebar.collapsed .sidebar-xp-row { display: none; }
.sidebar.collapsed .sidebar-footer { justify-content: center; padding: 14px 8px; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 20px 0 18px; gap: 0; }
.sidebar.collapsed .sidebar-brand > div:not(.brand-icon) { display: none; }
.sidebar.collapsed .sidebar-brand .brand-icon { margin: 0; width: 40px; height: 40px; }
.sidebar.collapsed .sidebar-brand .brand-icon i { font-size: 17px; }

/* Theme Trigger */
.theme-trigger {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  margin-left: auto;
  transition: all 0.25s var(--ease-out);
  flex-shrink: 0;
}
.theme-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.12);
  transform: rotate(20deg) scale(1.05);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.04);
}


/* ═══════════════════════════════════════
   6. MAIN CONTENT & HEADER
   ═══════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  transition: margin-left var(--duration-slow) var(--ease-out);
  min-height: 100vh;
}
.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed); }

.top-header {
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.01);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.top-header .page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-in-out);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-toggle:hover { background: var(--gray-100); color: var(--gray-700); }

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  color: var(--text-tertiary);
  cursor: pointer;
  position: relative;
  transition: background-color var(--duration-fast) var(--ease-in-out), color var(--duration-fast) var(--ease-in-out), border-color var(--duration-fast) var(--ease-in-out);
  font-size: 14px;
}
.btn-icon:hover { background: var(--hover-bg); color: var(--text-primary); border-color: var(--text-quaternary); }

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 4px;
  border: 2px solid #fff;
  animation: pulse-badge 2s ease-in-out infinite;
}

/* Check-in Button */
.check-in-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s var(--ease-in-out), box-shadow 0.2s var(--ease-in-out), background-color 0.2s var(--ease-in-out);
  letter-spacing: -0.005em;
}
.check-in-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
}
.check-in-btn.checked-in {
  background: var(--gray-200);
  color: var(--gray-700);
  box-shadow: none;
}
.check-in-btn.checked-in:hover {
  background: var(--gray-300);
  transform: none;
}

/* Header Session Info — timer + active dot shown when checked in */
.header-session-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.header-session-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}
.header-session-timer {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  min-width: 52px;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.immersive-theme .header-session-info {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.2);
}
.immersive-theme .header-session-timer {
  color: #34d399;
}


/* ═══════════════════════════════════════
   7. PAGE CONTENT
   ═══════════════════════════════════════ */
.page-content { padding: 28px; }


/* ═══════════════════════════════════════
   8. WELCOME BAR
   ═══════════════════════════════════════ */
.welcome-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}
.welcome-bar .greeting {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0 0 2px;
  line-height: 1.2;
}
.welcome-bar .greeting-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.4;
}
.welcome-bar .date-display {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
}


/* ═══════════════════════════════════════
   9. CARDS — Base Panel
   ═══════════════════════════════════════ */
.card-panel {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-normal) var(--ease-in-out);
}
.card-panel:hover { box-shadow: var(--shadow-sm); }

.card-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--divider-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-panel-header h6 {
  margin: 0;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.card-panel-body { padding: 20px; }


/* ═══════════════════════════════════════
   10. KPI / STAT CARDS
   ═══════════════════════════════════════ */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.stat-card .stat-label {
  font-size: 11.5px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}


/* ═══════════════════════════════════════
   11. STATUS BADGES
   ═══════════════════════════════════════ */
.badge-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.badge-success { background: rgba(16, 185, 129, 0.1); color: #059669; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.badge-primary { background: rgba(126, 72, 28, 0.1); color: var(--primary); }
.badge-accent { background: rgba(6, 182, 212, 0.1); color: var(--accent-hover); }


/* ═══════════════════════════════════════
   12. FORM FIELDS
   ═══════════════════════════════════════ */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--input-border);
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  transition: border-color var(--duration-fast) var(--ease-in-out), box-shadow var(--duration-fast) var(--ease-in-out);
  background-color: var(--input-bg);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126, 72, 28, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: none;
}
.form-control::placeholder { color: var(--gray-400); }
.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}


/* ═══════════════════════════════════════
   13. BUTTONS
   ═══════════════════════════════════════ */
.btn {
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  transition: background-color var(--duration-fast) var(--ease-in-out), box-shadow var(--duration-fast) var(--ease-in-out), transform var(--duration-fast) var(--ease-in-out), border-color var(--duration-fast) var(--ease-in-out), color var(--duration-fast) var(--ease-in-out);
  letter-spacing: -0.005em;
}
.btn-primary-custom {
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(126, 72, 28, 0.3);
}
.btn-primary-custom:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow: 0 2px 12px rgba(6, 182, 212, 0.35);
  color: #fff;
}

/* ── Button Variants — DESIGNGOD S8 ── */
.btn-secondary {
  background: var(--card-bg);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: none;
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
  background: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(6, 182, 212, 0.3);
}
.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.35);
}

/* ── Button Sizes — DESIGNGOD S8 ── */
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 4px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-md { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }
.btn-xl { padding: 12px 24px; font-size: 15px; border-radius: var(--radius-md); }

/* ── Disabled States — DESIGNGOD S8/S9 ── */
.btn:disabled,
.btn.disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.form-control:disabled,
.form-select:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--gray-50);
  color: var(--gray-400);
}

/* ── Button with Icon ── */
.btn-icon-left { display: inline-flex; align-items: center; gap: 6px; }
.btn-icon-left i { font-size: 0.9em; }

/* Modal refinements */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}
.modal-header {
  border-bottom: 1px solid var(--gray-100);
  padding: 18px 24px;
}
.modal-header .modal-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.modal-body { padding: 24px; }
.modal-footer {
  border-top: 1px solid var(--gray-100);
  padding: 14px 24px;
}


/* ═══════════════════════════════════════
   14. QUICK ACTIONS BAR
   ═══════════════════════════════════════ */
.quick-actions-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.qa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
.qa-btn i {
  color: var(--primary);
  font-size: 13px;
  transition: color 0.2s;
}
.qa-btn:hover {
  border-color: var(--accent);
  color: var(--gray-800);
  box-shadow: 0 2px 8px rgba(6,182,212,0.1);
  transform: translateY(-1px);
}
.qa-btn:hover i {
  color: var(--accent);
  transform: scale(1.1);
}


/* ═══════════════════════════════════════
   15. SNAPSHOT STRIP
   ═══════════════════════════════════════ */
.snapshot-strip {
  margin-bottom: 20px !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 10px 16px !important;
}

.snapshot-label {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  padding: 4px 0;
  padding-right: 14px;
  margin-right: 10px;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  background: var(--card-bg);
  border-right: 2px solid var(--gray-100);
}
.snapshot-label i {
  color: var(--accent);
  margin-right: 4px;
}

.snapshot-items {
  display: flex;
  gap: 8px;
  animation: snapshotScroll 30s linear infinite;
  white-space: nowrap;
}
.snapshot-items:hover { animation-play-state: paused; }

.snapshot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(126,72,28,0.05);
  border: 1px solid rgba(126,72,28,0.1);
  color: var(--gray-600);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.snapshot-chip i {
  color: var(--primary-light);
  font-size: 10px;
}
.snapshot-chip:hover {
  background: rgba(6,182,212,0.08);
  border-color: var(--accent);
  color: var(--gray-800);
}

@keyframes snapshotScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ═══════════════════════════════════════
   16. DASHBOARD WIDGET GRID
   ═══════════════════════════════════════ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.widget-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.widget-card:hover { box-shadow: var(--shadow-sm); }
.page-content > .widget-card,
.page-content > .animate-in { margin-bottom: 20px; }
.page-content > :last-child { margin-bottom: 0; }

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider-color, var(--gray-100));
  flex-shrink: 0;
}
.widget-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.widget-action {
  color: var(--primary);
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s;
}
.widget-action:hover { color: var(--accent); }

/* Admin tab action buttons — solid style */
.admin-tab .widget-action {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  transition: background-color 0.2s, transform 0.15s;
  letter-spacing: 0.2px;
}
.admin-tab .widget-action:hover { background: var(--primary-hover, var(--primary)); color: #fff; transform: translateY(-1px); }

.section-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  margin-bottom: 24px;
}
.section-grid-half {
  grid-template-columns: 1fr 1fr;
}
.section-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* ─── Dashboard Widget Grid (Customisable Dashboard) ─── */
/* 6-col base: span 2=1/3, span 3=1/2, span 4=2/3, span 6=full */
/* Sizing via data-col-span attribute ONLY (no inline grid-column) */
.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 24px;
  grid-auto-flow: dense;
}
.dashboard-widget-grid .widget-item {
  min-height: 0;
  min-width: 0;
  grid-column: span 2; /* default 1/3 */
}
.dashboard-widget-grid .widget-item[data-col-span="3"] { grid-column: span 3; }
.dashboard-widget-grid .widget-item[data-col-span="4"] { grid-column: span 4; }
.dashboard-widget-grid .widget-item[data-col-span="6"] { grid-column: span 6; }

/* Customise mode */
.dashboard-widget-grid.customising .widget-item {
  outline: 2px dashed var(--gray-200);
  outline-offset: -2px;
  border-radius: var(--radius-lg);
  transition: outline-color 0.2s;
}
.dashboard-widget-grid.customising .widget-item:hover {
  outline-color: var(--primary);
}
.dashboard-widget-grid.customising .widget-item.sortable-ghost {
  opacity: 0.35;
  outline-color: var(--accent);
}
.dashboard-widget-grid.customising .widget-item.sortable-drag {
  box-shadow: 0 12px 36px rgba(0,0,0,.18);
  transform: rotate(1.5deg);
  z-index: 100;
}

/* Widget drag handle (visible only in customise mode) */
.widget-drag-handle {
  cursor: grab;
  padding: 2px 4px;
  color: var(--gray-300);
  font-size: 14px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.widget-drag-handle:active { cursor: grabbing; }
.widget-drag-handle:hover { color: var(--text-primary); }

/* Widget visibility toggle (customise mode) */
.widget-vis-toggle {
  cursor: pointer;
  padding: 2px 6px;
  color: var(--gray-300);
  font-size: 12px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.widget-vis-toggle:hover { color: var(--accent); }

/* Widget size pills (customise mode) */
.widget-size-pills {
  display: flex;
  align-items: center;
  gap: 4px;
}
.widget-size-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid transparent;
  transition: all 0.15s;
}
.widget-size-pill:hover { background: var(--gray-200); }
.widget-size-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Widget item count stepper (customise mode) */
.widget-item-stepper {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
}
.widget-item-stepper .stepper-btn {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
}
.widget-item-stepper .stepper-btn:hover:not(:disabled) { background: var(--gray-200); color: var(--text-primary); }
.widget-item-stepper .stepper-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.widget-item-stepper .stepper-value {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 18px;
  text-align: center;
}

/* Hidden widget in customise mode (greyed out) */
.widget-item.widget-hidden {
  opacity: 0.4;
  pointer-events: auto;
}
.widget-item.widget-hidden .widget-card {
  filter: grayscale(0.5);
}

/* Customise floating toolbar */
.customise-toolbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 10px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  z-index: 1000;
  animation: slideUpToolbar 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes slideUpToolbar {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.customise-toolbar .toolbar-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.customise-toolbar .toolbar-btn.primary {
  background: var(--primary);
  color: #fff;
}
.customise-toolbar .toolbar-btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.customise-toolbar .toolbar-btn.secondary {
  background: var(--gray-100);
  color: var(--text-primary);
}
.customise-toolbar .toolbar-btn.secondary:hover {
  background: var(--gray-200);
}
.customise-toolbar .toolbar-btn.danger {
  background: transparent;
  color: var(--danger, #ef4444);
}
.customise-toolbar .toolbar-btn.danger:hover {
  background: rgba(239,68,68,.08);
}
.customise-toolbar .toolbar-divider {
  width: 1px;
  height: 24px;
  background: var(--gray-200);
}


/* ═══════════════════════════════════════
   17. WELLBEING SCORE CIRCLE
   ═══════════════════════════════════════ */
.wellbeing-score {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 110px;
  margin: 2px 0;
}
.score-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent) 0deg,
    var(--accent) calc(3.6deg * var(--score)),
    var(--gray-200) calc(3.6deg * var(--score))
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.5s ease;
}
.score-circle::before {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  background: var(--card-bg);
  border-radius: 50%;
}
.score-value {
  position: relative;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
}

.mood-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
  padding-bottom: 10px;
}
.mood-btn {
  background: var(--gray-100);
  border: 2px solid transparent;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mood-btn:hover { transform: scale(1.15); }
.mood-btn.selected, .mood-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
}
.mood-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.01em;
}
.mood-btn.selected .mood-label,
.mood-btn.active .mood-label {
  color: var(--accent);
}


/* ═══════════════════════════════════════
   18. TIME TRACKER
   ═══════════════════════════════════════ */
.time-tracker {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.time-tracker-center {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.current-time {
  font-size: 3.4rem;
  font-weight: 800;
  color: var(--gray-900);
  margin: 6px 0 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}
.current-time span { display: inline-block; }
.timer-seconds { opacity: 0.6; font-size: 0.85em; }
.work-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 12px;
}
.work-status.offline { background: var(--gray-300); color: var(--gray-600); }
.work-status.on-break { background: var(--warning); color: #fff; }

.time-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 10px;
  margin-top: auto;
  border-top: 1px solid var(--gray-100);
}
.time-stat { text-align: center; flex: 1; }
.time-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  font-variant-numeric: tabular-nums;
}
.time-stat-label {
  font-size: 10px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
  margin-top: 2px;
}


/* ═══════════════════════════════════════
   19. TASKS (TODAY'S FOCUS)
   ═══════════════════════════════════════ */
.task-progress-bar { margin-bottom: 16px; }
.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.progress-text { font-size: 12px; color: var(--gray-500); }
.progress-percentage { font-weight: 700; color: var(--primary); }
.progress-track {
  height: 5px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  transition: width 0.5s ease;
  border-radius: var(--radius-full);
}

.tasks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  overflow: hidden;
}
.task-column {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 10px;
  min-height: 160px;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-200);
}
.column-title {
  font-weight: 700;
  font-size: 11px;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.priority-dot.high { background: var(--danger); }
.priority-dot.medium { background: var(--accent); }

.task-count {
  font-size: 10px;
  background: var(--card-bg);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  color: var(--gray-500);
  font-weight: 600;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
  padding-right: 3px;
}
.task-list::-webkit-scrollbar { width: 3px; }
.task-list::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

.task-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  cursor: pointer;
}
.task-compact:hover {
  transform: translateX(1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.task-compact.priority-high::before,
.task-compact.priority-medium::before,
.task-compact.priority-low::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.task-compact.priority-high::before { background: var(--danger); }
.task-compact.priority-medium::before { background: var(--accent); }
.task-compact.priority-low::before { background: var(--gray-300); }

.task-check {
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.task-text {
  flex: 1;
  font-size: 12px;
  color: var(--gray-800);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-compact.completed .task-text {
  text-decoration: line-through;
  opacity: 0.5;
}
.task-time {
  font-size: 10px;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.task-tag {
  font-size: 9px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-hover);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-weight: 600;
}

.add-task-quick {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s, transform 0.2s;
}
.add-task-quick:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}


/* ═══════════════════════════════════════
   20. LEARNING PROGRESS
   ═══════════════════════════════════════ */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.course-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}
.course-item:hover {
  background: var(--gray-100);
  transform: translateX(3px);
}
.course-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}
.course-info { flex: 1; min-width: 0; }
.course-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-800);
  margin-bottom: 4px;
}
.course-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--gray-500);
}
.progress-bar-sm {
  flex: 1;
  height: 4px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-sm .fill {
  height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  transition: width 0.8s ease;
  border-radius: var(--radius-full);
}


/* ═══════════════════════════════════════
   21. ANNOUNCEMENTS
   ═══════════════════════════════════════ */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.announcement {
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
  transition: background-color 0.2s;
}
.announcement:hover { background: var(--gray-100); }
.announcement.type-info { border-left-color: var(--info); }
.announcement.type-success { border-left-color: var(--success); }
.announcement.type-warning { border-left-color: var(--warning); }
.announcement-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.announcement-body {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
  margin-bottom: 4px;
}
.announcement-meta {
  font-size: 10px;
  color: var(--gray-500);
  font-weight: 500;
}


/* ═══════════════════════════════════════
   22. APPROVALS QUEUE
   ═══════════════════════════════════════ */
.approval-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.approval-tab {
  padding: 5px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.approval-tab:hover { background: var(--hover-bg); color: var(--gray-700); }
.approval-tab.active {
  background: var(--card-bg);
  color: var(--gray-900);
  box-shadow: var(--shadow-xs);
}
.approval-tab .count {
  background: var(--gray-200);
  padding: 0 5px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
}
.approval-tab.active .count {
  background: var(--primary);
  color: #fff;
}

.approval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 2px;
  border-bottom: 1px solid var(--gray-100);
  gap: 10px;
}
.approval-item:last-child { border-bottom: none; }
.approval-info { flex: 1; min-width: 0; }
.approval-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.3;
}
.approval-detail {
  font-size: 10px;
  color: var(--gray-500);
  margin-top: 1px;
  line-height: 1.3;
}
.approval-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.approval-actions .btn-sm {
  padding: 3px 8px;
  font-size: 10px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  cursor: pointer;
}
.btn-approve {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}
.btn-approve:hover { background: var(--success); color: #fff; }
.btn-reject {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}
.btn-reject:hover { background: var(--danger); color: #fff; }
.btn-respond {
  background: rgba(6, 182, 212, 0.1);
  color: #0891b2;
}
.btn-respond:hover { background: var(--accent); color: #fff; }


/* ═══════════════════════════════════════
   23. TEAM ENGAGEMENT PULSE
   ═══════════════════════════════════════ */
.pulse-score {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.pulse-big {
  font-size: 48px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1;
}
.pulse-big span {
  font-size: 20px;
  color: var(--gray-400);
}
.pulse-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pulse-trend {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}
.pulse-rank {
  font-size: 11px;
  color: var(--gray-500);
}

.pulse-chart {
  height: 120px;
  position: relative;
  margin: 12px 0;
  background: linear-gradient(180deg, rgba(126, 72, 28, 0.06) 0%, transparent 100%);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pulse-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: var(--primary);
  clip-path: polygon(
    0% 50%, 10% 45%, 20% 55%, 30% 40%, 40% 60%,
    50% 35%, 60% 50%, 70% 45%, 80% 55%,
    90% 40%, 100% 50%, 100% 100%, 0% 100%
  );
  opacity: 0.2;
}

.pulse-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.pulse-breakdown-item {
  text-align: center;
  padding: 8px 4px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}
.pulse-breakdown-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}
.pulse-breakdown-label {
  font-size: 9px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}


/* ═══════════════════════════════════════
   24. CALENDAR WIDGET
   ═══════════════════════════════════════ */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.calendar-month {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}
.calendar-nav {
  display: flex;
  gap: 4px;
}
.calendar-nav button {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  width: 26px;
  height: 26px;
  cursor: pointer;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.calendar-nav button:hover { background: var(--gray-50); }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
  margin-bottom: 14px;
}
.calendar-day-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  padding: 4px;
}
.calendar-day {
  font-size: 12px;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  color: var(--gray-600);
  font-weight: 500;
}
.calendar-day:hover { background: var(--gray-100); }
.calendar-day.today {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.calendar-day.has-event { position: relative; }
.calendar-day.has-event::after { display: none; }
.calendar-day.other-month { color: var(--gray-300); }

/* Dashboard Calendar colored dots */
.dwcal-dots {
  display: flex; gap: 2px; justify-content: center;
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.dwcal-dot {
  width: 5px; height: 5px; border-radius: 50%;
  box-shadow: 0 0 2px rgba(0,0,0,0.15);
  transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1);
}
.calendar-day:hover .dwcal-dot { transform: scale(1.5); }

/* Dashboard Calendar tooltip */
.dwcal-tooltip {
  display: none; position: absolute; z-index: 20;
  background: var(--gray-900); color: #fff;
  font-size: 11px; font-weight: 500; line-height: 1.55;
  padding: 8px 12px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  max-width: 220px; transform: translateX(-50%);
  pointer-events: none; white-space: pre-line;
}
.dwcal-tooltip::before {
  content: ''; position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-bottom: 5px solid var(--gray-900);
}

/* Dashboard Calendar events list — 2-per-row grid */
.calendar-events {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-top: 6px; position: relative;
}
.dwcal-event {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.15s ease;
  border: 1px solid var(--gray-100);
  min-width: 0;
}
.dwcal-event:hover {
  background: var(--gray-50); border-color: var(--gray-200);
}
.dwcal-event-bar {
  width: 3px; min-height: 24px; border-radius: 2px; flex-shrink: 0; margin-top: 1px;
}
.dwcal-event-info { flex: 1; min-width: 0; }
.dwcal-event-title {
  font-size: 11.5px; font-weight: 600; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.dwcal-event-meta {
  font-size: 10px; color: var(--gray-500); font-weight: 450; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dwcal-more {
  grid-column: 1 / -1; text-align: center;
  padding: 5px 0; cursor: pointer;
  font-size: 11px; font-weight: 600; color: var(--primary);
  border-radius: var(--radius-sm); transition: all 0.15s ease;
}
.dwcal-more:hover { background: var(--gray-50); }
.dwcal-more i { font-size: 9px; margin-left: 3px; }
.dwcal-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 14px 0; color: var(--gray-400);
  font-size: 12px; font-weight: 450;
}
.dwcal-empty i { margin-right: 5px; opacity: 0.5; }

/* Dashboard Calendar loading spinner */
.dwcal-loading { display: flex; justify-content: center; padding: 16px 0; }
.dwcal-spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--primary);
  animation: dwcal-spin 0.7s linear infinite;
}
@keyframes dwcal-spin { to { transform: rotate(360deg); } }

.event-join {
  font-size: 10px; font-weight: 600; color: var(--accent); cursor: pointer;
  padding: 3px 8px; border-radius: 4px; transition: background 0.15s;
}
.event-join:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }


/* ═══════════════════════════════════════
   25. INDUSTRY NEWS
   ═══════════════════════════════════════ */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-item {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--gray-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: background-color 0.2s, transform 0.2s;
  cursor: pointer;
}
.news-item:hover { background: var(--gray-100); transform: translateX(2px); }
.news-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
  line-height: 1.4;
}
.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--gray-500);
}
.news-source {
  background: var(--gray-200);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--gray-600);
}


/* ═══════════════════════════════════════
   26. FINANCIAL WELLNESS
   ═══════════════════════════════════════ */
.savings-goal { margin: 14px 0; }
.goal-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}
.goal-header .amount { font-weight: 700; color: var(--gray-800); }
.goal-header .total { color: var(--gray-400); }
.goal-progress {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.goal-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  transition: width 1s ease;
  border-radius: var(--radius-full);
}

.finance-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.finance-stat {
  padding: 10px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  text-align: center;
}
.finance-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}
.finance-stat-label {
  font-size: 10px;
  color: var(--gray-400);
  text-transform: uppercase;
  font-weight: 600;
}

.finance-tips {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 10px;
}
.finance-tips .tip-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-700);
}
.finance-tips .tip-header i { color: var(--accent); }
.finance-tips .tip-text {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.4;
}


/* ═══════════════════════════════════════
   27. RECOGNITION WALL
   ═══════════════════════════════════════ */
.recognition-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}
.recognition-item {
  padding: 10px 4px;
  border-bottom: 1px solid var(--divider-color, var(--gray-50));
}
.recognition-item:last-child {
  border-bottom: none;
}
.recognition-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.recognition-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
}
.recognition-from {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-800);
}
.recognition-from span {
  font-weight: 400;
  color: var(--gray-400);
}
.recognition-to {
  font-weight: 600;
  color: var(--primary);
}
.recognition-time {
  font-size: 10px;
  color: var(--gray-500);
  margin-left: auto;
}
.recognition-message {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.4;
  margin-bottom: 4px;
}
.recognition-reactions {
  display: flex;
  gap: 6px;
}
.reaction-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: var(--card-bg);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.reaction-btn:hover {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.05);
}
.reaction-btn.active {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.1);
}
.reaction-count { font-weight: 600; color: var(--gray-600); font-size: 10px; }


/* ═══════════════════════════════════════
   28. TOAST NOTIFICATIONS
   ═══════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-container .kaamos-toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  display: flex !important;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s var(--ease-out);
  max-width: 360px;
  opacity: 1 !important;
  pointer-events: auto;
}
.kaamos-toast.success { border-left-color: var(--success); }
.kaamos-toast.error { border-left-color: var(--danger); }
.kaamos-toast.info { border-left-color: var(--accent); }
.kaamos-toast.warning { border-left-color: var(--warning); }
.kaamos-toast i { font-size: 16px; flex-shrink: 0; }
.kaamos-toast.success i { color: var(--success); }
.kaamos-toast.error i { color: var(--danger); }
.kaamos-toast.info i { color: var(--accent); }
.kaamos-toast.warning i { color: var(--warning); }

.kaamos-toast.slide-out { animation: slideOut 0.3s var(--ease-in-out) forwards; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}


/* ═══════════════════════════════════════
   29. WELLBEING MODAL
   ═══════════════════════════════════════ */
.modal-backdrop-custom {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-backdrop-custom.show { display: flex; }

.modal-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  padding: 32px;
  box-shadow: var(--shadow-xl);
  animation: fadeInScale 0.3s var(--ease-out);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 8px;
}
.modal-card p {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 20px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
}

.feeling-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.feeling-option {
  padding: 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  background: var(--card-bg);
}
.feeling-option:hover { border-color: var(--accent); }
.feeling-option.selected {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.05);
}
.feeling-emoji { font-size: 24px; display: block; margin-bottom: 4px; }
.feeling-label { font-size: 12px; font-weight: 600; color: var(--gray-700); }

.journal-input {
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
}
.journal-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126, 72, 28, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.modal-submit {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s;
}
.modal-submit:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* ═══════════════════════════════════════
   29b. SUBMISSION DETAIL MODAL
   ═══════════════════════════════════════ */
.submission-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.submission-modal-backdrop.show { display: flex; }

.submission-modal {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  animation: fadeInScale 0.3s var(--ease-out);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.submission-modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.submission-modal-header .sm-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}
.submission-modal-header .sm-title-group {
  flex: 1;
  min-width: 0;
}
.submission-modal-header .sm-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.3;
}
.submission-modal-header .sm-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin: 4px 0 0;
}
.submission-modal-header .sm-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}
.submission-modal-header .sm-close:hover { color: var(--gray-700); }

.sm-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  margin-top: 4px;
}
.sm-status-badge {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sm-status-badge.pending { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.sm-status-badge.approved { background: rgba(16, 185, 129, 0.12); color: #059669; }
.sm-status-badge.rejected { background: rgba(239, 68, 68, 0.12); color: #dc2626; }
.sm-status-badge.cancelled { background: var(--gray-100); color: var(--gray-500); }
.sm-id-tag {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
  font-family: monospace;
}

.submission-modal-body {
  padding: 0 24px 24px;
  overflow-y: auto;
  flex: 1;
}

.sm-section {
  margin-top: 20px;
}
.sm-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  margin: 0 0 12px;
}

.sm-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sm-detail-item {
  background: var(--hover-bg, rgba(0,0,0,0.02));
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.sm-detail-item.full-width {
  grid-column: 1 / -1;
}
.sm-detail-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin-bottom: 4px;
}
.sm-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  word-break: break-word;
}
.sm-detail-value.amount {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

/* Approval Timeline */
.sm-timeline {
  position: relative;
  padding-left: 24px;
}
.sm-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--gray-200);
  border-radius: 2px;
}
.sm-timeline-item {
  position: relative;
  padding-bottom: 16px;
}
.sm-timeline-item:last-child { padding-bottom: 0; }
.sm-timeline-dot {
  position: absolute;
  left: -20px;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2.5px solid var(--gray-300);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-timeline-dot.approved { border-color: var(--success); background: var(--success); }
.sm-timeline-dot.approved::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 8px; color: #fff; }
.sm-timeline-dot.rejected { border-color: var(--danger); background: var(--danger); }
.sm-timeline-dot.rejected::after { content: '\f00d'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 8px; color: #fff; }
.sm-timeline-dot.pending { border-color: var(--warning); }
.sm-timeline-dot.pending::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
.sm-timeline-dot.waiting { border-color: var(--gray-300); }
.sm-timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}
.sm-timeline-meta {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}
.sm-timeline-comment {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--hover-bg, rgba(0,0,0,0.02));
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gray-200);
  font-style: italic;
}

.submission-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.submission-modal-footer .btn-withdraw {
  padding: 8px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  transition: all 0.2s;
}
.submission-modal-footer .btn-withdraw:hover {
  background: var(--danger);
  color: #fff;
}
.submission-modal-footer .btn-close-modal {
  padding: 8px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--gray-600);
  transition: all 0.2s;
}
.submission-modal-footer .btn-close-modal:hover {
  background: var(--gray-100);
}

/* Dark mode overrides */
[data-mode="dark"] .submission-modal { background: var(--card-bg); }
[data-mode="dark"] .sm-detail-item { background: rgba(255,255,255,0.04); }
[data-mode="dark"] .sm-timeline-comment { background: rgba(255,255,255,0.04); }
[data-mode="dark"] .submission-modal-footer { border-top-color: var(--gray-200); }

/* Immersive theme overrides */
.immersive-theme .submission-modal { background: var(--card-bg, #1a1a2e); }
.immersive-theme .sm-detail-item { background: rgba(255,255,255,0.05); }
.immersive-theme .sm-timeline-comment { background: rgba(255,255,255,0.05); }

/* ═══════════════════════════════════════
   30. ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.animate-in { animation: fadeInUp 0.4s var(--ease-out) both; }
.animate-in:nth-child(1) { animation-delay: 0.02s; }
.animate-in:nth-child(2) { animation-delay: 0.06s; }
.animate-in:nth-child(3) { animation-delay: 0.10s; }
.animate-in:nth-child(4) { animation-delay: 0.14s; }
.animate-in:nth-child(5) { animation-delay: 0.18s; }
.animate-in:nth-child(6) { animation-delay: 0.22s; }
.animate-in:nth-child(7) { animation-delay: 0.26s; }
.animate-in:nth-child(8) { animation-delay: 0.30s; }

.widget-card { animation: fadeInUp 0.35s var(--ease-out) both; }

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


/* ═══════════════════════════════════════
   31. THEME PICKER
   ═══════════════════════════════════════ */
.theme-panel {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: 100vh;
  background: var(--card-bg);
  z-index: 2100;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
  transition: right 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.theme-panel.open { right: 0; }

.theme-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  z-index: 2090;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.theme-panel-backdrop.show { opacity: 1; visibility: visible; }

.theme-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.theme-panel-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}
.theme-panel-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--gray-400);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.theme-panel-close:hover { background: var(--gray-100); color: var(--gray-700); }

.theme-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.theme-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gray-400);
  margin: 0 0 12px;
  padding-top: 8px;
}
.theme-section-label:first-child { padding-top: 0; }

.theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.theme-swatch {
  border-radius: var(--radius-md);
  padding: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-in-out), transform 0.2s var(--ease-in-out), box-shadow 0.2s var(--ease-in-out);
  background: var(--card-bg);
  position: relative;
}
.theme-swatch:hover {
  border-color: var(--gray-300);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.theme-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15), 0 4px 16px rgba(0,0,0,0.08);
}
.theme-swatch.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(6,182,212,0.4);
  z-index: 2;
}

.swatch-preview {
  height: 52px;
  border-radius: 8px 8px 0 0;
  position: relative;
  overflow: hidden;
}
.swatch-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  border-radius: 6px 0 0 0;
}
.swatch-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  left: 40%;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}
.swatch-content .swatch-bar {
  height: 5px;
  border-radius: 3px;
  opacity: 0.6;
}
.swatch-content .swatch-bar:first-child { width: 70%; }
.swatch-content .swatch-bar:nth-child(2) { width: 50%; opacity: 0.4; }
.swatch-content .swatch-bar:nth-child(3) { width: 85%; opacity: 0.3; }

.swatch-info {
  padding: 8px 10px;
  text-align: center;
}
.swatch-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: -0.01em;
}
.swatch-type {
  font-size: 9px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Theme gear button in sidebar footer — see Section 5 */

/* Light theme sidebar overrides */
.sidebar.light-theme .nav-section { color: rgba(0,0,0,0.35); }
.sidebar.light-theme .nav-section:hover { color: rgba(0,0,0,0.6); background: rgba(0,0,0,0.04); }
.sidebar.light-theme .nav-group.open > .nav-section { color: rgba(0,0,0,0.7); background: rgba(0,0,0,0.06); }
.sidebar.light-theme .sidebar-brand .brand-icon {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sidebar.light-theme .sidebar-brand::after {
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 30%, rgba(0,0,0,0.06) 70%, transparent 100%);
}
.sidebar.light-theme .sidebar-footer .user-avatar::after {
  border-color: #fff;
}
.sidebar.light-theme .sidebar-footer .user-name { color: var(--gray-800); }
.sidebar.light-theme .sidebar-footer .user-role { color: var(--gray-400); }
.sidebar.light-theme .sidebar-brand .brand-sub { color: rgba(0,0,0,0.35); }
.sidebar.light-theme .theme-trigger {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.35);
}
.sidebar.light-theme .theme-trigger:hover {
  background: rgba(0,0,0,0.08);
  color: rgba(0,0,0,0.6);
}
.sidebar.light-theme::-webkit-scrollbar-thumb,
.sidebar.light-theme .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.06); }
.sidebar.light-theme::-webkit-scrollbar-thumb:hover,
.sidebar.light-theme .sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.12); }
.sidebar.light-theme.collapsed .nav-item span { color: var(--gray-800); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
/* Light theme collapsed: icons must be dark, not white */
.sidebar.light-theme.collapsed .nav-section .nav-section-icon {
  color: rgba(0,0,0,0.45);
}
.sidebar.light-theme.collapsed .nav-section:hover {
  background: rgba(0,0,0,0.06);
}
.sidebar.light-theme.collapsed .nav-section:hover .nav-section-icon {
  color: var(--theme-accent, rgba(0,0,0,0.8));
}
/* Light theme collapsed: nav-item icons dark */
.sidebar.light-theme.collapsed .nav-item i {
  color: rgba(0,0,0,0.45);
}
.sidebar.light-theme.collapsed .nav-item:hover i {
  color: var(--theme-text-hover, rgba(0,0,0,0.8));
}
.sidebar.light-theme .nav-badge { background: var(--accent); color: #fff; }

/* ═══════════════════════════════════════
   IMMERSIVE THEME — Full-app dark overrides
   Applied via .immersive-theme on body
   ═══════════════════════════════════════ */
.immersive-theme .top-header {
  background: var(--header-bg);
  border-bottom-color: var(--header-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.immersive-theme .top-header .page-title,
.immersive-theme .breadcrumb-current {
  color: var(--text-primary);
}
.immersive-theme .breadcrumb-link {
  color: var(--text-tertiary);
}
.immersive-theme .breadcrumb-link:hover {
  color: var(--text-primary);
}
.immersive-theme .breadcrumb-sep {
  color: var(--text-quaternary);
}
.immersive-theme .sidebar-toggle {
  color: var(--text-tertiary);
}
.immersive-theme .sidebar-toggle:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.immersive-theme .notification-badge {
  border-color: var(--card-bg);
}
.immersive-theme .check-in-btn.checked-in {
  background: var(--hover-bg);
  color: var(--text-secondary);
}

/* Cards & Panels */
.immersive-theme .modal-content {
  background: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-primary);
}
.immersive-theme .modal-header {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .modal-footer {
  border-top-color: var(--divider-color);
}

/* Leave modal alert boxes — theme-aware */
.leave-bal-default {
  background: var(--gray-50); color: var(--gray-500);
}
.leave-bal-default i { color: var(--accent); }
.leave-bal-success {
  background: #d1fae5; color: #065f46;
}
.leave-bal-success i { color: #059669; }
.leave-bal-warn {
  background: #fef3c7; color: #92400e;
}
.leave-bal-warn i { color: #d97706; }
.leave-alert-warn {
  background: #fff3cd; border: 1px solid #ffc107; color: #856404;
}
.leave-alert-error {
  background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24;
}

/* Dark / Immersive overrides — dark bg, light text */
.immersive-theme .leave-bal-default {
  background: rgba(255,255,255,0.08) !important; color: rgba(255,255,255,0.6) !important;
}
.immersive-theme .leave-bal-default i { color: var(--accent) !important; }
.immersive-theme .leave-bal-success {
  background: #064e3b !important; color: #d1fae5 !important;
}
.immersive-theme .leave-bal-success i { color: #34d399 !important; }
.immersive-theme .leave-bal-warn {
  background: #78350f !important; color: #fef3c7 !important;
}
.immersive-theme .leave-bal-warn i { color: #fbbf24 !important; }
.immersive-theme .leave-alert-warn {
  background: #78350f !important; border-color: #92400e !important; color: #fef3c7 !important;
}
.immersive-theme .leave-alert-error {
  background: #7f1d1d !important; border-color: #991b1b !important; color: #fee2e2 !important;
}
.immersive-theme .modal-title {
  color: var(--text-primary);
}
.immersive-theme .btn-close {
  filter: invert(1) grayscale(100%) brightness(0.8);
}

/* Quick Actions */
.immersive-theme .qa-btn {
  background: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-secondary);
}
.immersive-theme .qa-btn:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
  border-color: var(--accent);
}

/* Snapshot Strip */
.immersive-theme .snapshot-strip {
  background: var(--card-bg);
  border-color: var(--card-border);
}
.immersive-theme .snapshot-label {
  color: var(--text-tertiary);
}

/* Stat cards */
.immersive-theme .stat-card .stat-value {
  color: var(--text-primary);
}
.immersive-theme .stat-card .stat-label {
  color: var(--text-muted, var(--text-tertiary));
}

/* Approval tabs */
.immersive-theme .approval-tab {
  color: var(--text-tertiary);
  border-color: var(--card-border);
}
.immersive-theme .approval-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}
.immersive-theme .approval-item {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .approval-name {
  color: var(--text-primary);
}
.immersive-theme .approval-detail {
  color: var(--text-tertiary);
}

/* Task items */
.immersive-theme .task-compact {
  border-color: var(--divider-color);
}
.immersive-theme .task-text {
  color: var(--text-primary);
}

/* Widget action links */
.immersive-theme .widget-action {
  color: var(--accent);
}
/* Admin tab action buttons — immersive */
.immersive-theme .admin-tab .widget-action {
  background: var(--accent);
  color: #fff;
}
.immersive-theme .admin-tab .widget-action:hover {
  background: var(--accent);
  filter: brightness(1.15);
  color: #fff;
}

/* Course items */
.immersive-theme .course-item {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .course-title {
  color: var(--text-primary);
}

/* Calendar */
.immersive-theme .calendar-month {
  color: var(--text-primary);
}
.immersive-theme .calendar-day-label {
  color: var(--text-quaternary);
}
.immersive-theme .calendar-day {
  color: var(--text-secondary);
}
.immersive-theme .calendar-day.today {
  background: var(--accent);
  color: #fff;
}
.immersive-theme .calendar-day.other-month {
  color: var(--text-quaternary);
}

/* Announcements */
.immersive-theme .announcement-title {
  color: var(--text-primary);
}
.immersive-theme .announcement-meta {
  color: var(--text-tertiary);
}

/* News */
.immersive-theme .news-title {
  color: var(--text-primary);
}
.immersive-theme .news-meta {
  color: var(--text-tertiary);
}

/* Finance / Savings */
.immersive-theme .finance-stat-label,
.immersive-theme .finance-stat-value {
  color: var(--text-primary);
}
.immersive-theme .finance-tips {
  background: var(--hover-bg);
  border-color: var(--card-border);
}
.immersive-theme .tip-header {
  color: var(--text-tertiary);
}
.immersive-theme .tip-text {
  color: var(--text-secondary);
}

/* Recognition */
.immersive-theme .recognition-from,
.immersive-theme .recognition-to {
  color: var(--text-primary);
}
.immersive-theme .recognition-msg {
  color: var(--text-secondary);
}
.immersive-theme .recognition-time {
  color: var(--text-quaternary);
}

/* Celebrations */
.immersive-theme .celebration-card {
  background: var(--hover-bg);
  border-color: var(--card-border);
}

/* AI Insights */
.immersive-theme .insight-card {
  background: var(--hover-bg);
  border-color: var(--card-border);
}

/* Pulse */
.immersive-theme .pulse-big {
  color: var(--text-primary);
}
.immersive-theme .pulse-rank {
  color: var(--text-tertiary);
}
.immersive-theme .pulse-breakdown-value {
  color: var(--text-primary);
}
.immersive-theme .pulse-breakdown-label {
  color: var(--text-tertiary);
}

/* Wellbeing */
.immersive-theme .score-value {
  color: var(--text-primary);
}

/* Time Tracker */
.immersive-theme .current-time {
  color: var(--text-primary);
}
.immersive-theme .time-stat-value {
  color: var(--text-primary);
}
.immersive-theme .time-stat-label {
  color: var(--text-tertiary);
}

/* Command palette */
.immersive-theme .cmd-palette {
  background: var(--card-bg);
  border-color: var(--card-border);
}
.immersive-theme .cmd-input {
  background: transparent;
  color: var(--text-primary);
}
.immersive-theme .cmd-input::placeholder {
  color: var(--text-quaternary);
}
.immersive-theme .cmd-result-item {
  color: var(--text-secondary);
}
.immersive-theme .cmd-result-item.active,
.immersive-theme .cmd-result-item:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.immersive-theme .cmd-footer {
  border-top-color: var(--divider-color);
  color: var(--text-quaternary);
}
.immersive-theme .cmd-kbd,
.immersive-theme kbd {
  background: var(--hover-bg);
  border-color: var(--card-border);
  color: var(--text-tertiary);
}

/* Notification panel */
.immersive-theme .notif-panel {
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.immersive-theme .notif-header {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .notif-title {
  color: var(--text-primary);
}
.immersive-theme .notif-item {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .notif-item:hover {
  background: var(--hover-bg);
}
.immersive-theme .notif-body {
  color: var(--text-secondary);
}

/* Shortcuts modal */
.immersive-theme .shortcuts-modal {
  background: var(--card-bg);
  border-color: var(--card-border);
}
.immersive-theme .shortcuts-header {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .shortcuts-header h3 {
  color: var(--text-primary);
}
.immersive-theme .shortcut-row {
  color: var(--text-secondary);
}

/* AI Chat panel */
.immersive-theme .ai-chat-panel {
  background: var(--card-bg);
  border-color: var(--card-border);
}
.immersive-theme .ai-chat-body {
  background: var(--content-bg, var(--page-bg, #121212));
}
.immersive-theme .ai-chat-footer {
  border-top-color: var(--divider-color);
  background: var(--card-bg);
}
.immersive-theme .ai-chat-input {
  background: var(--input-bg);
  color: var(--text-primary);
  border-color: var(--input-border);
}
.immersive-theme .ai-msg.bot {
  background: var(--hover-bg);
  color: var(--text-secondary);
}

/* Theme panel in immersive mode */
.immersive-theme .theme-panel {
  background: var(--card-bg);
  border-left: 1px solid var(--card-border);
  box-shadow: -8px 0 40px rgba(0,0,0,0.35);
}
.immersive-theme .theme-panel-header {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .theme-panel-header h3 {
  color: var(--text-primary);
}
.immersive-theme .theme-panel-close {
  color: var(--text-tertiary);
}
.immersive-theme .theme-panel-close:hover {
  background: var(--hover-bg);
  color: var(--text-primary);
}
.immersive-theme .theme-section-label {
  color: var(--text-quaternary);
}
.immersive-theme .theme-swatch {
  background: var(--hover-bg);
  border-color: transparent;
}
.immersive-theme .theme-swatch:hover {
  border-color: var(--text-quaternary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.immersive-theme .theme-swatch.active {
  border-color: var(--accent);
}
.immersive-theme .swatch-name {
  color: var(--text-primary);
}
.immersive-theme .swatch-type {
  color: var(--text-quaternary);
}
.immersive-theme .theme-panel-body {
  scrollbar-color: var(--text-quaternary) transparent;
}

/* Scrollbar in immersive */
.immersive-theme ::-webkit-scrollbar-thumb {
  background: var(--text-quaternary);
}
.immersive-theme ::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Data tables in pages */
.immersive-theme .data-table th {
  background: var(--hover-bg);
  color: var(--text-tertiary);
  border-bottom-color: var(--card-border);
}
.immersive-theme .data-table td {
  border-bottom-color: var(--divider-color);
  color: var(--text-secondary);
}
.immersive-theme .data-table tr:hover td {
  background: var(--hover-bg);
}

/* Tab bars in pages */
.immersive-theme .tab-bar {
  border-bottom-color: var(--card-border);
}
.immersive-theme .tab-bar .tab-btn {
  color: var(--text-tertiary);
}
.immersive-theme .tab-bar .tab-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* Mini stats in pages */
.immersive-theme .mini-stat {
  background: var(--card-bg);
  border-color: var(--card-border);
}
.immersive-theme .mini-stat-value {
  color: var(--text-primary);
}
.immersive-theme .mini-stat-label {
  color: var(--text-tertiary);
}

/* Employee cards */
.immersive-theme .emp-card {
  background: var(--card-bg);
  border-color: var(--card-border);
}
.immersive-theme .emp-name {
  color: var(--text-primary);
}

/* Kanban */
.immersive-theme .kanban-col {
  background: var(--hover-bg);
}
.immersive-theme .kanban-card {
  background: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-secondary);
}

/* Search bar */
.immersive-theme .search-bar input {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-primary);
}

/* General page text */
.immersive-theme h1, .immersive-theme h2, .immersive-theme h3,
.immersive-theme h4, .immersive-theme h5, .immersive-theme h6 {
  color: var(--text-primary);
}
.immersive-theme p {
  color: var(--text-secondary);
}
.immersive-theme .text-muted {
  color: var(--text-tertiary) !important;
}
.immersive-theme ::selection {
  background: var(--accent);
  color: #fff;
}

/* Form labels */
.immersive-theme .form-label {
  color: var(--text-tertiary);
}
.immersive-theme .form-control::placeholder,
.immersive-theme .form-select::placeholder {
  color: var(--text-quaternary);
}

/* Bootstrap select dropdown */
.immersive-theme .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff80' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Page-specific card backgrounds */
.immersive-theme .leave-card,
.immersive-theme .shift-grid td,
.immersive-theme .progress-card,
.immersive-theme .post-card,
.immersive-theme .ticket-card,
.immersive-theme .module-card,
.immersive-theme .org-node,
.immersive-theme .celebration-card,
.immersive-theme .insight-card,
.immersive-theme .tab-item.active,
.immersive-theme .marketplace-cat-btn.active {
  background: var(--card-bg);
  color: var(--text-primary);
}
.immersive-theme .tab-item {
  color: var(--text-tertiary);
}
.immersive-theme .marketplace-cat-btn {
  background: var(--hover-bg);
  color: var(--text-tertiary);
}
.immersive-theme .module-card {
  border-color: var(--card-border);
}

/* ── Wellbeing score circle ── */
.immersive-theme .score-circle::before {
  background: var(--card-bg);
}
.immersive-theme .score-value {
  color: var(--text-primary);
}
.immersive-theme .mood-btn {
  background: var(--hover-bg);
  border-color: transparent;
}
.immersive-theme .mood-btn:hover {
  background: var(--input-bg);
}
.immersive-theme .mood-btn.selected {
  background: rgba(6, 182, 212, 0.15);
}

/* ── Quick Action buttons ── */
.immersive-theme .qa-btn {
  background: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-secondary);
}
.immersive-theme .qa-btn i {
  color: var(--accent);
}
.immersive-theme .qa-btn:hover {
  background: var(--hover-bg);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* ── Snapshot strip ── */
.immersive-theme .snapshot-strip {
  background: var(--card-bg);
  border-color: var(--card-border);
}
.immersive-theme .snapshot-label {
  background: var(--card-bg);
  color: var(--accent);
  border-right-color: var(--divider-color);
}
.immersive-theme .snapshot-chip {
  background: var(--hover-bg);
  color: var(--text-secondary);
  border-color: var(--card-border);
}

/* ── Time tracker ── */
.immersive-theme .current-time {
  color: var(--text-primary);
}
.immersive-theme .time-stats {
  border-top-color: var(--divider-color);
}
.immersive-theme .time-stat-value {
  color: var(--text-primary);
}
.immersive-theme .time-stat-label {
  color: var(--text-tertiary);
}
.immersive-theme .work-status.offline {
  background: var(--hover-bg);
  color: var(--text-tertiary);
}

/* ── Tasks columns ── */
.immersive-theme .task-column {
  background: var(--hover-bg);
}
.immersive-theme .column-header {
  border-bottom-color: var(--card-border);
}
.immersive-theme .column-title {
  color: var(--text-secondary);
}
.immersive-theme .task-count {
  background: var(--card-bg);
  color: var(--text-tertiary);
}
.immersive-theme .task-compact {
  border-color: var(--divider-color);
}
.immersive-theme .task-text {
  color: var(--text-primary);
}
.immersive-theme .task-meta {
  color: var(--text-quaternary);
}
.immersive-theme .progress-text {
  color: var(--text-tertiary);
}
.immersive-theme .progress-track {
  background: var(--hover-bg);
}
.immersive-theme .add-task-quick {
  color: var(--accent);
  background: transparent;
  border-color: var(--card-border);
}
.immersive-theme .add-task-quick:hover {
  background: var(--hover-bg);
}

/* ── Approval items ── */
.immersive-theme .approval-tab {
  color: var(--text-tertiary);
  border-color: var(--card-border);
  background: transparent;
}
.immersive-theme .approval-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
  background: transparent;
}
.immersive-theme .approval-item {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .approval-name {
  color: var(--text-primary);
}
.immersive-theme .approval-detail {
  color: var(--text-tertiary);
}
.immersive-theme .btn-sm.btn-approve {
  background: rgba(16,185,129,0.15);
  color: #10b981;
  border-color: transparent;
}
.immersive-theme .btn-sm.btn-reject {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
  border-color: transparent;
}
.immersive-theme .btn-sm.btn-respond {
  background: rgba(6,182,212,0.15);
  color: #22d3ee;
  border-color: transparent;
}

/* ── Course progress ── */
.immersive-theme .course-item {
  border-bottom-color: var(--divider-color);
}
.immersive-theme .course-title {
  color: var(--text-primary);
}
.immersive-theme .course-meta {
  color: var(--text-tertiary);
}
.immersive-theme .course-progress-track {
  background: var(--hover-bg);
}

/* ── Calendar ── */
.immersive-theme .calendar-month {
  color: var(--text-primary);
}
.immersive-theme .calendar-nav button {
  color: var(--text-tertiary);
  background: var(--hover-bg);
  border-color: var(--card-border);
}
.immersive-theme .calendar-nav button:hover {
  color: var(--text-primary);
}
.immersive-theme .calendar-day {
  color: var(--text-secondary);
}
.immersive-theme .calendar-day:hover {
  background: var(--hover-bg);
}
.immersive-theme .calendar-day.other-month {
  color: var(--text-quaternary);
}
.immersive-theme .calendar-events {
  border-top-color: var(--divider-color);
}
.immersive-theme .dwcal-event { border-color: rgba(255,255,255,0.06); }
.immersive-theme .dwcal-event:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.immersive-theme .dwcal-event-title { color: rgba(255,255,255,0.9); }
.immersive-theme .dwcal-event-meta { color: rgba(255,255,255,0.5); }
.immersive-theme .dwcal-more { color: var(--primary); }
.immersive-theme .dwcal-more:hover { background: rgba(255,255,255,0.05); }
.immersive-theme .dwcal-empty { color: rgba(255,255,255,0.35); }
.immersive-theme .dwcal-spinner { border-color: rgba(255,255,255,0.1); border-top-color: var(--primary); }
.immersive-theme .dwcal-tooltip { background: rgba(20,20,30,0.95); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.immersive-theme .dwcal-tooltip::before { border-bottom-color: rgba(20,20,30,0.95); }
.immersive-theme .event-time {
  color: var(--text-tertiary);
}
.immersive-theme .event-title {
  color: var(--text-primary);
}

/* ── Announcements ── */
.immersive-theme .announcement-title {
  color: var(--text-primary);
}
.immersive-theme .announcement-body {
  color: var(--text-secondary);
}

/* ── Financial / savings ── */
.immersive-theme .goal-progress {
  background: var(--hover-bg);
}
.immersive-theme .finance-tips {
  background: var(--hover-bg);
  border-color: var(--card-border);
}

/* ── Pulse engagement ── */
.immersive-theme .pulse-chart .pulse-line {
  background: var(--hover-bg);
}
.immersive-theme .pulse-breakdown-item {
  border-color: var(--divider-color);
}

/* ── Recognition ── */
.immersive-theme .recognition-item {
  border-bottom-color: var(--divider-color);
}

/* ── News ── */
.immersive-theme .news-item {
  border-bottom-color: var(--divider-color);
}

/* ── Wellbeing streak text ── */
.immersive-theme .text-center.text-muted {
  color: var(--text-tertiary) !important;
}

/* ── Generic overrides for any remaining #fff backgrounds ── */
.immersive-theme .badge-status {
  border-color: transparent;
}
.immersive-theme .form-select option {
  background: var(--card-bg);
  color: var(--text-primary);
}

/* Immersive early (flash prevention) */
html.immersive-early body {
  color: #f0f0f0;
}


/* ═══════════════════════════════════════
   33. AI CHAT FAB & PANEL
   ═══════════════════════════════════════ */
.ai-fab {
  position: fixed;
  bottom: 32px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: all 0.3s var(--ease-out);
  overflow: hidden;
}
.ai-fab-icon { width: 110%; height: 110%; border-radius: 0; object-fit: cover; object-position: center 35%; pointer-events: none; transition: opacity 0.3s ease; }
.ai-fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.ai-fab.active { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); }

.ai-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 540px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.08);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s var(--ease-out);
}
.ai-chat-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ai-chat-header {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.ai-chat-brand { display: flex; align-items: center; gap: 10px; }
.ai-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
}
.ai-name { color: #fff; font-weight: 700; font-size: 14px; }
.ai-status { color: rgba(255,255,255,0.7); font-size: 10px; display: flex; align-items: center; gap: 5px; }
.ai-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(16,185,129,0.5);
  animation: status-pulse 3s ease-in-out infinite;
}
.ai-chat-actions { display: flex; gap: 4px; }
.ai-btn-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(255,255,255,0.1); border: none;
  color: rgba(255,255,255,0.7); cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ai-btn-icon:hover { background: rgba(255,255,255,0.2); color: #fff; }

.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-msg { display: flex; gap: 8px; max-width: 88%; animation: fadeInUp 0.25s var(--ease-out); }
.ai-msg.user { margin-left: auto; flex-direction: row-reverse; }
.ai-msg-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px;
}
.ai-msg.user .ai-msg-avatar { background: var(--gray-300); color: var(--gray-600); }
.ai-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-700);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
}
.ai-msg.user .ai-msg-bubble {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 14px 14px 4px 14px;
}
.ai-msg:not(.user) .ai-msg-bubble { border-radius: 14px 14px 14px 4px; }

.ai-typing { display: flex; gap: 4px; padding: 8px 0; }
.ai-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gray-400);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.ai-suggestions {
  padding: 8px 16px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-shrink: 0;
  border-top: 1px solid var(--gray-100);
  scrollbar-width: none;
}
.ai-suggestions::-webkit-scrollbar { display: none; }
.ai-suggestion-chip {
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.ai-suggestion-chip:hover {
  background: rgba(6,182,212,0.08);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.ai-chat-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: var(--card-bg);
}
.ai-voice-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%); border: none;
  color: #fff; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.ai-voice-btn:hover { transform: scale(1.08); opacity: 0.9; }
.ai-voice-btn.listening {
  background: var(--danger);
  color: #fff;
  animation: voicePulse 1s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

.ai-chat-input {
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.ai-chat-input:focus { border-color: var(--primary); }
.ai-chat-input::placeholder { color: var(--gray-400); }

.ai-send-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); border: none;
  color: #fff; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.ai-send-btn:hover {
  background: var(--accent);
  transform: scale(1.05);
}

/* ── Voice Mode ("Talk to Me") ── */
.ai-talk-btn { transition: all 0.3s; }
.ai-talk-btn.active {
  color: var(--accent) !important;
  background: rgba(6,182,212,0.15) !important;
  box-shadow: 0 0 0 2px rgba(6,182,212,0.3);
}

.ai-voice-mode-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(126,72,28,0.08));
  border-bottom: 1px solid var(--gray-100);
}
.ai-voice-mode-bar.active { display: flex; }

.ai-voice-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-voice-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}
.ai-voice-wave span {
  display: block;
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  animation: voiceWave 1.2s ease-in-out infinite;
}
.ai-voice-wave span:nth-child(1) { animation-delay: 0s; }
.ai-voice-wave span:nth-child(2) { animation-delay: 0.15s; }
.ai-voice-wave span:nth-child(3) { animation-delay: 0.3s; }
.ai-voice-wave span:nth-child(4) { animation-delay: 0.45s; }
.ai-voice-wave span:nth-child(5) { animation-delay: 0.6s; }

@keyframes voiceWave {
  0%, 100% { height: 6px; opacity: 0.5; }
  50% { height: 16px; opacity: 1; }
}

.ai-voice-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-voice-end {
  background: none;
  border: 1px solid var(--danger);
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.ai-voice-end:hover {
  background: var(--danger);
  color: #fff;
}

.ai-chat-panel.voice-mode {
  box-shadow: 0 8px 40px rgba(6,182,212,0.15), 0 0 0 1px rgba(6,182,212,0.2);
}

.ai-msg-bot.speaking .ai-msg-bubble {
  animation: speakingPulse 1.5s ease-in-out infinite;
}
@keyframes speakingPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6,182,212,0); }
  50% { box-shadow: 0 0 0 4px rgba(6,182,212,0.15); }
}


/* ═══════════════════════════════════════
   34. PAGE-SPECIFIC STYLES
   ═══════════════════════════════════════ */

/* Data Tables */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.data-table thead th {
  background: var(--gray-50);
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
}
.data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}
.data-table tbody tr:hover { background: var(--hover-bg, var(--gray-25)); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Page Header Row */
.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header-row .greeting { font-size: 22px; font-weight: 800; margin: 0 0 2px; letter-spacing: -0.02em; }
.page-header-row .greeting-sub { font-size: 13px; color: var(--gray-500); margin: 0; }
.page-actions { display: flex; gap: 8px; }

/* Tab Bar */
.tab-bar {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.tab-item {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-500);
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.tab-item:hover { background: var(--hover-bg); color: var(--gray-700); }
.tab-item.active { background: var(--card-bg); color: var(--gray-900); box-shadow: var(--shadow-xs); }

/* Mini Stat Card (used in subpages) */
.mini-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}
.mini-stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.mini-stat-value { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.mini-stat-label { font-size: 11px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }

/* Kanban Board */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.kanban-column {
  min-width: 280px; flex: 1;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.kanban-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-200);
}
.kanban-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.kanban-count {
  background: var(--card-bg); padding: 2px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; color: var(--gray-500);
}
.kanban-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 8px;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.kanban-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kanban-card-title { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 6px; }
.kanban-card-meta { font-size: 11px; color: var(--gray-400); display: flex; align-items: center; gap: 8px; }
.kanban-card-avatars { display: flex; margin-left: auto; }
.kanban-card-avatars .mini-avatar {
  width: 22px; height: 22px; border-radius: 50%; font-size: 8px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #fff; margin-left: -6px; border: 2px solid #fff;
}
.kanban-card-avatars .mini-avatar-img {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  margin-left: -6px; border: 2px solid #fff;
}

/* Team Member Picker (New Project Modal) */
.project-team-select {
  max-height: 200px; overflow-y: auto; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 4px;
}
.team-member-option {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s;
  margin: 0;
}
.team-member-option:hover { background: var(--gray-50); }
.team-member-option input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer;
}
.team-member-avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.team-member-name { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.team-member-role { font-size: 11px; color: var(--gray-400); margin-left: auto; }

/* Employee Card (Directory) */
.emp-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.emp-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.emp-avatar {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
}
.emp-avatar-img {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  object-fit: cover; display: block; border: 2px solid var(--gray-200);
}
.emp-name { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 2px; }
.emp-role { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.emp-dept { font-size: 10px; background: var(--gray-100); padding: 3px 10px; border-radius: var(--radius-full); color: var(--gray-600); font-weight: 600; display: inline-block; }

/* Employee Profile Page */
.emp-profile-header {
  background: var(--card-bg); border-radius: var(--radius-lg); padding: 28px;
  border: 1px solid var(--gray-200); display: flex; gap: 24px; align-items: flex-start; margin-bottom: 20px;
}
.emp-profile-avatar {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gray-200); flex-shrink: 0;
}
.emp-profile-info { flex: 1; }
.emp-profile-name { font-size: 22px; font-weight: 800; color: var(--gray-800); margin: 0 0 4px; }
.emp-profile-role { font-size: 14px; color: var(--gray-500); margin-bottom: 12px; }
.emp-profile-meta {
  display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; font-size: 12px; color: var(--gray-600);
}
.emp-profile-meta span { display: flex; align-items: center; gap: 6px; }
.emp-profile-meta i { color: var(--gray-400); font-size: 11px; }
.emp-profile-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.emp-profile-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px;
}
.emp-stat-card {
  background: var(--card-bg); border-radius: var(--radius-md); padding: 18px; text-align: center;
  border: 1px solid var(--gray-200);
}
.emp-stat-value { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.emp-stat-label { font-size: 11px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.emp-skills-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.emp-skill-tag {
  font-size: 12px; padding: 5px 14px; border-radius: var(--radius-full);
  background: var(--gray-100); color: var(--gray-700); font-weight: 600;
  border: 1px solid var(--gray-200);
}
.emp-detail-grid { display: flex; flex-direction: column; gap: 0; }
.emp-detail-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  border-bottom: 1px solid var(--gray-100); font-size: 13px;
}
.emp-detail-row:last-child { border-bottom: none; }
.emp-detail-label { color: var(--gray-500); font-weight: 600; }
.emp-detail-value { color: var(--gray-800); font-weight: 500; }

/* Timeline / Steps */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 14px; padding: 14px 0;
  position: relative;
}
.timeline-item:not(:last-child)::after {
  content: ''; position: absolute; left: 15px; top: 44px; bottom: -2px;
  width: 2px; background: var(--gray-200);
}
.timeline-dot {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; z-index: 1;
}
.timeline-dot.done { background: var(--success); }
.timeline-dot.active { background: var(--accent); }
.timeline-dot.pending { background: var(--gray-300); }
.timeline-content { flex: 1; }
.timeline-title { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.timeline-desc { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.timeline-time { font-size: 10px; color: var(--gray-500); font-weight: 600; margin-top: 4px; }

/* Post Card (Social Feed) */
.post-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
  margin-bottom: 16px;
}
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-content { font-size: 14px; line-height: 1.6; color: var(--gray-700); margin-bottom: 12px; }
.post-actions { display: flex; gap: 16px; padding-top: 12px; border-top: 1px solid var(--gray-100); }
.post-action { font-size: 12px; color: var(--gray-500); cursor: pointer; display: flex; align-items: center; gap: 5px; font-weight: 600; }
.post-action:hover { color: var(--primary); }

/* Progress Card */
.progress-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--gray-200);
}
.progress-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.progress-card-title { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.progress-ring {
  width: 60px; height: 60px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg, var(--accent) calc(3.6deg * var(--pct)), var(--gray-200) calc(3.6deg * var(--pct)));
  display: flex; align-items: center; justify-content: center; position: relative;
}
.progress-ring::before {
  content: ''; position: absolute;
  width: 48px; height: 48px; background: var(--card-bg); border-radius: 50%;
}
.progress-ring-val { position: relative; font-size: 13px; font-weight: 800; }

/* Search Bar */
.search-bar-wrap {
  position: relative; max-width: 320px;
}
.search-bar-wrap i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); font-size: 13px;
}
.search-bar {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.search-bar:focus { border-color: var(--primary); }

/* Shift Calendar Grid */
.shift-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.shift-cell {
  padding: 8px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 12px;
  min-height: 70px;
  border: 1px solid var(--gray-100);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.shift-cell:hover { border-color: var(--accent); background: rgba(6,182,212,0.03); }
.shift-cell.morning { background: rgba(59,130,246,0.05); border-color: rgba(59,130,246,0.15); }
.shift-cell.evening { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.15); }
.shift-cell.night { background: rgba(99,102,241,0.05); border-color: rgba(99,102,241,0.15); }
.shift-cell.off { background: var(--gray-50); color: var(--gray-400); }

/* Leave Balance Card */
.leave-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.leave-card:hover { box-shadow: var(--shadow-sm); }
.leave-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); margin-bottom: 4px; }
.leave-count { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.leave-total { font-size: 11px; color: var(--gray-400); margin-top: 4px; }


/* ═══════════════════════════════════════
   35. COMMAND PALETTE (Ctrl+K)
   ═══════════════════════════════════════ */
.cmd-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px); z-index: 5000;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.cmd-backdrop.show { opacity: 1; pointer-events: auto; }
.cmd-palette {
  position: fixed; top: 20%; left: 50%; transform: translateX(-50%) scale(0.96);
  width: 560px; max-width: 92vw; background: var(--card-bg);
  border-radius: var(--radius-xl); box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  z-index: 5001; opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  overflow: hidden;
}
.cmd-palette.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(1); }
.cmd-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
}
.cmd-input-wrap i { color: var(--gray-400); font-size: 16px; flex-shrink: 0; }
.cmd-input {
  flex: 1; border: none; outline: none; font-size: 16px;
  font-family: inherit; color: var(--gray-900); background: transparent;
}
.cmd-input::placeholder { color: var(--gray-400); }
.cmd-kbd {
  background: var(--gray-100); padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600; color: var(--gray-500);
  border: 1px solid var(--gray-200); flex-shrink: 0;
}
.cmd-results {
  max-height: 340px; overflow-y: auto; padding: 8px;
}
.cmd-results::-webkit-scrollbar { width: 4px; }
.cmd-results::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 2px; }
.cmd-result-group { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--gray-400); padding: 8px 12px 4px; }
.cmd-result-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-md); cursor: pointer; transition: background 0.1s;
}
.cmd-result-item:hover, .cmd-result-item.active { background: var(--gray-50); }
.cmd-result-item.active { background: rgba(126,72,28,0.06); }
.cmd-result-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-50); color: var(--gray-500); font-size: 13px; flex-shrink: 0;
}
.cmd-result-item.active .cmd-result-icon { background: rgba(126,72,28,0.1); color: var(--primary); }
.cmd-result-info { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cmd-result-text { font-size: 14px; font-weight: 500; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-result-sub { font-size: 11px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-result-hint { font-size: 11px; color: var(--gray-400); flex-shrink: 0; margin-left: auto; }
.cmd-result-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.cmd-result-text mark { background: rgba(6,182,212,0.15); color: var(--accent); border-radius: 2px; padding: 0 1px; }
.cmd-empty { padding: 24px 16px; text-align: center; font-size: 13px; color: var(--gray-400); }
.cmd-person-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cmd-person-initials { display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.cmd-person-info { display: flex; flex-direction: column !important; align-items: flex-start !important; gap: 1px !important; }
.cmd-person-item .cmd-result-sub { font-size: 11px; color: var(--gray-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-people-loading { padding: 12px 16px; font-size: 12px; color: var(--gray-400); display: flex; align-items: center; gap: 8px; }
.cmd-people-loading i { color: var(--accent); }
.cmd-footer {
  display: flex; gap: 16px; padding: 10px 20px;
  border-top: 1px solid var(--gray-100);
  font-size: 11px; color: var(--gray-400);
}
.cmd-footer kbd {
  background: var(--gray-100); padding: 1px 5px; border-radius: 3px;
  font-size: 10px; font-weight: 700; border: 1px solid var(--gray-200);
  margin: 0 2px;
}

/* ═══════════════════════════════════════
   36. NOTIFICATION PANEL
   ═══════════════════════════════════════ */
.notif-wrapper { position: relative; }
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 360px; max-height: 480px; background: var(--card-bg);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-100);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: all 0.2s var(--ease-out); z-index: 3000;
  display: flex; flex-direction: column;
}
.notif-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
}
.notif-title { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.notif-mark-read {
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: none; border: none; cursor: pointer;
}
.notif-mark-read:hover { text-decoration: underline; }
.notif-list { overflow-y: auto; max-height: 400px; }
.notif-item {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--gray-50); cursor: pointer;
  transition: background 0.1s;
}
.notif-item:hover { background: var(--gray-25); }
.notif-item.unread { background: rgba(6,182,212,0.03); }
.notif-item.unread::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: 6px;
}
.notif-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 12px;
}
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 13px; color: var(--gray-700); line-height: 1.4; }
.notif-text strong { font-weight: 600; color: var(--gray-900); }
.notif-time { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* ═══════════════════════════════════════
   37. BREADCRUMBS
   ═══════════════════════════════════════ */
.breadcrumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--gray-400);
}
.breadcrumb-link {
  color: var(--gray-400); text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb-link:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--gray-300); font-size: 11px; }
.breadcrumb-current {
  color: var(--gray-700); font-weight: 600;
  max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ═══════════════════════════════════════
   38. KEYBOARD SHORTCUTS MODAL
   ═══════════════════════════════════════ */
.shortcuts-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 4000; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.shortcuts-backdrop.show { opacity: 1; pointer-events: auto; }
.shortcuts-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.96);
  width: 520px; max-width: 92vw; background: var(--card-bg);
  border-radius: var(--radius-xl); box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  z-index: 4001; opacity: 0; pointer-events: none;
  transition: all 0.2s var(--ease-out);
}
.shortcuts-modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.shortcuts-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px; border-bottom: 1px solid var(--gray-100);
}
.shortcuts-header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.shortcuts-close {
  width: 28px; height: 28px; border: none; background: var(--gray-100);
  border-radius: 50%; cursor: pointer; font-size: 16px; color: var(--gray-500);
  display: flex; align-items: center; justify-content: center;
}
.shortcuts-close:hover { background: var(--gray-200); }
.shortcuts-body {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; padding: 20px 24px 24px;
}
.shortcuts-section {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--gray-400); margin-bottom: 12px;
}
.shortcut-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 13px; color: var(--gray-600);
}
.shortcut-row kbd {
  background: var(--gray-100); padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 700; color: var(--gray-600);
  border: 1px solid var(--gray-200); margin-left: 4px;
}

/* ═══════════════════════════════════════
   39. ORG CHART
   ═══════════════════════════════════════ */
.org-tree { text-align: center; padding: 20px 0; }
.org-level { display: flex; justify-content: center; gap: 16px; margin-bottom: 8px; position: relative; }
.org-node {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 14px 20px; background: var(--card-bg); border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200); cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  min-width: 140px; position: relative;
}
.org-node:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.org-node.ceo { border-color: var(--primary); background: rgba(126,72,28,0.03); }
.org-node.current { border-color: var(--accent); background: rgba(6,182,212,0.05); }
.org-node-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.org-node-name { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.org-node-title { font-size: 11px; color: var(--gray-500); }
.org-node-count { font-size: 10px; color: var(--accent); font-weight: 700; }
.org-connector {
  width: 2px; height: 20px; background: var(--gray-200);
  margin: 0 auto;
}
.org-h-line {
  height: 2px; background: var(--gray-200); margin: 0 auto 0;
}

/* ═══════════════════════════════════════
   40. CELEBRATIONS & CONFETTI
   ═══════════════════════════════════════ */
.celebration-card {
  background: linear-gradient(135deg, rgba(126,72,28,0.04) 0%, rgba(6,182,212,0.04) 100%);
  border: 1px solid rgba(6,182,212,0.15);
  border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; transition: all 0.2s;
}
.celebration-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.celebration-emoji { font-size: 28px; flex-shrink: 0; }
.celebration-info { flex: 1; min-width: 0; }
.celebration-name { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.celebration-detail { font-size: 12px; color: var(--gray-500); }
.celebration-action {
  font-size: 11px; font-weight: 600; color: var(--accent); cursor: pointer;
  background: none; border: none; white-space: nowrap;
}
.celebration-action:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   41. AI INSIGHTS CARD
   ═══════════════════════════════════════ */
.insight-card {
  display: flex; gap: 12px; padding: 12px 14px;
  background: rgba(126,72,28,0.03); border-radius: var(--radius-md);
  border-left: 3px solid var(--primary); margin-bottom: 10px;
  cursor: pointer; transition: all 0.15s;
}
.insight-card:hover { background: rgba(126,72,28,0.06); }
.insight-card.warning { border-left-color: var(--warning); background: rgba(245,158,11,0.03); }
.insight-card.success { border-left-color: var(--success); background: rgba(16,185,129,0.03); }
.insight-card.danger { border-left-color: var(--danger); background: rgba(239,68,68,0.03); }
.insight-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(126,72,28,0.08); color: var(--primary);
  font-size: 12px; flex-shrink: 0;
}
.insight-card.warning .insight-icon { background: rgba(245,158,11,0.1); color: var(--warning); }
.insight-card.success .insight-icon { background: rgba(16,185,129,0.1); color: var(--success); }
.insight-text { flex: 1; font-size: 12px; color: var(--gray-600); line-height: 1.5; }
.insight-text strong { color: var(--gray-800); }

/* ═══════════════════════════════════════
   42. TICKET / HELPDESK STYLES
   ═══════════════════════════════════════ */
.ticket-card {
  padding: 14px 16px; border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); margin-bottom: 10px;
  cursor: pointer; transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.ticket-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.ticket-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ticket-id { font-size: 12px; font-weight: 700; color: var(--accent); }
.ticket-priority {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: var(--radius-full);
}
.ticket-priority.high { background: rgba(239,68,68,0.1); color: #dc2626; }
.ticket-priority.medium { background: rgba(245,158,11,0.1); color: #d97706; }
.ticket-priority.low { background: rgba(59,130,246,0.1); color: #2563eb; }
.ticket-subject { font-size: 14px; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }
.ticket-meta { font-size: 11px; color: var(--gray-500); display: flex; gap: 12px; }

/* ── Marketplace ── */
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.module-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  position: relative;
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.module-card-header {
  padding: 20px 20px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.module-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  flex-shrink: 0;
}
.module-info { flex: 1; min-width: 0; }
.module-name {
  font-size: 16px; font-weight: 700; color: var(--gray-800);
  display: flex; align-items: center; gap: 8px;
}
.module-tagline { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

.module-tier {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px; letter-spacing: 0.5px;
}
.module-tier.free { background: rgba(16,185,129,0.1); color: #059669; }
.module-tier.pro { background: rgba(126,72,28,0.1); color: #7e481c; }
.module-tier.enterprise { background: rgba(124,58,237,0.1); color: #7c3aed; }

.module-card-body {
  padding: 0 20px 16px;
}
.module-desc {
  font-size: 13px; color: var(--gray-500); line-height: 1.5;
  margin-bottom: 12px;
}
.module-features {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.module-feature-tag {
  font-size: 10px; padding: 3px 8px;
  border-radius: 6px; background: var(--gray-50);
  color: var(--gray-600); font-weight: 500;
}

.module-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-50);
  display: flex; align-items: center; justify-content: space-between;
}
.module-meta {
  display: flex; gap: 12px; font-size: 11px; color: var(--gray-400);
}
.module-meta i { margin-right: 3px; }

.module-toggle {
  padding: 6px 18px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s;
}
.module-toggle.enable {
  background: var(--primary); color: #fff;
}
.module-toggle.enable:hover { opacity: 0.9; transform: scale(1.02); }
.module-toggle.enabled {
  background: rgba(16,185,129,0.1); color: #059669;
  border: 1px solid rgba(16,185,129,0.3);
}
.module-toggle.enabled:hover {
  background: rgba(239,68,68,0.1); color: #dc2626;
  border-color: rgba(239,68,68,0.3);
}

.marketplace-categories {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.marketplace-cat-btn {
  padding: 6px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--gray-200);
  background: var(--card-bg); color: var(--gray-600);
  cursor: pointer; transition: all 0.2s;
}
.marketplace-cat-btn:hover { border-color: var(--primary); color: var(--primary); }
.marketplace-cat-btn.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}

/* Addon nav section in sidebar */
.addon-nav-section {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; padding: 16px 20px 6px;
  color: var(--gray-400); opacity: 0.7;
}

/* ═══════════════════════════════════════
   42.7 SIDEBAR XP BAR (GAMIFIED) — merged into footer
   ═══════════════════════════════════════ */
@keyframes xp-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes flame-dance {
  0%, 100% { transform: scale(1) rotate(-1deg); }
  33% { transform: scale(1.12) rotate(2deg); }
  66% { transform: scale(1.06) rotate(-1.5deg); }
}
.sidebar-xp-levelname {
  font-size: 10px; font-weight: 700;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.sidebar-xp-levelname i {
  -webkit-text-fill-color: #fbbf24;
  font-size: 8px;
  margin-right: 3px;
  filter: drop-shadow(0 0 3px rgba(251,191,36,0.4));
}
.sidebar-xp-streak {
  font-size: 9px; font-weight: 600;
  color: #fb923c;
  display: flex; align-items: center; gap: 2px;
}
.sidebar-xp-streak i {
  font-size: 9px;
  animation: flame-dance 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 3px rgba(251,146,60,0.5));
}
.sidebar-xp-track {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: visible;
  position: relative;
}
.sidebar-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 30%, #06b6d4 65%, #22d3ee 100%);
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.sidebar-xp-fill.xp-scored {
  background-size: 200% 100%;
  animation: xp-shimmer 1.5s linear 1;
}
.sidebar-xp-fill::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 4px rgba(34,211,238,0.6), 0 0 10px rgba(34,211,238,0.25);
  opacity: 0;
  transition: opacity 0.3s;
}
.sidebar-xp-row:hover .sidebar-xp-fill::after { opacity: 1; }
/* Light sidebar theme overrides */
.sidebar.light-theme .sidebar-xp-track { background: rgba(0,0,0,0.06); }
.sidebar.light-theme .sidebar-xp-row:hover { background: rgba(0,0,0,0.04); }
.sidebar.light-theme .sidebar-xp-row::before {
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.06) 30%, rgba(0,0,0,0.06) 70%, transparent 100%);
}
.sidebar.light-theme .sidebar-xp-lv { color: rgba(0,0,0,0.25); }

/* ═══════════════════════════════════════
   42.8 GAMIFICATION / XP BADGES
   ═══════════════════════════════════════ */
.xp-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.xp-badge-card {
  text-align: center;
  padding: 16px 10px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  transition: transform 0.2s, box-shadow 0.2s;
}
.xp-badge-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.xp-badge-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  font-size: 18px;
}
.xp-badge-name {
  font-size: 12px; font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}
.xp-badge-desc {
  font-size: 10px; color: var(--gray-500);
  line-height: 1.4;
}

/* ═══════════════════════════════════════
   43. PAGE TRANSITIONS
   ═══════════════════════════════════════ */
.page-content { animation: pageFade 0.3s var(--ease-out); }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   44. LOADING SKELETON
   ═══════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }
.skeleton-card { height: 100px; border-radius: var(--radius-md); }
.skeleton-circle { width: 40px; height: 40px; border-radius: 50%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════
   45. UTILITIES
   ═══════════════════════════════════════ */
.separator { height: 1px; background: var(--gray-100); margin: 16px 0; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }


/* ═══════════════════════════════════════
   46. EMPTY STATES — DESIGNGOD S18
   ═══════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.empty-state-desc {
  font-size: 13px;
  color: var(--gray-500);
  max-width: 320px;
  line-height: 1.5;
  margin: 0 0 20px;
}
.empty-state-action {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
}
.empty-state-action:hover {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}


/* ═══════════════════════════════════════
   47. TABLE ENHANCEMENTS — DESIGNGOD S11
   ═══════════════════════════════════════ */
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--gray-50);
}
.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background var(--duration-fast) var(--ease-in-out);
}
.data-table th.sortable:hover {
  background: var(--gray-100);
}
.data-table th.sortable::after {
  content: '\f0dc';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  margin-left: 6px;
  color: var(--gray-300);
  transition: color var(--duration-fast);
}
.data-table th.sortable.asc::after { content: '\f0de'; color: var(--primary); }
.data-table th.sortable.desc::after { content: '\f0dd'; color: var(--primary); }

.data-table tbody tr {
  transition: background var(--duration-fast) var(--ease-in-out);
}
.data-table tbody tr.selected {
  background: rgba(126, 72, 28, 0.04);
}
.data-table.striped tbody tr:nth-child(even) {
  background: var(--gray-25);
}
.data-table.striped tbody tr:nth-child(even):hover {
  background: var(--gray-50);
}

/* Table scroll wrapper */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}
.table-scroll-wrap .data-table {
  margin: 0;
}
.table-scroll-wrap .data-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.table-scroll-wrap .data-table thead th:last-child { border-radius: 0 var(--radius-md) 0 0; }


/* ═══════════════════════════════════════
   48. CARD CONSISTENCY — DESIGNGOD S10
   ═══════════════════════════════════════ */
.widget-card,
.stat-card,
.card-panel,
.emp-card,
.post-card,
.progress-card,
.leave-card,
.module-card,
.ticket-card,
.org-node,
.kanban-card,
.celebration-card {
  transition: box-shadow var(--duration-normal) var(--ease-out), transform var(--duration-normal) var(--ease-out), border-color var(--duration-normal) var(--ease-out);
}
.widget-card:hover,
.card-panel:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.stat-card:hover,
.emp-card:hover,
.module-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.kanban-card:hover,
.ticket-card:hover,
.celebration-card:hover,
.leave-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}


/* ═══════════════════════════════════════
   49. TOAST UPGRADE — DESIGNGOD S15
   ═══════════════════════════════════════ */
.kaamos-toast {
  position: relative;
  overflow: hidden;
}
.toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--duration-fast);
}
.toast-close:hover {
  background: var(--gray-100);
  color: var(--gray-600);
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-md) 0;
  animation: toastCountdown 4s linear forwards;
}
.kaamos-toast.success .toast-progress { background: var(--success); }
.kaamos-toast.error .toast-progress { background: var(--danger); }
.kaamos-toast.info .toast-progress { background: var(--accent); }
.kaamos-toast.warning .toast-progress { background: var(--warning); }
@keyframes toastCountdown {
  from { width: 100%; }
  to { width: 0%; }
}


/* ═══════════════════════════════════════
   50. AVATAR SYSTEM — DESIGNGOD S10
   ═══════════════════════════════════════ */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-xs { width: 24px; height: 24px; font-size: 9px; }
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-xl { width: 80px; height: 80px; font-size: 24px; }
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-group {
  display: flex;
}
.avatar-group .avatar {
  margin-left: -8px;
  border: 2px solid #fff;
}
.avatar-group .avatar:first-child { margin-left: 0; }

/* Online indicator */
.avatar-online {
  position: relative;
}
.avatar-online::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 25%;
  height: 25%;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #fff;
}


/* ═══════════════════════════════════════
   51. BADGE SYSTEM — Extended
   ═══════════════════════════════════════ */
.badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-dot.success { background: var(--success); }
.badge-dot.warning { background: var(--warning); }
.badge-dot.danger { background: var(--danger); }
.badge-dot.info { background: var(--info); }
.badge-dot.neutral { background: var(--gray-400); }

.badge-outline {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid;
  background: transparent;
}
.badge-outline.success { border-color: var(--success); color: #059669; }
.badge-outline.warning { border-color: var(--warning); color: #d97706; }
.badge-outline.danger { border-color: var(--danger); color: #dc2626; }
.badge-outline.info { border-color: var(--info); color: #2563eb; }


/* ═══════════════════════════════════════
   52. DIVIDER & SECTION UTILITIES
   ═══════════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 16px 0;
  border: none;
}
.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* Section header with action */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.section-action {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: color var(--duration-fast);
}
.section-action:hover { color: var(--accent); }


/* ═══════════════════════════════════════
   53. TOOLTIP — DESIGNGOD S10
   ═══════════════════════════════════════ */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--gray-900);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
  z-index: 9000;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* My Day 3-col grid (responsive target) */
.myday-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ═══════════════════════════════════════
   32. RESPONSIVE — Mobile-First
   ═══════════════════════════════════════ */

/* ─── Tablet (≤992px) ─── */
/* ─── Medium screens: 3-col → 2-col, section-grid stays ─── */
@media (max-width: 1100px) {
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-widget-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-widget-grid .widget-item,
  .dashboard-widget-grid .widget-item[data-col-span="2"],
  .dashboard-widget-grid .widget-item[data-col-span="3"] { grid-column: span 1 !important; }
  .dashboard-widget-grid .widget-item[data-col-span="4"],
  .dashboard-widget-grid .widget-item[data-col-span="6"] { grid-column: span 2 !important; }
  .section-grid { grid-template-columns: 1fr 1fr; }
  .section-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 992px) {
  .section-grid { grid-template-columns: 1fr; }
  .section-grid-half { grid-template-columns: 1fr; }
  .section-grid-3 { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-widget-grid { grid-template-columns: 1fr; }
  .dashboard-widget-grid .widget-item,
  .dashboard-widget-grid .widget-item[data-col-span="2"],
  .dashboard-widget-grid .widget-item[data-col-span="3"],
  .dashboard-widget-grid .widget-item[data-col-span="4"],
  .dashboard-widget-grid .widget-item[data-col-span="6"] { grid-column: span 1 !important; }
  /* Any 3-col grids → 1-col */
  .myday-grid-3 { grid-template-columns: 1fr !important; }
  .marketplace-grid { grid-template-columns: 1fr; }
  /* Customise toolbar — full width on mobile */
  .customise-toolbar { left: 16px; right: 16px; transform: none; width: auto; }
  /* Hide size pills on mobile (everything is 1-col), keep stepper */
  .customising .widget-size-pills { display: none; }
}

/* ═══════════════════════════════════════
   MOBILE BOTTOM NAVIGATION — hidden by default
   ═══════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
}

/* ─── Small Tablet / Large Phone (≤768px) ─── */
@media (max-width: 768px) {

  /* — Sidebar: auto-collapse at tablet — uses same .collapsed class pattern — */
  .sidebar:not(.mobile-open) { width: var(--sidebar-collapsed); overflow: visible; }
  .sidebar:not(.mobile-open) .sidebar-nav { overflow: visible; }
  .sidebar:not(.mobile-open) .brand-text,
  .sidebar:not(.mobile-open) .brand-sub,
  .sidebar:not(.mobile-open) .sidebar-footer .user-info,
  .sidebar:not(.mobile-open) .sidebar-footer-actions,
  .sidebar:not(.mobile-open) .sidebar-xp-row { display: none; }
  .sidebar:not(.mobile-open) .sidebar-brand { justify-content: center; padding: 20px 0 18px; gap: 0; }
  .sidebar:not(.mobile-open) .sidebar-brand > div:not(.brand-icon) { display: none; }
  .sidebar:not(.mobile-open) .sidebar-brand .brand-icon { margin: 0; width: 40px; height: 40px; }
  .sidebar:not(.mobile-open) .sidebar-brand .brand-icon i { font-size: 17px; }
  .sidebar:not(.mobile-open) .nav-section {
    justify-content: center; padding: 14px 0; margin: 4px 6px;
    font-size: 0; color: transparent; border-radius: 8px;
  }
  .sidebar:not(.mobile-open) .nav-section .nav-section-icon {
    font-size: 15px !important; opacity: 0.6; color: rgba(255,255,255,0.65);
  }
  .sidebar:not(.mobile-open) .nav-section span { display: none; }
  .sidebar:not(.mobile-open) .nav-chevron { display: none; }
  .sidebar:not(.mobile-open) .nav-group-items { display: none !important; }
  .sidebar:not(.mobile-open) .nav-badge { display: none; }
  .sidebar:not(.mobile-open) .sidebar-footer .user-info { display: none; }
  .sidebar:not(.mobile-open) .sidebar-footer-actions { display: none; }
  .sidebar:not(.mobile-open) .sidebar-xp-row { display: none; }
  .sidebar:not(.mobile-open) .sidebar-footer { padding: 10px 8px; justify-content: center; }
  .main-content { margin-left: var(--sidebar-collapsed); }

  /* — Header — */
  .top-header { padding: 0 12px; }
  .check-in-btn span { display: none; }
  .check-in-btn { padding: 7px 10px; }
  .breadcrumb-current { max-width: 120px; }

  /* — Page Content — */
  .page-content { padding: 16px; }
  .welcome-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .welcome-bar .greeting { font-size: 20px; }

  /* — Stat Cards — */
  .stat-card .stat-value { font-size: 22px; }
  .stat-card { padding: 16px 18px; }

  /* — Grids — */
  .tasks-grid { grid-template-columns: 1fr; }
  .pulse-breakdown { grid-template-columns: repeat(2, 1fr); }

  /* — Page Header — */
  .page-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-header-row .greeting { font-size: 20px; }
  .page-actions { width: 100%; }
  .page-actions .search-bar-wrap { max-width: 100%; flex: 1; }

  /* — Tab Bar: horizontal scroll — */
  .tab-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .tab-item { white-space: nowrap; flex-shrink: 0; padding: 8px 14px; font-size: 12px; }

  /* — Data Tables: horizontal scroll — */
  /* Tables: wrap in scrollable container */
  .widget-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; }
  .data-table thead th { padding: 8px 10px; font-size: 10px; }
  .data-table tbody td { padding: 10px; font-size: 12px; }

  /* — Kanban: horizontal scroll already works, shrink columns — */
  .kanban-column { min-width: 240px; }

  /* — Shift Grid: 7 → 4 columns — */
  .shift-grid { grid-template-columns: repeat(4, 1fr) !important; }

  /* — Approval Items — */
  .approval-item { flex-direction: column; align-items: flex-start; gap: 8px; }
  .approval-actions { margin-left: 0; width: 100%; display: flex; gap: 8px; }
  .approval-actions .btn-sm { flex: 1; text-align: center; padding: 6px 12px; }

  /* — My Day quick actions: 6 → 3 — */
  .myday-qa-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* — Org Chart — */
  .org-level { flex-wrap: wrap; gap: 12px; }

  /* — Shortcuts modal — */
  .shortcuts-body { grid-template-columns: 1fr; gap: 16px; }
  .shortcuts-modal { width: 92vw; max-height: 80vh; overflow-y: auto; }

  /* — Notification panel — */
  .notif-panel { width: 320px; right: -40px; }

  /* — Employee cards — */
  .emp-card { padding: 14px; }
  .emp-avatar { width: 44px; height: 44px; font-size: 15px; }
  .emp-avatar-img { width: 44px; height: 44px; }
  .emp-profile-stats { grid-template-columns: repeat(2, 1fr); }
  .emp-profile-header { flex-direction: column; align-items: center; text-align: center; }
  .emp-profile-meta { justify-content: center; }

  /* — Recognition — */
  .recognition-item { padding: 10px 0; }
  .recognition-reactions { gap: 6px; }

  /* — Progress cards — */
  .row.g-3 > .col-6 { flex: 0 0 50%; max-width: 50%; }

  /* — Mini stats — */
  .mini-stat { padding: 12px; gap: 10px; }
  .mini-stat-icon { width: 36px; height: 36px; font-size: 15px; }
  .mini-stat-value { font-size: 18px; }

  /* — AI Chat Panel — */
  .ai-chat-panel { width: calc(100vw - var(--sidebar-collapsed) - 24px); right: 12px; left: auto; }
  .ai-fab { right: 16px; bottom: 88px; width: 50px; height: 50px; font-size: 20px; }
  .ai-fab-icon { width: 50px; height: 50px; }

  /* — Mobile Bottom Navigation — */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--card-bg);
    border-top: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2100;
    align-items: center;
    justify-content: space-around;
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    padding: 6px 0;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav-item i { font-size: 18px; }
  .bottom-nav-item.active { color: var(--primary); }
  .bottom-nav-item:hover { color: var(--primary); text-decoration: none; }

  .bottom-nav-badge {
    position: absolute;
    top: 4px;
    left: 50%;
    margin-left: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background: #ef4444;
    border-radius: 10px;
    display: none;
  }
  .bottom-nav-badge.has-count { display: block; }

  /* — Mobile FAB Button — */
  /* ===== PREMIUM FAB BUTTON ===== */
  .bottom-nav-fab-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
  }

  .bottom-nav-fab {
    width: 58px; height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    margin-top: -24px;
    position: relative;
    z-index: 2;
    box-shadow:
      0 4px 15px rgba(0,0,0,0.25),
      0 0 0 0 rgba(6,182,212,0.2);
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    animation: fab-breathe 2.5s ease-in-out infinite;
  }

  /* Rotating gradient ring */
  .fab-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(
      from 0deg,
      var(--primary),
      var(--accent),
      transparent 35%,
      transparent 65%,
      var(--accent),
      var(--primary)
    );
    -webkit-mask:
      linear-gradient(#fff 0 0) content-box,
      linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: fab-ring-spin 4s linear infinite;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  /* Soft glow aura */
  .fab-glow {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,182,212,0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: fab-glow-pulse 2.5s ease-in-out infinite;
    z-index: -1;
  }

  /* Icon morphing — plus cross-fades to X */
  .fab-icon-plus, .fab-icon-close {
    position: absolute;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
                opacity 0.2s ease;
  }
  .fab-icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
  }
  .bottom-nav-fab.open .fab-icon-plus {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
  }
  .bottom-nav-fab.open .fab-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }

  /* FAB open state */
  .bottom-nav-fab.open {
    animation: none;
    transform: scale(1.08);
    box-shadow:
      0 6px 25px rgba(6,182,212,0.35),
      0 0 0 3px rgba(6,182,212,0.18),
      0 0 40px rgba(6,182,212,0.12);
  }
  .bottom-nav-fab.open .fab-ring {
    opacity: 1;
    animation-duration: 1.2s;
  }
  .bottom-nav-fab.open .fab-glow {
    animation: fab-glow-open 1s ease-in-out infinite;
  }
  .bottom-nav-fab:active {
    transform: scale(0.88);
    transition-duration: 0.1s;
  }

  /* Menu — vertical stack emanating from FAB */
  .fab-menu {
    position: absolute;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
  }
  .fab-menu.open {
    pointer-events: auto;
    opacity: 1;
  }

  /* Menu items — pill cards with colored icon circles */
  .fab-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, rgba(0,0,0,0.06));
    border-radius: 50px;
    padding: 6px 18px 6px 6px;
    cursor: pointer;
    box-shadow:
      0 8px 32px rgba(0,0,0,0.12),
      0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(16px) scale(0.7);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
    transition-delay: calc(var(--fab-i, 0) * 0.06s);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }
  .fab-menu.open .fab-menu-item {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  .fab-menu-item:active {
    transform: scale(0.92) !important;
    transition-duration: 0.1s !important;
  }
  .fab-menu-item:active .fab-item-icon {
    filter: brightness(1.2);
  }

  /* Colored icon circle */
  .fab-item-icon {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--fab-color, var(--primary));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  }

  /* Action label */
  .fab-item-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    letter-spacing: -0.01em;
    padding-right: 2px;
  }

  /* Overlay — strong blur */
  .fab-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2099;
  }
  .fab-overlay.show { display: block; }

  /* FAB Animations */
  @keyframes fab-ring-spin {
    to { transform: rotate(360deg); }
  }
  @keyframes fab-breathe {
    0%, 100% {
      box-shadow:
        0 4px 15px rgba(0,0,0,0.25),
        0 0 0 0 rgba(6,182,212,0.15);
    }
    50% {
      box-shadow:
        0 4px 15px rgba(0,0,0,0.25),
        0 0 0 4px rgba(6,182,212,0.08),
        0 0 25px rgba(6,182,212,0.12);
    }
  }
  @keyframes fab-glow-pulse {
    0%, 100% { transform: scale(1); opacity: 0.35; }
    50% { transform: scale(1.2); opacity: 0.6; }
  }
  @keyframes fab-glow-open {
    0%, 100% { transform: scale(1.1); opacity: 0.5; }
    50% { transform: scale(1.4); opacity: 0.85; }
  }

  /* — Sidebar overlay for tablet — */
  .sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 1055; opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }

  /* — Offset page content for bottom nav — */
  .page-content { padding-bottom: 72px; }

  /* — Touch target sizing (44px min) — */
  .btn-icon,
  .sidebar-toggle { min-height: 44px; min-width: 44px; }
  .tab-item { min-height: 44px; }
  .qa-btn { min-height: 44px; }
  .nav-item { min-height: 44px; }
  .reaction-btn { min-height: 44px; }
  .post-action { min-height: 44px; display: inline-flex; align-items: center; }
  .approval-actions .btn-sm { min-height: 44px; }

  /* — Toast: bottom-center above bottom nav — */
  .toast-container {
    top: auto; right: auto;
    bottom: 72px; left: 50%;
    transform: translateX(-50%);
    align-items: center;
  }

  /* — Notification panel: bottom sheet — */
  .notif-panel {
    position: fixed;
    bottom: 56px;
    right: 10px;
    width: 360px;
    max-height: 65vh;
    z-index: 3100;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* ─── Phone (≤480px) ─── */
@media (max-width: 480px) {

  /* — Sidebar: fully hidden, off-screen — */
  .sidebar {
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
    z-index: 1060;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .sidebar.mobile-open .brand-text,
  .sidebar.mobile-open .brand-sub,
  .sidebar.mobile-open .sidebar-footer .user-info { display: block; }
  .sidebar.mobile-open .sidebar-footer-actions { display: flex; }
  .sidebar.mobile-open .sidebar-xp-row { display: block; }
  .sidebar.mobile-open .nav-section {
    height: auto; padding: 10px 14px; margin: 4px 10px 0;
    overflow: visible; font-size: 10px; color: rgba(245, 235, 220, 0.45);
    background: transparent; border-radius: var(--radius-sm);
    display: flex;
  }
  .sidebar.mobile-open .nav-section-icon { display: inline-block; }
  .sidebar.mobile-open .nav-chevron { display: inline-block; }
  .sidebar.mobile-open .nav-item span {
    display: inline !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    font-size: 13px !important;
  }
  .sidebar.mobile-open .nav-item span::before { display: none !important; }
  .sidebar.mobile-open .nav-badge { display: flex; }
  .sidebar.mobile-open .nav-item {
    justify-content: flex-start; padding: 9px 14px 9px 16px; margin: 1px 8px;
  }
  .sidebar.mobile-open .nav-item::before { display: block; }

  /* — Sidebar overlay — */
  .sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 1055; opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }

  /* — Main content: full width — */
  .main-content { margin-left: 0 !important; }

  /* — Header — */
  .top-header { padding: 0 10px; height: 48px; }
  .top-header .page-title { font-size: 14px; }
  .breadcrumbs { display: none; }
  .btn-icon { width: 30px; height: 30px; font-size: 13px; }
  .header-actions { gap: 4px; }
  #btnShortcuts { display: none; }
  .check-in-btn { font-size: 11px; padding: 5px 8px; }

  /* — Page Content — */
  .page-content { padding: 12px; }

  /* — Welcome Bar — */
  .welcome-bar .greeting { font-size: 18px; }
  .welcome-bar .greeting-sub { font-size: 12px; }
  .welcome-bar .date-display { font-size: 11px; }

  /* — Widget Cards — */
  .widget-card { padding: 14px; border-radius: var(--radius-md); }
  .widget-header { margin-bottom: 12px; }
  .widget-title { font-size: 13px; }
  .widget-action { font-size: 11px; }

  /* — Stat Cards — */
  .stat-card { padding: 14px 16px; border-radius: var(--radius-md); }
  .stat-card .stat-value { font-size: 20px; }
  .stat-card .stat-label { font-size: 10px; }
  .stat-card .stat-icon { width: 34px; height: 34px; font-size: 14px; }

  /* — Bootstrap grid override for 2x2 stat cards — */
  .row.g-3 > .col-6.col-md-3 { flex: 0 0 50%; max-width: 50%; }
  .row.g-3 > .col-6.col-md-2 { flex: 0 0 50%; max-width: 50%; }
  .row.g-3 { --bs-gutter-x: 8px; --bs-gutter-y: 8px; }

  /* — Page Header — */
  .page-header-row { gap: 10px; margin-bottom: 16px; }
  .page-header-row .greeting { font-size: 18px; }
  .page-header-row .greeting-sub { font-size: 11px; }
  .page-actions { flex-wrap: wrap; }
  .page-actions .btn { font-size: 11px; padding: 6px 12px; }

  /* — Mini Stats — */
  .mini-stat { padding: 10px; gap: 8px; border-radius: var(--radius-sm); }
  .mini-stat-icon { width: 32px; height: 32px; font-size: 13px; border-radius: var(--radius-sm); }
  .mini-stat-value { font-size: 16px; }
  .mini-stat-label { font-size: 9px; }

  /* — Data Tables — */
  .data-table { min-width: 500px; font-size: 12px; }
  .data-table thead th { padding: 6px 8px; }
  .data-table tbody td { padding: 8px; }

  /* — Tab Bar — */
  .tab-bar { margin-bottom: 14px; padding: 2px; }
  .tab-item { padding: 6px 12px; font-size: 11px; }

  /* — Kanban — */
  .kanban-board { gap: 10px; }
  .kanban-column { min-width: 220px; padding: 10px; }
  .kanban-card { padding: 10px; }
  .kanban-card-title { font-size: 12px; }

  /* — Shift Grid: 7 → 3 — */
  .shift-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .shift-cell { min-height: 50px; padding: 6px; font-size: 10px; }

  /* — Leave Cards — */
  .leave-card { padding: 14px; }
  .leave-count { font-size: 22px; }

  /* — Employee Cards — */
  .emp-card { padding: 12px; }
  .emp-avatar { width: 40px; height: 40px; font-size: 14px; margin-bottom: 6px; }
  .emp-avatar-img { width: 40px; height: 40px; margin-bottom: 6px; }
  .emp-name { font-size: 12px; }
  .emp-role { font-size: 11px; margin-bottom: 4px; }
  .emp-profile-avatar { width: 72px; height: 72px; }
  .emp-profile-name { font-size: 18px; }
  .emp-profile-header { padding: 18px; }
  .emp-profile-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .emp-stat-value { font-size: 18px; }
  .emp-dept { font-size: 9px; }

  /* — Timeline — */
  .timeline-item { gap: 10px; padding: 10px 0; }
  .timeline-dot { width: 26px; height: 26px; font-size: 10px; }
  .timeline-title { font-size: 12px; }
  .timeline-desc { font-size: 11px; }

  /* — Social / Post Cards — */
  .post-card { padding: 14px; margin-bottom: 10px; }
  .post-content { font-size: 13px; }
  .post-actions { gap: 12px; }
  .post-action { font-size: 11px; }

  /* — Recognition — */
  .recognition-avatar { width: 30px; height: 30px; font-size: 10px; }
  .recognition-message { font-size: 12px; }
  .reaction-btn { font-size: 11px; padding: 4px 8px; }

  /* — Progress Cards / Rings — */
  .progress-card { padding: 14px; }
  .progress-card-title { font-size: 12px; }
  .progress-ring { width: 44px !important; height: 44px !important; }
  .progress-ring-val { font-size: 11px !important; }

  /* — Approval Items — */
  .approval-item { padding: 10px 0; }
  .approval-name { font-size: 12px; }
  .approval-detail { font-size: 10px; }
  .approval-actions .btn-sm { padding: 5px 10px; font-size: 10px; }

  /* — Quick Actions — */
  .quick-actions-bar { gap: 6px; }
  .qa-btn { padding: 6px 10px; font-size: 10px; }
  .myday-qa-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* — Org Chart — */
  .org-tree { padding: 10px 0; }
  .org-level { flex-direction: column; align-items: center; gap: 8px; }
  .org-node { width: 100%; max-width: 200px; }
  .org-connector { display: none; }

  /* — Notifications: full-width bottom sheet — */
  .notif-panel {
    position: fixed;
    bottom: 52px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: 60vh;
    z-index: 3100;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .notif-item { padding: 10px 12px; }
  .notif-text { font-size: 12px; }

  /* — Command Palette — */
  .cmd-palette { width: 95vw; top: 8%; }
  .cmd-input { font-size: 14px; padding: 12px 14px; }

  /* — AI Chat — Full screen on phone — */
  .ai-chat-panel {
    width: 100vw; height: calc(100vh - 48px - 52px);
    right: 0; left: 0; bottom: 52px;
    border-radius: 16px 16px 0 0;
  }
  .ai-fab { right: 12px; bottom: 68px; width: 48px; height: 48px; font-size: 18px; }
  .ai-fab-icon { width: 48px; height: 48px; }

  /* — Bottom nav phone tweaks — */
  .mobile-bottom-nav { height: 52px; }
  .bottom-nav-item i { font-size: 17px; }
  .bottom-nav-item span:not(.bottom-nav-badge) { font-size: 9px; }
  .ai-suggestion-chip { font-size: 11px; padding: 5px 10px; }

  /* — Snapshot Strip — */
  .snapshot-strip { gap: 8px; }
  .stat-chip { padding: 6px 10px; font-size: 11px; }

  /* — Calendar Grid — */
  .calendar-grid td { padding: 4px 2px; font-size: 11px; }
  .calendar-event { padding: 8px; }
  .event-time { font-size: 11px; min-width: 55px; }
  .event-title { font-size: 12px; }

  /* — Breadcrumbs (already hidden) — */

  /* — My Day: stacked rows — */
  .myday-grid-3 { grid-template-columns: 1fr !important; }

  /* — Announcements / Course Items — */
  .announcement { padding: 12px; border-radius: var(--radius-md); }
  .course-item { padding: 10px; }

  /* — Search Bar — */
  .search-bar-wrap { max-width: 100%; }
  .search-bar { padding: 8px 12px 8px 32px; font-size: 13px; }

  /* — Celebration / Insight Cards — */
  .celebration-card { padding: 10px; }
  .celebration-emoji { font-size: 24px; }
  .celebration-name { font-size: 12px; }
  .insight-card { padding: 10px 12px; }
  .insight-text { font-size: 11px; }

  /* — Helpdesk Ticket Cards — */
  .ticket-card { padding: 12px; }

  /* — Modals — */
  .modal-dialog { margin: 8px; }
  .modal-content { border-radius: var(--radius-lg); }

  /* — Empty state — */
  .empty-state { padding: 32px 16px; }
  .empty-state-icon { width: 48px; height: 48px; font-size: 18px; }
  .empty-state-title { font-size: 14px; }
  .empty-state-desc { font-size: 12px; }

  /* — Tooltips off on touch — */
  [data-tooltip]::after { display: none; }

  /* — Quick actions: icon-only grid — */
  .qa-btn span { display: none; }
  .qa-btn { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .qa-btn i { font-size: 16px; }

  /* — Toast: adjust for shorter bottom nav — */
  .toast-container { bottom: 68px; }

  /* — iOS rubber-banding prevention — */
  .sidebar.mobile-open { overscroll-behavior: contain; }
  .sidebar.mobile-open .sidebar-nav { overscroll-behavior: contain; }

  /* — Page content bottom padding for bottom nav — */
  .page-content { padding-bottom: 68px; }

  /* — Dashboard grids: force single column — */
  .section-grid-half { grid-template-columns: 1fr !important; }

  /* — Section grid gap tightening — */
  .section-grid { gap: 12px; margin-bottom: 16px; }
}


/* ═══════════════════════════════════════════════
   ░░░  PHASE 3 — PREMIUM LAYER (DESIGNGOD)  ░░░
   ═══════════════════════════════════════════════ */


/* ═══════════════════════════════════════
   54. DARK MODE FOUNDATION — DESIGNGOD S19
   Luminance-based elevation, NOT inverted
   ═══════════════════════════════════════ */
[data-mode="dark"] {
  --page-bg: #0f1117;
  --gray-25: #16181d;
  --gray-50: #1a1d24;
  --gray-100: #22262e;
  --gray-200: #2d323c;
  --gray-300: #3d4351;
  --gray-400: #5a6275;
  --gray-500: #8891a4;
  --gray-600: #a3adc0;
  --gray-700: #c4ccda;
  --gray-800: #dfe4ed;
  --gray-900: #eef1f6;
  --gray-950: #f8f9fb;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.35), 0 4px 8px -4px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 24px 48px -8px rgba(0, 0, 0, 0.4), 0 8px 16px -4px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.35), 0 2px 6px -2px rgba(0, 0, 0, 0.2);

  --focus-ring: 0 0 0 2px #0f1117, 0 0 0 4px var(--accent);

  color-scheme: dark;
}

[data-mode="dark"] body {
  background: var(--page-bg);
  color: var(--gray-900);
}

[data-mode="dark"] .top-header {
  background: linear-gradient(180deg, rgba(15, 17, 23, 0.95) 0%, rgba(15, 17, 23, 0.85) 100%);
  border-bottom-color: var(--gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-mode="dark"] .widget-card,
[data-mode="dark"] .stat-card,
[data-mode="dark"] .card-panel,
[data-mode="dark"] .emp-card,
[data-mode="dark"] .post-card,
[data-mode="dark"] .progress-card,
[data-mode="dark"] .leave-card,
[data-mode="dark"] .module-card,
[data-mode="dark"] .ticket-card,
[data-mode="dark"] .kanban-card,
[data-mode="dark"] .mini-stat,
[data-mode="dark"] .emp-stat-card,
[data-mode="dark"] .emp-profile-header {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

[data-mode="dark"] .form-control,
[data-mode="dark"] .form-select,
[data-mode="dark"] .search-bar,
[data-mode="dark"] .journal-input,
[data-mode="dark"] .ai-chat-input {
  background-color: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-900);
}
[data-mode="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23adb5bd' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

[data-mode="dark"] .modal-content {
  background: var(--gray-50);
  box-shadow: var(--shadow-xl);
}
[data-mode="dark"] .modal-header { border-bottom-color: var(--gray-200); }
[data-mode="dark"] .modal-footer { border-top-color: var(--gray-200); }

[data-mode="dark"] .btn-icon {
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-600);
}

[data-mode="dark"] .qa-btn {
  background: var(--gray-50);
  border-color: var(--gray-200);
  color: var(--gray-700);
}

[data-mode="dark"] .btn-secondary {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-800);
}

[data-mode="dark"] .tab-bar {
  background: var(--gray-100);
}
[data-mode="dark"] .tab-item.active {
  background: var(--gray-50);
  box-shadow: var(--shadow-xs);
}

[data-mode="dark"] .approval-tabs {
  background: var(--gray-100);
}
[data-mode="dark"] .approval-tab.active {
  background: var(--gray-50);
}

[data-mode="dark"] .data-table thead th {
  background: var(--gray-100);
  border-bottom-color: var(--gray-200);
}
[data-mode="dark"] .data-table tbody td {
  border-bottom-color: var(--gray-100);
}
[data-mode="dark"] .data-table tbody tr:hover {
  background: var(--gray-100);
}

[data-mode="dark"] .announcement,
[data-mode="dark"] .news-item,
[data-mode="dark"] .course-item,
[data-mode="dark"] .recognition-item,
[data-mode="dark"] .calendar-event,
[data-mode="dark"] .task-column,
[data-mode="dark"] .kanban-column,
[data-mode="dark"] .pulse-breakdown-item,
[data-mode="dark"] .finance-stat,
[data-mode="dark"] .finance-tips {
  background: var(--gray-100);
}

[data-mode="dark"] .task-compact,
[data-mode="dark"] .reaction-btn,
[data-mode="dark"] .snapshot-chip {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

[data-mode="dark"] .kaamos-toast {
  background: var(--gray-100);
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-200);
}

[data-mode="dark"] .cmd-palette,
[data-mode="dark"] .shortcuts-modal {
  background: var(--gray-50);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}
[data-mode="dark"] .cmd-input-wrap { border-bottom-color: var(--gray-200); }
[data-mode="dark"] .cmd-result-item:hover,
[data-mode="dark"] .cmd-result-item.active { background: var(--gray-100); }

[data-mode="dark"] .notif-panel {
  background: var(--gray-50);
  border-color: var(--gray-200);
}
[data-mode="dark"] .notif-item { border-bottom-color: var(--gray-100); }

[data-mode="dark"] .ai-chat-panel {
  background: var(--gray-50);
}
[data-mode="dark"] .ai-chat-body { background: var(--gray-25); }
[data-mode="dark"] .ai-msg-bubble {
  background: var(--gray-100);
  border-color: var(--gray-200);
}
[data-mode="dark"] .ai-chat-footer {
  background: var(--gray-50);
  border-top-color: var(--gray-200);
}
[data-mode="dark"] .ai-suggestions {
  border-top-color: var(--gray-200);
}
[data-mode="dark"] .ai-suggestion-chip {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

[data-mode="dark"] .theme-panel {
  background: var(--gray-50);
}
[data-mode="dark"] .theme-panel-header { border-bottom-color: var(--gray-200); }
[data-mode="dark"] .theme-swatch { background: var(--gray-100); }

[data-mode="dark"] .modal-card {
  background: var(--gray-50);
}
[data-mode="dark"] .feeling-option {
  background: var(--gray-100);
  border-color: var(--gray-200);
}

[data-mode="dark"] .org-node {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

[data-mode="dark"] ::selection {
  background: rgba(6, 182, 212, 0.3);
  color: #fff;
}

[data-mode="dark"] .skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
}

[data-mode="dark"] .empty-state-icon {
  background: var(--gray-200);
}

/* Auto-detect system preference */
@media (prefers-color-scheme: dark) {
  [data-mode="auto"] {
    --page-bg: #0f1117;
    --gray-25: #16181d;
    --gray-50: #1a1d24;
    --gray-100: #22262e;
    --gray-200: #2d323c;
    --gray-300: #3d4351;
    --gray-400: #5a6275;
    --gray-500: #8891a4;
    --gray-600: #a3adc0;
    --gray-700: #c4ccda;
    --gray-800: #dfe4ed;
    --gray-900: #eef1f6;
    --gray-950: #f8f9fb;
    color-scheme: dark;
  }
}


/* ═══════════════════════════════════════
   55. MICRO-INTERACTIONS — DESIGNGOD S7
   ═══════════════════════════════════════ */

/* Hover lift — universal gentle float */
.hover-lift {
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) var(--ease-out);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Active press — satisfying click feedback */
.active-press:active {
  transform: scale(0.97);
  transition-duration: 0.05s;
}

/* Stagger children animation */
.stagger-in > * {
  animation: fadeInUp 0.35s var(--ease-out) both;
}
.stagger-in > *:nth-child(1) { animation-delay: 0.02s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.05s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.08s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.11s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.14s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.17s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.20s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.23s; }
.stagger-in > *:nth-child(9) { animation-delay: 0.26s; }
.stagger-in > *:nth-child(10) { animation-delay: 0.29s; }

/* Smooth enter from directions */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.anim-slide-right { animation: slideInRight 0.3s var(--ease-out) both; }
.anim-slide-left { animation: slideInLeft 0.3s var(--ease-out) both; }
.anim-scale-in { animation: scaleIn 0.25s var(--ease-out) both; }
.anim-fade-in { animation: fadeIn 0.2s var(--ease-out) both; }

/* Checkbox custom animation */
input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
  transition: transform var(--duration-fast);
}
input[type="checkbox"]:checked {
  animation: checkPop 0.2s var(--ease-spring);
}
@keyframes checkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Progress bar fill animation */
.progress-animate {
  transition: width 0.8s var(--ease-out);
}

/* Number counter effect (use with JS) */
.count-up {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* Subtle border glow on focus for cards */
.card-focusable:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

/* Link underline animation */
.link-hover {
  position: relative;
  display: inline-block;
}
.link-hover::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--duration-normal) var(--ease-out);
}
.link-hover:hover::after { width: 100%; }

/* Ring pulse for notifications/badges */
@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.ring-pulse { animation: ringPulse 2s ease-in-out infinite; }

/* Skeleton content loading */
.skeleton-line {
  height: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  margin-bottom: 8px;
}
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-25 { width: 25%; }


/* ═══════════════════════════════════════
   56. PRINT STYLES — DESIGNGOD S27
   ═══════════════════════════════════════ */
/* ─── Reaction Picker (Social Feed) ─── */
.reaction-wrap { position: relative; display: inline-flex; }
.reaction-picker {
  position: absolute; bottom: calc(100% + 2px); left: -8px;
  display: flex; gap: 2px; padding: 6px 8px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--gray-200); border-radius: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  opacity: 0; visibility: hidden; transform: translateY(4px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 10; pointer-events: none;
}
/* Invisible bridge so mouse can travel from trigger to picker without losing hover */
.reaction-picker::after {
  content: ''; position: absolute; bottom: -12px; left: 0; right: 0; height: 14px;
}
.reaction-wrap:hover .reaction-picker,
.reaction-wrap.picker-open .reaction-picker {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
  pointer-events: auto;
}
.reaction-opt {
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 4px 5px;
  border-radius: 50%; transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1);
}
.reaction-opt:hover { transform: scale(1.35) translateY(-3px); }
.reaction-emoji { font-size: 16px; line-height: 1; }
@keyframes reaction-pop {
  0% { transform: scale(0.5); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ─── Task Date Shortcut Pills ─── */
.date-shortcut-pill {
  background: none; border: 1px solid var(--gray-200);
  color: var(--gray-500); font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 14px; cursor: pointer;
  transition: all 0.15s ease;
}
.date-shortcut-pill:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(6,182,212,0.06);
}
.date-shortcut-pill.active {
  border-color: var(--accent); color: #fff;
  background: var(--accent);
}

/* ─── Dashboard Refresh Banner ─── */
.dash-refresh-banner {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; margin: -16px -16px 12px;
  background: linear-gradient(90deg, rgba(6,182,212,0.08), rgba(126,72,28,0.06));
  border-bottom: 1px solid rgba(6,182,212,0.15);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-size: 12px; font-weight: 600; color: var(--accent);
  cursor: pointer; opacity: 0; transform: translateY(-8px);
  transition: all 0.3s ease;
}
.dash-refresh-banner:hover { background: rgba(6,182,212,0.12); }
.dash-refresh-banner i { font-size: 11px; animation: spin-gentle 2s linear infinite; }
@keyframes spin-gentle { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@media print {
  .sidebar,
  .top-header,
  .ai-fab,
  .ai-chat-panel,
  .toast-container,
  .theme-panel,
  .theme-panel-backdrop,
  .cmd-backdrop,
  .cmd-palette,
  .shortcuts-backdrop,
  .shortcuts-modal,
  .sidebar-overlay,
  .notif-panel,
  .quick-actions-bar,
  .check-in-btn,
  .snapshot-strip,
  .btn-icon,
  .sidebar-toggle,
  .mobile-bottom-nav,
  .page-actions .btn {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
    line-height: 1.5;
  }

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

  .page-content {
    padding: 0 !important;
  }

  .widget-card,
  .stat-card,
  .card-panel,
  .emp-card,
  .module-card {
    break-inside: avoid;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
  }

  a { color: #000 !important; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }

  .data-table { font-size: 10pt; }
  .data-table thead th { background: #f0f0f0 !important; }
}

/* ═══════════════════════════════════════════════════════
   CALENDAR MODULE — Apple Calendar-inspired
   ═══════════════════════════════════════════════════════ */

.calendar-container {
  display: flex; flex-direction: column;
  height: calc(100vh - var(--header-height) - 40px);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ── HEADER ── */
.calendar-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}
.calendar-header-left { display: flex; align-items: center; gap: 10px; }
.calendar-header-right { display: flex; align-items: center; gap: 8px; }
.cal-title {
  font-size: 1.35rem; font-weight: 700; margin: 0;
  color: var(--text-primary); letter-spacing: -0.01em;
}
.cal-nav-arrows { display: flex; gap: 2px; }
.cal-nav-arrows .btn {
  padding: 5px 10px; border-radius: var(--radius-sm);
  color: var(--text-secondary); border: 1px solid var(--card-border);
  background: var(--card-bg); transition: all var(--duration-fast) var(--ease-out);
}
.cal-nav-arrows .btn:hover { background: var(--hover-bg); color: var(--text-primary); }
#calTodayBtn {
  font-size: 0.8rem; font-weight: 600; padding: 5px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--card-border);
  background: var(--card-bg); color: var(--text-primary);
  transition: all var(--duration-fast) var(--ease-out);
}
#calTodayBtn:hover { background: var(--hover-bg); }

/* View toggle — pill switcher */
.cal-view-toggle {
  display: flex; background: var(--hover-bg);
  border-radius: var(--radius-sm); padding: 3px;
  border: 1px solid var(--card-border);
}
.cal-view-btn {
  background: none; border: none;
  padding: 5px 16px; border-radius: 5px;
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.cal-view-btn.active {
  background: var(--card-bg); color: var(--text-primary);
  box-shadow: var(--shadow-sm); font-weight: 600;
}
.cal-view-btn:hover:not(.active) { color: var(--text-primary); }

/* ── BODY LAYOUT ── */
.calendar-body { display: flex; flex: 1; overflow: hidden; }

/* ── SIDEBAR ── */
.cal-sidebar {
  width: 240px; flex-shrink: 0;
  border-right: 1px solid var(--card-border);
  padding: 16px; overflow-y: auto;
  background: var(--card-bg);
}
@media (max-width: 768px) { .cal-sidebar { display: none; } }

/* Mini Calendar */
.cal-mini {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--divider-color);
}
.cal-mini-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-mini-title { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.cal-mini-nav {
  background: none; border: none; color: var(--text-tertiary); cursor: pointer;
  padding: 4px 7px; border-radius: var(--radius-sm); font-size: 0.7rem;
  transition: all var(--duration-fast);
}
.cal-mini-nav:hover { background: var(--hover-bg); color: var(--text-primary); }
.cal-mini-days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 4px; }
.cal-mini-days span { font-size: 0.68rem; color: var(--text-quaternary); font-weight: 600; padding: 4px 0; }
.cal-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 1px; }
.cal-mini-date {
  font-size: 0.72rem; padding: 0; border-radius: var(--radius-full);
  cursor: pointer; color: var(--text-primary);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto; transition: all var(--duration-fast);
}
.cal-mini-date:hover { background: var(--hover-bg); }
.cal-mini-today { background: var(--primary) !important; color: #fff !important; font-weight: 700; }
.cal-mini-today:hover { background: var(--primary-hover, var(--primary)) !important; }
.cal-mini-selected:not(.cal-mini-today) { background: color-mix(in srgb, var(--accent) 15%, transparent); font-weight: 600; }
.cal-mini-empty { visibility: hidden; }

/* Filters */
.cal-filter-title {
  font-size: 0.7rem; font-weight: 700; color: var(--text-quaternary);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px; margin-top: 4px;
}
.cal-filter-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-primary); font-weight: 450;
  margin-bottom: 2px; cursor: pointer; padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}
.cal-filter-item:hover { background: var(--hover-bg); }
.cal-filter-item input[type=checkbox] {
  accent-color: var(--primary); width: 15px; height: 15px;
  border-radius: 3px; cursor: pointer;
}
.cal-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* Shared section */
.cal-shared-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--divider-color); }

/* ── MAIN CALENDAR AREA ── */
.cal-main { flex: 1; overflow: hidden; display: flex; flex-direction: column; background: var(--card-bg); }

/* ══════════ MONTH VIEW ══════════ */
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--card-border);
  background: var(--hover-bg);
}
.cal-weekday {
  text-align: center; font-size: 0.7rem; font-weight: 600;
  color: var(--text-tertiary); padding: 10px 0;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr); flex: 1;
  border-left: 1px solid var(--card-border);
}
.cal-day {
  border-right: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 4px 5px; min-height: 110px;
  cursor: pointer; overflow: hidden;
  transition: background var(--duration-fast);
  position: relative;
}
.cal-day:hover { background: var(--hover-bg); }
.cal-other-month { background: color-mix(in srgb, var(--card-bg) 50%, var(--hover-bg)); }
.cal-other-month .cal-day-num { opacity: 0.35; }
.cal-other-month .cal-event-pill { opacity: 0.45; }
.cal-today { background: color-mix(in srgb, var(--accent) 5%, var(--card-bg)); }
.cal-day-num {
  font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
  margin-bottom: 4px; padding: 2px 0; text-align: right;
  line-height: 1;
}
.cal-today-num {
  background: var(--accent); color: #fff !important;
  border-radius: var(--radius-full);
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem;
}

/* Event pills — refined */
.cal-event-pill {
  font-size: 0.7rem; padding: 2px 6px;
  border-radius: 4px; color: #fff;
  margin-bottom: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; line-height: 1.55;
  transition: all var(--duration-fast) var(--ease-out);
  opacity: 0.92;
}
.cal-event-pill:hover { opacity: 1; transform: scale(1.01); box-shadow: var(--shadow-sm); }
.cal-pill-time { font-weight: 700; font-size: 0.65rem; margin-right: 2px; }
.cal-pill-title { font-weight: 500; }
.cal-more-link {
  font-size: 0.7rem; color: var(--text-tertiary);
  padding: 2px 6px; cursor: pointer; font-weight: 600;
  border-radius: 4px;
  transition: all var(--duration-fast);
}
.cal-more-link:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }

/* ══════════ WEEK VIEW ══════════ */
.cal-week-view { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.cal-week-header {
  display: flex; border-bottom: 1px solid var(--card-border);
  flex-shrink: 0; background: var(--hover-bg);
}
.cal-week-col-header { flex: 1; text-align: center; padding: 10px 4px 8px; }
.cal-week-day-name {
  display: block; font-size: 0.68rem; font-weight: 600;
  color: var(--text-quaternary); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 2px;
}
.cal-week-day-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; font-size: 0.9rem; font-weight: 500;
  border-radius: var(--radius-full); color: var(--text-primary);
  transition: background var(--duration-fast);
}
.cal-week-col-header.cal-today .cal-week-day-num {
  background: var(--accent); color: #fff; font-weight: 700;
}
.cal-week-gutter {
  width: 60px; flex-shrink: 0; text-align: right; padding-right: 10px;
  border-right: 1px solid var(--card-border);
}
.cal-hour-label { font-size: 0.68rem; color: var(--text-quaternary); font-weight: 500; position: relative; top: -8px; }

.cal-week-allday {
  display: flex; border-bottom: 1px solid var(--card-border);
  min-height: 32px; flex-shrink: 0; align-items: center;
  background: var(--card-bg);
}
.cal-week-allday-col { flex: 1; padding: 3px 2px; overflow: hidden; }
.cal-week-pill { font-size: 0.68rem; padding: 2px 6px; border-radius: 4px; }

.cal-week-scroll { flex: 1; overflow-y: auto; position: relative; }
.cal-week-grid { position: relative; }
.cal-week-row {
  display: flex; height: 60px;
  border-bottom: 1px solid var(--divider-color);
}
.cal-week-row:nth-child(even) { border-bottom-style: dashed; border-bottom-color: color-mix(in srgb, var(--divider-color) 60%, transparent); }
.cal-week-cell {
  flex: 1; border-right: 1px solid var(--divider-color);
  cursor: pointer; transition: background var(--duration-fast);
}
.cal-week-cell:last-child { border-right: none; }
.cal-week-cell:hover { background: color-mix(in srgb, var(--hover-bg) 60%, transparent); }

.cal-week-events { position: absolute; top: 0; left: 60px; right: 0; pointer-events: none; }
.cal-week-event {
  position: absolute; border-radius: 6px;
  padding: 3px 7px; color: #fff; font-size: 0.72rem;
  overflow: hidden; cursor: pointer; pointer-events: auto;
  border-left: 3px solid rgba(0,0,0,0.15);
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.cal-week-event:hover { opacity: 0.92; z-index: 2; box-shadow: var(--shadow-md); transform: scale(1.01); }
.cal-week-event-time { font-weight: 700; font-size: 0.65rem; opacity: 0.9; }
.cal-week-event-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══════════ DAY VIEW ══════════ */
.cal-day-view { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.cal-day-header {
  display: flex; align-items: center; padding: 12px 20px;
  border-bottom: 1px solid var(--card-border); flex-shrink: 0;
  background: var(--hover-bg);
}
.cal-day-title { display: flex; align-items: center; gap: 10px; }
.cal-day-title-day {
  font-size: 0.82rem; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.cal-day-title-num {
  font-size: 1.6rem; font-weight: 400; width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full); color: var(--text-primary);
}
.cal-day-title.cal-today .cal-day-title-num {
  background: var(--accent); color: #fff; font-weight: 600;
}

.cal-day-allday {
  padding: 6px 16px 6px 70px; border-bottom: 1px solid var(--card-border);
  background: var(--card-bg);
}
.cal-day-scroll { flex: 1; overflow-y: auto; position: relative; }
.cal-day-grid { position: relative; }
.cal-day-row {
  display: flex; height: 60px;
  border-bottom: 1px solid var(--divider-color);
}
.cal-day-row:nth-child(even) { border-bottom-style: dashed; border-bottom-color: color-mix(in srgb, var(--divider-color) 60%, transparent); }
.cal-day-gutter {
  width: 60px; flex-shrink: 0; text-align: right; padding-right: 10px;
  border-right: 1px solid var(--card-border);
}
.cal-day-cell { flex: 1; cursor: pointer; transition: background var(--duration-fast); }
.cal-day-cell:hover { background: color-mix(in srgb, var(--hover-bg) 60%, transparent); }

.cal-day-events { position: absolute; top: 0; left: 60px; right: 16px; pointer-events: none; }
.cal-day-event {
  position: absolute; left: 4px; right: 4px;
  border-radius: 8px; padding: 8px 12px; color: #fff;
  cursor: pointer; pointer-events: auto;
  border-left: 4px solid rgba(0,0,0,0.15);
  transition: all var(--duration-fast) var(--ease-out);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.cal-day-event:hover { box-shadow: var(--shadow-md); transform: scale(1.005); }
.cal-day-event-time { font-size: 0.72rem; font-weight: 700; opacity: 0.9; }
.cal-day-event-title { font-size: 0.88rem; font-weight: 600; }
.cal-day-event-loc { font-size: 0.72rem; opacity: 0.8; margin-top: 2px; }

/* ── NOW INDICATOR ── */
.cal-now-indicator {
  position: absolute; left: 60px; right: 0; height: 2px;
  background: #ef4444; z-index: 5; pointer-events: none;
}
.cal-now-indicator::before {
  content: ''; position: absolute; left: -6px; top: -5px;
  width: 12px; height: 12px; border-radius: var(--radius-full);
  background: #ef4444;
}

/* ── POPOVER ── */
.cal-popover {
  position: fixed; z-index: 1050; width: 320px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  padding: 18px; backdrop-filter: blur(20px);
}
.cal-popover-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-popover-dot { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.cal-popover-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin: 0; flex: 1; }
.cal-popover-body { font-size: 0.82rem; color: var(--text-secondary); }
.cal-popover-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.cal-popover-row i { width: 16px; color: var(--text-quaternary); font-size: 0.78rem; text-align: center; }
.cal-popover-row a { color: var(--accent); font-weight: 500; text-decoration: none; }
.cal-popover-row a:hover { text-decoration: underline; }
.cal-popover-type {
  background: var(--hover-bg); padding: 3px 10px;
  border-radius: var(--radius-full); font-size: 0.7rem;
  font-weight: 600; text-transform: capitalize;
  color: var(--text-secondary);
}
.cal-popover-actions { margin-top: 12px; border-top: 1px solid var(--divider-color); padding-top: 12px; }
.cal-popover-rsvp { display: flex; gap: 6px; }
.cal-rsvp-btn {
  padding: 5px 14px; border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); background: var(--card-bg);
  font-size: 0.78rem; font-weight: 500; cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}
.cal-rsvp-btn:hover { background: var(--hover-bg); color: var(--text-primary); }
.cal-rsvp-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── COLOR PICKER ── */
.cal-color-picker { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.cal-color-swatch {
  width: 26px; height: 26px; border-radius: var(--radius-full);
  border: 2.5px solid transparent; cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
  padding: 0;
}
.cal-color-swatch:hover { transform: scale(1.2); }
.cal-color-swatch.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2.5px var(--card-bg);
  transform: scale(1.1);
}

/* ── DAY DOTS (month view event indicators) ── */
.cal-dots-row {
  display: flex; align-items: center; gap: 3px;
  padding: 2px 5px; cursor: pointer; border-radius: 4px;
  transition: background var(--duration-fast);
}
.cal-dots-row:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.cal-dots-summary { cursor: default; justify-content: flex-start; padding: 1px 5px; }
.cal-dots-summary:hover { background: none; }
.cal-day-dot {
  width: 8px; height: 8px; border-radius: var(--radius-full);
  flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform var(--duration-fast) var(--ease-spring);
}
.cal-dots-row:hover .cal-day-dot { transform: scale(1.3); }
.cal-day-dot-sm {
  width: 5px; height: 5px; border-radius: var(--radius-full);
  flex-shrink: 0; opacity: 0.7;
}
.cal-dots-more {
  font-size: 0.65rem; font-weight: 700; color: var(--text-tertiary);
  margin-left: 2px;
}
.cal-dots-row:hover .cal-dots-more { color: var(--primary); }

/* ── UPCOMING EVENTS SECTION ── */
.cal-upcoming {
  border-top: 1px solid var(--card-border);
  padding: 14px 20px 16px; flex-shrink: 0;
  background: var(--card-bg);
  max-height: 220px; overflow-y: auto;
}
.cal-upcoming-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.cal-upcoming-title {
  font-size: 0.82rem; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.01em;
}
.cal-upcoming-count {
  font-size: 0.72rem; font-weight: 500; color: var(--text-quaternary);
}
.cal-upcoming-list { display: flex; flex-direction: column; gap: 4px; }
.cal-upcoming-empty {
  text-align: center; padding: 16px 0; color: var(--text-quaternary);
  font-size: 0.82rem; font-weight: 450;
}
.cal-upcoming-empty i { margin-right: 6px; opacity: 0.5; }
.cal-upcoming-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  border: 1px solid transparent;
}
.cal-upcoming-item:hover {
  background: var(--hover-bg);
  border-color: var(--card-border);
  box-shadow: var(--shadow-xs);
}
.cal-upcoming-color {
  width: 4px; height: 36px; border-radius: 3px; flex-shrink: 0;
}
.cal-upcoming-info { flex: 1; min-width: 0; }
.cal-upcoming-name {
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.cal-upcoming-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; color: var(--text-tertiary);
  font-weight: 450; margin-top: 2px;
}
.cal-upcoming-sep {
  width: 3px; height: 3px; border-radius: var(--radius-full);
  background: var(--text-quaternary); flex-shrink: 0;
}
.cal-upcoming-type {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary); padding: 1px 7px; border-radius: var(--radius-full);
  font-size: 0.65rem; font-weight: 600; text-transform: capitalize;
  margin-left: 2px;
}
.cal-upcoming-arrow { color: var(--text-quaternary); font-size: 0.7rem; opacity: 0; transition: opacity var(--duration-fast); }
.cal-upcoming-item:hover .cal-upcoming-arrow { opacity: 1; }

/* Immersive upcoming */
.immersive-theme .cal-upcoming { background: rgba(20,20,30,0.5); border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-upcoming-item:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.immersive-theme .cal-upcoming-type { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
/* Light upcoming */
.light-theme .cal-upcoming { background: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .calendar-container { height: auto; min-height: calc(100vh - var(--header-height) - 40px); border-radius: 0; border: none; }
  .calendar-header { padding: 10px 12px; }
  .cal-grid { border-left: none; }
  .cal-day { min-height: 75px; padding: 3px; }
  .cal-event-pill { font-size: 0.62rem; padding: 1px 4px; }
  .cal-title { font-size: 1.05rem; }
  .cal-week-gutter, .cal-day-gutter { width: 44px; }
  .cal-week-events { left: 44px; }
  .cal-day-events { left: 44px; }
  .cal-now-indicator { left: 44px; }
  .cal-week-event, .cal-day-event { font-size: 0.65rem; padding: 2px 4px; }
  .cal-popover { width: calc(100vw - 32px); left: 16px !important; }
  .cal-day-allday { padding-left: 54px; }
}

/* ── LIGHT / DEFAULT THEME ── */
.light-theme .calendar-container { background: #fff; border-color: var(--gray-200); }
.light-theme .cal-popover { background: #fff; border-color: var(--gray-200); box-shadow: 0 20px 60px -12px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05); }
.light-theme .cal-view-btn.active { background: #fff; }
.light-theme .cal-weekdays { background: var(--gray-50); }
.light-theme .cal-week-header { background: var(--gray-50); }
.light-theme .cal-day-header { background: var(--gray-50); }
.light-theme .cal-other-month { background: var(--gray-50); }

/* ── DARK / IMMERSIVE THEME ── */
.immersive-theme .calendar-container {
  background: rgba(20,20,30,0.7); border-color: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
}
.immersive-theme .calendar-header { background: rgba(20,20,30,0.5); border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-sidebar { background: rgba(20,20,30,0.4); border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-weekdays { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-week-header { background: rgba(255,255,255,0.03); }
.immersive-theme .cal-day-header { background: rgba(255,255,255,0.03); }
.immersive-theme .cal-grid { border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-day { border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-other-month { background: rgba(0,0,0,0.15); }
.immersive-theme .cal-today { background: rgba(6,182,212,0.06); }
.immersive-theme .cal-week-row { border-color: rgba(255,255,255,0.04); }
.immersive-theme .cal-week-cell { border-color: rgba(255,255,255,0.04); }
.immersive-theme .cal-day-row { border-color: rgba(255,255,255,0.04); }
.immersive-theme .cal-week-gutter { border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-day-gutter { border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-popover {
  background: rgba(25,25,35,0.95); border-color: rgba(255,255,255,0.1);
  box-shadow: 0 20px 60px -12px rgba(0,0,0,0.5);
  backdrop-filter: blur(24px);
}
.immersive-theme .cal-view-toggle { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.08); }
.immersive-theme .cal-view-btn.active { background: rgba(255,255,255,0.12); }
.immersive-theme .cal-event-pill { box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
.immersive-theme .cal-week-event { box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.immersive-theme .cal-day-event { box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.immersive-theme .cal-nav-arrows .btn { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); }
.immersive-theme .cal-nav-arrows .btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.immersive-theme #calTodayBtn { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.85); }
.immersive-theme #calTodayBtn:hover { background: rgba(255,255,255,0.1); }
.immersive-theme .cal-mini { border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-shared-section { border-color: rgba(255,255,255,0.06); }
.immersive-theme .cal-rsvp-btn { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); }
.immersive-theme .cal-rsvp-btn:hover { background: rgba(255,255,255,0.1); }
.immersive-theme .cal-popover-type { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.immersive-theme .cal-popover-actions { border-color: rgba(255,255,255,0.06); }

/* ═══════════════════════════════════════
   DASHBOARD2 ENHANCEMENTS (Feb 24, 2026)
   Actions row, Widget Library, TV News,
   World Clocks, GitHub Repos, Mini Rewards
   ═══════════════════════════════════════ */

/* ─── Dashboard Actions Row ─── */
.dashboard-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dash-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  background: var(--card-bg, #fff);
  color: var(--text-secondary, var(--gray-500));
  cursor: pointer;
  transition: all 0.2s;
}
.dash-action-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(126,72,28,.04);
}
.dash-action-btn i { font-size: 10px; }
.add-widget-btn {
  color: var(--accent);
  border-color: var(--accent);
  border-style: dashed;
}
.add-widget-btn:hover {
  background: rgba(6,182,212,.06);
}
.immersive-theme .dash-action-btn {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6);
}
.immersive-theme .dash-action-btn:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}

/* ─── Widget Library Modal ─── */
.wl-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wlFadeIn .2s ease;
}
@keyframes wlFadeIn { from { opacity: 0; } to { opacity: 1; } }
.wl-modal {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  width: 560px;
  max-width: 94vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  border: 1px solid var(--card-border, var(--gray-200));
  animation: wlSlideUp .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes wlSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.wl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
}
.wl-title { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.wl-close {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: 14px;
  padding: 4px 8px; border-radius: 6px;
  transition: all .15s;
}
.wl-close:hover { background: var(--gray-100); color: var(--text-primary); }
.wl-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}
.wl-category-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-400);
  margin: 14px 0 8px;
}
.wl-category-label:first-child { margin-top: 0; }
.wl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.wl-card {
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all .2s;
  background: var(--card-bg);
}
.wl-card:hover { border-color: var(--primary); }
.wl-card.wl-active { border-color: var(--primary); background: rgba(126,72,28,.03); }
.wl-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wl-card-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-500); font-size: 12px;
}
.wl-card.wl-active .wl-card-icon { background: rgba(126,72,28,.1); color: var(--primary); }
.wl-badge-new {
  font-size: 9px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; padding: 1px 6px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.wl-toggle {
  margin-left: auto;
  width: 32px; height: 18px; border-radius: 9px;
  background: var(--gray-200);
  position: relative; transition: background .2s;
}
.wl-toggle-on { background: var(--primary); }
.wl-toggle-knob {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; position: absolute;
  top: 2px; left: 2px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.wl-toggle-on .wl-toggle-knob { transform: translateX(14px); }
.wl-card-name { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.wl-card-desc { font-size: 10px; color: var(--gray-400); margin-top: 2px; line-height: 1.4; }
.wl-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-100);
  text-align: right;
}
.wl-apply-btn {
  font-size: 13px; font-weight: 600;
  padding: 8px 20px; border-radius: 8px;
  border: none; background: var(--primary);
  color: #fff; cursor: pointer; transition: all .15s;
}
.wl-apply-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
/* Immersive widget library */
.immersive-theme .wl-modal { border-color: rgba(255,255,255,.1); }
.immersive-theme .wl-header { border-color: rgba(255,255,255,.06); }
.immersive-theme .wl-close:hover { background: rgba(255,255,255,.08); }
.immersive-theme .wl-card { border-color: rgba(255,255,255,.1); }
.immersive-theme .wl-card:hover { border-color: var(--primary); }
.immersive-theme .wl-card.wl-active { background: rgba(255,255,255,.04); }
.immersive-theme .wl-card-icon { background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); }
.immersive-theme .wl-card.wl-active .wl-card-icon { background: rgba(126,72,28,.15); }
.immersive-theme .wl-toggle { background: rgba(255,255,255,.12); }
.immersive-theme .wl-footer { border-color: rgba(255,255,255,.06); }

/* ─── TV News Widget ─── */
.tv-widget { display: flex; flex-direction: column; height: 100%; }
.tv-player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.tv-player-wrap:fullscreen { border-radius: 0; }
.tv-channel-overlay {
  position: absolute;
  bottom: 8px; left: 8px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px;
  opacity: 0.7;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 3;
}
.tv-loading {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); font-size: 18px;
  background: rgba(0,0,0,.3);
  z-index: 3;
}
/* Play overlay */
.tv-play-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 5; background: #0a0a0a; border-radius: 8px;
}
.tv-play-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s;
}
.tv-play-circle:hover { transform: scale(1.08); box-shadow: 0 0 24px rgba(126,72,28,.4); }
.tv-play-circle i { color: #fff; font-size: 22px; margin-left: 3px; }
.tv-play-label { color: rgba(255,255,255,.6); font-size: 12px; margin-top: 10px; font-weight: 500; }
/* Hover controls bar */
.tv-controls-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  opacity: 0; transition: opacity .2s;
  z-index: 4; border-radius: 0 0 8px 8px;
}
.tv-player-wrap:hover .tv-controls-bar { opacity: 1; }
.tv-bar-btn {
  background: none; border: none;
  color: rgba(255,255,255,.8); font-size: 13px;
  cursor: pointer; padding: 2px 4px;
  transition: color .15s;
}
.tv-bar-btn:hover { color: #fff; }
.tv-ctrl-channel {
  flex: 1; text-align: center;
  color: rgba(255,255,255,.7);
  font-size: 11px; font-weight: 600;
}
.tv-volume-slider {
  width: 50px; height: 3px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.25); border-radius: 2px;
  outline: none; cursor: pointer;
}
.tv-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; cursor: pointer;
}
.tv-channel-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-shrink: 0;
}
.tv-strip-arrow {
  background: none; border: none;
  color: var(--gray-400); font-size: 10px;
  cursor: pointer; padding: 4px;
  flex-shrink: 0;
  transition: color .15s;
}
.tv-strip-arrow:hover { color: var(--text-primary); }
.tv-channels-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tv-channels-scroll::-webkit-scrollbar { display: none; }
.tv-channel-pill {
  white-space: nowrap;
  font-size: 10px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--gray-200);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer; transition: all .15s;
  flex-shrink: 0;
}
.tv-channel-pill:hover { border-color: var(--primary); color: var(--primary); }
.tv-channel-pill.active {
  border-color: var(--accent);
  background: rgba(6,182,212,.08);
  color: var(--accent);
  box-shadow: 0 0 8px rgba(6,182,212,.15);
}
/* Immersive TV */
.immersive-theme .tv-channel-pill { border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.5); }
.immersive-theme .tv-channel-pill:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.immersive-theme .tv-channel-pill.active { border-color: var(--accent); background: rgba(6,182,212,.12); color: var(--accent); }
/* TV Pop-out button */
.tv-popout-btn {
  background: none; border: none; color: var(--gray-400); font-size: 11px;
  cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: all .15s;
  margin-left: auto;
}
.tv-popout-btn:hover { color: var(--accent); background: rgba(6,182,212,.08); }
.immersive-theme .tv-popout-btn:hover { color: var(--accent); background: rgba(6,182,212,.12); }
/* TV popup notice overlay */
.tv-popup-notice {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #0a0a0a; border-radius: 8px; color: rgba(255,255,255,.5);
}

/* ─── World Clocks Widget ─── */
.wc-widget { display: flex; flex-direction: column; height: 100%; }
.wc-clocks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; flex: 1; align-items: center; padding: 0; }
.wc-clock-slot { text-align: center; padding: 8px 0; }
.wc-city-row {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin-top: 4px;
}
.wc-city-name {
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color .15s;
}
.wc-city-name:hover { color: var(--primary); }
.wc-city-bar { width: 24px; height: 2px; border-radius: 1px; margin: 2px auto 0; }
.wc-time {
  font-size: 20px; font-weight: 600;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-primary);
  letter-spacing: -0.5px; line-height: 1;
}
.wc-time-glow-day { text-shadow: 0 0 8px rgba(245,158,11,.15); }
.wc-time-glow-night { text-shadow: 0 0 8px rgba(139,92,246,.15); }
.wc-ampm { font-size: 9px; font-weight: 500; color: var(--gray-400); vertical-align: middle; letter-spacing: 0; margin-left: 2px; }
.wc-date {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 2px;
}
.wc-divider-gradient {
  height: 1px; margin: 6px 16px;
  background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}
/* Mode toggle buttons */
.wc-mode-btn {
  background: none; border: none; font-size: 11px;
  color: var(--gray-400); cursor: pointer; padding: 2px 4px;
  border-radius: 3px; transition: color .15s;
}
.wc-mode-btn.active { color: var(--primary); }
.wc-mode-btn:hover { color: var(--primary); }
/* Analog clock face */
.wc-analog {
  width: 72px; height: 72px; border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  position: relative; margin: 0 auto 6px;
}
.wc-hand {
  position: absolute; bottom: 50%; left: 50%;
  transform-origin: bottom center; border-radius: 2px;
}
.wc-hand-hour { width: 3px; height: 20px; background: var(--primary); margin-left: -1.5px; }
.wc-hand-minute { width: 2px; height: 28px; background: var(--text-primary); margin-left: -1px; }
.wc-hand-second { width: 1px; height: 30px; background: var(--accent); margin-left: -0.5px; }
.wc-center-dot {
  position: absolute; top: 50%; left: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--primary); transform: translate(-50%,-50%); z-index: 2;
}
.wc-marker {
  position: absolute; width: 2px; height: 5px;
  background: var(--gray-300); top: 3px; left: 50%; margin-left: -1px;
  transform-origin: center 33px;
}
/* Immersive overrides */
.immersive-theme .wc-divider-gradient { background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); }
.immersive-theme .wc-analog { border-color: rgba(255,255,255,.15); }
.immersive-theme .wc-marker { background: rgba(255,255,255,.2); }
.immersive-theme .wc-mode-btn { color: rgba(255,255,255,.4); }
.immersive-theme .wc-mode-btn.active { color: var(--accent); }

/* World Clocks city picker */
.wc-picker-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.3);
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-lg);
}
.wc-picker {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px;
  max-height: 280px;
  overflow-y: auto;
  width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.wc-picker-title { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.wc-picker-region { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-400); margin: 8px 0 4px; }
.wc-picker-city {
  font-size: 11px; padding: 4px 8px; border-radius: 5px;
  cursor: pointer; color: var(--text-secondary);
  transition: all .1s;
}
.wc-picker-city:hover { background: var(--hover-bg, var(--gray-50)); color: var(--text-primary); }
.wc-picker-city.wc-picker-active { background: rgba(126,72,28,.08); color: var(--primary); font-weight: 600; }
.immersive-theme .wc-picker { border-color: rgba(255,255,255,.1); }
.immersive-theme .wc-picker-city:hover { background: rgba(255,255,255,.06); }

/* ─── GitHub Repos Widget ─── */
.gh-widget { display: flex; flex-direction: column; height: 100%; }
.gh-repos { display: flex; flex-direction: column; flex: 1; }
.gh-repo-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.gh-repo-row:last-child { border-bottom: none; }
.gh-repo-row:hover { background: var(--hover-bg, var(--gray-50)); }
.gh-repo-name {
  font-size: 12px; font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-primary);
  display: flex; align-items: center;
}
.gh-repo-meta {
  display: flex; align-items: center; gap: 10px;
  padding-left: 16px;
}
.gh-lang { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--gray-500); }
.gh-lang-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gh-stat { font-size: 10px; color: var(--gray-400); display: flex; align-items: center; gap: 3px; }
.gh-stat i { font-size: 9px; }
/* Immersive GitHub */
.immersive-theme .gh-repo-row { border-color: rgba(255,255,255,.06); }
.immersive-theme .gh-repo-row:hover { background: rgba(255,255,255,.04); }

/* ─── Mini Rewards Widget ─── */
.mr-widget { display: flex; flex-direction: column; height: 100%; }
/* Level badge */
.mr-level-badge { display: flex; align-items: baseline; justify-content: center; gap: 5px; padding: 6px 0 2px; }
.mr-level-num {
  font-size: 14px; font-weight: 700; line-height: 1;
  color: var(--text-primary);
}
.mr-level-sep { font-size: 10px; color: var(--gray-300); }
.mr-level-name {
  font-size: 11px; font-weight: 500; color: var(--gray-400);
}
@keyframes mr-shimmer-text {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}
/* XP section */
.mr-xp-section { padding: 2px 0 4px; }
.mr-xp-number { font-size: 12px; font-weight: 600; color: var(--gray-500); line-height: 1; }
.mr-xp-label { font-size: 10px; font-weight: 500; opacity: 0.5; }
.mr-progress-track {
  height: 6px; background: var(--gray-100);
  border-radius: 3px; overflow: hidden;
  margin: 4px 4px 0; position: relative;
}
.mr-progress-fill {
  height: 100%; border-radius: 3px;
  background: var(--primary); opacity: 0.6;
  transition: width .6s ease;
}
.mr-progress-shimmer { display: none; }
.mr-progress-labels {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--gray-400);
  margin: 2px 4px 0; font-weight: 500;
}
/* 4 Stat Micro-Cards */
.mr-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 6px 0; margin: 2px 0;
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}
.mr-micro-card { text-align: center; }
.mr-micro-icon {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--gray-100); color: var(--gray-400);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 2px; font-size: 8px;
}
.mr-micro-val { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.mr-micro-lbl { font-size: 8px; color: var(--gray-400); font-weight: 500; }
/* Leaderboard */
.mr-leaderboard { display: flex; flex-direction: column; justify-content: center; padding: 2px 0; }
.mr-lb-row {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 4px; border-radius: 6px;
  font-size: 11px; transition: background .15s;
}
.mr-lb-row:hover { background: var(--hover-bg, var(--gray-50)); }
.mr-lb-me {
  background: var(--hover-bg, var(--gray-50));
  font-weight: 600;
}
.mr-lb-rank { width: 18px; text-align: center; flex-shrink: 0; }
.mr-lb-medal { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.mr-lb-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--gray-600);
  flex-shrink: 0;
}
.mr-lb-avatar-top { border: 1.5px solid var(--gray-300); }
.mr-lb-info { flex: 1; min-width: 0; }
.mr-lb-name { font-size: 12px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.mr-lb-bar-track { height: 3px; background: var(--gray-100); border-radius: 2px; margin-top: 3px; }
.mr-lb-bar-fill { height: 100%; border-radius: 2px; background: var(--gray-300); transition: width .6s; }
.mr-lb-xp { font-size: 11px; font-weight: 600; color: var(--gray-500); white-space: nowrap; flex-shrink: 0; }
/* Immersive mini rewards */
.immersive-theme .mr-progress-track { background: rgba(255,255,255,.08); }
.immersive-theme .mr-stats-grid { border-color: rgba(255,255,255,.06); }
.immersive-theme .mr-micro-icon { background: rgba(255,255,255,.06) !important; }
.immersive-theme .mr-lb-row:hover { background: rgba(255,255,255,.04); }
.immersive-theme .mr-lb-me { background: rgba(255,255,255,.06); }
.immersive-theme .mr-lb-avatar { background: rgba(255,255,255,.1); color: rgba(255,255,255,.6); }
.immersive-theme .mr-lb-bar-track { background: rgba(255,255,255,.08); }

/* ═══════════════════════════════════════════════════════════════
   DATA STUDIO — Analytics Dashboard
   ═══════════════════════════════════════════════════════════════ */

/* Page container */
.ds-page { padding: 0; }

/* Tab bar */
.ds-tab-bar {
  display: flex; gap: 0; border-bottom: 2px solid var(--divider-color);
  margin-bottom: 20px; overflow-x: auto;
}
.ds-tab {
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  color: var(--text-secondary); background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; white-space: nowrap; transition: color .25s, border-color .25s;
  position: relative;
}
.ds-tab i { margin-right: 6px; font-size: 12px; opacity: .55; transition: opacity .2s; }
.ds-tab.active i { opacity: 1; }
.ds-tab:hover { color: var(--text-primary); }
.ds-tab.active {
  color: var(--primary); border-bottom-color: transparent;
}

/* Tab content */
.ds-tab-content { display: none; }
.ds-tab-content.active { display: block; }

/* Filter bar */
.ds-filter-bar {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.ds-filter-group { display: flex; align-items: center; gap: 8px; }
.ds-filter-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-secondary);
}
.ds-pills { display: flex; gap: 4px; }
.ds-pill {
  padding: 5px 12px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--divider-color); border-radius: 16px;
  background: var(--card-bg); color: var(--text-secondary);
  cursor: pointer; transition: all .2s;
}
.ds-pill:hover { border-color: var(--primary); color: var(--primary); }
.ds-pill.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.ds-filter-select {
  padding: 5px 12px; font-size: 12px; border: 1px solid var(--divider-color);
  border-radius: 8px; background: var(--card-bg); color: var(--text-primary);
  outline: none; cursor: pointer;
}

/* Chart grid — 12-col with gap */
.ds-chart-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 16px; margin-bottom: 20px;
}
.ds-chart-grid > [data-col-span="3"]  { grid-column: span 3; }
.ds-chart-grid > [data-col-span="4"]  { grid-column: span 4; }
.ds-chart-grid > [data-col-span="6"]  { grid-column: span 6; }
.ds-chart-grid > [data-col-span="12"] { grid-column: span 12; }

/* Number cards (KPI) */
.ds-number-card {
  background: var(--card-bg); border: 1px solid var(--divider-color);
  border-radius: var(--radius-md); padding: 16px; position: relative;
  overflow: hidden; transition: box-shadow .2s;
}
.ds-number-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.ds-nc-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ds-nc-icon { font-size: 14px; opacity: .7; }
.ds-number-card[data-metric="headcount"] .ds-nc-icon { color: var(--primary); }
.ds-number-card[data-metric="attendance_rate"] .ds-nc-icon { color: var(--accent); }
.ds-number-card[data-metric="leave_utilization"] .ds-nc-icon { color: var(--warning); }
.ds-number-card[data-metric="engagement_score"] .ds-nc-icon { color: #8b5cf6; }
.ds-nc-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .3px; }
.ds-nc-body { display: flex; align-items: baseline; gap: 10px; }
.ds-nc-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.ds-nc-trend { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.ds-nc-trend.up { color: #10b981; }
.ds-nc-trend.down { color: #ef4444; }
/* Sparkline wrapper — locks height so Chart.js can't expand infinitely */
.ds-spark-wrap { position: relative; height: 32px; margin-top: 8px; overflow: hidden; }
.ds-spark-wrap canvas { display: block; }

/* Chart cards */
.ds-chart-card {
  background: var(--card-bg); border: 1px solid var(--divider-color);
  border-radius: var(--radius-md); padding: 16px; overflow: hidden;
}
.ds-cc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ds-cc-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }

/* Chart canvas wrapper — locks height so Chart.js can't cause infinite scroll */
.ds-chart-wrap { position: relative; height: 220px; overflow: hidden; }
.ds-chart-wrap--sm { height: 200px; }
.ds-chart-wrap canvas { display: block; }

.ds-cc-body { position: relative; }
.ds-cc-body-center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; }

/* Progress ring (task completion) */
.ds-progress-ring { width: 120px; height: 120px; position: relative; }
.ds-progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ds-ring-bg { fill: none; stroke: var(--divider-color); stroke-width: 8; }
.ds-ring-fill { fill: none; stroke: var(--primary); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ds-ring-value {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; color: var(--text-primary);
}
.ds-ring-meta { font-size: 12px; color: var(--text-secondary); margin-top: 8px; text-align: center; }

/* Drill-down modal */
.ds-drill-modal { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; }
.ds-drill-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.ds-drill-content {
  position: relative; width: 90%; max-width: 720px; max-height: 80vh;
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,.2); overflow: hidden;
  display: flex; flex-direction: column;
}
.ds-drill-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--divider-color);
}
.ds-drill-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.ds-drill-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--gray-100); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.ds-drill-close:hover { background: var(--gray-200); }
.ds-drill-body { padding: 20px; overflow-y: auto; flex: 1; }

/* Drill-down table */
.ds-drill-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-drill-table th {
  text-align: left; padding: 8px 12px; font-weight: 600; color: var(--text-secondary);
  border-bottom: 2px solid var(--divider-color); font-size: 11px; text-transform: uppercase;
}
.ds-drill-table td { padding: 8px 12px; border-bottom: 1px solid var(--divider-color); color: var(--text-primary); }
.ds-drill-table tbody tr:nth-child(even) { background: rgba(0,0,0,.015); }
.ds-drill-table tr:hover { background: rgba(0,0,0,.035); }
.ds-drill-table td:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Empty states */
.ds-empty {
  text-align: center; padding: 48px 20px; color: var(--text-secondary);
}
.ds-empty-icon { font-size: 40px; opacity: .3; margin-bottom: 12px; }
.ds-empty h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.ds-empty p { font-size: 13px; max-width: 360px; margin: 0 auto 16px; }

/* Dashboard list */
.ds-dashboard-list { display: flex; flex-direction: column; gap: 8px; }
.ds-dashboard-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--card-bg); border: 1px solid var(--divider-color);
  border-radius: var(--radius-md); text-decoration: none; color: var(--text-primary);
  transition: border-color .2s, transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s;
}
.ds-dashboard-item:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.ds-di-icon { font-size: 18px; color: var(--primary); opacity: .6; }
.ds-di-info { flex: 1; min-width: 0; }
.ds-di-name { font-size: 14px; font-weight: 600; display: block; }
.ds-di-desc { font-size: 12px; color: var(--text-secondary); display: block; }
.ds-di-vis {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  padding: 3px 8px; border-radius: 10px;
  background: var(--gray-100); color: var(--text-secondary);
}

/* ── Immersive theme overrides ── */
.immersive-theme .ds-tab-bar { border-bottom-color: rgba(255,255,255,.1); }
.immersive-theme .ds-tab { color: rgba(255,255,255,.5); }
.immersive-theme .ds-tab:hover { color: rgba(255,255,255,.8); }
.immersive-theme .ds-tab.active { color: var(--primary); border-bottom-color: transparent; }
.immersive-theme .ds-number-card,
.immersive-theme .ds-chart-card {
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08);
}
.immersive-theme .ds-number-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.immersive-theme .ds-pill {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.6);
}
.immersive-theme .ds-pill:hover { border-color: var(--primary); color: var(--primary); }
.immersive-theme .ds-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.immersive-theme .ds-filter-select {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
}
.immersive-theme .ds-drill-content { background: var(--card-bg, #1a1a1a); }
.immersive-theme .ds-drill-close { background: rgba(255,255,255,.1); color: rgba(255,255,255,.6); }
.immersive-theme .ds-drill-close:hover { background: rgba(255,255,255,.15); }
.immersive-theme .ds-drill-table tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
.immersive-theme .ds-drill-table tr:hover { background: rgba(255,255,255,.06); }
.immersive-theme .ds-dashboard-item { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.immersive-theme .ds-dashboard-item:hover { border-color: var(--primary); }
.immersive-theme .ds-di-vis { background: rgba(255,255,255,.08); color: rgba(255,255,255,.5); }
.immersive-theme .ds-ring-bg { stroke: rgba(255,255,255,.1); }

/* ── Light theme overrides ── */
.light-theme .ds-number-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }

/* ── Data Studio responsive ── */
@media (max-width: 1100px) {
  .ds-chart-grid > [data-col-span="3"] { grid-column: span 6; }
  .ds-chart-grid > [data-col-span="4"] { grid-column: span 6; }
}
@media (max-width: 768px) {
  .ds-chart-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ds-chart-grid > [data-col-span="3"] { grid-column: span 1; }
  .ds-chart-grid > [data-col-span="4"],
  .ds-chart-grid > [data-col-span="6"],
  .ds-chart-grid > [data-col-span="12"] { grid-column: span 2; }
  .ds-nc-value { font-size: 22px; }
  .ds-filter-bar { gap: 8px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ds-filter-bar::-webkit-scrollbar { display: none; }
  .ds-filter-group { flex-shrink: 0; }
  .ds-tab-bar { scrollbar-width: none; }
  .ds-tab-bar::-webkit-scrollbar { display: none; }
  .ds-tab { padding: 8px 14px; font-size: 12px; }
  .ds-drill-content { width: 100%; max-width: 100%; border-radius: 0; }
}
@media (max-width: 480px) {
  .ds-chart-grid { grid-template-columns: 1fr; }
  .ds-chart-grid > [data-col-span="3"],
  .ds-chart-grid > [data-col-span="4"],
  .ds-chart-grid > [data-col-span="6"],
  .ds-chart-grid > [data-col-span="12"] { grid-column: span 1; }
  .ds-nc-value { font-size: 20px; }
}

/* ── Data Studio Design Upgrades ── */

/* Number card enhancements */
.ds-number-card { transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s cubic-bezier(.22,1,.36,1); }
.ds-number-card:hover { transform: translateY(-2px); }
.ds-number-card[data-metric="headcount"] { border-left: 4px solid var(--primary); }
.ds-number-card[data-metric="attendance_rate"] { border-left: 4px solid var(--accent); }
.ds-number-card[data-metric="leave_utilization"] { border-left: 4px solid var(--warning); }
.ds-number-card[data-metric="engagement_score"] { border-left: 4px solid #8b5cf6; }
/* Value shimmer on first load */
.ds-nc-value { display: inline-block; }
.ds-nc-value.counting {
  background: linear-gradient(90deg, var(--text-primary) 40%, var(--primary) 50%, var(--text-primary) 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: ds-shimmer .8s ease forwards;
}
@keyframes ds-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Chart card polish */
.ds-chart-card { transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s cubic-bezier(.22,1,.36,1); position: relative; }
.ds-chart-card:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.ds-chart-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-md) var(--radius-md) 0 0; opacity: .6;
}
.ds-cc-actions {
  display: flex; gap: 4px; opacity: 0; transition: opacity .2s;
}
.ds-chart-card:hover .ds-cc-actions { opacity: 1; }
.ds-cc-action-btn {
  width: 28px; height: 28px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-tertiary); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  transition: background .15s, color .15s;
}
.ds-cc-action-btn:hover { background: var(--gray-100); color: var(--text-primary); }
.ds-pin-btn.pinned { color: var(--primary); }
.ds-pin-btn.pinned i { transform: rotate(-45deg); }

/* Chart skeleton loading */
.ds-chart-skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%; border-radius: var(--radius-md);
  animation: ds-skeleton-pulse 1.5s ease-in-out infinite;
}
@keyframes ds-skeleton-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Chart empty state */
.ds-chart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; min-height: 180px; color: var(--text-tertiary); gap: 8px;
}
.ds-chart-empty i { font-size: 28px; opacity: .3; }
.ds-chart-empty span { font-size: 12px; }

/* Dashboard view (inside drill-down drawer) */
.ds-dash-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ds-dash-header-left { flex: 1; min-width: 0; }
.ds-dash-name { margin: 0; font-weight: 700; font-size: 16px; color: var(--text-primary); }
.ds-dash-desc { margin: 4px 0 0; font-size: 12px; color: var(--text-secondary); }
.ds-dash-meta { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.ds-dash-header-right { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.ds-dash-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
}
.ds-dash-grid .ds-chart-card[data-col-span="2"] { grid-column: span 2; }
.ds-dash-grid .ds-chart-card[data-col-span="3"] { grid-column: span 3; }
.ds-dash-grid .ds-chart-card[data-col-span="4"] { grid-column: span 4; }
.ds-dash-grid .ds-chart-card[data-col-span="6"] { grid-column: 1 / -1; }

.ds-dash-empty {
  text-align: center; padding: 48px 20px; color: var(--text-secondary);
}
.ds-dash-empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gray-100); display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.ds-dash-empty-icon i { font-size: 22px; color: var(--text-tertiary); }
.ds-dash-empty h6 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 0 0 6px; }
.ds-dash-empty p { font-size: 13px; color: var(--text-secondary); margin: 0 0 16px; max-width: 320px; margin-left: auto; margin-right: auto; }

.ds-cc-action-delete:hover { color: var(--danger) !important; }

/* Sortable ghost for drag-and-drop */
.ds-chart-ghost { opacity: .35; }

/* Immersive overrides for dashboard view */
.immersive-theme .ds-dash-header { border-bottom-color: rgba(255,255,255,.08); }
.immersive-theme .ds-dash-name { color: rgba(255,255,255,.9); }
.immersive-theme .ds-dash-desc { color: rgba(255,255,255,.5); }
.immersive-theme .ds-dash-meta { color: rgba(255,255,255,.35); }
.immersive-theme .ds-dash-empty-icon { background: rgba(255,255,255,.06); }
.immersive-theme .ds-dash-empty-icon i { color: rgba(255,255,255,.3); }
.immersive-theme .ds-dash-empty h6 { color: rgba(255,255,255,.8); }
.immersive-theme .ds-dash-empty p { color: rgba(255,255,255,.45); }

/* Light theme overrides for dashboard view */
.sidebar.light-theme ~ .main-content .ds-cc-action-delete:hover { color: var(--danger) !important; }

/* Filter bar — sticky + glass */
.ds-filter-bar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: 12px 0; margin: -12px 0 20px;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.ds-pill { transition: all .2s cubic-bezier(.22,1,.36,1); }
.ds-pill:active { transform: scale(.95); }
.ds-pill.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent; box-shadow: 0 2px 8px rgba(126,72,28,.2);
}

/* AI Query Bar */
.ds-ai-bar {
  position: relative; margin-bottom: 20px;
}
.ds-ai-bar input {
  width: 100%; padding: 12px 16px 12px 42px; font-size: 14px;
  border: 1px solid var(--divider-color); border-radius: var(--radius-lg);
  background: var(--card-bg); color: var(--text-primary); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.ds-ai-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(126,72,28,.1);
}
.ds-ai-bar input::placeholder { color: var(--text-tertiary); }
.ds-ai-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 16px; pointer-events: none;
}
.ds-ai-spinner {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  display: none;
}
.ds-ai-bar.loading .ds-ai-spinner { display: block; }
.ds-ai-result {
  margin-top: 12px; animation: ds-fade-in-down .3s ease;
}
.ds-ai-result-card {
  background: var(--card-bg); border: 1px solid var(--divider-color);
  border-radius: var(--radius-md); padding: 16px; position: relative;
}
.ds-ai-interpretation {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 12px;
  padding: 8px 12px; background: rgba(126,72,28,.04); border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}
.ds-ai-chart-wrap { height: 240px; position: relative; overflow: hidden; }

/* AI query history */
.ds-ai-history-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; font-size: 11px; color: var(--text-tertiary);
  background: var(--gray-100); border: none; border-radius: 12px;
  cursor: pointer; transition: all .15s; margin: 0 4px 6px 0;
}
.ds-ai-history-item:hover { color: var(--text-primary); background: var(--gray-200); }
.ds-ai-history-item i { font-size: 10px; opacity: .5; }
#dsAiHistory { margin-bottom: 8px; }

/* Resize dropdown on chart cards */
.ds-resize-wrap { position: relative; display: inline-flex; }
.ds-resize-wrap:hover .ds-resize-menu { display: flex; }
.ds-resize-menu {
  display: none; position: absolute; top: 100%; right: 0; z-index: 20;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 4px; gap: 2px; white-space: nowrap;
}
.ds-resize-menu button {
  padding: 4px 8px; font-size: 11px; font-weight: 500;
  border: none; background: none; color: var(--text-secondary);
  border-radius: 4px; cursor: pointer; transition: all .12s;
}
.ds-resize-menu button:hover { background: var(--gray-100); color: var(--text-primary); }
.ds-resize-menu button.active { background: var(--primary); color: #fff; }

/* Fullscreen auto-rotate highlight */
.ds-rotate-active {
  box-shadow: 0 0 0 2px var(--primary), 0 8px 24px rgba(0,0,0,.15) !important;
  transform: scale(1.01);
  transition: box-shadow .4s, transform .4s;
}

/* Webhook status badges */
.ds-source-status.paused { color: var(--warning); }

/* Tab bar redesign — sliding underline */
.ds-tab-bar { position: relative; }
.ds-tab-bar::after {
  content: ''; position: absolute; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 1px;
  left: var(--ul-left, 0); width: var(--ul-width, 0);
  transition: left .3s cubic-bezier(.22,1,.36,1), width .3s cubic-bezier(.22,1,.36,1);
}
.ds-tab { position: relative; gap: 6px; display: inline-flex; align-items: center; transition: color .2s, border-color .2s; }
.ds-tab i { font-size: 12px; opacity: .5; transition: opacity .2s, color .2s; }
.ds-tab.active i { opacity: 1; color: var(--primary); }
.ds-tab:hover i { opacity: .8; }

/* Drill-down drawer (right-slide) */
.ds-drill-modal { align-items: stretch; justify-content: flex-end; }
.ds-drill-content {
  width: 480px; max-width: 90vw; max-height: none; height: 100vh;
  border-radius: 0; animation: ds-slide-in-right .25s ease;
}
.ds-drill-summary {
  display: flex; gap: 16px; padding: 12px 20px;
  border-bottom: 1px solid var(--divider-color); background: rgba(0,0,0,.02);
}
.ds-drill-stat {
  text-align: center; flex: 1;
}
.ds-drill-stat-val { font-size: 18px; font-weight: 700; color: var(--text-primary); display: block; }
.ds-drill-stat-label { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .5px; }

/* Insight cards */
.ds-insights { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.ds-insight-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px;
  background: var(--card-bg); border: 1px solid var(--divider-color);
  border-radius: var(--radius-md); animation: ds-fade-in-down .3s ease;
  border-left: 3px solid var(--divider-color); transition: border-color .2s;
}
.ds-insight-card:has(.info) { border-left-color: #3b82f6; }
.ds-insight-card:has(.warning) { border-left-color: #f59e0b; }
.ds-insight-card:has(.critical) { border-left-color: #ef4444; }
.ds-insight-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}
.ds-insight-icon.info { background: rgba(59,130,246,.1); color: #3b82f6; }
.ds-insight-icon.warning { background: rgba(245,158,11,.1); color: #f59e0b; }
.ds-insight-icon.critical { background: rgba(239,68,68,.1); color: #ef4444; }
.ds-insight-body { flex: 1; min-width: 0; }
.ds-insight-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ds-insight-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.ds-insight-dismiss {
  border: none; background: none; color: var(--text-tertiary); cursor: pointer;
  padding: 4px; font-size: 12px; opacity: .5; transition: opacity .15s;
}
.ds-insight-dismiss:hover { opacity: 1; }

/* Source cards */
.ds-source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ds-source-card {
  background: var(--card-bg); border: 1px solid var(--divider-color);
  border-radius: var(--radius-md); padding: 16px; transition: border-color .2s, transform .2s;
}
.ds-source-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.ds-source-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ds-source-icon {
  width: 36px; height: 36px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 16px;
  background: rgba(126,72,28,.08); color: var(--primary);
}
.ds-source-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ds-source-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text-tertiary); }
.ds-source-meta span { display: flex; align-items: center; gap: 4px; }
.ds-source-badge {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px;
  background: var(--gray-100); color: var(--text-secondary);
}
.ds-source-status { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.ds-source-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.ds-source-status.active::before { background: #10b981; }
.ds-source-status.error::before { background: #ef4444; }
.ds-source-status.syncing::before { background: #f59e0b; }

/* Upload card (dashed add pattern) */
.ds-upload-card {
  border: 2px dashed var(--divider-color); border-radius: var(--radius-md);
  padding: 32px 16px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 140px; color: var(--text-tertiary);
}
.ds-upload-card:hover { border-color: var(--primary); background: rgba(126,72,28,.02); color: var(--text-secondary); }
.ds-upload-card i { font-size: 28px; opacity: .4; }
.ds-upload-card span { font-size: 13px; font-weight: 500; }

/* Upload progress */
.ds-upload-progress {
  height: 4px; background: var(--gray-100); border-radius: 2px; overflow: hidden; margin-top: 8px;
}
.ds-upload-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px; transition: width .3s ease;
}

/* Schema editor (in upload modal) */
.ds-schema-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ds-schema-table th {
  text-align: left; padding: 8px 10px; font-weight: 600; color: var(--text-secondary);
  border-bottom: 2px solid var(--divider-color); font-size: 11px; text-transform: uppercase;
}
.ds-schema-table td { padding: 8px 10px; border-bottom: 1px solid var(--divider-color); }
.ds-schema-table input, .ds-schema-table select {
  padding: 4px 8px; border: 1px solid var(--divider-color); border-radius: 4px;
  font-size: 12px; background: var(--card-bg); color: var(--text-primary); width: 100%;
}

/* Preview data table */
.ds-preview-table { width: 100%; border-collapse: collapse; font-size: 12px; overflow-x: auto; display: block; }
.ds-preview-table th {
  padding: 6px 10px; background: var(--gray-100); font-weight: 600;
  color: var(--text-secondary); text-align: left; white-space: nowrap; font-size: 11px;
}
.ds-preview-table td {
  padding: 6px 10px; border-bottom: 1px solid var(--divider-color);
  color: var(--text-primary); white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis;
}
.ds-preview-table tr:nth-child(even) { background: rgba(0,0,0,.01); }

/* Add Chart wizard */
.ds-wizard-steps {
  display: flex; gap: 4px; margin-bottom: 20px;
}
.ds-wizard-step {
  flex: 1; text-align: center; padding: 8px; font-size: 11px; font-weight: 600;
  color: var(--text-tertiary); border-bottom: 2px solid var(--divider-color);
  transition: color .2s, border-color .2s;
}
.ds-wizard-step.active { color: var(--primary); border-bottom-color: var(--primary); }
.ds-wizard-step.done { color: var(--success); border-bottom-color: var(--success); }
.ds-chart-type-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.ds-chart-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border: 1px solid var(--divider-color); border-radius: var(--radius-sm);
  background: var(--card-bg); cursor: pointer; transition: border-color .15s, background .15s;
  color: var(--text-secondary); font-size: 11px; font-weight: 500;
}
.ds-chart-type-btn i { font-size: 20px; opacity: .5; }
.ds-chart-type-btn:hover { border-color: var(--primary); }
.ds-chart-type-btn.selected, .ds-chart-type-btn.active { border-color: var(--primary); background: rgba(126,72,28,.04); color: var(--primary); }
.ds-chart-type-btn.selected i, .ds-chart-type-btn.active i { opacity: 1; color: var(--primary); }
.ds-chart-preview-wrap {
  height: 200px; border: 1px solid var(--divider-color); border-radius: var(--radius-sm);
  overflow: hidden; margin-top: 12px; position: relative;
}

/* Auto-refresh toggle */
.ds-refresh-toggle {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  color: var(--text-tertiary); cursor: pointer; padding: 6px 10px;
  border: 1px solid var(--divider-color); border-radius: 6px;
  background: var(--card-bg); transition: all .15s; white-space: nowrap;
}
.ds-refresh-toggle:hover { border-color: var(--primary); color: var(--text-primary); }
.ds-refresh-toggle i { font-size: 12px; transition: color .2s; }
.ds-refresh-toggle.active { border-color: var(--success); color: var(--success); }
.ds-refresh-toggle.active i { color: var(--success); animation: ds-spin 2s linear infinite; }
@keyframes ds-spin { 100% { transform: rotate(360deg); } }

/* Fullscreen mode */
.ds-page.fullscreen-mode {
  position: fixed; inset: 0; z-index: 9999; overflow-y: auto;
  background: var(--content-bg, #f8fafc); padding: 24px;
}
.ds-page.fullscreen-mode .ds-tab-bar,
.ds-page.fullscreen-mode .ds-filter-bar { display: none; }
.ds-page.fullscreen-mode .ds-number-card { padding: 24px; }
.ds-page.fullscreen-mode .ds-nc-value { font-size: 36px; }
.ds-page.fullscreen-mode .ds-chart-wrap { height: 320px; }

/* Animations */
@keyframes ds-fade-in-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ds-slide-in-right { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes ds-slide-out-right { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes ds-fade-out { from { opacity: 1; } to { opacity: 0; } }
/* Drill-down close animation */
.ds-drill-modal.closing .ds-drill-content { animation: ds-slide-out-right .2s ease forwards; }
.ds-drill-modal.closing .ds-drill-overlay { animation: ds-fade-out .2s ease forwards; }
/* Progress ring pulse on load */
@keyframes ds-ring-pulse { 0% { filter: drop-shadow(0 0 0 transparent); } 50% { filter: drop-shadow(0 0 6px rgba(126,72,28,.3)); } 100% { filter: drop-shadow(0 0 0 transparent); } }
.ds-progress-ring svg { animation: ds-ring-pulse 1.5s ease-in-out .3s; }

/* ── Ferrari theme — red scrollbars ── */
[data-theme="ferrari"] { scrollbar-color: #8B0000 transparent; }
[data-theme="ferrari"] ::-webkit-scrollbar-thumb { background: #8B0000; }
[data-theme="ferrari"] ::-webkit-scrollbar-thumb:hover { background: #E10600; }
[data-theme="ferrari"] .sidebar::-webkit-scrollbar-thumb,
[data-theme="ferrari"] .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }
[data-theme="ferrari"] .sidebar::-webkit-scrollbar-thumb:hover,
[data-theme="ferrari"] .sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Rainbow Trout — iridescent card borders + rainbow accents ── */
[data-theme="rainbow-trout"] .stat-card,
[data-theme="rainbow-trout"] .widget-card {
  border-image: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(249,115,22,0.2), rgba(253,224,71,0.15), rgba(34,197,94,0.2), rgba(59,130,246,0.2), rgba(139,92,246,0.25)) 1;
  border-width: 1px;
  border-style: solid;
}
[data-theme="rainbow-trout"] .stat-card:hover,
[data-theme="rainbow-trout"] .widget-card:hover {
  border-image: linear-gradient(135deg, rgba(239,68,68,0.35), rgba(249,115,22,0.35), rgba(253,224,71,0.3), rgba(34,197,94,0.35), rgba(59,130,246,0.35), rgba(139,92,246,0.4)) 1;
}
[data-theme="rainbow-trout"] .stat-card .stat-icon { color: #A855F7 !important; }

/* ── Lemonade Stand — lemon cards, green borders, pink pops on cream ── */
[data-theme="lemonade-stand"] .stat-card,
[data-theme="lemonade-stand"] .widget-card {
  background: #FFF9DB !important;
  border-color: rgba(74,124,16,0.25) !important;
  box-shadow: 0 4px 16px rgba(74,124,16,0.08) !important;
}
[data-theme="lemonade-stand"] .stat-card:hover,
[data-theme="lemonade-stand"] .widget-card:hover {
  background: #FFF6C2 !important;
  border-color: rgba(74,124,16,0.4) !important;
  box-shadow: 0 6px 24px rgba(74,124,16,0.14) !important;
}
[data-theme="lemonade-stand"] .stat-card .stat-icon { color: #EC4899 !important; }
/* Widget header actions — green instead of default gray */
[data-theme="lemonade-stand"] .widget-card .widget-action { color: #4A7C10 !important; }
[data-theme="lemonade-stand"] .widget-card .widget-action:hover { color: #3D6A0C !important; }
/* Page-level elements — green borders to match cards */
[data-theme="lemonade-stand"] .qa-btn {
  background: #FFF9DB !important;
  border-color: rgba(74,124,16,0.2) !important;
}
[data-theme="lemonade-stand"] .snapshot-strip {
  background: #FFF9DB !important;
  border-color: rgba(74,124,16,0.2) !important;
}
[data-theme="lemonade-stand"] .dash-action-btn {
  background: #FFF9DB !important;
  border-color: rgba(74,124,16,0.18) !important;
}
/* Page headings — dark green instead of default gray */
[data-theme="lemonade-stand"] .page-content h1,
[data-theme="lemonade-stand"] .page-content h2,
[data-theme="lemonade-stand"] .page-content h3,
[data-theme="lemonade-stand"] .welcome-bar,
[data-theme="lemonade-stand"] .welcome-bar h1,
[data-theme="lemonade-stand"] .welcome-bar .welcome-name { color: #2D5A0E !important; }
[data-theme="lemonade-stand"] .welcome-bar .welcome-date { color: #4A7C10 !important; }

/* ── Oishi (Sushi Light) — clean zen, warm white, salmon accents ── */
[data-theme="sushi-light"] .stat-card,
[data-theme="sushi-light"] .widget-card {
  background: #FEFCF9 !important;
  border-color: rgba(232,148,90,0.15) !important;
  box-shadow: 0 2px 12px rgba(27,47,42,0.05) !important;
}
[data-theme="sushi-light"] .stat-card:hover,
[data-theme="sushi-light"] .widget-card:hover {
  border-color: rgba(232,148,90,0.3) !important;
  box-shadow: 0 4px 20px rgba(232,148,90,0.1) !important;
}
[data-theme="sushi-light"] .stat-card .stat-icon { color: #7BA05B !important; }
[data-theme="sushi-light"] .widget-card .widget-action { color: #1B2F2A !important; }
[data-theme="sushi-light"] .page-content h1,
[data-theme="sushi-light"] .page-content h2,
[data-theme="sushi-light"] .page-content h3,
[data-theme="sushi-light"] .welcome-bar,
[data-theme="sushi-light"] .welcome-bar h1,
[data-theme="sushi-light"] .welcome-bar .welcome-name { color: #1B2F2A !important; }
[data-theme="sushi-light"] .welcome-bar .welcome-date { color: rgba(27,47,42,0.6) !important; }
[data-theme="sushi-light"] .qa-btn {
  background: #FEFCF9 !important;
  border-color: rgba(232,148,90,0.15) !important;
}
[data-theme="sushi-light"] .snapshot-strip {
  background: #FEFCF9 !important;
  border-color: rgba(232,148,90,0.12) !important;
}
[data-theme="sushi-light"] .dash-action-btn {
  background: #FEFCF9 !important;
  border-color: rgba(232,148,90,0.12) !important;
}

/* ── Phase 2-4 Immersive overrides ── */
.immersive-theme .ds-filter-bar { background: rgba(0,0,0,.6); }
.immersive-theme .ds-chart-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.immersive-theme .ds-chart-card::before { opacity: .4; }
.immersive-theme .ds-cc-action-btn:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.immersive-theme .ds-ai-bar input {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.9);
}
.immersive-theme .ds-ai-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(126,72,28,.2); }
.immersive-theme .ds-ai-bar input::placeholder { color: rgba(255,255,255,.3); }
.immersive-theme .ds-ai-interpretation { background: rgba(255,255,255,.04); }
.immersive-theme .ds-insight-card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); border-left-color: rgba(255,255,255,.15); }
.immersive-theme .ds-insight-card:has(.info) { border-left-color: #3b82f6; }
.immersive-theme .ds-insight-card:has(.warning) { border-left-color: #f59e0b; }
.immersive-theme .ds-insight-card:has(.critical) { border-left-color: #ef4444; }
.immersive-theme .ds-nc-value.counting {
  background: linear-gradient(90deg, rgba(255,255,255,.9) 40%, var(--primary) 50%, rgba(255,255,255,.9) 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.immersive-theme .ds-source-card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.immersive-theme .ds-source-card:hover { border-color: var(--primary); }
.immersive-theme .ds-source-icon { background: rgba(255,255,255,.08); }
.immersive-theme .ds-upload-card { border-color: rgba(255,255,255,.12); }
.immersive-theme .ds-upload-card:hover { border-color: var(--primary); background: rgba(255,255,255,.03); }
.immersive-theme .ds-schema-table input,
.immersive-theme .ds-schema-table select { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }
.immersive-theme .ds-preview-table th { background: rgba(255,255,255,.06); }
.immersive-theme .ds-chart-type-btn { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.6); }
.immersive-theme .ds-chart-type-btn:hover { border-color: var(--primary); }
.immersive-theme .ds-chart-type-btn.selected { background: rgba(255,255,255,.08); }
.immersive-theme .ds-wizard-step { color: rgba(255,255,255,.4); border-bottom-color: rgba(255,255,255,.1); }
.immersive-theme .ds-wizard-step.active { color: var(--primary); }
.immersive-theme .ds-page.fullscreen-mode { background: var(--content-bg, #0a0a0a); }
.immersive-theme .ds-drill-summary { background: rgba(255,255,255,.03); }
.immersive-theme .ds-refresh-toggle { color: rgba(255,255,255,.6); }
.immersive-theme .ds-refresh-toggle:hover { color: rgba(255,255,255,.9); }
.immersive-theme .ds-ai-history-item { background: rgba(255,255,255,.06); color: rgba(255,255,255,.6); }
.immersive-theme .ds-ai-history-item:hover { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); }
.immersive-theme .ds-resize-menu { background: var(--card-bg, #1a1a2e); border-color: rgba(255,255,255,.1); }
.immersive-theme .ds-resize-menu button { color: rgba(255,255,255,.7); }
.immersive-theme .ds-resize-menu button:hover { background: rgba(255,255,255,.08); color: #fff; }
.immersive-theme .ds-dash-header { border-color: rgba(255,255,255,.08); }
.immersive-theme .ds-dash-empty { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.08); }

/* ── Phase 2-4 Light theme overrides ── */
.light-theme .ds-chart-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,.05); }

/* ── Phase 2-4 Responsive ── */
@media (max-width: 1100px) {
  .ds-source-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .ds-chart-type-grid { grid-template-columns: repeat(3, 1fr); }
  .ds-dash-grid .ds-chart-card[data-col-span="2"] { grid-column: span 3; }
  .ds-dash-grid .ds-chart-card[data-col-span="3"] { grid-column: span 3; }
  .ds-dash-grid .ds-chart-card[data-col-span="4"] { grid-column: span 6; }
}
@media (max-width: 768px) {
  .ds-drill-content { width: 100%; max-width: 100%; }
  .ds-source-grid { grid-template-columns: 1fr; }
  .ds-chart-type-grid { grid-template-columns: repeat(2, 1fr); }
  .ds-ai-bar input { font-size: 13px; padding: 10px 14px 10px 38px; }
  .ds-wizard-steps { overflow-x: auto; }
  .ds-page.fullscreen-mode .ds-nc-value { font-size: 28px; }
  .ds-dash-grid { grid-template-columns: 1fr; }
  .ds-dash-grid .ds-chart-card[data-col-span="2"],
  .ds-dash-grid .ds-chart-card[data-col-span="3"],
  .ds-dash-grid .ds-chart-card[data-col-span="4"],
  .ds-dash-grid .ds-chart-card[data-col-span="6"] { grid-column: span 1; }
}

/* ── Data Studio Modal System ── */
.ds-modal-overlay { position: fixed; inset: 0; z-index: 1070; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); }
.ds-modal { background: var(--card-bg, #fff); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.2); width: 90%; overflow: hidden; }
.ds-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.ds-modal-close { background: none; border: none; font-size: 16px; color: var(--text-tertiary); cursor: pointer; padding: 4px; border-radius: 6px; }
.ds-modal-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
.ds-field-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.ds-field-input { display: block; width: 100%; padding: 8px 12px; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg, var(--bg-secondary, #f9fafb)); color: var(--text-primary); outline: none; transition: border-color .15s; box-sizing: border-box; }
.ds-field-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(126,72,28,.1); }
.immersive-theme .ds-modal { background: var(--card-bg, #1a1a2e); border: 1px solid rgba(255,255,255,.1); }
.immersive-theme .ds-modal-header { border-color: rgba(255,255,255,.08); }
.immersive-theme .ds-field-input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.85); }
.immersive-theme .ds-field-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(126,72,28,.2); }
.light-theme .ds-modal { background: #fff; }

/* Sushi — deep salmon sidebar, black bg, salmon/tuna/wasabi/rice */
[data-theme="sushi"] .stat-card .stat-icon { color: #FA8072 !important; }
[data-theme="sushi"] .widget-card .widget-action { color: #FA8072 !important; }
[data-theme="sushi"] .widget-card .widget-action:hover { color: #FFB4A9 !important; }
[data-theme="sushi"] .stat-card:hover,
[data-theme="sushi"] .widget-card:hover { border-color: #FA8072 !important; }

/* ════════════════════════════════════════════════════════
   FILE SHARING MODULE
   ════════════════════════════════════════════════════════ */

/* Filter bar */
.fs-filter-bar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    margin-bottom: 16px; padding: 12px 16px;
    background: var(--card-bg, #fff); border: 1px solid var(--border);
    border-radius: 12px;
}
.fs-filter-search {
    position: relative; flex: 1; min-width: 180px;
}
.fs-filter-search i {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    font-size: 12px; color: var(--text-tertiary);
}
.fs-filter-search input {
    width: 100%; padding: 7px 10px 7px 30px; font-size: 13px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--input-bg, var(--bg-secondary, #f9fafb));
    color: var(--text-primary); outline: none; transition: border-color .15s;
}
.fs-filter-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(126,72,28,.08); }
.fs-filter-select {
    padding: 7px 28px 7px 10px; font-size: 12px; font-weight: 500;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--input-bg, var(--bg-secondary, #f9fafb));
    color: var(--text-primary); cursor: pointer; outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239ca3af'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}

/* Drop zone */
.fs-dropzone {
    margin-bottom: 16px;
}
.fs-dropzone-inner {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 32px 20px; min-height: 120px;
    border: 2px dashed var(--border); border-radius: 14px;
    background: var(--card-bg, #fff);
    transition: all .2s; cursor: pointer; text-align: center;
}
.fs-dropzone-inner:hover,
.fs-dropzone-inner.fs-dragover {
    border-color: var(--primary); background: rgba(126,72,28,.03);
}
.fs-dropzone-inner i {
    font-size: 32px; color: var(--primary); margin-bottom: 8px; opacity: .6;
}
.fs-dropzone-inner p { font-size: 14px; color: var(--text-secondary); margin: 0 0 4px; }
.fs-browse-link { color: var(--primary); font-weight: 600; cursor: pointer; text-decoration: underline; }
.fs-dropzone-hint { font-size: 11px; color: var(--text-tertiary); }

/* File grid */
.fs-file-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.fs-file-card {
    position: relative; display: flex; gap: 12px; align-items: flex-start;
    padding: 16px; background: var(--card-bg, #fff);
    border: 1px solid var(--border); border-radius: 14px;
    cursor: pointer; transition: all .2s;
}
.fs-file-card:hover {
    border-color: var(--primary); box-shadow: 0 4px 16px rgba(0,0,0,.06);
    transform: translateY(-1px);
}
.fs-pin-badge {
    position: absolute; top: 8px; right: 8px;
    font-size: 10px; color: var(--primary); opacity: .6;
}
.fs-file-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.fs-file-info { flex: 1; min-width: 0; }
.fs-file-title {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 6px;
}
.fs-file-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.fs-file-author {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--text-secondary);
}
.fs-file-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.fs-file-bottom {
    display: flex; gap: 10px; align-items: center;
}
.fs-file-stat {
    font-size: 11px; color: var(--text-tertiary); display: flex; align-items: center; gap: 3px;
}
.fs-file-stat i { font-size: 10px; }
.fs-file-actions {
    position: relative; display: flex; flex-direction: column; gap: 4px;
    flex-shrink: 0; align-self: center;
}
.fs-action-btn {
    width: 30px; height: 30px; border-radius: 8px; border: none;
    background: transparent; color: var(--text-tertiary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 12px; transition: all .15s;
}
.fs-action-btn:hover { background: var(--bg-secondary, rgba(0,0,0,.04)); color: var(--primary); }
.fs-action-menu {
    display: none; position: absolute; right: 0; top: 34px;
    background: var(--card-bg, #fff); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 140px; z-index: 100; overflow: hidden;
}
.fs-action-menu.show { display: block; }
.fs-action-menu div {
    padding: 8px 14px; font-size: 12px; font-weight: 500;
    color: var(--text-primary); cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: background .12s;
}
.fs-action-menu div:hover { background: var(--bg-secondary, rgba(0,0,0,.03)); }
.fs-action-menu div.text-danger { color: #ef4444; }

/* Empty state */
.fs-empty-state {
    grid-column: 1 / -1; text-align: center; padding: 60px 20px;
}
.fs-empty-icon {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px;
    background: rgba(126,72,28,.08); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
}
.fs-empty-state h3 {
    font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px;
}
.fs-empty-state p {
    font-size: 13px; color: var(--text-tertiary); margin-bottom: 16px;
}

/* Share modal form */
.fs-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.fs-input {
    font-size: 13px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--input-bg, var(--bg-secondary, #f9fafb));
    color: var(--text-primary); padding: 8px 12px;
}
.fs-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(126,72,28,.08); outline: none; }

/* Upload preview */
.fs-upload-preview {
    display: flex; align-items: center; gap: 12px;
    padding: 12px; background: var(--bg-secondary, #f9fafb);
    border-radius: 10px; margin-bottom: 16px;
}
.fs-upload-preview-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.fs-upload-preview-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.fs-upload-preview-size { font-size: 11px; color: var(--text-tertiary); }
.fs-upload-preview-remove {
    margin-left: auto; background: none; border: none; color: var(--text-tertiary);
    cursor: pointer; font-size: 14px; padding: 4px;
}
.fs-upload-preview-remove:hover { color: #ef4444; }

/* Upload progress */
.fs-upload-progress {
    display: flex; flex-direction: column; gap: 6px;
    padding: 16px; margin-bottom: 16px;
}
.fs-upload-progress-bar {
    height: 4px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.fs-upload-progress-fill {
    height: 100%; background: var(--primary); border-radius: 4px;
    transition: width .3s ease;
}
.fs-upload-progress-text { font-size: 11px; color: var(--text-tertiary); text-align: center; }

/* Share scope options */
.fs-share-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fs-share-option {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 6px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 11px; font-weight: 500; color: var(--text-secondary);
    cursor: pointer; transition: all .15s; text-align: center;
}
.fs-share-option input { display: none; }
.fs-share-option i { font-size: 14px; opacity: .5; }
.fs-share-option:hover { border-color: var(--primary); }
.fs-share-option.active {
    border-color: var(--primary); background: rgba(126,72,28,.06);
    color: var(--primary); font-weight: 600;
}
.fs-share-option.active i { opacity: 1; color: var(--primary); }

/* People picker */
.fs-people-results {
    max-height: 160px; overflow-y: auto; margin-top: 6px;
    border: 1px solid var(--border); border-radius: 8px;
}
.fs-people-results:empty { display: none; }
.fs-people-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; cursor: pointer; font-size: 13px;
    transition: background .1s; color: var(--text-primary);
}
.fs-people-item:hover { background: var(--bg-secondary, rgba(0,0,0,.02)); }
.fs-people-selected { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fs-person-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; background: rgba(126,72,28,.08);
    border-radius: 20px; font-size: 11px; font-weight: 500;
    color: var(--primary);
}
.fs-person-chip i { cursor: pointer; font-size: 10px; opacity: .6; }
.fs-person-chip i:hover { opacity: 1; color: #ef4444; }

/* Toggle switch */
.fs-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-top: 1px solid var(--border); margin-top: 4px;
}
.fs-toggle-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.fs-switch { position: relative; width: 38px; height: 20px; display: inline-block; }
.fs-switch input { opacity: 0; width: 0; height: 0; }
.fs-switch-slider {
    position: absolute; inset: 0; background: var(--border); border-radius: 20px;
    cursor: pointer; transition: all .2s;
}
.fs-switch-slider::before {
    content: ''; position: absolute; left: 2px; top: 2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.fs-switch input:checked + .fs-switch-slider { background: var(--primary); }
.fs-switch input:checked + .fs-switch-slider::before { transform: translateX(18px); }

/* Detail drawer */
.fs-drawer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.35);
    z-index: 1080; opacity: 0; pointer-events: none; transition: opacity .25s;
    backdrop-filter: blur(2px);
}
.fs-drawer-overlay.show { opacity: 1; pointer-events: auto; }
.fs-drawer {
    position: fixed; right: -420px; top: 0; bottom: 0; width: 400px;
    background: var(--card-bg, #fff); border-left: 1px solid var(--border);
    z-index: 1090; transition: right .3s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0,0,0,.1);
}
.fs-drawer.open { right: 0; }
.fs-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.fs-drawer-header h5 { font-size: 15px; font-weight: 700; margin: 0; color: var(--text-primary); }
.fs-drawer-close {
    background: none; border: none; font-size: 16px; color: var(--text-tertiary);
    cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.fs-drawer-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
.fs-drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.fs-drawer-loading {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 40px; color: var(--text-tertiary); font-size: 13px;
}
.fs-detail-icon {
    width: 64px; height: 64px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}
.fs-detail-title {
    font-size: 16px; font-weight: 700; text-align: center;
    color: var(--text-primary); margin-bottom: 6px;
}
.fs-detail-desc {
    font-size: 13px; color: var(--text-secondary); text-align: center;
    margin-bottom: 16px; line-height: 1.5;
}
.fs-detail-grid { margin-bottom: 16px; }
.fs-detail-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid var(--border);
    font-size: 12px;
}
.fs-detail-row:last-child { border-bottom: none; }
.fs-detail-label { color: var(--text-tertiary); font-weight: 500; }
.fs-detail-row span:last-child { color: var(--text-primary); font-weight: 500; }
.fs-detail-section {
    margin-top: 16px; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.fs-detail-section h6 {
    font-size: 12px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px;
}
.fs-recipients-list { display: flex; flex-direction: column; gap: 6px; }
.fs-recipient {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text-primary); font-weight: 500;
}
.fs-detail-actions {
    display: flex; gap: 8px; margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ─── Immersive Theme Overrides ─── */
.immersive-theme .fs-filter-bar { background: var(--card-bg, #1a1a2e); border-color: rgba(255,255,255,.08); }
.immersive-theme .fs-filter-search input,
.immersive-theme .fs-filter-select {
    background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
    color: rgba(255,255,255,.85);
}
.immersive-theme .fs-filter-search input:focus { border-color: var(--primary); }
.immersive-theme .fs-dropzone-inner { border-color: rgba(255,255,255,.12); background: var(--card-bg, #1a1a2e); }
.immersive-theme .fs-dropzone-inner:hover,
.immersive-theme .fs-dropzone-inner.fs-dragover { border-color: var(--primary); background: rgba(126,72,28,.06); }
.immersive-theme .fs-file-card { background: var(--card-bg, #1a1a2e); border-color: rgba(255,255,255,.06); }
.immersive-theme .fs-file-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.immersive-theme .fs-action-menu { background: var(--card-bg, #1e1e38); border-color: rgba(255,255,255,.1); box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.immersive-theme .fs-action-menu div:hover { background: rgba(255,255,255,.06); }
.immersive-theme .fs-input,
.immersive-theme .modal-content .fs-input {
    background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
    color: rgba(255,255,255,.85);
}
/* ─── Multi-File Upload Rows ─── */
.fs-upload-file-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    background: var(--bg-secondary, rgba(0,0,0,.02));
    margin-bottom: 6px; transition: background .15s;
}
.fs-upload-file-row:hover { background: var(--hover-bg, rgba(0,0,0,.04)); }
.fs-upload-file-icon { flex-shrink: 0; width: 32px; display: flex; align-items: center; justify-content: center; }
.fs-upload-file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fs-upload-file-title {
    border: none; background: transparent; color: var(--text-primary);
    font-size: 13px; font-weight: 500; padding: 2px 4px; border-radius: 4px;
    outline: none; width: 100%;
}
.fs-upload-file-title:focus { background: var(--bg-secondary, rgba(0,0,0,.04)); box-shadow: 0 0 0 1px var(--primary); }
.fs-upload-file-size { font-size: 11px; color: var(--text-tertiary); padding-left: 4px; }
.fs-upload-file-remove {
    flex-shrink: 0; width: 24px; height: 24px; border: none; background: transparent;
    color: var(--text-tertiary); cursor: pointer; border-radius: 4px; display: flex;
    align-items: center; justify-content: center; font-size: 11px; transition: all .15s;
}
.fs-upload-file-remove:hover { background: rgba(239,68,68,.1); color: #ef4444; }

.immersive-theme .fs-upload-file-row { background: rgba(255,255,255,.04); }
.immersive-theme .fs-upload-file-row:hover { background: rgba(255,255,255,.06); }
.immersive-theme .fs-upload-file-title { color: rgba(255,255,255,.85); }
.immersive-theme .fs-upload-file-title:focus { background: rgba(255,255,255,.06); }
.light-theme .fs-upload-file-row { background: #f8f8f8; }
.light-theme .fs-upload-file-row:hover { background: #f0f0f0; }

.immersive-theme .fs-share-option { border-color: rgba(255,255,255,.1); color: rgba(255,255,255,.6); }
.immersive-theme .fs-share-option.active { border-color: var(--primary); background: rgba(126,72,28,.12); color: var(--primary); }
.immersive-theme .fs-upload-preview { background: rgba(255,255,255,.04); }
.immersive-theme .fs-drawer { background: var(--card-bg, #1a1a2e); border-color: rgba(255,255,255,.08); }
.immersive-theme .fs-people-results { border-color: rgba(255,255,255,.1); }
.immersive-theme .fs-people-item:hover { background: rgba(255,255,255,.04); }
.immersive-theme .fs-toggle-row { border-color: rgba(255,255,255,.08); }
.immersive-theme .fs-detail-row { border-color: rgba(255,255,255,.06); }
.immersive-theme .fs-detail-section { border-color: rgba(255,255,255,.06); }

/* ─── Light Theme Overrides ─── */
.light-theme .fs-filter-bar { background: #fff; }
.light-theme .fs-file-card { background: #fff; }
.light-theme .fs-dropzone-inner { background: #fefefe; }
.light-theme .fs-drawer { background: #fff; }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .fs-file-grid { grid-template-columns: repeat(2, 1fr); }
    .fs-share-options { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .fs-file-grid { grid-template-columns: 1fr; }
    .fs-filter-bar { flex-direction: column; gap: 8px; }
    .fs-filter-search { min-width: 100%; }
    .fs-filter-select { width: 100%; }
    .fs-drawer { width: 100%; right: -100%; }
    .fs-share-options { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════
   STOCK MARKET PAGE
   ══════════════════════════════════════════════════════ */

/* ─── Header ─── */
.stocks-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stocks-header-left { display: flex; align-items: center; gap: 12px; }
.stocks-header .page-heading { font-size: 22px; font-weight: 700; margin: 0; }

/* Market Status Badge */
.market-status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.06); color: var(--text-secondary, rgba(255,255,255,0.5)); }
.market-status-badge.open { background: rgba(16,185,129,0.12); color: #10b981; }
.market-status-badge.pre_market { background: rgba(245,158,11,0.12); color: #f59e0b; }
.market-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.market-status-badge.open .market-dot { animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ─── Search ─── */
.stocks-search-wrap { position: relative; min-width: 280px; }
.stocks-search-box { position: relative; }
.stocks-search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.35); font-size: 13px; pointer-events: none; }
.stocks-search-box .form-control { padding-left: 36px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: #fff; border-radius: 10px; font-size: 13px; height: 38px; }
.stocks-search-box .form-control:focus { border-color: var(--accent); background: rgba(255,255,255,0.08); box-shadow: 0 0 0 3px rgba(6,182,212,0.15); }
.stocks-search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--card-bg, #1a1a2e); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; margin-top: 4px; max-height: 300px; overflow-y: auto; z-index: 100; display: none; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.search-result-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; cursor: pointer; transition: background 0.15s; font-size: 13px; }
.search-result-item:hover { background: rgba(255,255,255,0.06); }
.search-sym { font-weight: 600; color: #fff; }
.search-actions .btn-xs { padding: 2px 8px; font-size: 11px; border-radius: 6px; }
.search-no-results { padding: 16px; text-align: center; color: rgba(255,255,255,0.4); font-size: 12px; }

/* ─── Ticker Strip ─── */
.stocks-ticker-strip { display: flex; gap: 12px; margin-bottom: 24px; overflow-x: auto; padding-bottom: 4px; }
.ticker-card { flex: 1; min-width: 180px; background: var(--card-bg, rgba(255,255,255,0.04)); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 16px; text-align: center; transition: border-color 0.2s, transform 0.2s; }
.ticker-card:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-2px); }
.ticker-name { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.ticker-value { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.ticker-change { font-size: 13px; font-weight: 600; }
.ticker-change.up { color: #10b981; }
.ticker-change.down { color: #ef4444; }

/* Skeleton */
.skeleton-card { }
.skeleton-text { color: transparent !important; background: rgba(255,255,255,0.06); border-radius: 4px; animation: skeleton-pulse 1.5s infinite; }
@keyframes skeleton-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ─── Section ─── */
.stocks-section { margin-bottom: 24px; }
.stocks-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stocks-section-title { font-size: 16px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }

/* ─── Watchlist Grid ─── */
.stocks-watchlist-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.watchlist-card { background: var(--card-bg, rgba(255,255,255,0.04)); border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 14px; cursor: pointer; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; position: relative; }
.watchlist-card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.wc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.wc-symbol { font-size: 13px; font-weight: 700; color: #fff; }
.wc-remove { background: none; border: none; color: rgba(255,255,255,0.25); font-size: 11px; padding: 2px 4px; cursor: pointer; border-radius: 4px; transition: color 0.15s, background 0.15s; }
.wc-remove:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.wc-name { font-size: 11px; color: rgba(255,255,255,0.45); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-price { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.wc-change { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.wc-change.up { color: #10b981; }
.wc-change.down { color: #ef4444; }
.wc-sparkline { width: 100%; height: 30px; display: block; }

/* Empty state */
.stocks-empty-state { grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.35); }
.stocks-empty-state i { font-size: 36px; margin-bottom: 12px; opacity: 0.4; display: block; }
.stocks-empty-state p { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: rgba(255,255,255,0.5); }
.stocks-empty-state span { font-size: 12px; }

/* ─── Movers ─── */
.stocks-movers-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.mover-tab { padding: 6px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.08); background: transparent; color: rgba(255,255,255,0.5); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.mover-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.mover-tab:hover:not(.active) { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.stocks-movers-table-wrap { overflow-x: auto; }
.stocks-movers-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stocks-movers-table th { padding: 8px 12px; color: rgba(255,255,255,0.4); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.stocks-movers-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); color: rgba(255,255,255,0.8); }
.mover-row { cursor: pointer; transition: background 0.15s; }
.mover-row:hover { background: rgba(255,255,255,0.04); }
.mover-row td.up { color: #10b981; }
.mover-row td.down { color: #ef4444; }

/* ─── Heatmap ─── */
.stocks-heatmap-toggle { cursor: pointer; user-select: none; }
.heatmap-chevron { font-size: 12px; color: rgba(255,255,255,0.4); transition: transform 0.3s; }
.stocks-heatmap-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.heatmap-cell { border-radius: 6px; padding: 8px 4px; text-align: center; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.heatmap-cell:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 1; }
.hm-sym { font-size: 10px; font-weight: 700; letter-spacing: 0.3px; }
.hm-pct { font-size: 10px; font-weight: 600; margin-top: 2px; }

/* ─── Stock Drawer ─── */
.stock-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1050; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.stock-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.stock-drawer { position: fixed; top: 0; right: -500px; width: 480px; max-width: 100vw; height: 100vh; background: var(--card-bg, #141425); border-left: 1px solid rgba(255,255,255,0.08); z-index: 1051; overflow-y: auto; transition: right 0.35s cubic-bezier(0.16,1,0.3,1); padding: 24px; }
.stock-drawer.open { right: 0; }
.stock-drawer-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.drawer-symbol { font-size: 20px; font-weight: 800; margin: 0; }
.drawer-company { font-size: 13px; color: rgba(255,255,255,0.55); margin: 2px 0 0; }
.drawer-sector { font-size: 11px; color: rgba(255,255,255,0.35); margin: 2px 0 0; }
.drawer-actions { display: flex; gap: 8px; }
.drawer-star, .drawer-close { background: rgba(255,255,255,0.06); border: none; color: rgba(255,255,255,0.6); width: 34px; height: 34px; border-radius: 8px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; }
.drawer-star:hover, .drawer-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
.drawer-price-block { margin-bottom: 20px; }
.drawer-price { font-size: 28px; font-weight: 800; color: #fff; }
.drawer-change { font-size: 14px; font-weight: 600; margin-left: 8px; }
.drawer-change.up { color: #10b981; }
.drawer-change.down { color: #ef4444; }
.drawer-chart-wrap { margin-bottom: 12px; background: rgba(255,255,255,0.02); border-radius: 10px; padding: 8px; height: 200px; }
.drawer-period-tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.period-tab { padding: 5px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.08); background: transparent; color: rgba(255,255,255,0.5); font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.period-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.period-tab:hover:not(.active) { background: rgba(255,255,255,0.06); }
.drawer-metrics { margin-bottom: 20px; }
.metric-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 13px; }
.metric-row span:first-child { color: rgba(255,255,255,0.45); }
.metric-row span:last-child { color: #fff; font-weight: 600; }
.drawer-corporate { margin-bottom: 24px; }
.drawer-corporate h4 { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: rgba(255,255,255,0.7); }
.corporate-item { font-size: 12px; color: rgba(255,255,255,0.6); padding: 4px 0; display: flex; align-items: center; }

/* ─── Dashboard Widget: Stocks ─── */
.widget-stocks-indices { padding: 0 2px; }
.wsi-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; font-size: 12px; }
.wsi-name { font-weight: 600; color: rgba(255,255,255,0.6); font-size: 11px; }
.wsi-value { font-weight: 700; color: #fff; font-size: 13px; flex: 1; text-align: right; margin-right: 8px; }
.wsi-change { font-weight: 600; font-size: 11px; min-width: 55px; text-align: right; }
.wsi-change.up { color: #10b981; }
.wsi-change.down { color: #ef4444; }
.widget-stocks-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 8px 0; }
.widget-stocks-list { padding: 0 2px; }
.wsl-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 12px; }
.wsl-sym { font-weight: 600; color: rgba(255,255,255,0.7); font-size: 11px; }
.wsl-price { font-weight: 600; color: #fff; font-size: 12px; flex: 1; text-align: right; margin-right: 8px; }
.wsl-change { font-weight: 600; font-size: 11px; min-width: 50px; text-align: right; }
.wsl-change.up { color: #10b981; }
.wsl-change.down { color: #ef4444; }

/* ─── Light Theme Overrides ─── */
.light-theme .stocks-search-box i { color: rgba(0,0,0,0.35); }
.light-theme .stocks-search-box .form-control { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #1a1a2e; }
.light-theme .stocks-search-dropdown { background: #fff; border-color: rgba(0,0,0,0.1); box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
.light-theme .search-result-item:hover { background: rgba(0,0,0,0.04); }
.light-theme .search-sym { color: #1a1a2e; }
.light-theme .ticker-card { background: #fff; border-color: rgba(0,0,0,0.06); }
.light-theme .ticker-card:hover { border-color: rgba(0,0,0,0.12); }
.light-theme .ticker-name { color: rgba(0,0,0,0.45); }
.light-theme .ticker-value { color: #1a1a2e; }
.light-theme .watchlist-card { background: #fff; border-color: rgba(0,0,0,0.06); }
.light-theme .watchlist-card:hover { border-color: rgba(0,0,0,0.12); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.light-theme .wc-symbol { color: #1a1a2e; }
.light-theme .wc-name { color: rgba(0,0,0,0.45); }
.light-theme .wc-price { color: #1a1a2e; }
.light-theme .wc-remove { color: rgba(0,0,0,0.2); }
.light-theme .wc-remove:hover { color: #ef4444; background: rgba(239,68,68,0.08); }
.light-theme .stocks-empty-state { color: rgba(0,0,0,0.3); }
.light-theme .stocks-empty-state p { color: rgba(0,0,0,0.5); }
.light-theme .mover-tab { border-color: rgba(0,0,0,0.08); color: rgba(0,0,0,0.5); }
.light-theme .mover-tab:hover:not(.active) { background: rgba(0,0,0,0.04); }
.light-theme .stocks-movers-table th { color: rgba(0,0,0,0.4); border-color: rgba(0,0,0,0.06); }
.light-theme .stocks-movers-table td { color: rgba(0,0,0,0.7); border-color: rgba(0,0,0,0.04); }
.light-theme .mover-row:hover { background: rgba(0,0,0,0.03); }
.light-theme .market-status-badge { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.5); }
.light-theme .market-status-badge.open { background: rgba(16,185,129,0.08); color: #059669; }
.light-theme .stock-drawer { background: #fff; border-color: rgba(0,0,0,0.08); }
.light-theme .drawer-symbol { color: #1a1a2e; }
.light-theme .drawer-company { color: rgba(0,0,0,0.55); }
.light-theme .drawer-sector { color: rgba(0,0,0,0.35); }
.light-theme .drawer-star, .light-theme .drawer-close { background: rgba(0,0,0,0.04); color: rgba(0,0,0,0.5); }
.light-theme .drawer-price { color: #1a1a2e; }
.light-theme .metric-row span:first-child { color: rgba(0,0,0,0.45); }
.light-theme .metric-row span:last-child { color: #1a1a2e; }
.light-theme .metric-row { border-color: rgba(0,0,0,0.06); }
.light-theme .drawer-corporate h4 { color: rgba(0,0,0,0.65); }
.light-theme .corporate-item { color: rgba(0,0,0,0.55); }
.light-theme .period-tab { border-color: rgba(0,0,0,0.08); color: rgba(0,0,0,0.5); }
.light-theme .period-tab:hover:not(.active) { background: rgba(0,0,0,0.04); }
.light-theme .heatmap-chevron { color: rgba(0,0,0,0.4); }
.light-theme .wsi-name { color: rgba(0,0,0,0.55); }
.light-theme .wsi-value { color: #1a1a2e; }
.light-theme .wsl-sym { color: rgba(0,0,0,0.6); }
.light-theme .wsl-price { color: #1a1a2e; }
.light-theme .widget-stocks-divider { background: rgba(0,0,0,0.06); }

/* ─── Immersive Theme Overrides ─── */
.immersive-theme .stock-drawer { background: var(--card-bg, #1a1a2e); }
.immersive-theme .stocks-search-dropdown { background: var(--card-bg, #1a1a2e); }

/* ─── Responsive ─── */
@media (max-width: 1100px) {
    .stocks-watchlist-grid { grid-template-columns: repeat(3, 1fr); }
    .stocks-heatmap-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 768px) {
    .stocks-header { flex-direction: column; align-items: flex-start; }
    .stocks-search-wrap { min-width: 100%; width: 100%; }
    .stocks-watchlist-grid { grid-template-columns: repeat(2, 1fr); }
    .stocks-ticker-strip { gap: 8px; }
    .ticker-card { min-width: 140px; padding: 12px; }
    .ticker-value { font-size: 18px; }
    .stocks-heatmap-grid { grid-template-columns: repeat(4, 1fr); }
    .stock-drawer { width: 100%; right: -100%; }
    .stock-drawer.open { right: 0; }
}
