/* ============================================================
   运输运营台账 · 后台
   设计要点：1px 细线代替阴影 · 数字 tabular 对齐 ·
            单一工业蓝，橙色只用于预警 · 车牌用牌照样式 chip
   ============================================================ */

:root {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --surface-3: #F0F3F7;
  --line: #E4E9F0;
  --line-2: #D2DAE6;
  --ink: #16202E;
  --ink-2: #55637A;
  --ink-3: #8B96A8;
  --ink-4: #AAB4C2;

  --brand: #1B58D9;
  --brand-ink: #1446AE;
  --brand-soft: #EDF3FE;
  --brand-line: #C7D8F7;

  --ok: #0F7A4A;      --ok-soft: #E7F5EE;      --ok-line: #B9E2CD;
  --warn: #A65A06;    --warn-soft: #FDF2E3;    --warn-line: #F3DCB4;
  --danger: #B8322A;  --danger-soft: #FCEEED;  --danger-line: #F3C9C5;
  --neutral: #55637A; --neutral-soft: #EEF1F5;

  --plate-bg: #FBEFD0;
  --plate-ink: #5B4200;
  --plate-line: #E8D8A6;

  --r: 8px;
  --r-sm: 6px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow-sm: 0 1px 2px rgba(16, 32, 46, .04);
  --shadow-lg: 0 12px 36px rgba(16, 32, 46, .14);
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
svg.ic { width: 16px; height: 16px; flex: none; stroke-width: 1.9; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ============================================================
   骨架布局
   ============================================================ */
.shell { display: grid; grid-template-columns: 226px 1fr; height: 100%; }

/* ---------- 侧边栏 ---------- */
.side {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow: hidden;
}
.side-brand {
  height: 56px; display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-bottom: 1px solid var(--line); flex: none;
}
.side-brand .mark {
  width: 28px; height: 28px; border-radius: 6px; flex: none;
  background: var(--brand); color: #fff; display: grid; place-items: center;
}
.side-brand .mark svg { width: 16px; height: 16px; }
.side-brand b { display: block; font-size: 14px; font-weight: 650; line-height: 1.25; }
.side-brand span { display: block; font-size: 10.5px; letter-spacing: .09em; color: var(--ink-4); }
/* 品牌区可点击：返回网站首页 */
a.side-brand { color: inherit; text-decoration: none; transition: background .15s var(--ease); }
a.side-brand:hover { background: var(--surface-3); }
.side-brand .txt { flex: 1; min-width: 0; }
.side-brand .brand-home { width: 15px; height: 15px; color: var(--ink-4); transition: color .15s var(--ease); }
a.side-brand:hover .brand-home { color: var(--brand); }

.side-scroll { flex: 1; overflow-y: auto; padding: 12px 10px 16px; }
.nav-group { padding: 12px 8px 6px; font-size: 11px; letter-spacing: .1em; color: var(--ink-4); font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; margin-bottom: 1px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--ink-2); font-size: 13.5px; text-align: left;
  cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-item:hover { background: var(--surface-3); color: var(--ink); }
.nav-item svg.ic { color: var(--ink-3); }
.nav-item.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav-item.on svg.ic { color: var(--brand); }
.nav-item .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 600;
  display: grid; place-items: center; font-family: var(--mono);
}
.nav-badge.cool { background: var(--neutral-soft); color: var(--ink-2); }

.side-foot { border-top: 1px solid var(--line); padding: 10px; flex: none; }
.side-user {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm);
  background: var(--surface-2); cursor: pointer; transition: background .15s var(--ease);
}
.side-user:hover { background: var(--surface-3); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600;
}
.side-user .info { min-width: 0; flex: 1; }
.side-user .nm { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .rl { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 主区 ---------- */
.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 56px; flex: none; background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 20px;
}
.topbar .today { font-size: 13px; color: var(--ink-2); }
.topbar .today b { color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
  transition: all .15s var(--ease);
}
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); background: var(--surface-2); }

.content { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }

/* ---------- 页头 ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .t h1 { font-size: 19px; }
.page-head .t p { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.page-head .ops { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   基础控件
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: #BEC9D8; }
.btn:active { transform: translateY(1px); }
.btn svg.ic { width: 15px; height: 15px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.btn.danger:hover { background: #F9E2E0; border-color: #E9AFAA; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 38px; padding: 0 18px; font-size: 14.5px; }
/* 顶栏「首页」——返回网站首页 */
.home-btn { flex: none; }
.btn.ghost.home-btn:hover { color: var(--brand); background: var(--brand-soft); }

.field {
  height: 32px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); outline: none; width: 100%;
  font-size: 13.5px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field::placeholder { color: var(--ink-4); }
.field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.field { height: auto; min-height: 62px; padding: 7px 10px; resize: vertical; line-height: 1.55; }
select.field { cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: 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='%2355637A' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; padding-right: 26px; }
/* 车牌两级联动：未选省份时下级下拉禁用 */
select.field:disabled { opacity: .55; cursor: not-allowed; background-color: var(--surface-3); }

/* ============================================================
   卡片 / 面板
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 14px; }
.card-head .sub { font-size: 12px; color: var(--ink-3); }
.card-head .ops { margin-left: auto; display: flex; gap: 8px; }
.card-body { padding: 16px; }

/* ---------- 指标卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat .lb { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.stat .lb svg.ic { width: 14px; height: 14px; color: var(--ink-4); }
.stat .vl { margin-top: 6px; font-size: 25px; font-weight: 640; letter-spacing: -.028em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat .vl em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.stat .ft { margin-top: 5px; font-size: 12px; color: var(--ink-3); }
.stat.alert { border-color: var(--warn-line); background: linear-gradient(180deg, var(--warn-soft) 0%, var(--surface) 46%); }
.stat.alert .vl { color: var(--warn); }

/* ---------- 两栏 ---------- */
.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 1080px) { .cols { grid-template-columns: 1fr; } }

/* ---------- 图表 ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .gl { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .bar { fill: var(--brand); opacity: .82; transition: opacity .15s var(--ease); }
.chart .bar:hover { opacity: 1; }
.chart .bar.muted { fill: var(--brand-line); }
.chart .t { fill: var(--ink-3); font-size: 10px; font-family: var(--mono); }
.chart .vl-t { fill: var(--ink-2); font-size: 10px; font-family: var(--mono); }

/* ---------- 到期列表 ---------- */
.alist { display: flex; flex-direction: column; gap: 1px; background: var(--line); border-radius: 6px; overflow: hidden; }
.arow { display: flex; align-items: center; gap: 10px; padding: 10px 13px; background: var(--surface); }
.arow .when { font-family: var(--mono); font-size: 12.5px; font-weight: 600; min-width: 52px; text-align: right; }
.arow .kb { flex: 1; min-width: 0; }
.arow .kt { font-size: 13px; }
.arow .ks { font-size: 11.5px; color: var(--ink-3); }
.arow .due { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

/* ---------- 分布条 ---------- */
.dist { display: flex; flex-direction: column; gap: 11px; }
.dist-row .top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.dist-row .top .n { flex: 1; }
.dist-row .top .v { font-family: var(--mono); font-weight: 600; }
.dist-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 3px; background: var(--brand); transition: width .5s var(--ease); }

/* ============================================================
   工具栏 / 表格
   ============================================================ */
.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.search { position: relative; flex: 1; min-width: 190px; max-width: 300px; }
.search svg.ic { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--ink-4); }
.search .field { padding-left: 29px; }
.fset { display: flex; align-items: center; gap: 6px; }
.fset label { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.fset .field { width: auto; min-width: 96px; }
.drange { display: flex; align-items: center; gap: 5px; }
.drange .field { width: 132px; }
.drange span { color: var(--ink-4); font-size: 12px; }

.tbl-scroll { overflow: auto; max-height: calc(100vh - 232px); }
@media (max-width: 900px) { .tbl-scroll { max-height: none; } }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.grid th, table.grid td {
  padding: 9px 12px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line); vertical-align: middle;
}
table.grid thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  border-bottom: 1px solid var(--line-2); user-select: none;
}
table.grid thead th.sortable { cursor: pointer; }
table.grid thead th.sortable:hover { color: var(--ink); background: var(--surface-3); }
table.grid thead th .ind { color: var(--brand); margin-left: 3px; font-family: var(--mono); font-size: 11px; }
table.grid tbody tr { transition: background .12s var(--ease); }
table.grid tbody tr:hover { background: var(--surface-2); }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid td.num, table.grid th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.grid td.mono-c { font-family: var(--mono); }
table.grid td.empty-cell { color: var(--ink-4); }
table.grid .rowops { display: flex; gap: 4px; justify-content: flex-end; opacity: 0; transition: opacity .12s var(--ease); }
table.grid tbody tr:hover .rowops { opacity: 1; }
@media (hover: none) { table.grid .rowops { opacity: 1; } }

.ell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mini {
  width: 25px; height: 25px; border-radius: 5px; border: 1px solid transparent;
  background: transparent; color: var(--ink-3); display: grid; place-items: center; cursor: pointer;
  transition: all .13s var(--ease);
}
.mini svg { width: 14px; height: 14px; }
.mini:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line); }
.mini.del:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }

.pager { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager .info { font-size: 12.5px; color: var(--ink-2); font-family: var(--mono); }
.pager .pages { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.pg {
  min-width: 27px; height: 27px; padding: 0 6px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: 12.5px; font-family: var(--mono); cursor: pointer; transition: all .13s var(--ease);
}
.pg:hover:not(:disabled) { border-color: var(--line-2); color: var(--ink); }
.pg.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pg:disabled { opacity: .42; cursor: not-allowed; }
.pg.dots { border: 0; background: none; cursor: default; }

/* ============================================================
   标签 / 车牌 / 徽标
   ============================================================ */
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 7px;
  border-radius: 5px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--neutral-soft); color: var(--neutral); border: 1px solid transparent;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.info { background: var(--brand-soft); color: var(--brand-ink); }

.plate {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  background: var(--plate-bg); color: var(--plate-ink);
  border: 1px solid var(--plate-line);
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  letter-spacing: .04em; white-space: nowrap;
}
.plate.ev { background: #E6F4EC; color: #0F5C39; border-color: #BFE0CF; }

.warn-cell { color: var(--warn); font-weight: 600; }
.expired-cell { color: var(--danger); font-weight: 600; }

/* 空状态 / 加载 */
.empty { padding: 54px 20px; text-align: center; }
.empty .ico { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-4); }
.empty .ico svg { width: 22px; height: 22px; }
.empty h4 { font-size: 14.5px; }
.empty p { margin-top: 6px; font-size: 13px; color: var(--ink-2); max-width: 30em; margin-inline: auto; }
.empty .btn { margin-top: 16px; }

.skel { padding: 0; }
.skel-row { height: 40px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sh 1.4s ease infinite; }
@keyframes sh { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ============================================================
   弹窗 / 表单
   ============================================================ */
.mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(19, 30, 46, .38);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px;
  overflow-y: auto; opacity: 0; transition: opacity .18s var(--ease);
}
.mask.show { opacity: 1; }
.modal {
  width: 100%; max-width: 660px; background: var(--surface); border-radius: 10px;
  box-shadow: var(--shadow-lg); transform: translateY(-8px) scale(.99);
  transition: transform .2s var(--ease); margin: auto 0;
}
.mask.show .modal { transform: none; }
.modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; }
.modal-head .sub { font-size: 12px; color: var(--ink-3); }
.modal-body { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 10px 10px; }
.modal-foot .left { margin-right: auto; }

.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fitem.col2 { grid-column: span 2; }
.fitem > label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.fitem > label .req { color: var(--danger); margin-left: 2px; }
.fitem .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.fitem .unit-wrap { position: relative; }
.fitem .unit-wrap .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-4); pointer-events: none; }
.fitem .unit-wrap .field { padding-right: 40px; }
.fitem input[type=date].field, .fitem input[type=datetime-local].field { padding-right: 6px; }
.err { font-size: 12px; color: var(--danger); margin-top: 12px; padding: 8px 11px; background: var(--danger-soft); border: 1px solid var(--danger-line); border-radius: var(--r-sm); }
/* 找回密码成功提示（与 .err 成对） */
.ok-msg { font-size: 12px; color: var(--ok); margin-top: 12px; padding: 8px 11px; background: var(--ok-soft); border: 1px solid var(--ok-line); border-radius: var(--r-sm); }
/* 登录页「忘记密码？」 */
.login-card .row-extra a { color: var(--brand); text-decoration: none; }
.login-card .row-extra a:hover { text-decoration: underline; }
.login-card .fitem .hint { margin-top: 5px; line-height: 1.6; }

/* Toast */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 9px 15px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: var(--shadow-lg);
  animation: pop .22s var(--ease);
}
.toast svg { width: 15px; height: 15px; flex: none; }
.toast.ok { background: #12603C; }
.toast.err { background: #9E2C25; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================================================
   登录页
   ============================================================ */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 372px; }
.login-card .lhead { text-align: center; margin-bottom: 22px; }
.login-card .lhead .mark { width: 44px; height: 44px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; }
.login-card .lhead .mark svg { width: 24px; height: 24px; }
.login-card .lhead h1 { font-size: 19px; }
.login-card .lhead p { font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.login-card .card-body { padding: 22px; }
.login-card .fitem + .fitem { margin-top: 14px; }
.login-card .row-extra { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.login-card .btn.lg { width: 100%; margin-top: 18px; }
.login-foot { text-align: center; margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }

/* ============================================================
   响应式
   ============================================================ */
.side-toggle { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side {
    position: fixed; inset: 0 auto 0 0; width: 226px; z-index: 60;
    transform: translateX(-100%); transition: transform .22s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .side.open { transform: none; }
  .side-toggle { display: grid; }
  .side-mask { position: fixed; inset: 0; background: rgba(19, 30, 46, .4); z-index: 55; }
  .fgrid { grid-template-columns: 1fr; }
  .fitem.col2 { grid-column: span 1; }
  .content { padding: 16px 14px 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .vl { font-size: 21px; }
  .page-head .ops { width: 100%; }
  .page-head .ops .btn { flex: 1; }
  .mask { padding: 16px 10px; }
}

/* ============================================================
   自定义日期时间选择器（替代原生 datetime-local，选完分钟自动关闭）
   ============================================================ */
.dt-wrap { position: relative; display: block; }
.dt-wrap .dt-input { padding-right: 30px; cursor: pointer; }

.dt-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
  border-radius: var(--r-sm); transition: background .15s var(--ease), color .15s var(--ease);
}
.dt-btn:hover { background: var(--surface-3); color: var(--brand); }
.dt-btn svg { width: 15px; height: 15px; }

/* 弹层 */
.dt-pop {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 10px; width: 280px;
}
.dt-wrap.open .dt-input { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* 头部：年月切换 */
.dt-head { display: flex; align-items: center; gap: 2px; padding: 0 2px 8px; }
.dt-title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink); }
.dt-nav {
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
  border-radius: var(--r-sm); font-size: 13px; line-height: 1;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.dt-nav:hover { background: var(--brand-soft); color: var(--brand); }

/* 星期行 + 日期网格 */
.dt-week { display: grid; grid-template-columns: repeat(7, 1fr); padding-bottom: 4px; }
.dt-week span { text-align: center; font-size: 11px; color: var(--ink-4); }
.dt-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.dt-day {
  height: 30px; border: 0; background: transparent; cursor: pointer;
  border-radius: var(--r-sm); font-size: 12.5px; color: var(--ink);
  font-family: var(--mono); transition: background .12s var(--ease), color .12s var(--ease);
}
.dt-day:hover { background: var(--surface-3); }
.dt-day.other { color: var(--ink-4); }
.dt-day.today { color: var(--brand); font-weight: 700; }
.dt-day.on { background: var(--brand); color: #fff; font-weight: 600; }
.dt-day.on:hover { background: var(--brand-ink); }

/* 底部快捷键 */
.dt-foot { display: flex; justify-content: space-between; gap: 4px; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); }
.dt-link { border: 0; background: transparent; color: var(--brand); cursor: pointer; font-size: 12px; padding: 3px 6px; border-radius: var(--r-sm); }
.dt-link:hover { background: var(--brand-soft); }

/* 时间列：时 / 分 */
.dt-timewrap { display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dt-timecol { flex: 1; min-width: 0; }
.dt-timehead { font-size: 11px; color: var(--ink-4); text-align: center; padding-bottom: 4px; }
.dt-timelist { max-height: 132px; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.dt-time {
  height: 26px; border: 0; background: transparent; cursor: pointer;
  border-radius: var(--r-sm); font-size: 12px; color: var(--ink-2); font-family: var(--mono);
  transition: background .12s var(--ease), color .12s var(--ease);
}
.dt-time:hover { background: var(--surface-3); color: var(--ink); }
.dt-time.on { background: var(--brand); color: #fff; font-weight: 600; }
.dt-time.on:hover { background: var(--brand-ink); }
.dt-timelist::-webkit-scrollbar { width: 6px; }
.dt-timelist::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

/* 板块权限多选（用户新增/编辑表单） */
.perm-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 9px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); max-height: 168px; overflow-y: auto;
}
.perm-item {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12.5px; color: var(--ink-2); padding: 3px 4px; border-radius: var(--r-sm);
  transition: background .12s var(--ease);
}
.perm-item:hover { background: var(--surface-3); }
.perm-item input { width: 14px; height: 14px; accent-color: var(--brand); cursor: pointer; margin: 0; flex: none; }
.perm-bar { grid-column: 1 / -1; display: flex; gap: 12px; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 2px; }
.perm-link {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  font-size: 11.5px; color: var(--brand); font-family: inherit;
}
.perm-link:hover { color: var(--brand-ink); text-decoration: underline; }

/* 内置超级管理员：列表徽标 + 编辑弹窗的锁定提示 */
.tag-super {
  display: inline-block; margin-left: 6px; padding: 0 5px;
  font-size: 10.5px; line-height: 17px; vertical-align: 1px;
  color: var(--brand-ink); background: var(--brand-soft);
  border: 1px solid var(--brand-line); border-radius: var(--r-sm);
}
.lock-note {
  margin-bottom: 14px; padding: 9px 12px;
  font-size: 12.5px; line-height: 1.7; color: var(--ink-2);
  background: var(--surface-3); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: var(--r-sm);
}
.lock-note b { color: var(--ink); }

@media (max-width: 560px) {
  .dt-pop { width: 260px; }
  .dt-timelist { max-height: 110px; }
  .perm-grid { grid-template-columns: repeat(2, 1fr); }
}
