/* Devamed Partner Check — superficie di vetro chiara, un solo pannello profondo per l'intake intelligente */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/geist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/geist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  /* scala degli spazi: 4px di base, passi intermedi per il ritmo stretto/largo */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --canvas: #e4e9f0;
  --glass: rgba(255, 255, 255, .64);
  --glass-2: rgba(255, 255, 255, .86);
  --glass-line: rgba(22, 32, 43, .07);
  --ink: #16202b;
  --ink-2: #4a5565;
  --ink-3: #647083;
  --accent: #2b6be4;
  --accent-ink: #1e4fb0;
  --accent-soft: rgba(43, 107, 228, .11);
  --deep-a: rgba(44, 70, 106, .94);
  --deep-b: rgba(24, 42, 72, .90);
  --ok: #1f9d63; --ok-bg: #dcf3e7;
  --warn: #b57f05; --warn-bg: #faefc9;
  --alert: #d2621d; --alert-bg: #fbe3d1;
  --danger: #d0394a; --danger-bg: #fadde1;
  --info: #2b6be4; --info-bg: #e1eafb;
  --r-xl: 28px; --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --shadow: 0 14px 34px -16px rgba(26, 40, 60, .22), 0 1px 0 rgba(255, 255, 255, .8) inset;
  --shadow-sm: 0 6px 18px -10px rgba(26, 40, 60, .18), 0 1px 0 rgba(255, 255, 255, .7) inset;
  --focus: 0 0 0 3px rgba(43, 107, 228, .22);
  font-family: "Geist", "Segoe UI Variable Text", "Segoe UI", -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; color: var(--ink); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; background: var(--canvas) linear-gradient(165deg, #eef2f7 0%, #dfe6ef 48%, #e8ecf3 100%) fixed; }
a { color: var(--accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 1.65rem; font-weight: 500; letter-spacing: -.02em; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; } h4 { font-size: .9rem; font-weight: 600; }
p { margin: .3rem 0; }
::selection { background: rgba(43, 107, 228, .18); }
input, textarea { caret-color: var(--accent); }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.small { font-size: .85rem; } .xs { font-size: .78rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; } .grow { flex: 1; }
.mt { margin-top: 1rem; } .mt-s { margin-top: .5rem; } .mb { margin-bottom: 1rem; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- barra alta: vetro flottante ---------- */
.bar { position: sticky; top: 12px; z-index: 30; margin: 12px auto 0; max-width: 1180px; padding: 0 16px; }
.bar-in { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem .45rem .9rem; border-radius: 999px; background: var(--glass-2); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,.7); }
.bar .logo { display: flex; align-items: center; gap: .5rem; font-weight: 650; text-decoration: none; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.bar .logo svg { width: 28px; height: 28px; color: var(--accent-ink); }
.bar .logo small { font-weight: 400; color: var(--ink-3); margin-left: .15rem; }
.nav { display: flex; gap: .15rem; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { position: relative; border: 0; background: transparent; color: var(--ink-2); padding: .45rem .85rem; border-radius: 999px; cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.nav button:hover { background: rgba(22,32,43,.05); color: var(--ink); }
.nav button.active { background: var(--ink); color: #fff; }
.nav button .count { margin-left: .35rem; }
.me { position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: linear-gradient(145deg, #5f86c9, #2f5597); color: #fff; font-weight: 600; cursor: pointer; display: grid; place-items: center; letter-spacing: .02em; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--glass-2); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.7); padding: .5rem; display: none; }
.menu.open { display: block; }
.menu .who { padding: .5rem .75rem .6rem; border-bottom: 1px solid var(--glass-line); margin-bottom: .35rem; }
.menu .who b { display: block; } .menu .who span { color: var(--ink-3); font-size: .82rem; }
.menu button { width: 100%; text-align: left; border: 0; background: transparent; padding: .5rem .75rem; border-radius: var(--r-sm); cursor: pointer; }
.menu button:hover { background: rgba(22,32,43,.05); }

.wrap { max-width: 1440px; margin: 0 auto; padding: var(--s5) 16px var(--s7); }   /* largo: il listino con tutte le colonne di prezzo deve stare su una riga */
.section { display: none; } .section.active { display: block; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); flex-wrap: wrap; margin: var(--s2) 0 var(--s5); }
.page-head p { margin: var(--s1) 0 0; max-width: 62ch; text-wrap: pretty; }
.page-head > .flex { gap: var(--s2); }

/* ---------- superfici ---------- */
.card { background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.65); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: var(--s5) var(--s5) var(--s5); }
.card + .card { margin-top: var(--s4); }
.card > h2 + p, .card > h2 + .muted { margin: var(--s1) 0 var(--s4); }
.card > h2 + .table-wrap, .card > h2 + .bars { margin-top: var(--s3); }
.card > .flex + .table-wrap { margin-top: var(--s4); }
.card.plain { background: var(--glass-2); backdrop-filter: none; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* numeri: grandi, leggeri, unità piccola */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); margin: 0 0 var(--s5); }
.tiles.mt { margin-top: var(--s6); }                       /* respiro tra il pannello scuro della verifica e gli indicatori */
#risultato:not(:empty) { margin-top: var(--s6); }
.tiles.wide { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }   /* 8 indicatori admin: due righe da quattro, mai uno orfano */
.tile { background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.65); border-radius: var(--r-lg); padding: var(--s4) var(--s4) var(--s3); box-shadow: var(--shadow-sm); min-width: 0; }
.tile .n { font-size: 2rem; font-weight: 300; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .n small { font-size: .8rem; font-weight: 500; color: var(--ink-3); margin-left: .3rem; letter-spacing: 0; }
.tile .l { color: var(--ink-2); font-size: .82rem; margin-top: var(--s2); line-height: 1.3; }
.tile.ok .n { color: var(--ok); } .tile.alert .n { color: var(--danger); } .tile.warn .n { color: var(--alert); } .tile.accent .n { color: var(--accent-ink); }

/* ---------- pannello intelligente ---------- */
.smart { position: relative; border-radius: var(--r-xl); padding: var(--s6) var(--s6) var(--s5); color: #fff; background: linear-gradient(135deg, var(--deep-a), var(--deep-b)); box-shadow: 0 24px 60px -24px rgba(20, 40, 70, .55), 0 1px 0 rgba(255,255,255,.25) inset; overflow: hidden; }
.smart::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(120, 170, 255, .35), transparent 70%); pointer-events: none; }
.smart h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 500; letter-spacing: -.02em; }
.smart .lead { color: rgba(255,255,255,.82); margin: var(--s2) 0 var(--s5); max-width: 60ch; text-wrap: pretty; }
.omni { position: relative; background: rgba(255,255,255,.96); border-radius: var(--r-lg); color: var(--ink); box-shadow: 0 10px 30px -12px rgba(0,0,0,.35); transition: box-shadow .2s, transform .2s; }
.omni:focus-within { box-shadow: 0 10px 30px -12px rgba(0,0,0,.35), 0 0 0 4px rgba(140, 180, 255, .35); }
.omni textarea { width: 100%; border: 0; background: transparent; resize: none; padding: 1rem 7.5rem 1rem 1.15rem; min-height: 86px; max-height: 40vh; font-size: 1.05rem; line-height: 1.45; outline: none; border-radius: var(--r-lg); }
.omni textarea::placeholder { color: var(--ink-3); }
.omni .tools { position: absolute; right: .6rem; top: .6rem; display: flex; gap: .4rem; }
.round { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(22,32,43,.06); color: var(--ink); transition: background .15s, transform .15s; }
.round:hover { background: rgba(22,32,43,.11); }
.round svg { width: 20px; height: 20px; }
.round.go { background: var(--accent); color: #fff; }
.round.go:hover { background: var(--accent-ink); }
.round.go:disabled { opacity: .5; cursor: progress; }
.round.mic.on { background: var(--danger); color: #fff; animation: pulse 1.3s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(208,57,74,.45); } 100% { box-shadow: 0 0 0 16px rgba(208,57,74,0); } }
.sources { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s4); }
.src { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; cursor: pointer; font-weight: 500; font-size: .9rem; transition: background .15s; }
.src:hover { background: rgba(255,255,255,.2); }
.src svg { width: 17px; height: 17px; opacity: .9; }
.src.off { opacity: .45; cursor: not-allowed; }
.smart .hintline { margin: var(--s4) 0 0; color: rgba(255,255,255,.78); font-size: .82rem; max-width: 70ch; }
.logo-img { height: 26px; width: auto; display: block; }
.smart .attach { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.smart .attach .th { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); }
.smart .attach .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.smart .attach .th span { display: grid; place-items: center; width: 100%; height: 100%; font-size: .7rem; text-align: center; padding: .3rem; }
.smart .attach .th button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: .75rem; cursor: pointer; line-height: 1; }
.smart.listening .omni textarea { font-style: italic; }
.smart.busy::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, #9cc3ff, transparent); animation: slide 1.1s linear infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.smart.dropping { outline: 2px dashed rgba(255,255,255,.7); outline-offset: -10px; }
.smart .status { margin-top: var(--s3); color: rgba(255,255,255,.85); font-size: .9rem; min-height: 1.2em; }
.smart .status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .round.mic.on, .smart.busy::after { animation: none; } }

/* ---------- risultati ---------- */
.res { margin-top: 1rem; border-radius: var(--r-xl); background: var(--glass-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.7); box-shadow: var(--shadow); overflow: hidden; }
.res-head { display: flex; align-items: center; gap: 1.1rem; padding: 1.2rem 1.4rem; }
.res-head .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 18%, transparent); }
.res-head .t { flex: 1; min-width: 0; }
.res-head .t h2 { font-size: 1.35rem; font-weight: 500; letter-spacing: -.02em; }
.res-head .t p { color: var(--ink-2); margin: .15rem 0 0; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(currentColor calc(var(--p) * 1%), rgba(22,32,43,.08) 0); }
.ring i { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: .9rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.res.libero .dot, .res.libero .ring { color: var(--ok); }
.res.possibile .dot, .res.possibile .ring { color: var(--warn); }
.res.probabile .dot, .res.probabile .ring { color: var(--alert); }
.res.certo .dot, .res.certo .ring { color: var(--danger); }
.res.vuoto .dot { color: var(--ink-3); }
.res-body { padding: 0 1.4rem 1.3rem; display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.2rem; }
@media (max-width: 820px) { .res-body { grid-template-columns: 1fr; } }
.res h4 { color: var(--ink-3); font-weight: 500; margin-bottom: .5rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.fields .f { background: rgba(22,32,43,.04); border-radius: var(--r-md); padding: .45rem .7rem .4rem; }
.fields .f label { display: block; font-size: .72rem; color: var(--ink-3); }
.fields .f input { width: 100%; border: 0; background: transparent; padding: .1rem 0 0; outline: none; font-weight: 500; }
.fields .f input:focus { box-shadow: none; border-bottom: 1px solid var(--accent); }
.fields .f.on { background: var(--accent-soft); }
/* pannello listini (admin): tabella densa con campi che sembrano testo finché non ci passi sopra */
table.pn { font-variant-numeric: tabular-nums; }
table.pn th.num, table.pn td.num { text-align: right; white-space: nowrap; }
table.pn th.center, table.pn td.center { text-align: center; }
table.pn td.pn-name { min-width: 220px; max-width: 320px; }
table.pn tr.pn-sec td { padding: var(--s4) var(--s2) var(--s2); font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--glass-line); }
table.pn tr.pn-sec .cnt { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-3); margin-left: var(--s2); }
table.pn tr.off td { opacity: .45; }
table.pn tr.off td.center { opacity: 1; }
table.pn input.e { width: 92px; text-align: right; font: inherit; font-variant-numeric: tabular-nums; padding: .2rem .4rem; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); }
table.pn input.e::placeholder { color: var(--ink-3); }
table.pn input.e:hover { border-color: var(--glass-line); background: #fff; }
table.pn input.e:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
table.pn input.e:not(:placeholder-shown) { font-weight: 600; color: var(--accent-ink); }
table.pn .pn-pay { color: var(--ink-2); }
.pn-st { font-weight: 600; } .pn-st.ok { color: var(--ok); } .pn-st.warn { color: var(--warn); } .pn-st.bad { color: var(--danger); } .pn-st.na { color: var(--ink-3); font-weight: 400; }
.pn-cols { display: flex; flex-direction: column; gap: var(--s1); font-size: .9rem; }
.pn-cols label { display: flex; align-items: center; gap: var(--s2); }
.pn-sov span:first-child { min-width: 150px; } .pn-sov .input { width: 90px; padding: .25rem .5rem; }
.dich-rev { display: block; } .dich-item { padding: var(--s3) 0; border-top: 1px solid var(--glass-line); } .dich-item:first-child { border-top: 0; padding-top: 0; }
.dich-chk { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); cursor: pointer; }
.dich-esito { margin: 0 0 var(--s2); font-size: .86rem; } .dich-item.bloccato .fields { opacity: .55; }
.cart .line { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; } .cart .line .ln { display: flex; flex-direction: column; min-width: 0; } .cart .line .ln b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart .line .sub { grid-column: auto; display: block; }
.pay.compact { grid-template-columns: 1fr 1fr; gap: .35rem; } .pay.compact label { padding: .45rem .6rem; font-size: .84rem; } .pay.compact .v { margin-left: auto; color: var(--ink-3); font-size: .78rem; }
.cart .pay-sel label { display: block; font-size: .78rem; margin-bottom: .25rem; } .cart .pay-sel select.input { width: 100%; font-variant-numeric: tabular-nums; }
.cart .pay-sel .hint { margin-top: .3rem; font-size: .78rem; color: var(--ink-3); }
.dest-sum { margin-top: .4rem; padding: .55rem .75rem; border-radius: var(--r-md); background: rgba(22,32,43,.04); font-size: .9rem; display: flex; flex-direction: column; gap: 2px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cart .tot .big { font-size: 1.1rem; font-weight: 600; }
.btn.lg { padding: .8rem 1.2rem; font-size: 1rem; }
#card-spedizione { grid-column: 1 / -1; }
.vol-banner { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--accent-soft); color: var(--ink); }
.vol-head { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; align-items: baseline; font-size: .9rem; }
.vol-bar { height: 6px; border-radius: 999px; background: rgba(22,32,43,.1); margin: var(--s2) 0; overflow: hidden; } .vol-bar span { display: block; height: 100%; background: var(--accent-ink); border-radius: 999px; transition: width .4s; }
.vol-steps { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-size: .74rem; color: var(--ink-3); } .vol-steps .on { color: var(--accent-ink); font-weight: 600; } .vol-steps .done { color: var(--ink-2); }
.vol-cart { margin-top: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--accent-soft); font-size: .82rem; line-height: 1.4; } .vol-cart.up { background: var(--ok-bg); color: var(--ok); } .vol-cart.up .muted { color: inherit; opacity: .8; }
.sp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.sp-box { padding: var(--s4); border-radius: var(--r-md); background: rgba(22,32,43,.03); border: 1px solid var(--glass-line); }
.sp-box h3 { margin: 0 0 var(--s2); font-size: 1rem; }
.sp-righe { display: grid; gap: var(--s1); margin: var(--s2) 0; }
.sp-riga { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)) 32px; gap: var(--s2); align-items: center; }
.sp-riga input { min-width: 0; }
.sp-sim { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding: var(--s3); border-radius: var(--r-md); background: var(--accent-soft); }
.sp-sim input { width: 96px; padding: .35rem .5rem; }
.sp-sim-out { font-weight: 600; }
@media (max-width: 860px) { .sp-cols { grid-template-columns: 1fr; } }
.modulo { background: var(--warn-bg); border-radius: var(--r-md); padding: var(--s4); font-size: .9rem; color: #5a4200; }
.modulo ul { margin: var(--s2) 0 0 1.1rem; padding: 0; } .modulo li { margin: .2rem 0; }
.contratto-modulo { margin-top: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--accent-soft); font-size: .88rem; }
.foot-app { text-align: center; font-size: .76rem; color: var(--ink-3); padding: var(--s6) var(--s4) var(--s4); }
.foot-app button.link { font-size: inherit; }
.contratto-testo { max-height: 42vh; overflow: auto; white-space: pre-wrap; font-size: .9rem; line-height: 1.55; padding: var(--s4); background: rgba(22,32,43,.04); border-radius: var(--r-md); margin-top: var(--s3); }
.res .avviso-partner { margin: 0 var(--s5) var(--s3); }
.webx { margin-top: var(--s4); } .webx h4 { margin-bottom: var(--s2); }
.webx .fonti a { margin-right: var(--s2); }
.cand { background: rgba(22,32,43,.04); border-radius: var(--r-md); padding: .8rem .95rem; }
.cand + .cand { margin-top: .5rem; }
.cand .name { font-weight: 600; }
.cand .where { color: var(--ink-2); }
.ev { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.ev span { font-size: .78rem; padding: .18rem .55rem; border-radius: 999px; background: #fff; border: 1px solid var(--glass-line); }
.res-foot { padding: .9rem 1.4rem; border-top: 1px solid var(--glass-line); display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; background: rgba(255,255,255,.4); }
.res-list .row { display: grid; grid-template-columns: 14px 1.4fr 1fr auto; gap: 1rem; align-items: center; padding: .8rem 1.4rem; border-top: 1px solid var(--glass-line); }
.res-list .row:first-child { border-top: 0; }
.res-list .row .dot { width: 10px; height: 10px; border-radius: 50%; }
.row .dot.libero { background: var(--ok); } .row .dot.possibile { background: var(--warn); } .row .dot.probabile { background: var(--alert); } .row .dot.certo { background: var(--danger); } .row .dot.vuoto { background: var(--ink-3); }
@media (max-width: 720px) { .res-list .row { grid-template-columns: 10px 1fr auto; } .res-list .row .c3 { display: none; } }
.summary { display: flex; gap: 1.2rem; flex-wrap: wrap; padding: 1rem 1.4rem .2rem; }
.summary b { font-size: 1.5rem; font-weight: 400; letter-spacing: -.02em; }
.summary span { display: block; font-size: .78rem; color: var(--ink-3); }
.note-ai { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem 1.4rem; font-size: .88rem; color: var(--ink-2); background: var(--accent-soft); }
.note-ai svg { width: 18px; height: 18px; flex: none; color: var(--accent-ink); margin-top: .1rem; }

/* ---------- form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem .9rem; }
.field label { display: block; font-size: .82rem; color: var(--ink-2); margin-bottom: .28rem; }
.field input, .field select, .field textarea, .input { width: 100%; padding: .6rem .8rem; border: 1px solid var(--glass-line); border-radius: var(--r-md); background: rgba(255,255,255,.85); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--accent); box-shadow: var(--focus); }
.field.full { grid-column: 1 / -1; }
.field .hint { font-size: .78rem; color: var(--ink-3); margin-top: .25rem; }
textarea { min-height: 110px; resize: vertical; }
.actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.btn { background: var(--ink); color: #fff; border: 1px solid transparent; padding: .62rem 1.15rem; border-radius: 999px; cursor: pointer; font-weight: 550; display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; transition: background .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: #2a3645; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--accent); } .btn.primary:hover { background: var(--accent-ink); }
.btn.secondary { background: rgba(255,255,255,.85); color: var(--ink); border-color: var(--glass-line); } .btn.secondary:hover { background: #fff; }
.btn.ghost { background: transparent; color: var(--ink-2); } .btn.ghost:hover { background: rgba(22,32,43,.06); }
.btn.danger { background: var(--danger); } .btn.ok { background: var(--ok); }
.btn.sm { padding: .4rem .8rem; font-size: .86rem; }
.btn.xs { padding: .25rem .6rem; font-size: .78rem; }
.btn svg { width: 16px; height: 16px; }

/* ---------- etichette ---------- */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.certo, .pill.confermata, .pill.annullato { background: var(--danger-bg); color: var(--danger); }
.pill.probabile { background: var(--alert-bg); color: var(--alert); }
.pill.possibile, .pill.inviato { background: var(--warn-bg); color: var(--warn); }
.pill.libero, .pill.respinta, .pill.attivo, .pill.evaso { background: var(--ok-bg); color: var(--ok); }
.pill.vuoto, .pill.inattivo { background: rgba(22,32,43,.07); color: var(--ink-2); }
.pill.aperta, .pill.confermato { background: var(--info-bg); color: var(--info); }
.pill.count { background: var(--accent-soft); color: var(--accent-ink); padding: .05rem .5rem; } .pill.count::before { display: none; }
.nav button.active .pill.count { background: rgba(255,255,255,.2); color: #fff; }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; }
@media (max-width: 720px) {   /* su telefono i filtri scorrono su una riga sola */
  .chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-inline: -12px; padding-inline: 12px; }
  .chips.scroll::-webkit-scrollbar { display: none; }
  .chips.scroll .chip { flex: none; }
}
.chip { border: 1px solid var(--glass-line); background: rgba(255,255,255,.8); border-radius: 999px; padding: .35rem .85rem; cursor: pointer; font-size: .86rem; color: var(--ink-2); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
select.chip, input.chip { cursor: auto; color: var(--ink); }

/* ---------- tabelle ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .65rem; border-bottom: 1px solid var(--glass-line); vertical-align: top; }
th { font-size: .78rem; color: var(--ink-3); font-weight: 500; position: sticky; top: 0; background: transparent; }
tr:last-child td { border-bottom: 0; }
td .sub { color: var(--ink-3); font-size: .8rem; }
.empty { padding: 2.2rem 1rem; text-align: center; color: var(--ink-3); }
.score { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- segnalazioni ---------- */
.segn { background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.65); border-radius: var(--r-lg); padding: 1rem 1.15rem; margin-bottom: .75rem; box-shadow: var(--shadow-sm); position: relative; }
.segn::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ink-3); }
.segn.certo::before { background: var(--danger); } .segn.probabile::before { background: var(--alert); } .segn.possibile::before { background: var(--warn); }
.segn .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .7rem; }
.segn .box { background: rgba(255,255,255,.55); border-radius: var(--r-md); padding: .7rem .85rem; }
.segn .box h4 { color: var(--ink-3); font-weight: 500; margin-bottom: .35rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; font-size: .88rem; }
.kv b { color: var(--ink-3); font-weight: 500; }
@media (max-width: 720px) { .segn .cols { grid-template-columns: 1fr; } }

/* ---------- listino e ordini ---------- */
.shop { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s5); align-items: start; }
#tab-listino { max-width: none; }
.cart-bar { display: none; }
@media (max-width: 1500px) {   /* il listino ha la precedenza: il carrello scende sotto e una barra fissa riassume l'ordine */
  .shop { grid-template-columns: 1fr; } .cart { position: static !important; }
  .cart-bar { position: sticky; bottom: var(--s3); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: 999px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.8); box-shadow: var(--shadow-sm); font-size: .9rem; }
  .cart-bar.hidden { display: none; }
}
@media (max-width: 720px) { .cart-bar { bottom: calc(4.4rem + env(safe-area-inset-bottom)); } }
/* Listino a tabella: gruppi per linea, una riga uguale per ogni prodotto
   (foto · nome e codice · listino · sconto · prezzo riservato · quantità) */
.catalog { display: flex; flex-direction: column; gap: var(--s5); --cat-cols: 56px minmax(0, 1fr) 84px 64px 118px 184px; }
.grp { background: var(--glass-2); border: 1px solid rgba(255,255,255,.7); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.grp-h { display: grid; grid-template-columns: var(--cat-cols); column-gap: var(--s3); align-items: baseline; padding: var(--s3) var(--s4) var(--s2); background: rgba(255,255,255,.55); }
.grp-h .g-title { grid-column: 1 / 3; display: flex; align-items: baseline; gap: var(--s3); min-width: 0; }
.grp-h h3 { font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-h .g-n { font-size: .78rem; color: var(--ink-3); white-space: nowrap; }
.grp-h .g-col { font-size: .72rem; color: var(--ink-3); text-align: right; white-space: nowrap; }
.prod { display: grid; grid-template-columns: var(--cat-cols); column-gap: var(--s3); align-items: center; min-height: 104px; padding: var(--s3) var(--s4); border-top: 1px solid var(--glass-line); }
.prod .ph { width: 56px; height: 56px; border-radius: 10px; border: 1px solid var(--glass-line); background: #fff; display: grid; place-items: center; color: var(--ink-3); overflow: hidden; }
.prod .qty button { width: 28px; height: 30px; font-size: 1rem; } .prod .qty input { width: 36px; font-size: .9rem; }
.prod .ph img { width: 100%; height: 100%; object-fit: contain; display: block; }
.prod .ph svg { width: 26px; height: 26px; opacity: .5; }
.prod .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prod .nm { font-weight: 600; font-size: .95rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; overflow-wrap: anywhere; }
.prod .body { min-width: 0; }
.prod .cat { font-size: .74rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod .desc { font-size: .78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod .prices { display: contents; }
.prod .col { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prod .col b { font-weight: 500; color: var(--ink-2); }
.prod .col small { font-size: .72rem; color: var(--ink-3); }
.prod .col.pct-c b { color: var(--ok); font-weight: 600; font-size: .9rem; }
.prod .col.now-c b { color: var(--accent-ink); font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; }
.prod .vis { display: grid; place-items: center; } .prod .vis input { width: 18px; height: 18px; accent-color: var(--accent-ink); cursor: pointer; }
.prod.off .ph, .prod.off .body, .prod.off .prices, .prod.off .mg-c { opacity: .42; }
.prod .off-tag { padding: .05rem .5rem; border-radius: 999px; background: rgba(22,32,43,.08); color: var(--ink-2); font-weight: 600; font-size: .7rem; }
.prod .col.hid, .grp-h .g-col.hid { opacity: .38; } .prod .col.hid b { text-decoration: line-through; text-decoration-color: rgba(22,32,43,.35); }
.prod .col.mg-c b { font-size: .95rem; } .prod .col.mg-c .fix { color: var(--accent-ink); font-weight: 600; }
.grp-h.admin .g-title { grid-column: 1 / 4; }
#pannello .catalog { margin-top: var(--s4); }
.prod .add { display: flex; gap: .4rem; align-items: center; justify-self: end; }
.prod .add .btn.sm { padding-left: .7rem; padding-right: .7rem; }
.prod .meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: center; font-size: .74rem; color: var(--ink-3); }
.prod .meta .pz { display: inline-flex; align-items: center; white-space: nowrap; padding: .05rem .5rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; font-size: .72rem; letter-spacing: .01em; }
.prod .more { align-self: flex-start; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: .76rem; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(30,79,176,.35); text-underline-offset: 2px; }
.prod .more:hover { text-decoration-color: currentColor; }
.prod .col.pub-c b { font-weight: 500; color: var(--ink-2); font-size: .9rem; }
.prod .det { grid-column: 1 / -1; display: none; margin: var(--s2) 0 var(--s1) 72px; padding: var(--s4) var(--s5); border-radius: var(--r-md); background: rgba(22,32,43,.035); }
.prod.open .det { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4) var(--s6); }
.prod .det h5 { margin: 0 0 var(--s2); font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.prod .det p { margin: 0 0 var(--s2); font-size: .86rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.prod .det-kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1) var(--s3); font-size: .84rem; }
.prod .det-k { color: var(--ink-3); white-space: nowrap; } .prod .det-v { color: var(--ink); font-variant-numeric: tabular-nums; }
.price { margin-top: auto; padding-top: .4rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.price .now { font-size: 1.35rem; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price .was { color: var(--ink-3); text-decoration: line-through; font-size: .85rem; }
.price .pct { font-size: .74rem; color: var(--ok); font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--glass-line); border-radius: 999px; background: #fff; overflow: hidden; }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); }
.qty input { width: 44px; border: 0; text-align: center; padding: 0; background: transparent; font-variant-numeric: tabular-nums; outline: none; }
.cart { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.cart .lines { max-height: 30vh; overflow: auto; margin: .5rem 0; }
.cart .line { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; padding: .55rem 0; border-top: 1px solid var(--glass-line); font-size: .9rem; }
.cart .line:first-child { border-top: 0; }
.cart .line .r { text-align: right; font-variant-numeric: tabular-nums; }
.cart .line .sub { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; color: var(--ink-3); font-size: .8rem; }
.cart .tot { display: grid; grid-template-columns: 1fr auto; gap: .25rem .6rem; font-variant-numeric: tabular-nums; padding-top: .5rem; border-top: 1px solid var(--glass-line); }
.cart .tot .big { font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; }
.pay { display: grid; gap: .4rem; }
.pay label { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: var(--r-md); border: 1px solid var(--glass-line); background: rgba(255,255,255,.7); cursor: pointer; font-size: .9rem; }
.pay label.on { border-color: var(--accent); background: var(--accent-soft); }
.pay label input { accent-color: var(--accent); }
.pay .v { margin-left: auto; font-size: .8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.order { background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.65); border-radius: var(--r-lg); padding: 1rem 1.15rem; margin-bottom: .75rem; box-shadow: var(--shadow-sm); }
.order .head { display: flex; gap: var(--s2) var(--s3); align-items: center; flex-wrap: wrap; }
.order .head .num { font-weight: 600; }
.order .head .tot { margin-left: auto; font-size: 1.15rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.order table { margin-top: var(--s3); font-size: .86rem; }
.order table td:first-child { white-space: nowrap; color: var(--ink-2); }
.order .actions { margin-top: var(--s3); }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #eef2f7; display: block; }
.thumb.ph { display: grid; place-items: center; color: var(--ink-3); font-size: .7rem; }
.pickimg { border: 1.5px dashed var(--glass-line); border-radius: var(--r-md); padding: .8rem; text-align: center; color: var(--ink-2); cursor: pointer; background: rgba(255,255,255,.5); }
.pickimg img { max-height: 140px; border-radius: 10px; display: block; margin: 0 auto .4rem; }
.rowedit { display: grid; grid-template-columns: 1.2fr 1.6fr 2fr 90px 70px 32px; gap: .4rem; align-items: center; margin-bottom: .4rem; }
.rowedit input { padding: .45rem .6rem; border: 1px solid var(--glass-line); border-radius: var(--r-sm); background: #fff; }
@media (max-width: 760px) { .rowedit { grid-template-columns: 1fr 1fr; } }

/* ---------- varie ---------- */
.banner { padding: .75rem 1rem; border-radius: var(--r-md); margin-bottom: 1rem; border: 1px solid transparent; }
.banner.warn { background: var(--warn-bg); color: #6a4a00; }
.banner.info { background: var(--info-bg); color: var(--accent-ink); }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner.danger { background: var(--danger-bg); color: var(--danger); }
.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(8px); background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; box-shadow: 0 12px 30px rgba(0,0,0,.25); z-index: 100; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }
.modal-bg { position: fixed; inset: 0; background: rgba(20, 32, 48, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal-bg.open { display: flex; }
.modal { background: var(--glass-2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,.8); border-radius: var(--r-xl); padding: 1.4rem 1.5rem; width: 100%; max-width: 540px; box-shadow: 0 30px 80px rgba(0,0,0,.3); max-height: 92vh; overflow: auto; }
.modal h2 { margin-bottom: .75rem; }
.cred { background: rgba(255,255,255,.7); border: 1px dashed var(--glass-line); border-radius: var(--r-md); padding: .8rem 1rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; padding-top: .5rem; }
.bars .b { flex: 1; background: var(--accent-soft); border-radius: 3px 3px 0 0; position: relative; min-width: 6px; }
.bars .b i { position: absolute; bottom: 0; left: 0; right: 0; background: var(--alert); border-radius: 3px 3px 0 0; }
.bars .b:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .72rem; padding: .2rem .45rem; border-radius: 6px; white-space: nowrap; z-index: 2; }
.dropzone { border: 1.5px dashed var(--glass-line); border-radius: var(--r-lg); padding: 1.25rem; text-align: center; color: var(--ink-2); background: rgba(255,255,255,.5); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
code.k { background: rgba(255,255,255,.7); border: 1px solid var(--glass-line); padding: .05rem .35rem; border-radius: 5px; font-size: .85em; }
details summary { cursor: pointer; color: var(--accent-ink); font-weight: 500; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.steps div { background: rgba(255,255,255,.55); border-radius: var(--r-md); padding: .7rem .85rem; font-size: .86rem; color: var(--ink-2); }
.steps b { display: block; color: var(--ink); margin-bottom: .15rem; }

/* ---------- accesso: nodo fotografico su vetro chiaro, modulo a destra (design "Login Partner 2a") ---------- */
.login-page { --lp-ink: #0f1f3d; --lp-ink2: #33435f; --lp-ink3: #5d6c86; --lp-line: #dbe3ee; --lp-field: #f4f7fb; --lp-blue: #2a64e0; --lp-navy: #12244a; --lp-link: #1f56c8; --lp-err: #c8373d;
  min-height: 100vh; min-height: 100dvh; margin: 0; padding: 12px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; background: #fbfcfd; color: var(--lp-ink); font-size: 15px; }
.login-visual { position: relative; border-radius: 20px; overflow: hidden; background: #eef3f8 radial-gradient(120% 90% at 18% 10%, rgba(255,255,255,.95), transparent 60%), radial-gradient(90% 80% at 88% 92%, rgba(176,196,222,.45), transparent 65%); box-shadow: inset 0 0 0 1px rgba(15,31,61,.06); container-type: size; min-height: 560px; }
.login-visual .knot { position: absolute; left: 50%; top: 50%; width: 104cqw; max-width: none; height: auto; transform: translate(-50%, calc(-50% - 7cqh)); filter: drop-shadow(0 18px 22px rgba(6,18,48,.12)); pointer-events: none; }
.login-visual .copy { position: absolute; inset: 0; padding: 40px 44px 44px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.login-visual .tag { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--lp-ink2); }
.login-visual .tag::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--lp-blue); }
.login-visual .claim { display: flex; flex-direction: column; gap: 32px; }
.login-visual h2 { margin: 0; max-width: 480px; font-size: clamp(34px, 3.6vw, 48px); font-weight: 300; line-height: 1.04; letter-spacing: -.035em; color: var(--lp-ink); }
.login-visual .pts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.login-visual .pts div { padding-top: 14px; border-top: 1px solid rgba(15,31,61,.16); font-size: 13.5px; line-height: 1.45; color: var(--lp-ink2); text-wrap: pretty; }
.login-form { display: flex; flex-direction: column; padding: 36px 72px; min-width: 0; }
.login-form .logo-img { height: 26px; width: auto; align-self: flex-start; }
.login-form .mid { flex: 1; display: flex; align-items: center; padding: 32px 0; }
.login-form .box { width: 100%; max-width: 360px; }
.login-form .step { display: flex; flex-direction: column; gap: 24px; }
.login-form .hd { display: flex; flex-direction: column; gap: 8px; }
.login-form h1 { margin: 0; font-size: 28px; font-weight: 400; line-height: 1.15; letter-spacing: -.02em; color: var(--lp-ink); }
.login-form .lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--lp-ink3); text-wrap: pretty; }
.login-form .lead strong { font-weight: 500; color: var(--lp-ink); }
.login-form form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.login-form .lf { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 500; color: var(--lp-ink2); }
.login-form .lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.login-form .lbl .hint { font-weight: 400; color: var(--lp-ink3); font-size: 12.5px; text-align: right; }
.login-form .in { height: 52px; width: 100%; padding: 0 16px; border-radius: 14px; border: 1px solid var(--lp-line); background: var(--lp-field); font-size: 16px; font-weight: 400; color: var(--lp-ink); outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.login-form .in::placeholder { color: #8a97ac; }
.login-form .in:focus, .login-form .in:focus-visible { border-color: var(--lp-blue); background: #fff; box-shadow: 0 0 0 4px rgba(42,100,224,.14); }
.login-form .pw-wrap { position: relative; }
.login-form .pw-wrap .in { padding-right: 84px; }
.login-form .pw-toggle { position: absolute; right: 6px; top: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; font-size: 13px; font-weight: 500; color: var(--lp-ink2); cursor: pointer; }
.login-form .pw-toggle:hover { background: #e8eef6; }
.login-form .go { height: 52px; border: 0; border-radius: 999px; background: var(--lp-navy); color: #fff; font-size: 15px; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .15s, opacity .15s, transform .1s; }
.login-form .go:hover { background: #1d3a75; }
.login-form .go:active { transform: translateY(1px); }
.login-form .go.dim { opacity: .45; }
.login-form .go:disabled { opacity: .6; cursor: progress; }
.login-form .go:focus-visible { box-shadow: 0 0 0 4px rgba(42,100,224,.25); }
.login-form .link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--lp-link); cursor: pointer; text-align: left; align-self: flex-start; border-radius: 4px; }
.login-form .link:hover { text-decoration: underline; }
.login-form .link.back { display: inline-flex; align-items: center; gap: 8px; }
.login-form .alt { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.5; color: var(--lp-ink3); }
.login-form .alt.row { flex-direction: row; justify-content: space-between; align-items: center; gap: 16px; }
.login-form .alt .wait { font-variant-numeric: tabular-nums; }
.login-form .lerr { margin: 0; font-size: 13px; line-height: 1.4; color: var(--lp-err); }
.login-form .linfo { margin: 0; font-size: 13px; line-height: 1.4; color: var(--lp-ink3); }
.login-form .code-grid { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.login-form .code-grid .d { height: 60px; border-radius: 14px; border: 1px solid var(--lp-line); background: var(--lp-field); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 500; color: var(--lp-ink); font-variant-numeric: tabular-nums; transition: border-color .15s, box-shadow .15s, background .15s; }
.login-form .code-grid .d.filled { border-color: #b9c6d8; background: #fff; }
.login-form .code-grid .d.active { border-color: var(--lp-blue); background: #fff; box-shadow: 0 0 0 4px rgba(42,100,224,.12); }
.login-form .code-grid input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; cursor: text; }
.login-form .okmark { width: 52px; height: 52px; border-radius: 999px; background: #e8f0fd; display: flex; align-items: center; justify-content: center; }
.login-form .foot { margin: 0; max-width: 360px; font-size: 12px; line-height: 1.55; color: #6b7a92; text-wrap: pretty; }
@media (max-width: 1100px) { .login-form { padding: 32px 44px; } .login-visual .copy { padding: 32px 36px 36px; } }
@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding: 10px; }
  .login-visual { min-height: 0; height: 272px; border-radius: 18px; }
  .login-visual .knot { width: 112cqw; transform: translate(-50%, calc(-50% - 10cqh)); }
  .login-visual .copy { padding: 20px 22px 22px; }
  .login-visual h2 { font-size: 30px; max-width: 14ch; }
  .login-visual .pts { display: none; }
  .login-form { padding: 28px 22px 20px; }
  .login-form .mid { padding: 24px 0 28px; align-items: flex-start; }
  .login-form .box { max-width: none; }
  .login-form .lbl .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .login-form .go, .login-form .in, .login-form .code-grid .d { transition: none; } }

@media (max-width: 720px) {
  body { font-size: 14.5px; }
  /* in alto solo logo e profilo; le sezioni passano in una barra fissa in basso, a portata di pollice */
  .bar { top: 8px; padding: 0 10px; }
  /* niente backdrop-filter sulla barra alta: creerebbe il contenitore della nav fissa in basso */
  .bar-in { padding: .35rem .45rem .35rem .8rem; justify-content: space-between; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.94); }
  .bar .logo small, .bar .logo .txt { display: none; }
  .bar .logo-img { height: 22px; }
  .nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; margin: 0; padding: .3rem; gap: .1rem; border-radius: 999px; background: var(--glass-2); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 10px 30px -12px rgba(26,40,60,.45), 0 1px 0 rgba(255,255,255,.8) inset; overflow-x: auto; }
  .nav button { flex: 1 0 auto; padding: .6rem .7rem; font-size: .8rem; }
  .nav button .pill.count { position: absolute; top: 1px; right: 4px; font-size: .66rem; padding: 0 .35rem; margin: 0; }
  .wrap { padding: var(--s4) 12px calc(5.5rem + env(safe-area-inset-bottom)); }
  .page-head { margin: var(--s1) 0 var(--s4); }
  .page-head > .flex, .page-head .input { width: 100%; }
  .page-head .chips { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .page-head .chips .chip { flex: none; }
  .card { padding: var(--s4) var(--s4); }
  .smart { padding: var(--s5) var(--s4) var(--s4); border-radius: 22px; }
  .smart .lead { margin-bottom: var(--s4); }
  .omni textarea { padding-right: 6.4rem; font-size: 1rem; min-height: 78px; }
  .sources { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
  .src { padding: .6rem .8rem; font-size: .85rem; justify-content: flex-start; }
  .src.off { display: none; }
  .res-head { padding: var(--s4); gap: var(--s3); } .res-body, .res-foot, .summary, .note-ai { padding-left: var(--s4); padding-right: var(--s4); }
  .res-head .t h2 { font-size: 1.15rem; }
  .ring { width: 54px; height: 54px; } .ring i { width: 42px; height: 42px; font-size: .8rem; }
  th, td { padding: .45rem .4rem; }
  .tiles, .tiles.wide, .tiles.mt { grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin: var(--s5) 0 0; }
  .tile { padding: var(--s3) var(--s3) var(--s2); border-radius: var(--r-md); }
  .tile .n { font-size: 1.45rem; } .tile .l { font-size: .72rem; margin-top: var(--s1); }
  .chips.mb { margin-bottom: var(--s3); }
  .shop { gap: var(--s4); }
  .catalog { gap: var(--s4); }
  .grp-h { display: flex; justify-content: space-between; padding: var(--s3) var(--s3) var(--s2); }
  .grp-h .g-col { display: none; }
  .prod { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "ph body" "prices prices" "add add" "det det"; column-gap: var(--s3); row-gap: var(--s2); padding: var(--s3); min-height: 0; }
  .prod .det { grid-area: det; margin: 0; padding: var(--s3); } .prod.open .det { grid-template-columns: 1fr; gap: var(--s3); }
  .prod .prices { flex-wrap: wrap; row-gap: var(--s2); }
  .prod .ph { grid-area: ph; width: 52px; height: 52px; }
  .prod .qty button { width: 32px; height: 32px; } .prod .qty input { width: 44px; }
  .prod .body { grid-area: body; }
  .prod .desc { display: none; }
  .prod .prices { grid-area: prices; display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
  .prod .col { align-items: flex-start; text-align: left; }
  .prod .col.now-c { align-items: flex-end; text-align: right; margin-left: auto; }
  .prod .add { grid-area: add; justify-self: stretch; }
  .prod .add .btn { flex: 1; justify-content: center; }
  .modal { padding: var(--s5) var(--s4); border-radius: var(--r-lg); }
  .toast { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
}
@media print {
  .bar, .actions, .btn, .smart, .nav { display: none !important; }
  body { background: #fff; } .card, .order, .res { box-shadow: none; background: #fff; }
}


/* ===== Telefono (≤ 720 px): una colonna, tocco comodo, niente tagli =====
   Le righe del listino ricevono le colonne della griglia in linea (per il desktop): qui si sovrascrivono con !important. */
@media (max-width: 720px) {
  /* nav in basso: sei voci sempre visibili, etichette corte, contatori in alto a destra */
  .nav.compatta { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 4px; overflow: visible; }
  .nav.compatta button { flex: none; min-width: 0; padding: 10px 2px 9px; font-size: 0; line-height: 1; text-align: center; border-radius: 12px; position: relative; min-height: 44px; }
  .nav.compatta button::before { content: attr(data-short); font-size: .72rem; font-weight: 600; letter-spacing: .01em; }
  .nav.compatta button .pill.count { position: absolute; top: 3px; right: 3px; font-size: .58rem; line-height: 1.3; padding: 0 .3rem; }

  /* intestazioni di pagina in colonna, filtri a tutta larghezza */
  .page-head { flex-direction: column; align-items: stretch; gap: var(--s3); }
  .page-head .flex { flex-wrap: wrap; }
  .page-head .btn { justify-content: center; }

  /* listino: scheda per prodotto */
  .grp-h { display: flex !important; justify-content: space-between; align-items: baseline; }
  .prod { display: grid !important; grid-template-columns: 56px minmax(0, 1fr) !important; grid-template-areas: "ph body" "prices prices" "add add" "det det"; column-gap: var(--s3); row-gap: var(--s3); padding: var(--s3) var(--s3) var(--s4); min-height: 0; }
  .prod .ph { grid-area: ph; width: 56px; height: 56px; }
  .prod .body { grid-area: body; gap: 3px; }
  .prod .nm { font-size: .95rem; -webkit-line-clamp: 3; }
  .prod .desc { display: none; }
  .prod .prices { grid-area: prices; display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s2) var(--s4); padding: var(--s2) var(--s3); border-radius: var(--r-md); background: rgba(22,32,43,.035); }
  .prod .col { align-items: flex-start; text-align: left; }
  .prod .col.now-c { order: -1; flex: 1 0 100%; align-items: flex-start; text-align: left; margin: 0; }
  .prod .col.now-c b { font-size: 1.3rem; }
  .prod .add { grid-area: add; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2); justify-self: stretch; }
  .prod .add .btn { width: 100%; justify-content: center; min-height: 44px; }
  .prod .qty { min-height: 44px; } .prod .qty button { width: 40px; height: 42px; font-size: 1.1rem; } .prod .qty input { width: 44px; font-size: 1rem; }
  .prod .det { grid-area: det; margin: 0; padding: var(--s3); }
  .prod.open .det { grid-template-columns: 1fr; gap: var(--s3); }

  /* carrello sotto il listino, campi a tutta larghezza */
  .cart { padding: var(--s4); }
  .cart .form-grid { grid-template-columns: 1fr !important; }
  .cart-bar { bottom: calc(4.6rem + env(safe-area-inset-bottom)); margin: var(--s3) 0 0; border-radius: var(--r-lg); }

  /* risultati della verifica in una colonna */
  .res-body { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr 1fr; }

  /* tabelle: scorrono in orizzontale invece di schiacciarsi */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 560px; }
  .cols { grid-template-columns: 1fr; }

  /* modali a tutto schermo */
  .modal { max-height: calc(100vh - var(--s5)); overflow: auto; }
  .form-grid { grid-template-columns: 1fr; }

  /* tocco: campi e pulsanti alti almeno 44 px */
  .btn, .chip, .src { min-height: 40px; }
  input.input, .field input, .field select, select.input { min-height: 44px; font-size: 16px; }   /* 16px evita lo zoom automatico di iOS */
}
@media (max-width: 720px) {
  .cart .line { grid-template-columns: minmax(0, 1fr) auto 36px; column-gap: var(--s2); }
  .cart .line .btn.xs { width: 36px; height: 36px; justify-content: center; padding: 0; font-size: 1.1rem; }
}
@media (pointer: coarse) { #btn-ordina .xs { display: none; } }
/* tablet e finestre strette (721-1060 px): la nav in alto resta su una riga senza tagli */
@media (min-width: 721px) and (max-width: 1060px) {
  .logo .txt { display: none; }
  .nav { overflow-x: auto; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; }
  .nav button { padding: .4rem .6rem; font-size: .82rem; white-space: nowrap; }
}   /* la scorciatoia da tastiera non ha senso al tocco */
@media (max-width: 720px) {
  /* admin: dieci sezioni, la barra scorre con etichette corte e uno sfumato ai bordi che dice "c'è altro" */
  .nav.scorrevole { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(66px, 1fr); gap: 2px; padding: 4px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent); }
  .nav.scorrevole button { flex: none; min-width: 0; padding: 10px 4px 9px; font-size: 0; line-height: 1; text-align: center; border-radius: 12px; position: relative; min-height: 44px; scroll-snap-align: center; }
  .nav.scorrevole button::before { content: attr(data-short); font-size: .7rem; font-weight: 600; white-space: nowrap; }
  .nav.scorrevole button .pill.count { position: absolute; top: 3px; right: 3px; font-size: .58rem; line-height: 1.3; padding: 0 .3rem; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  /* niente sbordi: le schede non possono allargarsi oltre lo schermo per colpa di tendine o testi lunghi */
  html, body { overflow-x: hidden; }
  .section, .card, .grid > *, .field, .form-grid > * { min-width: 0; max-width: 100%; }
  .card { overflow: hidden; }
  select, input, textarea, .input { max-width: 100%; min-width: 0; }
  .hint, .muted, .small, p { overflow-wrap: anywhere; }
  .bars { overflow-x: auto; }
  .actions { flex-wrap: wrap; } .actions .btn { flex: 1 1 auto; justify-content: center; }
  .kv { grid-template-columns: 1fr; gap: .05rem .8rem; } .kv b { margin-top: .4rem; }
  .pn-opts .form-grid { grid-template-columns: 1fr !important; }
  .pn-sov span:first-child { min-width: 120px; }
  .modal { width: calc(100vw - var(--s4)); max-width: none !important; padding: var(--s4); }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .chips::-webkit-scrollbar { display: none; }
  select.chip, input.chip { max-width: 100%; }
  .page-head .flex > * { flex: 1 1 auto; }
}
@media (max-width: 380px) {
  .nav.compatta button::before { font-size: .66rem; }
  .tiles, .tiles.wide, .tiles.mt { grid-template-columns: repeat(3, 1fr); }
}
