:root {
  color-scheme: light;
  --ink: #17324d;
  --ink-soft: #294962;
  --muted: #71869a;
  --canvas: #edf4f7;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --line: #d9e5eb;
  --line-strong: #c8d8e1;
  --brand: #147d78;
  --brand-dark: #0d625d;
  --brand-soft: #e5f4f2;
  --success: #16805b;
  --success-soft: #edf9f3;
  --warning: #a66b13;
  --warning-soft: #fff8e9;
  --danger: #bd4d46;
  --danger-dark: #9c3833;
  --danger-soft: #fff2f1;
  --shadow: 0 22px 60px rgba(25, 58, 83, .12);
  --shadow-soft: 0 8px 24px rgba(25, 58, 83, .08);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(20, 125, 120, .08), transparent 34rem),
    linear-gradient(135deg, #eaf3f7 0%, #f8fbfc 62%, #eef5f6 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(20, 125, 120, .26);
  outline-offset: 3px;
}

.app-shell { width: min(980px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0 54px; }
.demo-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 9px 13px;
  border: 1px solid #efd9aa;
  border-radius: 999px;
  background: rgba(255, 249, 235, .88);
  color: #835b1c;
  font-size: 13px;
  font-weight: 700;
}
.demo-banner__dot { width: 8px; height: 8px; border-radius: 50%; background: #c58b2b; box-shadow: 0 0 0 4px rgba(197, 139, 43, .12); }

.hero { display: flex; align-items: center; gap: 15px; padding: 28px 4px 25px; }
.brand-mark { flex: none; width: 52px; height: 52px; color: var(--brand); }
.brand-mark svg { width: 100%; height: 100%; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.hero h1 { margin: 0 0 6px; font-size: clamp(30px, 5vw, 46px); letter-spacing: -.045em; line-height: 1.06; }
.subtitle { margin: 0; color: var(--muted); line-height: 1.65; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.hero-note__icon { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.65); font-weight: 800; }

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border: 1px solid transparent; border-radius: 14px; color: #8b9dad; transition: .2s ease; }
.step__number { display: grid; place-items: center; flex: none; width: 31px; height: 31px; border-radius: 50%; background: #dce7ed; color: #7590a1; font-size: 13px; font-weight: 800; }
.step__copy { display: grid; gap: 2px; min-width: 0; }
.step__copy strong { color: inherit; font-size: 13px; }
.step__copy small { color: inherit; font-size: 11px; opacity: .82; white-space: nowrap; }
.step.is-active { border-color: rgba(20, 125, 120, .16); background: rgba(255,255,255,.58); color: var(--brand-dark); box-shadow: var(--shadow-soft); }
.step.is-active .step__number, .step.is-done .step__number { background: var(--brand); color: #fff; }
.step.is-done { color: var(--brand-dark); }

.wizard-card { padding: 32px; border: 1px solid rgba(211, 226, 233, .95); border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); animation: card-in .28s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.screen[hidden] { display: none; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
h2 { margin: 0 0 9px; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.03em; line-height: 1.15; }
.helper { margin: 0; max-width: 620px; color: var(--muted); line-height: 1.7; }
.heading-badge, .connection-pill { flex: none; margin-top: 2px; padding: 8px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.connection-pill { display: flex; align-items: center; gap: 7px; background: var(--success-soft); color: var(--success); }
.status-dot, .pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

.drop-zone { display: grid; place-items: center; gap: 13px; margin-top: 26px; padding: 34px 24px; border: 1.5px dashed #9fc9c5; border-radius: 20px; background: linear-gradient(145deg, #f2fbfa, #f8fcfd); text-align: center; transition: .2s ease; }
.drop-zone:hover, .drop-zone:focus-visible { border-color: var(--brand); background: #eef9f7; }
.drop-zone.is-dragging { border-color: var(--brand); background: #e3f5f2; transform: scale(1.005); }
.drop-zone__icon { width: 55px; height: 55px; }
.drop-zone__icon svg { width: 100%; height: 100%; }
.drop-zone__copy { display: grid; gap: 5px; }
.drop-zone__copy strong { font-size: 17px; }
.drop-zone__copy span { color: var(--muted); font-size: 13px; }
.demo-file-button { min-height: 30px; padding: 3px 8px; font-size: 12px; font-weight: 700; }

.primary-button, .secondary-button, .danger-button, .text-button { min-height: 46px; border: 0; border-radius: 12px; padding: 12px 18px; cursor: pointer; font-weight: 800; transition: background .18s ease, transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.primary-button { background: var(--brand); color: #fff; box-shadow: 0 7px 14px rgba(20, 125, 120, .18); }
.primary-button:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 10px 18px rgba(20, 125, 120, .24); }
.primary-button:disabled { cursor: not-allowed; opacity: .46; transform: none; box-shadow: none; }
.secondary-button { background: #edf3f6; color: var(--ink); }
.secondary-button:hover { background: #e1ebef; }
.danger-button { background: var(--danger); color: #fff; }
.danger-button:hover { background: var(--danger-dark); transform: translateY(-1px); }
.danger-button:disabled { cursor: not-allowed; opacity: .42; transform: none; }
.text-button { min-height: 42px; padding-left: 0; background: transparent; color: var(--brand-dark); }
.text-button:hover { color: var(--brand); }

.file-card { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.file-card.is-hidden { display: none; }
.file-card__icon { display: grid; place-items: center; flex: none; width: 39px; height: 39px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); font-size: 18px; font-weight: 900; }
.file-card__content { min-width: 0; flex: 1; }
.file-card__name { overflow: hidden; margin: 0 0 4px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.file-card__meta { margin: 0; color: var(--muted); font-size: 12px; }
.file-card__date { color: var(--brand-dark); font-weight: 800; }
.tip-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 17px; color: var(--muted); }
.tip-row__icon { display: grid; place-items: center; flex: none; width: 19px; height: 19px; border: 1px solid #acc2ce; border-radius: 50%; color: #7891a1; font-size: 12px; font-weight: 900; }
.tip-row p { margin: 0; font-size: 12px; line-height: 1.6; }
code { padding: 2px 5px; border-radius: 5px; background: #edf3f6; color: var(--ink-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }

.advanced-settings { margin-top: 23px; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); }
.advanced-settings summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-size: 13px; font-weight: 800; }
.advanced-settings summary::-webkit-details-marker { display: none; }
.advanced-settings summary::after { content: "＋"; color: var(--brand); font-size: 18px; }
.advanced-settings[open] summary::after { content: "－"; }
.advanced-settings summary small { margin-left: auto; margin-right: 12px; color: #9aaab7; font-weight: 500; }
.advanced-settings__body { max-width: 320px; padding-top: 13px; }
.advanced-settings label, .dialog label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.advanced-settings input, .dialog input, .demo-controls select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--ink); }
.advanced-settings__body p { margin: 8px 0 0; font-size: 12px; line-height: 1.5; }

.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.card-footer--back { margin-top: 22px; }
.footer-hint { color: var(--muted); font-size: 12px; }

.selected-file-mini { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 8px 11px; border-radius: 9px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.selected-file-mini::before { content: "▣"; color: var(--brand); }
.progress-panel { margin-top: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fbfdfe; }
.progress-panel__intro { display: flex; align-items: center; gap: 9px; color: var(--brand-dark); font-size: 14px; font-weight: 800; }
.progress-list { display: grid; gap: 11px; margin: 18px 0 0; padding: 0; list-style: none; }
.progress-list li { display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 10px; color: #93a3af; font-size: 13px; }
.progress-list li > span:first-child { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 11px; font-weight: 800; }
.progress-list li b { font-size: 11px; font-weight: 600; }
.progress-list li.is-active { color: var(--brand-dark); }
.progress-list li.is-active > span:first-child { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.progress-list li.is-active b { color: var(--brand); }
.progress-list li.is-done { color: var(--ink-soft); }
.progress-list li.is-done > span:first-child { border-color: #bfe4d3; background: var(--success-soft); color: var(--success); }
.progress-list li.is-done b { color: var(--success); }

.status-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.status-card.success { border-color: #bfe5d1; background: var(--success-soft); }
.status-card.error { border-color: #efc5c2; background: var(--danger-soft); }
.status-card__title { display: flex; align-items: center; gap: 10px; margin: 0 0 7px; font-size: 18px; }
.status-card__mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--success); color: #fff; font-size: 15px; }
.status-card.error .status-card__mark { background: var(--danger); }
.status-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 17px; }
.metric { padding: 14px; border: 1px solid rgba(213,226,232,.75); border-radius: 13px; background: rgba(255,255,255,.76); }
.metric strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 28px; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: 12px; }
.result-details { display: grid; gap: 10px; margin-top: 18px; }
.result-detail { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border-radius: 11px; background: #f7fafb; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.result-detail__mark { color: var(--success); font-weight: 900; }
.result-detail--warning { background: var(--warning-soft); color: #79551c; }
.result-detail--warning .result-detail__mark { color: var(--warning); }
.anomaly-list { display: grid; gap: 9px; margin: 17px 0 0; padding: 0; list-style: none; }
.anomaly-list > li { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: start; position: relative; padding: 11px 13px; border-radius: 11px; background: rgba(255,255,255,.7); color: #77433f; font-size: 13px; line-height: 1.5; }
.anomaly-list li::before { content: "!"; display: grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 50%; background: #f3c6c2; color: var(--danger-dark); font-size: 12px; font-weight: 900; }
/* 信息级（非关键）异常：绿色 ✓ 图标，区别于红色 ! 的关键异常 */
.anomaly-list li.is-info::before { content: "✓"; background: #c9e8d4; color: #1a7f4b; }
/* 信息级面板内的复制按钮同步用绿色底 */
.anomaly-list li.is-info .anomaly-copy { background: rgba(26, 127, 75, .12); color: #1a7f4b; }
.anomaly-list li.is-info .anomaly-copy:hover { background: rgba(26, 127, 75, .22); }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.action-row--center { justify-content: center; }
/* 第 2~4 步主操作按钮靠右（左侧保留返回类次要按钮） */
#start-check, #confirm-generate, #ignore-error, #final-generate { margin-left: auto; }

.confirm-panel { display: grid; gap: 13px; padding: 21px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-soft); }
.confirm-panel__row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.confirm-panel__row:last-child { padding-bottom: 0; border-bottom: 0; }
.confirm-panel__row strong { color: var(--ink); text-align: right; }
.confirm-panel__safe { display: flex; align-items: center; gap: 8px; margin-top: 2px; color: var(--success); font-size: 13px; font-weight: 800; }
.confirm-panel__safe::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #ccebdd; }
.confirm-panel--partial { border-color: #edc7c3; background: var(--danger-soft); }
.confirm-panel--partial .confirm-panel__safe { color: var(--danger-dark); }
.confirm-panel--partial .confirm-panel__safe::before { content: "!"; background: #f4ccc8; }

.success-hero { display: grid; justify-items: center; padding: 6px 0 20px; text-align: center; }
.success-hero__icon { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 16px; border-radius: 22px; background: var(--success); color: #fff; font-size: 34px; font-weight: 500; box-shadow: 0 12px 26px rgba(22,128,91,.22); }
.success-hero .section-kicker { margin-bottom: 6px; }
.success-hero h2 { margin-bottom: 7px; }
.success-hero p:last-child { margin: 0; color: var(--muted); }
.success-file { display: flex; align-items: center; gap: 13px; padding: 18px; border: 1px solid #bfe5d1; border-radius: 16px; background: var(--success-soft); }
.success-file__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #ccebdd; color: var(--success); font-weight: 900; }
.success-file strong { display: block; margin-bottom: 4px; }
.success-file span { color: var(--muted); font-size: 12px; }

.demo-controls { display: flex; align-items: center; gap: 12px; margin-top: 17px; color: var(--muted); font-size: 12px; }
.demo-controls__label { display: flex; align-items: center; gap: 7px; font-weight: 800; }
.sliders-icon { color: var(--brand); font-size: 17px; line-height: 1; }
.select-wrap { min-width: 145px; }
.demo-controls select { padding: 8px 10px; font-size: 12px; }
.demo-controls__hint { opacity: .8; }

.dialog { width: min(440px, calc(100% - 32px)); border: 0; border-radius: 20px; padding: 0; color: var(--ink); box-shadow: 0 26px 80px rgba(17,42,63,.24); }
.dialog::backdrop { background: rgba(17, 42, 63, .38); backdrop-filter: blur(3px); }
.dialog__form { position: relative; padding: 29px; }
.dialog__close { position: absolute; top: 16px; right: 17px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 24px; line-height: 1; }
.dialog__close:hover { background: #eef3f5; color: var(--ink); }
.dialog__helper { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.dialog__form label + label { margin-top: 13px; }
.confirm-check { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 8px; margin-top: 18px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.72); color: var(--ink-soft) !important; }
.confirm-check input { width: 17px; height: 17px; accent-color: var(--danger); }
.dialog--danger { border: 1px solid #efc7c3; background: var(--danger-soft); }
.dialog--danger .dialog__form { padding-top: 31px; }
.danger-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 13px; border-radius: 13px; background: #f2c7c3; color: var(--danger-dark); font-size: 23px; font-weight: 900; }
.section-kicker--danger { color: var(--danger-dark); }

.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; }

@media (max-width:680px) {
  .app-shell { width: min(100% - 22px, 640px); padding-top: 14px; }
  .hero { align-items: flex-start; flex-wrap: wrap; padding-top: 23px; }
  .hero-note { width: 100%; margin: 0 0 0 67px; }
  .stepper { gap: 5px; }
  .step { justify-content: center; padding: 8px 4px; }
  .step__copy { display: none; }
  .step__number { width: 30px; height: 30px; }
  .wizard-card { padding: 23px 20px; border-radius: 18px; }
  .card-heading { display: block; }
  .heading-badge, .connection-pill { display: inline-flex; margin-top: 16px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .card-footer { align-items: stretch; flex-direction: column; }
  .card-footer .primary-button { width: 100%; }
  .footer-hint { text-align: center; }
  .demo-controls { align-items: flex-start; flex-wrap: wrap; }
  .demo-controls__hint { width: 100%; padding-left: 29px; }
}

@media (max-width:430px) {
  .demo-banner { width: 100%; justify-content: center; }
  .hero { gap: 10px; }
  .brand-mark { width: 43px; height: 43px; }
  .hero h1 { font-size: 30px; }
  .hero-note { margin-left: 53px; }
  .drop-zone { padding: 27px 15px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric { padding: 12px 10px; }
  .metric strong { font-size: 24px; }
  .metric span { font-size: 11px; }
  .action-row > button { width: 100%; }
}

/* ---- 正式版：文件列表与新组件 ---- */
.demo-banner--live { border-color: #bfe0d6; background: var(--success-soft); color: var(--success); }
.demo-banner--live .demo-banner__dot { background: var(--success); box-shadow: 0 0 0 4px rgba(22, 128, 91, .12); }

.file-list-head { display: flex; align-items: center; justify-content: space-between; margin-top: 26px; }
.file-list-head__label { color: var(--ink-soft); font-size: 13px; font-weight: 800; }
.refresh-button { min-height: 34px; padding: 5px 10px; font-size: 12px; }

.file-list { display: grid; gap: 10px; margin-top: 13px; }
.file-list__loading { padding: 26px 18px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); font-size: 13px; text-align: center; line-height: 1.7; }
.file-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 15px 17px; border: 1.5px solid var(--line); border-radius: 15px; background: var(--surface-soft); cursor: pointer; text-align: left; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.file-item:hover { border-color: #9fc9c5; background: #f2faf8; }
.file-item.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(20, 125, 120, .12); }
.file-item__icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: #e2edf2; color: var(--muted); font-size: 16px; font-weight: 900; }
.file-item.is-selected .file-item__icon { background: var(--brand); color: #fff; }
.file-item__main { min-width: 0; flex: 1; }
.file-item__name { display: block; overflow: hidden; color: var(--ink); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.file-item__meta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.spinner { display: inline-block; width: 15px; height: 15px; margin-right: 8px; border: 2px solid rgba(20, 125, 120, .25); border-top-color: var(--brand); border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
.spinner--light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.metric--danger { border-color: #efc5c2; background: var(--danger-soft); }
.metric--danger strong { color: var(--danger-dark); }

@media (max-width:430px) {
  .file-item { padding: 13px 13px; }
  .file-item__name { font-size: 14px; }
}

/* ---- 异常“查看详情” ---- */
.anomaly-list__text { min-width: 0; }
/* 明细行账号前的复制按钮（小尺寸） */
.anomaly-copy { cursor: pointer; align-self: center; padding: 1px 8px; border: 0; border-radius: 6px; background: rgba(189, 77, 70, .12); color: var(--danger-dark); font-size: 11px; font-weight: 800; font-family: inherit; }
.anomaly-copy:hover { background: rgba(189, 77, 70, .22); }
.anomaly-toggle { cursor: pointer; padding: 3px 10px; border: 0; border-radius: 8px; background: rgba(189, 77, 70, .1); color: var(--danger-dark); font-size: 12px; font-weight: 800; font-family: inherit; }
.anomaly-toggle:hover { background: rgba(189, 77, 70, .18); }
/* 面板为 li 的直接 grid 项，跨整行在文档流内展开，把后续列表项往下顶 */
.anomaly-detail__panel { display: grid; gap: 6px; max-height: 220px; grid-column: 1 / -1; margin: 9px 0 2px; padding: 11px 13px; overflow-y: auto; list-style: none; border: 1px solid #f0d4d1; border-radius: 10px; background: rgba(255, 255, 255, .82); }
.anomaly-detail__panel[hidden] { display: none; }
.anomaly-detail__panel li { display: flex; flex-wrap: wrap; gap: 4px 9px; align-items: baseline; padding: 0; background: none; color: #77433f; font-size: 12px; }
.anomaly-detail__panel li::before { content: none; }
.anomaly-detail__panel code { font-size: 12px; font-weight: 700; }
.anomaly-detail__panel span { color: var(--muted); line-height: 1.5; }
/* 说明文字靠右显示（与左侧“账号+位置”同行，过长时整段换行仍右对齐） */
.anomaly-detail__panel .anomaly-detail__note { margin-left: auto; text-align: right; }
/* 失败时的技术细节（子进程输出尾部），可滚动 */
.error-detail { max-height: 240px; margin: 10px 0 0; padding: 10px 12px; overflow: auto; border: 1px solid #f0d4d1; border-radius: 8px; background: #fff; color: #7a3b36; font: 11px/1.55 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }

/* ---- 附件上传模式 ---- */
.upload-hint { color: var(--muted); font-size: 12px; }
.upload-status { min-height: 21px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.upload-status:empty { margin-top: 0; }
.file-card__ready { flex: none; color: var(--success); font-size: 12px; font-weight: 800; }
.report-link { margin: 13px 0 0; font-size: 13px; }
.report-link a { color: var(--brand-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 430px) {
  .file-card { align-items: flex-start; }
  .file-card__ready { padding-top: 4px; }
  .upload-hint { font-size: 11px; }
}

/* ---- 第四步：平均汇率偏差 ---- */
.rate-deviation-panel { margin-top: 16px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.rate-deviation-panel--ok { border-color: #bfe5d1; background: var(--success-soft); }
.rate-deviation-panel--warning { border-color: #efd39d; background: var(--warning-soft); }
.rate-deviation-panel__title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; font-weight: 900; }
.rate-deviation-panel__title span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #ccebdd; color: var(--success); }
.rate-deviation-panel--warning .rate-deviation-panel__title span { background: #f4dcae; color: var(--warning); }
.rate-deviation-panel p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.rate-deviation-panel small { display: block; margin-top: 8px; color: var(--muted); line-height: 1.6; }
.rate-deviation-panel ul { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.rate-deviation-panel li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.68); color: var(--ink-soft); font-size: 12px; }
.rate-deviation-panel li strong { color: var(--danger-dark); }
.rate-deviation-panel li span { color: var(--muted); }

.app-version { display: inline-block; margin-left: 8px; padding: 5px 9px; border: 1px solid #bfe0d6; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 12px; font-weight: 800; letter-spacing: .02em; vertical-align: middle; }
@media (max-width: 430px) { .app-version { margin-left: 4px; padding: 4px 7px; font-size: 10px; } }

/* ---- 国家基准汇率表与偏差账号复制 ---- */
.rate-baseline-table-wrap { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.7); }
.rate-baseline-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rate-baseline-table th, .rate-baseline-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.rate-baseline-table th:first-child, .rate-baseline-table td:first-child { text-align: left; }
.rate-baseline-table tr:last-child td { border-bottom: 0; }
.rate-baseline-table th { background: rgba(20,125,120,.08); color: var(--ink-soft); font-weight: 800; }
.rate-baseline-table td { color: var(--muted); }
.rate-deviation-account { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rate-deviation-account strong { color: var(--danger-dark); overflow-wrap: anywhere; }
.rate-deviation-account .anomaly-copy { flex: none; }
.rate-deviation-empty { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.rate-deviation-panel li span { text-align: right; }
@media (max-width: 520px) {
  .rate-deviation-panel li { display: block; }
  .rate-deviation-panel li > span { display: block; margin-top: 5px; text-align: left; }
}
