/* ===================================================
   管理后台样式 · v3 彩色玻璃渐变
   =================================================== */
:root {
  --brand: #3d6bfa;
  --brand-l: #7592fb;
  --brand-d: #3258cd;
  --brand-rgb: 61, 107, 250;

  --ink: #1d2340;
  --ink-2: #4a5170;
  --ink-3: #5f6685;
  --focus-ring: #164ac4;
  --action-shade: rgba(9, 16, 36, .38);

  --glass: rgba(255, 255, 255, .55);
  --glass-hi: rgba(255, 255, 255, .68);
  --glass-lo: rgba(255, 255, 255, .42);
  --glass-blur: saturate(160%) blur(20px);

  --line: rgba(104, 114, 160, .16);
  --line-2: rgba(104, 114, 160, .3);

  --ok: #087a57;
  --ok-rgb: 14, 168, 115;
  --danger: #c43c30;
  --warn: #9a5a00;

  --radius: 22px;      /* 与用户上传页卡片圆角一致 */
  --r-inner: 15px;     /* 卡片内部小圆角（输入框 / 瓦片） */
  --shadow: 0 2px 8px rgba(64, 72, 140, .05), 0 14px 36px -16px rgba(64, 72, 140, .22);
  --shadow-hi: 0 4px 12px rgba(64, 72, 140, .08), 0 22px 50px -18px rgba(64, 72, 140, .3);
  --ease-spring: cubic-bezier(.22, 1.1, .36, 1);
  --ease-out: cubic-bezier(.2, .8, .3, 1);
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;

  /* 布局尺寸：随屏幕宽度自适应 */
  --side-w: 236px;
  --gutter: 24px;
  --content-max: 2040px;
}
@media (min-width: 1500px) {
  :root { --side-w: 256px; --gutter: 32px; }
}
@media (max-width: 860px) {
  :root { --side-w: 252px; --gutter: 14px; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* 大面积柔和彩色渐变底（霞光橙 + 暮紫 + 晨蓝） */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 560px at 60% -14%, rgba(var(--brand-rgb), .15), transparent 70%),
    radial-gradient(680px 560px at 6% 8%, rgba(255, 171, 145, .36), transparent 62%),
    radial-gradient(760px 620px at 96% 4%, rgba(167, 139, 250, .33), transparent 64%),
    radial-gradient(820px 680px at 88% 96%, rgba(122, 162, 255, .3), transparent 66%),
    radial-gradient(560px 560px at 2% 98%, rgba(255, 209, 178, .28), transparent 62%),
    linear-gradient(150deg, #fdf4ee 0%, #f6f1ff 46%, #e9f0ff 100%);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(255, 255, 255, .55); border: 1px solid var(--glass-hi); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
::selection { background: rgba(var(--brand-rgb), .2); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(100, 110, 160, .3); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 110, 160, .5); background-clip: content-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

.ta-r { text-align: right; }
.inline { display: inline-block; }
.muted-sm { font-size: 12px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.ok-t { color: var(--ok); }
.no-t { color: var(--danger); }

/* 焦点可见性（键盘导航） */
.btn:focus-visible, .nav-item:focus-visible, .tb-link:focus-visible,
.pg:focus-visible, .logout:focus-visible, .menu-btn:focus-visible,
.copy-btn:focus-visible, .se-op:focus-visible, .pi-btn:focus-visible,
.zoomable:focus-visible, .viewer-close:focus-visible, .pw-eye:focus-visible,
.ov-no-copy:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.zoomable:focus-visible { outline-offset: -4px; }
.viewer-close:focus-visible { outline-color: #fff; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }

/* 毛玻璃侧边栏 */
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0;
  width: var(--side-w); z-index: 40;
  background: rgba(255, 255, 255, .48);
  backdrop-filter: saturate(170%) blur(26px);
  -webkit-backdrop-filter: saturate(170%) blur(26px);
  border-right: 1px solid var(--glass-hi);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .3), 4px 0 24px -12px rgba(64, 72, 140, .15);
  display: flex; flex-direction: column;
  transition: transform .28s var(--ease-spring);
}
.brand {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 22px 18px 18px;
}
.brand-mark {
  width: 37px; height: 37px; border-radius: 12px;
  display: grid; place-items: center;
  background:
    linear-gradient(var(--action-shade), var(--action-shade)),
    linear-gradient(135deg, var(--brand-l), var(--brand));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 18px -6px rgba(var(--brand-rgb), .7);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { font-size: 14.5px; font-weight: 720; letter-spacing: .3px; color: var(--ink); }

.nav {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  height: 43px; padding: 0 12px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 13.8px;
  transition: background .18s, color .18s, box-shadow .18s;
}
.nav-item svg { width: 18px; height: 18px; opacity: .8; transition: .18s; }
.nav-item:hover { background: rgba(255, 255, 255, .6); color: var(--ink); box-shadow: 0 2px 10px -4px rgba(64, 72, 140, .2); }
.nav-item.active {
  background: rgba(var(--brand-rgb), .13);
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .22), 0 4px 14px -6px rgba(var(--brand-rgb), .35);
  color: var(--brand-d);
  font-weight: 680;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3.5px; height: 20px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brand-l), var(--brand));
  box-shadow: 0 0 12px rgba(var(--brand-rgb), .7);
}
.nav-item.active svg { opacity: 1; color: var(--brand-d); }

.side-foot {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 14px calc(15px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--glass-hi);
}
.side-user { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background:
    linear-gradient(var(--action-shade), var(--action-shade)),
    linear-gradient(135deg, var(--brand-l), var(--brand));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 10px -3px rgba(var(--brand-rgb), .6);
  color: #fff; font-size: 14px; font-weight: 650;
  text-transform: uppercase;
}
.side-user b { display: block; font-size: 13px; font-weight: 650; color: var(--ink); }
.side-user i { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); }
.logout {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--ink-3); transition: .16s;
}
.logout:hover { background: rgba(232, 82, 63, .12); color: var(--danger); }
.logout svg { width: 17px; height: 17px; }

.main {
  flex: 1; min-width: 0;
  margin-left: var(--side-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* 顶栏：超薄毛玻璃，滚动时渐变透出来 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .38);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--glass-hi);
}
.topbar-inner {
  width: 100%; max-width: var(--content-max); margin: 0 auto;
  height: 62px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gutter);
}
.topbar h1 { flex: 1; margin: 0; font-size: 17.5px; font-weight: 750; letter-spacing: .2px; color: var(--ink); }
.menu-btn {
  display: none;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--glass-hi); background: rgba(255, 255, 255, .55); color: var(--ink-2);
  place-items: center; cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }
.tb-link {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--glass-hi); border-radius: 11px;
  background: rgba(255, 255, 255, .5);
  color: var(--ink-2); font-size: 12.5px; font-weight: 600;
  box-shadow: 0 2px 8px -3px rgba(64, 72, 140, .15);
  transition: .16s;
}
.tb-link:hover { border-color: rgba(var(--brand-rgb), .4); color: var(--brand-d); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .1); }
.tb-link svg { width: 14px; height: 14px; }

.content {
  flex: 1;
  width: 100%; max-width: var(--content-max); margin: 0 auto;
  padding: 22px var(--gutter) 38px;
}
.page-footer {
  max-width: var(--content-max); width: 100%; margin: 0 auto;
  padding: 0 var(--gutter) 24px;
  font-size: 11.8px; color: var(--ink-3);
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  justify-content: center;
  text-align: center;
}
.page-footer b { font-weight: 650; color: var(--ink-2); }

.scrim {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(29, 35, 64, .4);
  opacity: 0; pointer-events: none; transition: opacity .24s;
}
.scrim.on { opacity: 1; pointer-events: auto; }

/* ---------- 统计卡（玻璃） ---------- */
.stat-row {
  display: grid; gap: 14px; margin-bottom: 17px;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  position: relative; overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-hi);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .5);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 17px 18px;
  transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s;
  cursor: pointer;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi), inset 0 1px 0 rgba(255, 255, 255, .5); }
.stat.on { border-color: rgba(var(--brand-rgb), .45); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .12), var(--shadow); }
.stat.on::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.5px;
  background: linear-gradient(180deg, var(--brand-l), var(--brand));
}
.stat-num { display: block; font-size: 27px; font-weight: 800; letter-spacing: .3px; line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat-label { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stat-ico {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .55);
}
.stat-ico svg { width: 20px; height: 20px; }
.stat-ico.s1 { background: rgba(var(--brand-rgb), .13); color: var(--brand-d); }
.stat-ico.s2 { background: rgba(255, 214, 150, .4); color: #d1830f; }
.stat-ico.s3 { background: rgba(157, 178, 255, .35); color: #4a6fd4; }
.stat-ico.s4 { background: rgba(151, 230, 195, .35); color: var(--ok); }

/* ---------- 面板（玻璃） ---------- */
.panel {
  background: var(--glass);
  border: 1px solid var(--glass-hi);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .5);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  margin-bottom: 17px;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 15px 19px;
  border-bottom: 1px solid var(--line);
}
.order-head-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 9px; flex-wrap: wrap; margin-left: auto;
}
.order-head-actions form { margin: 0; }
.ph-main { min-width: 0; }
.ph-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 卡头标题：圆角渐变图标底 + 标题（与用户上传页同一套语言） */
.card-title {
  display: flex; align-items: center; gap: 11px;
  min-width: 0;
  font-size: 15.5px; font-weight: 720; color: var(--ink);
}
.card-title .ticon {
  flex: none;
  width: 33px; height: 33px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(var(--brand-rgb), .14), rgba(var(--brand-rgb), .24));
  border: 1px solid rgba(var(--brand-rgb), .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
  color: var(--brand-d);
}
.card-title .ticon svg { width: 17px; height: 17px; }
.ph-text { min-width: 0; display: block; }
.ph-text b { display: block; font-weight: 720; letter-spacing: .2px; }
.ph-text i {
  display: block; margin-top: 2px;
  font-style: normal; font-size: 12.2px; font-weight: 400;
  color: var(--ink-3); line-height: 1.6;
}

/* 右侧步骤 / 计数胶囊 */
.step-no {
  flex: none;
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--glass-hi);
  padding: 4px 11px; border-radius: 999px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 37px; padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--action-shade), var(--action-shade)),
    linear-gradient(135deg, var(--brand-l), var(--brand));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .26), 0 6px 16px -7px rgba(var(--brand-rgb), .75);
  color: #fff;
  font-size: 13.2px; font-weight: 600;
  cursor: pointer;
  transition: transform .14s, box-shadow .18s, filter .18s, background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.965); }
.btn.primary {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 20px -7px rgba(var(--brand-rgb), .85);
}
.btn.primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 12px 26px -8px rgba(var(--brand-rgb), .95); transform: translateY(-1px); }
.btn.primary:active { transform: scale(.965); }
.btn.ghost {
  background: rgba(255, 255, 255, .5);
  border-color: var(--glass-hi); color: var(--ink-2);
  box-shadow: 0 2px 8px -3px rgba(64, 72, 140, .14);
}
.btn.ghost:hover { border-color: rgba(var(--brand-rgb), .45); color: var(--brand-d); filter: none; box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .1); background: rgba(255, 255, 255, .7); }
.btn.success {
  background:
    linear-gradient(var(--action-shade), var(--action-shade)),
    linear-gradient(135deg, #159268, #087a57);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 20px -7px rgba(var(--ok-rgb), .8);
}
.btn.danger-o { background: rgba(255, 255, 255, .5); border-color: rgba(232, 82, 63, .3); color: var(--danger); box-shadow: 0 2px 8px -3px rgba(64, 72, 140, .14); }
.btn.danger-o:hover { background: rgba(255, 235, 231, .7); border-color: rgba(232, 82, 63, .45); filter: none; }
.btn.danger-t { color: var(--danger); }
.btn.danger-t:hover { border-color: var(--danger); }
.btn.mini { height: 31px; padding: 0 12px; font-size: 12.4px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:hover { filter: none; transform: none; }

/* ---------- 筛选 ---------- */
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { position: relative; }
.search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--ink-3); pointer-events: none;
}
.search input {
  width: 260px; height: 38px;
  padding: 0 12px 0 35px;
  border: 1px solid var(--glass-hi); border-radius: 11px;
  background: rgba(255, 255, 255, .55); color: var(--ink);
  box-shadow: 0 2px 8px -3px rgba(64, 72, 140, .1);
  outline: none; transition: .16s;
}
.search input:focus { border-color: rgba(var(--brand-rgb), .5); background: rgba(255, 255, 255, .8); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .13); }
.search input::placeholder { color: var(--ink-3); }
.filters select {
  height: 38px; padding: 0 31px 0 12px;
  border: 1px solid var(--glass-hi); border-radius: 11px;
  background: rgba(255, 255, 255, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23767da0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--ink-2);
  appearance: none; -webkit-appearance: none;
  outline: none; cursor: pointer;
  box-shadow: 0 2px 8px -3px rgba(64, 72, 140, .1);
  transition: .16s;
}
.filters select:focus { border-color: rgba(var(--brand-rgb), .5); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .13); }

/* ---------- 表格 ---------- */
.bulk-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  min-height: 52px; padding: 8px 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .2);
}
.order-check {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); cursor: pointer;
}
.order-check input {
  width: 17px; height: 17px; margin: 0;
  accent-color: var(--brand); cursor: pointer;
}
.bulk-count {
  margin-right: auto;
  color: var(--ink-3); font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.order-head-select, .order-select-line {
  display: flex; align-items: flex-start; gap: 10px;
}
.order-head-select { align-items: center; }
.order-check { flex: none; min-width: 18px; min-height: 20px; }
.order-primary { min-width: 0; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 900px; }
.table td:first-child { min-width: 210px; }
.table .cell-tpl {
  max-width: 160px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.table .cell-nowrap { white-space: nowrap; }
.table th {
  text-align: left; font-weight: 650; font-size: 11.8px; color: var(--ink-3);
  letter-spacing: .04em;
  padding: 12px 17px; background: rgba(255, 255, 255, .32);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 14px 17px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .42); }
.table tbody tr.is-selected { background: rgba(var(--brand-rgb), .1); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .muted { color: var(--ink-3); font-size: 12.6px; }
.ono { font-weight: 680; font-size: 13.4px; color: var(--ink); word-break: break-all; transition: color .15s; }
.ono:hover { color: var(--brand-d); }
.sub { display: block; font-style: normal; font-size: 11.6px; color: var(--ink-3); margin-top: 2px; }
.sub.warn { color: var(--warn); }
.creator-cell { min-width: 135px; }
.order-creator {
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 0; line-height: 1.45;
}
.order-creator b {
  display: block; max-width: 145px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink); font-size: 12.5px; font-weight: 680;
}
.order-creator span {
  display: flex; align-items: center; gap: 5px;
  max-width: 145px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink-3); font-size: 10.8px;
}
.order-creator span i {
  flex: none; padding: 1px 5px; border-radius: 5px;
  font-style: normal; font-size: 9px; color: var(--brand-d);
  background: rgba(var(--brand-rgb), .1);
  border: 1px solid rgba(var(--brand-rgb), .15);
}
.order-creator.is-system b { color: var(--brand-d); }
.order-creator.is-missing b { color: var(--warn); }

.mini-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .5); overflow: hidden; width: 108px; }
.mini-bar.wide { width: 150px; }
.mini-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-l), var(--brand)); box-shadow: 0 0 8px rgba(var(--brand-rgb), .45); transition: width .4s; }
.mini-num { font-size: 11.6px; color: var(--ink-3); margin-left: 2px; font-variant-numeric: tabular-nums; }

/* 状态徽章：圆点 + 胶囊 */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px 4px 9px;
  border-radius: 999px; font-size: 11.8px; font-weight: 650;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .5);
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2.5px color-mix(in srgb, currentColor 18%, transparent);
}
.st-wait { background: rgba(232, 236, 246, .65); color: #5f6b80; }
.st-progress { background: rgba(255, 228, 188, .6); color: #b26f0a; }
.st-submitted { background: rgba(var(--brand-rgb), .13); color: var(--brand-d); }
.st-ok { background: rgba(170, 235, 205, .55); color: #0a7f56; }
.st-reject { background: rgba(255, 209, 202, .6); color: #c23c2a; }
.order-status-stack {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.retention-countdown {
  display: inline-flex; align-items: center; gap: 4px;
  max-width: 175px; padding: 3px 7px;
  border: 1px solid rgba(173, 116, 14, .16);
  border-radius: 8px;
  background: rgba(255, 232, 184, .45);
  color: #8b620f;
  font-size: 10.4px; font-weight: 620; line-height: 1.35;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.retention-countdown svg { flex: none; width: 12px; height: 12px; }
.retention-countdown.is-due {
  border-color: rgba(194, 60, 42, .16);
  background: rgba(255, 209, 202, .42);
  color: #b73a29;
}
.retention-countdown.is-disabled {
  border-color: var(--line);
  background: rgba(232, 236, 246, .55);
  color: var(--ink-3);
}

.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 17px;
}
.pg {
  height: 33px; padding: 0 15px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--glass-hi); border-radius: 10px;
  font-size: 12.8px; font-weight: 600; color: var(--ink-2);
  background: rgba(255, 255, 255, .5);
  box-shadow: 0 2px 8px -3px rgba(64, 72, 140, .12);
  transition: .16s;
}
.pg:hover { border-color: rgba(var(--brand-rgb), .45); color: var(--brand-d); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .1); }
.pg.disabled { opacity: .45; pointer-events: none; }
.pg-info { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.empty { padding: 62px 20px; text-align: center; color: var(--ink-3); }
.empty-art { width: 74px; height: 74px; margin: 0 auto 15px; color: rgba(118, 125, 160, .5); }
.empty-art svg { width: 100%; height: 100%; }
.empty p { margin: 0; font-size: 13.5px; }

/* ---------- 提示 ---------- */
.alert {
  padding: 12px 16px; border-radius: 14px;
  font-size: 13px; margin-bottom: 15px;
  border: 1px solid var(--glass-hi);
  box-shadow: var(--shadow);
  animation: rise .35s var(--ease-spring) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.alert.success { background: rgba(190, 240, 216, .55); color: #0a7350; }
.alert.error { background: rgba(255, 216, 209, .6); color: #b93c2b; }
.alert.warn { background: rgba(255, 233, 192, .6); color: #96660c; }
.alert.info { background: rgba(205, 220, 255, .55); color: #37559c; }

.warn-box {
  background: rgba(255, 240, 205, .55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-hi); border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .5);
  padding: 17px 19px; color: #8a6314; font-size: 13px;
}
.warn-box strong { display: block; margin-bottom: 6px; color: #7a5610; }
.warn-box p { margin: 0 0 8px; }
.warn-box pre {
  margin: 0; padding: 12px 14px;
  background: rgba(42, 35, 23, .92); color: #ffe3ab;
  border-radius: 11px; font-size: 12px; overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ---------- 表单 ---------- */
.form-body { padding: 19px; display: flex; flex-direction: column; gap: 16px; }
.form-body.tight { padding: 16px 17px; gap: 13px; }
.form-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 19px; border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .3);
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { display: block; }
.field > span,
.field > label {
  display: block; font-size: 12.8px; color: var(--ink-2);
  font-weight: 650; margin-bottom: 7px; letter-spacing: .1px;
}
.field .req { color: var(--danger); font-style: normal; }
.field input[type=text],
.field input:not([type]),
.field input[type=password],
.field input[type=number],
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--glass-hi); border-radius: 11px;
  background: rgba(255, 255, 255, .55); color: var(--ink);
  box-shadow: 0 2px 8px -3px rgba(64, 72, 140, .08);
  outline: none; transition: border-color .16s, box-shadow .16s, background .16s;
  resize: vertical;
}
.field select {
  appearance: none; -webkit-appearance: none;
  background: rgba(255, 255, 255, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23767da0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right: 34px; cursor: pointer;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(var(--brand-rgb), .5); background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .13);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field .hint { display: block; font-style: normal; font-size: 11.6px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.field input[type=file] {
  width: 100%; font-size: 12.5px; color: var(--ink-2);
  padding: 10px 13px; border: 1.5px dashed var(--line-2); border-radius: 11px;
  background: rgba(255, 255, 255, .4);
  transition: .16s;
}
.field input[type=file]:hover { border-color: var(--brand-l); background: rgba(255, 255, 255, .6); }

.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--brand); }

/* 分段控件 */
.seg {
  position: relative;
  display: inline-flex; background: rgba(255, 255, 255, .45);
  border: 1px solid var(--glass-hi); border-radius: 12px; padding: 3px;
}
.seg input,
.tpl-card input,
.fmt-chip input,
.color-chip input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
.seg label {
  padding: 7px 18px; border-radius: 9px;
  font-size: 13px; color: var(--ink-2); cursor: pointer; transition: .18s;
}
.seg label:hover { color: var(--ink); }
.seg input:focus-visible + label,
.tpl-card input:focus-visible + .tc-body,
.fmt-chip input:focus-visible + .fc-body,
.color-chip input:focus-visible + i {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
.seg input:checked + label {
  background: rgba(255, 255, 255, .9); color: var(--brand-d); font-weight: 680;
  box-shadow: 0 2px 8px -2px rgba(64, 72, 140, .25), 0 0 0 1px rgba(var(--brand-rgb), .15);
}

/* 模板选择卡 */
.tpl-picker { display: grid; gap: 11px; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
.tpl-card { position: relative; cursor: pointer; display: flex; }
.tc-body {
  display: flex; flex-direction: column; flex: 1;
  border: 1px solid var(--glass-hi); border-radius: 15px;
  background: rgba(255, 255, 255, .45);
  padding: 13px 15px; transition: .18s;
}
.tc-slots { margin-top: auto; }
.tpl-card:hover .tc-body { border-color: rgba(var(--brand-rgb), .4); background: rgba(255, 255, 255, .65); box-shadow: 0 6px 18px -8px rgba(var(--brand-rgb), .3); }
.tpl-card input:checked + .tc-body {
  border-color: rgba(var(--brand-rgb), .5);
  background: rgba(var(--brand-rgb), .08);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .12);
}
.tc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-top b { font-size: 13.4px; font-weight: 680; color: var(--ink); }
.tc-top em {
  font-style: normal; font-size: 11.5px; font-weight: 650; color: var(--brand-d);
  background: rgba(var(--brand-rgb), .12); padding: 2px 8px; border-radius: 7px; white-space: nowrap;
}
.tc-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  font-style: normal; font-size: 11.5px; color: var(--ink-2);
  background: rgba(255, 255, 255, .5); border: 1px solid var(--glass-hi);
  padding: 2px 9px; border-radius: 7px;
}
.chip.opt { color: var(--ink-3); border-style: dashed; }

/* ---------- 链接结果 ---------- */
.result-panel { border-color: rgba(var(--brand-rgb), .4); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .08), var(--shadow); }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 19px; border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.link-list li:hover { background: rgba(255, 255, 255, .4); }
.link-list li:last-child { border-bottom: 0; }
.ll-no { font-weight: 680; font-size: 13.2px; min-width: 160px; word-break: break-all; color: var(--ink); }
.ll-url { flex: 1; min-width: 200px; font-size: 12.2px; color: var(--ink-3); word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ll-act { display: flex; gap: 6px; }

/* ---------- 详情页 ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 17px; align-items: start; }
.detail-main, .detail-side { min-width: 0; }

.ov-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 19px 21px 15px; flex-wrap: wrap;
}
.ov-label { font-size: 12px; color: var(--ink-3); letter-spacing: .2px; }
.ov-no {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 20px; font-weight: 800; letter-spacing: .3px;
  margin: 4px 0 7px; word-break: break-all; color: var(--ink);
}
.ov-no-copy {
  appearance: none;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%; min-width: 0;
  margin: 0 -3px; padding: 1px 3px;
  border: 0; border-radius: 8px;
  background: transparent; color: inherit;
  font: inherit; letter-spacing: inherit; line-height: inherit; text-align: left;
  cursor: pointer;
  transition: color .16s, background .16s;
}
.ov-no-copy span { min-width: 0; word-break: break-all; }
.ov-no-copy svg {
  width: 16px; height: 16px; flex: none; opacity: .46;
  transition: opacity .16s, transform .16s;
}
.ov-no-copy:hover, .ov-no-copy:focus-visible {
  color: var(--brand-d); background: rgba(var(--brand-rgb), .07);
}
.ov-no-copy:hover svg, .ov-no-copy:focus-visible svg { opacity: 1; }
.ov-no-copy.is-copied {
  color: var(--ok); background: rgba(var(--ok-rgb), .1);
}
.ov-no-copy.is-copied svg { opacity: 1; transform: scale(1.06); }
.ov-sub { font-size: 12.4px; color: var(--ink-3); }
.ov-progress { text-align: right; }
.ring-num { font-size: 13px; color: var(--ink-3); margin-bottom: 7px; }
.ring-num b { font-size: 21px; color: var(--brand-d); font-weight: 800; font-variant-numeric: tabular-nums; }

.link-row { display: flex; gap: 9px; padding: 0 21px 19px; flex-wrap: wrap; }
.link-input {
  flex: 1; min-width: 220px; height: 38px;
  padding: 0 13px;
  border: 1px solid var(--glass-hi); border-radius: 11px;
  background: rgba(255, 255, 255, .5); color: var(--ink-2); font-size: 12.6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  outline: none; transition: .16s;
}
.link-input:focus { border-color: rgba(var(--brand-rgb), .5); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .12); }

.photo-grid {
  display: grid; gap: 15px; padding: 19px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.photo-item { min-width: 0; }
.pi-box {
  position: relative; aspect-ratio: 4 / 3;
  border-radius: 15px; overflow: hidden;
  background: rgba(255, 255, 255, .4); border: 1px solid var(--glass-hi);
  transition: box-shadow .2s, border-color .2s;
}
.photo-item:hover .pi-box { border-color: rgba(var(--brand-rgb), .35); box-shadow: var(--shadow-hi); }
/* 完整显示照片，不裁切、不变形，按原方向自动缩放 */
.pi-box img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-orientation: from-image;
  cursor: zoom-in;
}
/* 空位：用与上传页同款的彩色插图，底色跟随照片类型 */
.photo-item.is-empty .pi-box {
  border: 1.5px dashed var(--s-border, var(--line-2));
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), var(--s-bg, rgba(255, 255, 255, .4)));
}
.pi-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; color: var(--ink-3);
  padding: 12px;
}
.pi-empty .slot-illus {
  width: 92px; height: auto;
  filter: drop-shadow(0 4px 10px rgba(64, 72, 140, .12));
}
.pi-empty span { font-size: 11.8px; }
.pi-hover {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 7px; justify-content: center;
  padding: 24px 8px 9px;
  background: linear-gradient(transparent, rgba(20, 24, 48, .8));
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.pi-box:hover .pi-hover,
.pi-box:focus-within .pi-hover {
  opacity: 1;
  pointer-events: auto;
}
.pi-btn {
  border: 1px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .88);
  color: #232a48; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 9px; cursor: pointer;
  transition: .15s;
}
.pi-btn:hover { background: #fff; transform: translateY(-1px); }
.pi-btn.danger { color: var(--danger); }
.pi-del { display: inline; }
.pi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 2px 0; }
.pi-name { font-size: 12.8px; font-weight: 650; color: var(--ink); }
.pi-name .opt { font-style: normal; font-size: 10.5px; color: var(--ink-3); margin-left: 5px; }
.pi-meta { font-size: 11.4px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

.audit-box { padding: 17px 19px; }
.audit-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.reject-form { display: flex; gap: 8px; flex: 1; min-width: 280px; }
.reject-form input {
  flex: 1; height: 38px; padding: 0 13px;
  border: 1px solid var(--glass-hi); border-radius: 11px; outline: none;
  background: rgba(255, 255, 255, .55); color: var(--ink);
  transition: .16s;
}
.reject-form input:focus { border-color: rgba(232, 82, 63, .5); background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 4px rgba(232, 82, 63, .13); }

.side-list { padding: 7px 17px 13px; }
.sl-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
  font-size: 12.8px; color: var(--ink-3);
}
.sl-row:last-child { border-bottom: 0; }
.sl-row b { color: var(--ink); font-weight: 650; text-align: right; word-break: break-all; }
.side-btns { padding: 0 17px 17px; display: flex; flex-direction: column; gap: 10px; }

.timeline { list-style: none; margin: 0; padding: 11px 17px 17px; }
.timeline li { position: relative; padding: 0 0 16px 21px; }
.timeline li::before {
  content: ""; position: absolute; left: 4.5px; top: 15px; bottom: -2px;
  width: 1.5px;
  background: linear-gradient(180deg, var(--line-2), var(--line));
}
.timeline li:last-child::before { display: none; }
.timeline .dot {
  position: absolute; left: 0; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #b8c0d8; border: 2px solid rgba(255, 255, 255, .8); box-shadow: 0 0 0 1.5px var(--line-2);
}
.timeline .dot.t-upload { background: var(--brand); box-shadow: 0 0 0 1.5px rgba(var(--brand-rgb), .4); }
.timeline .dot.t-submit { background: var(--ok); box-shadow: 0 0 0 1.5px rgba(var(--ok-rgb), .35); }
.timeline .dot.t-audit { background: var(--warn); box-shadow: 0 0 0 1.5px rgba(224, 138, 18, .35); }
.timeline .dot.t-delete { background: var(--danger); box-shadow: 0 0 0 1.5px rgba(232, 82, 63, .35); }
.timeline p { margin: 0; font-size: 12.8px; line-height: 1.55; color: var(--ink); }
.timeline time { font-size: 11.3px; color: var(--ink-3); }
.tl-empty { padding-left: 0; color: var(--ink-3); font-size: 12.5px; }
.tl-empty::before { display: none; }

.danger-panel { border-color: rgba(232, 82, 63, .28); }

/* ---------- 模板列表 ---------- */
.tpl-list { padding: 6px 0; }
.tpl-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 16px 19px; border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.tpl-item:hover { background: rgba(255, 255, 255, .4); }
.tpl-item:last-child { border-bottom: 0; }
.tpl-item.off { opacity: .62; }
.ti-main { flex: 1; min-width: 240px; }
.ti-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ti-title b { font-size: 14px; font-weight: 720; color: var(--ink); }
.tag {
  font-style: normal; font-size: 11px; font-weight: 600; color: var(--ink-3);
  background: rgba(255, 255, 255, .5); border: 1px solid var(--glass-hi);
  padding: 2px 8px; border-radius: 7px;
}
.tag.brand { background: rgba(var(--brand-rgb), .12); color: var(--brand-d); border-color: transparent; }
.tag.off { background: rgba(255, 216, 209, .6); color: var(--danger); border-color: transparent; }
.tag.must { background: rgba(255, 228, 188, .6); color: #b26f0a; border-color: transparent; }
.ti-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.ti-act { display: flex; gap: 7px; flex-wrap: wrap; }

/* ---------- 上传位编辑器 ---------- */
.slot-editor { padding: 17px 19px; }
.se-list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 15px; }
.se-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--glass-hi); border-radius: 14px;
  background: rgba(255, 255, 255, .5);
  box-shadow: 0 2px 8px -3px rgba(64, 72, 140, .1);
  transition: border-color .18s, box-shadow .18s, background .18s;
  animation: seIn .28s var(--ease-spring) both;
}
.se-row:hover { border-color: rgba(var(--brand-rgb), .4); background: rgba(255, 255, 255, .68); box-shadow: 0 6px 16px -8px rgba(var(--brand-rgb), .3); }
@keyframes seIn { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.se-drag { color: rgba(118, 125, 160, .55); display: grid; place-items: center; flex: none; cursor: grab; }
.se-drag svg { width: 18px; height: 18px; }
.se-fields { flex: 1; display: grid; gap: 10px; grid-template-columns: 1.1fr 1.6fr .9fr 60px; align-items: end; }
.se-f { display: block; min-width: 0; }
.se-f i { display: block; font-style: normal; font-size: 11px; font-weight: 620; color: var(--ink-3); margin-bottom: 5px; }
.se-f input[type=text], .se-f input:not([type]), .se-f select {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--glass-hi); border-radius: 10px; outline: none;
  background: rgba(255, 255, 255, .6); color: var(--ink);
  transition: .16s;
}
.se-f select { appearance: none; -webkit-appearance: none; padding-right: 25px; cursor: pointer;
  background: rgba(255, 255, 255, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23767da0' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; }
.se-f input:focus, .se-f select:focus { border-color: rgba(var(--brand-rgb), .5); background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .13); }
.se-f.narrow { text-align: center; }
.se-f.narrow input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); margin-top: 8px; cursor: pointer; }
.se-ops { display: flex; gap: 5px; flex: none; }
.se-op {
  width: 29px; height: 29px; border-radius: 9px;
  border: 1px solid var(--glass-hi); background: rgba(255, 255, 255, .55); color: var(--ink-2);
  font-size: 13px; line-height: 1; cursor: pointer; transition: .15s;
}
.se-op:hover { border-color: rgba(var(--brand-rgb), .5); color: var(--brand-d); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .1); }
.se-op.del:hover { border-color: rgba(232, 82, 63, .5); color: var(--danger); box-shadow: 0 0 0 3px rgba(232, 82, 63, .1); }
.se-add { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding-top: 5px; border-top: 1px dashed var(--line); }
.se-add-label { font-size: 12.5px; color: var(--ink-3); margin-top: 11px; }
.se-add .btn { margin-top: 11px; }

.sample-box { margin-bottom: 11px; }
.sample-box img { max-width: 230px; border-radius: 12px; border: 1px solid var(--glass-hi); box-shadow: var(--shadow); margin-bottom: 9px; }

/* ---------- 图片格式选择 ---------- */
.fmt-picker { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); }
.fmt-chip { position: relative; cursor: pointer; display: flex; }
.fc-body {
  display: block; flex: 1;
  border: 1px solid var(--glass-hi); border-radius: 13px;
  background: rgba(255, 255, 255, .45);
  padding: 10px 13px 10px 36px;
  transition: .18s;
}
.fc-body::before {
  content: ""; position: absolute; left: 12px; top: 13px;
  width: 16px; height: 16px; border-radius: 5px;
  border: 1.5px solid var(--line-2); background: rgba(255, 255, 255, .7); transition: .18s;
}
.fc-body::after {
  content: ""; position: absolute; left: 17px; top: 17px;
  width: 5px; height: 9px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(45deg) scale(0); transition: transform .18s var(--ease-spring);
}
.fmt-chip:hover .fc-body { border-color: rgba(var(--brand-rgb), .4); background: rgba(255, 255, 255, .65); box-shadow: 0 4px 12px -6px rgba(var(--brand-rgb), .25); }
.fmt-chip input:checked + .fc-body {
  border-color: rgba(var(--brand-rgb), .5);
  background: rgba(var(--brand-rgb), .08);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .1);
}
.fmt-chip input:checked + .fc-body::before {
  background:
    linear-gradient(var(--action-shade), var(--action-shade)),
    linear-gradient(135deg, var(--brand-l), var(--brand));
  border-color: var(--brand-d);
}
.fmt-chip input:checked + .fc-body::after { transform: rotate(45deg) scale(1); }
.fc-body b { display: block; font-size: 13px; font-weight: 650; color: var(--ink); }
.fc-body em { display: block; font-style: normal; font-size: 11.3px; color: var(--ink-3); margin-top: 1px; }

/* ---------- 密码显示切换 ---------- */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px !important; }
.pw-eye {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 31px; height: 31px; border: 0; border-radius: 9px;
  background: none; color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
  transition: .15s;
}
.pw-eye:hover { background: rgba(255, 255, 255, .6); color: var(--brand-d); }
.pw-eye.on { color: var(--brand-d); }
.pw-eye svg { width: 17px; height: 17px; }

/* ---------- 颜色选择 ---------- */
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.color-chip { position: relative; cursor: pointer; }
.color-chip i {
  display: block; width: 37px; height: 37px; border-radius: 13px;
  background: var(--c); border: 2px solid rgba(255, 255, 255, .7);
  box-shadow: 0 2px 8px -2px rgba(64, 72, 140, .3);
  transition: .18s var(--ease-spring);
}
.color-chip:hover i { transform: translateY(-1px); }
.color-chip span { display: block; font-size: 11px; color: var(--ink-3); text-align: center; margin-top: 5px; }
.color-chip input:checked + i {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9) inset, 0 0 0 2.5px var(--c), 0 6px 14px -4px rgba(64, 72, 140, .4);
  transform: scale(1.1);
}
.color-chip input:checked ~ span { color: var(--ink); font-weight: 650; }

/* ---------- 图片查看器 & 提示 ---------- */
.viewer {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12, 14, 30, .88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 26px;
  animation: fade .2s both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 24px 70px -24px rgba(0, 0, 0, .85); }
.viewer-close {
  position: absolute; top: 18px; right: 22px;
  width: 39px; height: 39px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 16px; cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: .15s;
}
.viewer-close:hover { background: rgba(255, 255, 255, .26); }
.toast-wrap {
  position: fixed; left: 0; right: 0; top: 18px; z-index: 95;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 18px; border-radius: 13px;
  background: rgba(29, 35, 64, .85); color: #fff; font-size: 13px;
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -12px rgba(29, 35, 64, .5);
  animation: tIn .28s var(--ease-spring) both;
}
.toast.ok { background: rgba(11, 140, 95, .88); }
.toast.err { background: rgba(202, 54, 40, .88); }
.toast.hide { animation: tOut .2s both; }
@keyframes tIn { from { opacity: 0; transform: translateY(-14px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes tOut { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- 登录页（整页渐变 + 玻璃卡） ---------- */
.login-body { min-height: 100vh; }
.login-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.login-visual {
  position: relative; overflow: hidden;
  color: var(--ink);
  display: flex; align-items: center; padding: 64px;
}
/* 两颗缓慢漂浮的彩色光斑：fixed 定位横跨整个视口，自然融入全局极光，不会在分栏边缘被裁出硬边 */
.login-visual::before, .login-visual::after {
  content: ""; position: fixed; z-index: 0; border-radius: 50%;
  filter: blur(60px); pointer-events: none;
}
.login-visual::before {
  width: 56vw; height: 56vw; max-width: 760px; max-height: 760px;
  left: -12vw; top: -20vh;
  background: radial-gradient(circle at 42% 40%, rgba(255, 158, 128, .6), transparent 68%);
  animation: orb1 12s ease-in-out infinite;
}
.login-visual::after {
  width: 48vw; height: 48vw; max-width: 660px; max-height: 660px;
  left: 14vw; bottom: -24vh;
  background: radial-gradient(circle at 55% 50%, rgba(147, 122, 250, .55), transparent 70%);
  animation: orb2 14s ease-in-out infinite;
}
@keyframes orb1 { 50% { transform: translate(-34px, 38px) scale(1.08); } }
@keyframes orb2 { 50% { transform: translate(36px, -30px) scale(1.06); } }
.lv-inner { position: relative; z-index: 1; max-width: 430px; }
.lv-mark {
  display: inline-grid; place-items: center;
  width: 58px; height: 58px; border-radius: 17px;
  background: rgba(255, 255, 255, .55); border: 1px solid var(--glass-hi);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 14px 34px -12px rgba(64, 72, 140, .4);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--brand-d);
  margin-bottom: 24px;
}
.lv-mark svg { width: 30px; height: 30px; }
.login-visual h2 { margin: 0 0 13px; font-size: 30px; font-weight: 800; letter-spacing: .5px; color: var(--ink); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .login-visual h2 {
    background: linear-gradient(115deg, var(--brand-d) 5%, var(--brand-d) 52%, var(--brand) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.login-visual > .lv-inner > p { margin: 0 0 26px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.lv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.lv-list li {
  position: relative;
  padding: 11px 15px 11px 41px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid var(--glass-hi);
  box-shadow: 0 4px 14px -6px rgba(64, 72, 140, .18), inset 0 1px 0 rgba(255, 255, 255, .5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 13.4px; color: var(--ink-2); font-weight: 550;
}
.lv-list li::before {
  content: ""; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; border-radius: 50%;
  background:
    linear-gradient(var(--action-shade), var(--action-shade)),
    linear-gradient(135deg, var(--brand-l), var(--brand));
  box-shadow: 0 3px 8px -2px rgba(var(--brand-rgb), .6);
}
.lv-list li::after {
  content: ""; position: absolute; left: 17.5px; top: 50%;
  width: 8px; height: 4.5px; margin-top: -4px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.login-form {
  display: grid; place-items: center; padding: 40px 26px;
  position: relative; z-index: 1;
}
.lf-inner {
  width: 100%; max-width: 380px;
  background: var(--glass);
  border: 1px solid var(--glass-hi);
  border-radius: 26px;
  box-shadow: var(--shadow-hi), inset 0 1px 0 rgba(255, 255, 255, .55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 36px 32px 28px;
  animation: rise .5s var(--ease-spring) both;
}
.lf-inner h1 { margin: 0 0 7px; font-size: 25px; font-weight: 800; letter-spacing: .3px; color: var(--ink); }
.lf-sub { margin: 0 0 26px; font-size: 13.4px; color: var(--ink-3); }
.lf-inner .field { margin-bottom: 16px; }
.lf-inner .field input { min-height: 46px; border-radius: 12px; }
.lf-inner .btn { height: 48px; font-size: 15px; margin-top: 8px; letter-spacing: 3px; border-radius: 13px; }
.lf-foot {
  margin: 24px 0 0; text-align: center;
  font-size: 11.5px; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}

/* ---------- ICP 备案号 ---------- */
.icp { font-size: 11.2px; letter-spacing: .2px; }
.icp a {
  color: inherit; text-decoration: none;
  opacity: .82; transition: opacity .16s, color .16s;
}
.icp a:hover { opacity: 1; color: var(--brand-d); text-decoration: underline; }

/* ---------- 响应式 ---------- */
/* 大屏：整体放大一点，避免在 2K / 4K 屏上显得又小又空 */
@media (min-width: 1500px) {
  body { font-size: 14.5px; }
  .content { padding-top: 26px; }
  .stat { padding: 19px 21px; }
  .stat-num { font-size: 30px; }
  .stat-label { font-size: 13px; }
  .stat-ico { width: 46px; height: 46px; right: 17px; }
  .stat-ico svg { width: 22px; height: 22px; }
  .panel-head { padding: 18px 23px; }
  .card-title { font-size: 16.5px; }
  .card-title .ticon { width: 36px; height: 36px; border-radius: 12px; }
  .card-title .ticon svg { width: 18px; height: 18px; }
  .table th { padding: 13px 23px; font-size: 12.3px; }
  .table td { padding: 16px 23px; }
  .ono { font-size: 14px; }
  .form-body, .photo-grid, .slot-editor { padding: 23px; }
  .form-foot { padding: 17px 23px; }
  .search input { width: 330px; }
  .detail { grid-template-columns: minmax(0, 1fr) 370px; gap: 19px; }
  .brand-text { font-size: 15.5px; }
  .nav-item { height: 45px; font-size: 14.2px; }
}
@media (min-width: 1900px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
  .tpl-picker { grid-template-columns: repeat(auto-fill, minmax(305px, 1fr)); }
  .fmt-picker { grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); }
}
@media (max-width: 1100px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
}
@media (min-width: 1500px) {
  .lv-inner { max-width: 480px; }
  .login-visual h2 { font-size: 33px; }
  .login-visual > .lv-inner > p { font-size: 14.6px; }
  .lf-inner { max-width: 400px; }
  .lf-inner h1 { font-size: 27px; }
}
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form { min-height: 100vh; padding: 24px 16px; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(64, 72, 140, .3); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .content { padding: 17px 14px 42px; }
  .topbar-inner { padding: 0 14px; }
  .se-fields { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .search input { width: 100%; }
  .filters { width: 100%; }
  .search { flex: 1; min-width: 160px; }
}
/* 窄屏：筛选栏改成网格，表格改成卡片列表 */
@media (max-width: 720px) {
  .panel-head { padding: 13px 15px; gap: 10px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr auto; gap: 9px; width: 100%; }
  .filters .search { grid-column: 1 / -1; }
  .filters .search input { width: 100%; }
  .filters select { width: 100%; min-width: 0; }
  .filters.order-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-filters > * { width: 100%; min-width: 0; }
  .order-filters .btn { width: 100%; }
  .order-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
  .order-head-actions .btn { width: 100%; }
  .filters.audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filters > * { width: 100%; min-width: 0; }
  .audit-filters input[name="target_type"] { grid-column: 1 / -1; }
  .panel-head > .btn { width: 100%; }

  .table-wrap { overflow: visible; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table { min-width: 0; }
  .table thead { display: none; }
  .table tbody tr {
    border: 1px solid var(--glass-hi); border-radius: 15px;
    margin: 12px 14px; padding: 13px 15px;
    background: rgba(255, 255, 255, .5);
    box-shadow: var(--shadow);
  }
  .table tbody tr:hover { background: rgba(255, 255, 255, .65); }
  .table td {
    border: 0; padding: 6px 0;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
  }
  .table td::before {
    content: attr(data-label);
    flex: none; font-size: 12px; color: var(--ink-3);
  }
  .table td:first-child {
    min-width: 0; display: block;
    padding: 0 0 10px; margin-bottom: 7px;
    border-bottom: 1px dashed var(--line);
  }
  .bulk-bar { padding: 9px 14px; }
  .bulk-bar .btn { width: 100%; }
  .order-select-line { gap: 11px; }
  .table .cell-tpl { max-width: none; white-space: normal; text-align: right; }
  .creator-cell { min-width: 0; }
  .order-creator { align-items: flex-end; text-align: right; }
  .order-creator b, .order-creator span { max-width: 210px; }
  .order-status-stack { align-items: flex-end; }
  .table td.ta-r {
    justify-content: flex-end; flex-wrap: wrap;
    padding-top: 12px; margin-top: 6px; border-top: 1px dashed var(--line);
  }
  .table td.ta-r::before { display: none; }
  .table td.ta-r .btn { flex: 1; min-width: 84px; }
  .pager { padding: 11px 14px 17px; }

  /* 窄屏没有稳定 hover，照片操作始终可见并均分宽度。 */
  .pi-hover {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    display: grid;
    gap: 4px;
    padding: 20px 5px 6px;
    opacity: 1;
    pointer-events: auto;
  }
  .pi-btn {
    width: 100%;
    min-width: 0;
    padding: 6px 3px;
    line-height: 1.25;
  }
  .pi-del { display: block; min-width: 0; }
}
@media (max-width: 520px) {
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-num { font-size: 22px; }
  .stat-ico { width: 34px; height: 34px; right: 11px; }
  .stat-ico svg { width: 17px; height: 17px; }
  .se-fields { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 11px; padding: 15px; }
  .form-body { padding: 15px; }
  .link-list li { padding: 13px 15px; }
  .ll-no { min-width: 0; }
  .pi-foot { flex-direction: column; align-items: flex-start; gap: 1px; }
  .pi-meta { font-size: 10.8px; }
  .audit-row { flex-direction: column; align-items: stretch; }
  .reject-form { min-width: 0; }
  .ov-no { font-size: 18px; }
  .link-row { padding: 0 15px 15px; }
  .lf-inner { padding: 28px 22px 24px; }
}
@media (max-width: 380px) {
  .photo-grid { grid-template-columns: 1fr; }
}
@media (hover: none), (pointer: coarse) {
  .pi-hover {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---------- 深色模式（与用户上传页同一套暮蓝深空） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9ebf8;
    --ink-2: #aab0d0;
    --ink-3: #a1a7c8;
    --focus-ring: #bdc9ff;
    --ok: #75d8ad;
    --danger: #ff9b8f;
    --warn: #f0bd63;
    --glass: rgba(32, 37, 66, .55);
    --glass-hi: rgba(255, 255, 255, .12);
    --glass-lo: rgba(255, 255, 255, .07);
    --line: rgba(255, 255, 255, .1);
    --line-2: rgba(255, 255, 255, .22);
    --shadow: 0 2px 8px rgba(0, 0, 0, .25), 0 16px 40px -14px rgba(0, 0, 0, .6);
    --shadow-hi: 0 4px 12px rgba(0, 0, 0, .3), 0 26px 58px -18px rgba(0, 0, 0, .7);
  }
  body::before {
    background:
      radial-gradient(760px 500px at 55% -10%, rgba(var(--brand-rgb), .3), transparent 70%),
      radial-gradient(560px 500px at 10% 6%, rgba(158, 82, 58, .28), transparent 62%),
      radial-gradient(660px 540px at 92% 4%, rgba(101, 71, 196, .3), transparent 64%),
      radial-gradient(700px 600px at 85% 95%, rgba(50, 84, 190, .24), transparent 66%),
      linear-gradient(160deg, #181230 0%, #131731 50%, #0d1230 100%);
  }
  .sidebar { background: rgba(24, 28, 56, .5); box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06), 4px 0 24px -12px rgba(0, 0, 0, .5); }
  .topbar { background: rgba(20, 24, 48, .42); }
  .nav-item:hover { background: rgba(255, 255, 255, .07); box-shadow: none; }
  .nav-item.active { background: rgba(var(--brand-rgb), .22); color: #b9c6f8; }
  .nav-item.active svg, .tc-top em { color: #cbd5ff; }
  .brand-text, .side-user b { color: var(--ink); }

  /* 卡头 / 胶囊 / 图标底 */
  .card-title .ticon { background: rgba(var(--brand-rgb), .24); border-color: rgba(var(--brand-rgb), .32); color: #9db2ff; }
  .step-no, .tag { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); color: var(--ink-3); }
  .tag.brand { background: rgba(var(--brand-rgb), .22); color: #b9c6f8; }

  /* 表单 / 输入 */
  .field input, .field textarea, .field select,
  .se-f input, .se-f select, .search input, .filters select,
  .link-input, .reject-form input {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .14);
    color: var(--ink);
  }
  .field input::placeholder, .field textarea::placeholder, .search input::placeholder { color: rgba(205, 211, 235, .72); }
  .btn.ghost, .tb-link, .pg, .pi-btn, .se-op { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: var(--ink-2); }
  .tb-link:hover, .btn.ghost:hover, .ono:hover, .pg:hover,
  .se-op:hover, .pw-eye:hover, .pw-eye.on, .icp a:hover, .ring-num b {
    color: #cbd5ff;
  }
  .btn.ghost:hover { background: rgba(255, 255, 255, .13); }
  .seg { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
  .seg input:checked + label { background: rgba(var(--brand-rgb), .3); color: #cfd9ff; }

  /* 表格 / 列表 */
  .table th { background: rgba(255, 255, 255, .04); }
  .table tbody tr:hover, .tpl-item:hover, .link-list li:hover { background: rgba(255, 255, 255, .05); }
  .table tbody tr.is-selected { background: rgba(var(--brand-rgb), .18); }
  .bulk-bar { background: rgba(255, 255, 255, .035); }
  .stat { background: var(--glass); }
  .stat-ico.s1 { background: rgba(var(--brand-rgb), .22); color: #9db2ff; }
  .stat-ico.s2 { background: rgba(224, 138, 18, .22); color: #e8b45c; }
  .stat-ico.s3 { background: rgba(var(--brand-rgb), .18); color: #a9bcfb; }
  .stat-ico.s4 { background: rgba(var(--ok-rgb), .22); color: #6fd3a8; }

  /* 照片墙 */
  .pi-box { background: rgba(255, 255, 255, .05); }
  .photo-item.is-empty .pi-box { background: rgba(255, 255, 255, .04); }
  .pi-empty .slot-illus { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)) saturate(.9) brightness(.9); }
  .mini-bar, .progress { background: rgba(255, 255, 255, .1); }

  /* 提示条 */
  .alert.success { background: rgba(22, 70, 52, .4); color: #8adcb8; }
  .alert.error { background: rgba(90, 32, 24, .4); color: #f2a99d; }
  .alert.warn { background: rgba(88, 66, 20, .4); color: #e0bd6d; }
  .alert.info { background: rgba(36, 52, 105, .4); color: #adc4f6; }
  .warn-box { background: rgba(88, 62, 18, .32); border-color: rgba(240, 200, 130, .25); color: #e2bd77; }
  .warn-box strong { color: #eeb959; }
  .badge.st-wait { background: rgba(255, 255, 255, .08); color: var(--ink-3); }
  .badge.st-progress { background: rgba(224, 138, 18, .22); color: #e8b45c; }
  .badge.st-submitted { background: rgba(var(--brand-rgb), .22); color: #b9c6f8; }
  .badge.st-ok { background: rgba(var(--ok-rgb), .22); color: #8adcb8; }
  .badge.st-reject { background: rgba(232, 82, 63, .22); color: #f2a99d; }
  .retention-countdown {
    border-color: rgba(224, 189, 109, .2);
    background: rgba(88, 66, 20, .34);
    color: #e0bd6d;
  }
  .retention-countdown.is-due {
    border-color: rgba(242, 169, 157, .2);
    background: rgba(90, 32, 24, .34);
    color: #f2a99d;
  }
  .retention-countdown.is-disabled {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .06);
    color: var(--ink-3);
  }

  /* 登录页 */
  .lf-inner { background: var(--glass); }
  .lv-list li { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
  code { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); }
  .timeline li::before { background: rgba(255, 255, 255, .1); }
  .sl-row { border-bottom-color: rgba(255, 255, 255, .08); }
}

/* ---------- 无 backdrop-filter 的降级 ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar { background: #f7f5fc; }
  .topbar { background: rgba(250, 248, 253, .96); }
  .panel, .stat, .lf-inner { background: rgba(255, 255, 255, .94); }
  .tb-link, .btn.ghost, .pg, .search input, .filters select { background: #fff; }
  .field input, .field textarea, .field select, .se-f input, .se-f select { background: #fff; }
  .alert, .warn-box { background: #fff8ea; }
  .nav-item:hover, .table tbody tr:hover, .tpl-item:hover, .link-list li:hover { background: #f2f0fa; }
  @media (prefers-color-scheme: dark) {
    .sidebar { background: #191d3c; }
    .topbar { background: #161a38; }
    .panel, .stat, .lf-inner { background: #1d2242; }
  }
}

/* ---------- 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 显式数据库升级 ---------- */
.upgrade-body {
  min-height: 100vh;
  overflow-x: hidden;
}
.upgrade-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 52px) 16px;
}
.upgrade-dialog {
  width: min(100%, 760px);
  overflow: hidden;
  border: 1px solid var(--glass-hi);
  border-radius: 27px;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 30px 90px -30px rgba(37, 43, 88, .48), inset 0 1px 0 rgba(255, 255, 255, .72);
  backdrop-filter: saturate(170%) blur(28px);
  -webkit-backdrop-filter: saturate(170%) blur(28px);
  animation: upgradeRise .42s var(--ease-spring) both;
}
@keyframes upgradeRise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.upgrade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .2);
}
.upgrade-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.upgrade-mark {
  flex: none;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background:
    linear-gradient(var(--action-shade), var(--action-shade)),
    linear-gradient(135deg, var(--brand-l), var(--brand));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 9px 20px -8px rgba(var(--brand-rgb), .75);
}
.upgrade-mark svg { width: 22px; height: 22px; }
.upgrade-brand b {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upgrade-brand i {
  display: block;
  color: var(--ink-3);
  font-size: 11px;
  font-style: normal;
}
.upgrade-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(205, 137, 24, .22);
  border-radius: 99px;
  background: rgba(255, 232, 188, .58);
  color: var(--warn);
  font-size: 11.8px;
  font-weight: 680;
}
.upgrade-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e09a25;
  box-shadow: 0 0 0 4px rgba(224, 154, 37, .13);
}
.upgrade-content { padding: 25px 27px 27px; }
.upgrade-intro {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.upgrade-shield {
  flex: none;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--brand-rgb), .2);
  border-radius: 16px;
  background: rgba(var(--brand-rgb), .11);
  color: var(--brand-d);
}
.upgrade-shield svg { width: 26px; height: 26px; }
.upgrade-intro h1 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: clamp(22px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.25;
}
.upgrade-intro p {
  max-width: 620px;
  margin: 0;
  color: var(--ink-2);
  font-size: 13.2px;
  line-height: 1.8;
}
.upgrade-version {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}
.upgrade-version > div {
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid var(--glass-hi);
  border-radius: 14px;
  background: rgba(255, 255, 255, .4);
}
.upgrade-version span {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-3);
  font-size: 11px;
}
.upgrade-version b {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upgrade-version > svg {
  width: 21px;
  color: var(--brand);
}
.upgrade-section {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--glass-hi);
  border-radius: 16px;
  background: rgba(255, 255, 255, .3);
}
.upgrade-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
.upgrade-section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 720;
}
.upgrade-section-head span {
  color: var(--ink-3);
  font-size: 11px;
}
.upgrade-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.upgrade-check {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
.upgrade-check:nth-child(odd) { border-right: 1px solid var(--line); }
.upgrade-check:nth-last-child(-n + 2) { border-bottom: 0; }
.upgrade-check:nth-last-child(1):nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.upgrade-check > i {
  flex: none;
  width: 17px;
  height: 17px;
  position: relative;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(95, 102, 133, .13);
}
.upgrade-check.ok > i { background: rgba(var(--ok-rgb), .16); }
.upgrade-check.warn > i { background: rgba(224, 154, 37, .17); }
.upgrade-check.error > i { background: rgba(196, 60, 48, .14); }
.upgrade-check > i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 5px;
  height: 8px;
  border: solid var(--ink-3);
  border-width: 0 1.7px 1.7px 0;
  transform: rotate(45deg);
}
.upgrade-check.ok > i::after { border-color: var(--ok); }
.upgrade-check.warn > i::after,
.upgrade-check.error > i::after {
  left: 7.5px;
  top: 4px;
  width: 2px;
  height: 7px;
  border: 0;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 9px 0 -0.4px currentColor;
  transform: none;
}
.upgrade-check.warn > i { color: var(--warn); }
.upgrade-check.error > i { color: var(--danger); }
.upgrade-check b {
  display: block;
  color: var(--ink);
  font-size: 12.6px;
  font-weight: 680;
}
.upgrade-check p {
  margin: 2px 0 0;
  color: var(--ink-3);
  font-size: 11.3px;
  line-height: 1.55;
}
.upgrade-alert {
  margin-bottom: 17px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 12.3px;
  line-height: 1.7;
}
.upgrade-alert strong { display: block; margin-bottom: 2px; font-weight: 720; }
.upgrade-alert p { margin: 0; }
.upgrade-alert ul { margin: 5px 0 0; padding-left: 19px; }
.upgrade-alert.warn {
  border-color: rgba(205, 137, 24, .18);
  background: rgba(255, 233, 192, .48);
  color: #845607;
}
.upgrade-alert.error {
  border-color: rgba(196, 60, 48, .17);
  background: rgba(255, 216, 209, .5);
  color: #aa3829;
}
.upgrade-form {
  display: grid;
  gap: 15px;
  padding-top: 2px;
}
.upgrade-confirm {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
}
.upgrade-confirm input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand);
}
.upgrade-confirm b {
  display: block;
  color: var(--ink);
  font-size: 12.8px;
  font-weight: 680;
}
.upgrade-confirm small {
  display: block;
  color: var(--ink-3);
  font-size: 11.3px;
}
.upgrade-submit {
  min-height: 47px;
  margin-top: 1px;
  font-size: 14px;
  letter-spacing: .4px;
}
.upgrade-submit svg { width: 18px; height: 18px; }
.upgrade-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 22px calc(13px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .16);
  color: var(--ink-3);
  font-size: 11.5px;
}
.upgrade-foot b { color: var(--ink-2); font-weight: 650; }
.upgrade-foot form { margin: 0; }
.upgrade-exit {
  padding: 5px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.8px;
  cursor: pointer;
}
.upgrade-exit:hover { background: rgba(196, 60, 48, .1); color: var(--danger); }
.upgrade-confirm input:focus-visible,
.upgrade-exit:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 620px) {
  .upgrade-shell { place-items: start center; padding: 10px 8px; }
  .upgrade-dialog { border-radius: 21px; }
  .upgrade-head { padding: 14px 15px; }
  .upgrade-content { padding: 21px 16px 22px; }
  .upgrade-intro { gap: 12px; }
  .upgrade-shield { width: 43px; height: 43px; border-radius: 14px; }
  .upgrade-shield svg { width: 23px; height: 23px; }
  .upgrade-checks { grid-template-columns: 1fr; }
  .upgrade-check,
  .upgrade-check:nth-child(odd),
  .upgrade-check:nth-last-child(-n + 2) {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .upgrade-check:last-child { border-bottom: 0; }
  .upgrade-foot { padding-inline: 16px; }
}
@media (max-width: 420px) {
  .upgrade-pill { padding: 0 9px; }
  .upgrade-pill i { display: none; }
  .upgrade-mark { width: 35px; height: 35px; }
  .upgrade-brand b { max-width: 150px; }
  .upgrade-intro { display: block; }
  .upgrade-shield { margin-bottom: 12px; }
  .upgrade-version { grid-template-columns: 1fr; gap: 7px; }
  .upgrade-version > svg { margin: 0 auto; transform: rotate(90deg); }
  .upgrade-foot { align-items: flex-start; }
}
@media (prefers-color-scheme: dark) {
  .upgrade-dialog {
    background: rgba(29, 34, 64, .68);
    box-shadow: 0 32px 90px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .08);
  }
  .upgrade-head,
  .upgrade-foot { background: rgba(255, 255, 255, .025); }
  .upgrade-version > div,
  .upgrade-section { background: rgba(255, 255, 255, .045); }
  .upgrade-shield { color: #b9c8ff; background: rgba(var(--brand-rgb), .2); }
  .upgrade-pill {
    border-color: rgba(240, 189, 99, .2);
    background: rgba(92, 67, 19, .38);
    color: #e6bd71;
  }
  .upgrade-alert.warn {
    border-color: rgba(240, 189, 99, .18);
    background: rgba(88, 66, 20, .36);
    color: #e0bd6d;
  }
  .upgrade-alert.error {
    border-color: rgba(255, 155, 143, .18);
    background: rgba(90, 32, 24, .38);
    color: #f2a99d;
  }
  .upgrade-exit:hover { background: rgba(255, 155, 143, .1); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .upgrade-dialog { background: rgba(255, 255, 255, .97); }
  @media (prefers-color-scheme: dark) {
    .upgrade-dialog { background: #1d2242; }
  }
}

/* ---------- 页面跳转进度条（点击后立即反馈） ---------- */
.nav-progress {
  position: fixed; left: 0; top: 0; z-index: 120;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--brand-l), var(--brand));
  box-shadow: 0 0 10px rgba(var(--brand-rgb), .55);
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: 0; pointer-events: none;
}
.nav-progress.on {
  opacity: 1;
  animation: navProgress 8s cubic-bezier(.1, .7, .2, 1) forwards;
}
@keyframes navProgress {
  0% { transform: scaleX(0); }
  12% { transform: scaleX(.45); }
  100% { transform: scaleX(.92); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-progress.on { animation: none; transform: scaleX(.6); }
}
