@charset "UTF-8";
:root {
  /* Neutral surfaces; reserve green for small interaction and status accents. */
  --ink: #292929; --muted: #696969; --green: #4b6f59; --green-dark: #365341;
  --canvas: #f6f6f6; --paper: #fff; --line: #e1e1e1;
  --red: #895957; --red-soft: #f6f3f3;
  color-scheme: light; --primary: #303030; --primary-hover: #474747; --on-primary: #fff;
  --surface-muted: #f1f1f1; --input-border: #c9c9c9; --selection: #ddd; --radius: 14px;
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink); font-size: 15px; line-height: 1.55;
}
:root[data-theme="dark"] { color-scheme: dark;
  --ink: #ededed; --muted: #aaa; --green: #a0bca9; --green-dark: #bed0c4;
  --canvas: #181818; --paper: #222; --line: #3b3b3b;
  --red: #cda3a0; --red-soft: #2c2828;
  --primary: #dedede; --primary-hover: #fff; --on-primary: #222;
  --surface-muted: #2b2b2b; --input-border: #595959; --selection: #484848; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
  --ink: #ededed; --muted: #aaa; --green: #a0bca9; --green-dark: #bed0c4;
  --canvas: #181818; --paper: #222; --line: #3b3b3b;
  --red: #cda3a0; --red-soft: #2c2828;
  --primary: #dedede; --primary-hover: #fff; --on-primary: #222;
  --surface-muted: #2b2b2b; --input-border: #595959; --selection: #484848; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); }
button, input, textarea, select { font: inherit; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 4px; }
::selection { background: var(--selection); color: var(--ink); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 3vw, 36px); line-height: 1.2; letter-spacing: -1.1px; margin-bottom: 10px; font-weight: 650; }
h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.3px; margin-bottom: 6px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; margin-bottom: 8px; }
p { margin-bottom: 14px; }
ul, ol { padding-left: 22px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: 1.6px; font-size: 10px; font-weight: 750; margin-bottom: 14px; }
.icon { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: fixed; top: -70px; left: 12px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 12px 18px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: var(--on-primary); }
.sidebar { width: 238px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 32px 20px 20px; background: var(--paper); border-right: 1px solid var(--line); z-index: 20; }
.brand { display: inline-flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: var(--surface-muted); color: var(--green); }
.brand-mark .icon { width: 24px; height: 24px; }
.brand strong { display: block; font-size: 17px; letter-spacing: -.5px; line-height: 1.2; }
.nav-content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.main-nav { display: grid; gap: 6px; margin-top: 32px; }
.main-nav a { color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 11px; min-height: 46px; padding: 11px 12px; border-radius: 8px; font-size: 13px; font-weight: 550; }
.main-nav a:hover { background: var(--surface-muted); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--surface-muted); color: var(--ink); font-weight: 700; }
.main-nav a[aria-current="page"] .icon { color: var(--green); }
.account { margin-top: 12px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 20px 4px 2px; min-width: 0; }
.avatar { width: 35px; height: 35px; background: var(--surface-muted); display: inline-grid; place-items: center; border-radius: 50%; color: var(--muted); font-weight: 650; font-size: 13px; flex-shrink: 0; }
.account-name { font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.account-meta { min-width: 0; flex: 1; }
.account-meta small { color: var(--muted); display: block; font-size: 10px; }
.logout { background: none; color: var(--muted); border: 0; font-size: 11px; padding: 8px 0; cursor: pointer; text-decoration: underline; }
.nav-toggle { display: none; }
.app-body { margin-left: 238px; min-height: 100vh; }
.workspace { max-width: 1540px; margin: auto; padding: 37px 42px 26px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
.page-heading p { color: var(--muted); font-size: 13px; margin-bottom: 0; max-width: 580px; }
.heading-actions, .button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.heading-actions { padding-top: 8px; justify-content: flex-end; }
.heading-actions.session-create-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; max-width: 100%; }
.button, button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 11px 17px; min-height: 43px; line-height: 1.3; border-radius: 8px; background: var(--primary); border: 1px solid var(--primary); font-weight: 600; font-size: 12px; text-decoration: none; color: var(--on-primary); cursor: pointer; transition: background .15s, border-color .15s; }
.button:hover, button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.button.secondary, button.secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.button.secondary:hover, button.secondary:hover { background: var(--surface-muted); border-color: var(--input-border); }
.button.subtle, button.subtle { background: transparent; color: var(--ink); border-color: transparent; }
.button.subtle:hover, button.subtle:hover { background: var(--surface-muted); }
.button.danger, button.danger { color: var(--red); border-color: var(--line); background: var(--paper); }
.button.danger:hover, button.danger:hover { background: var(--red-soft); }
.button.small, button.small { min-height: 35px; padding: 8px 11px; font-size: 11px; }
button[aria-disabled="true"], button:disabled { opacity: .65; cursor: wait; }
.logout { display: inline; background: none; border: 0; min-height: 30px; font-weight: 500; line-height: 1.2; border-radius: 4px; }
.logout:hover { color: var(--ink); background: transparent; }
.is-loading::before { content: ""; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 27px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 19px 21px 17px; }
.metric-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: var(--muted); font-size: 11px; font-weight: 600; margin-bottom: 14px; }
.metric-head .icon { color: var(--muted); width: 17px; }
.metric-value { font-size: 29px; font-weight: 600; letter-spacing: -.8px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric-value small { font-size: 14px; letter-spacing: 0; font-weight: 450; margin-left: 3px; color: var(--muted); }
.metric-foot { color: var(--muted); font-size: 10px; margin-top: 8px; }
.metric.accent .icon { color: var(--green); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 24px 19px; }
.panel-header p { font-size: 12px; color: var(--muted); margin: 0; }
.panel-body { padding: 22px 24px; }
.panel-footer { padding: 15px 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 11px; }
.toolbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 24px; display: flex; gap: 12px; align-items: end; flex-wrap: wrap; background: var(--surface-muted); }
.toolbar .field { margin: 0; flex: 1; min-width: 150px; }
.toolbar .search-field { flex: 2; }
.toolbar .button-row { padding-bottom: 1px; }
.field { min-width: 0; margin-bottom: 20px; }
.field label, label.field-label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 7px; }
.field .optional { font-weight: 400; color: var(--muted); font-size: 10px; margin-left: 5px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { width: 100%; border: 1px solid var(--input-border); background: var(--paper); color: var(--ink); border-radius: 7px; padding: 10px 12px; min-height: 43px; max-width: 100%; font-size: 13px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); background: var(--red-soft); }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--green); margin: 0; flex-shrink: 0; cursor: pointer; }
input[type="file"] { padding: 9px; font-size: 12px; }
input[type="file"]::file-selector-button { border: 0; border-radius: 4px; padding: 8px 10px; color: var(--ink); background: var(--surface-muted); margin-right: 12px; cursor: pointer; }
textarea { display: block; resize: vertical; min-height: 90px; line-height: 1.6; }
.helptext { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.field.full-width { grid-column: 1 / -1; }
.errorlist { list-style: none; padding: 0; margin: 7px 0; color: var(--red); font-size: 12px; }
.form-errors { background: var(--surface-muted); padding: 15px 18px; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 8px; margin-bottom: 20px; }
.form-errors strong { display: block; font-size: 13px; }
.form-errors .errorlist:last-child { margin-bottom: 0; }
.form-layout { max-width: 760px; }
.form-card .panel-body { padding: 28px; }
.form-card .button-row { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 6px; }
.notice { padding: 15px 18px; margin-bottom: 20px; border-radius: 9px; border: 1px solid var(--line); border-left: 3px solid var(--green); background: var(--surface-muted); color: var(--ink); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.notice.warning { border-left-color: var(--muted); }
.notice.error { border-left-color: var(--red); }
.notice.neutral { background: var(--surface-muted); border-color: var(--line); color: var(--muted); }
.notice p:last-child { margin-bottom: 0; }
.feedback { list-style: none; padding: 0; }
.feedback .notice { margin-bottom: 10px; }
.table-wrap { overflow: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .65px; padding: 13px 18px; font-weight: 650; white-space: nowrap; background: var(--surface-muted); border-bottom: 1px solid var(--line); }
td { padding: 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-muted); }
td a { text-decoration: none; font-weight: 600; }
td a:hover { text-decoration: underline; }
td small { font-size: 10px; color: var(--muted); display: block; margin-top: 4px; }
.person { display: flex; align-items: center; gap: 10px; }
.person .avatar { width: 31px; height: 31px; font-size: 11px; border-radius: 9px; }
.person strong { display: block; font-weight: 600; max-width: 230px; overflow-wrap: anywhere; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-cell { white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; padding: 5px 8px; background: var(--surface-muted); color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.completed::before, .badge.confirmed::before { background: var(--green); }
.empty-state { text-align: center; padding: 54px 24px; }
.empty-state .empty-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; color: var(--muted); background: var(--surface-muted); margin: 0 auto 18px; }
.empty-state h3 { font-size: 16px; margin-bottom: 7px; }
.empty-state p { color: var(--muted); font-size: 12px; max-width: 380px; margin: 0 auto 18px; }
.empty-state .button-row { justify-content: center; }
.pagination { display: flex; align-items: center; gap: 10px; }
.pagination a { text-decoration: none; font-weight: 600; }
.pagination span { color: var(--muted); }
.split-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 22px; align-items: start; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 0; }
dt { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 6px; }
dd { font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.notes { margin: 25px 0 0; padding-top: 21px; border-top: 1px solid var(--line); }
.notes p { font-size: 13px; line-height: 1.8; white-space: normal; overflow-wrap: anywhere; }
.action-list { display: grid; gap: 10px; }
.action-list .button { justify-content: flex-start; }
.action-list .button .icon:last-child { margin-left: auto; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline > li { padding: 0 0 24px 25px; border-left: 1px solid var(--line); position: relative; margin-left: 5px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before { position: absolute; content: ""; left: -5px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); }
.timeline-title { font-size: 12px; font-weight: 650; }
.timeline-meta { font-size: 10px; color: var(--muted); margin: 3px 0 9px; }
.timeline p { font-size: 12px; margin-bottom: 10px; overflow-wrap: anywhere; }
details { font-size: 12px; }
summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 7px 0; }
details ul { margin-bottom: 0; color: var(--muted); }
.filters-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.filters-grid .field { margin-bottom: 17px; }
.filter-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.filter-note { color: var(--muted); font-size: 11px; max-width: 440px; margin: 0; }
.export-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 15px; flex-wrap: wrap; padding: 18px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-muted); }
.export-toolbar .field { margin: 0; width: 155px; }
.selection-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.selection-tools label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.selection-count { color: var(--green); font-weight: 650; }
.table-hint { padding: 12px 24px; color: var(--muted); font-size: 10px; margin: 0; }
.scan-steps { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; padding: 0; margin: 0 0 28px; list-style: none; }
.scan-steps li { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.scan-steps li:not(:last-child)::after { content: "→"; margin: 0 13px; color: var(--muted); }
.step-number { border: 1px solid var(--input-border); display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; font-size: 10px; }
.scan-steps .active { color: var(--ink); font-weight: 650; }
.scan-steps .active .step-number { background: var(--surface-muted); color: var(--green); border-color: var(--green); }
.upload-intro { border: 1px dashed var(--input-border); border-radius: 10px; text-align: center; padding: 30px 20px; background: var(--surface-muted); margin-bottom: 22px; }
.upload-intro .icon { width: 33px; height: 33px; color: var(--green); margin-bottom: 14px; }
.upload-intro h3 { margin-bottom: 6px; }
.upload-intro p { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.scan-review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.source-panel { position: sticky; top: 20px; }
.source-pages { max-height: 76vh; overflow: auto; padding: 16px; background: var(--surface-muted); }
.source-page { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 16px; min-height: 100px; }
.source-page:last-child { margin-bottom: 0; }
.source-page p { color: var(--muted); font-size: 10px; padding: 10px 14px; margin: 0; border-bottom: 1px solid var(--line); }
.scan-image { max-width: 100%; width: 100%; height: auto; display: block; }
.review-row { border: 1px solid var(--line); padding: 0 18px; border-radius: 10px; margin: 0 0 18px; min-width: 0; background: var(--paper); }
.review-row-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.review-row-title { font-size: 12px; font-weight: 650; }
.review-row .remove-review-row { display: none; min-width: 29px; min-height: 29px; padding: 0; font-size: 18px; line-height: 1; }
html.js-scan-review .review-row .remove-review-row { display: inline-flex; }
.review-row .field { margin-bottom: 16px; }
.review-row .row-delete { grid-column: 1 / -1; }
html.js-scan-review .review-row .row-delete { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.row-delete label, .check-label { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; font-weight: 500; cursor: pointer; }
.row-delete label { color: var(--muted); }
.review-row:has(input[name$="-DELETE"]:checked) { border-style: dashed; background: var(--surface-muted); }
.review-row:has(input[name$="-DELETE"]:checked) .field:not(.row-delete) { opacity: .55; }
.check-label input { margin-top: 2px; }
.reviewed-list { list-style: none; margin: 0 0 20px; padding: 0; }
.reviewed-list li { border-bottom: 1px solid var(--line); padding: 15px 0; }
.reviewed-list li:first-child { padding-top: 0; }
.reviewed-list strong { display: block; font-size: 13px; margin-bottom: 7px; }
.reviewed-list p { font-size: 12px; color: var(--muted); margin: 7px 0 0; overflow-wrap: anywhere; }
.discard-form { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; gap: 12px; }
.discard-form p { font-size: 11px; color: var(--muted); margin: 0; }
.section-divider { border: 0; border-top: 1px solid var(--line); margin: 23px 0; }
.extraction-details { padding-bottom: 20px; }
.loading-status { font-size: 12px; color: var(--green); margin: 13px 0 0; }
.loading-status:empty { display: none; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; text-decoration: none; margin-bottom: 20px; }
.sr-only { 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; }
[hidden] { display: none !important; }
.auth-page { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 28px 20px; }
.auth-card { width: 100%; max-width: 400px; padding: 32px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.auth-card h1 { font-size: 23px; letter-spacing: -.5px; text-align: center; margin-bottom: 28px; }
.auth-card .field { margin-bottom: 20px; }
.auth-card button[type="submit"] { width: 100%; margin-top: 4px; }
.role-picker { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.role-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); }
.role-option { position: relative; cursor: pointer; }
.role-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.role-option span { display: block; padding: 10px 12px; border: 1px solid transparent; border-radius: 6px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.role-option input:checked + span { color: var(--green); background: var(--paper); border-color: var(--line); }
.role-option input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
@media (min-width: 1600px) { .workspace { padding-top: 44px; } }
@media (max-width: 1200px) {
  .sidebar { width: 210px; padding-inline: 14px; }
  .app-body { margin-left: 210px; }
  .workspace { padding: 30px 25px; }
  .metrics { gap: 10px; }
  .metric { padding: 17px 15px; }
  .page-heading { flex-wrap: wrap; }
  .heading-actions { padding-top: 0; justify-content: flex-start; }
  .split-layout { grid-template-columns: minmax(0, 1.6fr) minmax(245px, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: relative; inset: auto; width: 100%; padding: 17px 23px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-top { display: flex; justify-content: space-between; align-items: center; }
  html.js .nav-toggle { display: inline-flex; }
  html.js .sidebar:not(.is-open) .nav-content { display: none; }
  .account { margin-top: 14px; padding-top: 14px; }
  .main-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-nav a { font-size: 11px; }
  .app-body { margin-left: 0; }
  .brand strong { font-size: 16px; }
}
@media (max-width: 680px) {
  :root { font-size: 14px; }
  .workspace { padding: 25px 16px; }
  .sidebar { padding: 15px 17px; }
  .main-nav { grid-template-columns: 1fr; }
  .main-nav a { font-size: 13px; }
  h1 { font-size: 28px; }
  .page-heading { margin-bottom: 23px; gap: 18px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
  .metric { padding: 16px 14px; }
  .metric-head { font-size: 10px; gap: 6px; margin-bottom: 12px; }
  .metric-value { font-size: 26px; }
  .metric-foot { font-size: 9px; }
  .panel-header { padding: 20px 18px 17px; flex-wrap: wrap; gap: 12px; }
  .panel-body { padding: 20px 18px; }
  .toolbar { padding: 16px 18px; }
  .toolbar .search-field { flex-basis: 100%; }
  .panel-footer { padding: 16px 18px; font-size: 10px; flex-wrap: wrap; }
  .split-layout, .scan-review { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .form-card .panel-body { padding: 22px 18px; }
  .form-grid { gap: 0 13px; }
  .form-grid > .field { grid-column: 1 / -1; }
  .filters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 13px; }
  .filters-grid .field:first-child { grid-column: 1 / -1; }
  .export-toolbar { padding: 18px; align-items: stretch; }
  .export-toolbar .button-row { width: 100%; }
  .export-toolbar .button-row button { flex: 1; }
  .table-hint { padding-inline: 18px; }
  .table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .table-cards, .table-cards tbody { display: block; }
  .table-cards tr { display: grid; grid-template-columns: 1fr; padding: 15px 18px; border-bottom: 1px solid var(--line); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { padding: 6px 0; border: 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: right; white-space: normal; overflow-wrap: anywhere; min-width: 0; }
  .table-cards td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 500; text-align: left; flex-shrink: 0; }
  .table-cards td > * { min-width: 0; }
  .table-cards .person { justify-content: flex-end; }
  .table-cards .person .avatar { display: none; }
  .table-cards td.empty-cell { display: block; }
  .table-cards td.empty-cell::before { content: none; }
  .table-cards .empty-state { padding: 28px 10px; }
  .source-panel { position: static; }
  .source-pages { max-height: 48vh; }
  .scan-steps { gap: 5px; }
  .scan-steps li { font-size: 10px; gap: 6px; }
  .scan-steps li:not(:last-child)::after { margin-inline: 5px; }
  .scan-steps .step-number { width: 22px; height: 22px; }
  .auth-card { padding: 26px 22px; }
  .auth-card h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.settings-nav { margin-top: auto; padding-top: 24px; }
.settings-panel { max-width: 600px; }
.settings-panel .form-grid { display: block; }
.settings-panel .button-row { margin-top: 24px; }
.management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.management-grid .panel { min-width: 0; }
.management-grid .toolbar { align-items: end; }
.management-grid td { overflow-wrap: anywhere; }
.source-page img { background: #fff; }
@media (max-width: 1150px) { .management-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .settings-nav { grid-template-columns: 1fr; margin-top: 10px; padding-top: 0; } }

.session-row-actions { display: grid; gap: 8px; white-space: nowrap; }
.session-row-actions .delete-link { color: var(--red); }
.session-actions { scroll-margin-top: 24px; }
@media (max-width: 680px) {
  .session-layout .session-actions { order: -1; }
  .session-row-actions { display: flex; gap: 18px; }
}

.session-reference { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 11px; font-weight: 500; overflow-wrap: anywhere; }

.detail-reference { color: var(--muted); font-size: 13px; margin-bottom: 7px; }
