/**
 * MediCare AI — Master Design System (VIP Pro V3)
 * Comprehensive tokens for Colors, Typography, Elevation, Motion & Spacing
 */

:root {
  /* LIGHT MODE TOKENS (Medical Clean & Trustworthy) */
  --bg-l0: #f8fafc;
  --bg-l1: #ffffff;
  --bg-l2: #f1f5f9;
  --bg-l3: #e2e8f0;
  --bg-l4: #cbd5e1;

  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.06);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-on-accent: #ffffff;

  --accent-primary: #0d9488;
  --accent-secondary: #06b6d4;
  --accent-light: #ccfbf1;
  --accent-glow: rgba(13, 148, 136, 0.25);

  --status-emergency: #ef4444;
  --status-emergency-bg: #fee2e2;
  --status-caution: #f59e0b;
  --status-caution-bg: #fef3c7;
  --status-success: #10b981;
  --status-success-bg: #d1fae5;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 24px var(--accent-glow);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-instant: 120ms var(--ease-spring);
  --motion-fast: 180ms var(--ease-spring);
  --motion-normal: 260ms var(--ease-spring);
  --motion-slow: 400ms var(--ease-spring);
  --motion-cinematic: 700ms var(--ease-spring);

  --nav-rail-width: 72px;
  --content-max-width: 1440px;
  --content-wide-max: 1680px;
  --content-4k-max: 1920px;
}

/* DARK MODE TOKENS (Deep Void Navy — Futuristic Clinical) */
html[data-theme="dark"],
body.dark {
  --bg-l0: #070b12;
  --bg-l1: #0d1424;
  --bg-l2: #131d31;
  --bg-l3: #1a2640;
  --bg-l4: #223152;

  --glass-bg: rgba(13, 20, 36, 0.82);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-on-accent: #ffffff;

  --accent-primary: #14b8a6;
  --accent-secondary: #06b6d4;
  --accent-light: rgba(20, 184, 166, 0.16);
  --accent-glow: rgba(20, 184, 166, 0.35);

  --status-emergency: #f87171;
  --status-emergency-bg: rgba(239, 68, 68, 0.22);
  --status-caution: #fbbf24;
  --status-caution-bg: rgba(245, 158, 11, 0.22);
  --status-success: #34d399;
  --status-success-bg: rgba(16, 185, 129, 0.22);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 32px -6px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 28px rgba(6, 182, 212, 0.32);
}

/* Reduced Motion */
@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;
  }
}

/* ==========================================================================
   Universal Resets & Normalization (Bulletproof Prevention of Purple Links & 3D Buttons)
   ========================================================================== */
a, a:visited {
  color: inherit;
  text-decoration: none;
}

button, input[type="button"], input[type="submit"], input[type="reset"] {
  font: inherit;
  color: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* ==========================================================================
   Personal Health AI OS Architecture Tokens & Motion
   ========================================================================== */
:root {
  --nav-rail-width: 76px;
  --composer-max-width: 820px;
  --drawer-width: 340px;
  --glass-panel: rgba(255, 255, 255, 0.85);
  --glass-composer: rgba(255, 255, 255, 0.92);
  --surface-floating: #ffffff;
}

html[data-theme="dark"], body.dark {
  --glass-panel: rgba(13, 20, 36, 0.88);
  --glass-composer: rgba(13, 20, 36, 0.94);
  --surface-floating: #0e172a;
}

@keyframes ai-orb-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(13, 148, 136, 0.25), 0 0 60px rgba(6, 182, 212, 0.15);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 40px rgba(13, 148, 136, 0.40), 0 0 85px rgba(6, 182, 212, 0.28);
  }
}

@keyframes biometric-wave-flow {
  0% { stroke-dashoffset: 200; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -200; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.92); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 0.3; }
  100% { transform: scale(0.92); opacity: 0.8; }
}

/* ==========================================================================
   GLOBAL APP SHELL: SLIM NAVIGATION RAIL & PERSONAL HEALTH OS
   ========================================================================== */
.app-nav-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--nav-rail-width, 76px);
  z-index: 95;
  background: var(--bg-l1);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 18px;
  gap: 12px;
  user-select: none;
}

.rail-brand {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-primary), #0f766e);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 6px 16px var(--accent-glow);
  transition: transform var(--motion-fast), box-shadow var(--motion-fast);
  margin-bottom: 8px;
}
.rail-brand:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 22px var(--accent-glow);
}

.rail-brand-mark {
  line-height: 1;
}

.rail-menu {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.rail-item {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--motion-fast);
  text-decoration: none;
  font-family: inherit;
}
.rail-item:hover {
  color: var(--accent-primary);
  background: var(--accent-light);
}
.rail-item.active {
  color: #ffffff !important;
  background: var(--accent-primary) !important;
  box-shadow: 0 6px 16px var(--accent-glow);
}
.rail-item.active svg {
  stroke: #ffffff;
}

.rail-label {
  display: none;
}

.rail-divider {
  width: 32px;
  height: 1px;
  background: var(--border-subtle);
  margin: 6px 0;
}

.rail-item[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 64px;
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: var(--shadow-md);
  transition: opacity var(--motion-fast), transform var(--motion-fast);
  z-index: 1000;
}
.rail-item[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

html[data-theme="dark"] .rail-item[data-tooltip]::after {
  background: #1e293b;
  border: 1px solid var(--border-subtle);
}

.rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.rail-user-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6, var(--accent-primary));
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 10px var(--accent-glow);
  cursor: pointer;
  transition: transform var(--motion-fast);
}
.rail-user-avatar:hover {
  transform: scale(1.06);
}

/* Global Top Context Bar */
.topbar.os-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  height: 68px;
  margin-left: var(--nav-rail-width, 76px);
  width: calc(100% - var(--nav-rail-width, 76px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--motion-fast);
}

.os-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.os-brand .brand-mark, .brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.os-brand strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: block;
}

.os-brand em {
  color: var(--accent-primary);
  font-style: normal;
}

.os-brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.os-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-l1);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Global Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .app-nav-rail {
    display: none !important;
  }
  .topbar.os-topbar {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 16px !important;
    height: 60px !important;
  }
  .os-context-pill {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 90;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
  }
  .mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-tertiary);
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    height: 100%;
    transition: color var(--motion-fast);
  }
  .mobile-bottom-item.active {
    color: var(--accent-primary);
  }
  .mobile-bottom-item svg {
    stroke-width: 2.2;
  }
}

/* ==========================================================================
   APEX MAXIMUM: SPATIAL DEPTH & MATERIAL SYSTEM
   ========================================================================== */
:root {
  --layer-env: 0;
  --layer-base: 10;
  --layer-surface: 20;
  --layer-elevated: 30;
  --layer-floating: 50;
  --layer-drawer: 80;
  --layer-modal: 1000;
  --layer-critical: 9999;
}

/* ==========================================================================
   APEX MATERIAL SYSTEM (6 CANONICAL SURFACES)
   ========================================================================== */

/* 1. Ambient Surface: Volumetric backdrop lighting */
.surface-ambient {
  position: relative;
  background: var(--bg-l0);
  overflow: hidden;
}

/* 2. Soft Solid Surface: Clean opaque container for dense readable text */
.surface-soft-solid {
  background: var(--bg-l1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

/* 3. Frosted Surface: High-definition frosted glassmorphism */
.surface-frosted,
.surface-frosted-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

/* 4. Floating Surface: High elevation for docks, composer, popovers */
.surface-floating,
.surface-elevated-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  border-radius: var(--radius-xl);
}

/* 5. Interactive Surface: Cards and nodes with spring micro-interactions */
.surface-interactive {
  transition: transform var(--motion-fast), box-shadow var(--motion-fast), border-color var(--motion-fast);
  cursor: pointer;
}

.surface-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(13, 148, 136, 0.35);
}

/* 6. Critical Surface: Clinical emergency triage affordance (Never noisy neon) */
.surface-critical {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  border-radius: var(--radius-lg);
}

html[data-theme="dark"] .surface-critical {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(248, 113, 113, 0.45);
  color: #f87171;
}

/* ==========================================================================
   APEX UNIFIED BUTTON SYSTEM
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  font-weight: 750;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: transform var(--motion-fast), box-shadow var(--motion-fast);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-l2);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--motion-fast);
  text-decoration: none;
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--motion-fast);
  text-decoration: none;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--accent-light);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-weight: 750;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--motion-fast);
}

.btn-danger:hover {
  background: #ef4444;
  color: #ffffff;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-l1);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all var(--motion-fast);
}

.btn-icon:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   APEX UNIFIED FORM CONTROLS
   ========================================================================== */

.input-field,
.textarea-field,
.select-field {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-l1);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.input-field:focus,
.textarea-field:focus,
.select-field:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

/* MEDICARE Core Visual Component */
.medicare-core-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.medicare-core-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2dd4bf 0%, #0d9488 65%, #0f766e 100%);
  box-shadow: 0 0 35px rgba(13, 148, 136, 0.45), inset 0 0 15px rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all var(--motion-normal);
  animation: coreBreathe 3.2s ease-in-out infinite;
}

@keyframes coreBreathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(13, 148, 136, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 45px rgba(20, 184, 166, 0.6);
  }
}

/* Core States */
.medicare-core-orb.state-processing {
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0ea5e9 65%, #0284c7 100%);
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.55);
  animation: corePulseFast 1.2s ease-in-out infinite;
}

.medicare-core-orb.state-caution {
  background: radial-gradient(circle at 35% 35%, #fbbf24 0%, #d97706 65%, #b45309 100%);
  box-shadow: 0 0 35px rgba(217, 119, 6, 0.5);
}

.medicare-core-orb.state-emergency {
  background: radial-gradient(circle at 35% 35%, #f87171 0%, #dc2626 65%, #991b1b 100%);
  box-shadow: 0 0 45px rgba(220, 38, 38, 0.7);
  animation: none !important;
}

@keyframes corePulseFast {
  0%, 100% { transform: scale(0.98); }
  50% { transform: scale(1.08); }
}

/* ==========================================================================
   GLOBAL COMMAND PALETTE (Ctrl/Cmd + K)
   ========================================================================== */
.cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--layer-modal);
  background: rgba(7, 11, 18, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--motion-fast);
}

.cmd-palette-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cmd-palette-modal {
  width: 90%;
  max-width: 620px;
  background: var(--bg-l1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(-16px) scale(0.98);
  transition: transform var(--motion-fast);
}

html[data-theme="dark"] .cmd-palette-modal {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
}

.cmd-palette-backdrop.active .cmd-palette-modal {
  transform: translateY(0) scale(1);
}

.cmd-palette-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-palette-header svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
}

.cmd-palette-input::placeholder {
  color: var(--text-tertiary);
}

.cmd-palette-kbd {
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--bg-l2);
  border: 1px solid var(--border-subtle);
}

.cmd-palette-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
  list-style: none;
  margin: 0;
}

.cmd-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background var(--motion-instant);
}

.cmd-palette-item:hover,
.cmd-palette-item.selected {
  background: var(--bg-l2);
  color: var(--accent-primary);
}

html[data-theme="dark"] .cmd-palette-item:hover,
html[data-theme="dark"] .cmd-palette-item.selected {
  background: rgba(255, 255, 255, 0.08);
}

.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmd-item-left svg {
  color: var(--accent-secondary);
}

.cmd-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent-primary);
  font-weight: 600;
}

html[data-theme="dark"] .cmd-badge {
  background: rgba(13, 148, 136, 0.2);
  color: #2dd4bf;
}

/* ==========================================================================
   APEX GLASSMORPHIС ACCOUNT DROPDOWN MENU
   ========================================================================== */
.account-dropdown-menu {
  position: fixed;
  z-index: 10000;
  width: 290px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  padding: 10px;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="dark"] .account-dropdown-menu {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.account-dropdown-menu.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.account-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 12px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .account-dropdown-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.account-dropdown-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
  flex-shrink: 0;
}

.account-dropdown-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.account-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-dropdown-email {
  font-size: 11.5px;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-dropdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 9999px;
  margin-top: 4px;
  align-self: flex-start;
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
}

html[data-theme="dark"] .account-dropdown-badge {
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
}

.account-dropdown-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 4px 0;
}

.account-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-primary, #0f172a);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
}

.account-dropdown-item:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--accent-primary, #0d9488);
}

html[data-theme="dark"] .account-dropdown-item {
  color: #e2e8f0;
}

html[data-theme="dark"] .account-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #2dd4bf;
}

.account-dropdown-item.danger {
  color: #ef4444;
  margin-top: 4px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 0 0 10px 10px;
  padding-top: 10px;
}

html[data-theme="dark"] .account-dropdown-item.danger {
  color: #f87171;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.account-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.account-item-icon {
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}




