/* ============================================================
   shell-premium.css — 旗舰壳表现层（清爽白侧栏版）
   加载顺序：style.css → design-system.css → 本文件（最后）
   → 同等特异性下本文件胜出，仅改「侧栏 + 顶栏」表现，不碰任何页面布局/功能。
   全部用字面量 premium 值 + 本文件内局部 --shell-* 变量，
   不新增 design-system.css 的 :root 令牌（避免 _audit_tokens 冲突）。

   风格：白色清爽侧栏（纯白底 + 灰字 + 选中浅蓝高亮）
        + 浅色玻璃顶栏（命令搜索 / 环境胶囊 / 通知铃）。
   ============================================================ */

:root {
  /* ── 侧栏白色清爽基底 ── */
  --shell-bg: #ffffff;
  --shell-bg-soft: #f8fafc;
  --shell-group: #94a3b8;
  --shell-hair: #e2e8f0;
  --shell-hair-strong: #cbd5e1;
  --shell-nav-fg: #475569;
  --shell-nav-fg-hover: #0f172a;
  --shell-nav-bg-hover: #f1f5f9;
  --shell-active-bg: #eff6ff;
  --shell-active-fg: #2563eb;
  --shell-brand-fg: #0f172a;
  --shell-brand-sub: #64748b;
  --shell-footer-fg: #94a3b8;

  /* ── 顶栏（保持浅色玻璃） ── */
  --shell-search-bg: rgba(15, 23, 42, .045);
  --shell-search-bd: rgba(15, 23, 42, .09);
  --shell-pill-bg: rgba(16, 185, 129, .12);
  --shell-pill-fg: #10b981;
}

/* ---------- 侧栏：纯白底 + 微阴影 ---------- */
.sidebar {
  position: relative;
  background: var(--shell-bg);
  border-right: 1px solid var(--shell-hair);
}
.sidebar-brand,
.sidebar-nav,
.sidebar-footer { position: relative; z-index: 1; }

/* 品牌头部：白底品牌卡 */
.sidebar-brand {
  margin: 14px 12px 8px;
  padding: 12px 12px;
  border-bottom: none;
  border-radius: 14px;
  background: var(--shell-bg-soft);
  border: 1px solid var(--shell-hair);
  color: var(--shell-brand-fg);
}
.sidebar-brand .brand-name { color: var(--shell-brand-fg); }
.sidebar-brand .brand-sub { color: var(--shell-brand-sub); }
.brand-badge {
  background: linear-gradient(135deg, #f0d9a0, #e9b949);
  color: #3b2f0a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 6px;
  box-shadow: 0 2px 8px rgba(233, 185, 73, .35);
}

/* ---------- 导航分组 ---------- */
.sidebar-nav {
  display: block;
  padding: 4px 10px 12px;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
}
.nav-group:first-child { margin-top: 2px; }
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--shell-group);
}

/* 导航项：白色底上的深色字 */
.nav-item {
  position: relative;
  margin: 1px 0;
  color: var(--shell-nav-fg);
  border-radius: 10px;
  transition: background .18s ease, color .18s ease;
}
.nav-item:hover {
  background: var(--shell-nav-bg-hover);
  color: var(--shell-nav-fg-hover);
}
.nav-item.active {
  background: var(--shell-active-bg);
  color: var(--shell-active-fg);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--shell-active-fg); }
/* 移除旧版的金色左条与辉光 */
.nav-item.active::before { display: none; }

/* 侧栏底部 */
.sidebar-footer { color: var(--shell-footer-fg); }
.sidebar-footer .icp-side a { color: var(--shell-footer-fg); }
.sidebar-footer .icp-side a:hover { color: var(--shell-nav-fg); }

/* 折叠态 */
.sidebar.collapsed .nav-group-title { display: none; }
.sidebar.collapsed .nav-group { margin-top: 4px; }

/* ---------- 顶栏：中心命令搜索 + 环境胶囊 + 通知铃 ---------- */
.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 18px;
  min-width: 0;
}
.cmd-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(440px, 100%);
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--shell-search-bg);
  border: 1px solid var(--shell-search-bd);
  color: var(--text-light);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.cmd-search:focus-within {
  border-color: rgba(99, 102, 241, .45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
  background: rgba(15, 23, 42, .03);
}
.cs-ico { width: 16px; height: 16px; opacity: .7; flex-shrink: 0; stroke: currentColor; }
.cs-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}
.cs-input::placeholder { color: var(--text-sidebar-dim); }
.cs-kbd {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, .06);
  border: 1px solid var(--shell-search-bd);
  color: var(--text-light);
  font-family: inherit;
  flex-shrink: 0;
}

.env-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: var(--shell-pill-bg);
  color: var(--shell-pill-fg);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, .28);
  white-space: nowrap;
}
.env-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--shell-pill-fg);
  box-shadow: 0 0 8px var(--shell-pill-fg);
}

.bell-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.bell-btn:hover {
  color: var(--primary);
  border-color: rgba(99, 102, 241, .4);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.bell-btn .dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px #fff;
}

/* 顶栏在窄屏时收起命令搜索 */
@media (max-width: 1080px) {
  .topbar-center { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   #1181 双轨导航 + 全局条：域切换 / 任务胶囊 / 皮肤切换器
   （只改表现，全部新类名，零回退风险）
   ═══════════════════════════════════════════════════════════ */

/* ---------- 顶栏一级域切换（排课工作台 | 教务中心 | 数据与设置） ---------- */
.domain-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 14px;
  padding: 3px;
  background: var(--shell-search-bg);
  border: 1px solid var(--shell-search-bd);
  border-radius: 12px;
}
.domain-tab {
  border: none;
  background: transparent;
  color: var(--shell-nav-fg);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.domain-tab:hover { color: var(--shell-nav-fg-hover); background: var(--shell-nav-bg-hover); }
.domain-tab.active {
  background: #fff;
  color: var(--shell-active-fg);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .10);
}
@media (max-width: 1240px) {
  .topbar-title { display: none; }
}
@media (max-width: 1080px) {
  .domain-tab { padding: 6px 10px; font-size: 12px; }
}

/* ---------- 顶栏任务选择胶囊（绿点 + 任务名 + 下拉箭头） ---------- */
.topbar .task-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--shell-hair);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.topbar .task-select-wrap:hover { border-color: var(--shell-hair-strong); }
.topbar .task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
  flex: none;
}
.topbar #task-selector {
  width: auto;
  max-width: 210px;
  padding: 0 4px 0 0;
  border: none;
  background: transparent;
  color: var(--shell-brand-fg);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.topbar #task-selector:hover,
.topbar #task-selector:focus { border: none; background: transparent; outline: none; }
.topbar #task-selector option { background: #fff; color: #0f172a; }
.topbar .task-caret { color: var(--shell-brand-sub); flex: none; pointer-events: none; }
@media (max-width: 1080px) {
  .topbar #task-selector { max-width: 120px; }
}

/* ---------- 皮肤切换器（调色板按钮 + 下拉菜单） ---------- */
.skin-wrap { position: relative; display: inline-flex; }
.skin-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid var(--shell-hair);
  border-radius: 999px;
  color: var(--shell-nav-fg);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: color .16s ease, border-color .16s ease;
}
.skin-btn:hover { color: var(--shell-active-fg); border-color: var(--shell-hair-strong); }
.skin-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--shell-hair);
  border-radius: 14px;
  box-shadow: 0 10px 20px -8px rgba(15, 23, 42, .14), 0 24px 48px -16px rgba(15, 23, 42, .18);
  z-index: 90;
}
.skin-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 9px;
  color: var(--shell-nav-fg);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.skin-opt:hover { background: var(--shell-nav-bg-hover); color: var(--shell-nav-fg-hover); }
.skin-swatch {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, .15);
  flex: none;
}
.skin-check { margin-left: auto; opacity: 0; color: var(--shell-active-fg); }
.skin-opt.on { color: var(--shell-active-fg); font-weight: 600; }
.skin-opt.on .skin-check { opacity: 1; }
