/* Stile minimale, leggibile e senza dipendenze esterne */
:root { --b: #1a5fb4; --g: #f4f5f7; --t: #1f2328; --m: #6b7280; }
* { box-sizing: border-box; }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--t); margin: 0 auto; padding: 20px; max-width: 1200px; }
header { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--b); margin-bottom: 16px; }
h1 { font-size: 20px; margin: 0 0 8px; }
nav a { margin-left: 14px; color: var(--m); text-decoration: none; }
nav a.on { color: var(--b); font-weight: 600; }
.cerca { display: flex; gap: 8px; margin-bottom: 16px; }
.cerca input { flex: 1; font-size: 16px; padding: 9px 11px; }
input, select, button { font: inherit; padding: 7px 9px; border: 1px solid #c9ccd1; border-radius: 6px; }
button { background: var(--b); color: #fff; border-color: var(--b); cursor: pointer; }
button.link { background: none; color: #b42318; border: 0; padding: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
th { background: var(--g); font-weight: 600; position: sticky; top: 0; }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
small { color: var(--m); }
.promo { background: #fff4ce; color: #7a5b00; font-size: 11px; padding: 1px 5px; border-radius: 4px; }
.fonte { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #e8f0fe; color: var(--b); }
.fonte.manuale { background: #eef7ee; color: #23692b; }
.vuoto, .info { color: var(--m); }
.scheda { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; background: var(--g); padding: 14px; border-radius: 8px; margin-bottom: 18px; }
.scheda label { display: flex; flex-direction: column; font-size: 12px; color: var(--m); gap: 3px; }
.scheda .largo { grid-column: 1 / -1; }
.scheda .azioni { display: flex; gap: 12px; align-items: center; }
td.az { white-space: nowrap; }
td.az form { display: inline; margin-left: 8px; }
footer { margin-top: 18px; color: var(--m); font-size: 12px; }

/* Scelta del prodotto e viste per prodotto */
h1 a { color: inherit; text-decoration: none; }
h2 { font-size: 17px; margin: 22px 0 8px; }
h2 small { font-weight: 400; }
s { color: var(--m); font-size: 12px; }
.schede { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; }
.scheda-prod { display: flex; flex-direction: column; gap: 6px; padding: 22px 18px; border: 1px solid #d8dbe0; border-radius: 10px; text-decoration: none; color: var(--t); background: #fff; transition: border-color .15s, box-shadow .15s; }
.scheda-prod strong { font-size: 18px; color: var(--b); }
.scheda-prod span { color: var(--m); font-size: 13px; }
.scheda-prod:hover { border-color: var(--b); box-shadow: 0 2px 8px rgba(26,95,180,.12); }
.briciole { margin: 0 0 12px; }
.briciole a { color: var(--b); text-decoration: none; }
.rapidi { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 10px; }
.rapidi a { padding: 3px 10px; border: 1px solid #d8dbe0; border-radius: 14px; text-decoration: none; color: var(--t); font-size: 13px; }
.rapidi a.on, .rapidi a:hover { border-color: var(--b); color: var(--b); }
.due { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .due { grid-template-columns: 1fr; } }
table.stretta { max-width: 700px; }
tr.opz td:first-child { padding-left: 20px; color: var(--m); }

/* Scadenzario */
.filtri { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filtri input[type=search] { flex: 1; min-width: 220px; }
.filtri .csv { margin-left: auto; color: var(--b); text-decoration: none; font-size: 13px; }
tr.urgente td:first-child, tr.urgente td:nth-child(2) { color: #b54708; font-weight: 600; }
tr.scaduto td { background: #fef3f2; }
tr.scaduto td:first-child, tr.scaduto td:nth-child(2) { color: #b42318; font-weight: 600; }
.scheda-prod.scad { background: var(--g); }
.senza { color: #b54708; font-size: 12px; font-style: italic; }
small.det { color: var(--m); font-size: 11px; }
.calc { display: flex; gap: 10px; align-items: center; background: var(--g); padding: 12px 14px; border-radius: 8px; margin: 10px 0 6px; max-width: 700px; flex-wrap: wrap; }
.calc input { width: 90px; }
.calc .ris { font-size: 16px; }
.gratis { color: #23692b; font-size: 12px; }
