:root {
  --ws-sheet: oklch(96.8% 0.005 258);
  --ws-panel: oklch(99.4% 0.0012 258);
  --ws-panel-sunk: oklch(97.4% 0.004 258);
  --ws-white: #fff;
  --ws-ink: oklch(22% 0.03 264);
  --ws-ink-2: oklch(39% 0.026 264);
  --ws-ink-3: oklch(47.5% 0.022 264);
  --ws-ink-4: oklch(54.5% 0.018 264);
  --ws-rule: oklch(89.5% 0.006 258);
  --ws-rule-strong: oklch(80% 0.011 258);
  --ws-indigo: oklch(46% 0.17 268);
  --ws-indigo-soft: oklch(46% 0.17 268 / 0.09);
  --ws-indigo-line: oklch(46% 0.17 268 / 0.3);
  --ws-green: oklch(48% 0.1 160);
  --ws-green-soft: oklch(48% 0.1 160 / 0.11);
  --ws-amber: oklch(51% 0.15 58);
  --ws-amber-soft: oklch(51% 0.15 58 / 0.13);
  --ws-red: oklch(52% 0.17 25);
  --ws-red-soft: oklch(52% 0.17 25 / 0.1);
  --ws-sans: "IBM Plex Sans SC", "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ws-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --ws-r-xs: 2px;
  --ws-r-sm: 3px;
  --ws-r-md: 5px;
  --ws-r-lg: 7px;
  --ws-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ws-sheet); }
body { margin: 0; color: var(--ws-ink); font: 400 15px/1.55 var(--ws-sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ws-indigo); outline-offset: 2px; border-radius: var(--ws-r-xs); }

.ws-skip { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 8px 12px; color: white; background: var(--ws-ink); transform: translateY(-180%); transition: transform 160ms var(--ws-ease); }
.ws-skip:focus { transform: none; }
.ws-shell { display: grid; grid-template-columns: 188px minmax(0, 1fr); min-height: 100vh; background: var(--ws-sheet); }
.ws-rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; min-width: 0; padding: 18px 10px 10px; border-right: 1px solid var(--ws-rule); background: var(--ws-sheet); }
.ws-brand { display: block; padding: 0 8px 20px; text-decoration: none; }
.ws-brand b { display: block; font-size: 21px; line-height: 1; letter-spacing: -0.02em; }
.ws-brand span { display: block; margin-top: 5px; color: var(--ws-ink-3); font-size: 12px; letter-spacing: 0.09em; }
.ws-nav { display: flex; flex-direction: column; gap: 1px; }
.ws-nav a, .ws-logout { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 9px; border: 0; border-radius: var(--ws-r-sm); color: var(--ws-ink-2); background: transparent; text-decoration: none; transition: color 140ms var(--ws-ease), background 140ms var(--ws-ease); cursor: pointer; font: inherit; }
.ws-nav-mobile { display: none !important; }
.ws-nav a:hover, .ws-logout:hover { color: var(--ws-ink); background: oklch(0% 0 0 / 0.035); }
.ws-nav a[aria-current="page"] { color: var(--ws-indigo); background: var(--ws-indigo-soft); font-weight: 600; }
.ws-nav i, .ws-logout i { width: 16px; text-align: center; font-size: 15px; }
.ws-nav-label { margin: 14px 9px 8px; padding-top: 12px; border-top: 1px solid var(--ws-rule); color: var(--ws-ink-4); font-size: 12px; letter-spacing: 0.1em; }
.ws-rail-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--ws-rule); }
.ws-user { display: flex; align-items: center; gap: 9px; padding: 0 5px 10px; }
.ws-user > div:last-child { min-width: 0; }
.ws-user strong, .ws-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-user strong { font-size: 14px; font-weight: 600; }
.ws-user span { color: var(--ws-ink-3); font-size: 12px; }
.ws-avatar { width: 28px; height: 28px; display: grid; place-items: center; flex: none; border-radius: var(--ws-r-sm); background: var(--ws-ink); color: white; font-size: 12px; font-weight: 700; }
.ws-logout { font-size: 14px; }
.ws-logout-form { margin: 0; }
.ws-logout-form .ws-logout { width: 100%; }

.ws-main { min-width: 0; }
.ws-topbar { min-height: 92px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 22px clamp(20px, 3vw, 44px) 18px; border-bottom: 1px solid var(--ws-rule); background: var(--ws-panel); }
.ws-heading h1 { font-size: 24px; line-height: 1.2; font-weight: 650; }
.ws-heading p { max-width: 70ch; margin-top: 5px; color: var(--ws-ink-3); font-size: 14px; }
.ws-top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ws-content { width: min(1500px, 100%); margin-inline: auto; padding: 24px clamp(20px, 3vw, 44px) 56px; }

.record-context-bar { position: sticky; z-index: 10; top: 0; min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px clamp(20px, 3vw, 44px); border-bottom: 1px solid var(--ws-rule); background: var(--ws-panel); }
.record-section-nav { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.record-section-nav::-webkit-scrollbar { display: none; }
.record-section-nav a { flex: none; min-height: 32px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: var(--ws-r-sm); color: var(--ws-ink-3); font-size: 13px; font-weight: 600; text-decoration: none; }
.record-section-nav a:hover { color: var(--ws-indigo); background: var(--ws-indigo-soft); }

.ws-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid var(--ws-rule-strong); border-radius: var(--ws-r-sm); background: var(--ws-panel); color: var(--ws-ink-2); text-decoration: none; font-weight: 600; cursor: pointer; transition: border-color 140ms var(--ws-ease), background 140ms var(--ws-ease), color 140ms var(--ws-ease); }
.ws-button:hover { border-color: var(--ws-indigo-line); color: var(--ws-indigo); background: var(--ws-white); }
.ws-button:active { transform: translateY(1px); }
.ws-button-primary { border-color: var(--ws-indigo); color: white; background: var(--ws-indigo); }
.ws-button-primary:hover { color: white; background: oklch(40% 0.17 268); }
.ws-button-danger { border-color: oklch(52% 0.17 25 / 0.36); color: var(--ws-red); background: var(--ws-red-soft); }
.ws-button-success { border-color: oklch(48% 0.1 160 / 0.36); color: var(--ws-green); background: var(--ws-green-soft); }
.ws-button-icon { width: 36px; padding: 0; }
.ws-button-sm { min-height: 32px; padding-inline: 10px; font-size: 13px; }

.ws-notice { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid var(--ws-indigo-line); border-radius: var(--ws-r-md); background: var(--ws-indigo-soft); color: var(--ws-ink-2); font-size: 13px; }
.ws-notice i { color: var(--ws-indigo); }
.ws-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 18px; }
.ws-filter-grid { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(120px, 0.75fr)) auto; gap: 8px; flex: 1; }
.ws-field { display: grid; gap: 5px; }
.ws-field label { color: var(--ws-ink-3); font-size: 12px; font-weight: 600; }
.ws-input, .ws-select, .ws-textarea { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--ws-rule-strong); border-radius: var(--ws-r-sm); outline: 0; background: var(--ws-panel); }
.ws-textarea { min-height: 104px; resize: vertical; }
.ws-input:focus, .ws-select:focus, .ws-textarea:focus { border-color: var(--ws-indigo); box-shadow: 0 0 0 2px var(--ws-indigo-soft); }
.ws-input::placeholder, .ws-textarea::placeholder { color: var(--ws-ink-4); }
.ws-count { color: var(--ws-ink-3); font-size: 13px; white-space: nowrap; }

.ws-table-wrap { margin-top: 16px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-panel); }
.ws-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; }
.ws-table th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; border-bottom: 1px solid var(--ws-rule-strong); background: var(--ws-panel-sunk); color: var(--ws-ink-3); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.ws-table td { padding: 12px; border-bottom: 1px solid var(--ws-rule); vertical-align: top; }
.ws-table tbody tr:last-child td { border-bottom: 0; }
.ws-table tbody tr:hover { background: var(--ws-white); }
.ws-table-title { display: inline-block; max-width: 34ch; color: var(--ws-ink); font-size: 14px; font-weight: 650; text-decoration: none; }
.ws-table-title:hover { color: var(--ws-indigo); }
.ws-subline { display: block; max-width: 40ch; margin-top: 3px; color: var(--ws-ink-3); font-size: 12px; }
.ws-cell-actions { display: flex; gap: 6px; align-items: center; }

.ws-tag { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 1px 7px; border-radius: 999px; color: var(--ws-ink-2); background: var(--ws-panel-sunk); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ws-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ws-ink-4); }
.ws-tag-indigo { color: var(--ws-indigo); background: var(--ws-indigo-soft); }
.ws-tag-indigo::before { background: var(--ws-indigo); }
.ws-tag-green { color: var(--ws-green); background: var(--ws-green-soft); }
.ws-tag-green::before { background: var(--ws-green); }
.ws-tag-amber { color: var(--ws-amber); background: var(--ws-amber-soft); }
.ws-tag-amber::before { background: var(--ws-amber); }
.ws-tag-red { color: var(--ws-red); background: var(--ws-red-soft); }
.ws-tag-red::before { background: var(--ws-red); }

.ws-empty { padding: 56px 24px; text-align: center; color: var(--ws-ink-3); }
.ws-empty i { display: block; margin-bottom: 10px; font-size: 26px; }
.ws-empty strong { display: block; color: var(--ws-ink-2); }
.ws-pagination { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.ws-pagination a, .ws-pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-sm); background: var(--ws-panel); color: var(--ws-ink-2); text-decoration: none; }
.ws-pagination span[aria-current="page"] { color: white; border-color: var(--ws-indigo); background: var(--ws-indigo); }
.ws-pagination .is-disabled { opacity: .45; pointer-events: none; }

.scan-batch-context { display: flex; justify-content: space-between; gap: 32px; padding: 2px 0 20px; border-bottom: 1px solid var(--ws-rule-strong); }
.scan-batch-kicker { color: var(--ws-indigo); font: 600 12px var(--ws-mono); }
.scan-batch-context h2 { margin-top: 7px; font-size: 22px; font-weight: 650; }
.scan-batch-context > div > p:last-child { margin-top: 6px; color: var(--ws-ink-3); font-size: 13px; }
.scan-batch-context dl { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 8px; min-width: min(360px, 42%); margin: 0; }
.scan-batch-context dl > div { padding: 10px 12px; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-panel); }
.scan-batch-context dt { color: var(--ws-ink-3); font-size: 12px; }
.scan-batch-context dd { margin: 4px 0 0; color: var(--ws-ink-2); font-size: 13px; font-weight: 600; }
.scan-batch-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.scan-batch-stat { display: grid; gap: 2px; min-height: 108px; padding: 14px; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-panel); color: var(--ws-ink-2); text-decoration: none; }
.scan-batch-stat:hover, .scan-batch-stat.is-active { border-color: var(--ws-indigo-line); background: var(--ws-indigo-soft); }
.scan-batch-stat strong { color: var(--ws-ink); font: 650 28px/1 var(--ws-mono); }
.scan-batch-stat span { font-size: 14px; font-weight: 650; }
.scan-batch-stat small { color: var(--ws-ink-3); font-size: 12px; }
.scan-batch-attention { margin-top: 16px; }
.scan-batch-results { margin-top: 24px; }
.scan-batch-results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.scan-batch-results-head h2, .scan-batch-notes h2 { font-size: 18px; font-weight: 650; }
.scan-batch-results-head p { margin-top: 4px; color: var(--ws-ink-3); font-size: 13px; }
.scan-batch-table td:nth-child(5) { min-width: 260px; }
.scan-batch-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--ws-rule); }
.scan-batch-notes p { margin-top: 7px; color: var(--ws-ink-3); font-size: 13px; white-space: pre-wrap; }
.scan-batch-empty { min-height: 340px; display: grid; place-content: center; }

.record-back { display: inline-flex; align-items: center; gap: 7px; color: var(--ws-ink-3); font-size: 13px; text-decoration: none; white-space: nowrap; }
.record-back:hover { color: var(--ws-indigo); }
.record-page { min-width: 0; }
.record-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; padding: 2px 0 22px; border-bottom: 1px solid var(--ws-rule-strong); }
.record-title { max-width: 28ch; font-size: clamp(26px, 3vw, 42px); line-height: 1.16; font-weight: 650; }
.record-en { max-width: 70ch; margin-top: 8px; color: var(--ws-ink-3); font-size: 14px; }
.record-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.record-actions { display: flex; align-items: flex-start; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.record-actions form { margin: 0; }
.record-overview { display: grid; grid-template-columns: 1.05fr 1.45fr 1fr 1.25fr; gap: 8px; margin-top: 20px; }
.record-overview-item { min-width: 0; padding: 13px 14px; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-panel); }
.record-overview-item h2 { margin-bottom: 7px; color: var(--ws-ink-3); font-size: 12px; font-weight: 650; }
.record-overview-item strong { display: block; color: var(--ws-ink); font-size: 16px; line-height: 1.35; }
.record-overview-item p { margin-top: 7px; color: var(--ws-ink-2); font-size: 13px; overflow-wrap: anywhere; }
.record-update { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; margin-top: 18px; padding: 14px 16px; border-radius: var(--ws-r-md); background: var(--ws-indigo-soft); }
.record-update > i { color: var(--ws-indigo); }
.record-update strong { display: block; font-size: 14px; }
.record-update p { margin-top: 3px; color: var(--ws-ink-2); font-size: 13px; }
.record-update time { color: var(--ws-ink-3); font: 12px var(--ws-mono); white-space: nowrap; }
.record-archive-note { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--ws-rule-strong); border-radius: var(--ws-r-md); background: var(--ws-panel-sunk); }
.record-archive-note strong { display: block; margin-bottom: 4px; }
.record-archive-note small { color: var(--ws-ink-3); }
.record-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: clamp(28px, 4vw, 60px); align-items: start; margin-top: 26px; }
.record-primary, .record-aside { min-width: 0; }
.record-aside { position: sticky; top: 20px; }
.record-section { padding: 24px 0; border-top: 1px solid var(--ws-rule); }
.record-section:first-child { padding-top: 0; border-top: 0; }
.record-hero[id], .record-section[id] { scroll-margin-top: 74px; }
.record-section h2 { margin-bottom: 6px; font-size: 18px; font-weight: 650; }
.record-section-intro { max-width: 70ch; margin-bottom: 18px; color: var(--ws-ink-3); font-size: 13px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.report-item { min-width: 0; padding: 13px 14px; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-panel); }
.report-item h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ws-ink-3); font-size: 12px; font-weight: 650; letter-spacing: 0; }
.report-item p { margin-top: 8px; color: var(--ws-ink-2); font-size: 14px; white-space: pre-wrap; }
.report-item .is-empty { color: var(--ws-ink-4); font-style: italic; }
.record-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-rule); }
.record-facts > div { min-width: 0; padding: 11px 12px; background: var(--ws-panel); }
.record-facts dt { color: var(--ws-ink-3); font-size: 12px; }
.record-facts dd { margin-top: 4px; overflow-wrap: anywhere; color: var(--ws-ink-2); font-size: 14px; font-weight: 550; }
.record-facts small { display: block; margin-top: 3px; color: var(--ws-ink-3); font-size: 12px; font-weight: 400; }
.timeline { list-style: none; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 18px; padding: 0 0 22px 18px; border-left: 1px solid var(--ws-rule-strong); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; top: 5px; left: -4px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ws-indigo); background: var(--ws-panel); }
.timeline time { color: var(--ws-ink-3); font: 12px var(--ws-mono); }
.timeline strong { font-size: 14px; }
.timeline p { margin-top: 4px; color: var(--ws-ink-3); font-size: 13px; }
.timeline a, .source-list a, .change-source-list a { color: var(--ws-indigo); font-size: 12px; }
.source-list { display: grid; gap: 8px; }
.source-record { padding: 11px 12px; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-sm); background: var(--ws-panel); }
.source-record strong { display: block; font-size: 13px; }
.source-record p { margin-top: 4px; color: var(--ws-ink-3); font-size: 12px; overflow-wrap: anywhere; }
.source-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.participant-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-rule); }
.participant { display: grid; grid-template-columns: minmax(100px, .8fr) minmax(80px, .55fr) minmax(0, 1.4fr); gap: 10px; padding: 10px 12px; background: var(--ws-panel); font-size: 13px; }
.participant span { color: var(--ws-ink-3); }
.participant p { overflow-wrap: anywhere; color: var(--ws-ink-2); }
.change-list { display: grid; gap: 10px; }
.change-item { padding: 14px; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-panel); }
.change-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.change-head time { color: var(--ws-ink-3); font: 12px var(--ws-mono); white-space: nowrap; }
.change-summary { margin-top: 8px; color: var(--ws-ink-2); font-size: 14px; }
.change-notes { margin: 8px 0 0; padding-left: 18px; color: var(--ws-ink-3); font-size: 13px; }
.change-field-list { display: grid; gap: 8px; margin-top: 10px; }
.change-field { padding: 10px; background: var(--ws-panel-sunk); }
.change-field > strong { display: block; margin-bottom: 6px; font-size: 12px; }
.change-values { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.change-values div { min-width: 0; }
.change-values span { display: block; color: var(--ws-ink-4); font-size: 11px; }
.change-values p { margin-top: 2px; overflow-wrap: anywhere; color: var(--ws-ink-2); font-size: 12px; }
.change-source-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tracking-panel { padding: 14px; border-radius: var(--ws-r-md); background: var(--ws-panel-sunk); }
.tracking-panel .record-facts { margin-top: 10px; }
.tracking-panel .ws-button { margin-top: 10px; }

.admin-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); gap: 28px; align-items: start; }
.admin-layout > * { min-width: 0; }
.ws-panel { min-width: 0; border: 1px solid var(--ws-rule); border-radius: var(--ws-r-md); background: var(--ws-panel); }
.ws-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--ws-rule); }
.ws-panel-head h2 { font-size: 16px; }
.ws-panel-body { padding: 16px; }
.ws-form-stack { display: grid; gap: 13px; }

.ws-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; padding: 0; border: 1px solid var(--ws-rule-strong); border-radius: var(--ws-r-lg); background: var(--ws-panel); color: var(--ws-ink); box-shadow: 0 18px 60px oklch(22% 0.03 264 / .22); }
.ws-dialog::backdrop { background: oklch(22% 0.03 264 / .42); }
.ws-dialog form { margin: 0; }
.ws-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--ws-rule); }
.ws-dialog-head h2 { font-size: 17px; }
.ws-dialog-body { padding: 18px; }
.ws-dialog-body p { margin-bottom: 12px; color: var(--ws-ink-3); font-size: 13px; }
.ws-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--ws-rule); background: var(--ws-panel-sunk); }

.login-body { min-height: 100dvh; display: grid; place-items: center; padding: 32px; background: var(--ws-sheet); }
.login-workspace { width: min(1180px, 100%); min-height: min(760px, calc(100dvh - 64px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--ws-rule-strong); border-radius: var(--ws-r-lg); background: var(--ws-panel); }
.login-masthead { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 20px; border-bottom: 1px solid var(--ws-rule); background: var(--ws-panel); }
.login-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.login-wordmark { width: 54px; height: 30px; display: grid; place-items: center; flex: none; border-radius: var(--ws-r-sm); color: white; background: var(--ws-ink); font: 750 13px/1 var(--ws-sans); letter-spacing: .08em; }
.login-brand-copy { min-width: 0; }
.login-brand-copy strong, .login-brand-copy small { display: block; }
.login-brand-copy strong { font-size: 15px; line-height: 1.2; }
.login-brand-copy small { margin-top: 3px; overflow: hidden; color: var(--ws-ink-3); font-size: 11px; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.login-system-meta { display: flex; align-items: center; gap: 14px; color: var(--ws-ink-4); font: 12px var(--ws-mono); white-space: nowrap; }
.login-system-state { display: inline-flex; align-items: center; gap: 7px; color: var(--ws-ink-3); font-family: var(--ws-sans); font-weight: 600; }
.login-system-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--ws-green); }

.login-layout { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(380px, .75fr); }
.login-brief { min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; padding: 64px; border-right: 1px solid var(--ws-rule); background: var(--ws-panel-sunk); }
.login-brief-copy { align-self: center; }
.login-kicker { color: var(--ws-indigo); font: 600 12px/1.4 var(--ws-mono); letter-spacing: .08em; }
.login-brief h1 { max-width: 15ch; margin-top: 18px; font-size: 48px; line-height: 1.12; font-weight: 650; }
.login-brief h1 span { color: var(--ws-indigo); }
.login-brief-copy > p:last-child { max-width: 38em; margin-top: 20px; color: var(--ws-ink-3); font-size: 15px; }
.login-workflow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 48px 0 0; padding: 0; border-block: 1px solid var(--ws-rule-strong); list-style: none; }
.login-workflow li { min-width: 0; display: grid; align-content: start; gap: 3px; padding: 15px 16px 16px 0; }
.login-workflow li + li { padding-left: 16px; border-left: 1px solid var(--ws-rule); }
.login-workflow span { color: var(--ws-ink-4); font: 11px var(--ws-mono); }
.login-workflow strong { margin-top: 3px; font-size: 14px; font-weight: 650; }
.login-workflow small { color: var(--ws-ink-3); font-size: 12px; }
.login-access-note { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--ws-ink-3); }
.login-access-note > i { width: 30px; height: 30px; display: grid; place-items: center; flex: none; border: 1px solid var(--ws-rule-strong); border-radius: var(--ws-r-sm); color: var(--ws-indigo); background: var(--ws-panel); }
.login-access-note strong, .login-access-note small { display: block; }
.login-access-note strong { color: var(--ws-ink-2); font-size: 12px; }
.login-access-note small { margin-top: 1px; font-size: 11px; }

.login-panel { min-width: 0; display: grid; align-content: center; gap: 22px; padding: 48px 44px; background: var(--ws-panel); }
.login-panel-head { padding-bottom: 4px; }
.login-panel-label { display: flex; align-items: center; gap: 8px; color: var(--ws-ink-3); font-size: 12px; font-weight: 650; letter-spacing: .08em; }
.login-panel-label span { width: 18px; height: 1px; background: var(--ws-indigo); }
.login-panel h2 { margin-top: 10px; font-size: 26px; line-height: 1.2; font-weight: 650; }
.login-panel-head > p:last-child { margin-top: 7px; color: var(--ws-ink-3); font-size: 14px; }
.login-error { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid oklch(52% 0.17 25 / .22); border-radius: var(--ws-r-sm); color: var(--ws-red); background: var(--ws-red-soft); font-size: 13px; }
.login-error i { margin-top: 1px; flex: none; }
.login-form { display: grid; gap: 16px; }
.login-field { display: grid; gap: 6px; }
.login-field label { color: var(--ws-ink-3); font-size: 12px; font-weight: 650; }
.login-input-wrap { min-height: 46px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--ws-rule-strong); border-radius: var(--ws-r-sm); background: var(--ws-panel); transition: border-color 140ms var(--ws-ease), box-shadow 140ms var(--ws-ease), background 140ms var(--ws-ease); }
.login-input-wrap:focus-within { border-color: var(--ws-indigo); background: var(--ws-white); box-shadow: 0 0 0 2px var(--ws-indigo-soft); }
.login-input-wrap > i { width: 40px; display: grid; place-items: center; flex: none; color: var(--ws-ink-4); font-size: 15px; }
.login-input { min-width: 0; height: 44px; flex: 1; padding: 0 10px 0 0; border: 0; outline: 0; background: transparent; font-size: 14px; }
.login-input::placeholder { color: var(--ws-ink-4); }
.login-password-toggle { width: 44px; height: 44px; display: grid; place-items: center; flex: none; padding: 0; border: 0; color: var(--ws-ink-4); background: transparent; cursor: pointer; }
.login-password-toggle:hover { color: var(--ws-indigo); background: var(--ws-indigo-soft); }
.ws-button.login-submit { min-height: 46px; justify-content: space-between; margin-top: 4px; padding-inline: 15px; }
.login-submit[aria-busy="true"] { cursor: wait; opacity: .82; }
.login-session-note { display: flex; align-items: flex-start; gap: 8px; padding-top: 18px; border-top: 1px solid var(--ws-rule); color: var(--ws-ink-4); font-size: 11px; }
.login-session-note i { margin-top: 1px; color: var(--ws-green); flex: none; }
.login-footer { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 20px; border-top: 1px solid var(--ws-rule); color: var(--ws-ink-4); background: var(--ws-panel); font-size: 11px; }
.login-footer span:last-child { font-family: var(--ws-mono); letter-spacing: .06em; }

@media (max-width: 1100px) {
  .record-layout { grid-template-columns: 1fr; }
  .record-aside { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
  .admin-layout { grid-template-columns: 1fr; }
  .ws-filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .login-brief { padding: 48px; }
  .login-brief h1 { font-size: 40px; }
}

@media (max-width: 1080px) {
  .ws-shell { grid-template-columns: 60px minmax(0, 1fr); min-height: 100dvh; }
  .ws-rail { position: sticky; top: 0; height: 100dvh; padding: 12px 8px 8px; }
  .ws-brand { display: grid; place-items: center; padding: 4px 0 14px; }
  .ws-brand b { font-size: 18px; }
  .ws-brand span, .ws-nav span, .ws-nav-label, .ws-rail-foot { display: none; }
  .ws-nav { align-items: center; }
  .ws-nav a, .ws-nav-mobile { width: 40px; min-height: 40px; justify-content: center; padding: 0; }
  .ws-nav-mobile { display: flex !important; }
  .ws-nav i { width: auto; font-size: 16px; }
}

@media (max-width: 900px) {
  .login-body { place-items: start center; padding: 24px; }
  .login-workspace { min-height: auto; }
  .login-layout { grid-template-columns: 1fr; }
  .login-brief { padding: 40px; border-right: 0; border-bottom: 1px solid var(--ws-rule); }
  .login-brief h1 { max-width: 18ch; margin-top: 14px; font-size: 36px; }
  .login-brief-copy > p:last-child { margin-top: 16px; }
  .login-workflow { margin-top: 32px; }
  .login-access-note { display: none; }
  .login-panel { padding: 40px; }
  .login-panel > * { width: min(420px, 100%); margin-inline: auto; }
}

@media (max-width: 760px) {
  .ws-topbar { min-height: auto; align-items: flex-start; padding: 18px 16px 14px; }
  .ws-topbar, .record-hero { grid-template-columns: 1fr; flex-direction: column; }
  .record-context-bar { align-items: flex-start; flex-direction: column; gap: 8px; padding: 10px 16px; }
  .record-section-nav { width: 100%; }
  .ws-top-actions, .record-actions { justify-content: flex-start; }
  .ws-content { padding: 18px 16px 44px; }
  .ws-toolbar { flex-direction: column; align-items: stretch; }
  .ws-toolbar > .ws-count { align-self: flex-start; }
  .ws-filter-grid { grid-template-columns: 1fr 1fr; }
  .ws-filter-grid .ws-field:first-child { grid-column: 1 / -1; }
  .record-overview { grid-template-columns: 1fr 1fr; }
  .scan-batch-context { display: grid; gap: 16px; }
  .scan-batch-context dl, .scan-batch-summary, .scan-batch-notes { grid-template-columns: 1fr 1fr; min-width: 0; }
  .report-grid, .record-aside, .record-facts { grid-template-columns: 1fr; }
  .record-title { font-size: 28px; }
  .record-update { grid-template-columns: auto minmax(0, 1fr); }
  .record-update time { grid-column: 2; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .participant { grid-template-columns: 1fr 1fr; }
  .participant p { grid-column: 1 / -1; }
  .change-values { grid-template-columns: 1fr; }
  .change-values > i { transform: rotate(90deg); }
  .login-body { display: block; padding: 0; }
  .login-workspace { width: 100%; min-height: 100dvh; border: 0; border-radius: 0; }
  .login-masthead { min-height: 64px; padding: 12px 16px; }
  .login-system-meta { gap: 8px; }
  .login-system-state { display: none; }
  .login-layout { grid-template-columns: 1fr; }
  .login-brief { padding: 34px 24px 28px; border-right: 0; border-bottom: 1px solid var(--ws-rule); }
  .login-brief h1 { max-width: 18ch; margin-top: 13px; font-size: 32px; }
  .login-brief-copy > p:last-child { margin-top: 14px; font-size: 14px; }
  .login-workflow { margin-top: 28px; }
  .login-workflow li { padding-block: 12px; }
  .login-workflow small { display: none; }
  .login-access-note { display: none; }
  .login-panel { padding: 34px 24px 38px; }
  .login-footer { padding-inline: 16px; }
}

@media (pointer: coarse) {
  .ws-button, .ws-nav a, .ws-logout { touch-action: manipulation; }
}

@media (max-width: 480px) {
  .ws-heading h1 { font-size: 21px; }
  .ws-top-actions { width: 100%; }
  .ws-top-actions .ws-button { flex: 1; }
  .record-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-actions form { grid-column: 1 / -1; width: 100%; }
  .record-actions .ws-button { width: 100%; white-space: nowrap; }
  .ws-filter-grid { grid-template-columns: 1fr; }
  .ws-filter-grid .ws-field:first-child { grid-column: auto; }
  .record-overview { grid-template-columns: 1fr; }
  .scan-batch-context dl, .scan-batch-summary, .scan-batch-notes { grid-template-columns: 1fr; }
  .ws-button { min-height: 40px; }
  .login-brand-copy small { display: none; }
  .login-workflow li { padding-right: 8px; }
  .login-workflow li + li { padding-left: 8px; }
  .login-footer span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .login-input-wrap, .login-password-toggle { transition: none; }
}
