/* Componenti Recuperi: veste Bene, riferimento visivo approvato da Andrea. */
:root {
  --bene-blue: #0875a5;
  --bene-blue-dark: #075878;
  --bene-blue-pale: #edf5f8;
  --bene-magenta: #cf1687;
  --bene-magenta-pale: #fbe4f1;
  --ink: #183b56;
  --muted: #526b7d;
  --line: #e8eff3;
  --line-strong: #c9d9e2;
  --canvas: #f3f8fa;
  --surface: #ffffff;
  --green: #19744f;
  --green-pale: #eaf6ef;
  --red: #ae2b34;
  --red-pale: #fff0f1;
  --font-numbers: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--bene-blue-dark); }
.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
}
.skip:focus { top: 12px; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 0 18px 22px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.brand {
  min-height: 112px;
  padding: 23px 6px 17px;
  border-bottom: 1px solid var(--line);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; font-weight: 700; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 12px; }
.sidebar nav { margin-top: 24px; }
.sidebar nav a {
  position: relative;
  display: block;
  margin: 2px 0;
  padding: 11px 12px 11px 15px;
  border-radius: 6px;
  color: #3f5870;
  font-weight: 600;
  text-decoration: none;
}
.sidebar nav a:hover { background: #f3f8fa; }
.sidebar nav a.active {
  background: var(--bene-blue-pale);
  color: var(--bene-blue-dark);
}
.sidebar nav a.active::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 3px;
  background: var(--bene-magenta);
  content: "";
}
.side-note {
  margin-top: auto;
  padding: 12px;
  border-left: 3px solid var(--bene-blue);
  background: #f3f8fb;
}
.side-note strong, .side-note span { display: block; }
.side-note strong { font-size: 12px; }
.side-note span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.version { margin: 15px 4px 0; color: var(--muted); font-size: 11px; }
.workspace { min-height: 100vh; margin-left: 240px; }
.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
#breadcrumb { color: var(--muted); font-size: 12px; }
.identity { display: flex; align-items: center; gap: 10px; }
.identity strong, .identity span { display: block; }
.identity strong { font-size: 13px; }
.identity span { color: var(--muted); font-size: 11px; }
.page-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.page-title h1 { margin: 0; font-size: 25px; font-weight: 650; line-height: 1.3; letter-spacing: -.025em; }
.page-title p { margin: 6px 0 0; color: var(--muted); }
.list-section,
.case-header,
.work-panel,
.disclosure,
.case-file {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.list-heading h2 { margin: 0; font-size: 18px; }
.list-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #f5f9fb;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.data-table td { padding: 17px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdfe; }
.data-table td strong, .data-table td span { display: block; }
.data-table td span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.row-link { white-space: nowrap; font-weight: 700; text-decoration: none; }
.debtor-link { display: block; font-weight: 700; text-decoration: none; }
.data-table td .status-tag { display: inline-block; margin-top: 5px; font-size: 10px; white-space: nowrap; }
.data-table td { font-size: 13px; }
.data-table td:first-child { white-space: nowrap; }
.empty-state { padding: 44px 26px; color: var(--muted); text-align: center; }
.button.danger { border-color: var(--red); color: var(--red); background: #fff; }
:focus-visible { outline: 2px solid #526a7e; outline-offset: 3px; }
.back-link { display: inline-block; margin: 0 0 12px; font-size: 13px; font-weight: 650; text-decoration: none; }
.case-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.case-toolbar .back-link { margin: 0; }
.case-header {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 24px 26px;
  box-shadow: 0 1px 2px rgba(23, 50, 75, .025);
}
.case-code { color: var(--muted); font-size: 11px; font-weight: 550; letter-spacing: .025em; }
.case-header h1 { margin: 5px 0 0; font-size: 30px; line-height: 1.15; font-weight: 650; letter-spacing: -.035em; }
.case-header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.case-amounts { display: flex; align-items: end; gap: 24px; margin: 0; }
.case-amounts > div { min-width: 94px; }
.case-amounts dt { min-height: 32px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.case-amounts dt small { display: block; font-size: 10px; }
.case-amounts dd { margin: 5px 0 0; min-height: 43px; display: flex; align-items: baseline; color: #415367; font-family: var(--font-numbers); font-variant-numeric: tabular-nums lining-nums; font-size: 21px; font-weight: 400; letter-spacing: -.06em; line-height: 43px; white-space: nowrap; }
.case-amounts .residual { padding-left: 23px; border-left: 1px solid var(--line); }
.case-amounts .residual dd { color: var(--ink); font-size: 32px; font-weight: 500; }
.button {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  transition: background .15s, border-color .15s;
}
.button.primary { border-color: var(--bene-blue); background: var(--bene-blue); color: #fff; box-shadow: 0 2px 4px #07587814; }
.button.primary:hover { border-color: var(--bene-blue-dark); background: var(--bene-blue-dark); }
.button.primary.action-emphasis { padding: 10px 16px; font-size: 14px; }
.button.primary.action-emphasis:hover { background: var(--bene-blue-dark); border-color: var(--bene-blue-dark); }
.button.primary span[aria-hidden] { margin-left: 8px; }
.button.secondary { border-color: #e8edf3; background: #e8edf3; color: var(--ink); }
.button.secondary:hover { border-color: #d8e4ec; background: #d8e4ec; }
.skipped strong, .skipped time { color: var(--muted); }
.action-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.case-tabs { display: flex; gap: 30px; padding: 0 2px; margin: 8px 0 24px; border-bottom: 1px solid var(--line-strong); }
.case-tabs button { display: flex; align-items: center; gap: 6px; padding: 14px 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 550; cursor: pointer; }
.case-tabs button:hover { color: var(--ink); }
.case-tabs .tab-icon { flex-shrink: 0; }
.case-tabs button[aria-selected="true"] { border-bottom-color: var(--bene-blue); color: var(--ink); font-weight: 650; }
.case-identifiers { display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 11px; }
.case-identifiers strong { display: block; margin-top: 2px; color: var(--ink); font-size: 12px; font-weight: 600; }
.case-identifiers .missing-reference { color: #895c28; }
.practice-panel .case-layout { margin-top: 0; }
.practice-panel:not(#activity) { padding: 25px 30px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 24px; }
.section-heading h2 { font-size: 19px; margin: 0; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.timeline-event { display: grid; grid-template-columns: 140px 1fr; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.timeline-event:last-child { border-bottom: 0; }
.timeline-date { padding-top: 3px; font-size: 13px; }
.timeline-date span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.event-title { padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.event-title:hover { text-decoration: underline; }
.event-title > span { margin-left: 8px; color: var(--muted); }
.timeline-content p { margin: 5px 0 10px; font-size: 13px; color: var(--muted); }
.case-tabs button span { min-width: 18px; padding: 0 4px; border-radius: 4px; background: #eef2f5; color: var(--muted); font-size: 10px; line-height: 18px; }
.field input, .field textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line-strong); color: var(--ink); }
.field input[type="checkbox"] { width: auto; margin-right: 8px; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 22px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.metric { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 20px 15px; color: var(--ink); text-decoration: none; border-left: 1px solid var(--line); }
.metric:first-child { border-left: 0; }
.metric > span, .metric dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric strong, .metric dd { margin: 0; color: var(--ink); font-family: var(--font-numbers); font-variant-numeric: tabular-nums lining-nums; font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.metric small { color: var(--muted); font-size: 11px; }
.metric-strip.static { margin-bottom: 24px; }
#report-totals { display: flex; flex-wrap: wrap; overflow-x: visible; }
#report-totals .metric { flex: 1 1 200px; min-width: 0; padding-inline: 12px; }
#report-totals .metric strong { white-space: nowrap; font-size: 22px; }
#report-totals .metric > span { min-height: 3em; line-height: 1.5; }
.summary-tile .money { display: inline-block; white-space: nowrap; }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
#transmissions-table td { overflow-wrap:anywhere; }
#transmissions-table td small { display:block; color:var(--muted); }
#transmissions-table th:last-child, #transmissions-table td:last-child { white-space:nowrap; }
.data-table td.num { font-family: var(--font-numbers); font-size: 13px; white-space: nowrap; }
.data-table td.wrap { min-width: 190px; max-width: 320px; white-space: normal; }
.data-table tr.focus-row td { background: var(--bene-blue-pale); }
.data-table tr.focus-row td:first-child { box-shadow: inset 3px 0 var(--bene-magenta); }
.document-list .document-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.document-list .document-row:last-child { border-bottom: 0; }
.document-list .document-row strong, .document-list .document-row span { display: block; font-size: 13px; }
.document-list .document-row span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.action-row .button + .button, .action-row .button + a { margin-left: 10px; }
.practice-panel > .case-subpanel:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.sidebar .brand { box-sizing: border-box; height: 58px; min-height: 58px; padding: 0 6px; display: flex; align-items: center; }
.sidebar nav a, .sidebar .nav-parent { display: flex; align-items: center; gap: 11px; }
.sidebar nav a:hover .nav-icon { color: var(--ink); }
.sidebar nav a.active .nav-icon { color: var(--bene-blue); }
.sidebar .nav-parent { margin: 8px 0 0; padding: 11px 12px 5px 15px; color: #3f5870; font-weight: 600; }
.page-title .as-of { white-space: nowrap; }
.metric-strip { border: 0; border-radius: 0; background: transparent; gap: 12px; overflow: hidden; }
.metric { padding: 20px 22px; gap: 0; border: 0; border-radius: 9px; background: var(--surface); box-shadow: 0 2px 8px #183b5604; }
.metric::after { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--tone); }
.metric strong, .metric.danger strong { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 8px; color: var(--ink); font-size: 27px; line-height: 1.15; }
.metric small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.case-tabs button { gap: 7px; }
.topbar #breadcrumb { font-size: 12px; }
.topbar .identity strong { font-size: 13px; font-weight: 600; }
.sidebar nav a, .sidebar .nav-parent { font-size: 14px; font-weight: 600; }
.sidebar .side-note strong { font-size: 12px; font-weight: 600; }
.sidebar .side-note span, .sidebar .version { font-size: 12px; font-weight: 400; }
.button span[aria-hidden] { margin-left: 8px; }
.case-toolbar { position: sticky; top: -1px; z-index: 6; margin: 0 0 14px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 2px 8px rgba(23, 50, 75, .08); }
/* Adattamenti della sola 001: accesso, compagnie, lease e responsive. */
.brand > strong { color: var(--bene-blue); font-size: 42px; letter-spacing: -3px; }
.brand > small { color: var(--bene-magenta); }
.nav-parent { display: block; padding: 12px; color: var(--muted); }
#login-form { max-width: 430px; margin: 50px auto; padding: 30px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.field input, .field textarea, select {
  padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink);
}
.field textarea { width: 100%; resize: vertical; }
button:disabled { cursor: default; opacity: .5; }
.work-panel { padding: 24px; }
#message:not(:empty), #toast:not(:empty) { margin: 12px 28px; padding: 12px; }
#message:not(:empty) { border-left: 3px solid var(--red); background: var(--red-pale); }
#toast:not(:empty) { border-left: 3px solid var(--green); background: var(--green-pale); }
.process-rail { margin: 16px 0; padding: 16px 22px; border-left: 3px solid var(--bene-blue); background: white; }
.filter-bar { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.document-row { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .sidebar { width: 190px; }
  .workspace { margin-left: 190px; }
  .topbar { height: auto; min-height: 58px; flex-wrap: wrap; gap: 10px; padding: 12px; }
  .case-header { grid-template-columns: 1fr; }
  .identity { flex-wrap: wrap; }
  .case-tabs { gap: 18px; }
}
@media (max-width: 600px) {
  .sidebar { position: static; width: auto; padding: 12px; }
  .brand, .side-note, .version { display: none; }
  .sidebar nav { margin: 0; }
  .workspace { margin-left: 0; }
  main { width: calc(100% - 24px); }
  .case-tabs { overflow-x: auto; }
}

.workspace:has(#login-form) { margin-left: 0; }
.metric { position: relative; display: flex; flex-direction: column; padding: 16px 20px; }

/* Andrea: dimezzare ciascun margine del contenuto, anche sui monitor larghi. */
main { width: min(calc(100% - 28px), calc(50% + 620px)); margin: 0 auto; padding: 26px 0 60px; }
.section-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }

dialog { border: 1px solid var(--line); border-radius: 9px; padding: 24px; width: min(520px,90vw); max-height: 90vh; overflow: auto; }
dialog::backdrop { background: #18243877; }
.case-amounts { flex-wrap: wrap; gap: 16px; }
/* Condizioni/riepilogo V12 riusati per proposte esterne versionate. */
.offer-types { display:flex; flex-wrap:wrap; gap:12px; border:1px solid var(--line); padding:14px; margin-bottom:14px; }
.ready-plans { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.offer-amount { display:grid; gap:6px; padding:16px; background:#f3f6fa; border-radius:6px; }
.offer-amount strong { font-size:24px; }
.offer-authority { border-left:4px solid #207354; padding:10px; }
.offer-authority.over { border-color:#986011; }
.policy-limits { display:grid; gap:6px; padding:12px 0; }
.policy-limits dd { margin:0; }
.plan-card { border-top:1px solid var(--line); padding:16px 0; }
#recovery .document-row { align-items:flex-start; gap:12px; }
#recovery .document-row p { overflow-wrap:anywhere; }

/* R06: nessuna vista allarga il documento. Le tabelle scorrono dentro .table-wrap (dati e comandi
   restano raggiungibili); testo lungo (impronte, JSON) va a capo; le intestazioni di sezione vanno a capo. */
.list-heading { flex-wrap: wrap; gap: 12px; }
code, pre { overflow-wrap: anywhere; white-space: pre-wrap; }

.dialog-error { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--red); background: var(--red-pale); color: var(--red); }

/* Navigazione concordata con Andrea: gerarchia del prototipo e ingressi dati separati. */
.sidebar nav .nav-disabled { display:flex; align-items:center; gap:10px; margin:2px 0; padding:8px 12px 8px 29px; color:#8090a0; font-size:13px; font-weight:600; cursor:not-allowed; }
.sidebar nav .nav-disabled .nav-label { white-space:nowrap; }
.sidebar nav .nav-label { white-space:normal; }


/* Identità in fondo alla spalla; il menu scorre se lo schermo è basso. */
.sidebar nav { display:block; flex:1; min-height:0; overflow-y:auto; }
.sidebar .brand { flex-shrink:0; }
.sidebar .identity { display:grid; grid-template-columns:32px minmax(0,1fr); flex-shrink:0; gap:6px 10px; margin-top:auto; padding:16px 0 0; border-top:1px solid var(--line); }
.sidebar .identity .avatar { display:grid; place-items:center; font-weight:700; width:32px; height:32px; border-radius:50%; background:#f8e7f1; color:#aa276e; }
.sidebar .identity #logout { grid-column:2; justify-self:start; padding:3px 10px; font-size:12px; }

/* Size by available space, including the full amount and cents on a phone. */
.cash-totals { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); overflow-x: visible; }
.cash-totals .metric strong { white-space: nowrap; }
.cash-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.cash-filter .field { margin: 0; }

.dashboard-phases ol { display:grid; grid-template-columns:repeat(4,minmax(190px,1fr)); gap:0; padding:0; margin:0; list-style:none; overflow-x:auto; }
.dashboard-phases li + li { border-left:1px solid var(--line); }
.dashboard-phases li a { display:grid; gap:10px; padding:20px 22px; color:var(--ink); text-decoration:none; height:100%; }
.dashboard-phases li a:hover, .dashboard-phases li a[aria-current="page"] { background:var(--bene-blue-pale); }
.dashboard-phases li strong { font-size:22px; }
.dashboard-phases meter { width:100%; height:12px; }
.dashboard-phase-open { color:var(--bene-blue); font-size:13px; }
.dash-composition { margin:20px 0; }
.composition-bar { display:block; width:100%; height:30px; margin:4px 0 18px; border-radius:4px; background:#eef3f6; }
.composition-recovered { fill:var(--dash-blue); }
.composition-discount { fill:var(--dash-grey); }
.composition-plan { fill:var(--dash-sky); }
.composition-open { fill:var(--dash-magenta); }

/* Logo del prototipo incorporato in linea (stessa resa di .brand img in sr-interface-v12.css: 92 px). */
.sidebar .brand svg { width: 92px; height: auto; margin: 0; display: block; }

/* Rilievi leggeri e accenti del riferimento Bene, sui componenti esistenti. */
.list-section, .work-panel, .case-header, .case-file, .disclosure {
  box-shadow: 0 2px 10px #183b5604;
}
.topbar { box-shadow: 0 2px 8px #183b5605; }
.list-heading-tools { flex-wrap: wrap; }
.nav-icon { stroke-width: 1.6; }
.filter-bar, .cash-filter { background: #fbfdfe; }
input[type="file"]::file-selector-button {
  border: 0; border-radius: 7px; padding: 8px 12px; margin-right: 12px;
  background: var(--bene-blue-pale); color: var(--bene-blue-dark); font: inherit;
  font-weight: 600; cursor: pointer;
}
.button:disabled { box-shadow: none; }
@media (max-width: 600px) {
  main { width: calc(100% - 24px); padding-top: 20px; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip.cash-totals { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .page-title { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
}

/* Secondo avvicinamento al riferimento Bene: gerarchia compatta e icone leggere. */
.workspace .page-title h1 { font-size: 24px; font-weight: 650; line-height: 1.35; letter-spacing: -.025em; }
.workspace .list-heading h2, .workspace .work-panel h2 { font-size: 16px; font-weight: 650; }
.page-title { margin-bottom: 24px; }
.list-heading { padding: 20px 24px; }
.list-heading-tools { display: flex; align-items: center; gap: 10px; }
a.button { text-decoration: none; }
.button { min-height: 38px; padding: 9px 16px; font-size: 12px; }
.sidebar nav a, .sidebar .nav-parent { font-size: 13px; }
.sidebar .nav-icon { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #f1f6f8; color: var(--bene-blue-dark); flex: 0 0 30px; }
.sidebar nav a.active .nav-icon { background: #e1f2f8; }
.sidebar nav a:not(.nav-sub), .sidebar .nav-parent { padding-top: 7px; padding-bottom: 7px; }
.section-count { display: inline-block; margin-left: 7px; padding: 2px 7px; border-radius: 12px; background: #f0f5f8; color: var(--muted); font-size: 12px; font-weight: 500; }
.workspace .recovery-controls .recovery-actor { display:flex; flex-direction:row; align-items:center; gap:8px; min-width:0; font-size:13px; color:var(--muted); white-space:nowrap; }
.workspace .recovery-controls .recovery-actor select { width:auto; min-width:160px; }
.practice-list .claim-link { display:inline-block; vertical-align:middle; }
.recovery-controls .recovery-tools { display:flex; gap:8px; margin-left:auto; }
#scadenziario-tiles { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
#scadenziario-tiles .metric { padding: 20px 24px; border: 1px solid transparent; }
#scadenziario-tiles .metric::after, #scadenziario-tiles .metric::before { content: none; }
#scadenziario-tiles .metric[aria-current="true"] { border-color: var(--tone); background: var(--surface); }
#scadenziario-tiles .metric:hover { background: var(--tone-bg); }
#scadenziario-tiles .metric-label svg { box-sizing: content-box; width: 16px; height: 16px; padding: 8px; border-radius: 50%; background: var(--tone-bg); stroke-width: 1.6; }
#scadenziario-tiles .metric strong { margin: 14px 0 6px; font-size: 26px; }
#scadenziario-tiles .metric small { margin-top: 4px; }
.format-help { margin: 12px 0 20px; color: var(--muted); font-size: 12px; }
.format-help summary { cursor: pointer; color: var(--bene-blue-dark); }
.form-hint { font-size: 12px; color: var(--muted); margin: 12px 0 24px; }
/* I selettori corrispondono al tab Polizza del dettaglio Geco in integrazione. */
.case-tabs button[data-geco-tab="Polizza"] { color: var(--bene-magenta); }
.case-tabs button[data-geco-tab="Polizza"][aria-selected="true"] { border-color: var(--bene-magenta); }
#geco-panel[data-tab="Polizza"] { border-top: 3px solid var(--bene-magenta); }
#geco-panel[data-tab="Polizza"] .geco-campo:first-child dd { color: var(--bene-magenta); font-weight: 650; }
@media (max-width: 600px) {
  #scadenziario-tiles { grid-template-columns: 1fr; gap: 10px; }
  #scadenziario-tiles .metric { padding: 16px 20px; }
  .list-heading { padding: 16px; }
}

/* Il numero di sinistro è il riferimento rosa della pratica. */
.workspace [data-claim-number] { color: var(--bene-magenta); font-weight: 600; }

/* Dati importati: campi leggibili e coerenti con la scheda Bene. */
.import-options { display: flex; flex-wrap: wrap; gap: 16px; }
.import-options .field { flex: 0 1 220px; }
.legacy-import { margin: 20px 0; }
.geco-gruppo + .geco-gruppo { margin-top: 28px; }
.geco-gruppo dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 28px; margin: 0; }
.geco-campo, .geco-extra { min-width: 0; }
.geco-campo dt, .geco-extra dt { color: var(--muted, #607c8d); font-size: 12px; margin-bottom: 6px; }
.geco-campo dd, .geco-extra dd { margin: 0; overflow-wrap: anywhere; line-height: 1.5; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .geco-gruppo dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .geco-gruppo dl { grid-template-columns: minmax(0, 1fr); } }

/* Caricamento: selezione, verifica e conferma nello stesso percorso. */
.geco-upload, .import-history { max-width: 1120px; }
.file-drop { position:relative; display:flex; flex-direction:column; align-items:center; gap:12px; padding:30px 24px; border:1.5px dashed #a9c8d6; border-radius:10px; background:#f7fbfd; color:var(--bene-blue-dark); text-align:center; cursor:pointer; }
.file-drop svg { width:32px; height:32px; }
.file-drop strong { font-size:18px; line-height:1.4; overflow-wrap:anywhere; max-width:100%; }
.file-drop span { font-size:13px; color:var(--muted); }
.file-drop input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; margin:0; }
.file-drop:hover, .file-drop.drag-over, .file-drop.has-file { border-color:var(--bene-blue); background:#edf7fb; }
.file-drop.has-file { border-style:solid; }
.file-drop.has-error { border-color:#b8394a; background:#fff7f8; }
.file-drop:focus-within { outline:2px solid var(--bene-blue); outline-offset:3px; }
.import-footer, .import-item-heading, .import-item-actions, .import-dialog-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.import-footer { margin-top:20px; }
.import-footer a { font-size:13px; text-decoration:none; }
.import-footer button { flex-shrink:0; min-width:150px; }
#xlsx-sheet-choice { margin-top:16px; }
.imports-title { font-size:16px; margin:28px 0 16px; }
.import-item { background:#fff; border:1px solid var(--line); border-radius:10px; padding:20px 24px; margin:12px 0; }
.import-item-heading { align-items:flex-start; }
.import-item-heading strong { min-width:0; overflow-wrap:anywhere; font-size:15px; }
.import-state { flex-shrink:0; border-radius:16px; padding:5px 10px; background:#eaf5f2; color:#28705c; font-size:12px; }
.import-state.warning { background:#fff1e8; color:#914b16; }
.import-item-actions, .import-dialog-actions { justify-content:flex-end; flex-wrap:wrap; }
.import-counts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr)); gap:12px; margin:16px 0; }
.import-counts > div { display:flex; flex-direction:column; min-width:0; gap:4px; background:#f3f7f9; border-radius:8px; padding:12px 16px; }
.import-counts > div[data-import-count^="PRATICHE_"] { background:#eaf5fa; }
.import-counts dt { color:var(--muted); font-size:12px; line-height:1.4; }
.import-counts dd { order:-1; font-size:26px; font-weight:650; margin:0; font-variant-numeric:tabular-nums; }
.import-warning { color:#913e20; background:#fff5ee; padding:12px 16px; border-radius:7px; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.import-review { width:min(800px,calc(100vw - 32px)); max-width:800px; padding:28px; border-radius:14px; }
.import-review h2 { margin:0 0 16px; font-size:22px; }
.import-file-name { font-weight:600; overflow-wrap:anywhere; margin-bottom:5px; }
.import-meta { color:var(--muted); font-size:13px; margin-top:4px; }
.import-review h3 { font-size:15px; }
.import-review details { margin:12px 0; }
.import-review summary { cursor:pointer; color:var(--bene-blue-dark); font-weight:600; padding:8px 0; }
.practice-secondary { margin-top:20px; }
.practice-secondary > summary { cursor:pointer; color:var(--bene-blue-dark); padding:16px 0; font-weight:600; }
.notice-steps { padding-left:24px; }
.notice-steps li { padding:12px 0; }
.notice-steps p { margin:6px 0 12px; }
.notice-steps .button + .button { margin-left:8px; }
.import-row-preview { border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:8px 0; }
.import-values { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 24px; padding:16px; background:#f5f9fb; border-radius:8px; }
.import-values > div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.import-values dt { margin:0; font-size:12px; line-height:1.35; color:var(--muted); overflow-wrap:anywhere; }
.import-values dd { order:-1; margin:0; font-weight:600; line-height:1.4; overflow-wrap:anywhere; white-space:pre-line; }
.import-values .source-prose { grid-column:1 / -1; }
.import-values .source-prose > dd { font-weight:400; max-height:15em; overflow:auto; line-height:1.6; }
.import-consent-explanation { font-size:13px; color:var(--muted); }
.import-dialog-actions { margin-top:24px; padding-top:18px; border-top:1px solid var(--line); }
@media(max-width:600px) {
  .file-drop { padding:22px 12px; }
  .file-drop strong { font-size:16px; }
  .import-footer, .import-item-heading { align-items:stretch; flex-direction:column; gap:12px; }
  .import-state { align-self:flex-start; }
  .import-item { padding:16px; }
  .import-counts { gap:8px; }
  .import-counts > div { padding:12px; }
  .import-review { padding:20px; }
  .import-values { grid-template-columns:1fr; }
}

/* Fascicolo: un compito per sezione, importi separati, conferma sempre visibile. */
.case-toolbar-actions, .section-heading > div { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.case-toolbar { gap:16px; }
.case-header { grid-template-columns:minmax(0,1fr); gap:20px; }
.case-header .case-amounts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; width:100%; margin:0; padding-top:18px; border-top:1px solid var(--line); }
.case-header .case-amounts > div { min-width:0; padding:0 20px; border-left:1px solid var(--line); }
.case-header .case-amounts > div:first-child { padding-left:0; border-left:0; }
.case-header .case-amounts dt { min-height:18px; font-size:12px; }
.case-header .case-amounts dd { margin:8px 0 0; font-size:clamp(18px,1.65vw,24px); line-height:1.3; letter-spacing:-.025em; white-space:nowrap; font-variant-numeric:tabular-nums; }
.case-header .case-amounts .amount-residual dd { color:var(--bene-blue-dark); font-weight:700; }
.case-tabs { gap:4px; overflow-x:auto; flex-wrap:nowrap; scrollbar-width:thin; }
.case-tabs [role=tab] { flex-shrink:0; min-height:44px; padding:12px; }
.practice-panel:not(.work-panel) { padding:0; border:0; background:transparent; box-shadow:none; }
.practice-panel > .work-panel { margin:0 0 16px; padding:24px; }
#notice-work { border-top:3px solid var(--bene-blue); }
#notice-work > .section-heading { margin-bottom:12px; }
#notice-work > .section-heading h2 { font-size:21px; margin:0; }
.notice-steps { list-style:none; counter-reset:notice; padding:0; margin:20px 0 0; }
.notice-steps li { counter-increment:notice; position:relative; padding:16px 0 20px 46px; border-top:1px solid var(--line); }
.notice-steps li::before { content:counter(notice); position:absolute; top:14px; left:0; display:grid; place-items:center; width:30px; height:30px; border-radius:50%; color:var(--bene-blue-dark); background:#e5f3f8; font-weight:700; }
.notice-steps li > strong { font-size:16px; }
.notice-steps li > p { max-width:750px; }
.notice-steps .button { margin-top:8px; margin-right:8px; }
.notice-steps .button + .button { margin-left:0; }
#contacts > button, #history > button { margin:0 0 16px; }
.imported-people { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.imported-person { padding:16px 0; }
#state-update .action-row, #proceedings { gap:12px; }
#proceedings .button { margin:6px 8px 6px 0; }
#documents-panel .section-heading { align-items:flex-start; gap:16px; }
#documents-panel .document-list { margin-top:24px; }
#mobile-menu { display:none; }
#import-dialog { max-height:min(90vh,900px); overflow:hidden; padding:0; }
#import-approval { display:flex; flex-direction:column; max-height:min(90vh,900px); margin:0; }
#import-approval > h2 { margin:0; padding:24px 28px 16px; flex-shrink:0; }
.import-review-scroll { overflow-y:auto; min-height:0; padding:0 28px 24px; }
#import-approval .import-dialog-actions { margin:0; padding:16px 28px; flex-shrink:0; background:white; box-shadow:0 -3px 12px #13354b08; }
@media(min-width:1500px) {
  .case-header { grid-template-columns:minmax(220px,1fr) minmax(600px,1.5fr); }
  .case-header .case-amounts { border-top:0; padding-top:0; align-self:center; }
}
@media(max-width:600px) {
  .sidebar { height:auto; min-height:0; max-height:none; padding:8px 16px; display:block; }
  #mobile-menu { display:flex; min-height:44px; align-items:center; gap:12px; width:100%; justify-content:space-between; }
  #mobile-menu::after { content:'☰'; }
  #mobile-menu[aria-expanded=true]::after { content:'×'; }
  .sidebar:not(.menu-open) nav, .sidebar:not(.menu-open) .identity { display:none; }
  .sidebar.menu-open nav { max-height:none; overflow:visible; }
  .sidebar.menu-open .identity { margin-top:16px; }
  .sidebar nav a { min-height:44px; }
  .topbar { min-height:40px; height:auto; padding:8px 16px; }
  #main { width:calc(100% - 16px); margin-top:16px; }
  .case-toolbar { position:static; padding:12px; flex-direction:column; align-items:stretch; }
  .case-toolbar-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .button { min-height:44px; }
  .case-header { padding:16px; }
  .case-header h1 { font-size:24px; overflow-wrap:anywhere; }
  .case-header .case-amounts { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:20px; }
  .case-header .case-amounts > div { padding:0 12px; }
  .case-header .case-amounts > div:nth-child(odd) { border-left:0; padding-left:0; }
  .case-header .case-amounts dd { font-size:18px; overflow-wrap:anywhere; white-space:normal; }
  .practice-panel > .work-panel, .practice-panel.work-panel { padding:18px; }
  .section-heading { flex-wrap:wrap; gap:12px; }
  .notice-steps li { padding-left:38px; }
  .notice-steps .button { max-width:100%; white-space:normal; }
  .case-tabs { margin-left:0; margin-right:0; }
  #import-approval > h2 { padding:20px 20px 12px; font-size:20px; }
  .import-review-scroll { padding:0 20px 20px; }
  #import-approval .import-dialog-actions { padding:12px 20px; gap:8px; }
  #import-approval .import-dialog-actions button { flex:1; min-width:0; white-space:normal; }
}

/* Override delle cornici del prototipo, senza cambiare i pannelli operativi. */
.workspace .practice-panel:not(#activity):not(.work-panel) { padding:0; border:0; background:transparent; box-shadow:none; }
.workspace .case-header { padding:20px; gap:12px; }
.workspace .case-header h1 { margin:6px 0 0; }
.workspace .case-tabs { gap:0; }
.workspace .case-tabs button { padding:12px 9px; gap:5px; }
@media(min-width:1100px) {
  .workspace .case-header { grid-template-columns:minmax(210px,1fr) minmax(0,2fr); }
  .workspace .case-header .case-amounts { border-top:0; padding-top:0; align-self:center; }
  .workspace .case-header .case-amounts > div { padding:0 14px; }
  .workspace .case-header .case-amounts dd { font-size:clamp(16px,1.4vw,22px); }
}
@media(max-width:600px) {
  .sidebar.menu-open nav { display:block; }
  .workspace .process-rail { gap:10px; padding:16px; }
  .workspace .process-rail ol { display:flex; overflow-x:auto; gap:12px; padding-bottom:8px; }
  .workspace .process-rail li { min-width:120px; padding:30px 0 0; }
  .workspace .process-rail li:not(:last-child)::before { top:10px; left:24px; right:-12px; bottom:auto; height:2px; width:auto; }
  .workspace .process-rail .rail-activity { grid-template-columns:1fr; gap:4px; }
}

@media(min-width:601px) {
  .workspace .case-header:has(.amount-long) { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:600px) {
  .workspace .case-amounts:has(.amount-long) { grid-template-columns:minmax(0,1fr); }
  .workspace .case-amounts:has(.amount-long) > div { padding:0; border-left:0; }
  .workspace .case-amounts:has(.amount-long) dd { white-space:nowrap; overflow-wrap:normal; }
  .workspace .timeline-event { grid-template-columns:minmax(0,1fr); gap:10px; }
  .workspace .timeline-date { display:flex; flex-wrap:wrap; gap:4px 14px; min-width:0; }
  .workspace .timeline-content { min-width:0; overflow-wrap:anywhere; }
}

/* Lettera: fatti richiesti scorrevoli, conferma sempre raggiungibile. */
.letter-dialog { padding:0; overflow:hidden; width:min(640px,94vw); }
#letter-form { display:flex; flex-direction:column; max-height:90vh; margin:0; }
#letter-form header { padding:20px 24px 0; flex-shrink:0; }
#letter-form h2 { margin:0 0 12px; }
.letter-dialog-scroll { min-height:0; overflow:auto; padding:0 24px 16px; }
.letter-facts { border:0; border-top:1px solid var(--line); padding:16px 0 0; margin:20px 0 0; min-width:0; }
.letter-facts legend { font-weight:600; padding-right:12px; }
.letter-dialog-actions { display:flex; gap:12px; padding:16px 24px; border-top:1px solid var(--line); flex-shrink:0; }
.letter-dialog-actions .button { min-height:44px; }
@media(max-width:600px) { .letter-dialog-actions .button { flex:1; } }

/* Registro pratiche: stato e prossimo passo leggibili, cifre indivisibili. */
.recovery-paths { display:flex; gap:12px; margin:0 0 20px; flex-wrap:wrap; }
.recovery-paths .button { min-height:44px; display:flex; align-items:center; gap:10px; border:1px solid var(--line); }
.recovery-paths .button[aria-pressed="true"] { color:var(--blue); background:#fff; border-color:currentColor; box-shadow:inset 0 -2px currentColor; }
.recovery-paths .section-count { min-width:24px; text-align:center; }
@media(max-width:600px) { .recovery-paths { gap:8px; } .recovery-paths .button { flex:1; justify-content:center; padding:10px; } }
.practice-list { table-layout:fixed; }
.practice-list th:nth-child(1) { width:17%; }
.practice-list th:nth-child(2) { width:15%; }
.practice-list th:nth-child(3) { width:14%; }
.practice-list th:nth-child(4) { width:20%; }
.practice-list th:nth-child(5) { width:13%; }
.practice-list th:nth-child(6) { width:9%; }
.practice-list .claim-link { font-size:15px; }
.practice-list .practice-references { display:block; font-size:12px; color:var(--muted); margin-top:3px; line-height:1.4; }
.practice-list td { padding:18px 12px; vertical-align:top; overflow-wrap:anywhere; }
.practice-list td:first-child { white-space:normal; }
.practice-list td strong { font-weight:600; line-height:1.5; }
.practice-list td span { line-height:1.5; margin-top:5px; }
.practice-list .practice-money dl { display:grid; gap:10px; margin:0; text-align:right; }
.practice-list .practice-money dt { font-size:11px; color:var(--muted); }
.practice-list .practice-money dd { margin:2px 0 0; font-variant-numeric:tabular-nums; white-space:nowrap; }
.practice-list .practice-money dl div:first-child dd { font-weight:700; }
.practice-list .practice-open .button { min-height:44px; padding:10px; text-align:center; white-space:normal; }
.practice-open-actions { display:flex; flex-direction:column; gap:8px; }
.workflow-actions.closure-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:16px 20px; }
.workflow-actions.closure-actions h2 { margin:0; font-size:14px; }
.document-list .document-row .document-warning { color:#88551b; font-weight:600; }
.document-list .document-row > div { min-width:0; }
.document-list .document-row > .button { flex-shrink:0; }
@media (max-width:600px) {
  .document-list .document-row { align-items:flex-start; flex-direction:column; gap:10px; }
}
.practice-register .list-heading .action-row { margin:0; }
@media (max-width:1100px) {
  .practice-register .table-wrap { overflow:visible; }
  .practice-list, .practice-list tbody { display:block; min-width:0; width:100%; }
  .practice-list thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .practice-list tr { display:grid; grid-template-columns:1fr 1fr; gap:18px 24px; padding:22px; border-bottom:1px solid var(--line); }
  .practice-list td { display:block; padding:0; border:0; min-width:0; }
  .practice-list td[data-label]::before { content:attr(data-label); display:block; font-size:11px; color:var(--muted); margin-bottom:6px; }
  .practice-list .practice-money dl { text-align:left; display:flex; flex-wrap:wrap; gap:12px 24px; }
  .practice-list .practice-open { align-self:end; }
}
@media (max-width:600px) {
  .practice-list tr { grid-template-columns:1fr; gap:16px; padding:20px; }
  .practice-list .practice-open .button { display:block; width:100%; }
  .practice-register .list-heading { padding:18px; }
}

/* Revisione operativa: istruzioni accanto ai comandi e fasi leggibili sul mobile. */
.edit-context { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:14px 18px; margin-bottom:16px; border:1px solid var(--line-strong); border-radius:8px; background:var(--bene-blue-pale); }
.edit-context p { margin:0; max-width:70ch; }
.edit-context .button { flex-shrink:0; }
.draft-status { padding:12px 16px; border-left:3px solid var(--bene-blue); background:var(--bene-blue-pale); }
@media(max-width:600px) {
  .workspace .phase-rail { grid-template-columns:minmax(0,1fr); }
  .workspace .phase-rail .rail-activity { grid-column:1; }
  .workspace .phase-rail .rail-activity .section-label { justify-self:start; }
  .edit-context { flex-direction:column; align-items:stretch; gap:10px; }
}

.mobile-activity { display:none; }
@media(max-width:600px) {
 .mobile-activity { display:block; grid-column:1 / -1; }
 #notice-work, #indirect-activities { scroll-margin-top:12px; }
 .case-toolbar-actions .button:not(.mobile-activity) { font-size:12px; padding:8px; min-height:36px; }
}

.source-column {display:block;font-size:11px;font-weight:400;overflow-wrap:anywhere;margin-top:4px;}
.notice-history-fields {display:flex;flex-wrap:wrap;gap:20px 32px;}
.notice-history-fields dd {margin:6px 0 0;}

.recovery-filters { display:flex; flex-wrap:wrap; gap:16px; margin:16px 0; }
.recovery-filters .field { min-width:200px; max-width:100%; }
#indirect-summary { margin:16px 0; border-left:3px solid var(--blue, #007baa); }

/* Activities remain individually identifiable when several share a practice. */
.indirect-activity { border-top: 1px solid var(--line); padding: 16px 0; }
.indirect-activity summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.indirect-activity summary strong { color: var(--ink); }
.indirect-activity summary small { color: var(--muted); margin-left: auto; }
.indirect-activity .notice-history-fields { margin: 18px 0 0; }
.notice-history-fields dd { white-space: pre-wrap; overflow-wrap: anywhere; }
#indirect-summary { margin-top: 16px; }
@media(max-width:600px) { .indirect-activity summary small { flex-basis: 100%; margin-left: 0; } }

.activity-chevron { font-size: 24px; line-height: 1; color: var(--accent); transition: transform .15s; }
.indirect-activity[open] > summary .activity-chevron { transform: rotate(90deg); }
.indirect-activity summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

@media(max-width:700px) {
  #indirect-dashboard { display: block; min-width: 0; width: 100%; }
  #indirect-dashboard thead { display: none; }
  #indirect-dashboard tbody { display: block; }
  #indirect-dashboard tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; padding: 18px; border-top: 1px solid var(--line); }
  #indirect-dashboard td { display: block; min-width: 0; border: 0; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  #indirect-dashboard td::before { content: attr(data-label); display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
}

/* One documented event: compact context, pertinent fields, explicit preview. */
dialog.indirect-editor { width:min(760px,calc(100vw - 32px)); max-width:none; padding:0; max-height:calc(100dvh - 32px); border:1px solid #dbe7ed; border-radius:16px; overflow:auto; color:#173f58; }
.indirect-editor form { margin:0; }
.indirect-editor .editor-header,.indirect-editor .editor-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; background:#fff; }
.indirect-editor .editor-header { border-bottom:1px solid #e2ebef; }
.indirect-editor h2 { margin:4px 0 0; font-size:24px; }
.indirect-editor .editor-body { padding:24px; display:grid; gap:20px; }
.indirect-editor .field { margin:0; min-width:0; gap:8px; }
.indirect-editor input,.indirect-editor select,.indirect-editor textarea { width:100%; min-width:0; box-sizing:border-box; font:inherit; }
.indirect-editor .editor-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.indirect-editor .editor-fields { display:grid; gap:16px; }
.indirect-editor [data-request-details] { display:grid; gap:16px; }
.indirect-editor .editor-help { margin:-8px 0 0; line-height:1.5; color:#506e82; }
.indirect-editor fieldset { border:1px solid #dbe7ed; border-radius:10px; padding:16px; margin:0; display:grid; gap:16px; min-width:0; }
.indirect-editor legend { font-weight:600; padding:0 8px; }
.indirect-editor details summary { cursor:pointer; font-weight:600; padding:8px 0; }
.indirect-editor details[open] { display:grid; gap:12px; }
.indirect-editor details p { margin:8px 0 12px; }
.indirect-editor .editor-footer { position:sticky; bottom:0; border-top:1px solid #e2ebef; }
.indirect-editor .editor-preview { border:1px solid #8ec6d7; border-radius:10px; padding:20px; background:#f1f8fa; }
.indirect-editor .editor-preview dl { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:16px 0; }
.indirect-editor .editor-preview dd { margin:4px 0 0; font-weight:600; overflow-wrap:anywhere; }
.indirect-editor .editor-preview dt { color:#506e82; }
.indirect-editor .editor-error { border-left:3px solid #c32945; padding:12px 16px; background:#fff2f4; color:#8f1730; margin:0; }
.indirect-editor [hidden] { display:none!important; }
.indirect-activity > .button { margin-top:16px; }
@media(max-width:600px) {
  dialog.indirect-editor { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); border-radius:12px; }
  .indirect-editor .editor-header,.indirect-editor .editor-body,.indirect-editor .editor-footer { padding:16px; }
  .indirect-editor .editor-row,.indirect-editor .editor-preview dl { grid-template-columns:1fr; }
  .indirect-editor .editor-footer { flex-wrap:wrap; }
  .indirect-editor .editor-footer .primary { flex:1; }
}
.indirect-editor .reviewing .editor-body > :not([data-preview]):not([data-error]) { display:none; }
.indirect-editor .editor-preview { scroll-margin-bottom:100px; }
/* Use cards when the actual table area cannot fit all six fields. */
.table-wrap:has(> .schedule-table) { container: schedule / inline-size; }
@container schedule (max-width:720px) {
  .schedule-table { min-width:0; width:100%; }
  .schedule-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .schedule-table tbody { display:grid; gap:12px; padding:12px; }
  .schedule-table tr { display:block; padding:12px; border:1px solid var(--line); border-radius:10px; background:white; }
  .schedule-table td { display:block; border:0; padding:8px 0; white-space:normal; overflow-wrap:anywhere; }
  .schedule-table td[data-label]:not([data-label=""])::before { content:attr(data-label); display:block; color:var(--muted); font-size:12px; margin-bottom:4px; }
  .schedule-table .row-link { display:inline-flex; min-height:44px; align-items:center; padding:0 12px; border:1px solid var(--line); border-radius:8px; }
}

.selected-letter { overflow-wrap:anywhere; padding:12px; border-radius:8px; background:var(--wash,#f2f7f9); }
.selected-letter:empty { display:none; }
#notice-documents small { display:block; margin-top:6px; }

/* Task-first practice: the three steps form one workspace, not three empty panels. */
.notice-intro { color:var(--muted); margin:12px 0 20px; max-width:760px; line-height:1.6; }
.notice-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.notice-steps li { min-width:0; padding:50px 16px 18px; border:1px solid var(--line); border-radius:10px; background:#f8fbfc; }
.notice-steps li::before { top:14px; left:16px; }
.notice-steps li > p { line-height:1.55; }
.notice-steps .button { margin:8px 0 0; max-width:100%; white-space:normal; }
.notice-steps .button + .button { margin-left:8px; }
.notice-steps .document-row { display:block; padding:12px 0; overflow-wrap:anywhere; }
.notice-steps .document-row a { margin-top:8px; }
.workflow-alternatives summary { cursor:pointer; font-weight:600; padding:8px 0; }
.workflow-alternatives p { max-width:760px; color:var(--muted); line-height:1.6; }
.workflow-alternatives .action-row { justify-content:flex-start; }
.rail-label { display:block; padding:0; font-size:13px; line-height:1.45; }
.rail-label strong { font-weight:500; }
.import-secondary { margin:12px 0 20px; }
.import-secondary summary { cursor:pointer; color:var(--muted); padding:8px 0; }
.import-secondary .import-counts { margin-top:12px; }
.import-secondary .import-counts dd { font-size:18px; }
[data-draft-hint] { padding:12px; background:#fff5dd; color:#59431b; border-radius:8px; }
@media(max-width:1100px) {
 .notice-steps { grid-template-columns:1fr; gap:12px; }
 .notice-steps li { padding:16px 16px 16px 58px; }
}
@media(max-width:600px) {
 .workspace .process-rail ol { display:grid; grid-template-columns:1fr; overflow:visible; gap:12px; padding:0; }
 .workspace .process-rail li { min-width:0; padding:0 0 0 34px; min-height:44px; }
 .workspace .process-rail li:not(:last-child)::before { top:24px; bottom:-12px; left:10px; right:auto; width:2px; height:auto; }
 .workspace .process-rail .rail-marker { top:0; left:0; }
 .notice-steps li { padding:50px 14px 16px; }
 .notice-steps .button + .button { margin-left:0; }
 .notice-steps .button { display:flex; width:100%; justify-content:center; }
}

/* Assignment summary and commands stay readable on narrow practice cards. */
.indirect-activity > button { margin: 8px 12px 0 0; }
.indirect-editor [data-assignment-choice] { display: grid; gap: 12px; }
.indirect-editor [data-assignment-description] { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }

/* Trasmissione collettiva: campi e riepilogo nello stesso dialogo. */
dialog.lot-transmission { width:min(680px,calc(100vw - 32px)); }
.lot-transmission fieldset { border:0; padding:0; margin:0; min-width:0; }
.lot-transmission h2 { margin-top:0; }
.lot-transmission select { width:100%; min-width:0; }
.lot-transmission [role="alert"]:not(:empty) { padding:12px; background:var(--red-pale); color:var(--red); border-radius:8px; }
.lot-transmission .action-row { gap:12px; border-top:1px solid var(--line); padding-top:16px; }
.lot-transmission .action-row .button { margin-left:0; }
.lot-transmission dt { color:var(--muted); margin-top:12px; }
.lot-transmission dd { margin:4px 0 0; overflow-wrap:anywhere; }
@media(max-width:600px) { .lot-transmission .action-row .button { flex:1 1 150px; } }

/* Soggetti scelti e fonte Geco condividono una griglia leggibile, restando distinti. */
#people > article { padding:20px 0; border-bottom:1px solid var(--line); }
#people > article > dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px 28px; margin:16px 0 24px; }
#people > article dt { color:var(--muted); font-size:12px; margin-bottom:6px; }
#people > article dd { margin:0; overflow-wrap:anywhere; line-height:1.5; }
@media(max-width:900px) { #people > article > dl { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { #people > article > dl { grid-template-columns:minmax(0,1fr); } }

/* Bene: compact reading surfaces, value first; form labels remain above inputs. */
.workspace .work-panel, .workspace .practice-panel > .work-panel { padding:18px 20px; }
.workspace .section-heading { align-items:center; margin-bottom:12px; gap:12px; }
.workspace .section-heading h2, .workspace .section-heading h3 { margin:0; }
.workspace .page-title { margin-bottom:16px; }
.workspace .list-heading { padding:14px 18px; }
.workspace .filter-bar { padding:12px 18px; }
.workspace .metric-strip { margin-bottom:16px; }
.workspace .metric { padding:12px 16px; }
.workspace .geco-gruppo h3 { margin:0 0 12px; font-size:14px; }
.workspace .geco-gruppo + .geco-gruppo { margin-top:18px; }
.workspace .geco-gruppo dl { gap:12px 20px; }
.workspace :is(.geco-campo,.geco-extra,.notice-history-fields > div,#people > article > dl > div,.case-amounts > div) { display:flex; flex-direction:column; gap:3px; min-width:0; }
.workspace :is(.geco-campo,.geco-extra,.notice-history-fields > div,#people > article > dl > div,.case-amounts > div) > dd { order:-1; margin:0; font-weight:600; line-height:1.4; }
.workspace :is(.geco-campo,.geco-extra,.notice-history-fields > div,#people > article > dl > div,.case-amounts > div) > dt { margin:0; color:var(--muted); font-size:12px; line-height:1.35; }
.workspace .button { min-height:34px; padding:6px 12px; line-height:20px; border-radius:6px; }
.workspace .button + .button { margin-left:8px; }
.workspace :is(.action-row,.case-toolbar-actions,.note-actions,.section-heading > div) { gap:8px; }
.workspace :is(.action-row,.case-toolbar-actions,.note-actions,.section-heading > div) > .button { margin-left:0; }
.workspace .notice-intro { margin:8px 0 12px; }
.workspace .notice-steps { margin-top:12px; gap:12px; }
.workspace #people .imported-people { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0; padding:0; border:0; }
.workspace #people .imported-person { padding:14px 16px; border:1px solid var(--line); border-radius:8px; margin:0; min-width:0; }
.workspace #people .imported-person[data-source-role="Cedente"] { grid-column:1 / -1; background:#f5fafc; }
.workspace #people .imported-person:not([data-source-role="Cedente"]) dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
.workspace #people .imported-person h3 { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.recipient-default { font-size:11px; font-weight:500; color:var(--bene-blue-dark); padding:3px 7px; background:#e5f3f8; border-radius:4px; }
.workspace #people > article { margin-bottom:12px; padding:12px 0; }
.workspace #people > article > h3 { margin:0; font-size:15px; }
.workspace #people > article > dl { gap:12px 20px; margin:12px 0; }
.workspace #people > article > details { margin-top:10px; }
.workspace #free-notes .note-entry { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--line); }
.workspace #free-notes .note-entry:last-child { border-bottom:0; }
.note-content { min-width:0; flex:1; }
.note-meta { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 12px; }
.note-meta time, .note-meta span, .note-content > small { font-size:12px; color:var(--muted); }
.workspace #free-notes .free-note-text { margin:8px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.note-actions { display:flex; align-items:center; flex-wrap:wrap; flex-shrink:0; }
.workspace #free-notes .note-actions .button { background:white; border:1px solid var(--line-strong); }
.workspace #free-notes .note-actions .button:hover { background:#edf5f8; border-color:var(--bene-blue); }
#closed-notes { margin-top:12px; }
#closed-notes > summary { color:var(--muted); cursor:pointer; }
@media(max-width:900px) { .workspace #free-notes .note-entry { flex-direction:column; gap:10px; } }
@media(max-width:600px) {
 .workspace .work-panel, .workspace .practice-panel > .work-panel { padding:14px; }
 .workspace .button { min-height:44px; }
 .workspace #people .imported-people { grid-template-columns:minmax(0,1fr); }
 .workspace #people .imported-person dl, .workspace #people .imported-person:not([data-source-role="Cedente"]) dl { grid-template-columns:minmax(0,1fr); }
 .note-actions { width:100%; }
 .note-actions .button { flex:1; }
}

/* Lista e filtri nello stesso contesto, senza fasce vuote. */
.recovery-controls { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 24px; padding:14px 18px; margin-bottom:12px; border:1px solid var(--line); border-radius:9px; background:white; }
.workspace .recovery-controls .recovery-paths { margin:0; gap:8px; }
.workspace .recovery-controls .recovery-paths .button { margin-left:0; min-height:36px; }
.workspace .recovery-controls .recovery-filters { margin:0; gap:12px; }
.workspace .recovery-controls .field { margin:0; min-width:180px; gap:4px; }
.workspace .recovery-controls select { height:36px; min-height:36px; line-height:34px; }
.person-origin { display:block; margin-bottom:4px; color:var(--muted); font-size:12px; }
.workspace #people .source-heading { font-size:12px; font-weight:500; color:var(--muted); margin:12px 0 8px; }
@media(max-width:600px) {
 .recovery-controls { padding:12px; gap:12px; }
 .workspace .recovery-controls .recovery-paths, .workspace .recovery-controls .recovery-filters { width:100%; }
 .workspace .recovery-controls .recovery-filters .field { flex:1; min-width:0; }
 .workspace .recovery-controls .recovery-paths .button, .workspace .recovery-controls select { min-height:44px; }
}

/* Riepiloghi: la stessa gerarchia delle schede, anche fuori dal fascicolo. */
.workspace .metric > strong { order:-1; font-weight:600; }
.workspace .metric > span { color:var(--muted); font-size:12px; }
.workspace .case-identifiers > span { display:flex; flex-direction:column; gap:3px; }
.workspace .case-identifiers > span > strong { order:-1; margin:0; }
/* La densità vale anche per le righe e le azioni degli elenchi. */
.workspace .practice-list td { padding:12px; }
.workspace .practice-list .practice-open .button { min-height:34px; padding:6px 8px; margin:0; font-size:12px; }
.workspace .practice-money dl { gap:8px; }
.workspace .practice-money dl > div { display:flex; flex-direction:column; gap:2px; }
.workspace .practice-money dd { order:-1; font-weight:600; margin:0; }
@media(max-width:600px) { .workspace .practice-list .practice-open .button { min-height:44px; } }

/* Registro operativo: identità, stato e azione, una sola apertura per riga. */
.workspace .practice-register .recovery-controls { border:0; border-bottom:1px solid var(--line); border-radius:0; margin:0; padding:12px 16px; gap:12px; }
.workspace .practice-register .recovery-filters { margin-left:auto; }
.practice-register .list-tools { position:relative; }
.practice-register .list-tools summary { font-size:12px; }
.practice-list th:nth-child(1) { width:27%; }
.practice-list th:nth-child(2) { width:19%; }
.practice-list th:nth-child(3) { width:23%; }
.practice-list th:nth-child(4) { width:13%; }
.practice-list th:nth-child(5) { width:13%; }
.practice-list th:nth-child(6) { width:5%; }
.workspace .practice-list td { padding:10px 12px; vertical-align:middle; }
.workspace .practice-list td span { margin-top:3px; line-height:1.35; }
.workspace .practice-list .practice-references, .workspace .practice-list .practice-references span { display:inline; font-size:11px; }
.workspace .practice-list .practice-references { display:block; }
.workspace .practice-list .practice-money { text-align:right; font-variant-numeric:tabular-nums; }
.workspace .practice-list .practice-money strong { white-space:nowrap; }
.workspace .practice-list .practice-open { padding-left:0; padding-right:8px; text-align:center; }
.practice-arrow { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; color:var(--bene-blue); text-decoration:none; }
.practice-arrow svg { width:22px; height:22px; }
.practice-arrow:hover { background:var(--bene-blue-pale); }
.practice-arrow:focus-visible { outline:2px solid var(--bene-blue); outline-offset:2px; }
.workspace .practice-register tbody tr:hover { background:#edf6fa; }
/* Le schede devono lasciare spazio al contenuto, non soltanto alla testata. */
.workspace .case-header { padding:14px 18px; }
.workspace .case-header h1 { font-size:23px; margin-top:3px; }
.workspace .case-header { grid-template-columns:minmax(0,1fr) auto; }
.workspace .case-header .case-amounts { display:flex; justify-content:flex-end; flex-wrap:wrap; border:0; padding:0; gap:12px 20px; }
.workspace .case-header .case-amounts > div { padding:0; border:0; }
.workspace .case-header .case-identifiers { gap:6px 18px; margin-top:10px; }
.workspace .case-header > div:first-child { display:flex; flex-direction:column; }  /* sinistro in alto, poi cedente e assicurato */
.workspace .case-header .case-amounts dd { min-height:0; }
.workspace .case-header .case-amounts dt { min-height:0; }
.workspace .case-tabs { margin-bottom:12px; }
.workspace .edit-context { justify-content:flex-end; border:0; background:transparent; padding:0; margin:0 0 8px; gap:10px; }
.workspace .edit-context p { font-size:12px; color:var(--muted); }
.workspace .case-toolbar { margin-bottom:10px; }
.workspace .case-actions { display:flex; border:1px solid var(--line-strong); border-radius:7px; overflow:hidden; }
.workspace .case-actions:empty { display:none; }
.workspace .decision-tile { display:flex; align-items:center; justify-content:center; gap:10px; min-height:46px; padding:6px 18px; border:0; border-left:1px solid var(--line); background:#fff; color:var(--ink); font:inherit; cursor:pointer; }
.workspace .decision-tile:first-child { border-left:0; }
.workspace .decision-tile:hover { background:#f4f8fa; }
.workspace .decision-tile:focus-visible { outline:2px solid var(--bene-blue); outline-offset:-2px; }
.workspace .decision-tile .tile-icon { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:7px; background:var(--bene-blue-pale); color:var(--bene-blue-dark); flex:none; }
.workspace .decision-tile strong { font-size:13px; font-weight:600; line-height:1.2; }
.workspace .decision-tile:disabled { opacity:.5; cursor:default; }
.workspace .case-tools { position:relative; }
.workspace .case-tools summary { padding:10px; cursor:pointer; color:var(--muted); }
.workspace .case-tools > div { position:absolute; right:0; top:100%; min-width:180px; padding:8px; display:grid; gap:6px; background:white; border:1px solid var(--line); border-radius:7px; box-shadow:0 4px 16px #17324b20; z-index:10; }
@media(max-width:600px) {
 .workspace .case-toolbar-actions { width:100%; }
 .workspace .case-actions { flex:1; }
 .workspace .decision-tile { flex:1; padding:6px 10px; gap:6px; }
 .workspace .decision-tile strong { white-space:normal; }
 .workspace .case-tools summary { font-size:12px; padding:8px; }
}
.workspace .phase-rail { display:block; padding:12px 18px; }
.workspace .phase-rail ol { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-flow:row; gap:12px; padding:0; overflow:visible; }
.workspace .phase-rail li { min-width:0; min-height:0; padding:26px 0 0; }
.workspace .phase-rail li:not(:last-child)::before { top:10px; bottom:auto; left:24px; right:-12px; width:auto; height:2px; }
.workspace .phase-rail .phase-caption { display:none; }
.workspace .phase-rail .current .phase-caption:not(:empty) { display:block; color:var(--bene-blue-dark); }
.workspace .phase-rail li.skipped strong { color:var(--muted); }
.workspace .phase-rail .rail-activity { padding-top:10px; margin-top:0; }
@media(max-width:1100px) {
 .workspace .practice-list tr { position:relative; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px 20px; padding:14px 60px 14px 16px; }
 .workspace .practice-list td { padding:0; }
 .workspace .practice-list .practice-person { grid-column:1 / -1; }
 .workspace .practice-list .practice-person::before { display:none; }
 .workspace .practice-list .practice-open { position:absolute; top:8px; right:8px; padding:0; }
 .workspace .practice-list .practice-arrow { width:44px; height:44px; }
 .workspace .practice-list .practice-money { text-align:left; }
 .workspace .practice-list td[data-label] { display:flex; flex-direction:column; }
 .workspace .practice-list td[data-label]::before { order:1; margin:3px 0 0; }
}
@media(max-width:600px) {
 .workspace .case-header { grid-template-columns:minmax(0,1fr); gap:14px; }
 .workspace .case-header .case-amounts { justify-content:flex-start; gap:12px 20px; }
 .workspace .case-header h1 { font-size:20px; }
 .workspace .phase-rail { padding:12px; }
 .workspace .phase-rail li strong { font-size:11px; }
 .workspace .case-toolbar-actions { display:flex; flex-wrap:wrap; }
 .workspace .case-toolbar-actions .mobile-activity { display:none; }
 .workspace .practice-register .recovery-controls { gap:10px; }
 .workspace .practice-register .recovery-paths { width:auto; flex:1; }
 .workspace .practice-register .recovery-filters { order:3; width:100%; }
 .workspace .practice-list tr { padding-right:54px; gap:12px; }
 .workspace .practice-list .practice-next { grid-column:1 / -1; }
 .workspace .edit-context { flex-direction:row; }
 .workspace .edit-context .button { width:auto; }
}
.source-people > summary { cursor:pointer; color:var(--bene-blue-dark); font-size:12px; padding:8px 0; }
.source-people[open] > summary { margin-bottom:8px; }
.workspace #people > article > dl { margin-top:6px; }
.notice-steps li > p > strong { display:block; margin:8px 0 4px; }
.notice-steps li > p > span:not(.recipient-default), .notice-steps li > p > small { display:block; }
.notice-recipient-actions { display:flex; flex-wrap:wrap; gap:8px; }
.workspace .notice-recipient-actions .button { margin:0; }

/* Selettore del prototipo V12: una cornice comune, azzurro sul percorso attivo. */
.workspace .recovery-controls .recovery-paths.segmented { display:inline-flex; flex-wrap:nowrap; flex:0 1 auto; width:auto; gap:2px; padding:3px; }
.recovery-paths.segmented button { display:flex; align-items:center; justify-content:center; gap:8px; min-height:32px; padding:6px 12px; border:0; border-radius:5px; background:transparent; color:#41586c; font-size:13px; font-weight:600; white-space:nowrap; cursor:pointer; }
.recovery-paths.segmented button:hover { background:#f4f8fb; color:var(--ink); }
.recovery-paths.segmented button[aria-pressed="true"] { background:var(--bene-blue-pale); color:var(--bene-blue-dark); box-shadow:inset 0 0 0 1px #c9e1f1; }
.recovery-paths.segmented button:focus-visible { outline:2px solid var(--bene-blue); outline-offset:2px; }
.recovery-paths .path-count { color:var(--muted); font-size:11px; font-weight:500; font-variant-numeric:tabular-nums; }
@media(max-width:600px) {
 .recovery-paths.segmented button { min-height:44px; padding:6px 8px; gap:6px; }
}

/* Global configuration shares one compact navigation surface. */
.settings-tabs { display:flex; flex-wrap:wrap; gap:0 24px; border-bottom:1px solid var(--line); margin-bottom:16px; }
.settings-tabs a { padding:10px 0; text-decoration:none; border-bottom:2px solid transparent; }
.settings-tabs a[aria-current="page"] { border-color:var(--bene-blue-dark); font-weight:600; }
.settings-panel { max-width:960px; }
.settings-panel + .settings-panel { margin-top:12px; }
.settings-columns small { color:var(--muted); font-size:11px; margin-left:auto; }
.settings-panel fieldset { border:0; padding:0; margin:12px 0 0; min-width:0; }
.settings-panel legend { font-weight:600; margin-bottom:8px; }
.settings-panel textarea { min-height:160px; }
.settings-panel #model-text { min-height:300px; }
.settings-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.settings-access { color:var(--muted); }
@media(max-width:600px) { .settings-fields { grid-template-columns:1fr; gap:8px; } .settings-tabs { gap:18px; } }

.settings-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 20px; margin-bottom:16px!important; }
.settings-columns label { display:flex; align-items:center; gap:8px; }
@media(max-width:600px) { .settings-columns { grid-template-columns:1fr; } }

/* Messa in mora: recipient context beside the document, shipment below it. */
#notice-work .notice-steps {
  display:grid; grid-template-columns:minmax(0,300px) minmax(0,1fr);
  grid-template-areas:"recipient letter" "recipient shipping";
  column-gap:24px; row-gap:20px; margin:16px 0 0; padding:0;
}
#notice-work .notice-steps > li {
  min-width:0; padding:0; border:0; border-radius:0; background:transparent;
}
#notice-work .notice-steps > li::before { content:none; }
#notice-work .notice-steps > li > strong { display:block; font-size:13px; font-weight:500; color:var(--muted); }
#notice-work .notice-recipient { grid-area:recipient; border-right:1px solid var(--line)!important; padding-right:24px!important; }
#notice-work .notice-recipient > p { margin:10px 0 16px; overflow-wrap:anywhere; }
#notice-work .notice-recipient > p > strong { font-size:16px; margin:8px 0 4px; }
#notice-work .notice-recipient-actions { gap:8px 12px; align-items:center; }
#notice-work .notice-steps .button { width:auto; display:inline-flex; margin:0; align-items:center; justify-content:center; }
#notice-work .notice-steps .notice-link { padding:6px 0; min-height:32px; border:0; background:transparent; box-shadow:none; color:var(--bene-blue-dark); text-decoration:underline; text-underline-offset:3px; }
#notice-work .notice-letter { grid-area:letter; display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
#notice-work .notice-letter > p { margin:0; }
#notice-work #notice-documents { width:100%; }
#notice-work #notice-documents:empty { display:none; }
#notice-work .notice-letter > [data-action="generate-letter"] { margin-top:0; }
#notice-work .notice-steps .document-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0; }
#notice-work .document-row > span { min-width:0; line-height:1.5; }
#notice-work .document-row > .button { flex-shrink:0; }
#notice-work .notice-previous { margin-top:16px; color:var(--muted); }
#notice-work .notice-previous summary { cursor:pointer; font-size:12px; }
#notice-work .notice-previous .document-row { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); color:var(--ink); }
#notice-work .notice-shipping { grid-area:shipping; display:grid; grid-template-columns:1fr auto; gap:6px 16px; align-items:center; border-top:1px solid var(--line)!important; padding-top:16px!important; }
#notice-work .notice-shipping > strong { grid-column:1; }
#notice-work #notice-shipping-status { grid-column:1; margin:0; color:var(--muted); font-size:12px; }
#notice-work .notice-shipping > .button { grid-column:2; grid-row:1 / 3; }
#notice-work #notice-warning { max-width:none; margin:0 0 16px; padding:10px 12px; }
@media(max-width:1000px) {
  #notice-work .notice-steps { grid-template-columns:1fr; grid-template-areas:"recipient" "letter" "shipping"; row-gap:20px; }
  #notice-work .notice-recipient { border-right:0!important; border-bottom:1px solid var(--line)!important; padding:0 0 20px!important; }
  #notice-work .notice-recipient > p { margin-bottom:12px; }
}
@media(max-width:600px) {
  #notice-work .notice-shipping { grid-template-columns:1fr; gap:8px; }
  #notice-work .notice-shipping > .button { grid-column:1; grid-row:auto; justify-self:start; }
  #notice-work .notice-steps .document-row { flex-direction:column; align-items:stretch; gap:12px; }
  #notice-work .notice-letter > .button.primary, #notice-work .notice-recipient-actions > .button.primary { width:100%; }
  #notice-work .notice-steps .document-row > .button.secondary { align-self:flex-start; }
}

/* Messa in mora: una sequenza compatta, con la sola azione corrente in evidenza. */
#notice-work .notice-steps { display:flex; flex-direction:column; gap:0; margin:0; }
#notice-work .notice-steps > li { display:grid; grid-template-columns:125px minmax(0,1fr) auto; grid-template-areas:none; gap:8px 20px; align-items:center; padding:16px 0!important; border:0!important; border-top:1px solid var(--line)!important; border-radius:0; background:transparent; }
#notice-work .notice-steps > li > strong { grid-column:1; grid-row:1 / span 3; align-self:start; padding-top:4px; font-size:13px; color:var(--muted); }
#notice-work .notice-steps > li > p { grid-column:2; grid-row:1; margin:0; max-width:none; }
#notice-work .notice-recipient > p > strong { margin:2px 0; font-size:15px; }
#notice-work .notice-recipient > p > span, #notice-work .notice-recipient > p > small { font-size:12px; color:var(--muted); }
#notice-work .notice-recipient-actions { grid-column:3; grid-row:1; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px 12px; max-width:320px; }
#notice-work .notice-letter > [data-action=generate-letter], #notice-work .notice-shipping > .button { grid-column:3; grid-row:1; justify-self:end; }
#notice-work #notice-documents { grid-column:2; grid-row:2; }
#notice-work .notice-letter > p[hidden] + #notice-documents { grid-row:1; }
#notice-work #notice-shipping-status { grid-column:2; grid-row:1; font-size:13px; }
#notice-work .document-row > span { display:flex; flex-direction:column; font-size:13px; }
#notice-work .document-row > span > small { color:var(--muted); }
#notice-work .notice-current > strong { color:var(--bene-blue-dark)!important; font-weight:700!important; }
#notice-work .notice-steps .button[hidden] { display:none!important; }
.letter-known { padding:12px 0; border-block:1px solid var(--line); margin:16px 0; }
.letter-known dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 20px; margin:16px 0 4px; }
.letter-known dl > div { display:flex; flex-direction:column; min-width:0; }
.letter-known dt { order:2; color:var(--muted); font-size:12px; }
.letter-known dd { order:1; margin:0 0 3px; font-weight:700; overflow-wrap:anywhere; }
.letter-known small { order:3; color:var(--muted); font-size:11px; }
.letter-facts .field > small { color:var(--muted); font-weight:400; font-size:11px; }
.letter-facts .letter-missing > small:first-of-type { color:#8c5300; }
.letter-facts .letter-missing input { border-color:#c69a4c; }
.letter-known .letter-missing dd { color:#8c5300; }
.letter-applicability { color:var(--muted); font-size:12px; }
.import-recovery { margin:16px 0; padding-top:16px; border-top:1px solid var(--line); }
@media(max-width:850px) {
 #notice-work .notice-steps > li { grid-template-columns:100px minmax(0,1fr); gap:8px 16px; }
 #notice-work .notice-recipient-actions, #notice-work .notice-letter > [data-action=generate-letter], #notice-work .notice-shipping > .button { grid-column:2; grid-row:3; justify-self:start; justify-content:flex-start; }
 .letter-known dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:480px) {
 #notice-work .notice-steps > li { grid-template-columns:minmax(0,1fr); gap:8px; }
 #notice-work .notice-steps > li > strong { grid-column:1; grid-row:1; }
 #notice-work .notice-steps > li > p, #notice-work #notice-shipping-status { grid-column:1; grid-row:2; }
 #notice-work #notice-documents, #notice-work .notice-letter > p[hidden] + #notice-documents { grid-column:1; grid-row:3; }
 #notice-work .notice-recipient-actions, #notice-work .notice-letter > [data-action=generate-letter], #notice-work .notice-shipping > .button { grid-column:1; grid-row:4; }
 #notice-work .notice-steps .document-row { gap:8px; }
 #notice-work .notice-steps .button { width:auto; }
 .letter-known dl { grid-template-columns:1fr; }
}

/* Registro: assicurato e cedente sono due ruoli distinti della fonte. */
.practice-list th:nth-child(1) { width:22%; }
.practice-list th:nth-child(2) { width:16%; }
.practice-list th:nth-child(3) { width:15%; }
.practice-list th:nth-child(4) { width:19%; }
.practice-list th:nth-child(5) { width:11%; }
.practice-list th:nth-child(6) { width:13%; }
.practice-list th:nth-child(7) { width:4%; }
.workspace .practice-list .practice-cedent { overflow-wrap:anywhere; }
@media(min-width:1101px) {
 .workspace .practice-list th, .workspace .practice-list td { padding-left:8px; padding-right:8px; }
 .workspace .practice-list .practice-open { padding-left:0; padding-right:4px; }
}

/* Elenco indiretto: struttura del prototipo, valori sempre dalla pratica. */
.workspace .practice-register .prototype-filters { display:flex; gap:10px; align-items:center; padding:14px 16px; margin:0; border-bottom:1px solid var(--line); }
.workspace .prototype-filters label { margin:0; min-width:0; flex:1; }
.workspace .prototype-filters .filter-search { flex:2; }
.workspace .prototype-filters input,.workspace .prototype-filters select { box-sizing:border-box; width:100%; height:42px; margin:0; }
.workspace .prototype-filters input { padding:10px 11px; border:1px solid var(--line-strong); border-radius:6px; color:var(--ink); background:var(--surface); font:inherit; }
.workspace .prototype-filters select { -webkit-appearance:none; appearance:none; padding:0 34px 0 11px; border:1px solid var(--line-strong); border-radius:6px; color:var(--ink); background:var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23183b56' stroke-width='1.6'/></svg>") no-repeat right 12px center; }
.workspace .prototype-filters .filter-reset { border:0; background:transparent; color:var(--bene-blue); cursor:pointer; }
.workspace .practice-register .prototype-list { --font-numbers:"IBM Plex Mono",ui-monospace,monospace; table-layout:auto; width:100%; }
.workspace .prototype-list th:nth-child(n) { width:auto; }
.workspace .prototype-list th,.workspace .prototype-list td { padding:13px 9px; font-size:13px; }
.workspace .prototype-list th { font-size:11px; }
.workspace .prototype-list .practice-money strong { font-family:var(--font-numbers); font-size:13px; font-weight:400; }
.workspace .prototype-list .practice-person { min-width:140px; }
.workspace .prototype-list .practice-cedent { min-width:100px; }
.workspace .prototype-list .practice-next { min-width:125px; }
.workspace .prototype-list td[data-label="Fase"] { min-width:105px; }
.workspace .prototype-list td[data-label="Affidata il"] strong { white-space:nowrap; }
.workspace .prototype-list .practice-open { min-width:65px; padding-right:10px; }
.workspace .prototype-list .row-link { white-space:nowrap; display:inline-flex; align-items:center; min-height:40px; }
@media(max-width:1100px) { .workspace .prototype-list td { padding:0; } }
@media(max-width:800px) {
 .workspace .practice-register .prototype-filters { flex-wrap:wrap; }
 .workspace .prototype-filters label { flex:1 1 40%; }
 .workspace .prototype-filters .filter-search { flex:1 1 100%; }
 .workspace .prototype-list .practice-person,.workspace .prototype-list .practice-cedent,.workspace .prototype-list .practice-next { min-width:0; }
 .workspace .prototype-list .practice-open { top:8px; right:8px; min-width:60px; }
 .workspace .prototype-list .practice-money { text-align:left; }
}

/* Raccomandata: dati prima del comando, nella stessa sezione operativa. */
.notice-shipment-summary { margin:18px 0 0; gap:20px 40px; }
.notice-shipment-summary small { font-weight:400; color:var(--muted); }
.notice-outcome-actions { display:flex; justify-content:flex-end; margin-top:20px; padding-top:16px; border-top:1px solid var(--line); }
@media(max-width:600px) {
 .notice-shipment-summary { display:grid; grid-template-columns:1fr; gap:14px; }
 .notice-outcome-actions .button { width:100%; }
}

/* Explicit, session-local transmission selection. */
.transmission-prepare { white-space:nowrap; }
.transmission-checkbox { display:flex; align-items:center; gap:8px; min-height:32px; margin-bottom:6px; }
.transmission-checkbox input { width:20px; height:20px; margin:0; accent-color:var(--bene-blue); }
.transmission-checkbox [data-transmission-badge] { font-size:12px; font-weight:600; color:var(--ink); }
.practice-list tr.transmission-selected { background:#e6f4fa; }
@media (max-width:640px) { .page-title { flex-wrap:wrap; gap:12px; } .transmission-checkbox { min-height:44px; } }

/* Scheda pratica · fetta 2: barra azioni unica, testata con sinistro in evidenza, fasce Situazione e Azione */
.workspace .case-actions { border:0; border-radius:0; overflow:visible; gap:8px; }
.case-toolbar-actions { gap:10px; }
.workspace .case-tools summary { padding:8px 12px; border:1px solid #e8edf3; border-radius:8px; background:#e8edf3; color:var(--ink); font-size:13px; font-weight:600; list-style:none; }
.workspace .case-tools summary::-webkit-details-marker { display:none; }
.workspace .case-tools summary::after { content:" ▾"; }
.case-header { align-items:start; }
.case-identifiers .case-claim strong { font-size:28px; line-height:1.1; margin-top:2px; }
.case-roles { display:flex; flex-wrap:wrap; gap:12px 32px; margin-top:14px; }
.case-roles .role-label { display:block; color:var(--muted); font-size:11px; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
.case-header .case-roles h1 { margin:2px 0 0; font-size:20px; letter-spacing:-.01em; }
.case-roles .case-insured { display:block; margin-top:2px; font-size:16px; font-weight:650; line-height:1.3; }
.case-address { margin:3px 0 0; color:var(--muted); font-size:12px; }
.case-amounts { flex-wrap:wrap; justify-content:flex-end; gap:12px 22px; max-width:520px; }
.case-amounts > div { min-width:auto; text-align:right; }
.case-amounts dt { min-height:auto; }
.case-amounts dd { min-height:auto; justify-content:flex-end; font-size:17px; }
.case-amounts .residual { padding-left:0; border-left:0; }
.case-amounts .residual dd { font-size:24px; }
.case-bands { display:grid; grid-template-columns:2fr 3fr; gap:16px; align-items:start; margin:0 0 4px; }
.case-bands.single { grid-template-columns:1fr; }
.case-bands .case-situation { border:1px solid var(--line); border-radius:9px; background:#fff; padding:18px 22px; }
.case-bands .band-title { margin:0 0 12px; font-size:16px; font-weight:650; }
.case-bands .process-rail { margin:0; padding:0; border-left:0; background:transparent; }
.case-bands .case-action-slot { display:grid; gap:12px; }
.case-bands .case-action-slot > .work-panel, .case-bands .case-action-slot > .next-action { margin:0; border:2px solid var(--bene-blue); border-radius:9px; }
@media (max-width:1100px) { .case-bands { grid-template-columns:1fr; } }
.case-amounts { max-width:640px; }

.letter-known summary .letter-sources { display:block; margin-top:2px; font-size:11px; font-weight:400; color:var(--muted); }
.outcome-effects { margin:0 0 14px; padding-left:18px; font-size:13px; color:var(--muted); line-height:1.6; }

.settings-intro p { margin:6px 0 0; color:var(--muted); max-width:760px; }
.settings-tech { color:var(--muted); }

/* Riepiloghi operativi: cinque stati e tre dati del registro, dal mockup approvato. */
.summary-tiles { display:grid; gap:12px; margin:0 0 20px; }
.summary-tiles.five { grid-template-columns:repeat(5,minmax(0,1fr)); }
.summary-tiles.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.summary-tile { display:block; min-width:0; padding:14px 16px; text-align:left; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--line-strong); border-radius:10px; box-shadow:0 2px 8px #183b5605; }
button.summary-tile { cursor:pointer; }
.summary-tile .lbl { display:block; font-size:13px; font-weight:600; }
.summary-tile .val { display:block; font-size:26px; font-weight:650; margin:4px 0 2px; font-variant-numeric:tabular-nums; }
.summary-tile .val.date { font-size:20px; }
.summary-tile .hint { display:block; font-size:12px; color:var(--muted); }
.summary-tile.blue { border-left-color:var(--bene-blue); }
.summary-tile.magenta { border-left-color:var(--bene-magenta); }
.summary-tile.amber { border-left-color:#b77908; }
.summary-tile.green { border-left-color:var(--green); }
.summary-tile.red { border-left-color:var(--red); }
.summary-tile.red .lbl { color:var(--red); }
.summary-tile[aria-pressed="true"] { outline:2px solid var(--bene-blue); outline-offset:-2px; }
.summary-tile:focus-visible { outline:2px solid var(--bene-blue); outline-offset:2px; }
@media(max-width:1100px) { .summary-tiles.five { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) { .summary-tiles.five,.summary-tiles.three { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:380px) { .summary-tiles.five,.summary-tiles.three { grid-template-columns:1fr; } }
/* Preparation reuses the case bands; keep every selected-row control visible. */
.transmission-preparation > .work-panel { min-width:0; margin:0; }
.transmission-preparation .form-grid { grid-template-columns:1fr; }
.transmission-preparation .data-table { min-width:0; }
@media (max-width:600px) {
 .transmission-preparation .table-wrap { overflow:visible; }
 .transmission-preparation .data-table, .transmission-preparation tbody { display:block; width:100%; }
 .transmission-preparation thead { display:none; }
 .transmission-preparation tr { display:grid; grid-template-columns:1fr auto; gap:14px; padding:16px 0; border-bottom:1px solid var(--line); }
 .transmission-preparation td { display:flex; flex-direction:column; padding:0; border:0; min-width:0; white-space:normal; overflow-wrap:anywhere; }
 .transmission-preparation td[data-label] { font-weight:600; }
 .transmission-preparation td[data-label]::after { content:attr(data-label); font-size:12px; font-weight:400; color:var(--muted); }
 .transmission-preparation td:nth-child(2) { grid-column:1/-1; grid-row:2; }
 .transmission-preparation td:last-child { grid-column:2; grid-row:1; }
}

/* Scheda pratica · testata: etichetta sopra il valore come nell'elenco; numero sinistro nello stesso magenta dell'elenco */
.workspace .case-header .case-identifiers > span { font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
.workspace .case-header .case-identifiers > span > strong { order:0; letter-spacing:0; text-transform:none; }
.workspace .case-header .case-identifiers strong[data-claim-number], .case-identifiers [data-claim-number] { color:var(--bene-magenta); }

/* Scadenziario · fetta 6: viste dichiarate sotto il titolo, tessere neutre a zero, sinistro per primo, nessun pulsante primario */
.report-views-wrap { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; margin:-8px 0 20px; }
.report-view-note { margin:0; color:var(--muted); font-size:12px; }
.report-context { margin:3px 0 0; color:var(--muted); font-size:13px; }
#scadenziario-tiles .metric[aria-current="true"] { box-shadow:inset 0 0 0 2px var(--bene-blue); }
#report .unscheduled { color:var(--muted); font-weight:400; }
#report .claim-link { font-size:15px; }
#report .practice-references { display:block; margin-top:3px; color:var(--muted); font-size:12px; font-weight:400; line-height:1.4; }

/* Selezione per la trasmissione: colonna propria, così «Sinistro» resta allineato su tutte le righe. */
.workspace .prototype-list .practice-select { width:34px; min-width:34px; padding-right:0; vertical-align:top; }
.workspace .prototype-list .practice-select .transmission-checkbox { margin:0; min-height:0; padding-top:2px; }
.workspace .prototype-list .practice-select input { width:18px; height:18px; }
.workspace .prototype-list .transmission-state { color:var(--bene-blue-dark); font-weight:600; }
@media(max-width:1100px) {
 .workspace .practice-list .practice-select { grid-column:1 / -1; width:auto; min-width:0; }
 .workspace .practice-list .practice-select:empty { display:none; }
}

/* Situazione: etichetta sopra al valore, come nella testata della scheda. */
.workspace :is(.case-situation,#indirect-summary) .notice-history-fields > div > dd { order:0; }
.workspace :is(.case-situation,#indirect-summary) .notice-history-fields > div > dt { font-size:11px; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }

/* Show only the actionable notice steps; hidden must win over grid row styling. */
#notice-work .notice-steps > li[hidden] { display:none!important; }
#notice-work .notice-steps > li { padding:12px 0!important; }
#notice-work .notice-steps > li > strong { grid-row:1; }
/* Scheda: un solo importo dominante, azione a tutta larghezza, supporto sotto. */
.workspace .case-header .case-amounts { display:grid; grid-template-columns:repeat(5,max-content); gap:14px 18px; max-width:100%; }
.workspace .case-header .case-amounts > .residual { grid-column:1 / -1; }
#main .case-header .case-amounts > div > dd { order:1; font-size:14px; color:var(--ink); }
#main .case-header .case-amounts > .residual > dd { font-size:28px; }
#main .case-header .case-amounts dt, #main .case-action-slot .notice-history-fields dt { order:0; font-size:11px; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
.workspace .case-header .case-claim strong, .workspace .case-context h1 { font-size:20px; }
#main .case-action-slot .notice-history-fields dd { order:1; }
.case-bands.single { grid-template-columns:minmax(0,1fr); }
.action-context { display:flex; flex-wrap:wrap; gap:8px 20px; color:var(--muted); font-size:12px; }
.case-tabs [hidden], .action-context [hidden], #notice-work a[hidden] { display:none!important; }
#notice-work #notice-documents { grid-column:2 / -1; }
#notice-work .notice-file-actions { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
#notice-work .notice-link { font-size:13px; text-decoration:underline; text-underline-offset:3px; }
.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; }
@media (max-width:700px) {
 .workspace .case-header .case-amounts { grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
 .workspace .case-header .case-amounts > div { text-align:left; }
 .workspace .case-header .case-amounts dd { justify-content:flex-start; }
 #notice-work .notice-file-actions { align-items:flex-start; }
}
@media (max-width:480px) {
 #notice-work #notice-documents { grid-column:1; }
}

#indirect-summary.case-bands { border-left:0; margin:0 0 4px; }
