:root {
  --sfondo: #fafafa; --carta: #fff; --testo: #1a1a1a; --tenue: #5f6368; --bordo: #e0e0e0; --riga: #f3f3f3; --testa: #c9ced6; --testa-testo: #1a1a1a;
  --accento: #3b5bfd; --accento-forte: #2a45d8; --accento-tenue: #eef1ff; --accento-testo: #fff;
  --pericolo: #d92d20; --barra: #0f1629; --barra-testo: #e6e9f2; --barra-tenue: #9aa7c7; --barra-attiva: #1b2440;
  --raggio: 8px; --ombra: 0 1px 2px rgb(16 24 40 / .05), 0 8px 24px -12px rgb(16 24 40 / .18);
  color-scheme: light;
}
/* tema scuro come nel programma: scelto con il tasto Tema, oppure quello del sistema */
:root[data-tema="scuro"] {
  --sfondo: #202020; --carta: #2b2b2b; --testo: #fff; --tenue: #c8c8c8; --bordo: #3d3d3d; --riga: #323232; --testa: #4b5563; --testa-testo: #fff;
  --accento: #6f8cff; --accento-forte: #8aa2ff; --accento-tenue: #26305a; --accento-testo: #fff;
  --pericolo: #ff7a6e; --ombra: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-tema="sistema"] {
    --sfondo: #202020; --carta: #2b2b2b; --testo: #fff; --tenue: #c8c8c8; --bordo: #3d3d3d; --riga: #323232; --testa: #4b5563; --testa-testo: #fff;
    --accento: #6f8cff; --accento-forte: #8aa2ff; --accento-tenue: #26305a; --accento-testo: #fff;
    --pericolo: #ff7a6e; --ombra: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { font: 14.5px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--sfondo); color: var(--testo); -webkit-font-smoothing: antialiased; }
h1, h2 { margin: 0 0 6px; font-size: 22px; font-weight: 650; letter-spacing: -.015em; }
p { margin: 0 0 12px; }
code { padding: 3px 8px; font: 13px ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--riga); border: 1px solid var(--bordo); border-radius: 6px; }

input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select, textarea {
  width: 100%; padding: 9px 12px; background: var(--carta); border: 1px solid var(--bordo); border-radius: var(--raggio);
  transition: border-color .15s, box-shadow .15s;
}
input:not([type=checkbox]):hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accento) 45%, var(--bordo)); }
input:not([type=checkbox]):focus, select:focus, textarea:focus { outline: 0; border-color: var(--accento); box-shadow: 0 0 0 4px var(--accento-tenue); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accento); }
button { padding: 9px 16px; font-weight: 550; background: var(--carta); border: 1px solid var(--bordo); border-radius: var(--raggio); cursor: pointer; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s; }
button:hover:not(:disabled) { border-color: color-mix(in srgb, var(--accento) 55%, var(--bordo)); background: var(--riga); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: default; }
.primario { background: var(--accento); border-color: var(--accento); color: var(--accento-testo); box-shadow: 0 1px 2px rgb(16 24 40 / .1), 0 6px 16px -8px var(--accento); }
.primario:hover:not(:disabled) { background: var(--accento-forte); border-color: var(--accento-forte); }
.pericolo { color: var(--pericolo); }
.consiglio, a.consiglio { padding: 7px 14px; font-weight: 550; color: var(--accento); background: var(--accento-tenue); border: 1px solid transparent; border-radius: 999px; text-decoration: none; }
.consiglio:hover:not(:disabled), a.consiglio:hover { background: var(--accento-tenue); border-color: var(--accento); }
:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }
.errore { color: var(--pericolo); margin: 12px 0 0; }
.vuoto { color: var(--tenue); padding: 40px 24px; text-align: center; margin: 0; }
.spazio { flex: 1; }
.stretto { padding: 24px; background: var(--carta); border: 1px solid var(--bordo); border-radius: 14px; box-shadow: var(--ombra); }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; font-weight: 800; font-size: 19px; color: #fff; background: #3d5afe; border-radius: 8px; }
.logo.grande { width: 64px; height: 64px; font-size: 36px; border-radius: 18px; }
.marca { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: -.01em; }

.campi { display: grid; gap: 14px; }
.campi.due { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.campi label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--tenue); }
.campi label input, .campi label select, .campi label textarea { font-weight: 400; color: var(--testo); }
.campi .largo { grid-column: 1 / -1; }
.spunta { display: flex !important; align-items: center; gap: 9px; align-self: end; padding-bottom: 9px; white-space: nowrap; }

/* accesso: a sinistra la vetrina, a destra il modulo */
.accesso { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.vetrina { display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 56px clamp(32px, 7vw, 96px); color: #fff;
  background: radial-gradient(900px 500px at 15% 10%, #4f6dff 0%, transparent 60%), radial-gradient(700px 500px at 90% 95%, #7a3cff 0%, transparent 55%), #0d1326; }
.vetrina .logo { background: rgb(255 255 255 / .16); box-shadow: none; backdrop-filter: blur(6px); }
.vetrina .slogan { margin: 0; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; font-weight: 700; letter-spacing: -.03em; }
.vetrina ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: rgb(255 255 255 / .82); font-size: 15.5px; }
.vetrina li { display: flex; gap: 12px; align-items: center; }
.vetrina li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #9fb2ff; box-shadow: 0 0 0 4px rgb(159 178 255 / .2); }
.accesso form { align-self: center; justify-self: center; width: min(400px, 100%); margin: 32px; padding: 36px; background: var(--carta); border: 1px solid var(--bordo); border-radius: 18px; box-shadow: var(--ombra); }
.motto { margin: 0 0 24px; color: var(--tenue); }
.accesso .primario { width: 100%; margin-top: 20px; padding: 11px; }

/* programma: barra scura a sinistra, lavoro a destra */
.app { height: 100%; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
aside { display: flex; flex-direction: column; min-height: 0; background: var(--barra); color: var(--barra-testo); }
aside .marca { padding: 20px 20px 14px; color: #fff; }
nav { flex: 1; overflow: auto; padding: 0 12px 16px; scrollbar-width: thin; scrollbar-color: #2a3350 transparent; }
/* i quattro tasti grandi in cima, come nel programma */
nav .rapido { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; margin: 0 0 8px; padding: 8px 12px; font-size: 16px; font-weight: 650; color: #fff; border: 0; border-radius: 6px; }
nav .rapido:hover:not(:disabled) { color: #fff; border: 0; filter: brightness(1.12); }
nav .rapido .icona { width: 20px; height: 20px; color: #fff; background: none; }
nav hr { height: 1px; margin: 6px 0 10px; border: 0; background: rgb(255 255 255 / .25); }
nav .gruppo { margin: 14px 6px 6px; font-size: 11px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--barra-tenue); }
nav details { margin-bottom: 2px; }
nav summary { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 0; font-weight: 600; color: #fff; list-style: none; cursor: pointer; border-radius: 6px; transition: background .15s; }
nav summary::-webkit-details-marker { display: none; }
nav summary::after { content: "›"; margin-left: auto; padding-right: 6px; font-size: 15px; font-weight: 700; color: #fff; }
nav details[open] > summary::after { content: "⌄"; }
nav summary:hover { background: var(--barra-attiva); }
.icona { display: grid; place-items: center; width: 26px; height: 26px; padding: 4px; flex: none; color: #fff; background: var(--tinta, #64748b); border-radius: 7px; }
nav .voci { margin-left: 12px; padding-left: 2px; border-left: 3px solid var(--tinta, #64748b); }
nav .voci button { display: block; width: 100%; margin: 1px 0; padding: 7px 10px 7px 38px; font-weight: 450; text-align: left; color: var(--barra-testo); border: 0; background: none; border-radius: 8px; }
nav .voci button:hover:not(:disabled) { color: #fff; background: var(--barra-attiva); border: 0; }
nav .voci button:disabled { color: var(--barra-tenue); opacity: .55; }
nav .voci .attiva, nav .voci .attiva:hover:not(:disabled) { color: #fff; font-weight: 650; background: #3d5afe; }

.corpo { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; }
header { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--sfondo); border-bottom: 1px solid var(--bordo); }
header .tasto-tema, header .tasto-esci { color: #fff; border: 0; border-radius: 5px; font-weight: 600; }
header .tasto-tema, header .tasto-tema:hover:not(:disabled) { background: #4b5563; }
header .tasto-esci, header .tasto-esci:hover:not(:disabled) { background: #64748b; }
header .tasto-tema:hover:not(:disabled), header .tasto-esci:hover:not(:disabled) { filter: brightness(1.12); border: 0; }
.scelta-tema { position: relative; }
.tendina-tema { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; display: grid; min-width: 180px; padding: 4px; background: var(--carta); border: 1px solid var(--bordo); border-radius: 8px; box-shadow: var(--ombra); }
.tendina-tema button { display: grid; grid-template-columns: 18px 1fr; gap: 6px; text-align: left; border: 0; background: none; font-weight: 450; }
.titolo { font-size: 21px; font-weight: 600; }
.utente { display: flex; align-items: center; gap: 8px; font-weight: 550; }
.iniziale { display: grid; place-items: center; width: 30px; height: 30px; font-size: 13px; font-weight: 700; color: var(--accento); background: var(--accento-tenue); border-radius: 50%; }
header small { color: var(--tenue); }
section { overflow: auto; padding: 24px 28px 32px; }
.benvenuto { display: grid; justify-items: center; gap: 10px; padding: 12vh 24px; text-align: center; color: var(--tenue); }
.benvenuto h2 { margin-top: 10px; font-size: 28px; color: var(--testo); }

.barra { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.barra input { max-width: 340px; }
.barra input[type=search] { padding-left: 38px; background: var(--carta) no-repeat 13px 50% / 16px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); }
.griglia { overflow: auto; background: var(--carta); border: 1px solid var(--bordo); border-radius: 14px; box-shadow: var(--ombra); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--bordo); }
th { position: sticky; top: 0; background: var(--testa); font-weight: 650; color: var(--testa-testo); border-right: 1px solid rgb(128 128 128 / .25); }
td { border-right: 1px solid rgb(128 128 128 / .14); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr[tabindex] { cursor: pointer; transition: background .12s; }
tbody tr[tabindex]:hover { background: var(--accento-tenue); }
td:first-child { font-weight: 600; }
.azioni { text-align: right; }
.azioni button + button { margin-left: 8px; }
.azioni button { padding: 6px 12px; font-size: 13px; }

/* la scheda entra da destra, a tutta altezza */
dialog { width: min(640px, 100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0 0 0 auto; padding: 0; color: var(--testo); background: var(--carta); border: 0; border-left: 1px solid var(--bordo); box-shadow: -24px 0 60px -30px rgb(0 0 0 / .45); }
dialog[open] { animation: entra .22s cubic-bezier(.2, .8, .2, 1); }
dialog::backdrop { background: rgb(13 19 38 / .45); backdrop-filter: blur(3px); }
dialog form { display: flex; flex-direction: column; min-height: 100%; padding: 28px; }
dialog h2 { margin-bottom: 20px; }
dialog .barra { position: sticky; bottom: -28px; margin: auto -28px -28px; padding: 16px 28px; background: var(--carta); border-top: 1px solid var(--bordo); }
dialog .campi + .errore { margin-bottom: 16px; }
dialog .qr, dialog code { justify-self: center; }
.qr { justify-self: center; background: #fff; padding: 8px; border-radius: 12px; line-height: 0; }
@keyframes entra { from { transform: translateX(40px); opacity: 0; } }

/* magazzino: testata del documento, ricerca con esiti sotto il campo, colonne di numeri */
.campi.tre { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.documento > .cerca { max-width: 520px; margin-bottom: 14px; }
.cerca { position: relative; display: grid; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--tenue); }
.cerca input, .scelto { font-weight: 400; color: var(--testo); }
.scelto { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esiti { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 6px; list-style: none; background: var(--carta); border: 1px solid var(--bordo); border-radius: 12px; box-shadow: var(--ombra); }
.esiti button { display: block; width: 100%; padding: 8px 10px; text-align: left; font-weight: 400; color: var(--testo); background: none; border: 0; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esiti button:hover, .esiti button:focus { background: var(--accento-tenue); border: 0; }
.esiti small { color: var(--tenue); }
.destra { text-align: right; font-variant-numeric: tabular-nums; }
input.corto { width: 110px; padding: 6px 9px; text-align: right; }
tfoot td { font-weight: 650; background: var(--riga); border-top: 1px solid var(--bordo); border-bottom: 0; }
tr.allarme td { color: var(--pericolo); }
tr.annullato td { color: var(--tenue); text-decoration: line-through; }
tr.annullato .azioni { text-decoration: none; }
.nota { margin: 12px 2px 0; font-size: 13px; color: var(--tenue); }
.inlinea { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tenue); white-space: nowrap; }
.barra.filtri { flex-wrap: wrap; }
.barra.filtri input[type=search] { max-width: 220px; }
.documento .barra { margin: 16px 0 0; }
td.lungo { white-space: normal; min-width: 200px; }
.barra select, .barra input[type=date] { width: auto; }
.esiti.larghi { min-width: 420px; }
.documento > .barra:not(:last-child) { margin: 0 0 14px; }
.documento .campi .largo { grid-column: 1 / -1; }
/* il foglio di stampa: a video non c'e', in stampa resta solo lui */
.foglio { display: none; color: #000; font-size: 12px; }
.foglio .testa { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.foglio .testa > div { display: grid; align-content: start; gap: 2px; }
.foglio h1 { font-size: 18px; margin: 0; }
.foglio .riquadro { padding: 8px 10px; border: 1px solid #000; border-radius: 4px; min-height: 44px; }
.foglio small { font-size: 10px; text-transform: uppercase; color: #444; }
.foglio .firme { grid-template-columns: 1fr 1fr 1fr; margin-top: 24px; }
.foglio .firme .riquadro { min-height: 60px; }
.foglio .totale { margin-top: 10px; text-align: right; font-weight: 700; }
/* le pagine di soli campi prendono tutta la larghezza, a tre colonne */
.stretto .campi:not(.due) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stretto .campi.due { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stretto .campi label:has(textarea) { grid-column: 1 / -1; }
.stretto .cerca { max-width: 520px; }
@media print {
  aside, header, .barra, .azioni, .nota { display: none !important; }
  html, body { background: #fff !important; }
  .app { display: block; height: auto; }
  section { overflow: visible; padding: 0; }
  .griglia { overflow: visible; border: 0; box-shadow: none; }
  th { position: static; }
  th, td { padding: 4px 8px; white-space: normal; }
  section.confoglio > *:not(.foglio) { display: none !important; }
  .foglio { display: block; }
  .foglio th, .foglio td { border-bottom: 1px solid #999; }
}

@media (max-width: 860px) {
  .accesso { grid-template-columns: 1fr; }
  .vetrina { padding: 32px; gap: 16px; }
  .vetrina ul { display: none; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  aside nav { max-height: 34vh; }
  .campi.due, .campi.tre, .stretto .campi:not(.due), .stretto .campi.due { grid-template-columns: 1fr; }
  header { padding: 12px 16px; flex-wrap: wrap; }
  section { padding: 16px; }
}

/* le pagine di lavoro dal browser (web.js) */
#web .barra { flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 12px 14px; border: 1px solid #8080805c; border-radius: 8px; background: #80808014; margin-bottom: 12px; }
#web .barra.piede { margin-top: 12px; }
#web .barra:empty { display: none; }
#web label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
#web label.spunta { flex-direction: row; align-items: center; gap: 6px; }
#web .griglia4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 14px; width: 100%; }
#web .griglia4 .largo { grid-column: span 2; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
#web .scorre { overflow: auto; max-height: 62vh; border: 1px solid #8080805c; border-radius: 8px; }
table.lista { width: 100%; border-collapse: collapse; }
table.lista th { position: sticky; top: 0; background: var(--testa); color: var(--testa-testo); font-weight: 650; text-align: left; padding: 7px 9px; border-bottom: 1px solid #667; white-space: nowrap; z-index: 1; }
table.lista td { padding: 6px 9px; border-bottom: 1px solid #8080803d; border-right: 1px solid #80808024; }
table.lista tbody tr:nth-child(even) td { background: #8080801c; }
table.lista tbody tr:hover td { background: #2f6fed1f; }
table.lista tr.scelta td { background: #2f6fed38 !important; }
table.lista tr.reso td { color: #b42318; }
table.lista .d { text-align: right; white-space: nowrap; }
table.lista .vuota { text-align: center; padding: 22px; opacity: .7; }
table.lista input.cella { width: 100%; min-width: 70px; padding: 4px 6px; margin: 0; }
table.lista input.cella.s { min-width: 180px; }
.cercatore { position: relative; display: block; }
.cercatore input { width: 100%; min-width: 260px; }
.trovati { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px; list-style: none; background: Canvas; color: CanvasText; border: 1px solid #8080808c; border-radius: 8px; box-shadow: 0 8px 24px #0003; max-height: 320px; overflow: auto; }
.trovati li { padding: 7px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.trovati li:hover { background: #2f6fed2e; }
.trovati li.nuovo { font-weight: 600; border-top: 1px solid #8080805c; }
.tessere { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 14px; }
.tessera { min-width: 150px; padding: 10px 14px; border: 1px solid #8080805c; border-radius: 10px; background: #80808014; display: flex; flex-direction: column; gap: 3px; }
.tessera b { font-size: 19px; }
#web h3 { margin: 16px 0 8px; font-size: 15px; }
#web .due { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#web .tot, #web .totale { font-weight: 700; font-size: 16px; margin-left: auto; }
#web .spiega, dialog.chiedi .spiega { max-width: 900px; opacity: .85; margin: 0 0 12px; white-space: pre-wrap; }
#web .avviso { padding: 9px 12px; border-radius: 8px; background: #2f6fed1f; border: 1px solid #2f6fed59; margin: 0 0 12px; white-space: pre-wrap; }
#web .modulo { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px 18px; max-width: 1100px; }
#web textarea { width: 100%; }
dialog.chiedi { width: min(680px, 94vw); padding: 22px; border-radius: 12px; }
dialog.chiedi.largo { width: min(1100px, 96vw); }
dialog.chiedi .campi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 14px; }
dialog.chiedi label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
body.attesa, body.attesa * { cursor: progress !important; }
@media (max-width: 800px) { #web .due, dialog.chiedi .campi { grid-template-columns: 1fr; } }

/* tasti: colore e icona da quello che fanno, come nel programma per Windows (li mette web.js) */
button[data-tinta] { color: #fff; border-color: transparent; background: var(--tinta); box-shadow: none; }
button[data-tinta]:hover:not(:disabled) { background: var(--tinta); border-color: transparent; filter: brightness(1.12); }
button[data-tinta]:disabled { opacity: .45; }
button[data-tinta=rosso] { --tinta: #C62828; } button[data-tinta=grigio] { --tinta: #64748B; } button[data-tinta=verde] { --tinta: #1E8E3E; }
button[data-tinta=viola] { --tinta: #7C3AED; } button[data-tinta=arancio] { --tinta: #C2620A; } button[data-tinta=blu] { --tinta: #2563EB; } button[data-tinta=ardesia] { --tinta: #475569; }
button[data-ico]::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 7px; vertical-align: -3px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
button[data-ico=salva] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h11l3 3v15H5zM8 3v5h7M8 21v-7h8v7'/%3E%3C/svg%3E"); }
button[data-ico=stampa] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8V3h10v5M7 17H4v-7h16v7h-3M7 14h10v7H7z'/%3E%3C/svg%3E"); }
button[data-ico=elimina] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 14h10l1-14'/%3E%3C/svg%3E"); }
button[data-ico=annulla] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
button[data-ico=indietro] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E"); }
button[data-ico=email] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18v12H3zM3 7l9 7 9-7'/%3E%3C/svg%3E"); }
button[data-ico=esporta] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 20h16'/%3E%3C/svg%3E"); }
button[data-ico=carrello] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h3l2 11h10l2-8H7M9 20h.01M17 20h.01'/%3E%3C/svg%3E"); }
button[data-ico=documento] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6zM14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E"); }
button[data-ico=cerca] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4a7 7 0 1 0 0 14a7 7 0 0 0 0-14zM16 16l5 5'/%3E%3C/svg%3E"); }
button[data-ico=nuovo] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
button[data-ico=aggiorna] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14-5L4 8M4 4v4h4M4 13a8 8 0 0 0 14 5l2-2M20 20v-4h-4'/%3E%3C/svg%3E"); }
button[data-ico=pausa] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5v14M16 5v14'/%3E%3C/svg%3E"); }
button[data-ico=copia] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 8h11v12H8zM5 16V4h11'/%3E%3C/svg%3E"); }
button[data-ico=conferma] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }
button[data-ico=collega] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7H6a5 5 0 0 0 0 10h3M15 7h3a5 5 0 0 1 0 10h-3M8 12h8'/%3E%3C/svg%3E"); }

/* ruoli (Configurazione, Utenti) */
details.ruolo { border: 1px solid var(--bordo, #cbd5e1); border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
details.ruolo summary { cursor: pointer; padding: 4px 0; }
.voci-ruolo { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 16px; margin: 10px 0; }
h3.sezione { margin: 26px 0 6px; }
p.spiega { opacity: .85; max-width: 900px; }

/* la colonna delle caselle per scegliere più righe */
table.lista th.spunte, table.lista td.spunte { width: 34px; text-align: center; padding-left: 4px; padding-right: 4px; }
/* gli ordini arrivati dal sito */
table.lista tr.dal-sito td { background: rgba(139, 92, 246, .18); }
table.lista tr.dal-sito.scelta td { background: rgba(139, 92, 246, .38); }

/* i componenti di un prodotto composto, sotto la sua riga */
table.lista tr.componente td { color: #64748b; font-size: .95em; }

/* numeri grandi colorati e grafico a barre, come nel programma */
.tessera.colore { min-width: 168px; max-width: 270px; padding: 10px 16px 12px; color: #fff; border: 0; }
.tessera.colore small { font-size: 11.5px; font-weight: 600; opacity: .9; }
.tessera.colore b { font-size: 24px; }
.tessera.colore span { font-size: 12px; opacity: .9; }
.grafico { display: grid; gap: 2px; margin: 0 0 16px; padding: 12px 14px 8px; border: 1px solid #80808059; border-radius: 8px; }
.grafico > small { margin-bottom: 8px; color: var(--tenue); }
.grafico .barre { display: flex; overflow-x: auto; padding-bottom: 8px; }
.grafico .punto { display: grid; justify-items: center; margin-right: 10px; }
.grafico .coppia { display: flex; align-items: flex-end; height: 150px; }
.grafico .coppia span { width: 13px; margin: 0 1px; border-radius: 3px 3px 0 0; }
.grafico .punto small { margin-top: 4px; font-size: 11px; white-space: nowrap; }
.affiancate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
@media (max-width: 1100px) { .affiancate { grid-template-columns: 1fr; } }
nav .rapido .icona { padding: 0; }
[data-tinta="ardesia"] { background: #475569 !important; border-color: #475569 !important; color: #fff !important; }
