/* ═════════════════════════════════════════════════════════
   设计变量、每周 7 日主题、顶部环境光、顶部导航条与下拉菜单
   由原 style.css 按顺序拆出（P4.2），规则逐行原样搬移。层叠顺序靠 templates/layout/head.html
   中 01→10 的引用顺序保证，之后才加载 fonts.css 与 css/ui.css；新样式优先写进 css/ui.css。
   ═════════════════════════════════════════════════════════ */
/* ─── 调色板（P4.6）：样式表里的颜色一律写 var(--c-*)，色值只在这里出现一次 ───
   名字沿用 Tailwind 色板（slate-50 … rose-900，值完全一致），少数自定义色按色调命名。
   这些是「固定色值」，不随星期主题 / 孩子专属色变化；需要跟主题走的颜色用 --primary、--kid 等语义变量。 */
:root {
  --c-black: #000000; --c-white: #ffffff;
  --c-slate-50: #f8fafc; --c-slate-100: #f1f5f9; --c-slate-200: #e2e8f0; --c-slate-300: #cbd5e1; --c-slate-400: #94a3b8; --c-slate-500: #64748b; --c-slate-600: #475569; --c-slate-700: #334155; --c-slate-800: #1e293b; --c-slate-900: #0f172a;
  --c-stone-500: #78716c;
  --c-red-50: #fef2f2; --c-red-100: #fee2e2; --c-red-200: #fecaca; --c-red-300: #fca5a5; --c-red-500: #ef4444; --c-red-600: #dc2626; --c-red-700: #b91c1c; --c-red-800: #991b1b;
  --c-orange-50: #fff7ed; --c-orange-100: #ffedd5; --c-orange-200: #fed7aa; --c-orange-300: #fdba74; --c-orange-400: #fb923c; --c-orange-500: #f97316; --c-orange-600: #ea580c; --c-orange-700: #c2410c; --c-orange-800: #9a3412; --c-orange-900: #7c2d12;
  --c-amber-50: #fffbeb; --c-amber-100: #fef3c7; --c-amber-200: #fde68a; --c-amber-300: #fcd34d; --c-amber-400: #fbbf24; --c-amber-500: #f59e0b; --c-amber-600: #d97706; --c-amber-700: #b45309; --c-amber-800: #92400e; --c-amber-900: #78350f; --c-amber-950: #451a03;
  --c-yellow-50: #fefce8; --c-yellow-100: #fef9c3; --c-yellow-200: #fef08a; --c-yellow-300: #fde047; --c-yellow-400: #facc15; --c-yellow-500: #eab308; --c-yellow-600: #ca8a04; --c-yellow-700: #a16207; --c-yellow-800: #854d0e; --c-yellow-900: #713f12;
  --c-lime-50: #f7fee7; --c-lime-100: #ecfccb; --c-lime-500: #84cc16; --c-lime-600: #65a30d; --c-lime-700: #4d7c0f; --c-lime-900: #365314;
  --c-green-50: #f0fdf4; --c-green-100: #dcfce7; --c-green-200: #bbf7d0; --c-green-300: #86efac; --c-green-400: #4ade80; --c-green-500: #22c55e; --c-green-600: #16a34a; --c-green-700: #15803d; --c-green-800: #166534;
  --c-emerald-50: #ecfdf5; --c-emerald-100: #d1fae5; --c-emerald-200: #a7f3d0; --c-emerald-300: #6ee7b7; --c-emerald-400: #34d399; --c-emerald-500: #10b981; --c-emerald-600: #059669; --c-emerald-700: #047857; --c-emerald-800: #065f46;
  --c-teal-100: #ccfbf1; --c-teal-300: #5eead4; --c-teal-600: #0d9488; --c-teal-800: #115e59;
  --c-cyan-50: #ecfeff; --c-cyan-200: #a5f3fc;
  --c-sky-100: #e0f2fe; --c-sky-200: #bae6fd; --c-sky-300: #7dd3fc; --c-sky-400: #38bdf8; --c-sky-600: #0284c7; --c-sky-700: #0369a1;
  --c-blue-50: #eff6ff; --c-blue-200: #bfdbfe; --c-blue-400: #60a5fa; --c-blue-500: #3b82f6; --c-blue-600: #2563eb; --c-blue-700: #1d4ed8;
  --c-indigo-50: #eef2ff; --c-indigo-100: #e0e7ff; --c-indigo-200: #c7d2fe; --c-indigo-500: #6366f1; --c-indigo-600: #4f46e5; --c-indigo-700: #4338ca; --c-indigo-800: #3730a3; --c-indigo-900: #312e81; --c-indigo-950: #1e1b4b;
  --c-violet-50: #f5f3ff; --c-violet-100: #ede9fe; --c-violet-200: #ddd6fe; --c-violet-300: #c4b5fd; --c-violet-500: #8b5cf6; --c-violet-600: #7c3aed; --c-violet-700: #6d28d9; --c-violet-900: #4c1d95;
  --c-purple-50: #faf5ff; --c-purple-200: #e9d5ff; --c-purple-300: #d8b4fe; --c-purple-400: #c084fc; --c-purple-500: #a855f7; --c-purple-700: #7e22ce; --c-purple-800: #6b21a8; --c-purple-900: #581c87;
  --c-fuchsia-50: #fdf4ff; --c-fuchsia-100: #fae8ff; --c-fuchsia-200: #f5d0fe; --c-fuchsia-300: #f0abfc; --c-fuchsia-600: #c026d3; --c-fuchsia-500: #d946ef; --c-fuchsia-700: #a21caf; --c-fuchsia-800: #86198f; --c-fuchsia-900: #701a75;
  --c-pink-50: #fdf2f8; --c-pink-100: #fce7f3; --c-pink-200: #fbcfe8; --c-pink-400: #f472b6; --c-pink-500: #ec4899; --c-pink-600: #db2777; --c-pink-700: #be185d; --c-pink-800: #9d174d;
  --c-rose-50: #fff1f2; --c-rose-100: #ffe4e6; --c-rose-200: #fecdd3; --c-rose-300: #fda4af; --c-rose-500: #f43f5e; --c-rose-600: #e11d48; --c-rose-700: #be123c; --c-rose-800: #9f1239;
  --c-butter: #fff4dc; --c-cocoa: #3b2a00; --c-cream: #fffdf5; --c-ice: #fbfcfe; --c-ivory: #fffaf0; --c-lavender: #eceaf2; --c-linen: #fffbf7; --c-mist: #eef2f6; --c-night: #151630; --c-peach-100: #ffe8d3; --c-peach-200: #fde4cf; --c-snow: #fffafa;
}

:root {
      color-scheme: light;
      /* 主题 fallback 基准 = 周一"蔚蓝苍穹"；正常情况下由 html.theme-w* 覆盖 */
      --primary: #0284c7;
      --primary-light: #e0f2fe;
      /* 渐变跟随主题：var() 在消费元素上惰性解析，theme-w* 块定义了 --theme-accent-gradient 即自动换色 */
      --gradient-fun: var(--theme-accent-gradient, linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%));
      --amber: #f59e0b;
      --amber-light: #fef3c7;
      --amber-dark: #b45309;
      --green: #10b981;
      --green-light: #d1fae5;
      --green-dark: #047857;
      --blue: #0284c7;
      --blue-light: #e0f2fe;
      --purple: #8b5cf6;
      --purple-light: #ede9fe;
      --pink: #ec4899;
      --pink-light: #fce7f3;
      --rose: #f43f5e;
      --rose-light: #ffe4e6;
      --bg: #f4f6fb;
      --card-bg: #ffffff;
      --text: #1e293b;
      --text-muted: #64748b;
      --border: #e2e8f0;
      --radius-sm: 12px;
      --radius-md: 18px;
      --radius-lg: 24px;
      --radius-full: 9999px;
      --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
      --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06);
      --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.09);

      /* 🌟 默认今日焦点高亮渐变与阴影（随星期轮换） */
      --theme-banner-gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 45%, #0369a1 100%);
      --theme-banner-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
      --theme-today-ring: #0284c7;
      --theme-accent-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
      --theme-ambient-glow: radial-gradient(circle, rgba(2, 132, 199, 0.16) 0%, rgba(2, 132, 199, 0) 70%);
      --theme-border-glow: rgba(2, 132, 199, 0.12);
      --theme-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(2, 132, 199, 0.04);
      --theme-card-hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(2, 132, 199, 0.12);
    }

    /* ══════════ 每周 7 日高级情绪美学主题轮换 (Weekly 7-Day Cohesive Aesthetics) ══════════ */
    /* 周一：蔚蓝苍穹 🌊 (Azure Voyage) - 元气启航，海阔天空 */
    html.theme-w1, body.theme-w1 {
      --primary: #0284c7;
      --primary-hover: #0369a1;
      --primary-light: #e0f2fe;
      --primary-rgb: 2, 132, 199;
      --bg: #f8fafc;
      --theme-banner-gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 48%, #0369a1 100%);
      --theme-banner-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
      --theme-today-ring: #0284c7;
      --theme-accent-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
      --theme-ambient-glow: radial-gradient(circle, rgba(2, 132, 199, 0.16) 0%, rgba(2, 132, 199, 0) 70%);
      --theme-border-glow: rgba(2, 132, 199, 0.14);
      --theme-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(2, 132, 199, 0.04);
      --theme-card-hover-shadow: 0 14px 34px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(2, 132, 199, 0.14);
    }

    /* 周二：松柏晨露 🌲 (Forest Sage) - 专注宁静，如沐晨露 (避开打卡明绿) */
    html.theme-w2, body.theme-w2 {
      --primary: #0d9488;
      --primary-hover: #0f766e;
      --primary-light: #ccfbf1;
      --primary-rgb: 13, 148, 136;
      --bg: #f8faf9;
      --theme-banner-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 48%, #0f766e 100%);
      --theme-banner-shadow: 0 12px 30px rgba(13, 148, 136, 0.28);
      --theme-today-ring: #0d9488;
      --theme-accent-gradient: linear-gradient(135deg, #0d9488 0%, #2dd4bf 100%);
      --theme-ambient-glow: radial-gradient(circle, rgba(13, 148, 136, 0.16) 0%, rgba(13, 148, 136, 0) 70%);
      --theme-border-glow: rgba(13, 148, 136, 0.14);
      --theme-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(13, 148, 136, 0.04);
      --theme-card-hover-shadow: 0 14px 34px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(13, 148, 136, 0.14);
    }

    /* 周三：极客星云 🔮 (Nebula Violet) - 智慧破晓，灵感迸发 */
    html.theme-w3, body.theme-w3 {
      --primary: #7c3aed;
      --primary-hover: #6d28d9;
      --primary-light: #ede9fe;
      --primary-rgb: 124, 58, 237;
      --bg: #faf8fc;
      --theme-banner-gradient: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 48%, #5b21b6 100%);
      --theme-banner-shadow: 0 12px 30px rgba(124, 58, 237, 0.28);
      --theme-today-ring: #7c3aed;
      --theme-accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
      --theme-ambient-glow: radial-gradient(circle, rgba(124, 58, 237, 0.16) 0%, rgba(124, 58, 237, 0) 70%);
      --theme-border-glow: rgba(124, 58, 237, 0.14);
      --theme-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(124, 58, 237, 0.04);
      --theme-card-hover-shadow: 0 14px 34px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(124, 58, 237, 0.14);
    }

    /* 周四：暖阳琥珀 🍊 (Warm Amber) - 充沛能量，焦糖温润不躁 */
    html.theme-w4, body.theme-w4 {
      --primary: #c2410c;
      --primary-hover: #9a3412;
      --primary-light: #ffedd5;
      --primary-rgb: 194, 65, 12;
      --bg: #faf9f6;
      --theme-banner-gradient: linear-gradient(135deg, #c2410c 0%, #ea580c 48%, #7c2d12 100%);
      --theme-banner-shadow: 0 12px 30px rgba(194, 65, 12, 0.26);
      --theme-today-ring: #c2410c;
      --theme-accent-gradient: linear-gradient(135deg, #c2410c 0%, #f97316 100%);
      --theme-ambient-glow: radial-gradient(circle, rgba(194, 65, 12, 0.14) 0%, rgba(194, 65, 12, 0) 70%);
      --theme-border-glow: rgba(194, 65, 12, 0.13);
      --theme-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(194, 65, 12, 0.04);
      --theme-card-hover-shadow: 0 14px 34px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(194, 65, 12, 0.13);
    }

    /* 周五：落樱晚霞 🌸 (Dusk Rose) - 轻松期待，微醺高级玫瑰 */
    html.theme-w5, body.theme-w5 {
      --primary: #be185d;
      --primary-hover: #9d174d;
      --primary-light: #fce7f3;
      --primary-rgb: 190, 24, 93;
      --bg: #faf7f9;
      --theme-banner-gradient: linear-gradient(135deg, #be185d 0%, #db2777 48%, #831843 100%);
      --theme-banner-shadow: 0 12px 30px rgba(190, 24, 93, 0.28);
      --theme-today-ring: #be185d;
      --theme-accent-gradient: linear-gradient(135deg, #be185d 0%, #ec4899 100%);
      --theme-ambient-glow: radial-gradient(circle, rgba(190, 24, 93, 0.15) 0%, rgba(190, 24, 93, 0) 70%);
      --theme-border-glow: rgba(190, 24, 93, 0.14);
      --theme-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(190, 24, 93, 0.04);
      --theme-card-hover-shadow: 0 14px 34px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(190, 24, 93, 0.14);
    }

    /* 周六：丰收鎏金 👑 (Gilded Amber) - 自由狂欢，英伦琥珀高辨识金 */
    html.theme-w6, body.theme-w6 {
      --primary: #b45309;
      --primary-hover: #92400e;
      --primary-light: #fef3c7;
      --primary-rgb: 180, 83, 9;
      --bg: #fbf9f5;
      --theme-banner-gradient: linear-gradient(135deg, #b45309 0%, #d97706 48%, #78350f 100%);
      --theme-banner-shadow: 0 12px 30px rgba(180, 83, 9, 0.28);
      --theme-today-ring: #b45309;
      --theme-accent-gradient: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
      --theme-ambient-glow: radial-gradient(circle, rgba(180, 83, 9, 0.16) 0%, rgba(180, 83, 9, 0) 70%);
      --theme-border-glow: rgba(180, 83, 9, 0.14);
      --theme-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(180, 83, 9, 0.04);
      --theme-card-hover-shadow: 0 14px 34px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(180, 83, 9, 0.14);
    }

    /* 周日：极光碧玉 🌌 (Aurora Cyan) - 静谧复盘，深空松石湖光 */
    html.theme-w0, body.theme-w0 {
      --primary: #0891b2;
      --primary-hover: #0e7490;
      --primary-light: #cffafe;
      --primary-rgb: 8, 145, 178;
      --bg: #f7faf9;
      --theme-banner-gradient: linear-gradient(135deg, #0891b2 0%, #06b6d4 48%, #155e75 100%);
      --theme-banner-shadow: 0 12px 30px rgba(8, 145, 178, 0.28);
      --theme-today-ring: #0891b2;
      --theme-accent-gradient: linear-gradient(135deg, #0891b2 0%, #22d3ee 100%);
      --theme-ambient-glow: radial-gradient(circle, rgba(8, 145, 178, 0.16) 0%, rgba(8, 145, 178, 0) 70%);
      --theme-border-glow: rgba(8, 145, 178, 0.14);
      --theme-card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(8, 145, 178, 0.04);
      --theme-card-hover-shadow: 0 14px 34px rgba(0, 0, 0, 0.06), 0 6px 18px rgba(8, 145, 178, 0.14);
    }


    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
    }

    html {
      box-sizing: border-box;
      -webkit-text-size-adjust: 100%;
    }

    *,
    *::before,
    *::after {
      box-sizing: inherit;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      background-color: var(--bg);
      color: var(--text);
      margin: 0;
      padding: 0;
      padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
      -webkit-overflow-scrolling: touch;
      transition: background-color 0.4s ease, color 0.4s ease;
      position: relative;
      min-height: 100vh;
    }

    /* 🌈 顶部动态环境光漫反射 (Atmospheric Mesh Glow) */
    body::before {
      content: "";
      position: fixed;
      top: -100px;
      left: 50%;
      transform: translateX(-50%);
      width: 900px;
      max-width: 100vw;
      height: 320px;
      background: var(--theme-ambient-glow);
      filter: blur(60px);
      opacity: 0.8;
      pointer-events: none;
      z-index: 0;
      transition: background 0.5s ease;
    }

    /* ─── 顶部极简导航条 (单行紧凑 48px，严格防换行溢出) ─── */
    .header {
      background: var(--c-white);
      border-bottom: 1.5px solid var(--c-mist);
      position: sticky;
      top: 0;
      z-index: 100;
      padding: 8px 16px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    }

    .header-inner {
      max-width: 1000px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: nowrap;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--c-indigo-950);
      text-decoration: none;
      flex-shrink: 0;
    }

    .brand-icon {
      font-size: 1.35rem;
      animation: pulse 2s infinite ease-in-out;
    }

    .brand-text {
      font-size: 1.05rem;
      letter-spacing: -0.3px;
    }

    .version-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: var(--c-slate-100);
      color: var(--c-slate-600);
      padding: 2px 8px;
      border-radius: var(--radius-full);
      font-size: 0.75rem;
      font-weight: 700;
      border: 1px solid var(--c-slate-200);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .version-tag:hover {
      background: var(--c-slate-200);
      color: var(--c-slate-800);
    }

    .version-pulse-dot {
      width: 6px;
      height: 6px;
      background: var(--c-emerald-500);
      border-radius: 50%;
    }

    @keyframes pulse {
      0%,
      100% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.15) rotate(5deg);
      }
    }

    /* 小朋友切换胶囊容器 (水平自适应单行横滑，绝不折行) */
    .student-chips-wrapper {
      display: flex;
      align-items: center;
      flex: 1;
      min-width: 0;
      justify-content: center;
    }

    .student-chips {
      display: flex;
      background: var(--c-slate-100);
      padding: 3px 4px;
      border-radius: var(--radius-full);
      gap: 3px;
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      max-width: 100%;
    }

    .student-chips::-webkit-scrollbar {
      display: none;
    }

    .student-chip {
      border: none;
      background: transparent;
      padding: 4px 12px;
      font-size: 0.85rem;
      font-weight: 700;
      border-radius: var(--radius-full);
      cursor: pointer;
      color: var(--c-slate-500);
      display: flex;
      align-items: center;
      gap: 4px;
      transition: all 0.2s ease;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .student-chip.active {
      background: var(--c-white);
      color: var(--primary);
      box-shadow: 0 2px 8px rgba(var(--primary-rgb, 2, 132, 199), 0.16);
    }

    /* 右侧操作区：聚合下拉菜单 */
    .header-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    /* 下拉容器通用规范 */
    .header-dropdown {
      position: relative;
      display: inline-block;
    }

    /* 乐园 / 工具药丸按钮 */
    .header-tool-btn {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: var(--c-amber-50);
      color: var(--c-amber-700);
      border: 1.5px solid var(--c-amber-200);
      padding: 5px 12px;
      border-radius: var(--radius-full);
      font-size: 0.84rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }

    .header-tool-btn:hover {
      background: var(--c-amber-100);
      border-color: var(--c-amber-500);
      transform: translateY(-1px);
    }

    .header-tool-btn.can-draw-pulse {
      animation: treasureJiggle 2.5s ease-in-out infinite;
      box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
      border-color: var(--c-amber-500);
    }

    .header-tool-btn .badge-dot {
      position: absolute;
      top: -2px;
      right: -2px;
      width: 9px;
      height: 9px;
      background: var(--c-red-500);
      border-radius: 50%;
      border: 2px solid var(--c-white);
      box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
      animation: pulseAlert 0.9s infinite alternate;
    }

    .header-tool-btn .tool-arrow,
    .parent-badge .parent-arrow {
      font-size: 0.75rem;
      opacity: 0.75;
      margin-left: 2px;
      transition: transform 0.2s ease;
    }

    .header-dropdown.active .tool-arrow,
    .header-dropdown.active .parent-arrow {
      transform: rotate(180deg);
    }

    /* 家长模式胶囊按钮 */
    .parent-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 12px;
      border-radius: var(--radius-full);
      font-size: 0.84rem;
      font-weight: 700;
      border: none;
      cursor: pointer;
      transition: all 0.2s ease;
      position: relative;
    }

    .parent-badge.locked {
      background: var(--c-slate-50);
      color: var(--c-slate-500);
      border: 1px solid var(--c-slate-300);
    }

    .parent-badge.locked:hover {
      background: var(--c-slate-100);
      color: var(--c-slate-800);
      border-color: var(--c-slate-400);
    }

    .parent-badge.unlocked {
      background: var(--green-light);
      color: var(--green-dark);
      border: 1.5px solid var(--c-emerald-200);
      box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
    }

    .parent-badge.unlocked:hover {
      background: var(--c-green-200);
    }

    /* 下拉气泡菜单 (Popover Menu) */
    .header-dropdown-menu {
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      min-width: 240px;
      background: var(--c-white);
      border-radius: var(--radius-md);
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.04);
      border: 1.5px solid var(--border);
      padding: 6px;
      display: none;
      flex-direction: column;
      gap: 2px;
      z-index: 1000;
      transform-origin: top right;
      animation: dropdownSlideIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .header-dropdown.active .header-dropdown-menu {
      display: flex;
    }

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

    .dropdown-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      border-radius: 10px;
      border: none;
      background: transparent;
      cursor: pointer;
      text-align: left;
      width: 100%;
      transition: background 0.15s ease, transform 0.15s ease;
      color: var(--text);
    }

    .dropdown-item:hover {
      background: var(--c-slate-50);
      transform: translateX(2px);
    }

    .dropdown-item .item-icon {
      font-size: 1.25rem;
      width: 26px;
      height: 26px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .dropdown-item .item-content {
      flex: 1;
      min-width: 0;
    }

    .dropdown-item .item-title {
      font-size: 0.84rem;
      font-weight: 700;
      color: var(--c-slate-800);
      line-height: 1.3;
    }

    .dropdown-item .item-sub {
      font-size: 0.75rem;
      color: var(--c-slate-500);
      margin-top: 1px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.2;
    }

    .dropdown-item.item-danger:hover {
      background: var(--c-red-50);
    }

    .dropdown-divider {
      height: 1px;
      background: var(--c-slate-200);
      margin: 4px 6px;
    }
