/* ===== 工作台外壳（含折叠 / 抽屉）===== */
* { box-sizing: border-box; }
.shell { display: flex; min-height: 100vh; background: #f4f6fb; }
.shell-side {
  width: 210px; flex: 0 0 210px; background: #0f172a; color: #cbd5e1;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  transition: width .18s ease, flex-basis .18s ease, transform .2s ease; overflow: hidden; z-index: 30;
}
.shell-brand {
  display: flex; align-items: center; gap: 8px; padding: 14px 14px;
  border-bottom: 1px solid rgba(148,163,184,.15); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap;
}
.shell-logo { background: #38bdf8; color: #0f172a; font-size: 11px; font-weight: 800; padding: 3px 6px; border-radius: 5px; letter-spacing: .04em; }
.shell-pin {
  margin-left: auto; background: transparent; border: 1px solid rgba(148,163,184,.3); color: #94a3b8;
  border-radius: 6px; width: 24px; height: 24px; line-height: 1; cursor: pointer; font-size: 12px;
}
.shell-pin:hover { color: #fff; border-color: #38bdf8; }
.shell-nav { flex: 1; overflow-y: auto; padding: 6px 0 12px; }
.shell-group-title { padding: 12px 16px 5px; font-size: 11px; color: #64748b; letter-spacing: .1em; white-space: nowrap; }
.shell-nav-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 16px 9px 14px; font-size: 13px;
  color: #cbd5e1; text-decoration: none; border-left: 3px solid transparent; white-space: nowrap;
}
.shell-nav-item .ico { width: 18px; text-align: center; font-size: 14px; flex: 0 0 18px; }
.shell-nav-item:hover { background: rgba(148,163,184,.12); color: #fff; }
.shell-nav-item.active { background: rgba(56,189,248,.15); color: #fff; border-left-color: #38bdf8; }
.shell-foot { padding: 10px 14px; border-top: 1px solid rgba(148,163,184,.15); font-size: 12px; white-space: nowrap; }
.shell-foot .who-sub { color: #64748b; margin-top: 2px; font-size: 11px; }

/* 折叠态（桌面） */
.shell.collapsed .shell-side { width: 62px; flex-basis: 62px; }
.shell.collapsed .brand-txt,
.shell.collapsed .shell-group-title,
.shell.collapsed .shell-nav-item .txt,
.shell.collapsed .shell-foot { display: none; }
.shell.collapsed .shell-brand { padding: 14px 0; justify-content: center; }
.shell.collapsed .shell-pin { position: absolute; left: 18px; top: 46px; margin: 0; }
.shell.collapsed .shell-nav { padding-top: 30px; }
.shell.collapsed .shell-nav-item { justify-content: center; padding: 10px 0; border-left-width: 0; }
.shell.collapsed .shell-nav-item .ico { font-size: 16px; }

.shell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shell-top {
  height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 10;
}
.shell-toggle {
  width: 30px; height: 30px; border: 1px solid #e2e8f0; background: #fff; border-radius: 7px;
  cursor: pointer; font-size: 15px; color: #334155; line-height: 1;
}
.shell-toggle:hover { background: #f1f5f9; }
.shell-crumb { font-size: 13px; color: #475569; }
.shell-crumb .crumb-sep { color: #cbd5e1; padding: 0 6px; }
.shell-crumb b { color: #0f172a; }
.shell-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #334155; }

.shell-tabs { display: flex; gap: 6px; padding: 8px 12px 0; background: #eef2f8; overflow-x: auto; }
.shell-tab {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px;
  background: #dbe3ee; color: #334155; border-radius: 8px 8px 0 0; cursor: pointer; white-space: nowrap;
}
.shell-tab.active { background: #fff; color: #0f172a; font-weight: 600; }
.shell-tab i { font-style: normal; opacity: .5; }
.shell-tab i:hover { opacity: 1; color: #dc2626; }
.shell-content { flex: 1; padding: 16px; overflow: auto; }
.shell-content > * + * { margin-top: 14px; }

/* 移动端：抽屉 */
.shell-backdrop { display: none; }
@media (max-width: 900px) {
  .shell-side { position: fixed; left: 0; top: 0; width: 230px; flex-basis: 230px; transform: translateX(-105%); }
  .shell.drawer-open .shell-side { transform: none; }
  .shell.drawer-open .shell-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 25;
  }
  .shell-pin { display: none; }
  .shell-content { padding: 10px; }
  .shell-top-actions .top-user { display: none; }
}

/* ===== 一级 / 二级菜单 ===== */
.shell-group-head {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px 9px 14px;
  font-size: 13px; color: #e2e8f0; cursor: pointer; white-space: nowrap; user-select: none;
}
.shell-group-head:hover { background: rgba(148,163,184,.12); }
.shell-group-head .ico { width: 18px; text-align: center; font-size: 14px; flex: 0 0 18px; }
.shell-group-head .g-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.shell-group-head .caret { font-size: 9px; color: #64748b; transition: transform .15s ease; }
.shell-group.open > .shell-group-head .caret { transform: rotate(90deg); color: #38bdf8; }
.shell-group.open > .shell-group-head { color: #fff; }

.shell-children { overflow: hidden; }
.shell-group:not(.open) > .shell-children { display: none; }
.shell-children .shell-nav-item { padding-left: 41px; font-size: 12.5px; color: #94a3b8; border-left-width: 0; }
.shell-children .shell-nav-item .ico { font-size: 12px; opacity: .85; }
.shell-children .shell-nav-item.active { color: #fff; background: rgba(56,189,248,.16); box-shadow: inset 3px 0 0 #38bdf8; }

/* 折叠成图标栏：只留一级图标 */
.shell.collapsed .shell-group-head { justify-content: center; padding: 11px 0; }
.shell.collapsed .shell-group-head .g-txt,
.shell.collapsed .shell-group-head .caret,
.shell.collapsed .shell-children { display: none; }
.shell.collapsed .shell-group-head .ico { font-size: 16px; }
