/* ============================================================
   鑫鑫网络小贷投诉管理平台 — 界面样式 v0.12（高效型）
   规矩（改样式前先看这段）：
   1. 字号只用 5 档：12 / 13 / 14 / 16 / 20；数字展示可用 24；
   2. 圆角只用 3 档：8（控件）/ 12（卡片）/ 999（标签、头像）；
   3. 间距只用 4 的倍数：4 / 8 / 12 / 16 / 20 / 24 / 32；
   4. 一个页面只用一个主按钮；同类表格只留一种密度；
   5. 颜色全部用变量，不在页面里写死。
   新增页面照抄这里的组件，不要另起一套。
   ============================================================ */
:root {
  --fs-2xs: 12px;
  --fs-xs: 13px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-display: 24px;
  --fs-hero: 26px;        /* 仅登录页主标题使用 */

  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-50: #eef4ff;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e5e9f2;
  --line-strong: #cfd8e6;
  --bg: #f5f7fb;
  --surface: #fff;
  --red: #dc2626;
  --red-50: #fef2f2;
  --amber: #b45309;
  --amber-50: #fffbeb;
  --violet: #7c3aed;
  --violet-50: #f5f3ff;
  --green: #047857;
  --green-50: #ecfdf5;

  --r-sm: 8px;
  --r-md: 12px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: var(--fs-sm)/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { margin: 0; color: var(--ink); }
p { margin: 0; }
.ico, .ti { line-height: 1; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 56px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 28px; height: 28px; flex: none; border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; font-size: var(--fs-xs); font-weight: 700;
}
.brand-name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); white-space: nowrap; }
.brand-sub { font-size: var(--fs-2xs); color: var(--faint); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: #fff; font-size: var(--fs-2xs); color: var(--body);
}
.chip .avatar {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand); font-size: var(--fs-2xs); font-weight: 600;
}
.chip .role { color: var(--muted); }
.icon-btn {
  height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--muted); font: inherit; font-size: var(--fs-2xs); cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: #fafcff; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: calc(100vh - 56px); }
.sidebar {
  width: 208px; flex: none; padding: 12px 10px 16px;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.nav-section { padding: 14px 12px 6px; font-size: var(--fs-2xs); color: var(--faint); }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; margin: 1px 0; border-radius: var(--r-sm);
  color: var(--body); font-size: var(--fs-xs); cursor: pointer;
}
.nav-item:hover { background: #f6f8fc; }
.nav-item.active { background: var(--brand-50); color: var(--brand-dark); font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
  border-radius: var(--r-sm); background: var(--brand);
}
.nav-item .ico { width: 16px; text-align: center; color: var(--faint); font-size: var(--fs-xs); }
.nav-item.active .ico { color: var(--brand); }
.nav-item .soon {
  margin-left: auto; padding: 0 6px; font-size: var(--fs-2xs); line-height: 16px;
  color: var(--faint); border: 1px solid var(--line); border-radius: var(--r-pill);
}
.sidebar-foot { margin-top: auto; padding: 12px 12px 0; font-size: var(--fs-2xs); color: var(--faint); line-height: 1.7; }
.main { flex: 1; min-width: 0; padding: 20px 24px 40px; }
.main-inner { max-width: 1200px; }

/* ---------- 页头 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.2px; }
.page-head .sub { margin-top: 4px; font-size: var(--fs-2xs); color: var(--muted); }
.crumbs { margin-bottom: 10px; font-size: var(--fs-2xs); }

/* ---------- 提示 ---------- */
.notice {
  margin-bottom: 14px; padding: 8px 12px; border-radius: var(--r-sm);
  font-size: var(--fs-2xs); line-height: 1.65;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
}
.flash {
  margin-bottom: 12px; padding: 8px 12px; border-radius: var(--r-sm);
  font-size: var(--fs-2xs);
  background: var(--brand-50); border: 1px solid #dbe7ff; color: #1e40af;
}
.flash.success { background: var(--green-50); border-color: #c7f0dd; color: var(--green); }
.flash.error { background: var(--red-50); border-color: #fecaca; color: #b91c1c; }
.flash.warning { background: var(--amber-50); border-color: #fde68a; color: var(--amber); }
.flash.info { background: #f8fafc; border-color: var(--line); color: var(--body); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow);
}
.kpi-ico {
  width: 34px; height: 34px; flex: none; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: var(--fs-sm); font-weight: 700;
  background: var(--brand-50); color: var(--brand);
}
.kpi.wait .kpi-ico { background: var(--amber-50); color: var(--amber); }
.kpi.doing .kpi-ico { background: var(--brand-50); color: var(--brand); }
.kpi.check .kpi-ico { background: var(--violet-50); color: var(--violet); }
.kpi.warn .kpi-ico { background: var(--red-50); color: var(--red); }
.kpi-num { font-size: var(--fs-display); font-weight: 650; line-height: 1.1; color: var(--ink); letter-spacing: -.5px; }
.kpi-label { margin-top: 2px; font-size: var(--fs-2xs); color: var(--muted); }

/* ---------- 卡片 ---------- */
.card {
  margin-bottom: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: var(--fs-md); font-weight: 600; }
.card-head .hint, .hint { font-size: var(--fs-2xs); color: var(--faint); }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th {
  padding: 10px 14px; font-size: var(--fs-2xs); font-weight: 500; color: var(--muted);
  text-align: left; white-space: nowrap; background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}
table.grid td {
  padding: 10px 14px; font-size: var(--fs-xs); color: var(--body);
  border-bottom: 1px solid #f1f4f9; vertical-align: middle;
}
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr.click { cursor: pointer; }
table.grid tbody tr.click:hover td { background: #f8fbff; }
table.grid .no { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid .ellip { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-cell { margin-top: 2px; font-size: var(--fs-2xs); color: var(--faint); }

.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }

/* ---------- 状态标签 ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: var(--r-pill);
  font-size: var(--fs-2xs); white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.waiting { background: var(--amber-50); color: var(--amber); }
.pill.handling { background: var(--brand-50); color: var(--brand-dark); }
.pill.reviewing { background: var(--violet-50); color: var(--violet); }
.pill.closed { background: var(--green-50); color: var(--green); }
.pill.archived { background: #f1f5fb; color: var(--muted); }
.pill.danger { background: var(--red-50); color: var(--red); }

.due { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.due.over, .over { color: var(--red); font-weight: 600; }

/* ---------- 按钮：一个页面只留一个 primary ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: #fff; color: var(--body);
  font: inherit; font-size: var(--fs-xs); font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: #f8fafc; border-color: #c3cede; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 0 8px; }
.btn.ghost:hover { background: #f1f5fa; color: var(--ink); }
.btn.danger { color: var(--red); border-color: #f3c9c9; }
.btn.danger:hover { background: var(--red-50); }
.btn[disabled] { background: #eef2f7; border-color: #e5eaf2; color: #9aa6b8; cursor: not-allowed; }
.btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

:where(a, button, input, select, textarea):focus-visible { outline: 2px solid #93b4fb; outline-offset: 2px; }

/* ---------- 空状态 ---------- */
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty.compact { padding: 16px 12px; }
.empty .ico {
  width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center; background: #f1f5fb; color: var(--faint); font-size: var(--fs-md);
}
.empty .t { margin-bottom: 2px; color: var(--ink); font-size: var(--fs-xs); font-weight: 600; }
.empty .d { font-size: var(--fs-2xs); }

/* ---------- 键值 / 时间线 ---------- */
.kv { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #eef2f7; font-size: var(--fs-xs); }
.kv:last-child { border-bottom: 0; }
.kv .k { width: 96px; flex: none; color: var(--muted); font-size: var(--fs-2xs); }
.kv .v { flex: 1; min-width: 0; color: var(--ink); word-break: break-word; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; margin-left: 6px; padding: 0 0 14px 18px; border-left: 1px solid #e6ebf3; }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: ""; position: absolute; left: -4.5px; top: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: #bfd3fb; box-shadow: 0 0 0 3px #fff;
}
.timeline .t { font-size: var(--fs-2xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.timeline .a { font-size: var(--fs-xs); color: var(--body); }

/* ---------- 筛选栏 ---------- */
.filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label { font-size: var(--fs-2xs); color: var(--faint); }
select, input[type="text"], input[type="password"], input[type="search"], input[type="date"], input[type="number"] {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: var(--fs-xs); min-width: 140px;
}
select:hover, input:hover { border-color: var(--line-strong); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--muted); cursor: pointer; }
input[type="checkbox"], input[type="radio"] {
  width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--brand); cursor: pointer;
}

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.field-line { display: flex; flex-direction: column; }
.field-line .f { margin-bottom: 6px; font-size: var(--fs-2xs); color: var(--muted); }
.field-line .i { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--ink); font: inherit; font-size: var(--fs-xs); }
.field-line textarea.i { height: auto; min-height: 88px; padding: 8px 10px; resize: vertical; line-height: 1.65; }
.field-line input[type="file"] { height: auto; padding: 8px 10px; }
.field-line .hint { margin-top: 4px; }
.req { color: var(--red); }
.err-msg { margin-top: 4px; font-size: var(--fs-2xs); color: var(--red); }
.regulator-box { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fbfcfe; }
.regulator-box .box-title { margin-bottom: 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); }

/* ---------- 工单详情 ---------- */
.ticket-head { align-items: flex-start; }
.due-box { min-width: 190px; padding: 10px 14px; border-radius: var(--r-md); background: #fbfcfe; border: 1px solid var(--line); }
.due-box.over { background: var(--red-50); border-color: #fecaca; }
.due-box .k { font-size: var(--fs-2xs); color: var(--muted); }
.due-box .v { margin-top: 2px; font-size: var(--fs-md); font-weight: 650; color: var(--ink); }
.due-box.over .v { color: var(--red); }
.due-box .d { margin-top: 2px; font-size: var(--fs-2xs); color: var(--faint); }
.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; align-items: start; }
.action-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.action-row form { display: flex; align-items: center; gap: 8px; margin: 0; }
.action-row select { min-width: 140px; }

/* ---------- 配置页 ---------- */
.prod-item { border-bottom: 1px dashed #eef2f7; }
.prod-item:last-of-type { border-bottom: 0; }
.prod-item > summary { display: flex; align-items: center; gap: 10px; padding: 12px 2px; list-style: none; cursor: pointer; font-size: var(--fs-xs); }
.prod-item > summary::-webkit-details-marker { display: none; }
.prod-name { min-width: 88px; font-weight: 600; color: var(--ink); }
.prod-edit { margin-left: auto; font-size: var(--fs-2xs); color: var(--brand); }
.prod-item[open] > summary { border-bottom: 1px dashed #eef2f7; }
.prod-item .inline-form { padding-top: 12px; }
.inline-form { padding: 8px 0; border-bottom: 1px dashed #eef2f7; }
.inline-form:last-of-type { border-bottom: 0; }
.inline-fields { display: grid; grid-template-columns: 1.2fr .8fr auto auto; gap: 12px; align-items: end; }
.mini { display: flex; flex-direction: column; gap: 5px; }
.mini > span { font-size: var(--fs-2xs); color: var(--muted); }
.mini > em.hint { font-style: normal; }
.inline-fields input[type="text"], .inline-fields input[type="number"] { width: 100%; }
.divider { height: 1px; margin: 14px 0; background: var(--line); }
.user-form { padding: 10px 0; border-bottom: 1px dashed #eef2f7; }
.user-form:last-of-type { border-bottom: 0; }
.user-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.user-name { width: 120px; display: flex; flex-direction: column; gap: 2px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; flex: 1; min-width: 200px; }

table.grid.narrow { max-width: 560px; }
.tag-product { display: inline-block; padding: 1px 8px; border-radius: var(--r-sm); background: #f1f5fb; color: #475569; font-size: var(--fs-2xs); white-space: nowrap; }

/* ---------- 登录 ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-side {
  padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
    radial-gradient(900px 520px at 90% -10%, rgba(96, 165, 250, .5), transparent 62%),
    linear-gradient(160deg, #0b1b33 0%, #14315e 48%, #1d4ed8 100%);
  background-size: 44px 44px, 44px 44px, auto, auto;
}
.auth-side .brand-mark { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }
.auth-side .brand-name { color: #fff; }
.auth-side .brand-sub { color: rgba(255, 255, 255, .6); }
.auth-side h2 { margin: 28px 0 10px; color: #fff; font-size: var(--fs-hero); line-height: 1.35; font-weight: 600; letter-spacing: -.4px; }
.auth-side p { max-width: 30em; margin: 0 0 20px; color: rgba(255, 255, 255, .78); font-size: var(--fs-xs); }
.auth-points { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.auth-points li { display: flex; gap: 9px; color: rgba(255, 255, 255, .88); font-size: var(--fs-xs); }
.auth-points .dot { width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); font-size: 10px; }
.auth-side .foot { font-size: var(--fs-2xs); color: rgba(255, 255, 255, .55); }
.auth-main { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-card { width: min(392px, 100%); padding: 26px 26px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 18px 40px rgba(15, 23, 42, .08); }
.auth-card h1 { margin-bottom: 4px; font-size: var(--fs-lg); }
.auth-card .sub { margin-bottom: 18px; font-size: var(--fs-2xs); color: var(--muted); }
.auth-card form { display: grid; gap: 12px; }
.auth-card label { display: block; margin-bottom: 5px; font-size: var(--fs-2xs); color: var(--body); }
.auth-card input { width: 100%; height: 40px; }
.auth-card .btn { width: 100%; height: 40px; margin-top: 4px; }
.auth-err { padding: 8px 11px; border-radius: var(--r-sm); background: var(--red-50); border: 1px solid #fecaca; color: #b91c1c; font-size: var(--fs-2xs); }
.demo { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.demo .t { margin-bottom: 8px; font-size: var(--fs-2xs); color: var(--faint); }
.demo table { width: 100%; border-collapse: collapse; font-size: var(--fs-2xs); }
.demo td { padding: 3px 0; color: var(--muted); }
.demo td:first-child { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.auth-mobile-brand { display: none; }

/* ---------- 页脚 ---------- */
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 14px 24px 20px; font-size: var(--fs-2xs); color: var(--faint); }
.ver { font-variant-numeric: tabular-nums; }
.tabbar { display: none; }

/* ============================================================
   移动端
   ============================================================ */
@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: var(--fs-md); padding-bottom: env(safe-area-inset-bottom); }

  .topbar { height: 52px; padding: 0 12px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-name { max-width: 44vw; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-xs); }
  .brand-sub, .hide-sm, .chip .role { display: none; }
  .chip { padding: 3px 8px 3px 3px; }
  .icon-btn { padding: 0 10px; }

  .sidebar { display: none; }
  .main { padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-head h1 { font-size: var(--fs-lg); }
  .page-head .sub { font-size: var(--fs-2xs); }
  .page-head .btn-row .btn { flex: 1; }

  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px; gap: 10px; }
  .kpi-ico { width: 30px; height: 30px; }
  .kpi-num { font-size: var(--fs-display); }
  .kpi-label { font-size: var(--fs-2xs); }

  .card-head { padding: 10px 14px; }
  .card-head h2 { font-size: var(--fs-sm); }
  .card-head .hint { display: none; }
  .card-body { padding: 14px; }

  /* 表格 → 卡片 */
  table.grid thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
  table.grid tbody tr { margin: 10px 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
  table.grid tbody tr:last-child { margin-bottom: 12px; }
  table.grid td { display: flex; align-items: baseline; gap: 12px; border: 0; padding: 3px 0; font-size: var(--fs-sm); }
  table.grid td::before { content: attr(data-label); width: 72px; flex: none; font-size: var(--fs-2xs); color: var(--faint); }
  table.grid td.no { padding: 0 0 8px; margin-bottom: 5px; border-bottom: 1px dashed #eef2f7; font-size: var(--fs-md); }
  table.grid td.no::before { display: none; }
  table.grid td.ellip { max-width: none; white-space: normal; overflow: visible; }
  table.grid td .sub-cell { display: inline; margin-left: 6px; }
  table.grid td[data-label=""] { justify-content: flex-end; padding-top: 8px; }
  table.grid td[data-label=""]::before { display: none; }
  table.grid td[data-label=""] .btn { width: 100%; }

  .filters { gap: 8px; }
  .field { flex: 1 1 44%; }
  .field > select, .filters select, .filters input[type="text"], .filters input[type="date"], .filters input[type="number"] { width: 100%; min-width: 0; height: 40px; }
  .filters .check { flex: none; white-space: nowrap; }
  .filters .btn-row { width: 100%; }
  .filters .btn-row .btn { flex: 1; }

  input[type="text"], input[type="password"], input[type="search"], input[type="date"], input[type="number"], select, textarea { font-size: 16px; }
  .field-line .i { height: 42px; }
  .field-line textarea.i { min-height: 110px; }

  .form-grid, .form-grid.three { grid-template-columns: 1fr; gap: 14px; }
  .regulator-box { padding: 12px; }
  .btns .btn { flex: 1; }

  .detail-grid { grid-template-columns: 1fr; }
  .kv .k { width: 84px; font-size: var(--fs-2xs); }
  .due-box { min-width: 0; width: 100%; }
  .action-row { flex-direction: column; align-items: stretch; }
  .action-row form { flex-direction: column; align-items: stretch; }
  .action-row .btn, .action-row .i, .action-row select { width: 100%; }

  .inline-fields { grid-template-columns: 1fr; gap: 10px; }
  .inline-fields .check { padding-bottom: 0 !important; }
  .inline-fields .btn { width: 100%; }
  .user-line { flex-direction: column; align-items: stretch; gap: 10px; }
  .user-name { width: auto; }
  .checks { min-width: 0; gap: 8px 14px; }
  .user-line .btn { width: 100%; }

  .footer { display: none; }

  .auth { grid-template-columns: 1fr; min-height: 100dvh; }
  .auth-side { display: none; }
  .auth-main { align-items: flex-start; padding: 8vh 14px 0; }
  .auth-card { width: 100%; padding: 22px 20px 18px; border-radius: var(--r-md); }
  .auth-card input, .auth-card .btn { height: 44px; font-size: var(--fs-md); }
  .auth-mobile-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(10px);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0; border-radius: var(--r-sm); color: var(--faint); font-size: var(--fs-2xs); }
  .tab .ti { font-size: 20px; }
  .tab.on { color: var(--brand); }
}

/* 账号管理（v0.13.0） */
.account-row { padding: 10px 0; border-bottom: 1px dashed #eef2f7; }
.account-row:last-of-type { border-bottom: 0; }
.account-row .user-line { align-items: flex-end; }
.account-row .mini select { min-width: 132px; }
.account-fields { grid-template-columns: 1fr 1fr 1fr 1fr; }
.pwd-reset { margin: 4px 0 0 0; }
.pwd-reset > summary {
  list-style: none; cursor: pointer; width: max-content;
  font-size: var(--fs-2xs); color: var(--muted); padding: 2px 0;
}
.pwd-reset > summary::-webkit-details-marker { display: none; }
.pwd-reset > summary::before { content: "⌄ "; }
.pwd-reset[open] > summary::before { content: "⌃ "; }
.pwd-reset .i { height: 34px; }

@media (max-width: 760px) {
  .account-row .user-line { align-items: stretch; }
  .account-fields { grid-template-columns: 1fr; }
  .pwd-reset { margin-top: 8px; }
}

.account-products { margin-top: 8px; }

.account-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.delete-link { color: var(--red); padding: 0; height: 24px; font-size: var(--fs-2xs); }
.delete-link:hover { background: transparent; color: #b91c1c; text-decoration: underline; }
@media (max-width: 760px) {
  .account-actions { flex-wrap: wrap; gap: 10px; }
}
