/* Cantiere Control — base visiva (vedi CLAUDE.md, sezione Diseño). */
:root {
  --navy: #0B2D5B;           /* marca: testo e pulsante principale (13,6:1 su bianco) */
  --frame: #F4F6F9;          /* cornice: Grigio Nebbia del manuale di marca */
  --sheet: #FFFFFF;
  --line: #DFE2E8;
  --muted: #5B636B;          /* Grigio Ardesia del manuale: testo secondario (6,1:1 su bianco, 5,6:1 sulla cornice) */
  --pill: #E6E8EC;           /* voce di menu attiva */
  --danger: #A32020;
  --success: #1F6B3A;
  --accent: #E76A1A;         /* Business: Arancio Cantiere (solo riempimenti e dati) */
  --accent-shade: #B9520F;   /* ombra e luce dell'accento, solo nel check del marchio */
  --accent-light: #F6A06A;
  --accent-text: #AD4D0E;    /* arancio scuro per testo su bianco (5,5:1) */
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.edition-saas {
  --accent: #1E9BD7;         /* SaaS: Azzurro Cloud */
  --accent-shade: #1478AA;
  --accent-light: #8CD3F5;
  --accent-text: #0E6E9E;    /* 5,6:1 su bianco */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--frame);
  color: var(--navy);
  font: 15px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
}
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 4px; }
.lead { margin: 0 0 24px; color: var(--muted); }
.muted { color: var(--muted); }
a { color: var(--navy); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* Cornice: menu laterale + barra superiore senza separazione, contenuto su foglio bianco. */
.frame {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas: "side top" "side main";
  min-height: 100vh;
}
.sidebar { grid-area: side; padding: 16px 12px; }
.topbar {
  grid-area: top; display: flex; align-items: center; gap: 16px; padding: 0 24px 0 8px;
}
.topbar-org { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.sheet {
  grid-area: main; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 16px 16px 0; padding: 32px; min-width: 0;
}
/* Marchio (manuale «Brand Identity»): isotipo + logotipo in tracciati; check e filetto nell'accento
   dell'edizione. L'area di rispetto è 1/4 dell'altezza dell'isotipo (11 px su 44). */
.brand { display: flex; align-items: center; text-decoration: none; padding: 11px 8px 22px; --brand-bg: var(--frame); }
.brand-lockup { display: block; height: 44px; width: auto; flex: none; }
.bm-navy { fill: var(--navy); }
.bm-slate { fill: var(--muted); }
.bm-rule { fill: var(--accent); }
.bm-ko { stroke: var(--brand-bg); }
.bm-a { stroke: var(--accent); }
.bm-ad { stroke: var(--accent-shade); }
.bm-ah { stroke: var(--accent-light); }
.nav { list-style: none; margin: 0; padding: 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px;
  border-radius: 999px; text-decoration: none; color: var(--navy);
}
.nav-item:hover { background: #ECEEF1; }
.nav-item.is-active { background: var(--pill); font-weight: 600; }
.icon { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-toggle, .nav-open { display: none; }

/* Controlli: almeno 32px (44px su mobile). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px;
  border-radius: var(--radius); border: 1px solid transparent; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #082245; }
.btn-secondary { background: var(--sheet); color: var(--navy); border-color: var(--line); }
.btn-link { background: none; color: var(--navy); text-decoration: underline; padding: 0; min-height: 32px; }
.btn-block { width: 100%; }
.link { color: var(--navy); }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.select-compact, .field input, .field select {
  min-height: 36px; border: 1px solid #B8BEC9; border-radius: var(--radius); padding: 0 10px;
  font: inherit; color: var(--navy); background: #fff;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input { width: 100%; min-height: 40px; }
.field.has-error input { border-color: var(--danger); }
.help { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.field-error { margin: 4px 0 0; color: var(--danger); font-size: 13px; }
.alert { border: 1px solid #E8B4B4; background: #FBEFEF; color: var(--danger); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 16px; }
.alert p { margin: 0; }
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.message { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.message-success { border-color: #B5D6C0; background: #EEF7F1; color: var(--success); }
.message-warning, .message-error { border-color: #E8B4B4; background: #FBEFEF; color: var(--danger); }

/* Indicatori come testo: etichetta grigia sopra il valore. */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; margin: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.facts .num { text-align: left; }

/* Accesso, cambio password, scelta impresa. */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.brand-auth { padding: 0 0 28px; justify-content: center; --brand-bg: var(--sheet); }
.brand-auth .brand-lockup { height: 60px; }
.auth-secondary { margin-top: 16px; text-align: center; }

/* Pagina di accesso «schermo diviso»: pannello di marca e modulo (vedi CLAUDE.md, Diseño). */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); background: var(--sheet); }
.auth-panel {
  position: relative; overflow: hidden; background: var(--navy); color: #fff;
  padding: 64px 64px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.auth-panel-art { position: absolute; right: -90px; bottom: -70px; width: 420px; height: 420px; opacity: 0.14; pointer-events: none; }
.auth-panel-art polygon, .auth-panel-art path { fill: none; stroke: #fff; stroke-width: 1; }
.auth-panel-art .thin { stroke-width: 0.8; }
.auth-panel-intro { position: relative; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.auth-rule { display: block; width: 48px; height: 4px; background: var(--accent); }
.auth-claim { margin: 0; font-size: 36px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.auth-sub { margin: 0; font-size: 16px; line-height: 1.55; color: #C9D6EA; }
.auth-points { position: relative; list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 460px; }
.auth-points li { position: relative; padding-left: 20px; line-height: 1.45; }
.auth-points li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; background: var(--accent); }
.auth-points strong { font-weight: 600; }
.auth-points span { color: #C9D6EA; }
.auth-form { display: flex; flex-direction: column; min-width: 0; }
.auth-bar { display: flex; justify-content: flex-end; padding: 24px 32px; }
.auth-bar label { font-size: 13px; color: var(--muted); }
.auth-form-body { flex: 1 1 auto; width: 100%; max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; padding: 0 16px; }
.auth-form-body .brand-auth { justify-content: flex-start; padding-bottom: 28px; }
.auth-form-body .brand-auth .brand-lockup { height: 54px; }
.auth-form-body h1 { font-size: 28px; }
.auth-form .field input { min-height: 44px; }
.auth-form .btn-primary { min-height: 44px; margin-top: 8px; }
.auth-help { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.auth-foot { margin: 0; padding: 24px; text-align: center; font-size: 13px; color: var(--muted); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.label-row label { margin-bottom: 0; }
.password-toggle { border: 0; background: none; padding: 0 2px; font: inherit; font-size: 13px; color: var(--navy); text-decoration: underline; cursor: pointer; }
@media (max-width: 960px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-panel { padding: 28px 20px 24px; gap: 0; }
  .auth-panel-art, .auth-sub, .auth-points { display: none; }
  .auth-panel-intro { gap: 12px; }
  .auth-rule { width: 40px; }
  .auth-claim { font-size: 22px; line-height: 1.2; }
  .auth-bar { padding: 16px; }
  .auth-form-body { justify-content: flex-start; padding: 8px 20px 0; }
  .auth-form-body h1 { font-size: 24px; }
  .auth-form .field input, .auth-form .btn-primary { min-height: 48px; font-size: 16px; }
  .password-toggle { min-height: 44px; font-size: 14px; }
}
.choice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.choice-list form { margin: 0; }
.choice {
  width: 100%; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--navy); font: inherit; cursor: pointer;
}
.choice:hover { border-color: var(--navy); }
.choice-title { font-weight: 600; }

/* Mobile: il menu si piega; controlli da 44px. */
@media (max-width: 800px) {
  .frame { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; grid-template-areas: "top" "side" "main"; }
  .nav-open { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
  .sidebar { display: none; padding-top: 0; }
  .nav-toggle:checked ~ .sidebar { display: block; }
  .topbar { padding: 8px 16px 8px 4px; flex-wrap: wrap; }
  .topbar-actions { flex-wrap: wrap; gap: 8px; width: 100%; padding-left: 12px; }
  .topbar-user { display: none; }
  .sheet { margin: 0 16px 16px; padding: 20px 16px; }
  .btn, .select-compact, .field input, .nav-item { min-height: 44px; }
}

/* --- Fase 1: elenchi, schede e moduli --- */
h2 { font-size: 18px; margin: 32px 0 8px; }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
h1 .mono { font-size: inherit; } /* numero del documento nel titolo: 24px */
.nowrap { white-space: nowrap; }
.back { margin: 0 0 8px; }
.empty { color: var(--muted); padding: 24px 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.topbar-mark { flex: none; line-height: 0; --brand-bg: var(--frame); }
.topbar-mark .brand-mark { width: 32px; height: 32px; }
.topbar-org { display: flex; align-items: center; gap: 8px; }
.topbar-org > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar-logo { height: 24px; width: auto; max-width: 96px; object-fit: contain; flex: none; }

/* Schede: la scheda attiva usa l'accento dell'edizione. */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 8px 0 16px; overflow-x: auto; scrollbar-width: thin; }
.tab { flex: none; white-space: nowrap; padding: 8px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.tab.is-active { color: var(--navy); border-bottom-color: var(--accent); font-weight: 600; }
.tab-count { font-size: 12px; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.field-inline { margin: 0; }
.field-inline input, .field-inline select { width: auto; min-width: 140px; }
.field-grow { flex: 1; min-width: 220px; }
.field-grow input { width: 100%; }
.filters-actions { display: flex; gap: 12px; align-items: center; min-height: 40px; }

/* Tabelle senza zebra né banda d'intestazione; numeri a destra con cifre tabulari. */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th.num, .table td.num { text-align: right; }
.table a { font-weight: 600; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.pill-success { background: #E6F2EA; color: var(--success); }
.pill-muted { background: #ECEEF1; color: #4A5160; }
.pill-warning { background: #FBEEDD; color: #8A4B0C; }
.pill-danger { background: #FBEFEF; color: var(--danger); }
.pagination { display: flex; gap: 12px; align-items: center; margin-top: 16px; }

/* Moduli su due colonne su desktop. */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.form-grid .field:has(textarea), .form-grid .form-actions, .form-grid .alert, .form-grid > datalist { grid-column: 1 / -1; }
.field textarea { width: 100%; border: 1px solid #B8BEC9; border-radius: var(--radius); padding: 8px 10px; font: inherit; color: var(--navy); }
.field select { width: 100%; min-height: 40px; }
.field-check { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; }
.field-check label { margin: 0; }
.field-check input { width: 20px; height: 20px; min-height: 0; }
.form-actions { margin-top: 8px; }
.section-gap { margin: 24px 0 16px; }
.warning-text { color: #8A4B0C; }
.section { margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--line); }
.danger-zone { margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--line); max-width: 560px; }
.notice { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.notice p { margin: 0; }
.logo-preview { margin: 8px 0 12px; }
.logo-preview img { max-height: 80px; max-width: 240px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: #fff; }

/* Permessi per gruppo. */
.perm-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px 4px; margin: 0 0 16px; }
.perm-group legend { font-weight: 600; padding: 0 6px; }
.perm-row { display: grid; grid-template-columns: 1fr auto 180px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.perm-row:last-child { border-bottom: 0; }
.perm-row select { min-height: 36px; border: 1px solid #B8BEC9; border-radius: var(--radius); padding: 0 8px; font: inherit; color: var(--navy); background: #fff; }

details summary { cursor: pointer; color: var(--muted); }
.diff { margin: 6px 0 0; }
.diff dt { font-size: 12px; color: var(--muted); }
.diff dd { margin: 0 0 6px; }
.kv { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.kv li { word-break: break-word; }

@media (max-width: 800px) {
  .form-grid { grid-template-columns: 1fr; }
  .perm-row { grid-template-columns: 1fr; gap: 4px; }
  .field-inline input, .field-inline select { width: 100%; }
  .field-inline { flex: 1 1 100%; }
  .tab { min-height: 44px; }
  .hide-mobile { display: none; }
}

/* --- Fase 2: cantieri --- */
h1 .pill { vertical-align: middle; margin-left: 6px; }
.text-danger { color: var(--danger); font-weight: 600; }
.show-mobile { display: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.facts-compact dd { font-size: 15px; font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; max-width: 320px; }
.stack input, .stack select { min-height: 36px; border: 1px solid #B8BEC9; border-radius: var(--radius); padding: 0 8px; font: inherit; color: var(--navy); background: #fff; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.card p { margin: 6px 0 0; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.gallery img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.gallery p { margin: 6px 0 0; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.checks .pill { margin-right: 6px; }
@media (max-width: 800px) {
  .table .inline-form { flex-direction: column; align-items: stretch; }
  .show-mobile { display: block; }
  .tabs { overflow-x: auto; white-space: nowrap; }
}
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.h3 { font-size: 16px; margin: 24px 0 8px; }

/* --- Fase 3: preventivi --- */
.totals { margin: 16px 0 0 auto; max-width: 420px; display: grid; gap: 4px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 4px 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .total-strong dt, .totals .total-strong dd { color: var(--navy); font-weight: 700; }
.lines-table select, .lines-table input { width: 100%; min-height: 36px; border: 1px solid #B8BEC9; border-radius: var(--radius); padding: 0 8px; font: inherit; color: var(--navy); background: #fff; }
.lines-table td.num input { text-align: right; max-width: 140px; }
.field ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 16px; }
.field input[type=radio], .field input[type=checkbox] { width: auto; min-height: 0; }
.field ul label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.wrap-anywhere { overflow-wrap: anywhere; }
.room { border-top: 1px solid var(--line); padding: 16px 0; }
.room:first-of-type { border-top: 0; padding-top: 0; }
.room .page-head { margin-bottom: 8px; align-items: flex-start; }
.room .h3 { margin: 0 0 4px; }
.week-table input { width: 5.5em; text-align: right; }
.week-table input:disabled { background: var(--frame); }

/* --- Fase 8: costi --- */
.finding { font-size: 16px; margin: 0 0 20px; }
.table .row-total td { font-weight: 600; border-bottom: 0; border-top: 1px solid var(--navy); }
.inline-details { margin-top: 12px; }
.inline-details summary { min-height: 32px; display: flex; align-items: center; }
.inline-details[open] summary { margin-bottom: 12px; }
/* Grafico dei costi per mese: grigio neutro #7A7A7A (validato contro entrambi gli accenti),
   mese corrente in accento; scorre in orizzontale sui telefoni invece di rimpicciolire il testo. */
.chart-wrap { overflow-x: auto; position: relative; direction: rtl; } /* lo scorrimento parte dal mese corrente */
.chart-wrap > .chart { direction: ltr; }
.chart { display: block; width: 100%; min-width: 520px; max-width: 760px; height: auto; }
.chart-bar { fill: #7A7A7A; }
.chart-bar.is-current { fill: var(--accent); }
.chart-hit { fill: transparent; }
.chart g:hover .chart-bar { opacity: .8; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-label { font-size: 11px; fill: var(--muted); }
.chart-value { font-size: 12px; font-weight: 600; fill: var(--navy); }

/* --- Fase 9: attrezzature --- */
.action-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 560px; }
.action-form h3 { margin: 0 0 8px; font-size: 16px; }

/* --- Fase 10b: interventi e firma del cliente --- */
.signature-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin: 24px 0 16px; max-width: 640px; }
.signature-box legend { font-weight: 600; padding: 0 6px; }
.signature-pad { display: block; width: 100%; height: 180px; margin: 8px 0 12px; border: 1px dashed var(--muted); border-radius: var(--radius); background: #fff; touch-action: none; cursor: crosshair; }
.signature-image { display: block; max-width: 280px; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.total-row td { border-top: 1px solid var(--navy); }
.section-list { margin-top: 16px; }
@media (max-width: 720px) { .signature-pad { height: 200px; } }

/* Etichette QR (Fase 15b) */
.col-check { width: 44px; }
.col-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--navy); }
.qr-card { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.qr-card .qr { width: 112px; height: 112px; border: 1px solid var(--line); flex: none; }

/* Piano del cantiere (Gantt in SVG dal server) */
.gantt-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 0; margin-bottom: 8px; }
.gantt { display: block; font-family: inherit; }
.gantt-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 20px; }
.key { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.key-plan { background: #0B2D5B; }
.key-draft { background: #0B2D5B; opacity: 0.45; }
.key-late { background: #A32020; }
.key-done { background: #7A7A7A; }
.key-today { width: 3px; height: 14px; background: var(--accent); }
.key-period { background: #F4F6F9; border: 1px solid var(--line); }
.crew-table td { vertical-align: top; min-width: 110px; }
.crew-conflict { background: #FBEFEF; }

/* Fatture fornitori: imputazione riga per riga */
.allocation { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; min-width: 0; }
.allocation legend { padding: 0 6px; font-weight: 500; }
.allocation-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; margin: 8px 0; }
.allocation-row .field { margin: 0; }
.allocation-row select, .allocation-row input { width: 100%; }
.allocation details { margin-top: 4px; }
.allocation summary { cursor: pointer; color: var(--navy); min-height: 32px; display: flex; align-items: center; }
