@charset "UTF-8";
/*
 * TrilùTable · fase 2 · stampa e cassa (prefix cs-), «Scuro premium» (docs/sviluppo/DESIGN-V6.md).
 * Sections of Impostazioni (Postazioni e stampanti, Cassa fiscale, Conto e pagamenti, Dispositivi, Permessi), the
 * shared permissions matrix (also in Servizio e accessi) and the top-bar «Stampe e cassa» badge and panel.
 * Shared components (.panel, .st-sec*, .field, .input, .select, .switch, .pill, .banner, .btn, .drawer) come from
 * styles.css and settings.css; this file adds only what the new screens need.
 */

/* ---------- Navigation group and section bits ---------- */
.st-nav-group { margin: 14px 10px 4px; font-size: 12px; font-weight: 500; line-height: 16px; color: var(--text-3); }
.cs-sec .st-sec-head { align-items: center; }
.cs-sec .st-sec-head .st-sec-text { align-self: flex-start; }
.cs-head-action { flex: none; }
.cs-head-status { flex: none; display: inline-flex; }
.cs-body { padding-bottom: 16px; }
.cs-body > :last-child { margin-bottom: 0; }
.cs-banner { margin-bottom: 14px; }
.cs-banner ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.cs-banner li + li { margin-top: 2px; }
.cs-form-error { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; }
.cs-sub-hint { margin: -4px 0 12px !important; }
.cs-skeleton { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 8px; }
.cs-skel-row { height: 44px; border-radius: var(--r-md); }
.cs-btn-label { white-space: nowrap; }
.cs-missing { color: var(--amber); }
.cs-modal-note { margin: 12px 0 10px; font-size: 13.5px; line-height: 20px; color: var(--text-2); }
.cs-suffix { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cs-suffix > .input, .field .cs-suffix > .input { width: 96px !important; flex: none; }
.cs-suffix > span { font-size: 13px; color: var(--text-3); }
.cs-inline { display: flex; gap: 6px; min-width: 0; }
.cs-inline .select { flex: 1; min-width: 0; }
.cs-inline .icon-btn { width: var(--control-h); height: var(--control-h); }
.cs-fieldset { min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
.cs-fieldset > .field-label { display: block; margin-bottom: 8px; padding: 0; }
.cs-fieldset .field-help { margin: 8px 0 0; }
.cs-seg > label { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cs-seg > label .icon { color: var(--text-3); }
.cs-seg > label.is-active .icon, .cs-seg > label:has(input:checked) .icon { color: var(--text-1); }
.cs-seg > label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.cs-switch { margin-bottom: 12px; }
.cs-switch .switch:disabled { cursor: not-allowed; }
.cs-add { margin: 2px 0 16px; }
.cs-empty-inline { margin: 0 0 8px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Postazioni ---------- */
.cs-stations { display: flex; flex-direction: column; margin: 0 0 12px; padding: 0; list-style: none; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 255, 255, .012); }
.cs-station { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px 14px; align-items: start; padding: 14px 14px 14px 16px; }
.cs-station + .cs-station { border-top: 1px solid var(--line-soft); }
.cs-station.is-inactive .cs-station-main { opacity: .68; }
.cs-station-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--text-1); background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px var(--line-strong), var(--highlight); }
.cs-station-icon.is-sm { width: 30px; height: 30px; border-radius: 8px; }
.cs-station-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cs-station-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0; min-height: 22px; }
.cs-station-title b { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; }
.cs-station-line { display: flex; align-items: flex-start; gap: 7px; margin: 0; font-size: 13px; line-height: 19px; color: var(--text-1); min-width: 0; }
.cs-station-line > span { min-width: 0; overflow-wrap: anywhere; }
.cs-station-line .icon { flex: none; margin-top: 3px; color: var(--text-3); }
.cs-station-line.is-muted { color: var(--text-2); }
.cs-station-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cs-station-actions { display: flex; align-items: center; gap: 6px; }
.cs-more { width: 30px; height: 30px; }
.cs-test { display: flex; align-items: flex-start; gap: 7px; margin: 4px 0 0; font-size: 12.5px; line-height: 18px; color: var(--text-2); }
.cs-test .icon, .cs-test .spinner { flex: none; margin-top: 2px; }
.cs-test .spinner { --spinner-size: 13px; }
.cs-test.is-ok { color: var(--green); }
.cs-test.is-error { color: var(--red); }
.cs-test.is-warn { color: var(--amber); }
.cs-stations-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 18px; }
.cs-stations-foot .text-button { color: var(--text-1); }
.cs-stations-foot .text-button .icon { color: var(--accent); }
.cs-menu { min-width: 220px; }
.cs-empty-stations { padding: 4px 0 8px; }
.cs-empty-stations .empty { padding-bottom: 16px; }
.cs-empty-stations .empty-actions { margin-top: 18px; }
.cs-preset-list { display: grid; gap: 6px; max-width: 560px; margin: 0 auto; padding: 0; list-style: none; }
.cs-preset-list li { display: grid; grid-template-columns: 30px 132px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; padding: 7px 12px 7px 8px; border-radius: var(--r-md); background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--line); }
.cs-preset-list b { font-size: 13.5px; font-weight: 600; }
.cs-preset-list li > span:last-child { min-width: 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.cs-preset-list li.is-existing { opacity: .62; }
.cs-preset-dialog .cs-preset-list { max-width: none; }
.cs-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 6px 0; cursor: pointer; }
.cs-check > input { flex: none; margin-top: 2px; }
.cs-check > span { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cs-check b { font-size: 13.5px; font-weight: 500; color: var(--text-1); }
.cs-check small { font-size: 12.5px; line-height: 18px; color: var(--text-3); }
.cs-check-danger { margin-top: 6px; padding: 10px 12px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--red-line); background: var(--red-soft); }

/* Categorie → postazione */
.cs-routing { margin-bottom: 0; }
.cs-matrix-wrap { margin: 0 0 14px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cs-matrix { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cs-matrix thead th { height: 34px; padding: 0 14px; text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); background: rgba(255, 255, 255, .02); border-bottom: 1px solid var(--line-soft); }
.cs-matrix tbody tr + tr th, .cs-matrix tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.cs-matrix th[scope="row"] { width: 50%; padding: 8px 14px; text-align: left; font-weight: 500; }
.cs-matrix td { padding: 6px 12px 6px 6px; }
.cs-mx-name { display: flex; align-items: center; gap: 6px; color: var(--text-1); overflow-wrap: anywhere; }
.cs-mx-count { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--text-3); }
.cs-mx-row.is-sub th[scope="row"] { padding-left: 30px; }
.cs-mx-row.is-sub .cs-mx-name { color: var(--text-2); font-weight: 400; }
.cs-mx-row.is-sub .cs-mx-name .icon { color: var(--text-4); margin-left: -18px; }
.cs-mx-row.is-sub .cs-mx-count { padding-left: 0; }
.cs-mx-select { width: 100%; min-height: 34px; }
.cs-mx-row.is-default .cs-mx-select { color: var(--text-2); }
.cs-exceptions { padding: 14px; margin-bottom: 4px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--line); }
.cs-exc-head h4 { margin: 0; font-size: 13.5px; font-weight: 600; }
.cs-exc-head p { margin: 2px 0 12px; font-size: 12.5px; line-height: 18px; color: var(--text-3); }
.cs-exc-list { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.cs-exc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) 32px; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: var(--r-md); background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--line); }
.cs-exc-name { min-width: 0; display: flex; flex-direction: column; }
.cs-exc-name b { font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.cs-exc-name small { font-size: 12px; color: var(--text-3); }
.cs-exc-remove { width: 32px; height: 32px; }
.cs-exc-remove:hover { color: var(--red); }

/* Station editor and pickers (dialogs) */
.cs-editor .field-row { gap: 0 14px; }
.cs-editor .cs-seg { width: 100%; }
.cs-editor .cs-seg > label { flex: 1; justify-content: center; }
.cs-editor-printer { margin-bottom: 4px; }
.cs-editor-printer .cs-check { align-self: end; }
.cs-editor-printer .field-row { align-items: end; }
.cs-editor-group { margin: 6px 0 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.cs-editor-group > .field-label { margin: 0 0 6px; }
.cs-editor-group .field { margin-bottom: 8px; }
.cs-label-sm { font-size: 12.5px; color: var(--text-3); }
.cs-editor-danger { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 12px 0 8px; border-top: 1px solid var(--line-soft); }
.cs-editor-note { font-size: 12.5px; color: var(--text-3); }
.cs-check.is-locked { cursor: default; }
.menu-item:disabled { opacity: .5; cursor: not-allowed; }
.menu-item:disabled:hover { background: none; }
.cs-pick-search { display: flex; align-items: center; gap: 8px; height: 38px; margin-bottom: 10px; padding: 0 12px; }
.cs-pick-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--text-1); font: inherit; outline: none; }
.cs-pick-list { display: flex; flex-direction: column; gap: 4px; max-height: min(320px, 42dvh); overflow-y: auto; margin: 0 0 14px; padding: 2px; }
.cs-pick-list.is-short { max-height: none; }
.cs-pick { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.cs-pick:hover { background: rgba(255, 255, 255, .04); }
.cs-pick:has(input:checked) { box-shadow: inset 0 0 0 1px var(--accent-line); background: var(--accent-soft); }
.cs-pick > span { min-width: 0; display: flex; flex-direction: column; }
.cs-pick b { font-size: 13.5px; font-weight: 500; }
.cs-pick small { font-size: 12px; color: var(--text-3); }
.cs-pick[hidden] { display: none; }

/* ---------- Cassa fiscale ---------- */
.cs-status {
  --cs-c: var(--text-2); --cs-bg: rgba(255, 255, 255, .025); --cs-line: var(--line);
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; margin-bottom: 14px; padding: 16px;
  border-radius: var(--r-lg); background: var(--cs-bg); box-shadow: inset 0 0 0 1px var(--cs-line);
}
.cs-status.is-green { --cs-c: var(--green); --cs-bg: var(--green-soft); --cs-line: var(--green-line); }
.cs-status.is-amber { --cs-c: var(--amber); --cs-bg: var(--amber-soft); --cs-line: var(--amber-line); }
.cs-status.is-red { --cs-c: var(--red); --cs-bg: var(--red-soft); --cs-line: var(--red-line); }
.cs-status-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--cs-c); background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px var(--cs-line); }
.cs-status-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cs-status-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0; }
.cs-status-title b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.cs-status-meta { margin: 0; font-size: 13px; line-height: 19px; color: var(--text-2); overflow-wrap: anywhere; }
.cs-status-detail { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 13px; line-height: 19px; color: var(--text-1); }
.cs-status-detail.is-warn { color: var(--amber); }
.cs-status-detail .icon { flex: none; margin-top: 3px; }
.cs-status-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.cs-tests { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.cs-status-note { grid-column: 2 / -1; margin: 6px 0 0; font-size: 12.5px; line-height: 18px; color: var(--text-3); }
.cs-conn .cs-status-note { margin-top: 8px; }
.cs-fiscal-grid { margin-top: 4px; }
.cs-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cs-choice { display: flex; align-items: flex-start; gap: 10px; min-height: 64px; padding: 11px 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.cs-choice:hover { background: rgba(255, 255, 255, .04); }
.cs-choice.is-selected, .cs-choice:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.cs-choice.is-disabled { cursor: not-allowed; opacity: .62; }
.cs-choice.is-disabled:hover { background: rgba(255, 255, 255, .02); }
.cs-choice > input { flex: none; margin-top: 2px; }
.cs-choice > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cs-choice b { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13.5px; font-weight: 500; }
.cs-choice small { font-size: 12.5px; line-height: 17px; color: var(--text-3); }
.cs-ela { margin: 4px 0 4px; padding: 14px 14px 0; border-radius: var(--r-lg); background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--line); }
.cs-ela-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cs-ela-head p { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; }
.cs-ela-head .icon { color: var(--text-3); }
.cs-ela-found { display: flex; align-items: flex-start; gap: 7px; margin: -2px 0 12px !important; font-size: 13px; line-height: 19px; }
.cs-ela-found .icon { flex: none; margin-top: 2px; }
.cs-ela-found.is-ok { color: var(--green); }
.cs-ela-found.is-warn { color: var(--amber); }
.cs-ela-found.is-error { color: var(--red); }
.cs-path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px !important; }
.cs-sim { margin: 4px 0 4px; }
.cs-conn-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.cs-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
.cs-summary div { min-width: 0; padding: 9px 12px; border-radius: var(--r-md); background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--line); }
.cs-summary dt { margin-bottom: 2px; font-size: 12px; color: var(--text-3); }
.cs-summary dd { margin: 0; font-size: 13px; color: var(--text-1); overflow-wrap: anywhere; }
.cs-table-wrap { margin: 0 0 12px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cs-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cs-table thead th { height: 34px; padding: 0 10px; text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); background: rgba(255, 255, 255, .02); border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.cs-table thead th:first-child, .cs-table td:first-child { padding-left: 14px; }
.cs-table td { padding: 7px 10px; vertical-align: top; }
.cs-table tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.cs-table tr.is-off td:not(:first-child) { opacity: .6; }
.cs-cell { width: 100%; min-height: 34px; }
.cs-cell-sm { width: 72px; }
.cs-cell-muted { display: inline-block; padding-top: 7px; color: var(--text-4); }
.cs-cell-error { display: block; margin-top: 4px; font-size: 12px; }
.cs-cell-action { width: 44px; text-align: right; }
.cs-pay td:first-child .switch { margin-top: 7px; }
.cs-pay td:nth-child(3) .tag { margin-top: 7px; }
.cs-catvat { margin: 4px 0 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.cs-catvat > .field-label { margin: 0 0 2px; }
.cs-catvat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.cs-catvat-list li { display: grid; grid-template-columns: minmax(0, 1fr) 168px; align-items: center; gap: 4px 12px; min-height: 44px; padding: 4px 6px 4px 12px; border-radius: var(--r-md); background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--line-soft); }
.cs-catvat-list li.has-error { box-shadow: inset 0 0 0 1px var(--red-line); }
.cs-catvat-list .cs-cell-error { grid-column: 1 / -1; margin: 0 0 4px; }
.cs-catvat-name { min-width: 0; font-size: 13.5px; font-weight: 500; color: var(--text-1); overflow-wrap: anywhere; }
.cs-lines { display: flex; flex-direction: column; gap: 6px; }
.cs-lines .field-error { margin: -2px 0 2px; }
.cs-help-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: cs-help; }
.cs-help-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 1px 10px; counter-increment: cs-help; }
.cs-help-steps li::before { content: counter(cs-help); grid-row: span 2; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 600; color: var(--text-1); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cs-help-steps b { font-size: 13.5px; font-weight: 500; line-height: 24px; }
.cs-help-steps span { font-size: 13px; line-height: 19px; color: var(--text-2); }
.cs-howto { margin-top: 4px; }

/* ---------- Conto e pagamenti ---------- */
.cs-prebill { margin-bottom: 0; }
.cs-prebill-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.cs-prebill-form { min-width: 0; }
.cs-paper { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cs-paper-sheet {
  width: 100%; padding: 16px 16px 14px; border-radius: 6px 6px 2px 2px; background: #F7F5F0; color: #1D1F22;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 17px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(0, 0, 0, .06);
  -webkit-mask: linear-gradient(#000 calc(100% - 6px), transparent 0), conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
  mask: linear-gradient(#000 calc(100% - 6px), transparent 0), conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%;
  padding-bottom: 20px;
}
.cs-paper-brand { margin: 0; text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.cs-paper-sub { margin: 2px 0 10px; text-align: center; color: #5B5F66; }
.cs-paper ul { margin: 0; padding: 8px 0; list-style: none; border-top: 1px dashed #B9BCC2; border-bottom: 1px dashed #B9BCC2; }
.cs-paper li { display: flex; justify-content: space-between; gap: 10px; }
.cs-paper li.is-detail { padding-left: 14px; color: #5B5F66; font-size: 11.5px; }
.cs-paper-total, .cs-paper-head { display: flex; justify-content: space-between; margin: 8px 0 0; }
.cs-paper-total { font-weight: 700; font-size: 13px; }
.cs-paper-head { margin-top: 2px; color: #3F4349; }
.cs-paper-note { margin: 10px 0 0; text-align: center; color: #3F4349; overflow-wrap: anywhere; }
.cs-paper-foot { margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed #B9BCC2; text-align: center; font-size: 11px; color: #5B5F66; }
.cs-paper figcaption { font-size: 12px; color: var(--text-3); }

/* ---------- Dispositivi ---------- */
.cs-devices { display: grid; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.cs-device { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px 14px; align-items: start; padding: 14px 14px 14px 16px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--line); }
.cs-device.is-offline { box-shadow: inset 0 0 0 1px var(--amber-line); }
.cs-device-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--text-1); background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px var(--line-strong), var(--highlight); }
.cs-device-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cs-device-title { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0; }
.cs-device-title b { font-size: 14.5px; font-weight: 600; }
.cs-device-meta { margin: -2px 0 0; font-size: 12.5px; line-height: 18px; color: var(--text-3); overflow-wrap: anywhere; }
.cs-device-note { margin: 0; font-size: 13px; color: var(--text-3); }
.cs-printers { display: grid; gap: 4px; margin: 2px 0 0; padding: 0; list-style: none; }
.cs-printers li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: var(--r-md); background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--line-soft); }
.cs-printers .dot.is-grey { background: var(--grey); box-shadow: 0 0 0 3px rgba(138, 144, 153, .15); }
.cs-printer-main { min-width: 0; display: flex; flex-direction: column; }
.cs-printer-main b { font-size: 13.5px; font-weight: 500; }
.cs-printer-main small { font-size: 12px; line-height: 17px; color: var(--text-3); overflow-wrap: anywhere; }
.cs-printer-main small.is-error { color: var(--red); }
.cs-device-fiscal { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 2px 0 0; font-size: 13px; }
.cs-device-fiscal .icon { color: var(--text-3); }
.cs-device-fiscal small { flex-basis: 100%; padding-left: 22px; font-size: 12.5px; color: var(--text-3); }
.cs-device-jobs { margin: 0; font-size: 12.5px; color: var(--text-2); }
.cs-device-jobs .is-error { color: var(--red); }
.cs-device-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.cs-connect-steps { margin-top: 4px; }

/* ---------- Permessi (also in Servizio e accessi) ---------- */
.cs-perm-wrap { margin: 0 0 14px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: thin; }
.cs-perm-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 13.5px; }
.cs-perm-table thead th { height: 44px; padding: 6px 6px; font-size: 12px; font-weight: 500; line-height: 15px; color: var(--text-3); text-align: center; vertical-align: bottom; background: rgba(255, 255, 255, .02); border-bottom: 1px solid var(--line-soft); }
.cs-perm-table thead th:first-child { text-align: left; padding-left: 14px; }
.cs-perm-table thead th span { display: inline-block; max-width: 84px; }
.cs-perm-table tbody tr + tr th, .cs-perm-table tbody tr + tr td { border-top: 1px solid var(--line-soft); }
.cs-perm-table tbody th { padding: 8px 10px 8px 14px; text-align: left; font-weight: 500; }
.cs-perm-table td { padding: 4px; text-align: center; }
.cs-perm-table tr.is-off th, .cs-perm-table tr.is-off td { opacity: .62; }
.cs-perm-table tr.is-changed th { box-shadow: inset 2px 0 0 var(--amber); }
.cs-perm-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cs-perm-person > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.cs-perm-person b { font-weight: 500; overflow-wrap: anywhere; }
.cs-perm-person small { font-size: 12px; font-weight: 400; color: var(--text-3); }
.cs-perm-person small.is-error { color: var(--red); }
.cs-perm-cell { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-md); cursor: pointer; }
.cs-perm-cell:hover { background: rgba(255, 255, 255, .04); }
.cs-perm-cell:has(input:disabled) { cursor: not-allowed; }
.cs-perm-cell:has(input:disabled):hover { background: none; }
.cs-perm-cell .check { width: 17px; height: 17px; accent-color: var(--accent); }
.cs-perm-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cs-perm-end { width: 120px; padding-right: 12px !important; text-align: right !important; white-space: nowrap; }
.cs-perm-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
.cs-perm-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; margin: 0 0 12px; }
.cs-perm-legend div { min-width: 0; }
.cs-perm-legend dt { font-size: 13px; font-weight: 500; color: var(--text-1); }
.cs-perm-legend dd { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--text-3); }
.cs-perm-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 4px; }
.cs-perm-note .icon { flex: none; margin-top: 2px; }
.cs-perm-panel .st-sec-foot { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.sv-cperms { margin-top: 16px; }
.sv-matrix th .sv-matrix-hint { display: block; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--text-3); }
.cs-perm-panel .cs-perm-body { padding: 16px 16px 6px; }

/* ---------- Top bar badge ---------- */
.tb-cassa .tb-cassa-count {
  position: absolute; top: -4px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; color: #2A0F0B; background: var(--red);
  box-shadow: 0 0 0 2px var(--bg-1); pointer-events: none;
}
.tb-cassa.has-problems { color: var(--red); box-shadow: inset 0 0 0 1px var(--red-line); }
.tb-cassa.has-problems:hover { color: var(--red); background: var(--red-soft); }
/* Held comande waiting for «Stampa»: something to do, not an alarm. */
.tb-cassa .tb-cassa-count.is-held { color: #0D1828; background: var(--blue); }

/* ---------- «Stampe e cassa» panel ---------- */
.cs-alerts { width: min(540px, calc(100vw - 2 * var(--frame-gap))); }
.cs-panel-head h2 { margin: 0; font-size: 17px; line-height: 24px; }
.cs-panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-3); }
.cs-panel-body { display: flex; flex-direction: column; gap: 18px; }
.cs-panel-foot { justify-content: space-between; }
.cs-panel-group { display: flex; flex-direction: column; gap: 8px; }
.cs-panel-group h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.cs-panel-group h3 .icon { color: var(--text-3); }
.cs-panel-empty { padding: 48px 16px; }
.cs-panel-empty .empty-icon { color: var(--green); }
.cs-offline { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber-line); }
.cs-offline .dot { margin-top: 7px; }
.cs-offline > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.cs-offline b { font-size: 13.5px; font-weight: 600; }
.cs-offline small { font-size: 12.5px; line-height: 18px; color: var(--text-2); }
.cs-issue { --cs-c: var(--red); --cs-line: var(--red-line); display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 12px 14px; border-radius: var(--r-lg); background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--cs-c); }
.cs-issue.is-amber { --cs-c: var(--amber); --cs-line: var(--amber-line); }
.cs-issue.is-blue { --cs-c: var(--blue); --cs-line: var(--blue-line); }
.cs-panel-group .count.is-blue { color: var(--blue); background: var(--blue-soft); }
.cs-held-list { list-style: none; margin: 2px 0 0; padding: 0; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.cs-held-list li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; }
.cs-held-list li + li { border-top: 1px solid var(--line); }
.cs-held-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-held-text b { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.cs-held-text small { font-size: 12.5px; color: var(--text-3); }
.cs-held-text .cs-held-fail { color: var(--red); }
.cs-held-more { margin: 0; font-size: 12.5px; color: var(--text-3); }
.cs-issue-head { display: flex; align-items: flex-start; gap: 10px; }
.cs-issue-icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--cs-c); background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--cs-line); }
.cs-issue-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-issue-title b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.cs-issue-title small { font-size: 12.5px; color: var(--text-3); }
.cs-issue-strong { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--cs-c); }
.cs-issue-error { margin: 0; font-size: 13.5px; line-height: 20px; color: var(--text-1); overflow-wrap: anywhere; }
.cs-issue-meta { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12.5px; line-height: 18px; color: var(--text-3); }
.cs-issue-meta .icon { flex: none; margin-top: 2px; }
.cs-issue-fail { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12.5px; color: var(--red); }
.cs-issue-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cs-issue-other .select { min-height: 28px; height: 28px; max-width: 220px; font-size: 13px; }
.cs-issue-history { margin-left: auto; }
.cs-issue-perm { font-size: 12.5px; color: var(--text-3); }
.cs-verify { margin-top: 4px; padding: 10px 12px; border-radius: var(--r-md); background: var(--amber-soft); box-shadow: inset 0 0 0 1px var(--amber-line); }
.cs-verify p { margin: 0 0 8px; font-size: 13px; line-height: 19px; color: var(--text-1); }
.cs-verify .field-label { display: block; margin-bottom: 6px; }
.cs-verify-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-verify-row .input { width: 140px; min-height: 28px; }
.cs-attempts { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 0; padding: 8px 10px; list-style: none; border-radius: var(--r-md); background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 1px var(--line-soft); }
.cs-attempts li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 12.5px; line-height: 18px; color: var(--text-2); }
.cs-attempts li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.cs-attempts small { display: block; color: var(--text-3); }
.cs-attempts li.is-ok b { color: var(--green); }
.cs-attempts li.is-error b { color: var(--red); }
.cs-attempt-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; color: var(--text-2); background: var(--bg-3); }
.cs-attempts-empty { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }
.cs-panel-loading { padding: 4px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .st-nav-group { display: none; }
}
@media (max-width: 900px) {
  .cs-choices { grid-template-columns: minmax(0, 1fr); }
  .cs-choice { min-height: 0; }
  .cs-prebill-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-paper { max-width: 300px; width: 100%; justify-self: center; }
}
@media (max-width: 768px) {
  .cs-station { grid-template-columns: 34px minmax(0, 1fr); padding: 12px; }
  .cs-station-icon { width: 34px; height: 34px; }
  .cs-station-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .cs-device { grid-template-columns: 34px minmax(0, 1fr); padding: 12px; }
  .cs-device-icon { width: 34px; height: 34px; }
  .cs-device-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .cs-summary, .cs-perm-legend, .cs-catvat-list { grid-template-columns: minmax(0, 1fr); }
  .cs-status { grid-template-columns: 36px minmax(0, 1fr); padding: 14px; }
  .cs-status-icon { width: 36px; height: 36px; }
  .cs-status-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .cs-tests, .cs-status-note { grid-column: 1 / -1; }
  /* Tables become stacked cards. */
  .cs-table-wrap, .cs-matrix-wrap { overflow: visible; box-shadow: none; border-radius: 0; }
  .cs-table thead, .cs-matrix thead { display: none; }
  .cs-table, .cs-table tbody, .cs-table tr, .cs-table td { display: block; width: 100%; }
  .cs-table tr { position: relative; margin-bottom: 8px; padding: 10px 12px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 255, 255, .015); }
  .cs-table tbody tr + tr td { border-top: 0; }
  .cs-table td { padding: 4px 0 !important; }
  .cs-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 500; color: var(--text-3); }
  .cs-cell-sm { width: 100%; }
  /* VAT: rate and department on one line, description and delete on the next; nature only for 0%. */
  .cs-vat tr { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 2px 10px; }
  .cs-vat td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .cs-vat td:nth-child(3) { grid-column: 2; grid-row: 1; }
  .cs-vat td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .cs-vat td:nth-child(2).is-empty { display: none; }
  .cs-vat td:nth-child(4) { grid-column: 1; grid-row: 3; }
  .cs-vat td.cs-cell-action { grid-column: 2; grid-row: 3; align-self: end; display: flex; justify-content: flex-end; width: auto; }
  /* Payments: switch and name, then type and register key. */
  .cs-pay tr { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; }
  .cs-pay td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .cs-pay td:nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
  .cs-pay td:nth-child(1)::before, .cs-pay td:nth-child(2)::before { display: none; }
  .cs-pay td:nth-child(3) { grid-column: 1 / 3; grid-row: 2; display: flex; align-items: center; gap: 8px; }
  .cs-pay td:nth-child(4) { grid-column: 3; grid-row: 2; display: flex; align-items: center; gap: 8px; }
  .cs-pay td:nth-child(3)::before, .cs-pay td:nth-child(4)::before { margin: 0; white-space: nowrap; }
  .cs-pay td:nth-child(4) .cs-cell-sm { width: 64px; }
  .cs-pay td:first-child .switch, .cs-pay td:nth-child(3) .tag { margin-top: 0; }
  .cs-pay td:nth-child(4) { flex-wrap: wrap; justify-content: flex-end; }
  .cs-pay td:nth-child(4) .cs-cell-error { flex-basis: 100%; margin: 0; text-align: right; }
  .cs-matrix, .cs-matrix tbody, .cs-matrix tr { display: block; width: 100%; }
  .cs-matrix tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; }
  .cs-matrix tbody tr + tr th, .cs-matrix tbody tr + tr td { border-top: 0; }
  .cs-matrix tbody tr + tr { border-top: 1px solid var(--line-soft); }
  .cs-matrix th[scope="row"], .cs-matrix td { display: block; width: 100%; padding: 0; }
  .cs-mx-row.is-sub { padding-left: 18px; }
  .cs-mx-row.is-sub th[scope="row"] { padding-left: 0; }
  .cs-mx-row.is-sub .cs-mx-name .icon { margin-left: 0; }
  .cs-exc { grid-template-columns: minmax(0, 1fr) 32px; }
  .cs-exc .cs-mx-select { grid-column: 1; grid-row: 2; }
  .cs-exc-remove { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  /* Permissions: one card per person. */
  .cs-perm-wrap { overflow: visible; box-shadow: none; border-radius: 0; }
  .cs-perm-table { min-width: 0; }
  .cs-perm-table thead { display: none; }
  .cs-perm-table, .cs-perm-table tbody, .cs-perm-table tr { display: block; width: 100%; }
  .cs-perm-table tr { margin-bottom: 10px; padding: 6px 12px 8px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 255, 255, .015); }
  .cs-perm-table tbody tr + tr th, .cs-perm-table tbody tr + tr td { border-top: 0; }
  .cs-perm-table tbody th { display: block; padding: 6px 0 8px; border-bottom: 1px solid var(--line-soft) !important; }
  .cs-perm-table td { display: block; padding: 0; text-align: left; }
  .cs-perm-cell { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; height: auto; min-height: 42px; padding: 0 4px; }
  .cs-perm-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; font-size: 13.5px; color: var(--text-1); }
  .cs-perm-end { width: auto; padding: 6px 0 0 !important; text-align: left !important; }
  .cs-perm-table tr.is-changed th { box-shadow: none; }
  .cs-perm-table tr.is-changed { box-shadow: inset 0 0 0 1px var(--amber-line); }
}
@media (max-width: 560px) {
  .cs-preset-list li { grid-template-columns: 30px minmax(0, 1fr); }
  .cs-preset-list li > span:last-child { grid-column: 2; }
  .cs-station-actions { flex-wrap: wrap; }
  /* The panel is a bottom sheet on phones, sized to its content. */
  dialog.drawer.cs-alerts { inset: auto 0 0 0; width: 100%; max-width: 100%; height: auto; max-height: 92dvh; border-radius: 16px 16px 0 0; }
  dialog.drawer.cs-alerts[open] { animation: sheet-in var(--t-med) var(--ease); }
  .cs-alerts .cs-panel-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .cs-alerts .cs-issue-main, .cs-issue-other, .cs-issue-other .select { flex: 1 1 100%; width: 100%; max-width: none; }
  .cs-issue-history { margin-left: auto; }
  .cs-head-action .cs-btn-label { display: none; }
  .cs-head-action { width: 36px; padding: 0; }
  .cs-editor .cs-seg > label { padding: 0 6px; font-size: 12.5px; }
  .cs-editor .cs-seg > label .icon { display: none; }
}
@media (pointer: coarse) {
  .cs-more, .cs-exc-remove { width: 40px; height: 40px; }
  .cs-mx-select, .cs-cell { min-height: 40px; }
  .cs-issue-other .select { min-height: 34px; height: 34px; }
  .cs-verify-row .input { min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-choice, .cs-pick { transition: none; }
}
