:root {
  --paper: #f4f1ed;
  --surface: #fffdf9;
  --surface-strong: #ffffff;
  --ink: #211f1e;
  --muted: #706c69;
  --line: #d4cfca;
  --line-dark: #aaa49f;
  --accent: #ed5a45;
  --accent-dark: #c43f30;
  --accent-pale: #ffede8;
  --ok: #55a63f;
  --ok-dark: #367b2a;
  --ok-pale: #edf8e9;
  --bad: #c6483c;
  --bad-pale: #fff0ed;
  --review: #a46d14;
  --review-pale: #fff6df;
  --shadow: 0 14px 38px rgba(49, 43, 39, .08);
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); }
body {
  min-width: 1080px;
  margin: 0;
  padding-left: 22px;
  color: var(--ink);
  background:
    linear-gradient(rgba(83, 73, 66, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 44px;
  font-size: 16px;
  line-height: 1.45;
}
button, input, select { font: inherit; }
button, select, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.calibration {
  position: fixed;
  z-index: 60;
  inset: 0 auto 0 0;
  width: 22px;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  box-shadow: 1px 0 0 rgba(33, 31, 30, .18);
}
.calibration span:nth-child(1) { background: #00a6d6; }
.calibration span:nth-child(2) { background: #e5007d; }
.calibration span:nth-child(3) { background: #ffed00; }
.calibration span:nth-child(4) { background: #1d1d1b; }

.app-header {
  min-height: 116px;
  padding: 20px clamp(28px, 3vw, 58px);
  display: grid;
  grid-template-columns: 1fr 240px 1fr;
  align-items: center;
  gap: 28px;
  background: rgba(255, 253, 249, .94);
  border-bottom: 1px solid var(--line-dark);
}
.product-name h1 {
  margin: 0;
  font-family: Arial Black, Inter, sans-serif;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.055em;
}
.product-name p { margin: 9px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .09em; text-transform: uppercase; }
.header-year {
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.header-account-brand { justify-self: end; display: grid; justify-items: end; gap: 7px; }
.account-nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--muted); font-size: 12px; }
.account-nav span { color: var(--ink); font-weight: 750; }
.account-nav a, .account-nav button { border: 0; padding: 0; color: var(--accent-dark); background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.account-nav form { margin: 0; }
.header-year > label { color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.header-year small { color: var(--accent-dark); font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.year-entry { display: grid; grid-template-columns: 112px 40px; overflow: hidden; border: 2px solid var(--line-dark); border-radius: 8px; background: var(--surface-strong); }
.header-year input {
  width: 112px;
  padding: 8px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 32px;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  appearance: textfield;
}
.header-year input::-webkit-inner-spin-button, .header-year input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.header-year input::placeholder { color: #aaa49f; font-size: 23px; letter-spacing: .04em; }
.year-entry:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }
.year-stepper { display: grid; grid-template-rows: 1fr 1fr; border-left: 1px solid var(--line-dark); }
.year-stepper button { min-width: 40px; min-height: 30px; padding: 0; border: 0; background: #f0ede9; color: var(--ink); cursor: pointer; font-size: 14px; line-height: 1; }
.year-stepper button + button { border-top: 1px solid var(--line-dark); }
.year-stepper button:hover:not(:disabled) { background: var(--accent-pale); color: var(--accent-dark); }
.year-stepper button:disabled { cursor: default; opacity: .55; }
.brand-logo { justify-self: end; width: min(330px, 100%); max-height: 70px; object-fit: contain; object-position: right center; }

.app-shell { width: min(1680px, calc(100% - 48px)); margin: 28px auto 54px; }
.workspace-shell {
  display: grid;
  grid-template-columns: minmax(300px, 31%) minmax(680px, 69%);
  min-height: calc(100vh - 206px);
  overflow: clip;
  border: 1px solid var(--line-dark);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.control-panel {
  padding: 34px 30px;
  border-right: 1px solid var(--line-dark);
  background: #eeeae5;
}
.control-panel h2 { margin: 0 0 28px; font-size: 26px; letter-spacing: -.025em; }
#calendar_pdfs { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field-label, .choice-group legend { display: block; margin: 0 0 10px; color: #5f5a57; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.format-select {
  width: 100%;
  min-height: 60px;
  margin-bottom: 25px;
  padding: 0 44px 0 15px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  outline: 0;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}
.format-select.is-selected { border: 2px solid var(--accent); padding-left: 14px; box-shadow: 0 0 0 3px rgba(223, 102, 84, .09); }
.format-select:focus { border-color: var(--accent-dark); }
.choice-group { min-width: 0; margin: 0 0 25px; padding: 0; border: 0; }
.segmented-options { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented-options button {
  min-height: 50px;
  padding: 10px 17px;
  border: 1px solid #bcb6b1;
  border-radius: 8px;
  background: var(--surface-strong);
  cursor: pointer;
  font-size: 16px;
  font-weight: 650;
}
.segmented-options button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.segmented-options button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.segmented-options button.is-selected:hover:not(:disabled) { color: #fff; }
.format-select:disabled, .segmented-options button:disabled { cursor: default; opacity: .82; }
.selection-error { margin: 8px 0 0; padding: 10px 12px; border-left: 3px solid var(--bad); background: var(--bad-pale); color: #8f3027; font-size: 14px; }

.workspace-main { min-width: 0; padding: 32px clamp(26px, 3vw, 48px) 38px; }
.workspace-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.workspace-heading h2 { margin: 2px 0 0; font-size: clamp(25px, 2vw, 34px); line-height: 1.1; letter-spacing: -.035em; }
.workspace-heading > p { max-width: 520px; margin: 0; color: var(--muted); text-align: right; }
.section-label { margin: 0; color: var(--accent-dark); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.profile-change-note { display: flex; align-items: baseline; gap: 8px; margin: -6px 0 20px; padding: 12px 15px; border-left: 4px solid var(--ok); border-radius: 0 7px 7px 0; background: var(--ok-pale); color: var(--ok-dark); }
.profile-change-note span { color: #52694b; font-size: 14px; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.reference-panel[hidden] + .local-panel { width: min(680px, 100%); grid-column: 1 / -1; justify-self: center; }
.document-panel { min-width: 0; padding: 18px; border: 1px solid var(--line); background: var(--surface-strong); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel-heading h3 { margin: 0; font-size: 18px; }
.panel-heading > span { color: var(--muted); font-size: 12px; }
.reference-preview-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.reference-preview-list figure { min-width: 0; margin: 0; }
.reference-preview-list img { width: 100%; height: 260px; display: block; object-fit: contain; border: 1px solid #ddd7d2; background: #f3f0ec; }
.reference-preview-list figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.filename-guide { display: grid; grid-template-columns: 104px minmax(0,1fr); gap: 7px 12px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.filename-guide > span { color: var(--muted); }
.filename-guide div { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.filename-guide code { max-width: 100%; padding: 2px 5px; overflow-wrap: anywhere; background: #eeeae6; color: #3f3a37; font-family: Consolas, monospace; }
.filename-guide p { grid-column: 1 / -1; margin: 5px 0 0; color: var(--accent-dark); }
.reference-disclaimer { margin: 12px 0 0; color: var(--muted); font-size: 11px; }

.local-panel { position: relative; min-height: 450px; display: flex; flex-direction: column; }
.local-panel.is-dragging { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--accent-pale); }
.local-drop-catcher {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border: 3px dashed var(--accent);
  background: rgba(255, 242, 238, .96);
  color: var(--ink);
  text-align: center;
  pointer-events: none;
}
.local-panel.is-dragging .local-drop-catcher { display: flex; pointer-events: auto; }
.local-drop-catcher strong { font-size: 22px; }
.local-drop-catcher > span:last-child { color: var(--muted); }
.local-panel.is-dragging .selected-preview-frame object { pointer-events: none; }
.drop-zone {
  min-height: 370px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 28px;
  border: 2px dashed #b9b2ac;
  background: #faf8f5;
  text-align: center;
  cursor: pointer;
  transition: .16s ease;
}
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--accent); background: var(--accent-pale); }
.drop-zone strong { margin: 12px 0 4px; font-size: 21px; }
.drop-zone > span:last-child { color: var(--muted); }
.drop-icon { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent-dark); font-size: 29px; }
.selected-files-preview { min-width: 0; }
.selected-preview-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; scrollbar-width: thin; }
.selected-preview-tab {
  min-width: 105px;
  max-width: 175px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  border-radius: 7px;
  background: #f5f2ee;
  cursor: pointer;
  font-size: 13px;
}
.selected-preview-tab > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-preview-tab.is-active { border-color: var(--accent); border-bottom-color: var(--accent); background: var(--surface-strong); font-weight: 750; }
.remove-file { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-size: 18px; line-height: 1; }
.remove-file:hover { background: var(--bad-pale); color: var(--bad); }
.selected-preview-frame, .result-preview-frame, .processing-preview { overflow: hidden; border: 1px solid var(--line); background: #e8e5e1; }
.selected-preview-frame { height: 335px; }
.selected-preview-frame object, .result-preview-frame object, .processing-preview object { width: 100%; height: 100%; display: block; border: 0; }
.preview-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.preview-meta strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.file-feedback { margin: 12px 0 0; padding: 8px 10px; background: #f1eee9; color: var(--muted); font-size: 13px; }
.file-feedback[data-tone="error"] { border-left: 3px solid var(--bad); background: var(--bad-pale); color: #8f3027; }

.primary-button, .secondary-button, .text-button {
  min-height: 52px;
  padding: 12px 21px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 750;
}
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.primary-button:hover { border-color: var(--accent-dark); background: var(--accent-dark); }
.secondary-button { border: 1px solid var(--line-dark); background: var(--surface-strong); }
.secondary-button:hover { border-color: var(--ink); }
.text-button { min-height: auto; padding: 4px; border: 0; background: transparent; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.check-button { min-width: 230px; margin-top: 22px; }

.processing-state { max-width: 1000px; }
.processing-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.processing-top h2 { margin: 3px 0 0; font-size: 34px; }
.activity { display: flex; align-items: center; margin: 0; color: var(--muted); font-weight: 650; white-space: nowrap; }
.activity-dot { width: 11px; height: 11px; display: inline-block; flex: 0 0 11px; margin-right: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.78); } }
.processing-tabs { display: flex; gap: 6px; margin: 24px 0 15px; overflow-x: auto; }
.processing-tabs span { min-width: 80px; max-width: 150px; padding: 8px 10px; overflow: hidden; border: 1px solid var(--line); color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.processing-tabs span.is-current { border: 2px solid var(--ok); background: var(--ok-pale); color: var(--ink); font-weight: 750; }
.processing-tabs span.is-done { border-color: var(--ok); color: var(--ok-dark); }
.processing-tabs span.is-error { border-color: var(--bad); background: var(--bad-pale); color: var(--bad); font-weight: 750; }
.processing-tabs span.is-review { border-color: var(--review); background: var(--review-pale); color: var(--review); font-weight: 750; }
.processing-status { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0 10px; border-top: 1px solid var(--line); }
.processing-status div { display: grid; gap: 4px; }
.processing-status strong { font-size: 21px; }
.processing-status span, .processing-status p, #processing-completed { margin: 0; color: var(--muted); }
.batch-progress { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin: 10px 0 18px; }
.batch-progress span { height: 8px; background: #ddd8d3; }
.batch-progress span.is-current { background: #a9d99a; animation: progress-pulse 1.2s infinite; }
.batch-progress span.is-done { background: var(--ok); }
.batch-progress span.is-error { background: var(--bad); }
.batch-progress span.is-review { background: var(--review); }
@keyframes progress-pulse { 50% { background: var(--ok); } }
.processing-live { display: flex; align-items: center; padding: 12px 14px; background: var(--ok-pale); color: var(--ok-dark); font-weight: 750; white-space: nowrap; }
.processing-state > h3 { margin: 20px 0 10px; }
.processing-preview { height: 360px; }
.processing-preview iframe { width: 100%; height: 100%; display: block; border: 0; background: #fff; }
.processing-open-pdf { width: fit-content; display: inline-block; margin-top: 8px; color: var(--accent-dark); font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.long-check-note { display: grid; gap: 3px; margin-top: 15px; padding: 14px 16px; border-left: 3px solid #d29b2f; background: var(--review-pale); }
.long-check-note span { color: var(--muted); font-size: 13px; }

.results-heading { align-items: flex-start; }
.batch-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; font-size: 13px; }
.batch-summary span { white-space: nowrap; }
.summary-ok { color: var(--ok-dark); }.summary-bad { color: var(--bad); }.summary-review { color: var(--review); }
.result-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 3px 3px 10px; scrollbar-width: thin; }
.result-tab {
  position: relative;
  min-width: 120px;
  max-width: 200px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 24px;
  gap: 2px 7px;
  padding: 12px 14px 13px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-dark);
  border-bottom: 4px solid transparent;
  border-radius: 8px;
  background: #f2efeb;
  text-align: left;
  cursor: pointer;
}
.result-tab > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.result-tab b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.result-tab small { grid-column: 1 / -1; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.result-tab.tab-passed { border-top-color: var(--ok); }.result-tab.tab-passed b { background: var(--ok); }
.result-tab.tab-needs_correction { border-top-color: var(--bad); }.result-tab.tab-needs_correction b { background: var(--bad); }
.result-tab.tab-manual_review { border-top-color: var(--review); }.result-tab.tab-manual_review b { background: var(--review); }
.result-tab.is-active {
  z-index: 1;
  border-color: #383431;
  border-bottom-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(33,31,30,.14);
}
.result-tab.is-active::after { content: ""; position: absolute; right: 10px; bottom: -4px; left: 10px; height: 4px; background: var(--accent); }
.result-tab-panel { margin-top: 8px; }
.result-panel { border: 1px solid var(--line-dark); background: var(--surface-strong); }
.result-grid { display: grid; grid-template-columns: minmax(280px, 38%) minmax(430px, 62%); min-height: 610px; }
.pdf-column { min-width: 0; padding: 22px; border-right: 1px solid var(--line); background: #f3f0ec; }
.pdf-column h3 { margin: 0 0 12px; font-size: 16px; }
.result-preview-frame { position: sticky; top: 16px; height: 480px; }
.result-file-name { display: block; margin-top: 12px; overflow-wrap: anywhere; }
.pdf-column > span { color: var(--muted); font-size: 12px; }
.report-column { min-width: 0; padding: 22px 24px; }
.active-file-context { display: flex; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.active-file-context span { color: var(--muted); }.active-file-context strong { overflow-wrap: anywhere; }
.active-file-context small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.result-status-heading { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 14px; align-items: center; }
.large-status { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--review); color: #fff; font-size: 29px; font-weight: 850; }
.result-passed .large-status,
.result-panel[data-result-status="passed"] .large-status { background: var(--ok); }
.result-needs_correction .large-status,
.result-panel[data-result-status="needs_correction"] .large-status { background: var(--bad); }
.result-status-heading h2 { margin: 0; font-size: 27px; line-height: 1.08; }
.result-status-heading p { margin: 5px 0 0; color: var(--muted); }
.report-mode { display: flex; align-items: center; gap: 4px; margin: 20px 0 14px; border-bottom: 1px solid var(--line); }
.report-mode button { min-height: 44px; padding: 10px 15px; border: 0; border-radius: 7px 7px 0 0; border-bottom: 3px solid transparent; background: transparent; cursor: pointer; font-size: 15px; }
.report-mode button.is-active { border-bottom-color: var(--accent); color: var(--accent-dark); font-weight: 800; }
.report-mode span { margin-left: auto; color: var(--muted); font-size: 12px; }
.report-scroll { max-height: 470px; overflow: auto; padding-right: 7px; scrollbar-color: #b9b2ac transparent; }
.issue-card { display: grid; grid-template-columns: 9px minmax(0,1fr); gap: 13px; margin-bottom: 11px; padding: 15px; border: 1px solid var(--line); background: #fff; }
.issue-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--review); }
.issue-error .issue-dot { background: var(--bad); }
.issue-topline { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.issue-topline b { color: #aaa39e; font-size: 16px; }
.issue-card h4 { margin: 2px 0 7px; font-size: 18px; }
.issue-card p { margin: 5px 0; }
.issue-values { display: flex; flex-wrap: wrap; gap: 7px; }
.issue-values p { min-width: 120px; padding: 7px 9px; background: #f2efeb; }
.issue-values span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.issue-action { display: block; margin-top: 8px; color: var(--bad); }
.stop-note { padding: 10px 12px; background: #f3f0ec; color: var(--muted); font-size: 12px; }
.success-banner { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 15px; background: var(--ok-pale); }
.success-banner > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--ok); color: #fff; font-weight: 850; }
.success-banner p { margin: 3px 0 0; color: #486858; font-size: 13px; }
.short-facts { margin-top: 10px; }
.short-facts p { margin: 0; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.short-facts span { margin-right: 7px; color: var(--ok-dark); font-weight: 850; }
.full-report-tools { display: grid; grid-template-columns: 180px 1fr; gap: 9px; align-items: end; margin-bottom: 12px; }
.full-report-tools label { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.full-report-tools select, .full-report-tools input { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid var(--line-dark); background: #fff; }
.full-report-tools > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; }
.report-section { margin-bottom: 8px; border: 1px solid var(--line); }
.report-section summary { padding: 11px 12px; background: #f1eee9; cursor: pointer; font-weight: 750; }
.report-rows { padding: 6px 12px; }
.report-row { display: grid; grid-template-columns: 23px 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid #e8e4df; font-size: 12px; }
.report-row:last-child { border-bottom: 0; }
.report-row > span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--bad); color: #fff; font-weight: 850; }
.report-row.row-ok > span { background: var(--ok); }
.report-row p { margin: 2px 0; color: var(--muted); }
.proof-list { margin: 6px 0 0; padding-left: 20px; color: var(--muted); }
.proof-list li { margin: 3px 0; }
.proof-list .proof-error { color: var(--bad); font-weight: 750; }
.proof-list .proof-error::marker { color: var(--bad); font-size: 1.25em; }
.holiday-proof { color: var(--ink); }
.verified-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; padding: 6px 12px 10px; }
.verified-list p { margin: 0; padding: 8px 0; border-bottom: 1px solid #e8e4df; font-size: 12px; }
.verified-list span { margin-right: 7px; color: var(--ok-dark); font-weight: 850; }
.report-note { margin: 8px 0; padding: 9px 11px; background: #f3f0ec; color: var(--muted); font-size: 12px; }
.support-data { display: grid; gap: 6px; padding: 12px; color: var(--muted); font-family: Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.empty-search { padding: 18px; text-align: center; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 17px 22px; border-top: 1px solid var(--line-dark); background: #f4f1ed; }
.result-actions .text-button { margin-left: auto; }

.server-error { max-width: 720px; margin: 20px auto; padding: 30px; border: 1px solid var(--bad); background: var(--bad-pale); }
.server-error h2 { margin: 4px 0 10px; }.server-error > p:not(.section-label) { color: var(--muted); }
.drag-overlay { position: fixed; z-index: 50; inset: 8px; display: grid; place-items: center; border: 4px dashed var(--accent); background: rgba(255, 248, 244, .94); }
.drag-overlay > div { display: grid; gap: 7px; text-align: center; }.drag-overlay strong { font-size: 28px; }.drag-overlay span { color: var(--muted); }
.new-check-dialog { width: min(520px, calc(100% - 40px)); padding: 30px; border: 1px solid #7c746e; border-radius: 3px; box-shadow: 0 25px 80px rgba(0,0,0,.28); }
.new-check-dialog::backdrop { background: rgba(30,27,25,.55); }
.new-check-dialog h2 { margin: 0 36px 8px 0; }.new-check-dialog p { color: var(--muted); }
.new-check-dialog > button:not(.dialog-close) { width: 100%; margin-top: 8px; }
.dialog-close { position: absolute; top: 13px; right: 13px; width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; font-size: 25px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.print-report { display: none; }

.account-page { min-width: 0; min-height: 100vh; padding: 40px 20px; display: grid; place-items: center; }
.account-card { width: min(460px, 100%); padding: 38px; border: 1px solid var(--line-dark); background: var(--surface); box-shadow: var(--shadow); }
.account-card > img { width: 250px; max-width: 100%; }
.account-card h1 { margin: 7px 0; font-size: 30px; }
.account-card > p:not(.section-label):not(.account-error) { color: var(--muted); }
.account-card form, .account-card label { display: grid; gap: 7px; }
.account-card form { gap: 16px; margin-top: 24px; }
.account-card input { min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-dark); background: #fff; }
.account-error { padding: 10px 12px; background: var(--bad-pale); color: var(--bad); font-weight: 700; }
.account-list-page { min-width: 0; padding: 40px 20px; }
.account-list { width: min(1080px, 100%); margin: 0 auto; }
.account-list > header { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line-dark); }
.account-list h1 { margin: 3px 0 0; }
.account-list > section { margin-top: 28px; padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.readiness-summary { font-weight: 750; }
.readiness-list { display: grid; gap: 8px; }
.readiness-item { display: grid; grid-template-columns: minmax(160px, .45fr) 1fr; gap: 14px; padding: 12px 14px; border-left: 4px solid var(--line); background: var(--paper); }
.readiness-item span { color: var(--muted); }
.readiness-ok { border-color: var(--ok); }
.readiness-warning { border-color: #d49a28; }
.readiness-error { border-color: var(--bad); }
.history-card { margin-top: 16px; padding: 20px; border: 1px solid var(--line); background: var(--surface); }
.history-card > div { display: flex; justify-content: space-between; gap: 20px; }
.history-card time, .history-card > p { color: var(--muted); }
.history-card ul { margin: 12px 0 0; padding: 0; list-style: none; }
.history-card li { display: grid; grid-template-columns: 1fr 190px 220px; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.admin-table > div { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.account-list details { margin-top: 10px; padding: 12px; border: 1px solid var(--line); }
.account-list pre { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-history { padding: 30px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }

@media (max-width: 1280px) {
  .app-header { grid-template-columns: 1fr 210px 1fr; }
  .brand-logo { max-width: 260px; }
  .app-shell { width: calc(100% - 28px); }
  .workspace-shell { grid-template-columns: 300px minmax(730px, 1fr); }
  .control-panel { padding: 28px 22px; }
  .workspace-main { padding: 28px 24px 34px; }
  .reference-preview-list img { height: 220px; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { min-width: 0; background: #fff; color: #111; font: 10pt/1.35 Arial, sans-serif; }
  .calibration, .app-header, .app-shell, .drag-overlay, .new-check-dialog { display: none !important; }
  .print-report { display: block; }
  .print-report header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 10mm; border-bottom: 1px solid #888; }
  .print-report header img { width: 70mm; max-height: 22mm; object-fit: contain; }
  .print-report h1 { margin: 0; font-size: 18pt; }.print-report header p { margin: 2mm 0 0; color: #555; }
  .print-meta { display: flex; gap: 15mm; margin: 5mm 0; font-weight: bold; }
  .print-file { break-inside: avoid; margin: 6mm 0; padding: 5mm; border: 1px solid #999; border-left: 4mm solid #a46d14; }
  .print-file.print-ok, .print-file.print-success { border-left-color: #27835c; }.print-file.print-error { border-left-color: #c6483c; }
  .print-file h3 { margin: 0 0 2mm; overflow-wrap: anywhere; font-size: 13pt; }.print-file article { margin-top: 4mm; padding-top: 3mm; border-top: 1px solid #bbb; }
  .print-file h4, .print-file p { margin: 1.5mm 0; }
  .print-report footer { margin-top: 10mm; padding-top: 3mm; border-top: 1px solid #aaa; color: #666; font-size: 8pt; }
}
