/* ============================================================
   轻工厂 · 管理后台 — 重构设计稿 v2
   设计系统：靛 Indigo #4A46C9 on 冷石板 Cool Slate（带微染中性阶）
   布局：深色侧栏分组导航 + 白内容区（B 端 console）
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  /* 中性阶：冷石板，带微染，非纯灰 */
  --page:      #eceff3;               /* 页面底（石板 100） */
  --bg:        #ffffff;               /* 卡片/面板 */
  --panel-2:   #f6f7f9;               /* 内嵌：表头、输入框、图标底（石板 50） */
  --border:    rgba(35,42,55,.08);    /* 发丝线（石板 900 8%） */
  --border-2:  rgba(35,42,55,.14);
  /* 墨：三级 */
  --ink-1:     #14171c;               /* 标题、大数字（石板 950） */
  --ink-2:     #454e5e;               /* 正文、表格单元（石板 700） */
  --ink-3:     #6f7c91;               /* 标签、caption（石板 500） */
  /* 品牌：靛（唯一 accent） */
  --accent:    #4A46C9;
  --accent-2:  #DB4B3E;               /* 伙伴色：珊瑚，仅作第二信号（危险/删除） */
  --accent-soft: rgba(74,70,201,.10);
  --accent-strong: rgba(74,70,201,.16);
  --on-accent: #ffffff;
  --glow:      rgba(74,70,201,.32);
  /* 语义色（功能而非身份）：up 挪到蓝绿避让品牌靛 */
  --up:        #2C7A8C;
  --down:      #C0453C;
  --warn:      #B77A16;
  /* 圆角：4 档角色值 */
  --r-shell:   16px;
  --r-card:    12px;
  --r-ctrl:    8px;
  --r-pill:    999px;
  /* 阴影：三层有色（靛染），卡片 / 浮层两套配方 */
  --shadow-card:
    0 1px 2px rgba(20,23,28,.05),
    0 8px 20px -6px rgba(20,23,28,.08),
    0 28px 60px -24px rgba(20,23,28,.12);
  --shadow-pop:
    0 2px 6px rgba(74,70,201,.10),
    0 16px 36px -10px rgba(74,70,201,.18),
    0 48px 90px -40px rgba(74,70,201,.26);
  /* 布局 */
  --sidebar-w: 240px;
  --font-num: "Consolas", "Menlo", "Roboto Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.hidden { display: none !important; }
.muted { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.msg { min-height: 20px; margin-top: 10px; color: var(--down); font-size: 13px; }

/* ============================================================
   登录页
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(74,70,201,.35), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(44,122,140,.22), transparent 55%),
    linear-gradient(160deg, #14171c 0%, #1d2027 48%, #23272f 100%);
  padding: 24px;
}
.login-box {
  background: var(--bg);
  width: 384px;
  padding: 40px 36px 32px;
  border-radius: var(--r-shell);
  box-shadow: var(--shadow-pop);
  position: relative;
  overflow: hidden;
}
/* 顶部品牌色条：登录页的唯一强调来源 */
.login-box::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #7B77F0 70%, rgba(123,119,240,0));
}
.login-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--ink-1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.login-logo::before {
  content: "";
  width: 12px; height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent), #7B77F0);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.login-sub { text-align: center; color: var(--ink-3); margin: 10px 0 26px; font-size: 13px; }
.login-box .ipt { width: 100%; margin-bottom: 12px; }
.login-box .btn-block { margin-top: 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.chk input { cursor: pointer; accent-color: var(--accent); width: 15px; height: 15px; }
.login-tip { margin-top: 14px; font-size: 12px; color: var(--ink-3); text-align: center; }
.login-tip a { color: var(--accent); text-decoration: none; font-weight: 600; }
.login-tip a:hover { text-decoration: underline; }

/* ============================================================
   主外壳：深色侧栏 + 右内容列
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

/* 侧栏 */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #171a21 0%, #1c2029 60%, #14171c 100%);
  color: #c4ccd8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  color: #f6f7f9;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #7B77F0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(123,119,240,.16);
  flex: 0 0 26px;
}
.brand-mark svg { width: 15px; height: 15px; }

.nav-group { padding: 10px 0 4px; }
/* 分组内所有 tab 都被权限 / 平台模式隐藏时，整组（含标题）一并隐藏，
   避免平台模式或权限过滤后露出「空分组标题」 */
.nav-group:not(:has(.tab:not(.hidden))) { display: none; }
.nav-group-title {
  padding: 6px 20px 4px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6f7c91;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-group-title svg { width: 13px; height: 13px; opacity: .8; }
.nav-group.tight { padding-top: 4px; }

/* 导航按钮（.tab 契约保留：data-tab 驱动 app.js 的 switchTab） */
.sidebar .tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 20px;
  border: none;
  background: none;
  color: #aeb6c4;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background .12s, color .12s;
}
.sidebar .tab:hover { background: rgba(255,255,255,.05); color: #f6f7f9; }
.sidebar .tab.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(74,70,201,.28), rgba(74,70,201,.10) 70%, transparent);
}
.sidebar .tab.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #7B77F0, var(--accent));
}
.sidebar .tab .tab-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  background: rgba(196,204,216,.35);
  flex: 0 0 6px;
}
.sidebar .tab.active .tab-dot { background: #7B77F0; box-shadow: 0 0 6px rgba(123,119,240,.8); }
/* 平台管理：侧栏里的专属区块，用 accent 强调 */
.sidebar .tab.tab-platform { color: #b9b5f0; }
.sidebar .tab.tab-platform.active {
  background: linear-gradient(90deg, rgba(123,119,240,.35), rgba(123,119,240,.12) 70%, transparent);
  color: #fff;
}
.sidebar .tab:focus-visible { outline: 2px solid #7B77F0; outline-offset: -2px; }

/* 侧栏底部：登录身份 */
.sidebar-foot {
  margin-top: auto;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 12px;
  color: #6f7c91;
  line-height: 1.7;
}
.sidebar-foot b { color: #c4ccd8; font-weight: 600; }

/* 右列 */
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 顶栏（白 + 发丝线） */
.topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .brand { display: none; } /* 品牌已在侧栏，顶栏不重复 */
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.topbar-right #curUser {
  color: var(--ink-2);
  font-size: 13px;
  padding-right: 4px;
}
.topbar-right #curUser b { color: var(--ink-1); font-weight: 700; }

/* 租用状态横幅（app.js 按状态挂 banner-info/warn/danger 类，语义保留） */
.tenant-banner {
  padding: 10px 24px;
  font-size: 13px;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.tenant-banner.banner-info { background: var(--accent-soft); color: #3b37a8; }
.tenant-banner.banner-warn { background: rgba(183,122,22,.12); color: #6b4d10; font-weight: 600; }
.tenant-banner.banner-danger { background: rgba(192,69,60,.10); color: #8c2f2b; font-weight: 600; }

/* 内容区 */
.content {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* ============================================================
   面板卡片
   ============================================================ */
.panel {
  background: var(--bg);
  border-radius: var(--r-card);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(35,42,55,.04);
}
.panel h3 {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-1);
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}
.panel h3::before {
  content: "";
  width: 4px; height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7B77F0, var(--accent));
  flex: 0 0 4px;
}
.panel h3 .muted { font-weight: 400; margin-left: 2px; }
.panel h4 { margin: 18px 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* 统计条（概览/报表/合计） */
.stats-line { display: flex; gap: 26px; flex-wrap: wrap; font-size: 14px; margin-bottom: 8px; }
.stats-line b { color: var(--accent); font-variant-numeric: tabular-nums; }

/* 概览统计卡 */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 16px; margin-bottom: 20px; }
.card {
  background: var(--bg);
  border-radius: var(--r-card);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(35,42,55,.04);
  position: relative;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(74,70,201,0) 80%);
  opacity: .85;
}
.card .num { font-size: 30px; font-weight: 800; color: var(--ink-1); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.card .lbl { color: var(--ink-3); font-size: 12px; margin-top: 3px; }
.card-link { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.card-link:hover { box-shadow: var(--shadow-pop); transform: translateY(-2px); }
.card-link:hover .num { color: var(--accent); }

/* ============================================================
   表单控件
   ============================================================ */
.ipt {
  border: 1px solid var(--border-2);
  border-radius: var(--r-ctrl);
  padding: 8px 11px;
  font-size: 14px;
  color: var(--ink-1);
  background: var(--bg);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  font-family: inherit;
}
.ipt::placeholder { color: var(--ink-3); }
.ipt:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ipt.select { background: var(--bg); }
.ipt-file { font-size: 12px; color: var(--ink-3); }
.ipt-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ipt-num { width: 130px; }
.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 按钮 */
.btn {
  border: none;
  border-radius: var(--r-ctrl);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: var(--panel-2);
  color: var(--ink-2);
  transition: background .12s, transform .08s, box-shadow .12s, opacity .12s;
  font-family: inherit;
}
.btn:hover { background: #e8ebf1; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, #5652d6, var(--accent));
  color: var(--on-accent);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 2px 6px rgba(74,70,201,.24);
}
.btn-primary:hover { background: linear-gradient(180deg, #615de0, #4a46c9); }
.btn-danger { background: linear-gradient(180deg, #d2544c, var(--down)); color: #fff; box-shadow: 0 2px 6px rgba(192,69,60,.22); }
.btn-danger:hover { background: linear-gradient(180deg, #dc625a, #c0453c); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--border-2); }
.btn-ghost:hover { background: var(--panel-2); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; margin-top: 10px; }
.btn-link { background: none; color: var(--accent); cursor: pointer; padding: 2px 6px; font-size: 12px; border: none; font-family: inherit; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--down); }

/* ============================================================
   表格
   ============================================================ */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--border); padding: 10px 10px; text-align: left; vertical-align: middle; }
.tbl th {
  color: var(--ink-3);
  font-weight: 600;
  font-size: 12px;
  background: var(--panel-2);
  white-space: nowrap;
  padding-top: 9px; padding-bottom: 9px;
}
.tbl td { color: var(--ink-2); }
.tbl td:has(.num), .tbl td:has(.mono), .tbl td.num-cell { font-variant-numeric: tabular-nums; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr:hover td { background: var(--accent-soft); }
.tbl-mini { font-size: 12px; margin-bottom: 8px; }
.tbl-mini .ipt { padding: 4px 8px; }
.voided td { color: var(--ink-3); text-decoration: line-through; }
.row-pending td { background: #fbf7ef; }

/* ============================================================
   状态标签：pill / badge（类名与旧版一致，语义色保留）
   ============================================================ */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--panel-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill.st-producing, .pill.os-sent, .pill.py-confirmed { background: var(--accent-soft); color: var(--accent); }
.pill.st-partial, .pill.os-partial { background: rgba(183,122,22,.13); color: var(--warn); }
.pill.st-all_done, .pill.os-all_back, .pill.py-paid { background: rgba(44,122,140,.12); color: var(--up); }
.pill.st-shipped { background: var(--accent-soft); color: var(--accent); }
.pill.st-cancelled, .pill.py-voided { background: rgba(192,69,60,.10); color: var(--down); }
.pill.py-draft { background: var(--panel-2); color: var(--ink-2); }

.badge { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); font-size: 12px; }
.badge.on { background: rgba(44,122,140,.12); color: var(--up); }
.badge.off { background: var(--panel-2); color: var(--ink-3); }
.badge.warn { background: rgba(183,122,22,.13); color: var(--warn); }
.dir-in { color: var(--up); font-weight: 600; }
.dir-out { color: var(--down); font-weight: 600; }
.danger-text { color: var(--down); font-weight: 600; }

/* ============================================================
   弹层
   ============================================================ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(14,17,23,.5);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 44px 16px;
  overflow: auto;
  z-index: 100;
}
.modal {
  background: var(--bg);
  border-radius: 14px;
  width: 580px;
  max-width: 100%;
  box-shadow: var(--shadow-pop);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-1);
}
.modal-x { border: none; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-x:hover { background: var(--panel-2); color: var(--ink-1); }
.modal-body { padding: 20px 22px; max-height: 66vh; overflow: auto; }
.modal-body h4 { margin: 16px 0 8px; font-size: 13px; color: var(--ink-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); }
.fld { margin-bottom: 14px; }
.fld > label { display: block; margin-bottom: 5px; font-size: 13px; color: var(--ink-2); }
.fld .ipt, .fld textarea.ipt { width: 100%; }
.fld .form-row .ipt { width: auto; flex: 1; }
.fld textarea.ipt { font-family: inherit; resize: vertical; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 18px; }
.kv > div { display: flex; flex-direction: column; gap: 2px; }
.kv > div span:first-child { color: var(--ink-3); font-size: 12px; }
.kv > div span:last-child { color: var(--ink-1); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { display: inline-block; vertical-align: middle; width: 70px; height: 6px; background: var(--panel-2); border-radius: 3px; margin-right: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #7B77F0); border-radius: 3px; }

/* ============================================================
   分页 / 空态
   ============================================================ */
.pager { margin-top: 14px; display: flex; gap: 6px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.pager button {
  padding: 4px 11px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-2);
  transition: all .12s;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.empty { color: var(--ink-3); text-align: center; padding: 26px 0; }

/* ============================================================
   业务组件（类名保留，样式重设计）
   ============================================================ */
.warn-box {
  background: rgba(183,122,22,.10);
  border-left: 3px solid var(--warn);
  color: #6b4d10;
  padding: 12px 16px;
  border-radius: 4px 8px 8px 4px;
  margin-bottom: 16px;
  line-height: 1.75;
  font-size: 13px;
}
.warn-box code { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px; font-family: var(--font-num); }

/* 字典 */
.dict-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.dict-list { list-style: none; margin-top: 12px; max-height: 330px; overflow: auto; }
.dict-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 13px;
}
.dict-list li:hover { background: var(--panel-2); }

/* 待办清单弹层 */
.rmd-list { list-style: none; }
.rmd-list li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px;
  border-left: 3px solid var(--border-2);
  background: var(--panel-2);
  border-radius: 6px;
  margin-bottom: 7px;
  font-size: 13px;
}
.rmd-list li.rmd-danger { border-left-color: var(--down); background: rgba(192,69,60,.08); }
.rmd-list li.rmd-danger b { color: var(--down); }

/* 邀请码 */
.code-big {
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--panel-2);
  padding: 2px 8px;
  border-radius: 6px;
}
.code-show { text-align: center; margin: 6px 0 10px; }
.code-show .code-big { font-size: 30px; letter-spacing: 6px; padding: 10px 18px; background: var(--panel-2); border-radius: 10px; }
.code-big[data-act] { cursor: pointer; }
.code-big[data-act]:hover { background: var(--accent-soft); color: var(--accent); }

/* 打菲弹层：扎选择 / 权限勾选 */
.print-row { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.bundle-box { max-height: 240px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r-ctrl); padding: 6px 10px; background: var(--panel-2); }
.chk-bundle { display: flex; padding: 3px 2px; font-size: 13px; gap: 8px; align-items: center; }
.chk-bundle:hover { background: var(--bg); border-radius: 6px; }
.perm-box { max-height: 330px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r-ctrl); padding: 4px 12px 10px; background: var(--panel-2); }
.perm-group { padding: 8px 0 4px; }
.perm-group + .perm-group { border-top: 1px solid var(--border); }
.perm-group h4 { font-size: 13px; color: var(--ink-1); margin-bottom: 4px; }
.chk-perm { display: flex; padding: 3px 2px; gap: 8px; align-items: center; font-size: 13px; }
.chk-perm:hover { background: var(--bg); border-radius: 6px; }
.chk-perm.perm-danger span { color: var(--down); }

/* ============================================================
   平台管理（工作台化视觉：顶部概览条）
   ============================================================ */
.plat-hero {
  background: linear-gradient(135deg, #1d2130 0%, #2a2f45 100%);
  border-radius: var(--r-shell);
  padding: 22px 26px;
  margin-bottom: 18px;
  color: #f6f7f9;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.plat-hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -80px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,119,240,.28), transparent 70%);
}
.plat-hero h3 { font-size: 18px; font-weight: 800; color: #fff; margin: 0 0 4px; }
.plat-hero h3::before { display: none; }
.plat-hero .sub { color: #97a2b3; font-size: 13px; }
.plat-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.plat-hero .pill-hero { display: inline-block; padding: 4px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: rgba(123,119,240,.22); color: #dcd9ff; white-space: nowrap; }

/* 面板内的两栏布局（如：平台配置区） */
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }
.panel-grid .panel { margin-bottom: 0; }

/* ============================================================
   响应式：窄屏侧栏折叠为顶横条
   ============================================================ */
@media (max-width: 960px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: none;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 8px 10px;
    gap: 6px;
  }
  .sidebar .brand { border: none; padding: 6px 10px; }
  .nav-group { display: contents; }
  .nav-group-title { display: none; }
  .sidebar .tab {
    width: auto;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: var(--r-pill);
  }
  .sidebar .tab.active { background: rgba(74,70,201,.32); }
  .sidebar .tab.active::before { display: none; }
  .sidebar .tab .tab-dot { display: none; }
  .sidebar-foot { display: none; }
  .topbar { height: 52px; padding: 0 16px; }
  .content { padding: 16px 14px; }
  .plat-hero { padding: 18px; }
}

/* 动效降级 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
