/* ============================================================
   芒果社区 · 管理后台   UI v4（玻璃拟态霓虹 · 暗底）
   设计语言：深空暗底 + 毛玻璃卡片 + 霓虹描边光晕流动
   保留原类名与令牌名，仅更换主题为与前台统一的暗色霓虹体系。
   ============================================================ */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ---------- 基础层（与 site.css 同一套） ---------- */
  --bg:        #05070F;   /* 页面深空底 */
  --bg-2:      #0A0D19;
  --bg-3:      #111528;
  --surface:   #0A0D19;   /* 玻璃卡片基底 */
  --surface-2: #111528;   /* 浅层填充（输入框/表头/hover） */
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.17);
  --txt:       #EAF1FF;
  --sub:       #94A3C2;
  --dim:       #5A6684;

  /* ---------- 霓虹主色 ---------- */
  --brand:     #38E1FF;   /* 电光青（主色） */
  --brand-2:   #B06CFF;   /* 霓虹紫（hover / 渐变收尾） */
  --brand-dim: rgba(56,225,255,.13);
  --ok:        #35DCA0;
  --ok-dim:    rgba(53,220,160,.13);
  --danger:    #FF5C7A;
  --danger-dim:rgba(255,92,122,.13);
  --warn:      #FFB020;
  --warn-dim:  rgba(255,176,32,.13);
  --info:      #7FA8E8;
  --info-dim:  rgba(127,168,232,.13);

  /* ---------- 玻璃拟态 ---------- */
  --glass:      linear-gradient(150deg, rgba(255,255,255,.075), rgba(255,255,255,.018));
  --glass-2:    linear-gradient(150deg, rgba(255,255,255,.042), rgba(255,255,255,.010));
  --glass-line: rgba(255,255,255,.13);
  --blur:       16px;

  --sans: "PingFang SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --mono: ui-monospace,"SF Mono","Cascadia Code",Consolas,"Courier New",monospace;
  --sh-sm: 0 1px 0 rgba(255,255,255,.04) inset, 0 1px 2px rgba(0,0,0,.45);
  --sh:    0 1px 0 rgba(255,255,255,.05) inset, 0 18px 40px -26px rgba(0,0,0,.9);
  --sh-lg: 0 1px 0 rgba(255,255,255,.06) inset, 0 40px 80px -30px rgba(0,0,0,1);
  --r-card: 16px;
  --r-ctl:  11px;
}

html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(1100px 620px at 8% -10%, rgba(56,225,255,.09), transparent 62%),
    radial-gradient(880px 540px at 100% 0%, rgba(176,108,255,.09), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--txt);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* 工具类 */
.mono { font-family: var(--mono); }
.tip { font-size: 12.5px; color: var(--dim); line-height: 1.8; }
.tip.mt8, .mt8 { margin-top: 10px; }
.cnt { font-size: 11.5px; letter-spacing: .04em; color: var(--dim); font-weight: 500; }
.cnt b { color: var(--brand); font-weight: 700; }
.sp { flex: 1; }
.err { margin-top: 10px; font-size: 13px; color: var(--danger); line-height: 1.7; }

/* ============================================================
   登录页
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(160deg, #e9edf8 0%, #f6f7fb 55%, #eef1f8 100%);
}
.login-box {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-lg);
  padding: 38px 34px 30px;
}
.login-box .logo {
  width: 52px; height: 52px;
  background: var(--brand);
  color: #fff;
  font-weight: 700; font-size: 24px;
  display: grid; place-items: center;
  border-radius: 14px;
  margin: 0 auto 18px;
  box-shadow: 0 6px 16px rgba(79,70,229,.32);
}
.login-box h1 {
  text-align: center;
  font-size: 21px; font-weight: 700;
  color: var(--txt);
  margin-bottom: 22px;
}

/* ============================================================
   顶栏（含汉堡菜单按钮）
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  min-height: 58px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px 0 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand {
  font-weight: 700; font-size: 16px;
  color: var(--txt);
  display: flex; align-items: center; gap: 10px;
  white-space: nowrap;
}
.topbar .tip { font-size: 13px; color: var(--sub); }
.menu-btn {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: var(--r-ctl);
  color: var(--sub);
  transition: background .15s, color .15s;
}
.menu-btn:hover { background: var(--surface-2); color: var(--txt); }
.nw-build {
  font-family: var(--mono); font-size: 10.5px; color: var(--dim);
  border: 1px solid var(--line-2); border-radius: 6px;
  padding: 2px 7px; letter-spacing: .06em; white-space: nowrap;
}

/* ============================================================
   左侧抽屉导航（桌面 + 手机统一，汉堡呼出）
   ============================================================ */
.drawer-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(17,24,39,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; left: 0; top: 0; z-index: 210;
  height: 100vh; height: 100dvh;
  width: 268px; max-width: 84vw;
  background: var(--surface);
  box-shadow: var(--sh-lg);
  display: flex; flex-direction: column;
  transform: translateX(-104%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; gap: 11px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-head .logo {
  width: 38px; height: 38px; flex: none;
  background: var(--brand); color: #fff;
  border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
}
.drawer-head .tt { min-width: 0; }
.drawer-head .tt b { display: block; font-size: 15px; font-weight: 700; color: var(--txt); white-space: nowrap; }
.drawer-head .tt span { display: block; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-close {
  margin-left: auto; flex: none;
  width: 32px; height: 32px;
  background: var(--surface-2); border: 0; border-radius: 8px;
  color: var(--sub); font-size: 18px; line-height: 1;
  display: grid; place-items: center;
}
.drawer-close:hover { background: var(--danger-dim); color: var(--danger); }
.drawer-foot {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--dim);
  font-family: var(--mono); letter-spacing: .05em;
}

/* 抽屉内的 Tabs：竖排导航 */
.drawer .tabs {
  display: flex; flex-direction: column;
  gap: 3px;
  padding: 12px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  flex: 1;
  border-bottom: 0;
  background: transparent;
}
.drawer .tab {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: none; border: 0;
  text-align: left;
  color: var(--sub);
  font-size: 14.5px; font-weight: 500;
  padding: 12px 14px;
  min-height: 46px;
  border-radius: var(--r-ctl);
  white-space: nowrap;
  transition: background .15s, color .15s;
  font-family: var(--sans);
}
.drawer .tab:hover { background: var(--surface-2); color: var(--txt); }
.drawer .tab.on, .drawer .tab.active {
  background: var(--brand-dim);
  color: var(--brand);
  font-weight: 600;
}
.drawer .tab.on::before, .drawer .tab.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 20px; border-radius: 0 4px 4px 0;
  background: var(--brand);
}
.drawer .tab:disabled { opacity: .4; cursor: not-allowed; }
.drawer .tab:disabled:hover { background: none; color: var(--sub); }
.drawer .badge {
  margin-left: auto;
  font-size: 11px; font-weight: 700;
  min-width: 20px; text-align: center;
  padding: 1px 7px; border-radius: 10px;
  background: var(--danger); color: #fff;
}
.drawer .tab.on .badge { background: var(--danger); color: #fff; }

/* 兼容：顶部 .tabs（若残留在抽屉外）隐藏横排样式 */
.tabs { scrollbar-width: thin; }

/* ============================================================
   Main / Pane / Card
   ============================================================ */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 26px 64px;
}
.pane { display: none; padding-top: 0; }
.pane.on { display: block; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--sh-sm);
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card h2 {
  font-size: 16.5px; font-weight: 700;
  color: var(--txt);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.card h2 .sp { min-width: 0; }
.card h2 .cnt { order: 10; }

/* ============================================================
   Stat 格子
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--sh-sm);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat .k, .stat .n {
  font-size: 12.5px; color: var(--dim); font-weight: 500;
}
.stat .v {
  font-size: 30px; font-weight: 700;
  color: var(--brand);
  letter-spacing: -.01em; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .v.green { color: var(--ok); }
.stat .v.blue { color: var(--info); }
.stat .v.red { color: var(--danger); }
.stat .s { font-size: 12.5px; color: var(--sub); }

/* ============================================================
   表单
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.field { margin-bottom: 16px; }
.form-grid .field { margin-bottom: 0; }
.field > label,
.form-grid > div > label,
.form-grid > label,
label.lbl {
  display: block;
  font-size: 13px; color: var(--sub); font-weight: 500;
  margin-bottom: 8px;
}

.input, select.input, textarea.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctl);
  color: var(--txt);
  font-family: inherit; font-size: 15px;
  padding: 0 14px; height: 44px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 100px; resize: vertical; line-height: 1.7; padding: 11px 14px; }
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79,70,229,.13);
}
.input::placeholder { color: var(--dim); }
select.input {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239aa4b6' fill='none' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.bar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff;
  border: 1px solid var(--brand);
  font-weight: 600; font-size: 14px; letter-spacing: .02em;
  padding: 0 22px; min-height: 42px; border-radius: var(--r-ctl);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  font-family: var(--sans);
  white-space: nowrap;
}
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.mini { padding: 0 14px; min-height: 34px; font-size: 12.5px; border-radius: 8px; }
.btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.btn.gray {
  background: var(--surface); color: var(--txt); border-color: var(--line-2);
}
.btn.gray:hover { background: var(--surface-2); border-color: var(--line-2); color: var(--txt); }

.btn.green {
  background: var(--surface); color: var(--ok); border-color: rgba(22,163,74,.4);
}
.btn.green:hover { background: var(--ok-dim); border-color: var(--ok); color: var(--ok); }

.btn.red {
  background: var(--surface); color: var(--danger); border-color: rgba(220,38,38,.35);
}
.btn.red:hover { background: var(--danger-dim); border-color: var(--danger); color: var(--danger); }

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* radio-inline */
.radio-inline {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  padding: 10px 16px; font-size: 13.5px; color: var(--sub);
  background: var(--surface); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.radio-inline:has(input:checked) {
  background: var(--brand-dim); border-color: var(--brand); color: var(--brand);
}
.radio-inline input { accent-color: var(--brand); }

/* Switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl {
  position: absolute; inset: 0;
  background-color: #cfd5e2;
  transition: .2s; border-radius: 26px; cursor: pointer;
}
.switch .sl::before {
  position: absolute; content: "";
  height: 20px; width: 20px;
  left: 3px; top: 3px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(16,24,40,.25);
  transition: .2s; border-radius: 50%;
}
.switch input:checked + .sl { background-color: var(--brand); }
.switch input:checked + .sl::before { transform: translateX(20px); }

/* ============================================================
   表格
   ============================================================ */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--sh-sm);
}
.tbl-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 720px;
}
.tbl-wrap th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px; font-weight: 600;
  color: var(--sub);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl-wrap td {
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: var(--txt);
  vertical-align: top;
  line-height: 1.7;
  white-space: normal;
  word-break: break-all;
}
.tbl-wrap tr:first-child td { border-top: 0; }
.tbl-wrap tbody tr:hover td { background: #f8faff; }

.tbl-wrap .tag, .tag {
  display: inline-block;
  font-size: 11.5px; font-weight: 600;
  padding: 2px 10px; border-radius: 6px;
  white-space: nowrap;
}
.tag.green, .tbl-wrap .tag.green { background: var(--ok-dim); color: var(--ok); }
.tag.blue,  .tbl-wrap .tag.blue  { background: var(--info-dim); color: var(--info); }
.tag.orange,.tbl-wrap .tag.orange{ background: var(--warn-dim); color: var(--warn); }
.tag.gray,  .tbl-wrap .tag.gray  { background: #eef0f5; color: var(--sub); }
.tag.red,   .tbl-wrap .tag.red   { background: var(--danger-dim); color: var(--danger); }

/* 证据缩略图 */
.tbl-wrap .ev-img, .tbl-wrap img {
  max-width: 80px !important;
  max-height: 60px !important;
  width: auto !important; height: auto !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-block; vertical-align: middle;
  margin: 2px 4px 2px 0;
  object-fit: cover;
}
@media (max-width: 767px) {
  .tbl-wrap .ev-img, .tbl-wrap img { max-width: 100px !important; max-height: 76px !important; }
}
.ev-grid { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; }
.ev-grid a { display: inline-block; }
.ev-grid img { max-width: 80px; max-height: 60px; width: auto; height: auto; margin: 0; }
@media (max-width: 767px) {
  .ev-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
  .ev-grid img { max-width: none; width: 100%; max-height: 80px; }
}

/* 操作列 */
.tbl-wrap .ops {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: flex-start; justify-content: flex-start;
  min-width: 160px;
}
.tbl-wrap .ops .btn { min-height: 44px; padding: 8px 14px; }

/* 长文本列 */
.tbl-wrap .left {
  white-space: pre-wrap; word-break: break-word;
  max-width: 200px; max-height: 60px; overflow: auto;
  font-size: 13px; line-height: 1.55; padding: 4px 0;
  color: var(--txt);
}
@media (max-width: 767px) {
  .tbl-wrap .left { max-width: 180px; max-height: 96px; font-size: 13.5px; }
}

.tbl-wrap .mono, td.mono, th.mono { font-family: var(--mono); }
.tbl-wrap td.mono { white-space: nowrap; }
.tbl-wrap td { word-break: break-word; overflow-wrap: anywhere; }

/* ============================================================
   Modal
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(17,24,39,.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal.hidden { display: none; }
.modalBox {
  width: min(620px, 100%);
  max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.modalHead {
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.modalHead b { font-size: 16px; font-weight: 700; color: var(--txt); }
.modalClose {
  width: 32px; height: 32px; flex: none;
  background: var(--surface-2); border: 0;
  color: var(--sub); border-radius: 8px; font-size: 18px;
  display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.modalClose:hover { background: var(--danger-dim); color: var(--danger); }
.modalBody { padding: 20px 22px; overflow: auto; }
.modalFoot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 12px;
  background: var(--surface-2);
}

/* perm-list */
.perm-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 10px 0 6px;
}
.perm-list label {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--line-2); border-radius: var(--r-ctl);
  background: var(--surface);
  font-size: 13.5px; color: var(--sub); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.perm-list input { accent-color: var(--brand); }
.perm-list label:has(input:checked) {
  border-color: var(--brand); background: var(--brand-dim); color: var(--brand); font-weight: 600;
}

.invite-code-box {
  margin: 10px 0 14px;
  padding: 15px 17px;
  border: 1px dashed rgba(79,70,229,.45);
  background: var(--brand-dim);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 17px; letter-spacing: .05em;
  color: var(--brand-2);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}

/* ============================================================
   Toast
   ============================================================ */
#toast {
  position: fixed; left: 50%; top: 20px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px);
}
#toast > div {
  padding: 11px 22px;
  border-radius: 11px;
  font-size: 13.5px; font-weight: 600;
  color: #fff;
  background: #222a3a;
  box-shadow: var(--sh-lg);
  animation: toastIn .22s ease;
  pointer-events: auto;
  text-align: center;
}
#toast > div.err { background: var(--danger); }
#toast > div.ok  { background: var(--ok); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   分后台 .header（页内标题区，浅色卡片风）
   ============================================================ */
.wrap { max-width: none; margin: 0; padding: 0; }
.header {
  background: var(--surface) !important;
  color: var(--txt) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-card) !important;
  box-shadow: var(--sh-sm) !important;
  padding: 18px 22px !important;
  margin: 18px auto 0;
  max-width: 1280px;
}
.header h1 { color: var(--txt) !important; font-weight: 700 !important; font-size: 18px; }
.header .sub { color: var(--sub) !important; opacity: 1 !important; }
.login-switch { color: var(--brand); cursor: pointer; font-size: 13px; margin-left: 6px; font-weight: 600; }
.login-switch:hover { text-decoration: underline; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1040px) {
  .main { padding-left: 20px; padding-right: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .perm-list { grid-template-columns: 1fr; }
  .header { margin-left: 16px; margin-right: 16px; }
}
@media (max-width: 767px) {
  body { padding-bottom: env(safe-area-inset-bottom, 0); }
  .main { padding: 16px 14px 48px; }
  .topbar { padding: 0 12px 0 6px; min-height: 54px; gap: 10px; }
  .topbar .brand { font-size: 15px; }
  .card { padding: 16px 16px 18px; margin-bottom: 14px; border-radius: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px 15px; }
  .stat .v { font-size: 24px; }
  .login-box { padding: 30px 22px; border-radius: 16px; }
  .input, select.input, textarea.input { font-size: 16px; } /* iOS 防缩放 */
  .btn { min-height: 44px; padding: 0 18px; }
  .modal { padding: 12px; }
  .modalBox { border-radius: 14px; }
  .drawer { width: 82vw; }
  .drawer .tab { min-height: 48px; font-size: 15px; }
  .header { margin: 12px 12px 0; padding: 15px 16px !important; }

  /* ===== 数据表转卡片式 ===== */
  .tbl-wrap { overflow-x: visible; border: 0; background: transparent; box-shadow: none; }
  .tbl-wrap table { min-width: 0; width: 100%; display: block; }
  .tbl-wrap tbody tr:first-child { display: none; }
  .tbl-wrap tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--sh-sm);
    margin: 0 0 12px;
    padding: 8px 15px 12px;
  }
  .tbl-wrap tr:hover td { background: transparent; }
  .tbl-wrap td {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 14px; border-top: 1px solid var(--line);
    padding: 10px 0; white-space: normal; word-break: normal;
    overflow-wrap: anywhere; text-align: right; line-height: 1.6;
  }
  .tbl-wrap td:first-child { border-top: 0; }
  .tbl-wrap td::before {
    content: attr(data-label);
    flex: 0 0 auto; color: var(--dim);
    font-size: 12.5px; font-weight: 500; line-height: 1.7;
    text-align: left; max-width: 38%;
  }
  .tbl-wrap .left { max-width: 60%; max-height: none; overflow: visible; font-size: 13px; text-align: right; }
  .tbl-wrap td.mono { font-size: 13px; white-space: normal; text-align: right; }
  .tbl-wrap td .ev-grid {
    flex: 1 1 auto; width: 100%; min-width: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  }
  .tbl-wrap .ev-grid img { width: 100%; max-width: none; max-height: 84px; margin: 0; }
  .tbl-wrap td .ops {
    flex: 1 1 auto; width: 100%; min-width: 0;
    justify-content: flex-end; gap: 8px;
  }
  .tbl-wrap td .ops .btn {
    flex: 1 1 30%; min-width: 0; min-height: 42px;
    padding: 9px 8px; font-size: 13px; white-space: nowrap;
  }
  .tbl-wrap td .tag { flex: none; }
}

/* ========== 修复：分后台抽屉样式 ========== */
html.m .drawer-mask { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
html.m .drawer-mask.show { opacity: 1; pointer-events: auto; }
html.m .drawer { position: fixed; left: 0; top: 0; z-index: 210; height: 100vh; height: 100dvh; width: 82vw; max-width: 400px; background: var(--bg-2); border-radius: 10px 10px 0 0; border-top: 1px solid var(--line-2); box-shadow: var(--sh-lg); display: flex; flex-direction: column; transform: translateY(100%); transition: transform .26s cubic-bezier(.4,0,.2,1); will-change: transform; }
html.m .drawer.open { transform: translateY(0); }
html.m .drawer-head { display: flex; align-items: center; gap: 11px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
html.m .drawer-head .logo { width: 38px; height: 38px; flex: none; background: var(--brand); color: #fff; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
html.m .drawer-head .tt { min-width: 0; }
html.m .drawer-head .tt b { display: block; font-size: 15px; font-weight: 700; color: var(--txt); white-space: nowrap; }
html.m .drawer-head .tt span { display: block; font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.m .drawer-close { margin-left: auto; flex: none; width: 32px; height: 32px; background: var(--surface-2); border: 0; border-radius: 8px; color: var(--sub); font-size: 18px; line-height: 1; display: grid; place-items: center; transition: background .15s, color .15s; }
html.m .drawer-close:hover { background: var(--danger-dim); color: var(--danger); }
html.m .drawer-foot { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); font-family: var(--mono); letter-spacing: .05em; }
html.m .drawer .tabs { display: flex; flex-direction: column; gap: 3px; padding: 12px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; border-bottom: 0; background: transparent; }
html.m .drawer .tab { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; text-align: left; color: var(--sub); font-size: 14.5px; font-weight: 500; padding: 12px 14px; min-height: 46px; border-radius: var(--r-ctl); white-space: nowrap; transition: background .15s, color .15s; font-family: var(--sans); }
html.m .drawer .tab:hover { background: var(--surface-2); color: var(--txt); }
html.m .drawer .tab.on, html.m .drawer .tab.active { background: var(--brand-dim); color: var(--brand); font-weight: 600; }
html.m .drawer .tab.on::before, html.m .drawer .tab.active::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 20px; border-radius: 0 4px 4px 0; background: var(--brand); }
html.m .drawer .tab:disabled { opacity: .4; cursor: not-allowed; }
html.m .drawer .tab:disabled:hover { background: none; color: var(--sub); }
html.m .drawer .badge { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 7px; border-radius: 10px; background: var(--danger); color: #fff; }
html.m .drawer .tab.on .badge { background: var(--danger); color: #fff; }
}

/* ============================================================
   ★ 玻璃拟态霓虹增强层（v4）
   置于文件末尾：同优先级下后置胜出，无需改动上方任何历史规则。
   ============================================================ */

/* ---------- 全局观感 ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(56,225,255,.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(56,225,255,.45), rgba(176,108,255,.45));
  border-radius: 10px; border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #38E1FF, #B06CFF); background-clip: padding-box; }
::selection { background: rgba(56,225,255,.28); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- 顶栏 ---------- */
.topbar {
  background: linear-gradient(180deg, rgba(10,13,25,.86), rgba(10,13,25,.62));
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  border-bottom: 1px solid var(--glass-line);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px -18px rgba(0,0,0,.9);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56,225,255,.55), rgba(176,108,255,.45), transparent);
  opacity: .7;
}
.topbar { position: sticky; }
.menu-btn:hover { background: rgba(56,225,255,.1); color: var(--brand); }
.nw-build { border-color: var(--glass-line); background: var(--glass-2); color: var(--dim); }

/* ---------- 登录页 ---------- */
.login-wrap {
  background:
    radial-gradient(900px 520px at 12% -6%, rgba(56,225,255,.14), transparent 62%),
    radial-gradient(760px 480px at 100% 8%, rgba(176,108,255,.14), transparent 60%),
    var(--bg);
}
.login-box {
  background: linear-gradient(160deg, rgba(20,25,45,.94), rgba(9,12,24,.97));
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  box-shadow: var(--sh-lg), 0 0 0 1px rgba(56,225,255,.08);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}
.login-box .logo {
  background: linear-gradient(135deg, #38E1FF, #2BB8E8 55%, #B06CFF);
  color: #04121B;
  border-radius: 15px;
  box-shadow: 0 0 0 1px rgba(56,225,255,.45), 0 10px 30px -10px rgba(56,225,255,.9);
}
.login-box h1 { color: var(--txt); text-shadow: 0 0 24px rgba(56,225,255,.25); }
.login-switch { color: var(--brand); }

/* ---------- 抽屉导航 ---------- */
.drawer-mask { background: rgba(3,5,12,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.drawer {
  background: linear-gradient(170deg, rgba(16,21,38,.97), rgba(7,10,20,.99));
  border-right: 1px solid var(--glass-line);
  box-shadow: var(--sh-lg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}
.drawer-head { border-bottom-color: rgba(255,255,255,.08); }
.drawer-head .logo {
  background: linear-gradient(135deg, #38E1FF, #B06CFF); color: #04121B;
  box-shadow: 0 0 0 1px rgba(56,225,255,.4), 0 8px 22px -10px rgba(56,225,255,.9);
}
.drawer-close { background: rgba(255,255,255,.05); border-radius: 9px; }
.drawer-close:hover { background: var(--danger-dim); color: var(--danger); }
.drawer-foot { border-top-color: rgba(255,255,255,.07); }
.drawer .tab:hover { background: rgba(255,255,255,.05); color: var(--txt); }
.drawer .tab.on, .drawer .tab.active { background: rgba(56,225,255,.11); color: var(--brand); }
.drawer .tab.on::before, .drawer .tab.active::before {
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 14px rgba(56,225,255,.85);
}

/* ---------- 卡片 / 统计格 ---------- */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-card);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 40px -26px rgba(0,0,0,.9);
  backdrop-filter: blur(calc(var(--blur) - 6px));
  -webkit-backdrop-filter: blur(calc(var(--blur) - 6px));
}
.card h2 { color: var(--txt); }
.card h2::before {
  content: ""; flex: none; width: 3px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 12px rgba(56,225,255,.85);
}
.stat {
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
}
.stat .v { color: var(--brand); text-shadow: 0 0 26px rgba(56,225,255,.5); }
.stat .v.green { color: var(--ok); text-shadow: 0 0 26px rgba(53,220,160,.45); }
.stat .v.blue  { color: var(--info); text-shadow: 0 0 26px rgba(127,168,232,.45); }
.stat .v.red   { color: var(--danger); text-shadow: 0 0 26px rgba(255,92,122,.45); }

/* ---------- 按钮 ---------- */
.btn {
  background: linear-gradient(135deg, #38E1FF, #2BB8E8 55%, #B06CFF);
  border-color: transparent; color: #04121B; font-weight: 700;
  box-shadow: 0 0 0 1px rgba(56,225,255,.35), 0 10px 26px -12px rgba(56,225,255,.85);
}
.btn:hover {
  background: linear-gradient(135deg, #6BEBFF, #38E1FF 55%, #C08CFF);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(56,225,255,.6), 0 14px 34px -12px rgba(56,225,255,1);
}
.btn.on { background: linear-gradient(135deg, #38E1FF, #B06CFF); border-color: transparent; color: #04121B; }
.btn.gray {
  background: rgba(255,255,255,.05); color: var(--txt); border: 1px solid var(--glass-line);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
}
.btn.gray:hover { background: rgba(255,255,255,.1); border-color: var(--glass-line); color: var(--txt); }
.btn.green {
  background: rgba(53,220,160,.1); color: var(--ok); border-color: rgba(53,220,160,.45);
}
.btn.green:hover { background: rgba(53,220,160,.18); border-color: var(--ok); color: var(--ok); box-shadow: 0 0 22px -10px rgba(53,220,160,.9); }
.btn.red {
  background: rgba(255,92,122,.1); color: var(--danger); border-color: rgba(255,92,122,.42);
}
.btn.red:hover { background: rgba(255,92,122,.18); border-color: var(--danger); color: var(--danger); box-shadow: 0 0 22px -10px rgba(255,92,122,.9); }

/* ---------- 表单 ---------- */
.input, select.input, textarea.input {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-ctl);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:hover, select.input:hover, textarea.input:hover { border-color: rgba(255,255,255,.24); }
.input:focus, select.input:focus, textarea.input:focus {
  border-color: rgba(56,225,255,.65);
  background: rgba(56,225,255,.05);
  box-shadow: 0 0 0 3px rgba(56,225,255,.16), 0 0 24px -10px rgba(56,225,255,.8);
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394A3C2' fill='none' stroke-width='1.6'/%3E%3C/svg%3E");
}

/* ---------- 原生下拉浮层深色化 ----------
   桌面端系统默认浅底渲染 option，深色主题下会「白底白字」看不清；
   color-scheme:dark 让原生控件走暗色，再显式指定 option 底色与文字色兜底 */
html { color-scheme: dark; }
select option, select optgroup {
  background-color: var(--bg-3);
  color: var(--txt);
}
select option:checked { background-color: rgba(56,225,255,.18); color: var(--neon); }
select:disabled option { color: var(--dim); }
.radio-inline { background: var(--glass-2); }
.radio-inline:has(input:checked) { background: rgba(56,225,255,.11); border-color: var(--brand); color: var(--brand); }
.switch .sl { background-color: rgba(255,255,255,.16); }
.switch .sl::before { background-color: #EAF1FF; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.switch input:checked + .sl { background: linear-gradient(135deg, #38E1FF, #B06CFF); box-shadow: 0 0 18px -6px rgba(56,225,255,.9); }
.switch input:checked + .sl::before { background-color: #04121B; }
.perm-list label { background: var(--glass-2); }
.perm-list label:has(input:checked) { border-color: var(--brand); background: rgba(56,225,255,.11); color: var(--brand); }

/* ---------- 表格 ---------- */
.tbl-wrap {
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-card);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset;
}
.tbl-wrap th { background: rgba(255,255,255,.045); border-bottom-color: rgba(255,255,255,.08); }
.tbl-wrap td { border-top-color: rgba(255,255,255,.06); }
.tbl-wrap tbody tr:hover td { background: rgba(56,225,255,.045); }
.tbl-wrap .ev-img, .tbl-wrap img { border-color: var(--glass-line); border-radius: 9px; }

/* 状态标签：暗底霓虹 */
.tag.green,  .tbl-wrap .tag.green  { background: rgba(53,220,160,.14); color: var(--ok); }
.tag.blue,   .tbl-wrap .tag.blue   { background: rgba(127,168,232,.14); color: var(--info); }
.tag.orange, .tbl-wrap .tag.orange { background: rgba(255,176,32,.14); color: var(--warn); }
.tag.gray,   .tbl-wrap .tag.gray   { background: rgba(255,255,255,.07); color: var(--sub); }
.tag.red,    .tbl-wrap .tag.red    { background: rgba(255,92,122,.14); color: var(--danger); }

/* ---------- 弹窗 ---------- */
.modal { background: rgba(3,5,12,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modalBox {
  background: linear-gradient(160deg, rgba(20,25,45,.96), rgba(9,12,24,.98));
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  box-shadow: var(--sh-lg), 0 0 0 1px rgba(56,225,255,.08);
}
.modalHead { border-bottom-color: rgba(255,255,255,.08); }
.modalClose { background: rgba(255,255,255,.05); border-radius: 9px; }
.modalClose:hover { background: var(--danger-dim); color: var(--danger); }
.modalFoot { background: rgba(255,255,255,.025); border-top-color: rgba(255,255,255,.08); }

/* ---------- 邀请码 ---------- */
.invite-code-box {
  border: 1px dashed rgba(56,225,255,.45);
  background: rgba(56,225,255,.07);
  color: var(--brand);
  box-shadow: inset 0 0 24px -14px rgba(56,225,255,.9);
}

/* ---------- Toast ---------- */
#toast > div {
  background: linear-gradient(150deg, rgba(22,28,48,.97), rgba(10,14,26,.98));
  border: 1px solid var(--glass-line);
  color: var(--txt);
  box-shadow: var(--sh-lg), 0 0 0 1px rgba(56,225,255,.1);
}
#toast > div.err { background: linear-gradient(150deg, rgba(90,24,38,.97), rgba(46,12,22,.98)); border-color: rgba(255,92,122,.5); }
#toast > div.ok  { background: linear-gradient(150deg, rgba(14,62,46,.97), rgba(7,32,24,.98)); border-color: rgba(53,220,160,.5); }

/* ---------- 分后台 .header ---------- */
.header {
  background: var(--glass) !important;
  border: 1px solid var(--glass-line) !important;
  border-radius: var(--r-card) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 40px -26px rgba(0,0,0,.9) !important;
}
.header h1 { color: var(--txt) !important; text-shadow: 0 0 22px rgba(56,225,255,.22); }

/* ============================================================
   ★ 时间轴日志流（Timeline Log Stream）
   与 assets/site.css 中 .tl-* 完全同名同形：后台发放台 / 申请队列 /
   操作日志与前台进度查询共用同一套视觉骨架。
   ============================================================ */
.tl { position: relative; padding-left: 32px; }
.tl::before {
  content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(56,225,255,.75), rgba(176,108,255,.5), rgba(56,225,255,.15));
  box-shadow: 0 0 18px -2px rgba(56,225,255,.55);
}
.tl-item {
  position: relative; margin-bottom: 14px;
  background: var(--glass); border: 1px solid var(--glass-line);
  border-radius: 13px; padding: 13px 16px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 14px 30px -24px rgba(0,0,0,.9);
}
.tl-item::before {
  content: ""; position: absolute; left: -27px; top: 17px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #05070F; border: 2px solid var(--brand);
  box-shadow: 0 0 12px rgba(56,225,255,.9);
}
.tl-item.s1::before { border-color: var(--ok); box-shadow: 0 0 12px rgba(53,220,160,.9); }
.tl-item.s2::before { border-color: #4A5570; box-shadow: none; }
.tl-item.s2 { opacity: .62; }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-idx { font-family: var(--mono); font-size: 12px; color: var(--brand); letter-spacing: .04em; }
.tl-name { font-weight: 700; font-size: 15px; }
.tl-time { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.tl-meta { margin-top: 7px; font-size: 12.5px; color: var(--sub); line-height: 1.8; }
.tl-meta b { color: var(--txt); font-family: var(--mono); }
.tl-bar { margin-top: 10px; height: 5px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.tl-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); box-shadow: 0 0 12px rgba(56,225,255,.75); }
.tl-item.s1 .tl-bar i { background: linear-gradient(90deg, var(--ok), #7BE8BE); box-shadow: 0 0 12px rgba(53,220,160,.75); }
.tl-chip {
  font-size: 11.5px; border-radius: 999px; padding: 2px 10px;
  border: 1px solid var(--glass-line); color: var(--sub); white-space: nowrap;
}
.tl-chip.s0 { color: var(--brand); border-color: rgba(56,225,255,.5); background: rgba(56,225,255,.13); }
.tl-chip.s1 { color: var(--ok); border-color: rgba(53,220,160,.5); background: rgba(53,220,160,.13); }
.tl-chip.s2 { color: var(--dim); }
/* VIP 插队标记（通宵物资 VIP 通道申请） */
.tl-chip.vip { color: #FFD76A; border-color: rgba(255,215,106,.55); background: rgba(255,215,106,.14); font-weight: 700; }
.tl-empty { color: var(--dim); font-size: 13.5px; text-align: center; padding: 22px 0; }
.tl-ops { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.tl-item.is-head { border-color: rgba(56,225,255,.55); }
.tl-item.is-head::before { animation: tlPulse 1.6s ease-in-out infinite; }
@keyframes tlPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(56,225,255,.75); }
  50%     { box-shadow: 0 0 0 7px rgba(56,225,255,0); }
}
@keyframes tlIn {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tl-item.is-new { animation: tlIn .46s cubic-bezier(.2,.8,.2,1); }
@keyframes glowFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.tl-item.is-new::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(56,225,255,.16) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: glowFlow 1.1s ease-out 1;
}
@media (prefers-reduced-motion: reduce) {
  .tl-item.is-new, .tl-item.is-new::after, .tl-item.is-head::before { animation: none; }
}

/* 移动端抽屉 logo 与角标：霓虹/警示底改暗字，避免白字模糊 */
html.m .drawer-head .logo { color: #04121B; }
html.m .drawer .tab.on .badge,
html.m .drawer .badge { color: #04121B; }

/* ============================================================
   ★ 三栏指挥台 DECK（v5）—— 仅作用于主后台 #adminView
   与前台 assets/site.css 的作战甲板层同名同形；仅用 admin.css 令牌。
   全部选择器以 #adminView 作用域限定：同名 .dc-* 甲板类在下方还有一份
   供 subadmin.html 使用，靠 id 作用域按优先级隔离，互不影响。
   ============================================================ */

/* ---------- 总壳 ---------- */
#adminView.dc { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- 顶部指挥栏 ---------- */
#adminView .dc-rail {
  position: sticky; top: 0; z-index: 100; height: auto;
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 0 18px 0 8px;
  background: var(--bg-2);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  border-bottom: 1px solid var(--glass-line);
  box-shadow: var(--sh);
}
#adminView .dc-rail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  transform: none; animation: none;
  background: linear-gradient(90deg, transparent, var(--brand), var(--brand-2), transparent);
  opacity: .7;
}
#adminView .dc-rail .brand {
  font-weight: 700; font-size: 16px; color: var(--txt);
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
}
#adminView .dc-rail .tip { font-size: 13px; color: var(--sub); }
#adminView .dc-rail .menu-btn { display: none; }

/* ---------- 三栏网格 ---------- */
#adminView .dc-body {
  flex: 1; width: 100%;
  max-width: 1560px; margin: 0 auto;
  padding: 20px 22px 76px;
  display: grid;
  grid-template-columns: var(--dc-left, 268px) minmax(0, 1fr) 300px;
  gap: 18px; align-items: start;
}
#adminView .dc-work { min-width: 0; }
#adminView .dc-ctx { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 14px; }

/* 工作区卡片：恢复玻璃卡片观感（覆盖分后台甲板层的 .dc-work .card 扁平化） */
#adminView .dc-work .card {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-card);
  box-shadow: var(--sh);
  backdrop-filter: blur(calc(var(--blur) - 6px));
  -webkit-backdrop-filter: blur(calc(var(--blur) - 6px));
  margin: 0 0 18px;
}
/* 面板外框：主后台为透明容器，卡片自带边框（覆盖分后台 .dc-pane 卡片化） */
#adminView .dc-pane {
  border: 0; border-radius: 0; background: none; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  overflow: visible; padding: 0;
}

/* ---------- 左栏：把抽屉改造为常驻「指挥流」 ---------- */
#adminView #drawer {
  position: sticky; top: 78px; left: auto;
  width: auto; max-width: none; height: auto;
  max-height: calc(100vh - 100px);
  transform: none;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r-card);
  box-shadow: var(--sh);
  backdrop-filter: blur(calc(var(--blur) - 6px));
  -webkit-backdrop-filter: blur(calc(var(--blur) - 6px));
  overflow: hidden;
}
#adminView #drawer .drawer-head { padding: 14px 16px 12px; }
#adminView #drawer .drawer-close { display: none; }
#adminView #drawer .drawer-foot { margin-top: auto; padding: 12px 16px; }

/* 邻接节点索引 */
#adminView .dc-nodes { display: flex; flex-direction: column; gap: 3px; flex: 1; padding: 10px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#adminView .dc-node {
  position: relative; width: 100%; text-align: left;
  display: flex; align-items: center; gap: 9px;
  background: none; border: 1px solid transparent;
  color: var(--sub); font-size: 14px; font-weight: 500;
  padding: 10px 12px; min-height: 44px;
  border-radius: var(--r-ctl);
  cursor: pointer; font-family: var(--sans);
  transition: background .15s, color .15s, border-color .15s;
}
#adminView .dc-node::before {
  content: ""; position: absolute; left: 0; top: 50%; bottom: auto;
  width: 3px; height: 20px; transform: translateY(-50%);
  border-radius: 0 3px 3px 0; opacity: 0;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 12px var(--brand-dim);
  transition: opacity .15s;
}
#adminView .dc-node:hover { background: var(--surface-2); color: var(--txt); }
#adminView .dc-node:hover::before { opacity: .5; }
#adminView .dc-node.on { background: var(--brand-dim); border-color: var(--brand); color: var(--brand); font-weight: 600; }
#adminView .dc-node.on::before { opacity: 1; }
#adminView .dc-node .sn { flex: none; width: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0; color: var(--dim); }
#adminView .dc-node.on .sn { color: var(--brand); }
#adminView .dc-node .sname { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#adminView .dc-node.on .sname { font-weight: 600; }
#adminView .dc-node .sgo { flex: none; color: var(--brand); opacity: 0; transition: opacity .15s, transform .15s; }
#adminView .dc-node:hover .sgo, #adminView .dc-node.on .sgo { opacity: .85; transform: translateX(2px); }
#adminView .dc-node.off { opacity: .45; pointer-events: none; }

/* 右栏小面板标题（快捷指令 / 处置流程） */
#adminView .dc-dock .hd, #adminView .dc-steps .hd {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 8px;
}
/* ---------- 面板头 ---------- */
#adminView .dc-ph { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 2px 16px; border-bottom: 0; background: none; }
#adminView .dc-ph .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; color: var(--brand); text-transform: uppercase; }
#adminView .dc-ph h2 { font-size: 22px; font-weight: 700; color: var(--txt); letter-spacing: -.01em; }
#adminView .dc-ph .n { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

/* ---------- 右栏：快捷指令 ---------- */
#adminView .dc-dock {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px; border: 1px solid var(--glass-line);
  border-radius: var(--r-card); background: var(--glass);
}
#adminView .dc-dock .btn { width: 100%; justify-content: flex-start; }

/* ---------- 右栏：处置流程 / 当前态 ---------- */
#adminView .dc-steps { padding: 14px; border: 1px solid var(--glass-line); border-radius: var(--r-card); background: var(--glass-2); }
#adminView .dc-step { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
#adminView .dc-step:first-child { border-top: 0; padding-top: 0; }
#adminView .dc-step .sn { flex: none; width: 18px; font-family: var(--mono); font-size: 11px; color: var(--brand); }
#adminView .dc-step .bd { flex: 1; min-width: 0; }
#adminView .dc-step .st { font-size: 13px; font-weight: 600; color: var(--txt); }
#adminView .dc-step .sd { font-size: 12px; line-height: 1.7; color: var(--sub); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  #adminView .dc-body { grid-template-columns: var(--dc-left, 268px) minmax(0, 1fr); }
  #adminView .dc-ctx { grid-column: 1 / -1; position: static; flex-direction: row; flex-wrap: wrap; }
  #adminView .dc-ctx > * { flex: 1 1 260px; }
}
@media (max-width: 767px) {
  #adminView .dc-body { grid-template-columns: minmax(0, 1fr); padding: 14px 12px 84px; gap: 14px; }
  #adminView .dc-ctx { flex-direction: column; }
  #adminView .dc-ctx > * { flex: 1 1 auto; }
  #adminView .dc-ph h2 { font-size: 19px; }
  /* 窄屏非抽屉形态下，左栏索引改横向滑动 */
  #adminView .dc-nodes { flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 8px; }
  #adminView .dc-node { width: auto; flex: none; white-space: nowrap; min-height: 40px; }
  #adminView .dc-node .sgo { display: none; }
}

/* ---------- 手机端：抽屉还原为侧滑离屏，保留 menuBtn / closeAdminDrawer ---------- */
html.m #adminView .dc-rail { min-height: 54px; padding: 0 12px 0 6px; gap: 8px; }
html.m #adminView .dc-rail .menu-btn { display: grid; }
html.m #adminView .dc-rail .brand { font-size: 15px; }
html.m #adminView .dc-rail .nw-build { display: none; }
html.m #adminView #drawer {
  position: fixed; left: 0; top: 0;
  width: min(86vw, 340px); max-width: 340px;
  height: 100vh; height: 100dvh; max-height: none;
  transform: translateX(-104%);
  border: 0; border-right: 1px solid var(--glass-line);
  border-radius: 0 16px 16px 0;
  box-shadow: var(--sh-lg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}
html.m #adminView #drawer.open { transform: translateX(0); }
html.m #adminView #drawer .drawer-close { display: grid; }
/* 抽屉内索引恢复竖排（覆盖窄屏的横向滑动形态） */
html.m #adminView .dc-nodes { flex-direction: column; overflow-x: hidden; overflow-y: auto; padding: 12px; }
html.m #adminView .dc-node { width: 100%; white-space: normal; min-height: 46px; }

/* ============================================================
   ★ 分后台「日常处置工作台」甲板层（Deck v4）
   与 assets/site.css 的 .dc-* / .dot 同名同形，供 subadmin.html 使用。
   顶部状态带 → 左服务索引 + 右处置工作区。全部规则以 #subMainView
   限定作用域，仅作用于分后台甲板页，与页面其它 .dc-* 规则互不干扰；
   颜色一律引用 admin.css 既有令牌，不引入任何新色值。
   ============================================================ */

/* ---------- 状态灯 ---------- */
#subMainView .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); display: inline-block; flex: none; }
#subMainView .dot.live { background: var(--ok); animation: dotpulse 2.4s infinite; }
@keyframes dotpulse { 0%,100% { box-shadow: 0 0 0 0 var(--ok-dim); } 50% { box-shadow: 0 0 0 4px transparent; } }

/* ---------- 甲板外壳 ---------- */
#subMainView { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding-bottom: 26px; }

/* 顶部状态带 */
#subMainView .dc-rail {
  position: sticky; top: 0; z-index: 80;
  height: 56px; min-height: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 0 22px; overflow: hidden;
  background: var(--bg-2);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  border-radius: 0; box-shadow: none;
}
#subMainView .dc-rail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand) 50%, transparent);
  opacity: .55; animation: dcScan 6s linear infinite;
}
@keyframes dcScan { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

#subMainView .dc-mark {
  position: relative; width: 30px; height: 30px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  font-weight: 800; font-size: 14px; color: var(--brand);
  border: 1px solid var(--brand); background: var(--brand-dim);
}
#subMainView .dc-mark::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid var(--brand-dim); animation: dcRing 2.8s ease-out infinite;
}
@keyframes dcRing { 0% { transform: scale(.86); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }

#subMainView .dc-id { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
#subMainView .dc-id b { font-size: 13.5px; font-weight: 600; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#subMainView .dc-id i { font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .24em; color: var(--dim); white-space: nowrap; }

#subMainView .dc-live {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 12px; color: var(--sub);
  padding: 5px 13px; border: 1px solid var(--glass-line);
  border-radius: 99px; background: var(--glass-2);
}
#subMainView .dc-sp { flex: 1; }
#subMainView .dc-clock { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .1em; white-space: nowrap; }
#subMainView .dc-clock b { color: var(--brand); }
#subMainView .dc-admin {
  font-family: var(--sans); font-size: 12.5px; color: var(--sub); white-space: nowrap;
  padding: 6px 15px; border: 1px solid var(--line-2); border-radius: 99px;
  background: none; min-height: 0;
  transition: color .15s, border-color .15s, box-shadow .15s;
}
#subMainView .dc-admin:hover { color: var(--brand); border-color: var(--brand); box-shadow: 0 0 20px var(--brand-dim); }

/* ---------- 主区：左索引 + 右工作区 ---------- */
#subMainView .dc-body {
  width: 100%; max-width: 1340px; margin: 0 auto;
  padding: 20px 22px 10px;
  display: grid; grid-template-columns: var(--dc-left, 306px) minmax(0,1fr); gap: 18px;
  align-items: start;
}
#subMainView .dc-pane {
  padding: 0;
  border: 1px solid var(--glass-line); border-radius: var(--r-card);
  background: var(--glass);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--sh);
  overflow: hidden;
}
#subMainView .dc-ph {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
  background: var(--glass-2);
}
#subMainView .dc-ph .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .22em; color: var(--brand); text-transform: uppercase; }
#subMainView .dc-ph h2 { font-size: 14px; font-weight: 700; color: var(--txt); letter-spacing: 0; }
#subMainView .dc-ph .n { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
#subMainView .dc-ph .n b { color: var(--brand); }

/* ---------- 服务索引节点 ---------- */
#subMainView .dc-nodes { display: flex; flex-direction: column; gap: 0; padding: 0; flex: none; overflow: visible; }
#subMainView .dc-node {
  position: relative; width: 100%; text-align: left; color: inherit;
  background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  display: flex; align-items: center; gap: 13px; padding: 13px 16px 13px 20px;
  min-height: 0; font-family: var(--sans); font-size: inherit; font-weight: inherit;
  cursor: pointer; transition: background .18s;
}
#subMainView .dc-node:last-child { border-bottom: 0; }
#subMainView .dc-node::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; height: auto; transform: none;
  border-radius: 0 3px 3px 0; opacity: 0; transition: opacity .18s;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
#subMainView .dc-node:hover { background: var(--brand-dim); }
#subMainView .dc-node:hover::before { opacity: .55; }
#subMainView .dc-node.on { background: var(--brand-dim); border-color: transparent; border-bottom-color: var(--line); font-weight: inherit; }
#subMainView .dc-node.on::before { opacity: 1; box-shadow: 0 0 16px var(--brand-dim); }
#subMainView .dc-node.off { opacity: .42; }
#subMainView .dc-node:disabled { cursor: not-allowed; }
#subMainView .dc-node .sn { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--dim); flex: none; width: 42px; }
#subMainView .dc-node .sname { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#subMainView .dc-node .sgo { flex: none; font-size: 11px; color: var(--dim); opacity: 1; transform: none; transition: transform .18s, color .18s; }
#subMainView .dc-node:hover .sgo { color: var(--brand); transform: translateX(3px); }
#subMainView .dc-node .badge {
  margin-left: auto; flex: none;
  font-size: 11px; font-weight: 700; min-width: 20px; text-align: center;
  padding: 1px 7px; border-radius: 10px;
  background: var(--danger); color: var(--txt);
}

/* ---------- 处置工作区正文 ---------- */
#subMainView .dc-work { min-width: 0; padding: 0; }
#subMainView .dc-work .card {
  background: none; border: 0; border-radius: 0; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  margin: 0; border-bottom: 1px solid var(--line);
}
#subMainView .dc-work .card:last-child { border-bottom: 0; }

/* ---------- 响应式（手机端单栏 + 横向滑动索引） ---------- */
@media (max-width: 767px) {
  #subMainView { padding-bottom: 12px; }
  #subMainView .dc-rail { height: 52px; min-height: 0; gap: 10px; padding: 0 14px; }
  #subMainView .dc-live { display: none; }
  #subMainView .dc-clock { display: none; }
  #subMainView .dc-id i { display: none; }
  #subMainView .dc-front { display: none; }
  #subMainView .dc-admin { padding: 6px 12px; font-size: 12px; }
  #subMainView .dc-body { grid-template-columns: minmax(0,1fr); gap: 14px; padding: 14px 14px 6px; }
  #subMainView .dc-indexrow { flex-direction: row; gap: 0; padding: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  #subMainView .dc-indexrow .dc-node { width: auto; flex: none; white-space: nowrap; min-height: 0; padding: 11px 15px; border-bottom: 0; border-right: 1px solid var(--line); }
  #subMainView .dc-indexrow .dc-node::before { top: auto; bottom: 0; left: 12px; right: 12px; width: auto; height: 2px; border-radius: 2px 2px 0 0; }
  #subMainView .dc-indexrow .dc-node .sn, #subMainView .dc-indexrow .dc-node .sgo { display: none; }
  #subMainView .dc-ph { padding: 11px 14px; }
  #subMainView .dc-ph .n { display: none; }
}

/* ================= UI 控制：区块索引 + 卡片折叠 ================= */
.pane-index {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 0 0 16px; padding: 10px 12px;
  background: var(--glass-2);
  border: 1px solid var(--glass-line);
  border-radius: 13px;
}
.pane-index .pane-index-k { font-size: 11.5px; color: var(--dim); letter-spacing: .08em; white-space: nowrap; }
.pane-index .pane-index-kw { width: 240px; max-width: 100%; min-height: 34px; font-size: 12.5px; }
.pane-index .chip-nav {
  cursor: pointer; font-family: inherit; font-size: 12px;
  color: var(--sub); background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-line); border-radius: 999px;
  padding: 6px 11px; min-height: 0; line-height: 1.3; transition: all .15s;
}
.pane-index .chip-nav:hover { color: var(--txt); border-color: rgba(56,225,255,.55); background: rgba(56,225,255,.1); }
.pane-index .chip-nav.folded { color: var(--dim); border-style: dashed; }
.pane-index .chip-nav.folded::before { content: "▸ "; }

/* 卡片可折叠：点击标题切换，折叠状态记忆在工作区上 */
.dc-work .pane > .card > h2 { cursor: pointer; user-select: none; }
.dc-work .pane > .card > h2::after {
  content: "▾"; flex: none; order: 30; font-size: 11px; color: var(--dim);
  transition: transform .18s; margin-left: 4px;
}
.dc-work .pane > .card.fold > h2::after { transform: rotate(-90deg); }
.dc-work .pane > .card.fold > h2 { margin-bottom: 0; }
.dc-work .pane > .card.fold > *:not(h2) { display: none !important; }
.dc-work .pane > .card.card-flash { animation: nwCardFlash 1.2s ease-out; }
@keyframes nwCardFlash {
  0%   { box-shadow: 0 0 0 2px rgba(56,225,255,.85), 0 0 34px -6px rgba(56,225,255,.9); }
  100% { box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 18px 40px -26px rgba(0,0,0,.9); }
}

/* 物品列表按分类分组的行 */
.it-cat-row td {
  background: rgba(56,225,255,.07) !important;
  color: #8CEBFF !important; font-size: 12px; letter-spacing: .08em;
  border-top: 1px solid rgba(56,225,255,.22) !important;
}
.it-cat-row td i { font-style: normal; color: var(--dim); }