/* ============================================================
   网站备案信息录入系统 —— 样式表
   ============================================================ */

:root {
  --brand: #0b57b8;
  --brand-dark: #07408a;
  --brand-soft: #eaf1fb;
  --brand-line: #c9dbf5;
  --ink: #16243a;
  --ink-2: #4b5b72;
  --ink-3: #7d8a9c;
  --line: #e3e9f2;
  --bg: #f2f6fb;
  --card: #ffffff;
  --ok: #0f9d58;
  --ok-soft: #e8f7ee;
  --warn: #d98005;
  --warn-soft: #fdf3e3;
  --danger: #d0342c;
  --danger-soft: #fdeceb;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 74, .06), 0 2px 8px rgba(16, 40, 74, .04);
  --shadow-md: 0 6px 24px rgba(16, 40, 74, .08);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: .2px; }

button { font-family: inherit; }

/* ---------------------------------------------------------- 省级规则面板 */
.rule-card {
  border: 1px solid var(--brand-line);
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 60%);
  border-radius: 10px;
  padding: 14px 16px;
}
.rule-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.rule-card__head strong { font-size: 14px; color: var(--brand-dark); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-line);
  white-space: nowrap;
}
.chip--req { background: var(--danger-soft); color: var(--danger); border-color: #f4cdca; }
.chip--opt { background: #f4f6fa; color: var(--ink-2); border-color: #e4eaf3; }

.rule-list { margin: 6px 0 0; padding-left: 18px; }
.rule-list li { font-size: 13px; color: var(--ink-2); line-height: 1.85; }
.rule-list li::marker { color: var(--brand); }

.rule-card__mats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--brand-line);
}

.prov-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  vertical-align: 1px;
}

.upload-card.is-prov { border-color: var(--brand-line); background: #f9fbff; }
.upload-card.is-missing { border-color: #efb4ae; background: #fffafa; }

/* 各省差异表 */
.prov-table td { font-size: 13px; }
.prov-table td:first-child { font-weight: 500; white-space: nowrap; }
.prov-table .num { font-variant-numeric: tabular-nums; }
.prov-table tr.is-current { background: var(--brand-soft); }

/* ---------------------------------------------------------- 顶部导航 */
.topbar {
  background: linear-gradient(100deg, #06367a 0%, #0b57b8 55%, #1466cc 100%);
  color: #fff;
  position: relative;
  z-index: 20;
}

.topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand:hover { text-decoration: none; }

.brand__mark {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  display: grid; place-items: center;
  flex: 0 0 auto;
}

.brand__text { line-height: 1.25; }
.brand__title { font-size: 17px; font-weight: 600; letter-spacing: .5px; }
.brand__sub { font-size: 11.5px; opacity: .78; letter-spacing: 1.6px; text-transform: uppercase; }

.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.topnav a {
  color: rgba(255, 255, 255, .88);
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  text-decoration: none;
  transition: background .16s;
}
.topnav a:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.topnav a.is-active { background: rgba(255, 255, 255, .18); color: #fff; font-weight: 500; }

.topbar__hint {
  font-size: 12px;
  color: rgba(255, 255, 255, .72);
  border-left: 1px solid rgba(255, 255, 255, .22);
  padding-left: 14px;
  margin-left: 6px;
}

/* ---------------------------------------------------------- 通用容器 */
.page { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }
.page--narrow { max-width: 900px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.section-title h2 { font-size: 16px; }
.section-title .idx {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12.5px;
  font-weight: 700;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.section-title .tip { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }

.pad { padding: 22px; }

.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { border-color: #c4cede; background: #f8fafd; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(11, 87, 184, .22);
}
.btn--primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn--ghost { background: transparent; }

.btn--danger { color: var(--danger); border-color: #f2c9c6; background: #fff; }
.btn--danger:hover { background: var(--danger-soft); }

.btn--sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.btn--lg { padding: 12px 30px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------- 首页 */
.hero {
  background: linear-gradient(120deg, #06367a 0%, #0b57b8 60%, #1a72d8 100%);
  color: #fff;
  padding: 52px 20px 120px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px; top: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 65%);
}
.hero__inner { max-width: 1180px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { font-size: 30px; font-weight: 600; margin-bottom: 12px; letter-spacing: .5px; }
.hero p { margin: 0; max-width: 660px; color: rgba(255, 255, 255, .84); font-size: 14.5px; line-height: 1.9; }
.hero__actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn--primary { background: #fff; color: var(--brand-dark); border-color: #fff; font-weight: 600; }
.hero .btn--primary:hover { background: #eef4ff; }
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero .btn--ghost:hover { background: rgba(255, 255, 255, .12); }

.hero__stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.hero__stats div strong { display: block; font-size: 21px; font-weight: 600; }
.hero__stats div span { font-size: 12.5px; color: rgba(255, 255, 255, .7); }

.hero-lift { margin-top: -84px; position: relative; z-index: 2; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.tile { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.tile__icon { width: 40px; height: 40px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 4px; }
.tile h3 { font-size: 15.5px; }
.tile p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }

.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 22px; }
.flow__item { text-align: center; position: relative; padding: 8px 6px; }
.flow__item::after {
  content: "";
  position: absolute; top: 24px; right: -6px;
  width: 12px; height: 1px; background: var(--brand-line);
}
.flow__item:last-child::after { display: none; }
.flow__num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: 13px;
  display: grid; place-items: center; margin: 0 auto 8px;
  border: 1px solid var(--brand-line);
}
.flow__item strong { display: block; font-size: 13.5px; font-weight: 600; }
.flow__item span { font-size: 12px; color: var(--ink-3); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px dashed var(--line);
  font-size: 13.5px; color: var(--ink-2);
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: "";
  width: 16px; height: 16px; flex: 0 0 auto; margin-top: 3px;
  border-radius: 4px;
  background: var(--brand-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b57b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/11px no-repeat;
}

.notice {
  display: flex; gap: 10px;
  background: var(--warn-soft);
  border: 1px solid #f5dfbc;
  color: #8a5a00;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.75;
}
.notice--info { background: var(--brand-soft); border-color: var(--brand-line); color: #0a4a9c; }
.notice--ok { background: var(--ok-soft); border-color: #c4ecd3; color: #0a6b3d; }
.notice--danger { background: var(--danger-soft); border-color: #f4cdca; color: #a0201a; }
.notice strong { font-weight: 600; }

/* ---------------------------------------------------------- 步骤条 */
.stepper {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 15;
  box-shadow: 0 1px 3px rgba(16, 40, 74, .04);
}
.stepper__inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stepper__inner::-webkit-scrollbar { display: none; }

.step {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 8px;
  border: none; background: none; cursor: pointer;
  color: var(--ink-3); font-size: 13.5px; white-space: nowrap;
  transition: background .16s, color .16s;
  flex: 0 0 auto;
}
.step:hover { background: #f5f8fd; }
.step__num {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid #d7e0ec; background: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  flex: 0 0 auto;
}
.step__sep { width: 16px; height: 1px; background: #dde5f0; flex: 0 0 auto; }
.step.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.step.is-active .step__num { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.is-done { color: var(--ok); }
.step.is-done .step__num { border-color: #b7e3c8; background: var(--ok-soft); color: var(--ok); }

.stepper__progress { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding-left: 12px; }
.stepper__progress span { font-size: 12.5px; color: var(--ink-3); }

/* ---------------------------------------------------------- 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.form-grid--full { grid-template-columns: 1fr; }
.span-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13.5px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 5px; }
.field > label .req { color: var(--danger); font-size: 13px; }
.field .help { font-size: 12px; color: var(--ink-3); line-height: 1.6; }

.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  transition: border-color .16s, box-shadow .16s;
  min-height: 40px;
}
.input::placeholder, .textarea::placeholder { color: #a9b4c4; }
.input:hover, .select:hover, .textarea:hover { border-color: #c2cee0; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 87, 184, .12);
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.7; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8a9c' stroke-width='2' stroke-linecap='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  padding-right: 32px;
}

.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea {
  border-color: #e8a09b;
  background: #fffafa;
}
.field__error { font-size: 12px; color: var(--danger); display: none; }
.field.is-invalid .field__error { display: block; }

/* 选项卡片（主体类型） */
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  position: relative;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  padding: 14px 14px 14px 44px;
  cursor: pointer;
  transition: all .16s;
  background: #fff;
}
.choice:hover { border-color: var(--brand-line); background: #fafcff; }
.choice input { position: absolute; opacity: 0; }
.choice__mark {
  position: absolute; left: 14px; top: 15px;
  width: 17px; height: 17px; border-radius: 50%;
  border: 1.5px solid #c9d5e6; background: #fff;
}
.choice__title { font-weight: 600; font-size: 14px; display: block; }
.choice__desc { font-size: 12.5px; color: var(--ink-3); }
.choice input:checked ~ .choice__mark { border-color: var(--brand); border-width: 5px; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
/* 管局强制固定某一选项时：置灰且不可点，避免用户在放开省份后又误切回来 */
.choice.is-disabled { cursor: not-allowed; opacity: .55; background: #f6f8fb; }
.choice.is-disabled:hover { border-color: #dbe3ef; background: #f6f8fb; }
.chip--forbid { background: #fdecec; color: #b42318; border-color: #f7c9c6; }

/* 复选组 */
.checkgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.check {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #dbe3ef; border-radius: 8px;
  padding: 9px 11px; cursor: pointer; font-size: 13.5px;
  background: #fff; transition: all .16s;
}
.check:hover { border-color: var(--brand-line); }
.check input { accent-color: var(--brand); width: 15px; height: 15px; margin: 0; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; }

/* 域名列表 */
.repeat-list { display: flex; flex-direction: column; gap: 8px; }
.repeat-row { display: flex; gap: 8px; align-items: center; }
.repeat-row .input { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 8px; border: 1px solid #dbe3ef; background: #fff;
  color: var(--ink-3); cursor: pointer; display: grid; place-items: center;
}
.icon-btn:hover { color: var(--danger); border-color: #f0c9c6; background: #fffafa; }

/* ---------------------------------------------------------- 上传 */
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.upload-card {
  border: 1px dashed #cdd9e8;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .16s, background .16s;
  min-height: 176px;
}
.upload-card:hover { border-color: var(--brand-line); background: #f8fbff; }
.upload-card.is-filled { border-style: solid; border-color: #c4ecd3; background: #fbfefc; }
.upload-card__head { display: flex; align-items: flex-start; gap: 8px; }
.upload-card__title { font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.upload-card__req { color: var(--danger); font-size: 12px; }
.upload-card__desc { font-size: 12px; color: var(--ink-3); line-height: 1.6; margin-top: -4px; }
.upload-card__actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.upload-card__actions .btn { flex: 1; min-width: 0; padding: 7px 8px; font-size: 12.5px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f8;
  border: 1px solid #e2e9f3;
}
.thumb img { display: block; width: 100%; height: 96px; object-fit: cover; }
.thumb__file { display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-size: 12px; color: var(--ink-2); background: #fff; }
.thumb__del {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(16, 36, 58, .62); color: #fff;
  cursor: pointer; font-size: 13px; line-height: 1;
  display: grid; place-items: center;
}
.thumb__del:hover { background: var(--danger); }
.thumb__name {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(16, 36, 58, .72));
  color: #fff; font-size: 11px; padding: 14px 8px 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------------------------------------------------- 底部操作栏 */
.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 14;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.form-actions__inner { max-width: 1180px; width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.form-actions__status { font-size: 12.5px; color: var(--ink-3); margin-right: auto; }
.form-actions__status b { color: var(--ok); font-weight: 500; }

/* ---------------------------------------------------------- 弹窗 */
.modal {
  position: fixed; inset: 0;
  background: rgba(12, 26, 46, .55);
  display: none;
  place-items: center;
  z-index: 60;
  padding: 20px;
}
.modal.is-open { display: grid; }
.modal__box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 60px rgba(8, 20, 40, .3);
  overflow: hidden;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal__head h3 { font-size: 15px; }
.modal__head .icon-btn { margin-left: auto; border: none; }
.modal__body { padding: 18px 20px; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

.camera-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0d1626;
  border-radius: 8px;
  overflow: hidden;
}
.camera-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera-stage .camera-hint {
  position: absolute; left: 0; right: 0; bottom: 0;
  color: #fff; font-size: 12px; padding: 24px 12px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}

/* ---------------------------------------------------------- 表格 / 后台 */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }
.toolbar .input { min-width: 240px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-weight: 500; color: var(--ink-3);
  font-size: 12.5px; padding: 11px 14px; background: #f8fafd;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 13px 14px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
table.data tbody tr { cursor: pointer; transition: background .14s; }
table.data tbody tr:hover { background: #f7fafe; }
table.data tbody tr:last-child td { border-bottom: none; }
.td-main { font-weight: 500; color: var(--ink); }
.td-sub { font-size: 12px; color: var(--ink-3); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--draft { color: #6b7788; background: #eef1f6; }
.badge--pending { color: var(--warn); background: var(--warn-soft); }
.badge--reviewing { color: var(--brand); background: var(--brand-soft); }
.badge--approved { color: var(--ok); background: var(--ok-soft); }
.badge--rejected { color: var(--danger); background: var(--danger-soft); }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat { padding: 16px 18px; }
.stat__label { font-size: 12.5px; color: var(--ink-3); }
.stat__value { font-size: 26px; font-weight: 600; line-height: 1.3; margin-top: 2px; }
.stat__value small { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.stat--brand .stat__value { color: var(--brand); }
.stat--warn .stat__value { color: var(--warn); }
.stat--ok .stat__value { color: var(--ok); }
.stat--danger .stat__value { color: var(--danger); }

.pager { display: flex; align-items: center; gap: 8px; padding: 14px 18px; justify-content: flex-end; font-size: 13px; color: var(--ink-3); }
.pager .btn { padding: 5px 11px; font-size: 12.5px; }
.pager .btn.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

.empty { padding: 56px 20px; text-align: center; color: var(--ink-3); }
.empty svg { opacity: .35; margin-bottom: 10px; }

/* 详情抽屉 */
.drawer {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(12, 26, 46, .45);
  display: none;
}
.drawer.is-open { display: block; }
.drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(760px, 100%);
  background: #f5f8fc;
  display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(8, 20, 40, .16);
  animation: slide .22s ease;
}
@keyframes slide { from { transform: translateX(30px); opacity: .6; } }
.drawer__head {
  padding: 16px 20px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
}
.drawer__head h3 { font-size: 16px; }
.drawer__body { overflow-y: auto; padding: 18px 20px 40px; flex: 1; }
.drawer__foot {
  padding: 12px 20px; background: #fff; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; flex: 0 0 auto;
}

.kv { display: grid; grid-template-columns: 152px 1fr; gap: 0; font-size: 13.5px; }
.kv dt { color: var(--ink-3); padding: 9px 0; border-bottom: 1px dashed #e8eef6; }
.kv dd { margin: 0; padding: 9px 0; border-bottom: 1px dashed #e8eef6; word-break: break-word; }

.file-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.file-item { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; text-decoration: none; color: inherit; display: block; }
.file-item:hover { border-color: var(--brand-line); text-decoration: none; }
.file-item img { width: 100%; height: 100px; object-fit: cover; display: block; background: #eef2f8; }
.file-item__ph { height: 100px; display: grid; place-items: center; background: #f2f6fb; color: var(--ink-3); font-size: 12px; }
.file-item__meta { padding: 7px 9px; font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 20px; border-left: 1px solid #e2eaf5; margin-left: 5px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -4.5px; top: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand-line);
}
.timeline li.is-done::before { background: var(--brand); border-color: var(--brand); }
.timeline strong { font-size: 13px; display: block; }
.timeline span { font-size: 12px; color: var(--ink-3); }

/* 登录 */
.login-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 40px 20px; }
.login-card { width: 100%; max-width: 380px; padding: 30px 28px; }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .upload-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .flow__item::after { display: none; }
}

@media (max-width: 860px) {
  .topbar__inner { padding: 12px 16px; }
  .topbar__hint { display: none; }
  .brand__title { font-size: 15.5px; }
  .brand__sub { display: none; }
  .page { padding: 18px 14px 48px; }
  .hero { padding: 36px 16px 100px; }
  .hero h1 { font-size: 23px; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .checkgrid { grid-template-columns: repeat(2, 1fr); }
  .stepper__inner { padding: 10px 14px; }
  .step { padding: 5px 8px; font-size: 12.5px; }
  .step__label { display: none; }
  .step.is-active .step__label { display: inline; }
  .step__sep { width: 8px; }
  .stepper__progress { display: none; }
  .pad { padding: 16px; }
  .section-title { padding: 14px 16px; }
  .section-title .tip { display: none; }
  .form-actions { padding: 10px 14px; }
  .form-actions__status { display: none; }
  .form-actions__inner { gap: 8px; }
  .form-actions .btn { flex: 1; padding: 10px 8px; font-size: 13.5px; }
  .kv { grid-template-columns: 110px 1fr; font-size: 13px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat__value { font-size: 22px; }
  .toolbar .input { min-width: 0; width: 100%; }
  .toolbar .select { flex: 1; }
  .tb-hide { display: none; }
  .drawer__panel { width: 100%; }
  .choice-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .upload-grid { grid-template-columns: 1fr; }
  .checkgrid { grid-template-columns: 1fr 1fr; }
  .hero__stats { gap: 20px; }
  .hero__stats div strong { font-size: 18px; }
  .hero__actions .btn { flex: 1; }
  .brand__title { font-size: 14.5px; }
  .topbar__inner { flex-wrap: nowrap; }
  .topnav {
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 62vw;
    flex: 0 0 auto;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { padding: 6px 8px; font-size: 12.5px; white-space: nowrap; }
}

/* ---------------------------------------------------------- 人脸核验 */
.badge--verified { color: #0b6b3a; background: #d9f2e3; }

.face-box {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.face-qr {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.face-qr img {
  width: 100%;
  max-width: 166px;
  height: auto;
  display: block;
  margin: 0 auto 8px;
  border-radius: 6px;
}

.face-empty {
  border: 1px dashed var(--brand-line);
  border-radius: 12px;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 13px;
  background: #fafcff;
}

.face-ops .row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* 申请人侧扫码卡片 */
.face-scan {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--brand-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faff, #ffffff);
  text-align: center;
}
.face-scan__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-dark);
  letter-spacing: .5px;
}
.face-scan__qr {
  width: 220px;
  max-width: 70%;
  height: auto;
  margin: 4px auto 8px;
  display: block;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: zoom-in;
}
.face-scan__empty {
  padding: 26px 12px;
  border: 1px dashed var(--brand-line);
  border-radius: 10px;
  color: var(--ink-3);
  font-size: 13px;
  background: #fff;
}
.face-scan__note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: left;
}

@media (max-width: 720px) {
  .face-box { grid-template-columns: 1fr; }
  .face-empty { min-height: 120px; }
  .face-scan__qr { width: 180px; }
}

/* ---------------------------------------------------------- 证件有效期 */
.validity { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.validity .input { flex: 1 1 132px; width: auto; min-width: 116px; }
.validity__sep { font-size: 13px; color: var(--ink-3); flex: 0 0 auto; }
.validity .input:disabled { background: #f4f6fa; color: var(--ink-3); cursor: not-allowed; }
.check.validity__long { flex: 0 0 auto; padding: 8px 12px; white-space: nowrap; }
.check.validity__long:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.check.validity__long input { accent-color: var(--brand); }

/* 系统生成材料提示 */
.gen-mats {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 13px;
  border: 1px dashed var(--brand-line);
  border-radius: 8px;
  background: #fbfdff;
  font-size: 13px;
  color: var(--ink-2);
}
.chip--ok { background: var(--ok-soft); color: var(--ok); border-color: #c4ecd3; }

/* 后台：查询码 */
.token-cell { white-space: nowrap; }
.token-val { font-size: 12.5px; letter-spacing: .6px; color: var(--ink); }
.link-btn {
  border: none; background: none; padding: 0 0 0 6px;
  color: var(--brand); font-size: 12px; cursor: pointer; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }
.d-token {
  display: flex; align-items: center; gap: 8px;
  margin-top: 5px; font-size: 12.5px; color: var(--ink-3);
}
.d-token b { color: var(--ink); font-size: 13px; letter-spacing: .8px; }

/* ---------------------------------------------------------- 列表勾选 / 导出 */
.col-check { width: 40px; text-align: center; padding-left: 12px !important; padding-right: 0 !important; }
.col-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; vertical-align: middle; }
.data tbody tr:hover .col-check input[type="checkbox"] { transform: scale(1.02); }
#btnExportPkg:disabled { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------- 进度查询侧边抽屉 */
.qdrawer { position: fixed; top: 0; right: 0; bottom: 0; width: 0; z-index: 55; }
.qdrawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(370px, 92vw);
  background: var(--card);
  box-shadow: -14px 0 44px rgba(8, 20, 40, .2);
  border-radius: 14px 0 0 14px;
  display: flex; flex-direction: column;
  transform: translateX(110%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  visibility: hidden;
}
.qdrawer.is-open .qdrawer__panel { transform: none; visibility: visible; }
.qdrawer__tab {
  position: absolute; top: 34%; right: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  writing-mode: vertical-rl;
  padding: 15px 9px;
  border: none; border-radius: 10px 0 0 10px;
  background: var(--brand); color: #fff;
  font-size: 13.5px; letter-spacing: 3px; font-family: inherit;
  cursor: pointer;
  box-shadow: -4px 4px 16px rgba(7, 64, 138, .28);
  pointer-events: auto;
  transition: right .26s cubic-bezier(.4, 0, .2, 1), background .15s;
}
.qdrawer__tab:hover { background: var(--brand-dark); }
.qdrawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px 13px;
  border-bottom: 1px solid var(--line);
}
.qdrawer__head h3 { margin: 0; font-size: 15.5px; color: var(--ink); }
.qdrawer__body { flex: 1; overflow-y: auto; padding: 17px 18px 22px; }
@media (max-width: 560px) {
  .qdrawer__tab { top: auto; bottom: 12%; padding: 12px 8px; }
}

/* ---------------------------------------------------------- OCR 证件识别卡 */
.ocr-card {
  border: 1px solid var(--brand-line);
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 65%);
  border-radius: 10px;
  padding: 14px 16px 13px;
  margin-bottom: 18px;
}
.ocr-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}
.ocr-card__title svg { color: var(--brand); flex: none; }
.ocr-card__opt {
  font-size: 12px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  padding: 1px 9px;
  border-radius: 999px;
}
.ocr-card__desc { font-size: 12.5px; color: var(--ink-2); margin-top: 7px; line-height: 1.65; }
.ocr-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.ocr-slot {
  border: 1.5px dashed #c9d8ec;
  border-radius: 10px;
  padding: 12px 12px 11px;
  text-align: center;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ocr-slot.is-busy { border-color: var(--brand); }
.ocr-slot__label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.ocr-slot__preview {
  min-height: 62px;
  display: grid;
  place-items: center;
  font-size: 12.5px;
}
.ocr-slot__preview img {
  max-width: 100%;
  max-height: 108px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.ocr-slot__actions { display: flex; gap: 8px; justify-content: center; align-items: center; }
.ocr-slot__actions .btn { flex: 1; min-width: 0; padding: 6px 8px; font-size: 12.5px; }
.ocr-slot__result { font-size: 12px; line-height: 1.6; text-align: left; min-height: 18px; }
@media (max-width: 560px) {
  .ocr-slots { grid-template-columns: 1fr; }
}
/* 手机端触控优化：按钮/删除键加大到 40px 触控目标 */
.ocr-slot__actions .btn { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.ocr-slot__actions .icon-btn { width: 40px; height: 40px; font-size: 16px; }
/* 识别中的等待反馈 */
.ocr-busy { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.ocr-spin {
  width: 14px; height: 14px; flex: none;
  border: 2px solid var(--brand-line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: ocrspin 0.8s linear infinite;
}
@keyframes ocrspin { to { transform: rotate(360deg); } }

/* 上传材料 / 识别卡缩略图：点击放大预览 */
.thumb img, .ocr-slot__preview img { cursor: zoom-in; }
.thumb__file { text-decoration: none; cursor: pointer; }
.thumb__file:hover { color: var(--brand); }
.imgviewer {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 23, 42, .82);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.imgviewer[hidden] { display: none; }
.imgviewer img {
  max-width: 94vw; max-height: 80vh;
  object-fit: contain;
  border-radius: 8px; background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.imgviewer__close {
  position: absolute; top: 14px; right: 16px;
  width: 40px; height: 40px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .16); color: #fff;
  font-size: 18px; cursor: pointer; line-height: 1;
}
.imgviewer__close:hover { background: rgba(255, 255, 255, .3); }
.imgviewer__bar {
  position: absolute; left: 0; right: 0; bottom: 16px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: #fff; font-size: 13px;
}
.imgviewer__name { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.imgviewer__open { color: #fff; text-decoration: underline; opacity: .9; }
