/* PERKYSCAN — essenziale. Palette Perky. */
:root {
  --blu: #0084ce;
  --rosso: #e41e26;
  --giallo: #ffc91c;
  --navy: #141a2a;
  --bg: #f4f6fa;
  --card: #ffffff;
  --linea: #e2e6ef;
  --testo: #1b2130;
  --tenue: #6b7280;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--testo);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------- accesso */
.centro { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.card-accesso {
  width: 100%; max-width: 430px; background: var(--card); border: 1px solid var(--linea);
  border-radius: 18px; padding: 30px 26px; box-shadow: 0 10px 30px rgba(20,26,42,.08);
}
.testata { display: flex; align-items: center; gap: 12px; }
.testata h1 { margin: 0; font-size: 21px; letter-spacing: -.3px; }
.testata small { color: var(--tenue); font-size: 11.5px; letter-spacing: .06em; }
.logo {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blu), var(--navy)); color: #fff; font-weight: 800; font-size: 20px;
}
.logo.piccolo { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
.sottotitolo { color: var(--tenue); font-size: 13.5px; margin: 16px 0 18px; }

.scelta-negozio { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 16px; }
.negozio {
  padding: 16px 10px; border-radius: 12px; border: 2px solid var(--linea); background: #fff;
  font-family: inherit; font-weight: 800; font-size: 14px; letter-spacing: .03em;
  color: var(--testo); cursor: pointer; transition: all .15s;
}
.negozio.montenero.scelto { border-color: var(--blu); background: #eef7fd; color: var(--blu); }
.negozio.washington.scelto { border-color: var(--rosso); background: #fdefef; color: var(--rosso); }

.campo { display: block; margin-bottom: 13px; }
.campo span {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--tenue); margin-bottom: 6px;
}
input[type=text], input[type=password], input[type=number] {
  width: 100%; padding: 12px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--linea); border-radius: 10px; outline: none;
}
input:focus { border-color: var(--blu); box-shadow: 0 0 0 3px rgba(0,132,206,.14); }

/* --- campo password con occhietto --- */
.campo-password { position: relative; }
.campo-password input { padding-right: 48px; }
.occhietto {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px;
  background: transparent; color: var(--tenue); cursor: pointer;
  display: grid; place-items: center; transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.occhietto:hover { background: #eef2f7; color: var(--testo); }
.occhietto:focus-visible { outline: 2px solid var(--blu); outline-offset: 1px; }
.occhietto .ico-nascondi { display: none; }
.occhietto.attivo .ico-mostra { display: none; }
.occhietto.attivo .ico-nascondi { display: block; }

.pulsante {
  border: 0; border-radius: 10px; padding: 12px 16px; font-size: 14.5px; font-weight: 700;
  font-family: inherit; cursor: pointer; background: var(--navy); color: #fff;
}
.pulsante:hover { filter: brightness(1.15); }
.pulsante:disabled { opacity: .5; cursor: not-allowed; }
.pulsante.principale { width: 100%; }
.pulsante.chiaro { background: #fff; color: var(--testo); border: 1.5px solid var(--linea); }
.pulsante.piccolo { padding: 8px 12px; font-size: 13px; border-radius: 9px; }
.errore {
  background: #fdefef; border: 1px solid #f6c9cb; color: #a8121a;
  border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 14px;
}
/* box del blocco anti-tentativi (nome dedicato: .blocco è già usato dalla mappa) */
.avviso-blocco {
  display: flex; align-items: center; gap: 9px; justify-content: center;
  background: #fff7e6; border: 1.5px solid #f5c977; color: #8a5a00;
  border-radius: 11px; padding: 12px 14px; font-size: 14px; font-weight: 600;
  margin-top: 12px;
}
.avviso-blocco b { font-size: 18px; font-variant-numeric: tabular-nums; }
.blocco-icona { font-size: 17px; line-height: 1; }

/* ---------------------------------------------------------- app */
.barra {
  background: var(--navy); color: #fff; padding: 10px 18px;
  display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 20;
}
.barra .titolo { font-weight: 800; font-size: 15px; }
.barra .titolo small { display: block; font-weight: 600; font-size: 11px; opacity: .7; letter-spacing: .06em; }
.pillola {
  margin-left: auto; padding: 6px 14px; border-radius: 999px;
  font-weight: 800; font-size: 12px; letter-spacing: .08em; color: #fff;
}

main { max-width: 1000px; margin: 0 auto; padding: 22px 18px 60px; }
.sezione {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--tenue); margin: 0 0 12px;
}
.sezione + .portali { margin-bottom: 8px; }

.portali { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .portali { grid-template-columns: 1fr; } }
.portale {
  position: relative; overflow: hidden;
  border: 0; border-radius: 16px; padding: 24px 20px; cursor: pointer; text-align: left;
  color: #fff; font-family: inherit; display: flex; flex-direction: column; gap: 4px;
  min-height: 130px; box-shadow: 0 8px 22px rgba(20,26,42,.14);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s ease;
}
.portale:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(20,26,42,.22); }
.portale:active { transform: translateY(-1px) scale(.995); }
/* riflesso morbido in alto a destra: dà profondità alla card */
.portale::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 85% at 88% 0%, rgba(255,255,255,.20), rgba(255,255,255,0) 62%);
}
.portale .nome { font-size: 24px; font-weight: 800; letter-spacing: -.4px; color: var(--accento, #fff); }
.portale .desc { font-size: 12.5px; opacity: .85; }
.portale .freccia { margin-top: auto; font-size: 12px; font-weight: 800; letter-spacing: .06em; opacity: .95; }
/* sfondo chiaro (es. giallo InPost) → testo scuro, altrimenti illeggibile */
.portale.chiaro { color: var(--navy); }
.portale.chiaro .desc, .portale.chiaro .freccia { color: var(--navy); opacity: .8; }

.nota { font-size: 12.5px; color: var(--tenue); line-height: 1.6; margin: 12px 0 30px; }

.scanner { max-width: 560px; }
.video {
  background: #05070c; border-radius: 14px; overflow: hidden; aspect-ratio: 4/3;
  display: grid; place-items: center;
}
.video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.segnaposto { color: #8b95a9; font-size: 13.5px; }
.comandi { display: flex; gap: 9px; margin-top: 12px; }
.codice {
  margin-top: 14px; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 12px 14px;
}
.codice span {
  flex: 1; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 16px; font-weight: 700; word-break: break-all;
}

/* ---------------------------------------------------------- credenziali */
.credenziali { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
@media (max-width: 760px) { .credenziali { grid-template-columns: 1fr; } }
.cred {
  background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 14px;
  box-shadow: 0 4px 14px rgba(20,26,42,.05);
}
.cred-testa {
  font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 10px;
}
.cred-manca { font-size: 12.5px; color: var(--tenue); line-height: 1.5; }
.cred-riga { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cred-etichetta { font-size: 11px; font-weight: 700; color: var(--tenue); width: 62px; flex: none; }
.cred-riga code {
  flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; background: var(--bg); border: 1px solid var(--linea);
  border-radius: 8px; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.cred-riga code.punti { letter-spacing: .12em; color: var(--tenue); }
.mini {
  border: 1.5px solid var(--linea); background: #fff; color: var(--testo);
  border-radius: 9px; padding: 9px 12px; font-size: 12.5px; font-weight: 700;
  font-family: inherit; cursor: pointer; flex: none; min-height: 40px;
}
.mini:hover { border-color: var(--blu); color: var(--blu); }
.mini:active { background: #eef7fd; }

.avviso {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 50;
  background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 22px rgba(20,26,42,.25);
  max-width: 90vw; text-align: center;
}
.avviso.errore { background: var(--rosso); }

/* ---------------------------------------------------------- inventario */
#cerca { margin-bottom: 26px; }

.nuovo {
  background: #fff; border: 1px solid var(--linea); border-radius: 14px;
  padding: 16px; box-shadow: 0 4px 14px rgba(20,26,42,.05); margin-bottom: 8px;
}
.nuovo-riga { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.nuovo-riga + .nuovo-riga { margin-top: 10px; }
.nuovo .campo { flex: 1; min-width: 190px; margin-bottom: 0; }
.nuovo .campo.stretto { flex: none; width: 84px; min-width: 84px; }
.codice-campo { flex: 1; min-width: 220px; }
.badge-corriere {
  padding: 9px 14px; border-radius: 999px; color: #fff; font-size: 12.5px;
  font-weight: 700; white-space: nowrap; margin-bottom: 2px;
}
.nota.forte { color: var(--navy); font-weight: 600; margin: 14px 0 0; }

/* pulsante di scansione: fisso, sempre a portata di pollice */
.fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 45; display: flex; align-items: center; gap: 9px;
  border: 0; border-radius: 999px; padding: 15px 22px; cursor: pointer;
  background: var(--blu); color: #fff; font-family: inherit; font-weight: 800;
  font-size: 15.5px; letter-spacing: .01em;
  box-shadow: 0 10px 26px rgba(0,132,206,.45), 0 2px 6px rgba(20,26,42,.25);
}
.fab:hover { filter: brightness(1.08); }
.fab:active { transform: scale(.97); }
.fab-ico { font-size: 20px; line-height: 1; }
@media (max-width: 560px) { .fab { left: 18px; right: 18px; justify-content: center; } }
main { padding-bottom: 120px; }

/* scanner live */
#veloScan { align-items: center; }
.scan-panel {
  background: #fff; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0;
  padding: 16px; max-height: 92vh; overflow-y: auto;
}
@media (min-width: 620px) { .scan-panel { border-radius: 18px; } }
.scan-testa { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.scan-testa strong { font-size: 15px; }

/* sull'inventario il messaggio di conferma va sotto l'header
   (in basso coprirebbe il pulsante di scansione). */
.pg-inventario .avviso {
  top: calc(var(--barra-h, 66px) + 10px + env(safe-area-inset-top, 0px));
  bottom: auto;
}

/* La barra di ricerca è DENTRO l'header (.barra-inv): header e campo di ricerca
   sono un blocco unico che resta sempre in alto. Niente position:fixed qui:
   l'header è sticky e il campo lo segue sempre. */
.barra-inv { display: block; padding-bottom: 12px; }
.barra-inv .barra-alta { display: flex; align-items: center; gap: 14px; }
.cerca-riga { display: flex; gap: 8px; align-items: stretch; margin-top: 10px; }
.cerca-riga #cerca { flex: 1 1 auto; min-width: 0; margin: 0; }
.cerca-riga #vaiPacco { flex: 0 0 auto; white-space: nowrap; }
.cerca-info { margin: 7px 0 0; font-size: 12.5px; color: #c7d0e2; }
.cerca-info b { color: #fff; }

/* ---------- importazione dal registro ---------- */
.check-riga {
  display: flex; align-items: flex-start; gap: 9px; margin: 14px 0;
  font-size: 13.5px; color: var(--testo); cursor: pointer;
}
.check-riga input { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.esito-import { margin: 14px 0 4px; }
.esito-import .imp-tot {
  font-weight: 800; color: var(--navy); margin-bottom: 10px; font-size: 15px;
}
.esito-import .imp-avviso {
  background: #fff8e6; border: 1px solid #f2d98a; color: #8a6d1a;
  border-radius: 10px; padding: 9px 11px; font-size: 12.5px; margin-bottom: 10px;
}
.esito-import .imp-blocco { border-top: 1px solid var(--linea); padding: 8px 0; }
.esito-import .imp-blocco-testa {
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--tenue); margin-bottom: 5px;
}
.esito-import .imp-riga { font-size: 13px; padding: 1px 0; }
.esito-import .imp-sig {
  display: inline-block; min-width: 18px; font-weight: 800; color: var(--blu); margin-right: 4px;
}

/* ---------- trascinamento & spostamento ---------- */
.pacco .p-presa { color: #c2c8d4; font-size: 13px; flex: none; margin-left: 1px; }
.pacco { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

body.in-drag { cursor: grabbing; }
body.in-drag .pacco.ghost {
  position: fixed; z-index: 100; pointer-events: none; margin: 0;
  opacity: .95; transform: scale(1.03); box-shadow: 0 12px 26px rgba(20,26,42,.3);
  border-color: var(--blu);
}
.pacco.trascinato { opacity: .28; }

.slot.sopra { border-color: var(--blu); background: #eef7fd; box-shadow: 0 0 0 2px rgba(0,132,206,.35); }
.indicatore { height: 4px; border-radius: 3px; background: var(--blu); margin: 2px 0; }

.banner-sposta {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(12px + env(safe-area-inset-top, 0px)); z-index: 70;
  display: flex; align-items: center; gap: 12px; max-width: 94vw;
  background: var(--giallo); color: var(--navy); font-weight: 700; font-size: 13.5px;
  padding: 11px 14px; border-radius: 12px; box-shadow: 0 8px 22px rgba(20,26,42,.25);
}
.banner-sposta .banner-txt { line-height: 1.35; }
.banner-sposta .pulsante { min-height: 34px; padding: 6px 12px; }
body.sposta-mode .slot { outline: 2px dashed var(--giallo); outline-offset: 2px; cursor: copy; }
body.sposta-mode .slot .aggiungi { opacity: .35; }

/* campo compilato dall'OCR: va CONTROLLATO dall'operatore */
input.da-ocr { border-color: var(--giallo); background: #fffbe9; box-shadow: 0 0 0 3px rgba(255,201,28,.28); }

/* riga "Corriere": scelta manuale (l'etichetta la imposta da sola se scansionata) */
.corriere-riga { align-items: center; margin-top: 12px !important; }
.eti-chetta {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--tenue); flex: none;
}
.corrieri { display: flex; gap: 8px; flex-wrap: wrap; }
.corr {
  border: 2px solid var(--linea); background: #fff; color: var(--testo);
  border-radius: 10px; padding: 9px 13px; font-family: inherit; font-size: 13px;
  font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 7px;
  min-height: 42px;
}
.corr .punto { width: 11px; height: 11px; }
.corr:hover { border-color: var(--blu); }
.corr.scelto { border-color: var(--blu); background: #eef7fd; color: var(--blu); box-shadow: 0 0 0 3px rgba(0,132,206,.14); }

/* ---------- header: deve stare nella larghezza del telefono ---------- */
@media (max-width: 620px) {
  .barra { padding: 8px 12px; gap: 8px; }
  .barra-inv { padding-bottom: 12px; }
  .barra .titolo { font-size: 13px; }
  .barra .titolo small { display: none; }
  .barra .pillola { padding: 5px 10px; font-size: 11px; }
  .barra .pulsante.piccolo { padding: 8px 10px; font-size: 12px; }
  .logo.piccolo { width: 32px; height: 32px; font-size: 14px; }
}
@media (max-width: 430px) {
  .barra .titolo { display: none; }        /* restano logo + sede + pulsanti */
}

.mappa { display: flex; flex-direction: column; gap: 16px; }
.blocco {
  background: #fff; border: 1px solid var(--linea); border-radius: 16px;
  padding: 14px; box-shadow: 0 4px 14px rgba(20,26,42,.05);
}
.blocco-testa {
  font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 12px;
}
.blocco-testa small {
  font-weight: 600; font-size: 11px; color: var(--tenue); text-transform: none;
  letter-spacing: 0; margin-left: 6px;
}
.slot-griglia { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.slot-griglia.una { grid-template-columns: 1fr; }
@media (max-width: 900px) { .slot-griglia { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .slot-griglia { grid-template-columns: repeat(2, 1fr); } }

.slot {
  background: var(--bg); border: 1px solid var(--linea); border-radius: 11px;
  padding: 8px; display: flex; flex-direction: column; min-height: 92px;
}
.slot-testa {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--tenue); padding: 2px 2px 7px;
}
.aggiungi {
  border: 0; background: var(--navy); color: #fff; width: 26px; height: 26px;
  border-radius: 8px; font-size: 16px; line-height: 1; cursor: pointer; flex: none;
  display: grid; place-items: center;
}
.aggiungi:hover { filter: brightness(1.2); }
.slot-lista { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 220px; }
.slot-vuoto { font-size: 11.5px; color: #b3b9c7; font-style: italic; padding: 4px 2px; }

.pacco {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  border: 1px solid var(--linea); background: #fff; border-radius: 9px;
  padding: 8px 9px; font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--testo); cursor: pointer; transition: transform .06s, box-shadow .12s;
}
.pacco:hover { box-shadow: 0 3px 10px rgba(20,26,42,.12); }
.pacco:active { transform: scale(.98); }
.pacco.off { opacity: .22; }
.pacco.match { border-color: var(--giallo); box-shadow: 0 0 0 2px rgba(255,201,28,.55); }
.p-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.punto { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.punto.grande { width: 15px; height: 15px; }
.p-colli { font-size: 11.5px; font-weight: 800; color: var(--blu); flex: none; }
.p-nota { font-size: 12px; flex: none; }

/* scheda dettaglio */
.velo {
  position: fixed; inset: 0; background: rgba(20,26,42,.5); z-index: 60;
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
@media (min-width: 620px) { .velo { align-items: center; padding: 20px; } }
.scheda {
  background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0;
  padding: 20px; max-height: 88vh; overflow-y: auto;
}
@media (min-width: 620px) { .scheda { border-radius: 18px; } }
.scheda-testa {
  display: flex; align-items: center; gap: 10px; font-size: 18px;
  padding-bottom: 12px; border-bottom: 3px solid var(--linea); margin-bottom: 14px;
}
.schede-righe { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 0 0 16px; }
.schede-righe dt { font-size: 11.5px; font-weight: 800; color: var(--tenue); text-transform: uppercase; letter-spacing: .05em; }
.schede-righe dd { margin: 0; font-size: 14px; }
.schede-righe code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.scheda-azioni { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.pulsante.ritira { background: #0a7a3f; }

/* ---------------------------------------------------------- splash di avvio */
/* Appare una volta per login. La classe .splash-attivo la mette su <html> uno
   script inline nell'<head> di app.html, prima del primo disegno: così non si
   vede mai l'app "sbucare" dietro. */
.splash {
  position: fixed; inset: 0; z-index: 200;
  background: #fff;
  display: none; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px
           calc(env(safe-area-inset-bottom, 0px) + 16px);
  opacity: 1; transition: opacity .42s ease;
  cursor: pointer;
}
html.splash-attivo .splash { display: flex; }
.splash.via { opacity: 0; pointer-events: none; }
.splash picture { display: block; }
.splash img {
  display: block; width: auto; height: auto;
  max-width: min(88vw, 470px);
  max-height: min(72vh, 620px);
  -webkit-user-select: none; user-select: none;
}
.splash-salta {
  position: absolute; left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  text-align: center; font-size: 12.5px; font-weight: 600;
  letter-spacing: .04em; color: #9aa2b1;
  opacity: 0; animation: splashSaltaIn .5s ease 1.6s forwards;
}
@keyframes splashSaltaIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .splash img { max-width: min(70vw, 320px); }
  .splash-salta { animation: none; opacity: 1; }
}



/* ==================================================================
   RIFINITURE — logo reale, animazioni, micro-interazioni, responsive
   ================================================================== */

/* ---------- logo reale (immagine) ---------- */
.logo-img { width: 62px; height: 62px; flex: none; display: block; }
img.logo { background: none; }
.logo-img, img.logo { -webkit-user-drag: none; user-select: none; }

/* ---------- transizioni di base ---------- */
input[type=text], input[type=password], input[type=number] {
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.pulsante { transition: filter .16s ease, transform .1s ease, box-shadow .16s ease; }
.pulsante:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.negozio {
  position: relative;
  transition: transform .16s cubic-bezier(.2,.7,.3,1), border-color .16s ease,
              background .16s ease, color .16s ease, box-shadow .16s ease;
}
.negozio:hover { transform: translateY(-1px); border-color: #cfd7e6; box-shadow: 0 4px 12px rgba(20,26,42,.07); }
.negozio.scelto:hover { transform: none; }
.mini { transition: border-color .15s ease, color .15s ease, background .15s ease, transform .1s ease; }
.mini:active { transform: scale(.97); }
.cred, .nuovo, .slot { transition: box-shadow .18s ease, border-color .18s ease; }
.cred:hover { box-shadow: 0 10px 24px rgba(20,26,42,.09); }

/* pallino colore della sede sui due pulsanti di scelta */
.negozio::before {
  content: ""; position: absolute; top: 10px; right: 10px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--linea);
}
.negozio.montenero::before { background: var(--blu); }
.negozio.washington::before { background: var(--rosso); }

/* ---------- animazioni d'ingresso ---------- */
@keyframes sale    { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes scivola { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
@keyframes veloIn  { from { opacity: 0; } to { opacity: 1; } }

.card-accesso  { animation: sale .42s cubic-bezier(.2,.75,.3,1) both; }
.errore        { animation: scivola .26s ease-out both; }
.avviso-blocco { animation: scivola .3s ease-out both; }
.avviso        { animation: sale .28s ease-out both; }
.velo          { animation: veloIn .22s ease-out both; }
.scheda        { animation: sale .3s cubic-bezier(.2,.75,.3,1) both; }

/* ---------- splash: l'immagine entra con delicatezza, l'uscita sfuma ---------- */
@keyframes splashImg { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
.splash { transition: opacity .5s ease; }
.splash img { animation: splashImg .55s cubic-bezier(.2,.75,.3,1) both; }

/* ---------- telefono: il form del pacco si impila (niente campi schiacciati) ---------- */
@media (max-width: 620px) {
  .nuovo-riga { flex-direction: column; align-items: stretch; }
  .nuovo .campo { flex: none; width: 100%; min-width: 0; }
  .nuovo .campo.stretto { width: 96px; }
  .codice-campo { width: 100%; min-width: 0; }
  .corriere-riga { flex-direction: column; align-items: flex-start; gap: 8px; }
  .logo-img { width: 54px; height: 54px; }
}

/* ---------- login: un fondo morbido invece del vuoto piatto ---------- */
.centro { background: radial-gradient(900px 480px at 50% 0%, #eef6fd 0%, var(--bg) 70%); }

/* ---------- schermi larghi: usa lo spazio ---------- */
@media (min-width: 1100px) {
  main { max-width: 1180px; }
  .card-accesso { max-width: 470px; padding: 34px 32px; box-shadow: 0 26px 64px rgba(20,26,42,.13); }
  .centro { background: radial-gradient(1200px 600px at 50% -6%, #e9f3fc 0%, var(--bg) 60%); }
}

/* ---------- chi preferisce meno movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
