/* ===========================================================
 * 安吉白茶防伪验证系统 · 管理后台
 * admin.css —— 品牌视觉（深绿 + 金 + 米白）
 * =========================================================== */

:root {
  /* 品牌色 */
  --deep:      #0C1510;
  --deep-2:    #0F1D16;
  --deep-3:    #14291E;
  --green-800: #12301F;
  --green-700: #1B4332;
  --green-600: #23604A;
  --green-500: #2F7D5F;
  --green-400: #4C9E7C;
  --green-100: #E4F0E9;

  --gold-700:  #96793F;
  --gold-600:  #B8975A;
  --gold-500:  #C9A96A;
  --gold-400:  #DCC495;
  --gold-200:  #EFE1BD;
  --gold-100:  #F7F0DC;

  /* 中性 */
  --cream:     #F6F4EC;
  --cream-2:   #EFEBDF;
  --surface:   #FFFFFF;
  --surface-2: #FBFAF5;
  --ink:       #16211C;
  --ink-2:     #46564E;
  --ink-3:     #7C8B83;
  --line:      #E4DFD1;
  --line-2:    #EFEBE1;

  /* 语义 */
  --ok:        #2F7D5F;
  --ok-bg:     #E4F0E9;
  --warn:      #C98A1B;
  --warn-bg:   #FBF1DC;
  --danger:    #B3382C;
  --danger-bg: #FBEAE7;
  --info:      #3B6E9E;
  --info-bg:   #E8F0F8;

  --shadow-sm: 0 1px 2px rgba(12, 21, 16, .05), 0 2px 6px rgba(12, 21, 16, .04);
  --shadow-md: 0 2px 6px rgba(12, 21, 16, .06), 0 10px 26px rgba(12, 21, 16, .07);
  --shadow-lg: 0 12px 40px rgba(12, 21, 16, .16);

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --side-w: 234px;
  --top-h: 62px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #D5CFC0; border-radius: 9px; border: 2px solid var(--cream); }
::-webkit-scrollbar-thumb:hover { background: #BFB7A4; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== 布局 ===================== */
.layout { display: flex; min-height: 100vh; }

.side {
  width: var(--side-w);
  flex: 0 0 var(--side-w);
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(201, 169, 106, .10), transparent 60%),
    linear-gradient(180deg, var(--deep) 0%, var(--deep-2) 46%, var(--deep-3) 100%);
  color: #D8E3DC;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.side::after {
  content: "";
  position: absolute; inset: 0 0 0 auto; width: 1px;
  background: linear-gradient(180deg, rgba(201,169,106,.35), rgba(201,169,106,0) 40%, rgba(201,169,106,.12));
}

.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(201, 169, 106, .14);
}
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: linear-gradient(145deg, var(--gold-400), var(--gold-600));
  display: flex; align-items: center; justify-content: center;
  color: #10261A; font-weight: 800; font-size: 17px;
  letter-spacing: -.5px;
  box-shadow: 0 4px 12px rgba(201, 169, 106, .28);
}
.brand-txt { min-width: 0; }
.brand-txt b { display: block; font-size: 15px; color: #F1F6F2; letter-spacing: .5px; font-weight: 600; }
.brand-txt span { display: block; font-size: 11px; color: var(--gold-500); letter-spacing: 1.6px; text-transform: uppercase; }

.nav { flex: 1; overflow-y: auto; padding: 12px 0 20px; }
.nav-group { padding: 14px 22px 6px; font-size: 11px; color: #6E8478; letter-spacing: 1.4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 12px; padding: 9px 12px;
  border-radius: 8px; cursor: pointer;
  color: #B9C9C0; font-size: 13.5px;
  transition: background .16s, color .16s;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .045); color: #EDF4EF; }
.nav-item.on { background: linear-gradient(90deg, rgba(201, 169, 106, .18), rgba(201, 169, 106, .04)); color: #F4F8F5; font-weight: 600; }
.nav-item.on::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--gold-500);
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-item.on svg { opacity: 1; color: var(--gold-500); }
.nav-badge {
  margin-left: auto; font-size: 10.5px; padding: 1px 6px; border-radius: 20px;
  background: rgba(179, 56, 44, .22); color: #F0A79E; font-weight: 600;
}
.nav-item.on .nav-badge { background: var(--danger); color: #fff; }

.side-foot { padding: 14px 18px 18px; border-top: 1px solid rgba(201,169,106,.14); font-size: 11px; color: #6E8478; }
.side-foot .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #4C9E7C; margin-right: 6px; vertical-align: 1px; }
.side-foot .dot.mock { background: var(--gold-500); }

/* ===================== 主区 ===================== */
.main { flex: 1; min-width: 0; margin-left: var(--side-w); display: flex; flex-direction: column; }

.top {
  height: var(--top-h); flex: none;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 30;
}
.crumb { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.crumb b { color: var(--ink); font-weight: 600; font-size: 15px; }
.crumb .sep { color: var(--line); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.mode-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 10px; border-radius: 20px;
  background: var(--gold-100); color: var(--gold-700); border: 1px solid var(--gold-200);
  font-weight: 600;
}
.mode-pill.live { background: var(--ok-bg); color: var(--ok); border-color: #C9E2D5; }

.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 30px; cursor: pointer; transition: background .15s; }
.user-chip:hover { background: var(--cream-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, var(--green-600), var(--green-800));
  color: var(--gold-300); display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700;
}
.user-chip b { font-size: 13px; font-weight: 600; }
.user-chip small { display: block; font-size: 11px; color: var(--ink-3); line-height: 1.2; }

.content { padding: 22px 24px 40px; flex: 1; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 19px; letter-spacing: .3px; }
.page-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.page-head .grow { flex: 1; }

/* ===================== 卡片 ===================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
}
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head h3::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--gold-500), var(--green-600)); }
.card-head .grow { flex: 1; }
.card-head .sub { font-size: 12px; color: var(--ink-3); }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 14px; }
.card-body.flush { padding: 0; }

/* ===================== KPI ===================== */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.kpi::after {
  content: ""; position: absolute; right: -18px; top: -18px; width: 78px; height: 78px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,169,106,.13), transparent 70%);
}
.kpi .lbl { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 27px; font-weight: 700; letter-spacing: -.6px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.kpi .foot { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.kpi .up { color: var(--ok); font-weight: 600; }
.kpi .down { color: var(--danger); font-weight: 600; }
.kpi.accent { background: linear-gradient(150deg, #12301F 0%, #0C1510 100%); border-color: #1B4332; }
.kpi.accent .lbl { color: #9FB6A9; }
.kpi.accent .val { color: var(--gold-300); }
.kpi.accent .val small { color: #9FB6A9; }
.kpi.accent .foot { color: #8AA396; }
.kpi.accent::after { background: radial-gradient(circle, rgba(201,169,106,.20), transparent 70%); }

/* ===================== 栅格 ===================== */
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c2-13 { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); }
.grid.c2-31 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.grid + .grid, .card + .card, .grid + .card, .card + .grid { margin-top: 16px; }

/* ===================== 图表 ===================== */
.chart { width: 100%; display: block; overflow: visible; }
.chart .gridline { stroke: var(--line-2); stroke-width: 1; }
.chart .axis-txt { fill: var(--ink-3); font-size: 10.5px; }
.chart .bar { transition: opacity .15s; }
.chart .bar:hover { opacity: .78; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.bar-list { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 54px; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-row .nm { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .tk { height: 8px; border-radius: 20px; background: var(--cream-2); overflow: hidden; }
.bar-row .tk i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--green-500), var(--green-700)); }
.bar-row .vv { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-wrap .legend { flex-direction: column; gap: 9px; }
.donut-center { text-anchor: middle; }
.donut-center .n { font-size: 20px; font-weight: 700; fill: var(--ink); }
.donut-center .t { font-size: 10px; fill: var(--ink-3); }

/* ===================== 表格 ===================== */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th {
  text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12px;
  padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tb td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb tbody tr { transition: background .13s; }
table.tb tbody tr:hover { background: #FBFAF4; }
table.tb tbody tr:last-child td { border-bottom: none; }
table.tb .num { font-variant-numeric: tabular-nums; }
table.tb .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: .2px; }
table.tb .muted { color: var(--ink-3); }
table.tb .nowrap { white-space: nowrap; }
table.tb .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===================== 标签 / 徽章 ===================== */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; padding: 2px 8px; border-radius: 20px;
  background: var(--cream-2); color: var(--ink-2); font-weight: 600; white-space: nowrap;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.gold { background: var(--gold-100); color: var(--gold-700); }
.tag .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.lvl { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12px; }
.lvl i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lvl.l1 { color: var(--ink-3); }
.lvl.l2 { color: var(--warn); }
.lvl.l3 { color: var(--danger); }

/* ===================== 按钮 ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .06s;
}
.btn:hover { background: var(--surface-2); border-color: #D5CFC0; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: linear-gradient(180deg, var(--green-600), var(--green-700)); border-color: var(--green-700); color: #EAF4EE; box-shadow: 0 1px 2px rgba(27,67,50,.25); }
.btn.primary:hover { background: linear-gradient(180deg, var(--green-500), var(--green-600)); }
.btn.gold { background: linear-gradient(180deg, var(--gold-500), var(--gold-600)); border-color: var(--gold-600); color: #22260F; font-weight: 600; }
.btn.gold:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--cream-2); }
.btn.danger { color: var(--danger); border-color: #EBC9C4; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.sm { height: 27px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { height: 42px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn.block { width: 100%; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.seg { display: inline-flex; background: var(--cream-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button {
  border: 0; background: transparent; cursor: pointer; padding: 5px 13px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-2); font-weight: 500; transition: all .15s;
}
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ===================== 表单 ===================== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field > label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field > label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 88px; padding: 9px 12px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237C8B83' stroke-width='2.2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(47, 125, 95, .12); }
.input::placeholder, .textarea::placeholder { color: #A9B3AD; }
.input.plain { border-color: transparent; background: transparent; box-shadow: none; padding-left: 0; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 34px; width: 244px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 11.5px; color: var(--ink-3); }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; }
.switch input { display: none; }
.switch .tk { width: 38px; height: 21px; border-radius: 20px; background: #D5CFC0; position: relative; transition: background .18s; flex: none; }
.switch .tk::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform .18s; }
.switch input:checked + .tk { background: var(--green-600); }
.switch input:checked + .tk::after { transform: translateX(17px); }

/* ===================== 分页 ===================== */
.pager { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); }
.pager .grow { flex: 1; }
.pager button {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--ink-2);
}
.pager button:hover:not([disabled]) { background: var(--cream-2); }
.pager button[disabled] { opacity: .45; cursor: not-allowed; }
.pager button.on { background: var(--green-700); border-color: var(--green-700); color: #fff; font-weight: 600; }

/* ===================== 弹层 ===================== */
.mask {
  position: fixed; inset: 0; background: rgba(9, 17, 13, .48);
  backdrop-filter: blur(3px); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.mask.on { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 560px; max-height: 86vh; overflow: hidden;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateY(10px) scale(.985); transition: transform .2s cubic-bezier(.2,.8,.3,1);
}
.mask.on .modal { transform: none; }
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-head .grow { flex: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.x-btn { width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent; cursor: pointer; color: var(--ink-3); display: flex; align-items: center; justify-content: center; }
.x-btn:hover { background: var(--cream-2); color: var(--ink); }

/* ===================== 提示条 ===================== */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  min-width: 236px; max-width: 380px; padding: 11px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  font-size: 13px; display: flex; align-items: flex-start; gap: 9px;
  animation: toastIn .22s cubic-bezier(.2,.8,.3,1);
}
.toast.out { animation: toastOut .2s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(18px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }
.toast .ic { width: 18px; height: 18px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--green-600); margin-top: 1px; }
.toast.err .ic { background: var(--danger); }
.toast.warn .ic { background: var(--warn); }

.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); }
.empty svg { width: 42px; height: 42px; opacity: .35; margin-bottom: 10px; }
.empty p { margin: 0; font-size: 13px; }

.skeleton { background: linear-gradient(90deg, #F1EEE4 25%, #F7F5EE 37%, #F1EEE4 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-row { height: 14px; margin-bottom: 12px; }

/* ===================== 详情描述列表 ===================== */
.dl { display: grid; grid-template-columns: 108px 1fr; gap: 10px 14px; font-size: 13px; }
.dl dt { color: var(--ink-3); }
.dl dd { margin: 0; color: var(--ink); word-break: break-all; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 15px; font-size: 12.5px; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--green-500); }
.tl-item:first-child::before { border-color: var(--gold-500); background: var(--gold-100); }
.tl-item .tm { color: var(--ink-3); font-size: 11.5px; }
.tl-item .tx { color: var(--ink); }

.code-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.code-chips .chip {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  padding: 3px 9px; border-radius: 6px; background: var(--cream-2); color: var(--ink-2);
  border: 1px solid var(--line);
}

/* ===================== 前台内容 / 溯源编辑 ===================== */
.kv-row { display: grid; grid-template-columns: 120px 1fr 32px; gap: 8px; margin-bottom: 8px; align-items: center; }
.preview-frame {
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2);
}
.preview-frame .bar { display: flex; align-items: center; gap: 6px; padding: 7px 11px; background: var(--cream-2); font-size: 11.5px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.preview-frame .bar i { width: 9px; height: 9px; border-radius: 50%; background: #D9D3C4; }
.preview-frame iframe { width: 100%; height: 460px; border: 0; background: #fff; display: block; }
.preview-frame .pf-body { position: relative; }
.preview-frame .pf-body iframe { width: 100%; height: 460px; border: 0; background: #fff; display: block; }
.pf-miss { padding: 44px 24px; text-align: center; color: var(--ink-3); }
.pf-miss svg { width: 38px; height: 38px; opacity: .35; margin-bottom: 10px; }
.pf-miss p { margin: 0 0 6px; font-size: 13px; }
.pf-miss .mono { background: var(--cream-2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* ===================== 登录页 ===================== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(70% 55% at 78% 18%, rgba(201, 169, 106, .16), transparent 62%),
    radial-gradient(90% 70% at 12% 88%, rgba(35, 96, 74, .34), transparent 60%),
    linear-gradient(150deg, #0C1510 0%, #102019 52%, #0B1310 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ""; position: absolute; inset: -30% -10%;
  background: repeating-linear-gradient(115deg, transparent 0 38px, rgba(201,169,106,.045) 38px 39px);
  pointer-events: none;
}
.login-card {
  position: relative; width: 100%; max-width: 880px;
  display: grid; grid-template-columns: 1.05fr 1fr;
  background: rgba(255, 255, 255, .97);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .42);
  border: 1px solid rgba(201, 169, 106, .28);
}
.login-art {
  background:
    radial-gradient(110% 70% at 20% 12%, rgba(201, 169, 106, .17), transparent 60%),
    linear-gradient(160deg, #12301F 0%, #0C1510 100%);
  color: #DCE7DF; padding: 40px 34px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.login-art::after {
  content: ""; position: absolute; right: -70px; bottom: -70px; width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,169,106,.16), transparent 68%);
}
.login-art .lg { display: flex; align-items: center; gap: 11px; margin-bottom: 30px; }
.login-art h1 { font-size: 23px; margin: 0 0 10px; letter-spacing: .5px; color: #F3F8F4; line-height: 1.4; }
.login-art .lead { font-size: 13px; color: #A7BCAF; line-height: 1.85; margin: 0 0 auto; }
.login-art .feats { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 11px; }
.login-art .feats li { font-size: 12.5px; color: #C4D6C9; display: flex; align-items: center; gap: 9px; }
.login-art .feats svg { width: 15px; height: 15px; color: var(--gold-500); flex: none; }
.login-art .ver { position: relative; margin-top: 26px; font-size: 11px; color: #6F887A; letter-spacing: .6px; }

.login-form { padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { margin: 0 0 5px; font-size: 19px; }
.login-form .sub { font-size: 12.5px; color: var(--ink-3); margin: 0 0 22px; }
.login-form .input { height: 42px; border-radius: 10px; }
.login-form .field > label { font-size: 12.5px; }
.login-tip {
  margin-top: 16px; font-size: 12px; color: var(--gold-700);
  background: var(--gold-100); border: 1px solid var(--gold-200);
  padding: 9px 12px; border-radius: 9px; line-height: 1.7;
}
.login-err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin-top: 2px; }

/* ===================== 响应式 ===================== */
.side-toggle { display: none; }
@media (max-width: 1080px) {
  .grid.c2-13, .grid.c2-31, .grid.c3 { grid-template-columns: 1fr; }
  .grid.c2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  :root { --side-w: 0px; }
  .side { transform: translateX(-234px); transition: transform .24s; width: 234px; flex-basis: 234px; }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .side-toggle { display: inline-flex; }
  .crumb .sep, .crumb .parent { display: none; }
  .login-card { grid-template-columns: 1fr; max-width: 420px; }
  .login-art { display: none; }
  .search .input { width: 150px; }
  .content { padding: 16px 14px 34px; }
  .top { padding: 0 14px; }
}

/* ======================= 围栏激活管控（专利一） ======================= */
.kpi.danger { border-color: #EBC9C4; }
.kpi.danger .val { color: var(--danger); }

.fmap { width: 100%; display: block; user-select: none; }
.fmap-town { fill: var(--ink-3); font-size: 15px; letter-spacing: 2px; }
.fmap-name { font-size: 14px; font-weight: 600; }
.fmap-pt { fill: var(--ink-3); font-size: 11px; font-weight: 700; }
.fmap-wrap { max-height: 520px; overflow: auto; }

.fring { width: 96px; height: 96px; }
.fring-v { fill: var(--ink); font-size: 15px; font-weight: 700; }
.fring-s { fill: var(--ink-3); font-size: 8.5px; }

.fuse-calc {
  margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: var(--cream-2); font-size: 13px; color: var(--ink-2);
}
.fuse-calc b { color: var(--gold-700); }
.fuse-trip { border-color: #EBC9C4 !important; box-shadow: 0 0 0 3px rgba(201,105,91,.07); }

.sim-verdict {
  padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 700;
}
.sim-verdict.ok { background: var(--ok-bg); color: var(--ok); }
.sim-verdict.no { background: var(--danger-bg); color: var(--danger); }

.nav-badge.danger { background: var(--danger); color: #fff; }

/* ======================= 转发链路溯源（专利二） ======================= */
.nav-badge.gold { background: var(--gold-700); color: #fff; }
.gold-t { color: var(--gold-700); font-weight: 600; }

.chain-link { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; padding: 10px 14px; border-radius: 10px; background: var(--cream-2); }

.cn-wrap { display: flex; flex-direction: column; margin-top: 12px; }
.cn-node {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
}
.cn-node.pending { border-style: dashed; border-color: #E3C89A; background: #FDF9F0; }
.cn-node.done { border-color: #BFD8CA; }
.cn-seq {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #12301F; color: var(--gold-300); font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.cn-node.pending .cn-seq { background: var(--gold-700); color: #fff; }
.cn-main { flex: 1; min-width: 0; }
.cn-main b { font-size: 13.5px; display: block; }
.cn-main small { color: var(--ink-3); font-size: 11.5px; }
.cn-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cn-side small { font-size: 11px; }
.cn-arrow {
  display: flex; align-items: center; gap: 8px; height: 26px; padding-left: 46px;
  color: var(--ink-3); font-size: 11px; position: relative;
}
.cn-arrow::before { content: ''; width: 2px; height: 100%; background: var(--line-2); border-radius: 2px; }
.cn-arrow span { background: var(--cream-2); border-radius: 20px; padding: 1px 10px; }

.pv-card { border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 20px; background: linear-gradient(160deg, #FBFAF5, #F3F1E8); }
.pv-title { margin: 0 0 2px; font-size: 16px; font-weight: 700; color: #12301F; }
.pv-step { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; }
.pv-step b { font-size: 13.5px; }
.pv-step small { margin-left: auto; }
.pv-step.me { border-color: #BFD8CA; background: #F0F7F2; }
