/* ============================================================
   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 {
  position: relative;   /* #1185：为 .cs-panel 结果下拉提供定位基准 */
  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; }

/* ==================== #1185 顶栏增强 ==================== */
/* 协作按钮（由侧栏底栏上移顶栏：它是全局动作，不属于任何域的子页面）。
   原实现全靠内联 style 写死白底，无法随皮肤变化，故在此给出正式规则。 */
.topbar .btn-collab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--shell-hair-strong, rgba(148, 163, 184, .35));
  background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .04));
  color: var(--top-fg, var(--text));
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.topbar .btn-collab:hover {
  background: var(--shell-active-bg, rgba(99, 102, 241, .12));
  color: var(--shell-active-fg, var(--text));
  border-color: transparent;
}
/* 环境胶囊：可点击（role=button），补 cursor 与 hover 反馈 */
.env-pill { cursor: pointer; user-select: none; transition: background .18s ease, color .18s ease; }
.env-pill:hover { background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .05)); }
.env-pill:focus-visible { outline: 2px solid var(--cp-brand, #6366f1); outline-offset: 2px; }

/* ---- 铃铛红点角标（待审批数量） ---- */
.bell-btn { position: relative; }
.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--top-bg, #fff);
  pointer-events: none;
}

/* ---- 命令面板下拉结果 ---- */
.cs-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 120;
  max-height: 340px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  background: var(--cs-panel-bg, #fff);
  border: 1px solid var(--shell-hair, rgba(148, 163, 184, .25));
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}
.cs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--top-fg, var(--text));
}
.cs-item:hover, .cs-item.on { background: var(--shell-active-bg, rgba(99, 102, 241, .12)); }
.cs-item.on { color: var(--shell-active-fg, var(--text)); font-weight: 600; }
.cs-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-item-domain { flex: none; font-size: 11px; opacity: .55; }
.cs-empty { padding: 16px 10px; text-align: center; font-size: 12px; opacity: .6; }

/* ==================== #1185 右侧抽屉（通知中心 / 系统状态） ==================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, .32);
  backdrop-filter: blur(2px);
}
.drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 301;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  background: var(--cp-canvas, #fff);
  border-left: 1px solid var(--shell-hair, rgba(148, 163, 184, .25));
  box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.22, .61, .36, 1);
}
.drawer-panel.on { transform: translateX(0); }
.drawer-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--shell-hair, rgba(148, 163, 184, .22));
  font-size: 15px;
  font-weight: 700;
  color: var(--cp-text, var(--text));
}
.drawer-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: .55;
  padding: 4px 6px;
  border-radius: 6px;
}
.drawer-close:hover { opacity: 1; background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .06)); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 28px; }
.drawer-loading, .drawer-err { padding: 30px 0; text-align: center; font-size: 13px; opacity: .6; }
.drawer-err { color: #dc2626; opacity: 1; }

/* 通知卡片 */
.nt-todo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 15px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(99, 102, 241, .12), rgba(56, 189, 248, .10));
  border: 1px solid rgba(99, 102, 241, .22);
}
.nt-todo-num { font-size: 26px; font-weight: 800; color: var(--cp-brand, #6366f1); line-height: 1; }
.nt-todo-txt { font-size: 13px; color: var(--cp-text, var(--text)); }
.nt-link {
  display: block;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--cp-brand, #6366f1);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.nt-svc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  font-size: 12px;
  background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .04));
  color: var(--cp-text, var(--text));
}
.nt-svc-dot { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; flex: none; }
.nt-svc.ok .nt-svc-dot { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .16); }
.nt-svc.bad .nt-svc-dot { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .16); }
.nt-sec {
  margin: 16px 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .5;
  color: var(--cp-text, var(--text));
}
.nt-card {
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 11px;
  border: 1px solid var(--shell-hair, rgba(148, 163, 184, .22));
  background: var(--cp-canvas, #fff);
}
.nt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nt-tag {
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(99, 102, 241, .14);
  color: var(--cp-brand, #6366f1);
}
.nt-date { font-size: 11px; opacity: .5; margin-left: auto; }
.nt-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--cp-text, var(--text)); }
.nt-body { font-size: 12px; line-height: 1.6; opacity: .75; color: var(--cp-text, var(--text)); }

/* 系统状态面板 */
.st-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--shell-nav-bg-hover, rgba(15, 23, 42, .04));
  color: var(--cp-text, var(--text));
}
.st-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; flex: none; }
.st-dot.ok { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .16); }
.st-dot.bad { background: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .16); }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-table th, .st-table td {
  padding: 9px 4px;
  text-align: left;
  border-bottom: 1px solid var(--shell-hair, rgba(148, 163, 184, .18));
}
.st-table th {
  width: 40%;
  font-weight: 500;
  opacity: .6;
  color: var(--cp-text, var(--text));
}
.st-table td { font-weight: 600; color: var(--cp-text, var(--text)); word-break: break-all; }
.st-foot { margin-top: 14px; font-size: 11px; opacity: .45; line-height: 1.6; }
