/* CGFA Converter — guscio Windows 11 (mica, rail, livelli a 8 px) e casellario postale: ogni famiglia di file ha la sua casella col cartellino. */
:root {
  color-scheme: light;
  --fondo: #eceef2; --fondo2: #e3e7ee; --livello: #f7f8fa; --sup: #ffffff; --sup2: #f3f4f7; --campo: #ffffff;
  --bordo: rgba(17, 24, 39, .09); --bordo2: rgba(17, 24, 39, .16); --bordo-giu: rgba(17, 24, 39, .26);
  --testo: #17191e; --testo2: #545a66; --testo3: #6b7180;
  --acc: #1f3a68; --acc2: #2b4c84; --acc-t: #ffffff; --acc-tenue: #e6ebf4;
  --ok: #0f7a3d; --ok-f: #e4f4ea; --ko: #b42318; --ko-f: #fdecea; --lav-f: #eef2fa;
  --f-foto: #0e8f94; --f-pdf: #c2362a; --f-doc: #2563c9; --f-fogli: #1a7f45; --f-audio: #c56a0b; --f-video: #6d43c9; --f-zip: #94730f; --f-altro: #5f6673;
  --ombra1: 0 1px 2px rgba(17, 24, 39, .06); --ombra2: 0 2px 4px rgba(17, 24, 39, .06), 0 8px 18px -6px rgba(17, 24, 39, .12); --ombra3: 0 8px 16px rgba(17, 24, 39, .1), 0 32px 64px -16px rgba(17, 24, 39, .28);
  --r: 8px; --r2: 6px;
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  --font-tit: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
[data-tema="scuro"] {
  color-scheme: dark;
  --fondo: #1b1c21; --fondo2: #20232b; --livello: #23252c; --sup: #2b2d35; --sup2: #31343d; --campo: #24262d;
  --bordo: rgba(255, 255, 255, .08); --bordo2: rgba(255, 255, 255, .14); --bordo-giu: rgba(255, 255, 255, .22);
  --testo: #eceef3; --testo2: #b0b5c1; --testo3: #9ba1ae;
  --acc: #a9c1ff; --acc2: #c3d4ff; --acc-t: #0d1830; --acc-tenue: #2c3550;
  --ok: #6fd69a; --ok-f: #1d3326; --ko: #ff9a8f; --ko-f: #3d2220; --lav-f: #262d3d;
  --f-foto: #3cc3c7; --f-pdf: #f07264; --f-doc: #6f9dff; --f-fogli: #4fc283; --f-audio: #f0a24a; --f-video: #a688ff; --f-zip: #d7b44a; --f-altro: #a3aab7;
  --ombra1: 0 1px 2px rgba(0, 0, 0, .3); --ombra2: 0 2px 4px rgba(0, 0, 0, .25), 0 8px 18px -6px rgba(0, 0, 0, .45); --ombra3: 0 8px 16px rgba(0, 0, 0, .35), 0 32px 64px -16px rgba(0, 0, 0, .6);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font: 14.5px/1.5 var(--font); color: var(--testo); background: var(--fondo);
  /* mica: lo sfondo prende appena il colore dell'accento, come lo sfondo del desktop sotto Windows 11 */
  background-image: radial-gradient(90% 60% at 0% 0%, color-mix(in srgb, var(--acc) 9%, transparent), transparent 70%), radial-gradient(70% 50% at 100% 100%, color-mix(in srgb, var(--f-foto) 6%, transparent), transparent 70%);
  background-attachment: fixed;
}
::selection { background: color-mix(in srgb, var(--acc) 28%, transparent); color: var(--testo); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
input, select, textarea { caret-color: var(--acc); }
* { scrollbar-width: thin; scrollbar-color: var(--bordo-giu) transparent; }
img, svg { display: block; }
a { color: var(--acc); text-underline-offset: 3px; }
.ic { width: 20px; height: 20px; flex: none; }
.salta { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--sup); padding: 8px 12px; border-radius: var(--r2); }
.salta:focus { left: 8px; }
h1, h2, h3 { font-family: var(--font-tit); letter-spacing: -.01em; text-wrap: balance; }

/* ---------------------------------------------------------------- guscio */
.guscio { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 14px 8px 16px; }
.marchio { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; color: var(--testo); text-decoration: none; font: 600 15px var(--font-tit); }
.marchio img { border-radius: 6px; }
.rail-voci { display: grid; gap: 3px; }
.rail-voci a, .tab a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border-radius: var(--r2); color: var(--testo); text-decoration: none; font-size: 14px; transition: background .15s; }
.rail-voci a:hover { background: color-mix(in srgb, var(--testo) 6%, transparent); }
.rail-voci a.on { background: color-mix(in srgb, var(--testo) 7.5%, transparent); font-weight: 600; }
.rail-voci a.on::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 2px; background: var(--acc); }
.rail-piede { margin: auto 6px 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--r); background: color-mix(in srgb, var(--sup) 55%, transparent); border: 1px solid var(--bordo); color: var(--testo2); font-size: 12.5px; line-height: 1.35; }
.rail-piede .ic { color: var(--ok); }
.vista { min-width: 0; margin: 8px 8px 8px 0; padding: 30px clamp(18px, 3.4vw, 44px) 56px; background: color-mix(in srgb, var(--livello) 88%, transparent); border: 1px solid var(--bordo); border-radius: var(--r); box-shadow: var(--ombra1); outline: none; }
.vista.entra > * { animation: entra .42s var(--ease) both; }
@keyframes entra { from { opacity: .001; transform: translateY(8px); } }
.testa, .tab { display: none; }

/* ---------------------------------------------------------------- testate e controlli */
.tit { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin: 0 0 18px; }
.tit h1 { margin: 0; font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.15; }
.tit p { margin: 6px 0 0; color: var(--testo2); max-width: 64ch; }
.briciole a { display: inline-flex; align-items: center; gap: 4px; margin: -8px 0 10px -6px; padding: 4px 8px; border-radius: var(--r2); color: var(--testo2); text-decoration: none; font-size: 13.5px; }
.briciole a:hover { background: color-mix(in srgb, var(--testo) 6%, transparent); color: var(--testo); }
.briciole .ic { width: 16px; height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: var(--r2); border: 1px solid var(--bordo2); border-bottom-color: var(--bordo-giu); background: var(--sup); color: var(--testo); font: 500 14px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: var(--sup2); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }
.btn.acc { background: var(--acc); color: var(--acc-t); border-color: transparent; border-bottom-color: rgba(0, 0, 0, .25); }
.btn.acc:hover { background: var(--acc2); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--testo2); }
.btn.quiet:hover { background: color-mix(in srgb, var(--testo) 6%, transparent); color: var(--testo); }
.btn.grande { min-height: 42px; padding: 0 20px; font-size: 15px; }
.btn.piccolo { min-height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.piccolo .ic { width: 16px; height: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r2); background: transparent; color: var(--testo2); cursor: pointer; }
.btn-ic:hover { background: color-mix(in srgb, var(--testo) 7%, transparent); color: var(--testo); }
.btn-ic:disabled { opacity: .35; cursor: default; background: none; }
.btn-ic .ic { width: 17px; height: 17px; }
.lnk { border: 0; background: none; padding: 0; color: var(--acc); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
select, input[type="text"], input[type="number"], input:not([type]) { font: inherit; min-height: 34px; padding: 4px 10px; border-radius: var(--r2); border: 1px solid var(--bordo2); border-bottom-color: var(--bordo-giu); background: var(--campo); color: var(--testo); max-width: 100%; }
select:focus, input:focus { outline: none; border-bottom: 2px solid var(--acc); padding-bottom: 3px; }
.campo { display: grid; gap: 5px; font-size: 13px; color: var(--testo2); }
.campo span { font-weight: 600; }
.spunta { display: flex; align-items: center; gap: 10px; font-size: 13.5px; cursor: pointer; align-self: end; min-height: 34px; }
.spunta input { width: 18px; height: 18px; accent-color: var(--acc); margin: 0; }
.nota { color: var(--testo3); font-size: 13px; margin: 10px 0 0; max-width: 72ch; }
.pannello { background: var(--sup); border: 1px solid var(--bordo); border-radius: var(--r); box-shadow: var(--ombra1); padding: 18px 20px; }
.pannello h2 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 600; }

/* ---------------------------------------------------------------- privacy */
.privacy { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 10px 14px; border-radius: var(--r); background: var(--ok-f); color: var(--testo); font-size: 13.5px; }
.privacy .ic { color: var(--ok); width: 22px; height: 22px; }

/* ---------------------------------------------------------------- il casellario */
.casellario { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px; border-radius: 10px; background: color-mix(in srgb, var(--testo) 5%, var(--livello)); border: 1px solid var(--bordo); transition: outline-color .2s; outline: 2px dashed transparent; outline-offset: 4px; }
.casella { --fam: var(--f-altro); position: relative; display: grid; gap: 8px; padding: 8px 8px 10px; border-radius: var(--r); border: 1px solid var(--bordo); background: var(--sup); color: var(--testo); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--ombra1); transition: transform .25s var(--ease), box-shadow .25s, border-color .2s; }
.casella:hover { box-shadow: var(--ombra2); transform: translateY(-1px); }
/* il vano: la profondità della casella, con l'ombra in alto come in un casellario di legno */
.vano { position: relative; display: grid; place-items: center; height: 82px; border-radius: 5px; color: var(--fam); background: color-mix(in srgb, var(--fam) 9%, var(--sup2)); box-shadow: inset 0 12px 14px -12px rgba(0, 0, 0, .32), inset 0 0 0 1px color-mix(in srgb, var(--fam) 14%, transparent); transition: background .25s, height .35s var(--ease); }
.vano .ic { width: 30px; height: 30px; stroke-width: 1.5; transition: transform .35s var(--ease); }
.conta { position: absolute; right: 8px; bottom: 6px; font: 600 1.3rem/1 var(--font-tit); font-variant-numeric: tabular-nums; color: var(--testo); }
/* il cartellino nel suo portacartellino: filo scuro, due ribattini, banda del colore della famiglia */
.cartellino { position: relative; display: grid; gap: 1px; padding: 7px 12px 7px; border-radius: 3px; background: linear-gradient(var(--fam) 0 3px, var(--sup) 3px); border: 1px solid color-mix(in srgb, var(--testo) 34%, transparent); }
.cartellino::before, .cartellino::after { content: ""; position: absolute; top: 50%; width: 4px; height: 4px; margin-top: -1px; border-radius: 50%; background: color-mix(in srgb, var(--testo) 38%, transparent); }
.cartellino::before { left: 3px; } .cartellino::after { right: 3px; }
.cartellino small { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--testo2); }
.cartellino strong { font: 600 14px/1.25 var(--font-tit); }
.cartellino em { font-style: normal; font-size: 12px; line-height: 1.35; color: var(--testo2); }
.casella.ha .vano { background: color-mix(in srgb, var(--fam) 20%, var(--sup2)); }
.casella.on { border-color: var(--fam); box-shadow: 0 0 0 1px var(--fam), var(--ombra2); }
.casella.attende { transform: translateY(-3px); border-color: var(--fam); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fam) 55%, transparent), var(--ombra2); }
.casella.attende .vano { background: color-mix(in srgb, var(--fam) 26%, var(--sup2)); }
.casella.attende .vano .ic { transform: translateY(4px) scale(1.1); }
.casella.arriva .vano { animation: arriva .5s var(--ease); }
@keyframes arriva { 30% { transform: scale(.96); box-shadow: inset 0 18px 18px -12px rgba(0, 0, 0, .4); } }
.trascina .casellario { outline-color: color-mix(in srgb, var(--acc) 55%, transparent); }
.casellario.pieno .vano { height: 54px; }
.casellario.pieno .cartellino em { display: none; }
.volo { position: fixed; left: 0; top: 0; z-index: 90; display: flex; align-items: center; gap: 8px; max-width: 240px; padding: 7px 11px; border-radius: var(--r2); border: 1px solid var(--fam); background: var(--sup); box-shadow: var(--ombra3); font-size: 13px; pointer-events: none; will-change: transform, opacity; }
.volo .ic { color: var(--fam); width: 18px; height: 18px; }
.volo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- la coda */
#coda { margin-top: 18px; display: grid; gap: 14px; }
.vuoto { margin: 4px 0 0; padding: 14px 4px; color: var(--testo2); }
.coda-barra { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 12px 10px 16px; border-radius: var(--r); background: color-mix(in srgb, var(--sup) 82%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--bordo); box-shadow: var(--ombra2); }
.coda-barra p { margin: 0; color: var(--testo2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.coda-barra p b { color: var(--testo); }
.coda-az { display: flex; flex-wrap: wrap; gap: 8px; }
.coda-zip { margin: 0; text-align: center; font-size: 13.5px; }
.gruppo { --fam: var(--f-altro); background: var(--sup); border: 1px solid var(--bordo); border-radius: var(--r); box-shadow: var(--ombra1); overflow: hidden; }
.gruppo-testa { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-bottom: 1px solid var(--bordo); background: color-mix(in srgb, var(--fam) 5%, var(--sup)); }
.g-cart { display: grid; padding: 3px 10px 4px; border-radius: 3px; background: linear-gradient(var(--fam) 0 3px, var(--sup) 3px); border: 1px solid color-mix(in srgb, var(--testo) 34%, transparent); line-height: 1.2; }
.g-cart small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--testo2); }
.g-cart strong { font: 600 13.5px var(--font-tit); }
.g-n { color: var(--testo2); font-size: 13px; font-variant-numeric: tabular-nums; }
.arrivi { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.arrivi-uno { margin-left: auto; color: var(--testo2); font-size: 13px; }
.chip { min-height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--bordo2); background: var(--sup); color: var(--testo); font: 500 13px var(--font); cursor: pointer; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--fam); }
.chip.on { background: color-mix(in srgb, var(--fam) 15%, var(--sup)); border-color: var(--fam); box-shadow: inset 0 0 0 1px var(--fam); font-weight: 650; }
.gruppo-testa > .btn { margin-left: 0; }
.opz-pannello { padding: 14px 16px 16px; border-bottom: 1px solid var(--bordo); background: var(--sup2); }
.opz-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; }
.righe { list-style: none; margin: 0; padding: 0; }
.riga { display: grid; grid-template-columns: 44px minmax(0, 1.4fr) minmax(120px, auto) minmax(0, 1.5fr) 32px; align-items: center; gap: 4px 14px; padding: 9px 10px 9px 14px; border-top: 1px solid var(--bordo); transition: background .3s; }
.riga:first-child { border-top: 0; }
.riga.st-lavoro { background: var(--lav-f); }
.riga.st-pronto { background: color-mix(in srgb, var(--ok-f) 60%, var(--sup)); }
.riga.st-errore { background: color-mix(in srgb, var(--ko-f) 70%, var(--sup)); }
.r-anteprima { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r2); overflow: hidden; background: color-mix(in srgb, var(--fam) 10%, var(--sup2)); color: var(--fam); }
.r-anteprima img { width: 100%; height: 100%; object-fit: cover; }
.r-nome { display: grid; min-width: 0; }
.r-nome b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-nome small { color: var(--testo3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.r-verso { display: flex; align-items: center; gap: 8px; }
.r-verso .freccia { width: 16px; height: 16px; color: var(--testo3); }
.verso { min-width: 104px; }
.verso-fisso { font-weight: 600; }
.r-stato { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; min-width: 0; }
.st .ic { width: 17px; height: 17px; }
.st-attesa { color: var(--testo3); }
.st-ok { color: var(--ok); font-weight: 600; font-variant-numeric: tabular-nums; }
.st-ok > span { display: grid; }
.st-errore { color: var(--ko); align-items: flex-start; }
.st-errore .ic { margin-top: 1px; }
.st-lavoro { display: grid; gap: 4px; width: 100%; color: var(--testo2); }
.nota-r { font-weight: 400; color: var(--testo2); }
.barra { display: block; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--testo) 10%, transparent); overflow: hidden; min-width: 120px; }
.barra i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: 3px; background: var(--acc); transition: width .25s linear; }
.esiti { grid-column: 2 / -1; list-style: none; margin: 4px 0 2px; padding: 6px 0 0; border-top: 1px dashed var(--bordo2); display: grid; gap: 2px; max-height: 280px; overflow: auto; }
.esiti[hidden] { display: none; }
.esiti li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.esiti li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esiti li small { color: var(--testo3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- strumenti PDF, Altro */
.elenco-strum, .menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.elenco-strum { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 6px; }
.elenco-strum a, .menu a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; border-radius: var(--r); background: var(--sup); border: 1px solid var(--bordo); color: var(--testo); text-decoration: none; transition: background .15s; }
.elenco-strum a:hover, .menu a:hover { background: var(--sup2); }
.es-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--r); background: var(--acc-tenue); color: var(--acc); }
.es-t { display: grid; flex: 1; min-width: 0; }
.es-t b { font-weight: 600; }
.es-t small { color: var(--testo2); font-size: 13px; }
.freccia { width: 16px; height: 16px; color: var(--testo3); }
.funz a { align-items: flex-start; }
.altro-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 18px; align-items: start; }
.menu a { min-height: 58px; border-radius: 4px; }
.menu li:first-child a { border-radius: var(--r) var(--r) 4px 4px; }
.menu li:last-child a { border-radius: 4px 4px var(--r) var(--r); }
.menu li:only-child a { border-radius: var(--r); }
.credit { margin: 28px 0 0; text-align: center; color: var(--testo3); font-size: 13px; }
.credit a { color: var(--testo2); }
.piede-admin { margin-top: 6px; font-size: 12px; }
.strum { display: grid; gap: 14px; max-width: 920px; }
.zona { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px; padding: 30px 16px; border-radius: var(--r); border: 1.5px dashed var(--bordo-giu); background: var(--sup2); text-align: center; }
.zona p { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--testo2); }
.zona.compatta { padding: 12px 16px; }
.trascina .zona { border-color: var(--acc); background: var(--acc-tenue); }
.sf-lista, .sf-esiti { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.sf-lista:empty, .sf-esiti:empty { display: none; }
.sf-lista li, .sf-esiti li { --fam: var(--f-pdf); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: var(--r2); background: var(--sup); border: 1px solid var(--bordo); }
.sf-lista .r-nome, .sf-esiti .r-nome { flex: 1; }
.sf-esiti .tutti { justify-content: flex-end; background: none; border: 0; }
.strum-az { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.strum-az .st { min-width: 240px; flex: 1; display: grid; gap: 4px; }
.strum-az .st:has(.ic) { display: inline-flex; color: var(--ok); font-weight: 600; }
.strum-az .st.st-errore { color: var(--ko); }

/* formati */
.formati { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-bottom: 16px; }
.f-scheda { --fam: var(--f-altro); background: var(--sup); border: 1px solid var(--bordo); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--ombra1); }
.f-scheda header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--fam); }
.f-scheda header .ic { width: 26px; height: 26px; }
.f-scheda dl { margin: 0; display: grid; gap: 8px; }
.f-scheda dt { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--testo3); margin-bottom: 3px; }
.f-scheda dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.fmt { padding: 1px 7px; border-radius: 4px; background: var(--sup2); border: 1px solid var(--bordo); font-size: 12px; font-variant-numeric: tabular-nums; }
.fmt-a { background: color-mix(in srgb, var(--fam) 12%, var(--sup)); border-color: color-mix(in srgb, var(--fam) 35%, transparent); font-weight: 600; }
.note-formati ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; max-width: 80ch; }
.scroll { overflow-x: auto; }
.tab { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tab th, .tab td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--bordo); vertical-align: top; }
.tab th { font-size: 12px; color: var(--testo3); font-weight: 600; }
.legale { max-width: 80ch; }
.legale p { margin: 0 0 12px; }
code { font: 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* ---------------------------------------------------------------- finestre e avvisi */
.dlg { border: 1px solid var(--bordo2); border-radius: var(--r); padding: 0; background: var(--sup); color: var(--testo); box-shadow: var(--ombra3); width: min(460px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(10, 12, 18, .38); }
.dlg[open] { animation: dlg .28s var(--ease); }
@keyframes dlg { from { opacity: 0; transform: scale(1.04); } }
.dlg-in { padding: 24px; }
.dlg h2 { margin: 10px 0 8px; font-size: 1.25rem; font-weight: 600; }
.dlg p { margin: 0 0 10px; color: var(--testo2); }
.dlg-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); background: var(--acc-tenue); color: var(--acc); }
.dlg-ic .ic { width: 24px; height: 24px; }
.dlg-az { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: 20px -24px -24px; padding: 16px 24px; background: var(--sup2); border-top: 1px solid var(--bordo); border-radius: 0 0 var(--r) var(--r); }
.dlg .lista { margin: 0; padding-left: 18px; color: var(--testo2); display: grid; gap: 6px; }
.dlg .err { color: var(--ko); min-height: 1.2em; margin: 6px 0 0; }
.punti { display: flex; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.punti li { width: 6px; height: 6px; border-radius: 3px; background: var(--bordo-giu); transition: width .3s var(--ease); }
.punti li.on { width: 20px; background: var(--acc); }
.avviso { position: fixed; left: 50%; bottom: 24px; z-index: 100; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: var(--r); background: var(--sup); color: var(--testo); border: 1px solid var(--bordo2); box-shadow: var(--ombra3); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .25s, transform .35s var(--ease); font-size: 14px; }
.avviso.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- tablet e telefono */
@media (max-width: 1180px) { .riga { grid-template-columns: 44px minmax(0, 1fr) auto 32px; } .r-stato { grid-column: 2 / 4; } .riga .btn-ic { grid-row: 1; grid-column: 4; } }
@media (max-width: 900px) {
  .guscio { display: block; }
  .rail { display: none; }
  .testa { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--fondo) 80%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .testa .marchio { padding: 0; }
  .vista { margin: 0 8px; padding: 18px 14px 96px; }
  .tab { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--sup) 88%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border-top: 1px solid var(--bordo); }
  .tab a { flex-direction: column; gap: 2px; min-height: 52px; padding: 4px; justify-content: center; font-size: 11.5px; color: var(--testo2); }
  .tab a.on { color: var(--acc); font-weight: 600; }
  .tab a.on .ic { stroke-width: 2; }
  .casellario { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px; }
  .vano { height: 62px; }
  .cartellino em { display: none; }
  .casellario.pieno { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .casellario.pieno .casella { padding: 5px; gap: 5px; }
  .casellario.pieno .vano { height: 44px; }
  .casellario.pieno .vano .ic { width: 22px; height: 22px; }
  .casellario.pieno .conta { font-size: 1rem; right: 5px; bottom: 3px; }
  .casellario.pieno .cartellino { padding: 4px 6px; }
  .casellario.pieno .cartellino::before, .casellario.pieno .cartellino::after, .casellario.pieno .cartellino small { display: none; }
  .casellario.pieno .cartellino strong { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .avviso { bottom: 84px; }
  .btn { min-height: 40px; }
  .chip { min-height: 34px; }
}
@media (max-width: 560px) {
  .tit .tit-az, .tit .tit-az .btn { width: 100%; }
  .riga { grid-template-columns: 40px minmax(0, 1fr) 32px; padding: 10px; }
  .r-anteprima { width: 40px; height: 40px; }
  .r-verso { grid-column: 2 / 4; grid-row: 2; }
  .r-stato { grid-column: 1 / -1; grid-row: 3; }
  .riga .btn-ic { grid-column: 3; grid-row: 1; }
  .gruppo-testa .arrivi { margin-left: 0; width: 100%; }
  .coda-barra { top: 62px; }
  .coda-az .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .rail, .tab, .testa, .coda-barra { display: none; } .vista { margin: 0; border: 0; box-shadow: none; } }
