@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF,U+AB30-AB6F;
}

@font-face {
  font-family: Inter;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --red: #e11d2e;
  --red-hover: #bd1322;
  --red-ink: #a51220;
  --rose: #fff0f1;
  --ink: #171717;
  --muted: #5e5e5e;
  --line: #e7e3e1;
  --control: #89817e;
  --surface: #fff;
  --canvas: #f7f6f4;
  --soft: #f6f5f4;
  --blue: #1d4ed8;
  --page-inset: clamp(20px, 3vw, 40px);
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 1rem; line-height: 1.5; }
h1, h2, h3, p, dl { margin: 0; }
h1 { font-size: 1.75rem; line-height: 2.25rem; letter-spacing: -.035em; }
h2 { font-size: 1.25rem; line-height: 1.75rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; line-height: 1.5rem; }
small, .meta { font-size: .75rem; line-height: 1rem; }
small, .muted { color: var(--muted); }
a { color: var(--red-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
#main:focus, #view h1:focus { outline-offset: 4px; }

button, input, select, textarea { font: inherit; color: inherit; }
button, input, select, textarea {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--control);
  border-radius: 8px;
  background: var(--surface);
}
button {
  cursor: pointer;
  font-size: .875rem;
  line-height: 1.25rem;
  font-weight: 650;
  border-color: var(--line);
}
button:hover { background: var(--soft); }
button:disabled { cursor: default; opacity: .55; }
button.primary { color: #fff; background: var(--red); border-color: var(--red); }
button.primary:hover:not(:disabled) { background: var(--red-hover); border-color: var(--red-hover); }
button.danger { color: var(--red-ink); }
button.danger:hover:not(:disabled) { background: var(--rose); }
.text-button, .link {
  background: transparent;
  border: 0;
  color: var(--red-ink);
  text-align: start;
  overflow-wrap: anywhere;
  text-underline-offset: 4px;
}
.text-button:hover, .link:hover { background: transparent; text-decoration: underline; }
.link { min-height: 44px; padding: 4px 0; }

label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: .875rem;
  line-height: 1.25rem;
  font-weight: 650;
}
label input, label select, label textarea {
  width: 100%;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
}
textarea { min-height: 96px; resize: vertical; }
input[readonly] { background: var(--soft); border-color: var(--line); }
input[type="file"] { padding: 8px; color: var(--muted); font-size: .875rem; }
input::file-selector-button {
  margin-inline-end: 12px;
  padding: 5px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--red-ink);
  background: var(--rose);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.brand { display: flex; align-items: center; font-size: 1.625rem; letter-spacing: -.06em; font-weight: 790; }
.mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin-inline-end: 10px;
  border-radius: 11px;
  background: var(--red);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -.085em;
}
.brand-dot { color: var(--red); }

.login { min-height: 100vh; display: grid; grid-template-columns: 1.04fr 1fr; }
.login-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-content: space-between;
  gap: 72px;
  padding: clamp(32px, 5vw, 80px);
  color: #fff;
  background: linear-gradient(145deg, #221619 25%, #411c24 72%, #69232e);
}
.login-brand::before, .welcome::before {
  position: absolute;
  z-index: -1;
  content: "";
  width: 420px;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgb(255 255 255 / .055), 0 0 0 66px rgb(255 255 255 / .045), 0 0 0 106px rgb(255 255 255 / .035);
  pointer-events: none;
}
.login-brand::before { right: -225px; bottom: -126px; }
.login-intro { display: grid; gap: 16px; }
.login-intro h1 { max-width: 12ch; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -.055em; }
.login-intro p { max-width: 33ch; color: #ecd8da; }
.accent-line { width: 40px; height: 3px; border-radius: 3px; background: #fb6977; }
.login-product { color: #ecd8da; font-size: .875rem; font-weight: 600; }
.login-panel { width: min(100%, 500px); align-self: center; margin-inline: auto; padding: clamp(24px, 5vw, 56px); }
.login-panel h2 { font-size: 1.75rem; line-height: 2.25rem; }
.login-panel h2 + p { margin-top: 8px; }
.login-panel form { display: grid; gap: 16px; margin-top: 24px; }
.login-panel .primary { margin-top: 4px; }
.login-panel .text-button { margin-top: 8px; padding-inline: 0; }
.login-panel .feedback { margin: 0; }
.login-panel .account-back { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 650; }
.sr-only, .login-mode input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.login-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}
.login-mode span {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
}
.login-mode input:checked + span { background: var(--surface); color: var(--red-ink); box-shadow: 0 1px 3px #281b1a26; }
.login-mode input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.shell {
  display: grid;
  grid-template-columns: clamp(224px, 18vw, 248px) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--canvas);
}
.skip-link {
  position: fixed;
  z-index: 10;
  inset: 8px auto auto 16px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  max-height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 16px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar .brand { padding-inline: 8px; }
.workspace-company { display: grid; gap: 8px; }
.tenant { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.tenant small, .tenant strong { display: block; }
.tenant strong, .session strong { font-size: .875rem; line-height: 1.25rem; overflow-wrap: anywhere; }
.monogram {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--soft);
  font-size: .75rem;
  font-weight: 750;
}
.session .monogram { background: var(--rose); color: var(--red-ink); border-radius: 50%; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline: 12px;
  text-align: start;
  border: 1px solid transparent;
  color: #4b4243;
}
.sidebar nav .active { color: var(--red-ink); background: var(--rose); border-color: #f7d8dc; }
.nav-icon {
  position: relative;
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}
.nav-icon::before, .nav-icon::after { position: absolute; content: ""; }
.nav-welcome::before { inset: 5px 0 auto; border-top: 1.5px solid; }
.nav-welcome::after { inset: 0 auto 0 5px; border-left: 1.5px solid; }
.nav-list { border-radius: 3px; }
.nav-list::before { inset: 4px 3px auto; border-top: 1.5px solid; }
.nav-list::after { inset: 7px 3px auto; border-top: 1.5px solid; }
.nav-inbox::before { inset: 7px 0 auto; border-top: 1.5px solid; }
.nav-inbox::after { inset: 3px 4px auto; height: 3px; border: solid; border-width: 0 1.5px 1.5px; }
.nav-purchasing::before { inset: 3px 0 auto; border-top: 1.5px solid; }
.nav-purchasing::after { inset: 0 auto 6px 6px; border-left: 1.5px solid; }
.nav-admin::before { inset: 2px auto auto 4px; width: 5px; height: 5px; border: 1px solid; border-radius: 50%; }
.nav-admin::after { inset: auto 2px 1px; height: 4px; border: solid; border-width: 1px 1px 0; border-radius: 3px 3px 0 0; }
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}
.product-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px var(--page-inset);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.crumb, .session { display: flex; align-items: center; gap: 10px; }
.crumb { font-size: .875rem; color: var(--muted); }
.crumb strong { color: var(--ink); }
#logout { margin-inline-start: 6px; }
#menu { display: none; }
main { width: min(100%, 1416px); margin-inline: auto; padding: 32px var(--page-inset) 48px; }
.page, .section-heading, .form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
}
.page { margin-bottom: 24px; }
.page h1 { overflow-wrap: anywhere; }
.page p { margin-top: 4px; color: var(--muted); }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { margin: 0; }

.card {
  min-width: 0;
  margin-bottom: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card > h2 { margin-bottom: 16px; }
.card > h3 { margin: 24px 0 8px; }
.stack, .detail-grid { min-width: 0; }
.stack > .card:last-child { margin-bottom: 0; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feedback {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e3a8a;
  background: #eff6ff;
  overflow-wrap: anywhere;
}
.feedback.error { color: #991b1b; background: #fef2f2; border-color: #fecaca; }
.feedback.success { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }

.welcome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 222px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  margin-bottom: 24px;
  padding: 32px clamp(24px, 4vw, 48px);
  border: 0;
  color: #fff;
  background: linear-gradient(105deg, #25191e 24%, #3b2029 65%, #672732);
}
.welcome::before { right: -90px; top: -125px; }
.welcome p { max-width: 48ch; color: #f1dfe3; }
.welcome h1 { overflow-wrap: anywhere; }
.welcome .actions { margin-top: 4px; }
.welcome .hero-alt { border-color: #ae8490; color: #fff; background: #42262e; }
.welcome .hero-alt:hover { background: #5a333e; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 164px), 1fr)); gap: 12px; margin-bottom: 24px; }
.stat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  padding: 16px 20px;
}
.stat span.stat-label { color: var(--muted); font-size: .875rem; font-weight: 550; }
.stat strong { grid-column: 1; font-size: 1.75rem; line-height: 2.25rem; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.stat-icon { display: grid; place-items: center; grid-column: 2; grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: #62565a; }
.stat-icon.waiting { background: #fffbeb; color: #92400e; }
.stat-icon.good { background: #f0fdf4; color: #166534; }
.stat-icon.good .nav-icon { border-width: 0 0 1.5px 1.5px; border-radius: 0; width: 12px; height: 7px; transform: rotate(-45deg); }
.stat-icon.waiting .nav-icon { border-radius: 50%; }
.stat-icon.waiting .nav-icon::before { inset: 2px 3px 5px 5px; border: solid; border-width: 0 0 1.5px 1.5px; }

.table-card { padding: 0; }
.table-card > .section-heading { padding: 16px 24px; margin: 0; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(168px, 30%); align-items: end; gap: 12px; padding: 20px 24px 12px; }
.result-status { min-height: 36px; padding: 0 24px 12px; color: var(--muted); font-size: .875rem; line-height: 1.5rem; }
.scroll { overflow: auto; }
.scroll:focus-visible { outline-offset: -2px; }
.scroll table { min-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.25rem; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: #51494a; background: var(--soft); font-weight: 650; }
td { overflow-wrap: anywhere; }
.table-card th:first-child, .table-card td:first-child { padding-inline-start: 24px; }
.table-card th:last-child, .table-card td:last-child { padding-inline-end: 24px; }
.table-card tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfaf9; }
.scroll .requests-table { min-width: 636px; }
.requests-table td:first-child { width: 32%; }
.table-title { display: grid; align-content: center; gap: 2px; }
.table-title .link { display: block; margin-block: -8px; padding-block: 8px; }
.table-title small { margin-bottom: 4px; }
.date, .amount { font-variant-numeric: tabular-nums; }
.date { white-space: nowrap; }
.amount { text-align: right; }
td.amount { white-space: nowrap; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 10px;
  background: #f3f4f6;
  color: #374151;
  font-size: .75rem;
  line-height: 1rem;
  font-weight: 670;
  overflow-wrap: anywhere;
}
.badge::before { content: ""; flex: 0 0 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.waiting { background: #fffbeb; color: #92400e; }
.badge.good { background: #f0fdf4; color: #166534; }
.badge.bad { background: #fef2f2; color: #991b1b; }
.badge.info { background: #eff6ff; color: #1d4ed8; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 32px 24px; text-align: center; }
.empty p { color: var(--muted); }
.table-card > .empty { border-top: 1px solid var(--line); }
.loading { color: var(--muted); }
.load-error { display: grid; justify-items: start; gap: 12px; padding: 24px; }
.load-error p { overflow-wrap: anywhere; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(268px, 1fr); align-items: start; gap: 16px; }
.data-grid, .form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-grid dd { white-space: pre-wrap; }
.detail-grid dt, .document dt { margin-bottom: 4px; font-size: .875rem; line-height: 1.25rem; color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.detail-grid > div, .decision-form { min-width: 0; }
.detail-grid .scroll table { min-width: 380px; }
.detail-grid th, .detail-grid td { padding-inline: 10px; vertical-align: top; }
.item-reference { display: block; margin-top: 4px; }
.total { margin: 12px 0 0; font-weight: 680; font-variant-numeric: tabular-nums; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 20px; overflow-wrap: anywhere; }
.timeline li::before { position: absolute; inset: 11px auto -4px 4px; width: 1px; content: ""; background: var(--line); }
.timeline li::after { position: absolute; inset: 7px auto auto 0; width: 9px; height: 9px; content: ""; border: 1px solid #9e868a; border-radius: 50%; background: var(--surface); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline .current::after { border-color: var(--red-ink); background: var(--red); box-shadow: 0 0 0 3px var(--rose); }
.timeline .complete::after { background: #166534; border-color: #166534; }
.timeline .muted { font-size: .875rem; }
.timeline p { margin-block: 4px; white-space: pre-wrap; }
.decision-form, .action-form { display: grid; gap: 12px; }
.decision-form .actions, .action-form .actions { margin-top: 4px; }
.field-error { color: #991b1b; font-size: .875rem; }
[aria-invalid="true"] { border-color: #991b1b; }
.clean-list { margin: 0; padding: 0; list-style: none; }
.clean-list li { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.clean-list li:last-child { padding-bottom: 0; border: 0; }
.attachments .clean-list a { display: inline-flex; align-items: center; min-height: 44px; }
.attachments .clean-list li { padding-block: 0; }

#draft-form { max-width: 1024px; }
#draft-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
#draft-form .item-row { margin-bottom: 16px; }
.item-row legend { padding: 0; font-weight: 700; }
.item-fields { margin-top: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fcfbfa; }
.item-fields button { margin-top: 12px; }
.item-summary { margin-bottom: 0; }
.urgent-fields { background: #fff7f7; border-color: #f6c5ca; }
.form-actions { justify-content: flex-end; }
.file-help, #decision-help { font-size: .875rem; font-weight: 400; }
.invite-form { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; }
.platform-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.platform-grid > .card { margin-bottom: 0; }
.platform-search { padding: 0 24px 8px; }
.platform-search input { width: 100%; }
.platform-table th:nth-child(n+2), .platform-table td:nth-child(n+2) { white-space: nowrap; }
.platform-table tr:has([aria-pressed="true"]) { background: var(--rose); }
.tenant-link { display: grid; align-content: center; gap: 2px; }
.tenant-link strong, .tenant-link small { overflow-wrap: anywhere; }
.platform-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.platform-meta > div { padding: 10px 12px; border-radius: 8px; background: var(--soft); overflow-wrap: anywhere; }
.platform-meta > div:last-child { grid-column: 1 / -1; }
.platform-meta dt { color: var(--muted); font-size: .75rem; }
.platform-meta dd { margin: 4px 0 0; font-size: .875rem; font-weight: 650; }
.platform-admin-heading { margin: 22px 0 8px; }
.platform-admins { list-style: none; margin: 0; padding: 0; }
.platform-admins li { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.platform-admins li:last-child { padding-bottom: 0; }
.platform-admin-name { display: grid; justify-items: start; gap: 4px; flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.platform-admin-name strong { font-size: .875rem; }
.platform-detail .empty { padding-inline: 0; }
.platform-dialog {
  width: min(660px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 16px 50px #24141629;
}
.platform-dialog::backdrop { background: #24141666; }
.tenant-dialog { width: min(420px, calc(100% - 32px)); }
.tenant-dialog h2 { margin-bottom: 16px; }
.platform-dialog-intro { margin: -8px 0 16px; overflow-wrap: anywhere; }
.platform-form { display: grid; gap: 18px; }
.platform-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.platform-form legend { margin-bottom: 8px; padding: 0; font-weight: 700; }
.platform-form .form-fields { align-items: end; }
.platform-form fieldset p { margin-top: 8px; font-size: .875rem; }
.platform-form .feedback { margin: 0; }

@media (max-width: 1150px) {
  .platform-grid { grid-template-columns: minmax(0, 1fr); }
}
.admin-actions { min-width: 170px; }
.role-list { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; list-style: none; }
.role-list .badge { white-space: normal; }
.add-role-form { grid-template-columns: minmax(0, 280px) auto; align-items: end; justify-content: start; }
.role-options { display: grid; gap: 8px; }
label.role-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.role-option:has(:checked) { background: var(--rose); }
.role-option input { flex: none; width: 16px; height: 16px; margin: 3px 0 0; }
.role-option small { display: block; margin-top: 2px; font-weight: 400; }

.document {
  width: min(100%, 210mm);
  margin-inline: auto;
  padding: clamp(24px, 5vw, 56px);
  color: #1e242c;
}
.document header { padding-bottom: 16px; text-align: center; border-bottom: 2px solid currentColor; }
.document header h1 { margin: 4px 0; }
.document section { margin-top: 24px; }
.document h2 { margin-bottom: 12px; }
.document th, .document td { border: 1px solid #aab5bf; }
.document .scroll { margin: 0; }

@media (max-width: 1150px) {
  .card { padding: 20px; }
  .welcome { padding: 32px; }
  .table-card { padding: 0; }
}

@media (max-width: 990px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-grid #detail-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
  .detail-grid #detail-sidebar > .card { margin: 0; }
}

@media (max-width: 760px) {
  .login, .shell { display: block; }
  .login-brand { gap: 24px; }
  .login-product, .crumb, .session .monogram { display: none; }
  .sidebar { display: none; position: static; min-height: auto; max-height: none; }
  .sidebar.open { display: flex; }
  #menu { display: inline-block; }
  main { padding-top: 24px; }
  .data-grid, .form-fields, .filters, .detail-grid #detail-sidebar { grid-template-columns: minmax(0, 1fr); }
  .filters { padding-inline: 16px; }
  .result-status { padding-inline: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .15s ease, border-color .15s ease; }
}

@page { size: A4 portrait; margin: 14mm; }
@media print {
  :root, .shell { background: #fff; }
  .shell { display: block; }
  .sidebar, .topbar, .skip-link, #notice, .no-print { display: none !important; }
  main { max-width: none; padding: 0; }
  .document { width: auto; padding: 0; border: 0; font: 10pt/1.5 Arial, sans-serif; }
  .document .scroll { overflow: visible; }
  .document header { padding-bottom: 10px; }
  .document section { margin-top: 16px; }
  .document h1 { font-size: 18pt; line-height: 24pt; }
  .document h2 { font-size: 13pt; line-height: 18pt; margin-bottom: 8px; break-after: avoid; }
  .document table, .document dt { font-size: 9pt; line-height: 12pt; }
  .document td, .document th { padding: 6px 8px; }
  .document thead { display: table-header-group; }
  .document tr, .document .data-grid > div { break-inside: avoid; }
  .document .data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
}
