/* Invoice Reconciliation. Same family as HD Collections: warm paper canvas, charcoal sidebar, gold accents, Geist.
   One 4px spacing scale; one height for every single-line control; tables read in tabular figures.
   Nothing here is inline in a page: the Content-Security-Policy forbids inline style and script. */

/* 1. Font */
@font-face {
  font-family: "Geist Variable";
  src: url("../fonts/Geist-Variable.b39676298197.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 2. Tokens */
:root {
  --font: "Geist Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --canvas: #F6F3ED;
  --surface: #FFFFFF;
  --surface-sunk: #F1EDE5;
  --sidebar: #211E1A;
  --sidebar-2: #2E2A24;
  --ink: #1B1815;
  --ink-2: #4A443C;
  --ink-3: #6B645A;
  --on-dark: #F3EFE7;
  --on-dark-2: #B9AFA0;
  --gold: #B49C54;
  --gold-strong: #8E7838;   /* outlines, icons and bars (3:1 is enough there) */
  --gold-ink: #6F5C25;      /* gold as text: 5.9:1 on the canvas */
  --gold-wash: #F5F0E1;
  --line: #E2DACE;
  --line-strong: #CFC4B3;

  --ok: #2F6B43;      --ok-wash: #E7F1E9;
  --warn: #8A5D10;    --warn-wash: #FAF0DC;
  --bad: #8F2E27;     --bad-wash: #F8E9E7;
  --info: #2F5C79;    --info-wash: #E7EFF4;

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.25rem; --s6: 1.5rem; --s8: 2rem; --s10: 2.5rem;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-base: .875rem; --fs-lg: 1rem; --fs-xl: 1.125rem; --fs-2xl: 1.5rem;
  --radius: 7px; --radius-lg: 12px;
  --shadow: 0 2px 10px rgba(33, 30, 26, .07);
  --control-h: 2.5rem; --control-h-sm: 2rem;
  --sidebar-w: 15.5rem;
}

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 var(--fs-base)/1.5 var(--font); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
a { color: var(--ink); text-underline-offset: .18em; }
a:hover { color: var(--gold-ink); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 2px; }
.skip { position: absolute; left: var(--s4); top: -4rem; background: var(--ink); color: #fff; padding: var(--s2) var(--s4);
        border-radius: var(--radius); z-index: 50; }
.skip:focus { top: var(--s2); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--ink-3); }
.fine { color: var(--ink-3); font-size: var(--fs-sm); }
.ic { width: 1.125rem; height: 1.125rem; flex: none; }
.ic-sm { width: .9375rem; height: .9375rem; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* 4. Shell: charcoal sidebar on a desktop, a top bar on a phone */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--sidebar); color: var(--on-dark); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: var(--s6); padding: var(--s5) var(--s3);
}
.brand { display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s2); color: var(--on-dark); text-decoration: none; }
.brand:hover { color: var(--on-dark); }
.brand img { width: 2rem; height: 2rem; flex: none; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: var(--fs-lg); font-weight: 600; }
.brand-text small { color: var(--on-dark-2); font-size: var(--fs-xs); }
.side-nav { display: grid; gap: var(--s1); align-content: start; flex: 1; }
.side-label { margin: var(--s4) var(--s3) var(--s1); color: var(--on-dark-2); font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; }
.side-nav a {
  display: flex; align-items: center; gap: var(--s3); min-height: var(--control-h); padding: 0 var(--s3);
  border-radius: var(--radius); color: var(--on-dark-2); text-decoration: none; font-weight: 500; position: relative;
}
.side-nav a:hover { background: var(--sidebar-2); color: var(--on-dark); }
.side-nav a[aria-current="page"] { background: var(--sidebar-2); color: var(--on-dark); }
.side-nav a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 3px; background: var(--gold); border-radius: 2px; }
.side :focus-visible { outline-color: var(--gold); }
.side-user { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); align-items: center; padding: var(--s3); border-top: 1px solid var(--sidebar-2); }
.avatar { width: 2rem; height: 2rem; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font-weight: 600; grid-row: span 2; }
.who { font-weight: 600; font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-role { color: var(--on-dark-2); font-size: var(--fs-xs); }
.side-user form { grid-column: 1 / -1; margin-top: var(--s2); }
.btn-side {
  width: 100%; min-height: var(--control-h-sm); border-radius: var(--radius); border: 1px solid #5A5348; background: transparent;
  color: var(--on-dark); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); font-weight: 500;
}
.btn-side:hover { background: var(--sidebar-2); }
.main { padding: var(--s8) var(--s8) var(--s10); min-width: 0; max-width: 84rem; width: 100%; }
@media (max-width: 56rem) {
  .shell { display: block; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); padding: var(--s3) var(--s4); }
  .brand-text small { display: none; }
  .side-nav { display: flex; flex: 1 1 100%; order: 3; overflow-x: auto; gap: var(--s1); padding-bottom: var(--s1); }
  .side-nav a { white-space: nowrap; }
  .side-label { display: none; }
  .side-user { order: 2; margin-left: auto; border: 0; padding: 0; grid-template-columns: auto auto; }
  .side-user .who, .side-user .who-role { display: none; }
  .side-user form { grid-column: auto; margin: 0; }
  .btn-side { width: auto; padding: 0 var(--s3); }
  .main { padding: var(--s5) var(--s4) var(--s8); }
}

/* 5. Page head */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s3) var(--s6); margin-bottom: var(--s6); }
.page-title { font-size: clamp(1.375rem, 3vw, var(--fs-2xl)); }
.lede { margin-top: var(--s1); color: var(--ink-3); max-width: 46rem; }
.crumbs { margin-bottom: var(--s3); font-size: var(--fs-sm); color: var(--ink-3); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.actions form { margin: 0; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s2); }

/* 6. Buttons: 40px, small 32px; primary = charcoal, as on the portal */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--control-h); padding: 0 var(--s4);
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-sunk); color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #3A342D; color: #fff; }
.btn-sm { min-height: var(--control-h-sm); padding: 0 var(--s3); font-size: var(--fs-sm); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-danger { color: var(--bad); border-color: #C98C86; }
.btn-danger:hover { background: var(--bad-wash); color: var(--bad); }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
@media (pointer: coarse) { .btn-sm { min-height: 2.75rem; } }

/* 7. Chips: always a word, never colour alone */
.chip { display: inline-flex; align-items: center; gap: var(--s1); padding: .125rem .625rem; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; white-space: nowrap; }
.chip-ok { background: var(--ok-wash); color: var(--ok); }
.chip-warn { background: var(--warn-wash); color: var(--warn); }
.chip-bad { background: var(--bad-wash); color: var(--bad); }
.chip-info { background: var(--info-wash); color: var(--info); }
.chip-muted { background: var(--surface-sunk); color: var(--ink-2); }

/* 8. Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s5) var(--s6); margin-bottom: var(--s5); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s4); }
.card-title { font-size: var(--fs-xl); }
.card > p + p { margin-top: var(--s3); }
.card-flush .card-head { padding: var(--s5) var(--s6) 0; }

/* 9. Messages */
.messages { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; gap: var(--s2); }
.msg { padding: var(--s3) var(--s4); border-radius: var(--radius); border: 1px solid transparent; }
.msg-success { background: var(--ok-wash); color: var(--ok); border-color: #BFD8C6; }
.msg-error { background: var(--bad-wash); color: var(--bad); border-color: #E3B9B4; }
.msg-warning { background: var(--warn-wash); color: var(--warn); border-color: #E6CF9F; }
.msg-info { background: var(--info-wash); color: var(--info); border-color: #BCD1DF; }
.note-list { margin: var(--s2) 0 0; padding-left: var(--s5); }
.note-list li + li { margin-top: var(--s1); }

/* 10. Forms: label 4px above its box, help 4px below, 16px between fields */
label { font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); }
.field { display: grid; align-content: start; gap: var(--s1); margin: 0 0 var(--s4); min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0 var(--s4); }
.field-row .field { margin-bottom: var(--s4); }
input[type=text], input[type=search], input[type=email], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: var(--control-h); padding: var(--s2) var(--s3); border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
textarea { min-height: 5.5rem; resize: vertical; }
input:disabled, select:disabled { background: var(--surface-sunk); color: var(--ink-3); }
input[type=checkbox] { width: 1.125rem; height: 1.125rem; accent-color: var(--ink); }
.check-label { display: inline-flex; align-items: center; gap: var(--s3); font-size: var(--fs-base); font-weight: 500; color: var(--ink); }
.help { color: var(--ink-3); font-size: var(--fs-sm); }
.err { color: var(--bad); font-size: var(--fs-sm); font-weight: 500; }
input[aria-invalid="true"], .is-bad input { border-color: var(--bad); }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); margin-bottom: var(--s4); }
.filters .field { margin: 0; }
.filters .grow { flex: 1 1 14rem; }
form.bare { margin: 0; }
@media (pointer: coarse) { input, select, textarea { font-size: 1rem; } }

/* 11. Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s4); border-bottom: 1px solid var(--line-strong); }
.tabs a { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--control-h); padding: 0 var(--s4); color: var(--ink-2); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.count { display: inline-block; min-width: 1.5rem; padding: 0 .4rem; border-radius: 999px; background: var(--surface-sunk); color: var(--ink-2); font-size: var(--fs-xs); text-align: center; }

/* 12. Tables: padding 12x16, numbers right, actions right, scroll inside their own box */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); margin-bottom: var(--s4); }
.card .table-wrap { box-shadow: none; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-base); font-variant-numeric: tabular-nums; }
.data th, .data td { padding: var(--s3) var(--s4); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.data thead th { background: var(--surface-sunk); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr:hover { background: #FBF9F5; }
.data .num, .data th.num { text-align: right; white-space: nowrap; }
.data .end, .data th.end { text-align: right; white-space: nowrap; }
.data .sub { display: block; color: var(--ink-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.data .check { width: 2.5rem; }
.data a.row-link { font-weight: 600; text-decoration: none; white-space: nowrap; }
.data a.row-link:hover { text-decoration: underline; }
.data .wrap { min-width: 12rem; overflow-wrap: anywhere; }
.data tr.is-flag td { background: var(--warn-wash); }
.data input[type=text], .data input[type=number] { min-height: var(--control-h-sm); }
.data td.num input { text-align: right; min-width: 5.5rem; }
.data td .row-error { display: block; margin-top: var(--s1); }
@media (max-width: 80rem) { .data th, .data td { padding-inline: var(--s3); } }
@media (max-width: 72rem) { .hide-md { display: none; } }
@media (max-width: 40rem) { .hide-sm { display: none; } table.data { min-width: 28rem; } }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s2); color: var(--ink-3); font-size: var(--fs-sm); }
.pager nav { display: flex; gap: var(--s2); }
.bulkbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3) var(--s4); padding: var(--s4); margin-bottom: var(--s4); background: var(--gold-wash); border: 1px solid #E4D9B5; border-radius: var(--radius-lg); }
.bulkbar .field { margin: 0; min-width: 14rem; }
.empty { text-align: center; padding: var(--s10) var(--s5); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--ink-3); }
.empty h2 { color: var(--ink); font-size: var(--fs-xl); margin-bottom: var(--s2); }

/* 13. Upload */
.dropzone {
  display: grid; justify-items: center; gap: var(--s2); padding: var(--s10) var(--s6); text-align: center; cursor: pointer;
  border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink-2);
  transition: background .15s, border-color .15s;
}
.dropzone:hover, .dropzone.is-over { background: var(--gold-wash); border-color: var(--gold); }
.dropzone:focus-within { outline: 2px solid var(--gold-strong); outline-offset: 2px; }
.dropzone .ic { width: 2.25rem; height: 2.25rem; color: var(--gold-strong); }
.dz-title { font-size: var(--fs-xl); font-weight: 600; color: var(--ink); }
.dz-title u { text-decoration-color: var(--gold); }
.file-list { list-style: none; padding: 0; margin: var(--s4) 0 0; display: grid; gap: var(--s3); }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: center; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-meta { grid-column: 1 / -1; color: var(--ink-3); font-size: var(--fs-sm); }
.file-meta.is-bad { color: var(--bad); font-weight: 500; }
.file-row progress { grid-column: 1 / -1; width: 100%; height: .375rem; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-sunk); accent-color: var(--gold-strong); }
.file-row progress::-webkit-progress-bar { background: var(--surface-sunk); }
.file-row progress::-webkit-progress-value { background: var(--gold-strong); }
.file-row .actions { grid-column: 1 / -1; }

/* 14. One invoice */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--s5); align-items: start; }
.pane-pdf { position: sticky; top: var(--s4); }
.pdf-frame { display: block; width: 100%; height: calc(100vh - 7rem); min-height: 28rem; border: 0; border-radius: var(--radius); background: var(--surface-sunk); }
.pdf-fallback { padding: var(--s6); text-align: center; color: var(--ink-3); }
@media (max-width: 72rem) { .split { grid-template-columns: minmax(0, 1fr); } .pane-pdf { position: static; } .pdf-frame { height: 70vh; } }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s2) var(--s5); }
.facts dt { color: var(--ink-3); font-size: var(--fs-sm); }
.facts dd { font-weight: 500; overflow-wrap: anywhere; }
.totals { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.totals th, .totals td { padding: var(--s2) 0; text-align: left; font-weight: 500; }
.totals td { text-align: right; }
.totals tr + tr th, .totals tr + tr td { border-top: 1px solid var(--line); }
.totals .strong th, .totals .strong td { font-weight: 700; }
.totals .gap td, .totals .gap th { padding-top: var(--s3); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.timeline li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: var(--s3); font-size: var(--fs-sm); }
.timeline time { color: var(--ink-3); }
.timeline .what { overflow-wrap: anywhere; }
@media (max-width: 40rem) { .timeline li { grid-template-columns: 1fr; gap: 0; } }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); }
.inline-form .field { margin: 0; flex: 1 1 14rem; }

/* 15. Sign-in and error pages */
.page-login { display: grid; place-items: center; min-height: 100vh; padding: var(--s6) var(--s4); }
.login-card { width: min(26rem, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s8) var(--s6); text-align: center; display: grid; gap: var(--s4); }
.login-mark { margin: 0 auto; }
.login-card h1 { font-size: var(--fs-2xl); }
.plain { max-width: 34rem; margin: 12vh auto; padding: 0 var(--s4); text-align: center; display: grid; gap: var(--s3); justify-items: center; }
.card-empty { padding: 0 var(--s6) var(--s5); }

.pane-data { min-width: 0; }
.facts dd.dd-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.facts dd.dd-row .fine { font-weight: 400; }
.facts dd.dd-row form { margin: 0; }
.err.row-error { font-weight: 500; }
.pane-data .data th, .pane-data .data td { padding: var(--s2) var(--s3); font-size: var(--fs-sm); }
.pane-data .data thead th { font-size: var(--fs-xs); }

/* Phone: the everyday lists (upload, my invoices, the queue) show one small card per row instead of a table that scrolls sideways */
@media (max-width: 40rem) {
  table.stack, table.stack tbody { display: block; width: 100%; min-width: 0; }
  table.stack caption, table.stack thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ref status" "sup sup" "total act" "by by";
    gap: var(--s1) var(--s3); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line);
  }
  table.stack.has-check tr { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "check ref status" "check sup sup" "check total act" "check by by"; }
  table.stack tbody tr:last-child { border-bottom: 0; }
  table.stack td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; }
  table.stack td.c-check { grid-area: check; width: auto; align-self: start; padding-top: .125rem; }
  table.stack td.c-ref { grid-area: ref; }
  table.stack td.c-status { grid-area: status; justify-self: end; text-align: right; }
  table.stack td.c-sup { grid-area: sup; min-width: 0; }
  table.stack td.c-total { grid-area: total; white-space: normal; font-weight: 600; text-align: left; }
  table.stack td.c-act { grid-area: act; justify-self: end; }
  table.stack td.c-by { display: block; grid-area: by; color: var(--ink-3); font-size: var(--fs-sm); }
  table.stack td.c-by .sub { display: inline; }
  table.stack td.c-by .sub::before { content: " \00b7  "; white-space: pre; }
  table.stack td.c-status .sub { text-align: right; }
}
.card-narrow { max-width: 32rem; }

/* Phone: an invoice's items stack as small blocks (description, then the four figures in pairs) */
@media (max-width: 40rem) {
  table.stack-items, table.stack-items tbody { display: block; width: 100%; min-width: 0; }
  table.stack-items caption, table.stack-items thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack-items tr { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
  table.stack-items tbody tr:last-child { border-bottom: 0; }
  table.stack-items td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; }
  table.stack-items td.c-desc { grid-column: 1 / -1; font-weight: 600; }
  table.stack-items td[data-label]::before { content: attr(data-label); display: block; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .pane-data table.stack-items td { padding: 0; font-size: var(--fs-base); }
}

/* Polish from measuring the pages */
.card > .card-title { margin-bottom: var(--s4); }
.card > .field:last-child, .card > .field-row:last-child .field { margin-bottom: 0; }
.field-row > .field:only-child { max-width: 26rem; }
.card-flush .table-wrap { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin-bottom: 0; box-shadow: none; }
.data td.c-edit-desc { width: 36%; min-width: 15rem; }
.data td.c-edit-code { width: 7rem; }
@media (max-width: 56rem) { .side-nav a { padding: 0 var(--s2); gap: var(--s2); } }
@media (max-width: 40rem) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; white-space: nowrap; }
}
@media (max-width: 30rem) {
  .btn-side .btn-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .btn-side { min-width: 2.5rem; padding: 0 var(--s2); }
}
@media (pointer: coarse) { .side-nav a { min-height: 2.75rem; } .btn-side { min-height: 2.75rem; min-width: 2.75rem; } }
