/* Portale Transmart - grafica del cockpit, tema "Vetro".
   Sfondo caldo sfumato, pannelli in vetro smerigliato (bianco traslucido con sfocatura), accento verde acqua,
   pulsanti a pillola scuri. Sul computer binario di icone tonde a sinistra e barra a pillola in alto; sul telefono
   menu flottante a pillola in basso. Barlow Semi Condensed per numeri e titoli, IBM Plex Sans per il testo. */
:root {
  --accent: #1f9e86; --accent-soft: rgba(31, 158, 134, .14); --teal: #1f9e86; --todo: #3a62c4; --dark-pill: #17181c;
  --bg: #d9cbb9; --surface: rgba(255, 255, 255, .62); --g-bg: rgba(255, 255, 255, .34); --g-line: rgba(255, 255, 255, .55);
  --g-shadow: 0 10px 30px rgba(60, 40, 20, .12), inset 0 1px 0 rgba(255, 255, 255, .55);
  --ink: #1c1b1a; --ink-2: #3e3934; --muted: #5d5750; --line: rgba(255, 255, 255, .55); --line-2: rgba(60, 40, 20, .10);
  --ok: #15803d; --warn: #b45309; --bad: #c0262d;
  /* nomi usati dai componenti del portale, rimappati sul tema */
  --navy: var(--dark-pill); --navy-2: #2b2724; --blue: var(--accent); --blue-soft: var(--accent-soft); --sky: #8fcfc2;
  --paper: rgba(255, 255, 255, .5); --panel: var(--g-bg);
  --yellow: #f6b218; --yellow-soft: rgba(255, 236, 190, .75); --red: var(--bad); --red-soft: rgba(252, 226, 226, .8); --green: var(--ok); --green-soft: rgba(226, 243, 231, .8);
  --stripes: repeating-linear-gradient(-45deg, #ffc93c 0 6px, #ffe39a 6px 12px);
  --shadow: var(--g-shadow); --blur: blur(22px) saturate(1.5);
  --r-sm: 8px; --r: 14px; --r-lg: 22px; --nav-h: 66px;
  --font-display: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { font-family: var(--font-body); color: var(--ink); font-size: 15px; line-height: 1.45; min-height: 100vh;
  -webkit-tap-highlight-color: transparent; font-variant-numeric: tabular-nums;
  background:
    radial-gradient(42% 52% at 12% 18%, rgba(255, 248, 236, .95) 0, transparent 70%),
    radial-gradient(38% 46% at 88% 8%, rgba(214, 186, 150, .9) 0, transparent 70%),
    radial-gradient(46% 50% at 72% 92%, rgba(140, 104, 72, .75) 0, transparent 70%),
    radial-gradient(30% 36% at 34% 78%, rgba(196, 170, 138, .8) 0, transparent 70%),
    radial-gradient(26% 30% at 55% 40%, rgba(255, 255, 255, .55) 0, transparent 70%),
    linear-gradient(135deg, #efe6da 0%, #cdb79c 55%, #a48a6c 100%);
  background-attachment: fixed; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); background: rgba(255, 255, 255, .55); border: 1px solid var(--g-line); border-radius: 12px; padding: 11px 12px; width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* vetro: tutti i pannelli */
.panel, .board, .saldo, .g-card, .tabbar, .topbar, .side nav, .toast, .login, .r-card, .tipo-sel button, .seg, .filtri button, .passo button, .mese .d, .chip {
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) { :root { --g-bg: rgba(255, 255, 255, .82); } }

/* ---------- marchio: cerchio scuro con la T, come il cockpit */
.brand { display: grid; place-items: center; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--dark-pill); color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); flex: none; }

/* ---------- avvio */
.avvio { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; }
.avvio .brand-mark { width: 60px; height: 60px; font-size: 26px; animation: respiro 1.4s ease-in-out infinite; }
@keyframes respiro { 50% { opacity: .55; } }

/* ---------- accesso */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 400px; background: var(--g-bg); border: 1px solid var(--g-line); border-radius: 26px; padding: 28px 26px; box-shadow: var(--g-shadow); }
.login h1 { font-family: var(--font-display); font-size: 46px; line-height: 1; font-weight: 700; margin: 26px 0 8px; }
.login p { color: var(--muted); margin-bottom: 24px; }
.login .btn svg { background: #fff; border-radius: 50%; padding: 2px; width: 22px; height: 22px; }
.login .note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.err { margin-top: 14px; background: var(--red-soft); color: var(--red); border-radius: var(--r); padding: 10px 14px; font-size: 14px; font-weight: 600; }

/* ---------- guscio: binario di icone + barra a pillola */
.guscio { display: grid; grid-template-columns: 92px minmax(0, 1fr); min-height: 100vh; align-content: start; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0 16px; z-index: 30; }
.side nav { display: flex; flex-direction: column; gap: 6px; background: var(--g-bg); border: 1px solid var(--g-line); box-shadow: var(--g-shadow);
  border-radius: 999px; padding: 10px 8px; max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: none; }
.side nav a, .rail-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #2b2724; text-decoration: none; flex: none; }
.side nav a:hover, .rail-btn:hover { background: rgba(255, 255, 255, .55); }
.side nav a[aria-current="page"] { background: var(--dark-pill); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.rail-sep { display: block; width: 24px; height: 1px; background: rgba(60, 40, 20, .18); margin: 4px auto; }
.side .grow { flex: 1; }
.rail-btn { background: var(--g-bg); border: 1px solid var(--g-line); }
.tb-b { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center; font-style: normal; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 12px; z-index: 25; display: flex; align-items: center; gap: 12px; margin: 16px 24px 0 4px; padding: 8px 10px 8px 12px;
  border-radius: 999px; background: var(--g-bg); border: 1px solid var(--g-line); box-shadow: var(--g-shadow); }
.tb-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--dark-pill); color: #fff; font-weight: 700; font-size: 13px; flex: 0 0 34px; }
.tb-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.tb-title h1 { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title span { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.tb-esci { display: none; width: 36px; height: 36px; border-radius: 50%; place-items: center; color: var(--ink-2); }
.tb-esci:hover { background: rgba(255, 255, 255, .55); }
.app { width: 100%; max-width: 1400px; padding: 20px 24px 40px 4px; }
.tabbar { display: none; }
.intro { color: var(--muted); font-size: 14px; margin: 0 2px 14px; max-width: 72ch; }
.azioni-pagina { margin-bottom: 14px; }
.sezione { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin: 22px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.app > .sezione:first-child { margin-top: 4px; }
.sezione small { font-family: var(--font-body); font-size: 13px; color: var(--muted); font-weight: 500; }

@media (max-width: 900px) {
  .guscio { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; padding: calc(8px + env(safe-area-inset-top)) 12px 0; }
  .side nav, .side .grow, .rail-btn { display: none; }
  .brand-mark { width: 36px; height: 36px; font-size: 17px; }
  .topbar { margin: 8px 12px 0; top: 8px; }
  .tb-title span, #tb-nuova { display: none; }
  .tb-esci { display: grid; }
  .app { padding: 14px 12px calc(var(--nav-h) + 40px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 35; justify-content: space-around;
    background: var(--surface); border: 1px solid var(--g-line); border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 6px; }
  .tabbar a { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted);
    text-decoration: none; font-size: 10.5px; font-weight: 500; }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .ic { width: 23px; height: 23px; }
  .tabbar [aria-current] { color: var(--accent); }
  .tabbar .tb-b { top: 0; right: auto; left: calc(50% + 6px); }
}

/* ---------- home a dashboard (dal cockpit) */
.dash { display: flex; flex-direction: column; gap: 18px; }
.dash-hd h2 { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1.1; }
.dash-hd p { margin-top: 6px; color: var(--muted); }
.dash-hd p::first-letter { text-transform: uppercase; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.g-card { background: var(--g-bg); border: 1px solid var(--g-line); border-radius: 20px; box-shadow: var(--g-shadow); padding: 18px 20px; min-width: 0; color: var(--ink); text-align: left; font: inherit; }
.g-h { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.g-h h3 { font-size: 14.5px; font-weight: 600; }
.g-h span { font-size: 12px; color: var(--muted); }
.g-s { color: var(--muted); font-size: 13px; margin: 10px 0 2px; }
.d-kpis { grid-column: span 12; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.d-kpi { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; cursor: pointer; min-height: 132px; transition: transform .12s, box-shadow .12s; }
.d-kpi:hover { transform: translateY(-2px); }
.d-kpi i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(28, 27, 26, .07); font-style: normal; }
.d-kpi i .ic { width: 16px; height: 16px; color: var(--muted); }
.d-kpi > b { font-family: var(--font-display); font-size: 38px; font-weight: 700; line-height: 1; }
.d-kpi > b.testo { font-size: 26px; }
.d-kpi > b.bad { color: var(--bad); }
.d-kpi > div:last-child { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.d-kpi.hi { background: linear-gradient(150deg, color-mix(in srgb, var(--teal) 80%, #fff), var(--teal)); border-color: rgba(255, 255, 255, .35); color: #fff; }
.d-kpi.hi h3 { color: rgba(255, 255, 255, .88); }
.d-kpi.hi i { background: rgba(255, 255, 255, .2); } .d-kpi.hi i .ic { color: #fff; }
.dpill { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.dpill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.dpill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.dpill.wh { background: rgba(255, 255, 255, .28); color: #fff; }
.d-assenti { grid-column: span 5; }
.d-assenti .chi { margin-top: 12px; }
.d-app { grid-column: span 7; }
.d-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; }
.happ { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 8px; border-radius: 16px; color: var(--ink); text-decoration: none; transition: background .12s; }
.happ:hover { background: rgba(255, 255, 255, .45); }
.happ:active .happ-ic { transform: scale(.95); }
.happ-ic { position: relative; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: #2b2724;
  box-shadow: 0 8px 18px rgba(16, 27, 44, .18), inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -3px 0 rgba(0, 0, 0, .14); transition: transform .1s; }
.happ-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.happ-l { font-weight: 600; font-size: 12.5px; text-align: center; line-height: 1.2; }
.happ-b { position: absolute; top: -7px; right: -10px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--surface); color: var(--ink);
  font-style: normal; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .8); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.happ-b.bad { background: var(--bad); color: #fff; }
.ha-posta .happ-ic { background: linear-gradient(150deg, #ff8c42, #d94e0c); }
.ha-kanban .happ-ic { background: linear-gradient(150deg, #5a83e6, #2d50b0); }
.ha-progetti .happ-ic { background: linear-gradient(150deg, #22a3ae, #0b6c78); }
.ha-calendario .happ-ic { background: linear-gradient(150deg, #ec4b4f, #b31d26); }
.ha-gestione .happ-ic { background: linear-gradient(150deg, #2fa565, #156b3a); }
.ha-file .happ-ic { background: linear-gradient(150deg, #6b7b93, #3e4b5f); }
.ha-appunti .happ-ic { background: linear-gradient(150deg, #e8ac24, #b47702); }
@media (max-width: 1100px) { .d-assenti, .d-app { grid-column: span 12; } }
@media (max-width: 900px) {
  .dash-hd h2 { font-size: 26px; }
  .d-kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
  .d-kpi.larga { grid-column: 1 / -1; min-height: 0; }
  .d-kpi { min-height: 118px; padding: 14px 16px; }
  .d-apps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 2px; }
}

/* ---------- bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; background: var(--navy); color: #fff; transition: filter .12s, transform .1s; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.full { width: 100%; }
a.btn { text-decoration: none; }
.btn.light { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
.btn.blue { background: var(--blue); }
.btn.bianco { background: #fff; color: var(--navy); }
.btn.ok { background: var(--green); }
.btn.ko { background: var(--panel); color: var(--red); border: 1px solid #f0c9c2; }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.link { color: var(--blue); font-weight: 600; padding: 4px 2px; }

/* ---------- pannelli */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.panel.flat { padding: 4px 18px; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
.panel > .lbl:first-child { margin-top: 0; }
.muted { color: var(--muted); font-size: 14px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row > * { flex: 1; min-width: 0; }
.avviso { background: var(--yellow-soft); color: #7a5600; border-radius: var(--r); padding: 9px 12px; font-size: 14px; font-weight: 600; margin-top: 10px; }
.avviso.rosso { background: var(--red-soft); color: var(--red); }

/* ---------- avatar con iniziali */
.av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700;
  background: hsl(var(--h) 60% 91%); color: hsl(var(--h) 50% 28%); }
.av.sm { width: 26px; height: 26px; font-size: 10px; }

/* ---------- etichette */
.tag { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 8px; vertical-align: 1px; white-space: nowrap; }
.tag.richiesta { background: var(--stripes); color: var(--ink); }
.tag.approvata { background: var(--blue-soft); color: var(--blue); }
.tag.rifiutata { background: var(--red-soft); color: var(--red); }
.tag.annullata { background: var(--line-2); color: var(--muted); text-decoration: line-through; }
.tag.F { background: var(--navy); color: #fff; }
.tag.P { background: var(--line-2); color: var(--ink); }
.tag.ruolo { background: var(--blue-soft); color: var(--navy-2); }

/* ---------- controlli calendario */
.barra-cal { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--navy); color: #fff; }
.passo { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.passo button { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); font-size: 20px; line-height: 1; }
.passo .oggi { width: auto; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.periodo { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.periodo:first-letter { text-transform: uppercase; }

/* ---------- tabellone settimanale */
.board { --nome: 112px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.b-row { display: grid; grid-template-columns: var(--nome) repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line-2); min-height: 44px; }
.b-row:first-child { border-top: none; }
.b-row:has(.b-team) { min-height: 0; }
.b-head { min-height: 0; background: #f8fafc; border-bottom: 1px solid var(--line); }
.b-head .g { grid-row: 1; text-align: center; padding: 6px 0 5px; font-size: 12px; color: var(--muted); font-weight: 500; }
.b-head .g b { display: block; font-family: var(--font-display); font-size: 18px; color: var(--ink); font-weight: 700; }
.b-head .g.oggi b { background: var(--navy); color: #fff; border-radius: 8px; width: 30px; margin: 0 auto; }
.b-head .g.fest b, .b-head .g.we b { color: var(--muted); }
.b-head .g .conta { display: inline-block; margin-top: 3px; min-width: 18px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 11px; line-height: 16px;
  font-weight: 700; background: var(--line); color: var(--ink); }
.b-head .g .conta.troppi { background: var(--red); color: #fff; }
.b-team { grid-column: 1 / -1; padding: 10px 12px 4px; font-size: 12.5px; font-weight: 700; color: var(--navy-2); }
.b-nome { grid-row: 1; grid-column: 1; padding: 6px 8px 6px 12px; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500;
  min-width: 0; border-right: 1px solid var(--line-2); }
.b-nome span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
.b-nome .av { display: none; }
.b-nome.io span { font-weight: 700; }
.b-cella { grid-row: 1; border-left: 1px solid var(--line-2); }
.b-cella.we, .b-cella.fest { background: #f8fafc; }
.b-cella.oggi { background: rgba(37, 99, 217, .06); }
.b-row > .b-cella:nth-child(2) { border-left: none; }
.barra { grid-row: 1; z-index: 1; margin: 9px 3px; border-radius: 6px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600;
  display: flex; align-items: center; padding: 0 8px; overflow: hidden; white-space: nowrap; min-height: 24px; }
.barra.richiesta { background: var(--stripes); color: var(--ink); }
.barra.io { box-shadow: inset 0 0 0 2px var(--navy); }
.barra.sel { outline: 3px solid var(--yellow); outline-offset: 1px; }
.b-vuoto { padding: 26px 16px; text-align: center; color: var(--muted); }

/* ---------- mese */
.mese { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.mese .dow { text-align: center; font-size: 12px; font-weight: 500; color: var(--muted); padding-bottom: 2px; }
.mese .d { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; min-height: 58px; padding: 5px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; }
.mese .d .n { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.mese .d.out { visibility: hidden; }
.mese .d.we, .mese .d.fest { background: #f8fafc; }
.mese .d.we .n, .mese .d.fest .n { color: var(--muted); }
.mese .d.oggi .n { background: var(--navy); color: #fff; border-radius: 6px; padding: 0 6px; align-self: flex-start; }
.mese .d.sel { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.mese .d.conflitto { border-color: var(--red); }
.segni { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.segni i { width: 100%; height: 5px; border-radius: 3px; background: var(--blue); }
.segni i.richiesta { background: var(--stripes); }
.segni em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-2); }

.legenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin: 10px 2px; }
.legenda i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; background: var(--blue); }
.legenda i.richiesta { background: var(--stripes); }
.legenda i.troppi { width: 14px; height: 14px; border-radius: 7px; background: var(--red); vertical-align: -2px; }

/* ---------- elenchi */
.lista { list-style: none; }
.voce { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line-2); }
.voce:first-child { border-top: none; }
.voce .corpo { flex: 1; min-width: 0; }
.voce .corpo b { font-size: 15px; font-weight: 600; }
.voce .riga2 { color: var(--muted); font-size: 14px; margin-top: 2px; }
.voce .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.azioni { display: flex; gap: 8px; margin-top: 12px; }
.azioni .btn { flex: 1; }
.voce.spenta b { color: var(--muted); text-decoration: line-through; }

.richiesta-card { position: relative; padding-left: 22px; overflow: hidden; }
.richiesta-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--stripes); }
.richiesta-card .quando { font-family: var(--font-display); font-size: 23px; font-weight: 700; margin: 8px 0 2px; }

.oggi-box { display: flex; align-items: center; gap: 14px; }
.oggi-box .num { font-family: var(--font-display); font-size: 48px; font-weight: 700; line-height: 1; color: var(--navy); }
.chi { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--paper); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: 13px; font-weight: 500; }

/* ---------- buste paga */
.busta-riga select { margin-top: 8px; }
.pin-box b { font-family: var(--font-display); font-size: 22px; }
.pin-box .muted { margin: 4px 0 6px; }
input.pin { font-family: var(--font-display); font-size: 30px; letter-spacing: .5em; text-align: center; padding: 12px; }
.b-file { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.b-file:empty { display: none; }

/* ---------- Gestione (admin) */
.voce-gest { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-2); text-align: left; }
.voce-gest:first-child { border-top: none; }
.voce-gest svg { width: 42px; height: 42px; padding: 10px; border-radius: 12px; flex: none; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  background: var(--trama), linear-gradient(150deg, var(--blue), var(--navy)); }
.voce-gest .corpo { flex: 1; min-width: 0; }
.voce-gest b { font-size: 16px; font-weight: 600; }
.voce-gest .riga2 { color: var(--muted); font-size: 14px; }
.badge-g { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; min-width: 24px; padding: 2px 7px; text-align: center; }
.freccia { color: var(--muted); font-size: 24px; line-height: 1; }

.t-ora { font-family: var(--font-display); font-size: 22px; font-weight: 700; min-width: 64px; padding-top: 1px; }
.t-ora.E { color: var(--blue); }
.t-ora.U { color: var(--navy); }
.timbro.spenta .t-ora { color: var(--muted); text-decoration: line-through; }
.t-tot { font-family: var(--font-display); font-size: 18px; font-weight: 700; white-space: nowrap; align-self: center; }
.t-tot.dentro { color: var(--blue); font-size: 15px; }
.t-chip { cursor: pointer; background: var(--blue-soft); color: var(--navy-2); }
.t-chip.annullata { background: var(--line-2); color: var(--muted); text-decoration: line-through; }
.cifre-chiare { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 2px 10px; color: var(--ink-2); font-size: 14px; }
.cifre-chiare b { font-family: var(--font-display); font-size: 20px; color: var(--ink); margin-right: 3px; }
.cifre-chiare .rosso b, .cifre-chiare .rosso { color: var(--red); }
.timbro-cifra em { font-family: var(--font-display); font-size: 22px; }

/* ---------- richiesta */
.tipo-sel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tipo-sel button { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; text-align: left; }
.tipo-sel button b { display: block; font-size: 16px; font-weight: 600; }
.tipo-sel button span { font-size: 13px; color: var(--muted); }
.tipo-sel button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tipo-sel button.on span { color: var(--sky); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin-top: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }
.conto { display: flex; align-items: baseline; gap: 14px; background: var(--blue-soft); border-radius: var(--r); padding: 12px 16px; margin-top: 16px; }
.conto b { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--navy); }
.conto span { color: var(--ink-2); font-size: 14px; }

/* ---------- saldi */
.saldi-griglia { display: grid; gap: 10px; }
.saldo { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.saldo .testa { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.saldo .testa b { font-size: 15px; font-weight: 600; line-height: 1.2; }
.saldo .testa .riga2 { font-size: 13px; color: var(--muted); }
.saldo .valori { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.saldo .val { border-top: 3px solid var(--navy); padding-top: 8px; }
.saldo .val.P { border-top-color: var(--sky); }
.saldo .val small { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
.saldo .val strong { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.1; }
.saldo .val strong u { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.saldo .val .poi { font-size: 12.5px; color: var(--ink-2); }
.saldo .val.neg strong { color: var(--red); }
.saldo .val input { margin-top: 6px; padding: 8px 10px; }
.filtri { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 6px; margin-bottom: 10px; scrollbar-width: none; }
.filtri button { flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 500; }
.filtri button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.barra-salva { position: sticky; bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); z-index: 5; display: flex; gap: 8px; align-items: flex-end;
  color: #fff; border-radius: var(--r-lg); padding: 12px; margin-top: 12px; box-shadow: 0 12px 30px rgba(15, 37, 80, .3);
  background: var(--trama), var(--navy); }
.barra-salva .lbl { color: var(--sky); margin-top: 0; }
.barra-salva .btn { background: #ffc93c; color: var(--ink); }

/* ---------- importazione: passaggi in sequenza */
.passi { counter-reset: passo; }
.passo-imp { position: relative; padding-left: 56px; }
.passo-imp::before { counter-increment: passo; content: counter(passo); position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 8px;
  background: var(--navy); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 15px; display: grid; place-items: center; }
.passo-imp h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.passo-imp input[type=file] { padding: 9px; margin-top: 10px; background: var(--paper); }
.esito { margin-top: 10px; font-size: 14px; }
.esito ul { margin: 6px 0 0 18px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 500; max-width: 90vw; box-shadow: 0 10px 26px rgba(15, 37, 80, .3); }

@media (min-width: 760px) {
  .board { --nome: 200px; }
  .b-nome .av { display: inline-grid; }
  .b-row { min-height: 48px; }
  .barra { font-size: 12px; }
  .mese .d { min-height: 86px; }
  .saldi-griglia { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}

/* ---------- componenti in vetro (sovrascrive i colori pieni) */
.panel { border-color: var(--g-line); border-radius: 22px; }
.board, .saldo { border-color: var(--g-line); border-radius: 22px; }
.btn { background: var(--dark-pill); }
.btn.light, .btn.ko { background: rgba(255, 255, 255, .5); border: 1px solid var(--g-line); }
.btn.primary { background: var(--dark-pill); color: #fff; padding: 9px 16px; font-size: 14px; }
.btn.primary .ic { width: 16px; height: 16px; }
.btn.blue, .btn.entra { background: var(--accent); }
.btn.ok { background: var(--accent); }
.link { color: var(--accent); }
.seg, .passo button, .filtri button, .tipo-sel button { background: rgba(255, 255, 255, .5); border-color: var(--g-line); }
.b-head { background: rgba(255, 255, 255, .35); border-color: var(--g-line); }
.b-cella.we, .b-cella.fest, .mese .d.we, .mese .d.fest { background: rgba(255, 255, 255, .22); }
.b-cella.oggi { background: var(--accent-soft); }
.b-team { color: var(--ink-2); }
.mese .d { background: var(--g-bg); border-color: var(--g-line); border-radius: 12px; }
.chip { background: rgba(255, 255, 255, .55); }
.tag.approvata { background: var(--accent-soft); color: #0f6e5c; }
.tag.ruolo { background: var(--accent-soft); color: #0f6e5c; }
.tag.P, .tag.annullata { background: rgba(28, 27, 26, .07); }
.t-chip { background: var(--accent-soft); color: #0f6e5c; }
.t-ora.E, .t-tot.dentro { color: #0f8a73; }
.conto { background: var(--accent-soft); }
.conto b { color: var(--ink); }
.barra-salva { background: var(--dark-pill); }
.barra-salva .lbl { color: rgba(255, 255, 255, .7); }
.barra-salva .btn { background: var(--accent); color: #fff; }
.saldo .val.P { border-top-color: var(--accent); }
.richiesta-card::before { width: 6px; }
.toast { background: var(--dark-pill); bottom: 24px; }
@media (max-width: 900px) { .toast { bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); } .barra-salva { bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); } }
.check input { accent-color: var(--accent); }
.tipo-sel button.on { background: var(--dark-pill); border-color: var(--dark-pill); }
.tipo-sel button.on span { color: rgba(255, 255, 255, .7); }
.codice-abbina { font-family: var(--font-display); font-weight: 700; font-size: 44px; letter-spacing: .12em; text-align: center; color: var(--ink);
  background: var(--accent-soft); border-radius: var(--r); padding: 14px; margin: 10px 0; }
.passi-abb { padding-left: 20px; display: grid; gap: 4px; }

/* ---------- lettore del QR (fotocamera a schermo intero) */
.lettore-qr { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 0 20px calc(28px + env(safe-area-inset-bottom)); gap: 14px; color: #fff; }
.lettore-qr video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lettore-qr .mirino { position: absolute; top: 50%; left: 50%; width: min(68vw, 300px); aspect-ratio: 1; transform: translate(-50%, -58%);
  border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); outline: 3px solid #fff; }
.lettore-qr p, .lettore-qr button { position: relative; }
.lettore-qr p { font-weight: 600; font-size: 17px; }
.lettore-qr .btn { background: rgba(255, 255, 255, .9); color: var(--ink); }

/* ---------- pagina rapida per smartphone (/t) */
.marchio { display: flex; align-items: center; gap: 10px; }
.marchio span:not(.brand-mark) { font-family: var(--font-display); font-weight: 700; font-size: 20px; white-space: nowrap; }
main.rapida { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }
.r-attesa { flex: 1; display: grid; place-items: center; }
.r-attesa .brand-mark { width: 60px; height: 60px; font-size: 26px; animation: respiro 1.4s ease-in-out infinite; }
.r-top { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 16px 0; }
.r-top .marchio .brand-mark { width: 36px; height: 36px; font-size: 17px; }
.r-top .esci { border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 500; background: var(--g-bg); border: 1px solid var(--g-line); box-shadow: var(--g-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.r-testa { padding: 28px 18px 4px; }
.r-ora { font-family: var(--font-display); font-weight: 700; font-size: 96px; line-height: .9; letter-spacing: .005em; }
.r-data { color: var(--muted); font-size: 16px; margin-top: 8px; }
.r-data::first-letter { text-transform: uppercase; }
.r-corpo { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); width: 100%; }
.r-corpo h1 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.r-nota { color: var(--muted); }
.r-stato { background: var(--g-bg); border: 1px solid var(--g-line); box-shadow: var(--g-shadow); border-radius: 22px; padding: 16px 18px; font-size: 17px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.r-stato b { font-family: var(--font-display); font-size: 24px; }
.r-stato.servizio { background: linear-gradient(150deg, color-mix(in srgb, var(--teal) 80%, #fff), var(--teal)); color: #fff; border-color: rgba(255, 255, 255, .35); }
.r-stato.anomalia { background: var(--yellow-soft); color: #6e4d00; }
.r-fatto { border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 2px; color: #fff; box-shadow: var(--g-shadow);
  background: linear-gradient(150deg, color-mix(in srgb, var(--teal) 80%, #fff), var(--teal)); }
.r-fatto.U { background: var(--dark-pill); }
.r-fatto b { font-family: var(--font-display); font-size: 28px; line-height: 1.1; }
.r-fatto span { font-size: 16px; opacity: .9; }
.btn.grande { padding: 18px 20px; font-size: 18px; font-family: var(--font-display); letter-spacing: .02em; }
.r-corpo .btn.grande { margin-top: auto; padding: 24px 20px; font-size: 22px; box-shadow: 0 10px 26px rgba(0, 0, 0, .2); }
.btn.esce { background: var(--dark-pill); }

/* ---------- totem dell'ingresso (/totem): vetro scuro */
body.totem { color: #f1ece6; background: radial-gradient(40% 50% at 14% 16%, rgba(120, 88, 60, .55) 0, transparent 70%), radial-gradient(36% 44% at 86% 10%, rgba(31, 158, 134, .25) 0, transparent 70%),
  radial-gradient(46% 50% at 70% 92%, rgba(90, 62, 40, .6) 0, transparent 70%), linear-gradient(135deg, #1e1a17, #141210 60%, #0e0d0c); background-attachment: fixed; }
main.totem { min-height: 100vh; min-height: 100dvh; display: flex; }
.totem .r-attesa .brand-mark, .totem .brand-mark { background: #f1ece6; color: #17181c; }
.k-schermo { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: calc(20px + env(safe-area-inset-top)) 24px 28px; text-align: center; }
.k-alto { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.k-ora { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1; }
.k-qr { width: min(78vw, 62vh, 520px); aspect-ratio: 1; background: #fff; border-radius: 28px; padding: 12px; margin-top: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.k-qr svg { width: 100%; height: 100%; display: block; }
.k-qr.spento { background: rgba(255, 255, 255, .1); box-shadow: none; }
.k-barra { width: min(78vw, 62vh, 520px); height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.k-barra i { display: block; height: 100%; width: 100%; background: #37c2a6; transition: width .25s linear; }
.k-schermo h1 { font-family: var(--font-display); font-size: clamp(26px, 5vw, 44px); line-height: 1.1; }
.k-schermo p { color: #b3aaa0; font-size: 17px; margin-bottom: auto; }
.k-abbina { margin: auto; width: min(92vw, 420px); display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 26px;
  background: rgba(32, 29, 27, .45); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.k-abbina h1 { font-family: var(--font-display); font-size: 32px; margin-top: 14px; }
.k-abbina p { color: #b3aaa0; }
.k-abbina input { font-family: var(--font-display); font-size: 34px; text-align: center; letter-spacing: .14em; text-transform: uppercase; padding: 14px; background: rgba(255, 255, 255, .92); }
.k-abbina .btn { background: #37c2a6; color: #0e0d0c; }
