:root {
  --ink: #18231f;
  --ink-soft: #52615b;
  --muted: #75827d;
  --line: #d8e2de;
  --line-strong: #bdcbc5;
  --surface: #ffffff;
  --surface-soft: #f5f9f7;
  --canvas: #eaf2ef;
  --primary: #0d715f;
  --primary-dark: #095849;
  --primary-soft: #dff0ea;
  --accent: #df664c;
  --accent-soft: #fff0eb;
  --warning: #a86a12;
  --warning-soft: #fff6e5;
  --danger: #b23f44;
  --danger-soft: #fff0f1;
  --success: #237a55;
  --success-soft: #e7f5ed;
  --shadow-sm: 0 8px 24px rgb(25 48 39 / 8%);
  --shadow-md: 0 20px 50px rgb(22 43 35 / 14%);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 18px;
  --font: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--canvas); }

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 45%) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgb(255 255 255 / 45%) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--canvas);
  font-family: var(--font);
  letter-spacing: 0;
}

button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgb(13 113 95 / 20%);
  outline-offset: 2px;
}

.prototype-shell { min-height: 100dvh; display: flex; flex-direction: column; }

.prototype-header {
  min-height: 66px;
  padding: 10px clamp(14px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(44px, 1fr);
  align-items: center;
  gap: 18px;
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
}

.prototype-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 800;
  box-shadow: 0 8px 20px rgb(13 113 95 / 20%);
}
.brand-copy { min-width: 0; }
.brand-copy strong, .brand-copy small { display: block; white-space: nowrap; }
.brand-copy strong { font-size: 14px; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.prototype-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  scrollbar-width: none;
}
.prototype-tabs::-webkit-scrollbar { display: none; }
.prototype-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.prototype-tab:hover { color: var(--ink); background: rgb(255 255 255 / 72%); }
.prototype-tab.is-active { color: white; background: var(--primary); box-shadow: 0 5px 14px rgb(13 113 95 / 18%); }

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-size: 20px;
}
.icon-button:hover { border-color: var(--primary); color: var(--primary); }
.reset-demo { justify-self: end; }

.view-root { flex: 1; min-height: 0; }
.view-enter { animation: view-in 260ms ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.workspace {
  width: min(1500px, 100%);
  min-height: calc(100dvh - 67px);
  margin: 0 auto;
  padding: 28px clamp(14px, 3vw, 34px) 40px;
}

.prototype-note {
  max-width: 1150px;
  margin: 0 auto 18px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  background: rgb(255 255 255 / 76%);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 11px;
}
.prototype-note strong { color: var(--primary); }

.mini-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(340px, 430px) minmax(230px, 300px);
  justify-content: center;
  align-items: start;
  gap: clamp(20px, 4vw, 54px);
}

.demo-rail { position: sticky; top: 95px; }
.rail-title { margin: 0 0 12px; font-size: 13px; }
.rail-section { padding: 16px 0; border-top: 1px solid var(--line-strong); }
.rail-section:first-of-type { border-top: 0; padding-top: 0; }
.rail-label { color: var(--muted); font-size: 10px; font-weight: 700; }
.rail-value { margin-top: 6px; font-size: 13px; font-weight: 750; line-height: 1.5; }
.rail-copy { margin: 7px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.rail-list { margin: 9px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rail-list li { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.rail-list li::before { content: ''; width: 6px; height: 6px; margin-top: 5px; background: var(--primary); flex: 0 0 auto; }

.phone-frame {
  width: 100%;
  max-width: 410px;
  min-height: 760px;
  padding: 11px;
  border-radius: 34px;
  background: #17241f;
  box-shadow: 0 26px 80px rgb(18 42 33 / 26%);
  position: relative;
}
.phone-frame::before {
  content: '';
  width: 104px;
  height: 24px;
  position: absolute;
  z-index: 8;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 0 0 16px 16px;
  background: #0d1512;
}
.phone-screen {
  height: 738px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 25px;
  background: #fbfdfc;
  position: relative;
}

.mini-statusbar {
  height: 34px;
  padding: 12px 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #45524c;
  font-size: 9px;
  font-weight: 700;
}
.status-icons { display: flex; align-items: center; gap: 4px; }
.status-icons i { display: block; width: 12px; height: 6px; border: 1px solid currentColor; }

.mini-header {
  min-height: 50px;
  padding: 8px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(216 226 222 / 72%);
  background: rgb(251 253 252 / 92%);
  position: relative;
  z-index: 4;
}
.mini-header-title { font-size: 14px; font-weight: 800; }
.mini-header-actions { display: flex; gap: 6px; }
.mini-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--ink-soft);
  font-size: 12px;
}

.mini-page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #becdc6 transparent;
}
.mini-page-inner { min-height: 100%; padding: 22px 20px 100px; }
.mini-page-inner.no-nav { padding-bottom: 28px; }
.mini-page-inner.centered { display: flex; flex-direction: column; justify-content: center; }

.mini-nav {
  height: 62px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  flex: 0 0 auto;
}
.mini-nav button { border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; }
.mini-nav button span { display: block; margin: 0 auto 4px; font-size: 16px; line-height: 1; }
.mini-nav button.is-active { color: var(--primary); }

.page-kicker { color: var(--primary); font-size: 10px; font-weight: 800; }
.page-title { margin: 7px 0 0; font-size: 24px; line-height: 1.25; }
.page-copy { margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }

.step-progress { margin: 18px 0 22px; }
.step-progress-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.step-progress-track { height: 6px; margin-top: 7px; border-radius: 6px; overflow: hidden; background: #e2ebe7; }
.step-progress-value { height: 100%; background: var(--primary); transition: width 360ms ease; }

.progress-hero {
  margin: -22px -20px 0;
  padding: 25px 20px 23px;
  color: white;
  background: var(--primary);
  position: relative;
  overflow: hidden;
}
.progress-hero::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  right: -65px;
  bottom: -80px;
  border: 26px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
}
.progress-label { font-size: 10px; opacity: .76; }
.progress-number { margin-top: 6px; font-size: 42px; line-height: 1; font-weight: 800; }
.progress-caption { margin-top: 8px; font-size: 11px; opacity: .8; }

.next-task { padding: 17px 0 16px; border-bottom: 1px solid var(--line); }
.next-task-label { color: var(--accent); font-size: 9px; font-weight: 800; }
.next-task h3 { margin: 6px 0 5px; font-size: 17px; }
.next-task p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.upcoming-form { margin-top: 18px; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.upcoming-form div { min-width: 0; }
.upcoming-form small { display: block; color: var(--accent); font-size: 9px; font-weight: 800; }
.upcoming-form strong { display: block; margin-top: 4px; color: var(--ink); font-size: 12px; }
.upcoming-form p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.upcoming-form > .button { flex: 0 0 auto; min-height: 32px; padding: 0 6px; font-size: 9px; }

.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 18px; }
.summary-item { min-height: 76px; padding: 13px; border: 1px solid var(--line); background: white; border-radius: var(--radius-sm); }
.summary-item strong { display: block; color: var(--primary); font-size: 22px; }
.summary-item span { display: block; margin-top: 7px; color: var(--ink-soft); font-size: 10px; }

.button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 9px 22px rgb(13 113 95 / 18%);
}
.button:hover { background: var(--primary-dark); }
.button.full { width: 100%; }
.button.secondary { background: white; color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.button.secondary:hover { color: var(--primary); border-color: var(--primary); }
.button.danger { background: var(--danger); box-shadow: none; }
.button.text { min-height: 34px; padding: 0; color: var(--primary); background: transparent; border: 0; box-shadow: none; }
.button:disabled { cursor: not-allowed; opacity: .46; }
.button-row { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.button-row > * { flex: 1; }

.field-group { margin-top: 18px; }
.field-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; font-size: 11px; font-weight: 750; }
.field-label small { color: var(--muted); font-weight: 500; }
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  font-size: 12px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.input, .select { height: 44px; padding: 0 12px; }
.textarea { min-height: 110px; padding: 12px; resize: vertical; line-height: 1.65; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(13 113 95 / 10%); outline: 0; }
.field-hint { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.field-error { margin-top: 6px; color: var(--danger); font-size: 9px; }

.choice-list { display: grid; gap: 8px; }
.choice {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}
.choice input { margin: 2px 0 0; accent-color: var(--primary); }
.choice:has(input:checked) { border-color: var(--primary); color: var(--ink); background: var(--primary-soft); }
.form-grid.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.compact-choice { align-items: center; margin-top: 18px; }

.reading-block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.reading-block:first-of-type { margin-top: 10px; }
.reading-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.reading-block h3 { margin: 0; font-size: 14px; line-height: 1.45; }
.reading-block p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.read-status { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.read-status.done { border-color: #a9d2bf; color: var(--success); background: var(--success-soft); }
.reading-gate-scroll { max-height: 270px; overflow-y: auto; padding-right: 8px; scrollbar-color: var(--primary) var(--primary-soft); }
.reading-gate-panel { display: grid; gap: 8px; margin-top: 14px; padding: 11px 12px; border: 1px solid var(--line); background: var(--primary-soft); }
.reading-gate-panel > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.reading-gate-panel strong { color: var(--ink); font-size: 10px; }
.reading-gate-panel small { color: var(--muted); font-size: 9px; text-align: right; }
.reading-gate-status.is-ready { color: var(--success); }
.agreement-reader-page { padding-top: 16px; padding-bottom: 30px; }
.agreement-reader-meta { padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.agreement-reader-meta span, .agreement-reader-meta small { display: block; color: var(--muted); font-size: 9px; }
.agreement-reader-meta strong { display: block; margin: 5px 0; color: var(--ink); font-size: 14px; line-height: 1.45; }
.agreement-reader-page .agreement-document { margin-top: 14px; padding: 20px 16px; }
.agreement-reader-page .agreement-document h3 { margin: 0 0 16px; font-size: 16px; }
.agreement-reader-page .agreement-document p { margin: 0 0 14px; font-size: 11px; line-height: 1.85; }
.reading-countdown { margin: 14px 0 10px; padding: 12px 13px; border-left: 3px solid var(--primary); background: var(--primary-soft); }
.reading-countdown strong, .reading-countdown small { display: block; }
.reading-countdown strong { color: var(--ink); font-size: 10px; }
.reading-countdown small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.confirmation-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 15px; background: var(--line); border: 1px solid var(--line); }
.confirmation-identity div { min-width: 0; padding: 11px 12px; background: white; }
.confirmation-identity small, .confirmation-identity strong { display: block; }
.confirmation-identity small { color: var(--muted); font-size: 8px; }
.confirmation-identity strong { margin-top: 5px; overflow-wrap: anywhere; color: var(--ink); font-size: 10px; }
.confirmation-intro { margin-top: 12px; padding: 11px 12px; color: var(--ink-soft); background: var(--primary-soft); font-size: 9px; line-height: 1.6; }
.form-section-heading { margin: 24px 0 2px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.form-section-heading strong { color: var(--ink); font-size: 12px; }
.disposition-preview-page { padding-bottom: 30px; }
.preview-section-list { margin-top: 18px; border-top: 1px solid var(--line); }
.preview-section-list section { padding: 14px 0; border-bottom: 1px solid var(--line); }
.preview-section-list section > strong { display: block; margin-bottom: 8px; color: var(--primary); font-size: 11px; }
.preview-section-list section > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 6px 0; }
.preview-section-list span { color: var(--ink); font-size: 10px; line-height: 1.45; }
.preview-section-list small { flex: 0 0 auto; color: var(--muted); font-size: 8px; }

.notice { padding: 12px 13px; margin-top: 14px; border-left: 3px solid var(--primary); background: var(--primary-soft); color: var(--ink-soft); font-size: 10px; line-height: 1.6; }
.notice.warning { border-color: var(--warning); background: var(--warning-soft); }
.notice.danger { border-color: var(--danger); background: var(--danger-soft); }

.signature-pad { margin-top: 15px; border: 1px solid var(--line-strong); background: white; border-radius: var(--radius-sm); overflow: hidden; }
.signature-pad canvas { width: 100%; height: 190px; display: block; touch-action: none; background: linear-gradient(#fff, #fcfdfc); }
.signature-line { margin: 0 20px 22px; border-top: 1px solid #aebbb5; color: var(--muted); text-align: center; font-size: 8px; padding-top: 5px; }

.amount { margin: 16px 0 4px; font-size: 38px; font-weight: 800; }
.amount small { margin-right: 4px; font-size: 16px; }
.order-meta { display: grid; gap: 7px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meta-row { display: flex; justify-content: space-between; gap: 15px; color: var(--ink-soft); font-size: 10px; }
.meta-row strong { color: var(--ink); }

.status-banner { padding: 16px; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; }
.status-banner.success { border-color: #b4d9c5; background: var(--success-soft); }
.status-banner.failed { border-color: #e0b7ba; background: var(--danger-soft); }
.status-banner strong { display: block; font-size: 13px; }
.status-banner p { margin: 6px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }

.upload-zone { padding: 24px 16px; margin-top: 16px; border: 1px dashed var(--line-strong); background: white; text-align: center; border-radius: var(--radius-sm); }
.upload-symbol { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 10px; background: var(--primary-soft); color: var(--primary); border-radius: 50%; font-size: 23px; }
.upload-zone strong { display: block; font-size: 12px; }
.upload-zone p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.video-item { margin-top: 14px; padding: 12px; display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); background: white; }
.video-thumb { width: 58px; height: 44px; display: grid; place-items: center; background: #19382e; color: white; font-size: 16px; }
.video-info strong { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.video-info small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.upload-track { height: 4px; margin-top: 6px; background: #dfe7e3; }
.upload-value { height: 100%; background: var(--primary); transition: width .2s linear; }

.record-list { margin-top: 13px; border-top: 1px solid var(--line); }
.record-row { width: 100%; min-height: 58px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; text-align: left; color: var(--ink); background: transparent; }
.record-icon { width: 34px; height: 34px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 800; }
.record-copy strong, .record-copy small { display: block; }
.record-copy strong { font-size: 11px; }
.record-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.record-arrow { color: var(--muted); font-size: 18px; }

.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.calendar-head strong { font-size: 14px; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 12px; }
.calendar span { aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); font-size: 9px; }
.calendar span.label { aspect-ratio: auto; font-size: 8px; }
.calendar span.checked { color: white; background: var(--primary); }
.calendar span.today { color: var(--accent); border: 1px solid var(--accent); }

.login-orbit { width: 110px; height: 110px; margin: 0 auto 24px; position: relative; }
.login-orbit::before, .login-orbit::after { content: ''; position: absolute; border: 1px solid #a7cbc0; border-radius: 50%; }
.login-orbit::before { inset: 0; }
.login-orbit::after { inset: 15px; border-color: #d6e8e1; }
.login-core { position: absolute; inset: 31px; display: grid; place-items: center; background: var(--primary); color: white; border-radius: 50%; font-size: 22px; font-weight: 800; box-shadow: 0 12px 30px rgb(13 113 95 / 25%); }
.login-promise { display: flex; gap: 9px; margin: 18px 0 22px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.login-promise span { flex: 1; color: var(--muted); font-size: 9px; text-align: center; }

.admin-workspace { min-height: calc(100dvh - 67px); display: grid; grid-template-columns: 224px 1fr; background: #f5f8f7; }
.admin-sidebar { padding: 20px 14px; color: #c8d8d1; background: #183229; position: sticky; top: 67px; height: calc(100dvh - 67px); overflow-y: auto; }
.admin-sidebar-brand { padding: 4px 8px 20px; color: white; font-size: 15px; font-weight: 800; }
.admin-sidebar-label { padding: 12px 9px 7px; color: #789087; font-size: 9px; font-weight: 800; }
.admin-nav { display: grid; gap: 3px; }
.admin-nav button { min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); color: #c8d8d1; background: transparent; text-align: left; font-size: 11px; }
.admin-nav button:hover { background: rgb(255 255 255 / 7%); }
.admin-nav button.is-active { color: white; background: var(--primary); }
.admin-main { min-width: 0; }
.admin-topbar { min-height: 62px; padding: 10px clamp(18px, 3vw, 34px); display: flex; align-items: center; justify-content: space-between; gap: 18px; background: white; border-bottom: 1px solid var(--line); }
.admin-title h1 { margin: 0; font-size: 18px; }
.admin-title p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.admin-user { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 10px; }
.admin-avatar { width: 32px; height: 32px; display: grid; place-items: center; color: white; background: var(--accent); border-radius: 50%; font-weight: 800; }
.admin-content { padding: 24px clamp(18px, 3vw, 34px) 42px; }

.admin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-metric { padding: 17px; border: 1px solid var(--line); background: white; box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); }
.admin-metric small { color: var(--muted); font-size: 10px; }
.admin-metric strong { display: block; margin-top: 8px; font-size: 28px; }
.admin-metric em { display: block; margin-top: 8px; color: var(--success); font-size: 9px; font-style: normal; }

.section-head { margin: 25px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-head h2 { margin: 0; font-size: 15px; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }

.toolbar-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }
.toolbar-row .input, .toolbar-row .select { width: auto; min-width: 160px; }
.toolbar-row .button { min-height: 38px; font-size: 10px; }

.data-table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.data-table th, .data-table td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; vertical-align: middle; }
.data-table th { color: var(--muted); background: #f7faf8; font-size: 9px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfc; }

.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border: 1px solid var(--line); color: var(--ink-soft); background: white; font-size: 8px; font-weight: 750; }
.badge.success { color: var(--success); border-color: #aed5c0; background: var(--success-soft); }
.badge.warning { color: var(--warning); border-color: #efd39e; background: var(--warning-soft); }
.badge.danger { color: var(--danger); border-color: #e4b7bb; background: var(--danger-soft); }
.badge.info { color: var(--primary); border-color: #add3c6; background: var(--primary-soft); }

.split-workspace { display: grid; grid-template-columns: minmax(260px, 380px) minmax(420px, 1fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); background: white; box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); }
.panel-head { min-height: 52px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 12px; }
.panel-body { padding: 15px; }
.config-list { display: grid; }
.config-row { padding: 12px 13px; display: grid; grid-template-columns: 1fr auto; gap: 10px; border-bottom: 1px solid var(--line); background: white; }
.config-row:last-child { border-bottom: 0; }
.config-row.is-selected { background: var(--primary-soft); border-left: 3px solid var(--primary); }
.config-row strong { display: block; font-size: 10px; }
.config-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.row-actions { display: flex; align-items: center; gap: 4px; }
.row-actions button { width: 27px; height: 27px; border: 1px solid var(--line); background: white; color: var(--ink-soft); }
.row-actions button:hover { color: var(--primary); border-color: var(--primary); }

.preview-paper { min-height: 420px; padding: 30px 34px; border: 1px solid #d7dfdb; background: #fff; box-shadow: 0 14px 34px rgb(25 48 39 / 10%); }
.preview-paper h2 { margin: 0 0 20px; text-align: center; font-family: Georgia, "SimSun", serif; font-size: 20px; }
.preview-paper p { white-space: pre-line; color: #3c4843; font-family: Georgia, "SimSun", serif; font-size: 11px; line-height: 2; text-align: justify; }
.preview-sign { margin-top: 35px; display: flex; justify-content: flex-end; color: var(--muted); font-size: 10px; }

.admin-login { min-height: calc(100dvh - 67px); display: grid; place-items: center; padding: 30px; }
.admin-login-panel { width: min(420px, 100%); padding: 34px; border: 1px solid var(--line); background: white; box-shadow: var(--shadow-md); }
.admin-login-panel h1 { margin: 0; font-size: 22px; }
.admin-login-panel p { margin: 8px 0 22px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.flow-workspace, .layout-workspace, .audit-workspace { width: min(1280px, 100%); margin: 0 auto; padding: 34px clamp(14px, 4vw, 48px) 52px; }
.view-title { margin: 0; font-size: 28px; }
.view-subtitle { max-width: 760px; margin: 9px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }

.flow-grid { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 24px 34px; margin-top: 30px; position: relative; }
.flow-node { min-height: 128px; padding: 17px; border: 1px solid var(--line); background: white; box-shadow: var(--shadow-sm); position: relative; }
.flow-node::after { content: '→'; position: absolute; top: 50%; right: -26px; transform: translateY(-50%); color: var(--primary); font-size: 19px; }
.flow-node:nth-child(5)::after, .flow-node:last-child::after { display: none; }
.flow-node small { color: var(--primary); font-size: 9px; font-weight: 800; }
.flow-node h3 { margin: 9px 0 6px; font-size: 14px; }
.flow-node p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.flow-node.is-key { border-top: 4px solid var(--primary); }
.flow-node.is-accent { border-top: 4px solid var(--accent); }
.flow-branch { margin-top: 24px; padding: 17px; display: grid; grid-template-columns: 160px 1fr; gap: 18px; border: 1px solid var(--line); background: rgb(255 255 255 / 72%); }
.flow-branch strong { font-size: 12px; }
.flow-branch p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }


.audit-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.audit-count { padding: 19px; color: white; background: var(--primary); }
.audit-count.excluded { background: #4f5d57; }
.audit-count.pending { background: var(--accent); }
.audit-count strong { display: block; font-size: 30px; }
.audit-count span { display: block; margin-top: 6px; font-size: 10px; opacity: .82; }
.audit-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.audit-column { border-top: 4px solid var(--primary); background: white; box-shadow: var(--shadow-sm); }
.audit-column.excluded { border-color: #4f5d57; }
.audit-column.pending { border-color: var(--accent); }
.audit-column h2 { margin: 0; padding: 15px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.audit-list { margin: 0; padding: 0; list-style: none; }
.audit-list li { padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.audit-list li:last-child { border-bottom: 0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgb(10 24 19 / 68%); animation: fade-in .18s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(680px, 100%); max-height: min(780px, 92dvh); overflow: hidden; display: flex; flex-direction: column; background: white; box-shadow: 0 28px 90px rgb(0 0 0 / 30%); }
.modal-head { min-height: 58px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-head small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.modal-body { min-height: 0; overflow-y: auto; padding: 20px; }
.modal-foot { padding: 13px 18px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.agreement-document { min-height: 0; padding: 25px 30px; border: 1px solid var(--line); color: #35413c; background: #fff; font-family: Georgia, "SimSun", serif; }
.agreement-document h3 { text-align: center; font-size: 19px; }
.agreement-document p { line-height: 2; text-align: justify; font-size: 12px; }
.reading-disclaimer { margin-top: 16px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--ink-soft); font-size: 10px; line-height: 1.6; }

.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 9px; }
.toast { min-width: 240px; max-width: 360px; padding: 12px 14px; color: white; background: #173129; box-shadow: var(--shadow-md); animation: toast-in .22s ease both; font-size: 11px; line-height: 1.5; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.empty-state { padding: 34px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; color: var(--ink); font-size: 13px; }
.empty-state p { margin: 7px auto 0; max-width: 320px; font-size: 10px; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 1120px) {
  .prototype-header { grid-template-columns: auto 1fr auto; }
  .prototype-tabs { justify-self: stretch; overflow-x: auto; }
  .mini-workspace { grid-template-columns: minmax(340px, 430px) minmax(230px, 300px); }
  .mini-workspace .demo-rail:first-child { display: none; }
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .flow-grid { grid-template-columns: repeat(3, 1fr); }
  .flow-node:nth-child(5)::after { display: block; }
  .flow-node:nth-child(3n)::after, .flow-node:last-child::after { display: none; }
}

@media (max-width: 860px) {
  .prototype-header { grid-template-columns: 1fr auto; gap: 9px; }
  .prototype-brand { grid-column: 1; }
  .prototype-tabs { grid-column: 1 / 3; grid-row: 2; order: 3; }
  .reset-demo { grid-column: 2; grid-row: 1; }
  .workspace { min-height: calc(100dvh - 118px); padding-top: 18px; }
  .mini-workspace { grid-template-columns: minmax(320px, 410px); }
  .mini-workspace .demo-rail { display: none; }
  .admin-workspace { grid-template-columns: 74px 1fr; }
  .admin-sidebar { top: 118px; height: calc(100dvh - 118px); padding: 14px 8px; }
  .admin-sidebar-brand { padding: 5px 5px 16px; font-size: 0; }
  .admin-sidebar-brand::after { content: '资'; font-size: 16px; }
  .admin-sidebar-label { display: none; }
  .admin-nav button { padding: 0 5px; text-align: center; font-size: 9px; }
  .split-workspace, .audit-columns { grid-template-columns: 1fr; }
  .flow-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-node:nth-child(3n)::after { display: block; }
  .flow-node:nth-child(2n)::after, .flow-node:last-child::after { display: none; }
}

@media (max-width: 560px) {
  body { background: #fbfdfc; }
  .prototype-header { position: static; min-height: auto; padding: 9px 10px; }
  .brand-copy small { display: none; }
  .prototype-tabs { margin: 0 -10px -9px; padding: 5px 10px; border-width: 1px 0 0; border-radius: 0; }
  .prototype-tab { min-height: 34px; padding: 0 11px; }
  .workspace { padding: 0; min-height: auto; }
  .prototype-note { display: none; }
  .mini-workspace { display: block; }
  .phone-frame { max-width: none; min-height: calc(100dvh - 112px); padding: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .phone-frame::before { display: none; }
  .phone-screen { height: calc(100dvh - 112px); min-height: 660px; border-radius: 0; }
  .mini-statusbar { display: none; }
  .mini-header { min-height: 52px; }
  .admin-workspace { display: block; }
  .admin-sidebar { height: auto; position: static; display: flex; gap: 5px; padding: 8px 10px; overflow-x: auto; }
  .admin-sidebar-brand, .admin-sidebar-label { display: none; }
  .admin-nav { display: flex; gap: 5px; }
  .admin-nav button { min-width: 74px; }
  .admin-topbar { padding: 12px 14px; }
  .admin-content { padding: 16px 10px 30px; overflow-x: auto; }
  .admin-metrics, .audit-summary { grid-template-columns: 1fr 1fr; }
  .data-table { min-width: 700px; }
  .flow-workspace, .layout-workspace, .audit-workspace { padding: 23px 14px 38px; }
  .view-title { font-size: 23px; }
  .flow-grid { grid-template-columns: 1fr; gap: 17px; }
  .flow-node::after { content: '↓'; top: auto; right: 50%; bottom: -18px; transform: translateX(50%); }
  .flow-node:nth-child(n)::after { display: block; }
  .flow-node:last-child::after { display: none; }
  .flow-branch { grid-template-columns: 1fr; }
  .audit-summary, .audit-columns { grid-template-columns: 1fr; }
  .form-grid.two { grid-template-columns: 1fr; gap: 0; }
  .reading-gate-panel > div:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
  .reading-gate-panel small { text-align: left; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 92dvh; }
}
