/* ============ Lumina 整机性能测试平台 · 四页极简清晰架构样式 (对齐 sn-sheet-gen) ============ */
:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --fg: #1d1f23;
  --muted: #6b7280;
  --line: #e2e5ea;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --err: #dc2626;
  --err-bg: #fef2f2;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --head: #e8f0fb;
  --seg: #f1f5ff;
  --field: #f8f9fb;
  --sb-thumb: #9aa3af;
  --sb-track: #e6e9ee;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171b;
    --card: #1f2228;
    --fg: #e8eaee;
    --muted: #9aa1ab;
    --line: #333843;
    --accent: #3b82f6;
    --head: #243247;
    --seg: #252b3b;
    --field: #181b20;
    --err-bg: #351c1e;
    --warn: #f59e0b;
    --warn-bg: #332714;
    --ok: #22c55e;
    --ok-bg: #163222;
    --sb-thumb: #6b7280;
    --sb-track: #2a2e36;
  }
}

:root[data-theme="dark"] {
  --bg: #15171b;
  --card: #1f2228;
  --fg: #e8eaee;
  --muted: #9aa1ab;
  --line: #333843;
  --accent: #3b82f6;
  --head: #243247;
  --seg: #252b3b;
  --field: #181b20;
  --err-bg: #351c1e;
  --warn: #f59e0b;
  --warn-bg: #332714;
  --ok: #22c55e;
  --ok-bg: #163222;
  --sb-thumb: #6b7280;
  --sb-track: #2a2e36;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: var(--seg);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.full-w { width: 100%; }

/* ============ 通用基础控件 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.card-hd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.card-hd h2 { font-size: 15.5px; margin: 0; font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.btn.lg { height: 42px; font-size: 14.5px; }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); font-weight: 600; }
.btn.ok-btn { background: var(--ok); color: #fff; border-color: var(--ok); font-weight: 600; }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.btn:hover { border-color: var(--accent); }
.btn.primary:hover, .btn.ok-btn:hover { filter: brightness(1.06); }

.ctrl-input, .ctrl-select {
  height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 13.5px;
}
.ctrl-input.sm { height: 32px; font-size: 13px; width: 210px; }
.ctrl-input:focus, .ctrl-select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field > input, .field > select, .field > textarea {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--field); color: var(--fg); font: inherit;
}
.field > input:focus, .field > select:focus, .field > textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px;
}

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600;
  background: var(--seg); color: var(--accent); white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.muted { background: var(--field); color: var(--muted); border: 1px solid var(--line); }

/* ============ 登录页（对齐日志反馈平台入口） ============ */
.auth-screen {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: #f7f8fa;
  color: #1a1d21;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.gate { width: 100%; max-width: 420px; border-top: 3px solid #005eac; padding-top: 26px; }
.gate .logo { height: 30px; width: auto; display: block; }
.gate .logo.dk { display: none; }
.gate h1 { font-size: 19px; font-weight: 600; margin: 18px 0 4px; letter-spacing: .2px; color: #1a1d21; }
.gate .sub { color: #6b7280; font-size: 13px; margin: 0 0 12px; }
.qr-panel { min-height: 430px; display: flex; justify-content: center; }
.qr-panel iframe { width: 360px; height: 430px; border: 0; background: transparent; }
.qr-fallback { margin: 8px 0 0; font-size: 13px; color: #6b7280; }
.qr-fallback a { color: #005eac; }
.gate .foot {
  margin-top: 8px; color: #9aa1ab; font-size: 12px;
  border-top: 1px solid #e8eaed; padding-top: 14px;
}
.pwd-fold { margin-top: 14px; font-size: 12px; color: #9aa1ab; }
.pwd-fold summary { cursor: pointer; }
.pwd-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.pwd-form input, .pwd-form button {
  width: 100%; height: 42px; border: 1px solid #e8eaed; border-radius: 8px;
  padding: 0 12px; font-size: 14px; background: #fff; color: #1a1d21;
}
.pwd-form button { cursor: pointer; }
.dev-box { margin-top: 16px; }
.dev-title { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
.dev-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dev-role-btn {
  padding: 9px 11px; border-radius: 8px; border: 1px solid #e8eaed;
  background: #fff; color: #1a1d21; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
}
.dev-role-btn b { font-size: 13px; }
.dev-role-btn span { font-size: 11px; color: #6b7280; }
@media (prefers-color-scheme: dark) {
  .auth-screen { background: #0e1013; color: #e8eaed; }
  .gate .logo.lt { display: none; }
  .gate .logo.dk { display: block; }
  .gate h1 { color: #e8eaed; }
  .gate .sub { color: #8b929c; }
  .gate .foot { color: #5c636d; border-top-color: #24282e; }
  .pwd-form input, .pwd-form button, .dev-role-btn { background: #16181c; color: #e8eaed; border-color: #24282e; }
}

/* ============ 顶部极简一级导航栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: 100%; max-width: 100%; margin: 0 auto; height: 56px; padding: 0 32px;
  display: flex; align-items: center; gap: 24px;
}
.brand-row { display: flex; align-items: center; gap: 9px; cursor: pointer; white-space: nowrap; }
.brand-dot {
  padding: 3px 8px; border-radius: 6px; background: var(--accent);
  color: #fff; font-weight: 700; font-size: 12px;
}
.brand-title { font-size: 15.5px; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.nav-tab {
  height: 36px; padding: 0 14px; border-radius: 8px; border: 0;
  background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-tab:hover { background: var(--field); color: var(--fg); }
.nav-tab.active { background: var(--seg); color: var(--accent); font-weight: 600; }
.pill-count {
  background: var(--err); color: #fff; font-size: 11px; font-weight: 700;
  padding: 0 6px; border-radius: 99px; line-height: 18px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync-chip { font-size: 12px; color: var(--ok); font-weight: 500; margin-right: 4px; }
.role-switcher {
  height: 32px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--field); color: var(--fg);
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font: inherit; font-size: 13px;
}
.role-switcher:hover { border-color: var(--accent); }
.role-pill {
  font-size: 11px; padding: 1px 7px; border-radius: 5px;
  background: var(--seg); color: var(--accent); font-weight: 600;
}
.logout-link {
  border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 6px;
}
.logout-link:hover { color: var(--err); }

/* ============ 页面容器（100% 自适应全宽铺展，消灭两侧空白浪费） ============ */
.page-container { width: 100%; max-width: 100%; margin: 0 auto; padding: 24px 32px 64px; }
.page-container.narrow { max-width: 620px; padding-top: 64px; }

.page-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 20px;
}
.page-head h1 { font-size: 22px; margin: 0 0 4px; }
.page-head p { margin: 0; font-size: 13px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 待分配角色页 */
.center-card { text-align: center; padding: 42px 30px; }
.pending-icon {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--ok-bg); color: var(--ok); display: grid; place-items: center;
  font-size: 24px; font-weight: 700;
}
.info-kv {
  display: inline-grid; grid-template-columns: auto auto; gap: 8px 18px;
  text-align: left; padding: 14px 22px; border-radius: 10px;
  background: var(--field); border: 1px solid var(--line); font-size: 13.5px;
}

/* ============ 页面 1：整体看板页 (.segbar 继承 sn-sheet-gen) ============ */
.stage-filter, .sub-nav, .filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-btn, .snav-btn, .ftab {
  height: 32px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.sf-btn.active, .snav-btn.active, .ftab.active {
  background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600;
}

.segbar {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px;
}
.seg {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 14px;
}
.seg .n { font-size: 11.5px; color: var(--muted); }
.seg .v {
  font-size: 23px; font-weight: 700; margin: 4px 0 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.seg .m { font-size: 11.5px; color: var(--muted); }
.seg.ok .v { color: var(--ok); }
.seg.err { border-color: color-mix(in srgb, var(--err) 45%, var(--line)); }
.seg.err .v { color: var(--err); }
.seg.warn .v { color: var(--warn); }
@media (max-width: 960px) { .segbar { grid-template-columns: repeat(3, 1fr); } }

.dash-two-col { display: grid; grid-template-columns: 2.1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .dash-two-col { grid-template-columns: 1fr; } }

.hotspot-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; background: var(--field);
  border: 1px solid var(--line); margin-bottom: 8px;
}
.prog-track { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 99px; }

/* ============ 页面 2：项目管理页卡片网格 ============ */
.proj-cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 18px;
}
@media (max-width: 860px) { .proj-cards-grid { grid-template-columns: 1fr; } }

.proj-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.proj-card:hover { border-color: var(--accent); box-shadow: 0 4px 18px rgba(37, 99, 235, 0.06); }
.pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pc-title { font-size: 16.5px; font-weight: 700; margin: 0 0 4px; }
.pc-sub { font-size: 12.5px; color: var(--muted); }
.pc-metrics {
  display: flex; gap: 16px; font-size: 12.5px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 12px; border-top: 1px solid var(--line); margin-top: auto; flex-wrap: wrap;
}

/* ============ 页面 3：测试详情页（100% 全宽流式铺展：左 236px 导航 · 右铺满剩余全屏宽度） ============ */
.detail-layout {
  width: 100%; max-width: 100%; margin: 0 auto; padding: 16px 32px 12px;
  height: calc(100vh - 56px); overflow: hidden;
  display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: stretch;
}
.detail-layout.sb-collapsed { grid-template-columns: minmax(0, 1fr); }
.detail-layout.sb-collapsed .detail-sidebar { display: none; }
@media (max-width: 920px) {
  .detail-layout { grid-template-columns: 1fr; padding: 16px; height: auto; overflow: visible; }
  .detail-sidebar { max-height: 280px; }
  .detail-main { height: auto; overflow: visible; }
  #dtCasesPanel, #dtAdminSheetPanel { overflow: visible; }
  #dtCasesPanel .tbl-scroll.pane, #admTplTable .tbl-scroll.pane { min-height: 360px; max-height: 70vh; }
}

.detail-sidebar {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; min-height: 0; overflow-y: auto;
}
.detail-main {
  min-width: 0; min-height: 0; height: 100%;
  display: flex; flex-direction: column; overflow: hidden;
}
#dtCasesPanel, #dtAdminSheetPanel {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
#dtCasesPanel > .card:last-child, #dtAdminSheetPanel > .card {
  flex: 1; min-height: 0; margin-bottom: 0;
  display: flex; flex-direction: column;
}
#dtSheetBody { flex: 1; min-height: 0; overflow: auto; }
.back-link {
  border: 0; background: none; color: var(--accent); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 8px;
}
.sb-proj-name { font-weight: 700; font-size: 14.5px; margin-bottom: 8px; line-height: 1.35; }
.sb-sample-row { display: flex; gap: 6px; margin-bottom: 12px; }
.sb-section-lbl {
  font-size: 11px; font-weight: 600; color: var(--muted);
  padding: 8px 6px 5px; border-top: 1px solid var(--line); margin-top: 6px;
}
.sb-cat-list { display: flex; flex-direction: column; gap: 2px; }
.sb-item {
  width: 100%; border: 0; background: transparent; color: var(--fg);
  padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13px;
  text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.sb-item:hover { background: var(--field); }
.sb-item.active { background: var(--seg); color: var(--accent); font-weight: 600; }
.sb-item .cnt { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--muted); }
.sb-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--line); }
.sb-dot.ok { background: var(--ok); }
.sb-dot.err { background: var(--err); }
.sb-dot.sub { background: var(--accent); }
.sb-dot.rej { background: var(--warn); }

.detail-head-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; margin-bottom: 12px;
}
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.review-note {
  margin-top: 6px; font-size: 12.5px; padding: 6px 10px;
  border-radius: 6px; background: var(--warn-bg); color: var(--warn);
}

.detail-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.col-switch {
  display: inline-flex; padding: 2px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--line);
}
.col-switch button {
  height: 28px; padding: 0 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer;
}
.col-switch button.active { background: var(--seg); color: var(--accent); font-weight: 600; }

/* 用例表在可视区域内滚动：横向滚动条固定在表格底部，不用先把整张表拉到页面最底下 */
.tbl-scroll { overflow: auto; }
.tbl-scroll.pane {
  flex: 1; min-height: 0; overflow: scroll;
  scrollbar-width: auto;
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}
.tbl-scroll.pane::-webkit-scrollbar { width: 12px; height: 14px; }
.tbl-scroll.pane::-webkit-scrollbar-thumb {
  background: var(--sb-thumb); border-radius: 8px; border: 3px solid var(--sb-track);
}
.tbl-scroll.pane::-webkit-scrollbar-track { background: var(--sb-track); }
.tbl-scroll.pane::-webkit-scrollbar-corner { background: var(--sb-track); }
.case-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 13.5px; }
.case-table th, .case-table td {
  padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle;
}
.case-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--head);
}
.case-table th.col-judge, .case-table td.col-judge {
  position: sticky; right: 0; z-index: 3;
  width: 176px; min-width: 176px; padding: 8px 10px;
  background: var(--card);
  box-shadow: -8px 0 10px rgba(15, 23, 42, 0.06);
}
.case-table thead th.col-judge { top: 0; z-index: 4; background: var(--head); }
.case-table tbody tr.fail-row td.col-judge { background: var(--err-bg); }
.case-table tbody tr:hover td.col-judge { background: var(--field); }
.jdg-switch { display: flex; gap: 4px; }
.jdg-btn {
  flex: 1; height: 28px; padding: 0 4px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--field); color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.jdg-btn:disabled { cursor: default; opacity: 0.7; }
.jdg-btn.on.j-none { background: var(--seg); color: var(--fg); }
.jdg-btn.on.j-P { background: var(--ok); color: #fff; border-color: var(--ok); }
.jdg-btn.on.j-F { background: var(--err); color: #fff; border-color: var(--err); }
.jdg-btn.on.j-NA { background: var(--accent); color: #fff; border-color: var(--accent); }
.case-table th.col-del, .case-table td.col-del {
  position: sticky; right: 0; z-index: 3;
  width: 64px; min-width: 64px; padding: 8px 8px; text-align: center;
  background: var(--card);
  box-shadow: -8px 0 10px rgba(15, 23, 42, 0.06);
}
.case-table thead th.col-del { top: 0; z-index: 4; background: var(--head); }
.case-table tbody tr.fail-row td.col-del { background: var(--err-bg); }
.case-table tbody tr.unsel-row td.col-del { background: var(--card); }
.case-table tbody tr:hover td.col-del { background: var(--field); }
.case-table tr:last-child td { border-bottom: 0; }
.case-table th { background: var(--head); font-weight: 600; white-space: nowrap; }
.case-table tbody tr:hover td { background: color-mix(in srgb, var(--seg) 45%, transparent); }
.case-table tbody tr.fail-row td { background: var(--err-bg); }
.case-table tbody tr.unsel-row { opacity: 0.48; }

.case-name { font-size: 14px; font-weight: 600; color: var(--fg); line-height: 1.45; }
.case-method-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.crit-txt { color: var(--ok); font-weight: 600; line-height: 1.45; }
.ce-edit[contenteditable="true"]:hover { background: var(--seg); border-radius: 4px; cursor: text; }
.ce-edit[contenteditable="true"]:focus { outline: 2px solid var(--accent); background: var(--field); padding: 2px 4px; border-radius: 4px; }

.res-inp {
  width: 100%; height: 34px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--field); color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; font-size: 13px;
}
.res-sel {
  width: 100%; height: 34px; padding: 0 6px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--field); color: var(--muted); font-weight: 600; font-size: 12.5px; cursor: pointer;
}
.res-sel.j-P { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.res-sel.j-F { background: var(--err-bg); color: var(--err); border-color: transparent; }
.res-sel.j-NA { background: var(--seg); color: var(--fg); }

.ev-inline { display: flex; align-items: center; gap: 8px; }
.ev-inline .note-inp { flex: 1; min-width: 120px; height: 34px; }
.ev-thumbs { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.ev-thumb {
  width: 32px; height: 32px; border-radius: 6px; object-fit: cover;
  border: 1px solid var(--line); cursor: pointer;
}
.note-inp {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--field); color: var(--fg); font: inherit; font-size: 13px;
}

#pageAdmin.page-container {
  height: calc(100vh - 56px); overflow: hidden;
  display: flex; flex-direction: column; padding-bottom: 16px;
}
#pageAdmin > .page-head { flex: none; }
#admUsersTab, #admAuditTab { flex: 1; min-height: 0; overflow: auto; }
#admTemplatesTab {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
#admTemplatesTab > .card {
  flex: 1; min-height: 0; margin-bottom: 0;
  display: flex; flex-direction: column;
}
#admTplTable { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#admTplTable .tbl-scroll { flex: 1; min-height: 0; }

/* ============ 页面 4：平台后台管理页 ============ */
.pending-highlight-card { border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); background: var(--warn-bg); }
.pending-user-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px; border-radius: 9px; background: var(--card);
  border: 1px solid var(--line); margin-bottom: 8px;
}

/* ============ 弹窗与轻提示 ============ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  z-index: 120; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  width: 100%; max-width: 720px; max-height: 88vh; margin: 0;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.icon-close {
  width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: var(--field); color: var(--muted); font-size: 18px; cursor: pointer;
}
.modal-bd { overflow-y: auto; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.gallery-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--field); }
.gallery-card img { width: 100%; height: 155px; object-fit: cover; display: block; background: #0f172a; }
.gallery-meta { padding: 8px 10px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1d1f23; color: #fff; padding: 9px 18px; border-radius: 8px;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.22);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 160;
}
.toast.show { opacity: 1; }
