/*! MOV mow.kim 三口门户 · 共用壳与页面样式（UPG-203 提交/审核口）
 * token 源 = 设计师/设计/mowkim三口-stitch（Graphite Minimal·与 202/193/195 同族）
 * 零外链：无 CDN、无字体外链（系统字体栈）、图标=内联 SVG
 */
:root {
  --surface: #f9f9f9;
  --surface-bright: #ffffff;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f3f3f3;
  --surface-container: #eeeeee;
  --surface-container-high: #e8e8e8;
  --surface-container-highest: #e2e2e2;
  --on-surface: #1a1c1c;
  --on-surface-variant: #444748;
  --outline: #747878;
  --ink-muted: #6a6d6d;
  --outline-variant: #c4c7c7;
  --primary: #000000;
  --on-primary: #ffffff;
  --primary-container: #1a1c1c;
  --success: #0a7d33;
  --danger: #b3261e;
  --warn: #713f12;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-full: 999px;
  --font-head: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --shadow-float: 0 8px 24px rgba(0, 0, 0, .08);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 15px; line-height: 24px;
  -webkit-font-smoothing: antialiased;
}

/* ── 顶栏（与 202 登录壳同族）────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(249, 249, 249, .84);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline-variant);
}
.header-inner {
  height: 56px; max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--on-surface); }
.brand-mark { width: 32px; height: 32px; object-fit: contain; display: block; }
.brand-word { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--on-surface-variant); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 14px; color: var(--on-surface-variant); text-decoration: none; padding: 4px 0; }
.nav a:hover { color: var(--on-surface); }
.nav a[aria-current="page"] { color: var(--on-surface); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-surface-variant); }
.user-chip .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.icon-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--outline-variant); border-radius: 8px; background: var(--surface-bright); color: var(--on-surface-variant); cursor: pointer; text-decoration: none; }
.icon-btn:hover { color: var(--on-surface); border-color: var(--outline); }

/* ── 主区 ─────────────────────────────────────────── */
main.wrap { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 84px 24px 48px; }
.crumb { font-size: 12px; letter-spacing: .14em; color: var(--ink-muted); text-transform: uppercase; margin: 0 0 10px; }
.crumb .path { font-family: var(--font-mono); letter-spacing: 0; }
h1.page-title { font-family: var(--font-head); font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.lead { color: var(--on-surface-variant); font-size: 14px; margin: 0 0 22px; }

.card { background: var(--surface-bright); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 26px; margin-bottom: 22px; }

/* ── 表单 ─────────────────────────────────────────── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--ink-muted); margin: 0; }
.field .err { font-size: 12px; color: var(--danger); margin: 0; min-height: 0; }
.input, select.input, textarea.input {
  width: 100%; border: 0; border-radius: var(--radius-btn);
  background: var(--surface-container-low); color: var(--on-surface);
  font-family: var(--font-body); font-size: 14px; line-height: 20px;
  padding: 11px 12px; outline: none;
}
.input::placeholder { color: #9a9d9d; }
.input:focus { box-shadow: 0 0 0 2px var(--primary) inset; }
.input[aria-invalid="true"] { box-shadow: 0 0 0 2px var(--danger) inset; }
textarea.input { min-height: 132px; resize: vertical; font-family: var(--font-mono); font-size: 13px; line-height: 19px; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 30px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-surface-variant); }
.checkbox-row input { accent-color: #000; }
.inline-status { font-size: 12px; font-weight: 600; }
.inline-status.ok { color: var(--success); }
.inline-status.bad { color: var(--danger); }

.perm-group { display: flex; flex-wrap: wrap; gap: 10px; }
.perm-item { display: inline-flex; align-items: center; gap: 7px; background: var(--surface-container-low); border-radius: var(--radius-btn); padding: 9px 12px; font-size: 13px; cursor: pointer; }
.perm-item input { accent-color: #000; }

.checklist { background: var(--surface-container-low); border-radius: var(--radius-btn); padding: 18px 20px; margin-top: 6px; }
.checklist h2 { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; color: var(--on-surface-variant); text-transform: uppercase; }
.checklist ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.checklist li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--on-surface-variant); }
.checklist li .mark { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-top: 2px; }
.checklist li.pass .mark { background: #e6f4ea; color: var(--success); }
.checklist li.fail .mark { background: #fdecea; color: var(--danger); }
.checklist li .note { display: block; font-size: 12px; color: var(--ink-muted); margin-top: 1px; }

.form-alert { display: none; background: #fdecea; color: #7a1712; border-radius: var(--radius-btn); padding: 12px 14px; font-size: 13px; margin: 4px 0 14px; }
.form-alert.show { display: block; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 18px; border: 0; border-radius: var(--radius-btn);
  background: var(--primary); color: var(--on-primary);
  font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 20px;
  text-decoration: none; cursor: pointer;
}
.btn-primary:hover { background: var(--primary-container); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border: 1px solid var(--outline-variant); border-radius: var(--radius-btn);
  background: var(--surface-bright); color: var(--on-surface);
  font-family: var(--font-body); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.btn-ghost:hover { border-color: var(--outline); }
.btn-ghost.danger { border-color: var(--danger); color: var(--danger); }
.btn-ghost.danger:hover { background: var(--danger); color: var(--on-primary); }

/* ── 提交成功卡 ───────────────────────────────────── */
.success-card { display: none; text-align: center; padding: 40px 26px; }
.success-card.show { display: block; }
.success-card .big-mark { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: #e6f4ea; color: var(--success); display: flex; align-items: center; justify-content: center; }
.success-card h2 { margin: 0 0 6px; font-size: 20px; }
.success-card .kv { font-size: 13px; color: var(--on-surface-variant); margin: 2px 0; }
.success-card .kv b { color: var(--on-surface); font-family: var(--font-mono); font-weight: 600; }
.success-card .actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }
.success-card .actions .btn-primary, .success-card .actions .btn-ghost { width: auto; }

/* ── 历史表 ───────────────────────────────────────── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.section-head .count { font-size: 13px; color: var(--ink-muted); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--on-surface-variant); padding: 10px 12px; background: var(--surface-container-low); }
.table th:first-child { border-radius: 8px 0 0 8px; }
.table th:last-child { border-radius: 0 8px 8px 0; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--surface-container); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.status-chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; border: 1px solid; }
.status-pending { color: var(--warn); border-color: #d9b38c; background: #fdf6ef; }
.status-approved { color: var(--success); border-color: #9fceb0; background: #eef8f1; }
.status-rejected { color: var(--danger); border-color: #e0a9a5; background: #fdeeec; }
.row-actions { display: flex; gap: 10px; align-items: center; }
.link-btn { border: 0; background: none; padding: 0; color: var(--on-surface); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.danger { color: var(--danger); }
.reason-box { display: none; margin-top: 14px; background: #fdeeec; border-radius: var(--radius-btn); padding: 13px 15px; font-size: 13px; color: #7a1712; }
.reason-box.show { display: block; }
.reason-box .who { font-weight: 700; margin-right: 6px; }

/* ── 审核台 ───────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { border-radius: var(--radius-card); padding: 22px 24px; background: var(--surface-bright); box-shadow: var(--shadow-card); display: flex; align-items: flex-start; justify-content: space-between; }
.stat-card .label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-surface-variant); }
.stat-card .num { font-size: 40px; line-height: 1.1; font-weight: 700; margin-top: 8px; letter-spacing: -.02em; }
.stat-card.dark { background: var(--primary); color: var(--on-primary); }
.stat-card.dark .label { color: #b9bbbb; }
.stat-card .stat-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-container-low); color: var(--on-surface); }
.stat-card.dark .stat-icon { background: #2b2d2d; color: #fff; }
.stat-card .stat-icon.ok { color: var(--success); }
.stat-card .stat-icon.bad { color: var(--danger); }

.queue-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.tabs { display: inline-flex; gap: 4px; background: var(--surface-container-low); border-radius: var(--radius-btn); padding: 4px; }
.tabs button { border: 0; background: transparent; border-radius: 6px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--on-surface-variant); cursor: pointer; }
.tabs button.active { background: var(--surface-bright); color: var(--on-surface); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.search { flex: 1; min-width: 180px; }
.search .input { padding: 9px 12px; font-size: 13px; }
.preview-toggle { display: none; }
body.preview-on .preview-toggle { display: inline-flex; }
.preview-banner { display: none; background: #fff7e6; border: 1px solid #e6c88f; color: #6b4e08; border-radius: var(--radius-btn); padding: 9px 13px; font-size: 12px; margin-bottom: 14px; }
body.preview-on .preview-banner.show { display: block; }

.empty-state { text-align: center; padding: 46px 20px; color: var(--on-surface-variant); }
.empty-state .big { font-size: 17px; font-weight: 700; color: var(--on-surface); margin-bottom: 6px; }
.error-state { display: none; text-align: center; padding: 40px 20px; color: var(--on-surface-variant); }
.error-state.show { display: block; }
.error-state .big { font-size: 16px; font-weight: 700; color: var(--danger); margin-bottom: 6px; }

/* ── 核对抽屉 ─────────────────────────────────────── */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 60; display: none; }
.drawer-backdrop.show { display: block; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--surface-bright); z-index: 61; box-shadow: var(--shadow-float); transform: translateX(102%); transition: transform .22s ease; display: flex; flex-direction: column; }
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; border-bottom: 1px solid var(--surface-container); }
.drawer-head .crumb { margin: 0 0 4px; }
.drawer-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.drawer-foot { border-top: 1px solid var(--surface-container); padding: 14px 22px; display: flex; gap: 10px; justify-content: flex-end; background: var(--surface-bright); }
.drawer-foot .btn-primary { width: auto; padding: 11px 20px; }
.drawer h3 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-surface-variant); margin: 20px 0 10px; }
.kv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv-table th { text-align: left; width: 118px; color: var(--on-surface-variant); font-weight: 500; padding: 6px 0; vertical-align: top; }
.kv-table td { padding: 6px 0; word-break: break-word; }
.schema-pre { background: var(--surface-container-low); border-radius: var(--radius-btn); padding: 12px 14px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; margin: 0; }
.reject-reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.reject-reasons button { border: 1px solid var(--outline-variant); background: var(--surface-bright); color: var(--on-surface-variant); border-radius: 6px; padding: 5px 9px; font-size: 11px; cursor: pointer; }
.reject-reasons button:hover { border-color: var(--danger); color: var(--danger); }
.drawer textarea.input { min-height: 84px; }
.drawer .form-alert { margin: 10px 0 0; }
.checklist li .note .warn-dot { color: var(--warn); font-weight: 700; }

/* ── 页脚 ─────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--outline-variant); margin-top: auto; }
.foot-in { max-width: 1080px; margin: 0 auto; padding: 22px 24px 30px; text-align: center; font-size: 12px; color: var(--on-surface-variant); }
.foot-in a { color: var(--on-surface-variant); }
.foot-in .beian { height: 13px; vertical-align: middle; margin-right: 3px; }

/* ── 登录提示 ─────────────────────────────────────── */
.auth-gate { display: none; text-align: center; padding: 60px 24px; }
.auth-gate.show { display: block; }
.auth-gate .big { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.auth-gate p { color: var(--on-surface-variant); font-size: 14px; }

/* ── 响应式 ───────────────────────────────────────── */
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
  .brand-sub { display: none; }
  .header-inner { padding: 0 16px; }
  main.wrap { padding: 78px 16px 40px; }
  .card { padding: 20px 16px; }
  .table th:nth-child(4), .table td:nth-child(4) { display: none; }
}
