:root {
  color-scheme: light;
  --ink: #152537;
  --muted: #596b7e;
  --line: #dfe7ef;
  --brand: #116a59;
  --danger: #a22838;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: #f3f7fa;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--brand); }
.wrap { width: min(1100px, calc(100% - 36px)); margin-inline: auto; }
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-row, .overview, .actions { display: flex; align-items: center; gap: 12px; }
.top-row, .overview { justify-content: space-between; }
.top-row { min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #e1f2ec; color: var(--brand); }
main { padding-block: 30px 52px; }
.narrow { max-width: 490px; }
h1 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 32px); letter-spacing: -.035em; line-height: 1.25; }
p { margin: 0 0 16px; }
.eyebrow { margin: 0 0 7px; font-size: 13px; font-weight: 700; color: var(--brand); }
.muted, .batch, .date { color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.form-card { padding: 24px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; padding: 8px 15px; border-radius: 7px; border: 1px solid transparent; text-decoration: none; font: inherit; font-size: 14px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.button:hover { filter: brightness(.93); }
.button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #63ad9c; outline-offset: 2px; }
.primary { background: var(--brand); color: #fff; }
.secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.danger { background: var(--danger); color: #fff; }
.danger-outline { color: var(--danger); background: #fff; border-color: #ead2d6; }
.small { min-height: 34px; padding: 5px 10px; }
.fill { width: 100%; }
label { display: block; font-size: 14px; font-weight: 650; margin-bottom: 6px; }
input:not([type=hidden]) { width: 100%; min-height: 44px; border: 1px solid #a9b8c8; border-radius: 7px; font: inherit; padding: 8px 11px; margin-bottom: 14px; }
code { padding: 2px 5px; border-radius: 4px; background: #eaf2ef; color: var(--brand); }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 16px; }
.metric { padding: 14px 18px; }
.metric span { display: block; color: var(--muted); font-size: 13px; }
.metric strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; background: #f8fafb; color: var(--muted); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.filename { display: block; font-weight: 650; overflow-wrap: anywhere; }
.batch { display: block; font-size: 12px; }
.date, .numeric { white-space: nowrap; font-variant-numeric: tabular-nums; }
.numeric { text-align: right; }
.actions { flex-wrap: wrap; }
td .actions { flex-wrap: nowrap; gap: 6px; }
.notice { padding: 10px 14px; border-radius: 7px; margin-bottom: 12px; }
.success { background: #def4e8; color: #155f46; }
.warning { background: #fff0db; color: #783a0c; }
.empty, .pager { padding: 16px; margin: 0; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: 14px; }
.impact { margin: 16px 0; }
.impact div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 9px 0; }
.impact dd { margin: 0; font-weight: 700; }
.import-dialog { width: min(490px, calc(100% - 24px)); max-height: calc(100% - 24px); color: var(--ink); }
.import-dialog::backdrop { background: #14253780; }
.import-dialog h2 { font-size: 23px; margin: 0 0 8px; }
.import-dialog input[type=file] { height: auto; font-size: 14px; }
.import-progress { margin-bottom: 12px; }
.import-progress progress { display: block; width: 100%; height: 14px; accent-color: var(--brand); }
.upload-metrics { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 5px; }
.import-status:empty { display: none; }
.import-status { white-space: pre-line; overflow-wrap: anywhere; }
.import-actions { justify-content: flex-end; margin-top: 12px; }
.import-dialog details { font-size: 14px; }
.import-dialog ul { max-height: 150px; overflow-y: auto; overflow-wrap: anywhere; padding-left: 22px; }
.button:disabled { opacity: .55; cursor: default; }
@media (max-width: 620px) {
  .wrap { width: calc(100% - 24px); }
  main { padding-top: 20px; }
  .form-card { padding: 18px; }
  th, td { padding-inline: 10px; }
  .overview { align-items: flex-start; flex-wrap: wrap; }
}
