/* ============================================================================
   GSC Studio Esoterika — console operativa
   Direzione: professionale, calma, alta leggibilità (turni lunghi), densa ma ariosa.
   Superfici chiare; chrome ardesia; accento teal; stato = barra+pallino+etichetta.
   Font: IBM Plex Sans (UI) + IBM Plex Mono (cifre/timer).
   ========================================================================== */
:root{
  /* superfici */
  --bg:#eef1f6; --surface:#ffffff; --surface-2:#f6f8fb; --line:#dde3ec; --line-2:#c9d2e0;
  --ink:#172033; --ink-2:#3b475c; --muted:#7b8699;
  /* chrome scuro */
  --slate:#16202e; --slate-2:#1e2b3d; --slate-line:#2b3a4f; --on-slate:#e7edf6; --on-slate-mut:#9fb0c6;
  /* accento */
  --accent:#0f8f86; --accent-2:#0b736c; --accent-soft:#e2f3f1; --focus:#1aa39a;
  /* stati operatore (accessibili, distinguibili) */
  --s-free:#2a9d5c; --s-busy:#d64545; --s-book:#d9920a; --s-pause:#2f7fd1; --s-ring:#7c5cd0; --s-off:#9aa3b2;
  /* badge produttività */
  --p-high:#2a9d5c; --p-mid:#d9920a; --p-low:#d76262; --p-prog:#8a93a5;
  --radius:10px; --radius-s:7px; --shadow:0 1px 2px rgba(16,24,40,.06),0 4px 16px rgba(16,24,40,.06);
  --shadow-lg:0 12px 40px rgba(16,24,40,.22);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0; background:var(--bg); color:var(--ink);
  font-family:"IBM Plex Sans",ui-sans-serif,system-ui,sans-serif; font-size:14px; line-height:1.45;
  -webkit-font-smoothing:antialiased}
.mono{font-family:"IBM Plex Mono",ui-monospace,monospace; font-variant-numeric:tabular-nums}
a{color:var(--accent-2); text-decoration:none; cursor:pointer}
a:hover{color:var(--accent)}
.muted{color:var(--muted)}
h1,h2,h3{margin:.2em 0 .5em; font-weight:600; letter-spacing:-.01em}
::selection{background:var(--accent-soft)}

/* plancia: le regole della plancia di PRIMA (spie, topbar, menu, card, pannelli) sono in plancia-vecchia.css (14/10/2026);
   la plancia a pannelli ha le sue in plancia.css, tutte sotto #plancia */

/* ---------- filtri ---------- */
/* ---------- form controls ---------- */
select,input,textarea{font:inherit; color:var(--ink); background:var(--surface);
  border:1px solid var(--line-2); border-radius:var(--radius-s); padding:9px 11px; width:100%}
select:focus,input:focus,textarea:focus{outline:none; border-color:var(--focus); box-shadow:0 0 0 3px var(--accent-soft)}
label{display:block; margin:0 0 4px; font-size:.85em; color:var(--ink-2); font-weight:500}
.field{margin:0 0 14px}
button,.btn{font:inherit; font-weight:600; border:1px solid transparent; border-radius:var(--radius-s);
  padding:9px 16px; cursor:pointer; background:var(--accent); color:#fff; transition:filter .12s, transform .04s}
button:hover,.btn:hover{filter:brightness(1.06)} button:active,.btn:active{transform:translateY(1px)}
.btn-ghost{background:var(--surface); color:var(--ink-2); border-color:var(--line-2)}
.btn-ghost:hover{filter:none; border-color:var(--accent); color:var(--accent-2)}
.btn-danger{background:var(--s-busy)} .btn-sm{padding:5px 10px; font-size:.85em}
button:disabled,.btn:disabled{opacity:.5; cursor:not-allowed}

.op-link{cursor:pointer; color:inherit} .op-link:hover{color:var(--accent-2); text-decoration:underline}
.tbl{width:100%; border-collapse:collapse; font-size:.88em}
.tbl td{padding:9px 12px; border-bottom:1px solid var(--surface-2)}
.tbl tr:last-child td{border-bottom:0} .tbl tr:hover{background:var(--surface-2)}
.when{font-family:"IBM Plex Mono",monospace; font-weight:600; white-space:nowrap}
.wait{font-family:"IBM Plex Mono",monospace; font-weight:600; text-align:right; white-space:nowrap; color:var(--s-busy)}
.tag{display:inline-block; font-size:.74em; padding:1px 7px; border-radius:20px; background:var(--accent-soft); color:var(--accent-2); font-weight:600}
/* plancia: scroll pannelli + legenda tipo cliente (cortesia/899/altro) */
.tblwrap{max-height:340px; overflow-y:auto}
.legend{font-weight:400; letter-spacing:0; text-transform:none; font-size:.8em; color:var(--muted); white-space:nowrap}
.legend i{display:inline-block; width:9px; height:9px; border-radius:2px; vertical-align:middle; margin:0 2px 0 8px}
.tag-web{background:#e8eefc;color:#2f5bd1} .tag-app{background:#eef0ff;color:#5a4bd0} .tag-tel{background:#eef4ee;color:#2a7d4f} .tag-astra{background:#fbeefb;color:#8a2f8f}   /* astra: centralino AI (16/10/2026) */
/* GAP (pausa / off ritardo): slot bloccato senza cliente — ambra, distinto da cortesia/899/altro */
tr.ap-gap td{background:color-mix(in srgb, #d98b1f 16%, transparent)}
tr.ap-gap td:first-child{box-shadow:inset 4px 0 #d98b1f}
.gap-lbl{display:inline-flex; align-items:center; gap:5px; font-style:italic; font-weight:600; color:#9a641a}
.tag-gap{background:#f6e6c6; color:#9a641a}
.iconbtn{color:var(--muted); cursor:pointer; padding:2px 3px; display:inline-flex; align-items:center; vertical-align:middle} .iconbtn:hover{color:var(--accent-2)}
.ico{display:inline-block; vertical-align:middle; flex:0 0 auto} a .ico{vertical-align:-0.15em}

/* ---------- login ---------- */
.login-wrap{min-height:100vh; display:grid; place-items:center;
  background:radial-gradient(1200px 500px at 50% -10%,rgba(15,143,134,.10),transparent),var(--bg)}
.login{width:340px; background:var(--surface); border:1px solid var(--line); border-radius:14px;
  box-shadow:var(--shadow-lg); padding:28px}
.login .logo{text-align:center; font-weight:700; letter-spacing:.16em; color:var(--ink); margin-bottom:18px}
.login .logo .mk{color:var(--accent)}
.alert.err{background:#fdeaea; color:#b5302f; border:1px solid #f3c0bf; padding:9px 12px; border-radius:var(--radius-s); margin-bottom:12px; font-size:.9em}

/* ---------- modale (tutti i form) ---------- */
.modal-overlay{position:fixed; inset:0; background:rgba(16,24,40,.5); backdrop-filter:blur(3px);
  display:none; align-items:flex-start; justify-content:center; padding:6vh 16px; z-index:100}
.modal-overlay.open{display:flex; animation:fade .15s ease}
.modal{width:100%; max-width:560px; background:var(--surface); border-radius:14px; box-shadow:var(--shadow-lg);
  overflow:hidden; animation:pop .18s cubic-bezier(.2,.9,.3,1.2); max-height:88vh; display:flex; flex-direction:column}
.modal.lg{max-width:860px}
.modal .m-hd{display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid var(--line); flex:0 0 auto}
.modal .m-hd h2{margin:0; font-size:1.05em}
.modal .m-x{background:none; border:0; color:var(--muted); font-size:1.3em; padding:0 4px; cursor:pointer}
.modal .m-x:hover{color:var(--ink)}
.modal .m-bd{padding:18px; overflow:auto; flex:1 1 auto; min-height:0}
.modal .m-ft{padding:12px 18px; border-top:1px solid var(--line); display:flex; gap:10px; justify-content:flex-end; background:var(--surface-2); flex:0 0 auto}
.modal>form{display:flex; flex-direction:column; min-height:0; overflow:hidden}
body.modal-open{overflow:hidden}
.m-spin{padding:40px; text-align:center; color:var(--muted)}
.toast{position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--slate); color:#fff;
  padding:11px 18px; border-radius:var(--radius); box-shadow:var(--shadow-lg); z-index:200; opacity:0; transition:opacity .2s, transform .2s}
.toast.show{opacity:1; transform:translateX(-50%) translateY(-4px)}
.toast.err{background:var(--s-busy)} .toast.ok{background:var(--accent-2)}
.toast.warn{background:var(--s-book)} .toast{max-width:min(560px,92vw); text-align:center; line-height:1.35}
.month-fallback{display:inline-flex; gap:6px; vertical-align:middle}
.month-fallback select{padding:6px 8px}
/* Bottoni AI (generazione contenuti, insight) */
.btn-ai{display:inline-flex; align-items:center; gap:6px; background:var(--s-ring); color:#fff; border:0; padding:7px 12px; border-radius:8px; cursor:pointer; font-weight:600}
.btn-ai:hover{filter:brightness(1.08)} .btn-ai:disabled{opacity:.85; cursor:progress}
.btn-ai svg{width:15px; height:15px}
/* spinner mentre l'AI elabora (la classe .loading è messa/tolta da aiPost) */
.btn-ai.loading{color:transparent; position:relative}
.btn-ai.loading svg{visibility:hidden}
.btn-ai.loading::after{content:''; position:absolute; inset:0; margin:auto; width:16px; height:16px; border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:eso-spin .7s linear infinite}
@keyframes eso-spin{to{transform:rotate(360deg)}}
.rep-totali{width:100%}                          /* tabella totali report a piena larghezza */
.disc-col{width:28px; text-align:center}
.disc-flag{color:var(--s-busy); cursor:help} .disc-flag svg{width:16px; height:16px; vertical-align:middle}
/* Scroll SENZA scrollbar visibile, cross-browser (Firefox/Edge/Chrome/Safari) */
*{scrollbar-width:none; -ms-overflow-style:none}
*::-webkit-scrollbar{width:0; height:0; display:none}
.stat-link{cursor:pointer; text-decoration:none} .stat-on b{color:var(--s-free)}   /* chat attive presenti → verde */
/* #49 trend cliente: mini-barre mensili + badge variazione */
.ct-bars{display:flex; align-items:flex-end; gap:4px; height:64px; padding:6px 2px 0; border-bottom:1px solid var(--line)}
.ct-col{flex:1 1 0; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:3px; min-width:0}
.ct-bar{width:60%; max-width:16px; min-height:2px; background:var(--accent); border-radius:2px 2px 0 0; display:block}
.ct-lbl{font-size:.66em; color:var(--muted); font-family:"IBM Plex Mono",monospace}
.trend-badge{font-size:.8em; font-weight:600; padding:1px 8px; border-radius:20px; background:var(--surface-2)}
.trend-badge.trend-giu{color:#fff; background:var(--s-busy)} .trend-badge.trend-su{color:#fff; background:var(--s-free)} .trend-badge.trend-flat{color:var(--ink-2)}
.ai-bar{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:4px 0 12px}
.ai-bar .ai-hint{flex:1; min-width:220px; padding:8px 10px}
.ai-bar .ai-note{font-size:.8em}
.ai-frame{width:100%; height:320px; border:1px solid var(--line); border-radius:10px; background:#fff; margin-bottom:12px}
/* Console AI centrale */
.cai-log{border:1px solid var(--line); border-radius:10px; padding:10px; height:300px; overflow-y:auto; background:var(--surface-2); display:flex; flex-direction:column; gap:8px}
.cai-msg{max-width:82%; padding:8px 11px; border-radius:12px; white-space:pre-wrap; line-height:1.4}
.cai-user{align-self:flex-end; background:var(--accent); color:#fff}
.cai-ai{align-self:flex-start; background:#fff; border:1px solid var(--line)}
.cai-azione{align-self:flex-start; background:#fff; border:1px dashed var(--s-book); border-radius:12px; padding:9px 11px; display:flex; flex-direction:column; gap:7px}
.cai-input{display:flex; gap:8px; margin-top:10px}
.cai-input input{flex:1; padding:9px 11px}

/* scheda cliente (dentro modale) */
.scheda-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px 22px; margin-bottom:14px}
.scheda-grid .k{color:var(--muted); font-size:.82em} .scheda-grid .v{font-weight:600}
.saldo{font-family:"IBM Plex Mono",monospace; font-size:1.5em; font-weight:700}
.saldo.neg{color:var(--s-busy)} .saldo.pos{color:var(--s-free)}
.mov{width:100%; border-collapse:collapse; font-size:.86em} .mov td,.mov th{padding:7px 9px; border-bottom:1px solid var(--surface-2); text-align:left}
.mov .min-pos{color:var(--s-free); font-weight:600} .mov .min-neg{color:var(--s-busy); font-weight:600}
.result-list a{display:flex; justify-content:space-between; padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius-s); margin-bottom:6px}
.result-list a:hover{border-color:var(--accent); background:var(--accent-soft)}

@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes pop{from{opacity:0; transform:translateY(8px) scale(.98)}to{opacity:1; transform:none}}

/* scheda cliente — toolbar, sezioni, righe (modale lg) */
.toolbar{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 14px}
.tbtn{width:38px; height:38px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  background:var(--surface-2); border:1px solid var(--line-2); color:var(--ink-2); font-size:1.05em; cursor:pointer; padding:0}
.tbtn:hover{border-color:var(--accent); color:var(--accent-2); background:var(--accent-soft); filter:none}
.scheda2col{display:grid; grid-template-columns:1fr 1fr; gap:14px}
@media(max-width:680px){.scheda2col{grid-template-columns:1fr}}
.sec{border:1px solid var(--line); border-radius:var(--radius); margin-bottom:12px; overflow:hidden; background:var(--surface)}
.sec-hd{display:flex; justify-content:space-between; align-items:center; padding:8px 12px; background:var(--surface-2);
  border-bottom:1px solid var(--line); font-weight:600; font-size:.9em}
.sec-hd a{font-size:.85em; font-weight:600}
.frow{display:flex; gap:10px; padding:7px 12px; border-bottom:1px solid var(--surface-2); font-size:.9em}
.frow:last-child{border-bottom:0}
.frow .k{flex:0 0 116px; color:var(--muted)} .frow .v{flex:1; min-width:0; overflow-wrap:anywhere}
.cardline{display:flex; justify-content:space-between; align-items:center; gap:8px; padding:7px 12px; border-bottom:1px solid var(--surface-2); font-size:.9em}
.cardline:last-child{border-bottom:0}
.iconbtn.del{color:var(--s-busy); border:0; background:none; font-size:1.15em; line-height:1; padding:0 4px; cursor:pointer}
.iconbtn.del:hover{filter:none; transform:none; opacity:.7}
.cardacts{display:inline-flex; align-items:center; gap:9px}
.consent-dot{width:13px; height:13px; border-radius:50%; padding:0; border:1px solid rgba(0,0,0,.25); cursor:pointer; vertical-align:middle; transition:transform .1s}
.consent-dot:hover{transform:scale(1.18)}
.consent-no{background:var(--s-busy)}        /* rosso: consenso non acquisito (default) */
.consent-si{background:var(--s-free)}        /* verde: consenso acquisito */
.consent-revocato{background:#f5a623}        /* giallo/arancio: consenso revocato */
.consenso-tag{font-size:.7em; font-weight:700; letter-spacing:.03em; padding:1px 6px; border-radius:10px}
.consenso-tag.ok{color:var(--s-free); background:color-mix(in srgb, var(--s-free) 16%, transparent)}
.consenso-tag.neg{color:var(--s-busy); background:color-mix(in srgb, var(--s-busy) 16%, transparent)}
.consenso-sel.ok{color:var(--s-free)} .consenso-sel.neg{color:var(--s-busy)}

/* --- Turni operatori (pianificazione settimanale) --- */
.turni-top{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:10px}
.turni-top select{padding:5px 8px; border:1px solid var(--line); border-radius:7px; font:inherit}
.turni-wrap{max-height:58vh; overflow:auto; border:1px solid var(--line); border-radius:8px}
.turni-grid{border-collapse:collapse; width:100%; font-size:.85em}
.turni-grid th,.turni-grid td{border:1px solid var(--surface-2); padding:5px 6px; text-align:center; white-space:nowrap}
.turni-grid thead th{position:sticky; top:0; background:var(--surface); z-index:2}
.turni-grid .op-col{position:sticky; left:0; background:var(--surface); text-align:left; font-weight:600; z-index:1}
.turni-grid thead .op-col{z-index:3}
.turni-grid .d-h{font-weight:600; text-transform:uppercase; font-size:.92em}
.t-ini,.t-fin{width:64px; padding:2px; border:1px solid var(--line); border-radius:5px; font-size:.95em}
.t-ini{background:#B9FFD7} .t-fin{background:#EEC3BD}
.turni-grid td.off{background:var(--surface-2)}
.pubbtn{margin-top:3px; font-size:.66em; font-weight:700; letter-spacing:.03em; border:1px solid transparent; border-radius:9px; padding:1px 7px; cursor:pointer}
.pubbtn.pub{background:#dafbe1; border-color:#7ee2a8; color:#1c7a4d}
.pubbtn.npub{background:#fff3cd; border-color:#ffe08a; color:#8a6d00}
.tbl.rep tr.gestita{opacity:.5} .tbl.rep tr.gestita td:not(.liveact){text-decoration:line-through}
/* --- Mensile operatori (paghe) --- */
.tbl.rep.mensile{font-size:.84em}
.tbl.rep.mensile th,.tbl.rep.mensile td{padding:4px 7px; white-space:nowrap}
.tbl.rep.mensile .op-col{position:sticky; left:0; background:var(--surface); text-align:left}
.tbl.rep.mensile thead th{position:sticky; top:0; background:var(--surface); z-index:2}
.tbl.rep .op-met{font-size:.78em; opacity:.7}
.tbl.rep .tot-row td{border-top:2px solid var(--line); font-weight:600; background:var(--surface-2)}
.mensile-tot{margin-top:10px; text-align:right; font-size:1.02em}
.omaggi{background:var(--surface-2)}
.saldo-row{align-items:center; gap:10px} .saldo-row .saldo{font-size:1.15em}
.mov-title{font-size:.95em; margin:16px 0 6px; display:flex; align-items:center; gap:10px}
.mov-filter{width:auto; flex:0 0 210px; margin-left:auto; font-size:.85em; padding:5px 9px}
.opi{display:inline-block; width:18px; text-align:center}

/* anteprima omaggi nella modale ricarica */
.ric-prev{background:var(--surface-2); border:1px solid var(--line); border-radius:var(--radius-s); padding:8px 12px}
.ric-prev .rp-row{display:flex; justify-content:space-between; align-items:center; padding:4px 0; font-size:.92em}
.ric-prev .rp-row span{color:var(--ink-2)} .ric-prev .rp-row b{font-variant-numeric:tabular-nums}
.ric-prev .rp-row.om b{color:var(--s-free)}
.ric-prev .rp-row.tot{margin-top:4px; padding-top:8px; border-top:1px solid var(--line); font-weight:600}
.ric-prev .rp-row.tot b{font-size:1.1em; color:var(--accent-2)}

/* report giornaliero operatori */
.tbl.rep{width:100%; border-collapse:collapse; font-size:.9em}
.tbl.rep th{text-align:left; color:var(--muted); font-weight:600; font-size:.82em; padding:6px 8px; border-bottom:1px solid var(--line)}
.tbl.rep td{padding:6px 8px; border-bottom:1px solid var(--surface-2); font-variant-numeric:tabular-nums}
.tbl.rep tbody tr.idle td{color:var(--muted)}
.tbl.rep tfoot td{border-top:2px solid var(--line); font-weight:700}
/* --- Chiusura giornata (paghe): badge stato + form modale --- */
.badge-chiusa{display:inline-block; font-size:.72em; font-weight:700; letter-spacing:.02em; padding:1px 8px; border-radius:10px; color:var(--s-free); background:color-mix(in srgb, var(--s-free) 16%, transparent)}
.badge-stato{display:inline-block; font-size:.72em; font-weight:700; padding:1px 7px; border-radius:10px}
.badge-stato.st-ok{color:var(--s-free); background:color-mix(in srgb,var(--s-free) 16%,transparent)}
.badge-stato.st-pend{color:#8a6d00; background:#fff3cd}
.badge-stato.st-err{color:var(--s-busy); background:color-mix(in srgb,var(--s-busy) 16%,transparent)}
/* --- Pubblicazione oroscopo --- */
.oro-top{display:flex; gap:14px; flex-wrap:wrap; margin-bottom:8px}
.wiki-tb{display:flex; gap:4px; flex-wrap:wrap; margin-bottom:5px}
.wiki-tb button{font-size:.82em; padding:3px 9px}
.wiki-prev{width:100%; height:420px; border:1px solid var(--line-2); border-radius:6px; background:#0a1e2a; display:block}
.wiki-nota{font-size:.8em; margin:4px 0 8px}
.wiki-ai{display:flex; gap:6px; align-items:stretch; margin:4px 0 10px}
.wiki-ai input{flex:1; min-width:0}
.wiki-prev-hd{display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:.84em; margin:4px 0}
.wiki-prev-hd .btn-ghost{display:inline-flex; align-items:center; gap:5px; font-size:.95em; padding:3px 9px}
.oro-grid{display:grid; grid-template-columns:1fr 1fr; gap:8px 16px}
@media(max-width:680px){.oro-grid{grid-template-columns:1fr}}
.oro-check{display:flex; align-items:center; margin-top:10px; font-size:.9em; color:var(--ink-2)}
.oro-check input{width:auto; margin-right:7px}
.palin-add{display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end}
.palin-add .field{margin-bottom:0}
.palin-add input[type=date],.palin-add input[type=time],.palin-add select{width:auto}
.tbl.rep td.liveact .btn-sm{margin-left:8px}
.chiu-row{display:flex; gap:14px}
.chiu-row .field{flex:1}
.tbl.rep.chiu-tab{margin:4px 0 14px}
.tbl.rep.chiu-tab td{vertical-align:middle}
.tbl.rep.chiu-tab input{width:110px; padding:6px 9px}
.chiu-stelle{max-width:130px}

/* agenda — griglia giorno × operatori (replica del vecchio, tecnica pulita) */
.ag-bar{display:flex; gap:10px; align-items:center; margin-bottom:12px; flex-wrap:wrap}
.ag-bar input[type=date], .ag-bar select{width:auto}
.ag-legend{display:flex; gap:6px; margin-left:auto; align-items:center}
.ag-legend .lg{font-size:.72em; padding:2px 8px; border-radius:10px; border:1px solid rgba(0,0,0,.12)}
.operatoreDay{margin-bottom:14px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--radius-s); overflow:hidden}
.operatorName{background:var(--slate-2); color:var(--on-slate); padding:6px 10px; font-weight:600; font-size:.9em}
.operatorName .muted2{color:var(--on-slate-mut); font-weight:400; font-size:.85em}
.timeTable{display:flex; flex-wrap:wrap; padding:1px}
.orario{height:38px; box-sizing:border-box; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:.72em; line-height:1.15; border:1px solid rgba(0,0,0,.08); cursor:pointer; transition:transform .12s, box-shadow .12s; overflow:hidden}
.orario:hover{transform:scale(1.08); box-shadow:0 0 6px rgba(0,0,0,.35); position:relative; z-index:2}
.orario.prenotato span{white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis}
.appuntamentoLib{background:#fff; color:var(--ink-2)}
.tipo-cortesia{background:rgb(206,246,206); color:#14391f}   /* cortesia = verde (cliente VIP registrato) */
.tipo-codice{background:#88c5f1; color:#013961}               /* codice = cliente senza scheda cortesia (14/10/2026: niente più 899/altro) */
.tipo-gap{background:repeating-linear-gradient(45deg,#f3ddb2,#f3ddb2 7px,#ecd09a 7px,#ecd09a 14px); color:#7a4f10}  /* gap = ambra tratteggiata (slot bloccato) */
/* Toggle Appuntamento / Pausa-Gap nel form di prenotazione */
.orario.fuoriturno{background:repeating-linear-gradient(45deg,#f1f1f1 0 5px,#e6e6e6 5px 10px); color:#aaa; cursor:not-allowed}
.orario.fuoriturno:hover{transform:none; box-shadow:none}
.ag-per{font-weight:700; color:var(--accent-2); margin:0 0 10px}
.ag-slot-b{display:flex; width:100%; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px; border:1px solid var(--line-2); border-radius:9px; background:var(--surface); color:var(--ink); font:inherit; font-weight:500; cursor:pointer; text-align:left; justify-content:flex-start}
.ag-slot-b .muted{margin-left:auto}
.ag-slot-b:hover{border-color:var(--accent-2)}
.ag-slot-b small{font-weight:500; color:var(--muted)}
.ag-tipo{display:inline-flex; margin:0 0 14px; border:1px solid var(--line-2); border-radius:9px; overflow:hidden}
.ag-tipo-b{display:inline-flex; align-items:center; gap:5px; padding:7px 15px; background:var(--surface); border:0; cursor:pointer; font:inherit; font-weight:600; color:var(--muted)}
.ag-tipo-b + .ag-tipo-b{border-left:1px solid var(--line-2)}
.ag-tipo-b.on{background:var(--accent-2); color:#fff}
.ag-tipo-b svg{flex:0 0 auto}
.appuntamentoEvaso{background:var(--line); color:var(--muted); text-decoration:line-through}
.orario .ori{font-size:.85em; opacity:.8}
.ag-legend .lg-ori{font-size:.72em; color:var(--muted); margin-left:4px}
.ic.del{color:var(--s-busy)}
/* ricerca cliente nel form prenotazione */
.ag-cli-res{max-height:160px; overflow:auto}
.ag-cli-row{padding:6px 9px; border:1px solid var(--line); border-top:0; cursor:pointer; font-size:.9em}
.ag-cli-row:first-child{border-top:1px solid var(--line)}
.ag-cli-row:hover{background:var(--accent-soft)}
.ag-cli-empty{padding:6px 2px; font-size:.85em}
.ag-cli-picked{display:flex; align-items:center; gap:8px; background:var(--accent-soft); border:1px solid var(--accent); border-radius:var(--radius-s); padding:5px 10px; margin-bottom:10px; font-size:.88em}
.ag-cli-picked .lbl{flex:1; color:var(--accent-2); font-weight:600}

/* azioni nei pannelli plancia (Live appuntamenti / Live chiamanti) */
.liveact{white-space:nowrap; text-align:right}
.liveact .iconbtn{font-size:1.02em; padding:0 4px}
.iconbtn.ok{color:var(--s-free)}
.sal-pos{color:var(--s-free); font-weight:600; font-variant-numeric:tabular-nums}
.sal-neg{color:var(--s-busy); font-weight:600; font-variant-numeric:tabular-nums}
.tar-zero{color:#b5179e}   /* tariffa 0 = fuchsia (come legacy) */
.tbl tr.idle td{color:var(--muted)}                 /* appuntamento evaso: riga ingrigita (feedback) */

/* ============ Astrolab (report ordini) ============ */
.astro-card{border:1px solid var(--line); border-left:4px solid var(--s-off); border-radius:var(--radius-s); padding:8px 11px; margin-bottom:8px; font-size:.9em; background:var(--surface-2)}
.astro-card>div{margin:1px 0}
.astro-non-pagato{border-left-color:var(--s-busy)}
.astro-lavorazione{border-left-color:var(--s-book)}
.astro-pronto{border-left-color:var(--s-free)}
.astro-hd{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:2px}
.astro-serv{font-weight:600; font-size:1.05em}
.astro-badge{font-size:.7em; font-weight:700; padding:2px 9px; border-radius:20px; letter-spacing:.03em; white-space:nowrap}
.astro-badge.ok{background:color-mix(in srgb, var(--s-free) 22%, transparent); color:var(--s-free)}
.astro-badge.no{background:color-mix(in srgb, var(--s-busy) 20%, transparent); color:var(--s-busy)}
.astro-meta{font-size:.85em; color:var(--muted); display:flex; gap:6px; flex-wrap:wrap; margin-bottom:3px}
.astro-sub{font-size:.92em} .astro-q{font-style:italic; color:var(--ink-2); margin-top:3px}

/* ============ Chat attive (lista + conversazione) ============ */
.chat-wrap{display:flex; gap:12px; min-height:360px}
.chat-list{flex:0 0 200px; max-height:470px; overflow:auto; border:1px solid var(--line); border-radius:var(--radius-s); background:var(--surface-2)}
.chat-item{display:block; padding:8px 10px; border-bottom:1px solid var(--line); cursor:pointer; text-decoration:none; color:var(--ink)}
.chat-item:hover{background:var(--accent-soft)}
.chat-item.sel{background:var(--accent-soft); border-left:3px solid var(--accent)}
.chat-item.unread{background:#fff7e6}
.chat-item.unread b{font-weight:700}
.chat-badge{display:inline-block; min-width:17px; text-align:center; background:var(--s-busy); color:#fff; border-radius:9px; font-size:.72em; padding:0 5px; font-weight:700}
.chat-onbadge{display:inline-block; min-width:16px; text-align:center; background:var(--s-free); color:#fff; border-radius:9px; font-size:.58em; padding:1px 6px; vertical-align:middle; font-weight:700}
.chat-conv{flex:1; display:flex; flex-direction:column; min-width:0}
.chat-conv-hd{font-weight:600; padding:2px 4px 8px; border-bottom:1px solid var(--line); color:var(--accent-2)}
.chat-body{flex:1; max-height:420px; overflow:auto; padding:8px 4px; display:flex; flex-direction:column; gap:8px}
.chat-msg{display:flex; align-items:flex-end; gap:6px; max-width:88%}
.chat-msg.mine{align-self:flex-end; flex-direction:row-reverse}
.chat-msg.theirs{align-self:flex-start}
.chat-av{flex:0 0 26px; width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.85em; background:var(--surface-2); border:1px solid var(--line)}
.chat-bubble{padding:6px 10px; border-radius:12px; font-size:.9em; overflow-wrap:anywhere}
.chat-msg.mine .chat-bubble{background:var(--accent-soft); border:1px solid var(--accent-soft); border-bottom-right-radius:3px}
.chat-msg.theirs .chat-bubble{background:var(--surface-2); border:1px solid var(--line); border-bottom-left-radius:3px}
.chat-when{display:block; font-size:.66em; color:var(--muted); margin-top:3px; text-align:right}
.chat-rd{color:var(--accent); font-style:normal; font-weight:700}
.chat-kb{padding-top:8px; border-top:1px solid var(--line); margin-top:6px}
.chat-kb textarea{width:100%; min-height:54px; resize:vertical; font:inherit}
.chat-presets{display:flex; gap:6px; margin-top:6px; flex-wrap:wrap; align-items:center}
.chat-presets button{font-size:.8em; padding:4px 9px}
.chat-presets .chat-sendbtn{margin-left:auto; font-weight:600}

/* ============ Statistiche economiche (blocco per-mese + barre, replica legacy) ============ */
.stat-mese{width:100%; border-collapse:collapse; margin-bottom:16px; font-size:.9em}
.stat-mese td{padding:5px 7px; border:1px solid var(--line); vertical-align:middle}
.stat-hd td{background:linear-gradient(to right,#0063a9,#013961); color:#fff; border-color:#013961}
.stat-proj{color:#ffe000; font-size:.92em; margin-left:6px}
.stat-bar{display:block; height:10px; border:1px solid #999; border-radius:2px; min-width:1px; max-width:100%}
.stat-bar.b-lime{background:lime}
.stat-bar.b-orange{background:orange}
.stat-bar.b-salmon{background:salmon}

/* ============ Inserimenti falliti (diagnostica) ============ */
.insfall .insf-hot td{background:#fff3e0}                 /* ≥120s: evidenziata (come l'orange legacy) */
.insfall .insf-low{opacity:.5}                            /* <120s: in trasparenza (irrilevante) */
.insf-causa{font-size:.84em; color:var(--ink-2); max-width:280px}

/* ============ Report (giornaliero clienti / gestionale): filtri + totali ============ */
.rep-filtri{border-bottom:1px solid var(--line); padding-bottom:10px; margin-bottom:12px}
.rep-checks{display:flex; gap:14px; flex-wrap:wrap; align-items:center; font-size:.9em}
.rep-checks label{display:flex; gap:4px; align-items:center; cursor:pointer}
.rep-filtri-row{display:flex; align-items:flex-end; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-top:4px}
.fb-legend{display:flex; gap:16px; align-items:center; font-size:.82em; color:var(--muted); margin:8px 0 4px}
.fb-legend .lg-pub,.fb-legend .lg-nopub{display:inline-block; width:11px; height:11px; border-radius:3px; vertical-align:middle}
.fb-legend .lg-pub{background:color-mix(in srgb, var(--s-free) 55%, transparent)}
.fb-legend .lg-nopub{background:var(--surface-2); border:1px solid var(--line-2)}
.tbl.rep tr.fb-pub td{background:color-mix(in srgb, var(--s-free) 13%, transparent)}
.rep-tot td{font-weight:700; border-top:2px solid var(--line-2); background:var(--surface-2)}
.punti-bassi{background:#ffd9d9; font-weight:700}
.tbl.rep td.col-punti,.tbl.rep th.col-punti{text-align:center}
.rep-tot-top td{border-top:none; border-bottom:2px solid var(--line-2)}

/* ============ Griglia presenze (matrice giorni×operatori) ============ */
.pres-wrap{overflow:auto; max-height:58vh; border:1px solid var(--line); border-radius:var(--radius-s)}
.pres-grid{border-collapse:collapse; font-size:.78em; white-space:nowrap}
.pres-grid th,.pres-grid td{border:1px solid var(--line); padding:2px 4px; text-align:center; min-width:24px; height:24px}
.pres-grid td.pres-op,.pres-grid th.pres-op{text-align:left; position:sticky; left:0; background:var(--surface); min-width:130px; z-index:1}
.pres-grid thead th{position:sticky; top:0; background:var(--surface-2); z-index:2}
.pres-grid thead th.pres-op{z-index:3}
.pres-dom{color:var(--s-busy)}
.pres-ccnl{background:#cfe8ff}
.pres-mal{background:#ffc9c9}
.pres-l104{background:#ffdaa6}
.pres-ass{background:#2b3a4f; color:#fff}
.pres-fer{background:#c9f0d4}
.pres-rip{background:#e6e9f0}
.pres-rol{background:#cfe8ff}
/* griglia presenze, 5/10/2026: finestra larga, giorni con l'iniziale, domeniche ombreggiate, gruppi per compenso,
   caselle vuote pulite (il menu delle assenze compare passando sopra), ore e stipendio sempre visibili a destra */
.modal.lg:has(.pres-wrap){max-width:min(1560px, 97vw)}
.pres-wrap{max-height:66vh}
.pres-grid th.pres-g{padding:3px 2px; line-height:1.1}
.pres-grid th.pres-g .gn{display:block; font-weight:700}
.pres-grid th.pres-g .gs{display:block; font-size:.78em; font-weight:500; color:var(--muted)}
.pres-grid th.pres-dom .gs,.pres-grid th.pres-dom .gn{color:var(--s-busy)}
.pres-grid td.col-dom:not([class*="pres-"]),.pres-grid td.col-dom:only-child{background:color-mix(in srgb, var(--s-busy) 6%, transparent)}
.pres-grid td{min-width:26px}
.pres-grid tr.pres-gruppo td{background:var(--surface-2); font-size:.86em; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-2); height:22px; border-left:0; border-right:0}
.pres-grid tbody tr:not(.pres-gruppo):hover td{box-shadow:inset 0 1px 0 var(--accent), inset 0 -1px 0 var(--accent)}
.pres-grid th.pres-tot,.pres-grid td.pres-tot{position:sticky; right:96px; z-index:1; background:var(--surface); min-width:44px; box-shadow:-1px 0 0 var(--line-2)}
.pres-grid th.pres-stip,.pres-grid td.pres-stip{position:sticky; right:0; z-index:1; min-width:96px}
.pres-grid thead th.pres-tot,.pres-grid thead th.pres-stip{z-index:3; background:var(--surface-2)}
.pres-sel{appearance:none; -webkit-appearance:none; color:transparent; text-align:center; height:22px}
.pres-sel:hover,.pres-sel:focus{color:var(--ink-2); background:var(--surface-2); outline:1px solid var(--line-2); border-radius:4px}
.pres-leg{display:flex; flex-wrap:wrap; gap:6px 14px; margin:12px 0 4px; font-size:.8em; color:var(--ink-2)}
.pres-leg span{display:inline-flex; align-items:center; gap:6px}
.pres-leg i{font-style:normal; font-weight:700; min-width:24px; height:20px; padding:0 4px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:4px; font-size:.92em}
.piva-badge{font-size:.66em; font-weight:700; padding:1px 6px; border-radius:10px; background:color-mix(in srgb, var(--s-book) 22%, transparent); color:var(--s-book); vertical-align:middle}
.stip-in{width:74px; text-align:right; font:inherit; font-size:.95em; padding:2px 4px; border:1px solid transparent; background:transparent; border-radius:4px}
.stip-in:hover,.stip-in:focus{border-color:var(--line-2); background:var(--surface); outline:none}
.pres-stip.manuale .stip-in{font-weight:700; color:var(--accent-2); border-color:var(--accent)}
.pres-altro{background:#efe1f6}
.pres-tot{font-weight:700}
.pres-stip{font-weight:700; background:var(--surface-2)}
.pres-sel{border:0; background:transparent; font:inherit; width:100%; cursor:pointer; color:var(--muted)}
.pres-mark{cursor:pointer; font-weight:700; display:block}

/* ============ Report BETA: toolbar (filtro/CSV), colonne ordinabili, barre stat ============ */
.rep-tools{display:flex; gap:8px; align-items:center; margin:10px 0 6px}
.rep-tools input[type=text]{flex:1; max-width:280px}
.tbl th.sortable{cursor:pointer; user-select:none; white-space:nowrap}
.tbl th.sortable::after{content:'⇅'; opacity:.35; font-size:.85em; margin-left:3px}
.tbl th.sortable.sorted-asc::after{content:'▲'; opacity:.85}
.tbl th.sortable.sorted-desc::after{content:'▼'; opacity:.85}
.stat-track{background:var(--surface-2); border:1px solid var(--line); height:16px; border-radius:4px; overflow:hidden; min-width:60px}
.stat-fill{height:16px; background:var(--accent); border-radius:4px 0 0 4px}
.tbl tr.idle .when{text-decoration:line-through}
/* "Esci" della barra in alto: ora è un form POST (6/10/2026), con l'aspetto del link di prima */
.tb-esci{display:inline; margin:0}
.tb-esci button{background:none; border:0; padding:0; font:inherit; color:var(--on-slate-mut); cursor:pointer; display:inline-flex; align-items:center; gap:4px}
.tb-esci button:hover{color:#fff}
/* cambio password obbligatorio al primo accesso (/password, 13/10/2026) */
.login .cp-testo{font-size:.92em; color:var(--ink); margin:0 0 14px; line-height:1.45}
.login .cp-salva{width:100%}
.login .cp-esci-form{margin-top:10px; text-align:center}
.login .cp-esci{background:none; border:0; color:var(--accent); text-decoration:underline; cursor:pointer; padding:4px}

/* Giornaliero operatrici: avvisi per l'ufficio (parita' col vecchio, 13/10/2026). Forma + parola, non solo colore. */
.tbl.rep tr.av-chiamata td{background:color-mix(in srgb, var(--s-busy) 9%, transparent)}
.tbl.rep tr.av-da_chiudere td{background:color-mix(in srgb, var(--s-book) 16%, transparent)}
.tbl.rep tr.av-sparita td{background:color-mix(in srgb, var(--s-busy) 18%, transparent)}
.av-tag{display:inline-block; font-size:.72em; font-weight:700; padding:1px 8px; border-radius:10px; margin-left:6px; cursor:help; white-space:nowrap}
.av-tag-chiamata{color:var(--s-busy); border:1px solid var(--s-busy); animation:eso-av-blink 1.4s ease-in-out infinite}
.av-tag-da_chiudere{color:inherit; border:1px solid var(--s-book); background:color-mix(in srgb, var(--s-book) 35%, transparent)}
.av-tag-sparita{color:#fff; background:var(--s-busy)}
.gio-live{font-size:.8em; margin:4px 0 8px}
@keyframes eso-av-blink{50%{opacity:.35}}
@media (prefers-reduced-motion: reduce){.av-tag-chiamata{animation:none}}

/* scheda cliente: «numero in registrazione» (B3, 13/10/2026) */
.rec-avviso{color:#c0392b; border:1px solid #c0392b; font-weight:600; margin-bottom:.6rem}
/* carte della scheda (14/10/2026): simbolo del circuito, numero mascherato, ricarica dPay */
.carta-dati{display:inline-flex; align-items:center; gap:8px; min-width:0}
.carta-simbolo{flex:0 0 auto; display:block; border-radius:3px; box-shadow:0 0 0 1px rgba(0,0,0,.06)}
.carta-num{white-space:nowrap}
.linkbtn{background:none; border:0; padding:0; color:var(--accent-2); font:inherit; font-size:.88em; text-decoration:underline; cursor:pointer}
.linkbtn:disabled{opacity:.5; cursor:wait}
.cardacts{display:inline-flex; align-items:center; gap:8px}
.carta-ric{display:inline-flex; align-items:center; gap:5px}
.carta-ric:disabled{opacity:.45; cursor:not-allowed}
.alert.warn{background:#fff6e0; color:#7a5200; border:1px solid #f0d58c; padding:9px 12px; border-radius:var(--radius-s); margin-bottom:12px; font-size:.9em; display:flex; align-items:center; gap:8px}
.ricc-carta{display:flex; align-items:center; gap:10px; margin:0 0 14px; font-size:1.05em}
.ricc-carta .muted{margin-left:auto; font-size:.85em}
.ricc-tagli{display:grid; grid-template-columns:repeat(5, 1fr); gap:6px}
.ricc-taglio{position:relative; cursor:pointer}
.ricc-taglio input{position:absolute; opacity:0; inset:0; margin:0; cursor:pointer}
.ricc-taglio span{display:block; text-align:center; padding:8px 0; border:1px solid var(--line-2); border-radius:8px; font-weight:600; font-variant-numeric:tabular-nums; background:var(--surface)}
.ricc-taglio input:checked + span{background:var(--accent-2); border-color:var(--accent-2); color:#fff}
.ricc-taglio input:focus-visible + span{outline:2px solid var(--accent-2); outline-offset:2px}
.ricc-prev{margin-top:12px}
.ricc-nota{font-size:.84em; margin:10px 0 0}
.ricc-ultime{margin-top:14px; border-top:1px solid var(--line); padding-top:10px}
.ricc-ultime .lbl{font-size:.8em; color:var(--muted); margin-bottom:6px}
.ricc-u{display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:5px 0; font-size:.88em; border-bottom:1px solid var(--surface-2)}
.ricc-u b{font-weight:600}
.ricc-u.stato-approvato b{color:var(--s-free)} .ricc-u.stato-rifiutato b{color:#b5302f} .ricc-u.stato-incerto b, .ricc-u.stato-in_corso b{color:#a06a00}
@media (max-width:600px){ .ricc-tagli{grid-template-columns:repeat(3, 1fr)} }

/* ============ Ritocchi 14/10/2026 (prezzi, report gestionale, statistiche, giornaliero clienti) ============ */
/* Prezzi e numeri del sito: una scheda per numero, campi in griglia (niente tabella larga, niente scroll orizzontale) */
.num-bd .num-intro{margin-top:0}
.num-card{border:1px solid var(--line); border-radius:var(--radius); padding:14px 16px; margin:0 0 12px; background:var(--surface)}
.num-hd{display:flex; gap:16px; align-items:flex-start; justify-content:space-between; margin-bottom:10px}
.num-tit{min-width:0}
.num-tit b{display:block}
.num-tit p{margin:2px 0 0; font-size:.85em; line-height:1.4}
.num-card > .num-tit{margin-bottom:6px}
.num-salva{margin:0; flex:0 0 auto}
.num-grid{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px 12px}
.num-grid .nf{min-width:0}
.num-grid .nf-2{grid-column:span 2}
.num-grid label{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.num-grid input,.num-grid select{padding:7px 9px}
@media (max-width:720px){.num-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.num-op{table-layout:fixed; margin-top:8px}
.num-op col.c-op{width:32%} .num-op col.c-n{width:16%} .num-op col.c-ord{width:12%} .num-op col.c-az{width:24%}
.num-op td{padding:5px 6px}
.num-op input{padding:6px 8px}
.num-azioni{display:flex; gap:6px; flex-wrap:wrap}
.num-azioni form{margin:0}

/* Statistiche economiche: tabella fissa a colonne proporzionate, barre in % della propria cella */
.stat-mese{table-layout:fixed}
.stat-mese col.c-lbl{width:15%} .stat-mese col.c-val{width:17%} .stat-mese col.c-bar{width:18%}
.stat-mese td{overflow:hidden; overflow-wrap:anywhere}
.stat-cella{display:block; width:100%}
.stat-cella .stat-bar{min-width:2px; max-width:100%}
.stat-hint{display:block; width:100%; max-width:460px; margin-bottom:8px}
.stat-f{max-width:230px}
.stat-nota{font-size:.82em}
.sw-0{width:0%}.sw-2{width:2%}.sw-4{width:4%}.sw-6{width:6%}.sw-8{width:8%}.sw-10{width:10%}.sw-12{width:12%}.sw-14{width:14%}.sw-16{width:16%}.sw-18{width:18%}
.sw-20{width:20%}.sw-22{width:22%}.sw-24{width:24%}.sw-26{width:26%}.sw-28{width:28%}.sw-30{width:30%}.sw-32{width:32%}.sw-34{width:34%}.sw-36{width:36%}.sw-38{width:38%}
.sw-40{width:40%}.sw-42{width:42%}.sw-44{width:44%}.sw-46{width:46%}.sw-48{width:48%}.sw-50{width:50%}.sw-52{width:52%}.sw-54{width:54%}.sw-56{width:56%}.sw-58{width:58%}
.sw-60{width:60%}.sw-62{width:62%}.sw-64{width:64%}.sw-66{width:66%}.sw-68{width:68%}.sw-70{width:70%}.sw-72{width:72%}.sw-74{width:74%}.sw-76{width:76%}.sw-78{width:78%}
.sw-80{width:80%}.sw-82{width:82%}.sw-84{width:84%}.sw-86{width:86%}.sw-88{width:88%}.sw-90{width:90%}.sw-92{width:92%}.sw-94{width:94%}.sw-96{width:96%}.sw-98{width:98%}
.sw-100{width:100%}

/* Report gestionale: filtri su griglia, controllo dei consulti cortesia (forma + parola, mai solo colore) */
.gst-griglia{display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px 12px}
.gst-griglia .gf,.gc-riga .gf{min-width:0}
.gst-griglia .gf-2{grid-column:span 2}
.gst-griglia label{white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.gst-griglia input,.gst-griglia select{padding:7px 9px}
@media (max-width:760px){.gst-griglia{grid-template-columns:repeat(3,minmax(0,1fr))}}
.gst-azioni{display:flex; align-items:center; justify-content:flex-end; gap:12px; margin-top:10px}
.gst-check{display:flex; align-items:center; gap:6px; margin:0 auto 0 0; font-size:.9em; cursor:pointer; color:var(--ink)}
.gst-check input{width:auto; padding:0; margin:0}
.ctl-testa{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 10px; font-size:.88em}
.ctl{display:inline-flex; align-items:center; gap:4px; font-size:.8em; font-weight:700; line-height:1.25; padding:2px 8px; border-radius:10px}
.ctl-ok{color:var(--s-free); border:1px solid var(--s-free); background:var(--surface)}
.ctl-manca{color:#fff; background:var(--s-busy); border:1px solid var(--s-busy); border-radius:4px}
.ctl-elab{color:var(--ink-2); border:1px dashed var(--line-2); background:var(--surface)}
.ctl-testa .ctl{font-size:1em; padding:4px 10px}
.gst-tab{table-layout:fixed}
.gst-tab col.c-data{width:19%} .gst-tab col.c-rotta{width:16%} .gst-tab col.c-num{width:14%} .gst-tab col.c-dur{width:10%}
.gst-tab col.c-op{width:11%} .gst-tab col.c-stato{width:10%} .gst-tab col.c-ctl{width:20%}
.gst-tab td{overflow:hidden; text-overflow:ellipsis}
.gst-tab td.mono{white-space:nowrap}
.gst-tab .gst-rotta-c{white-space:nowrap}
.tbl.rep tr.gst-cliccabile{cursor:pointer}
.tbl.rep tr.gst-manca td{background:color-mix(in srgb, var(--s-busy) 8%, transparent)}

/* Giornaliero clienti: filtri su una riga, due schede (radio + CSS), totali in testa */
.modal.lg:has(.gc-filtri){max-width:min(1100px, 96vw)}
.gc-riga{display:grid; grid-template-columns:140px 140px minmax(130px,1fr) auto auto; gap:10px 12px; align-items:end}
.gc-riga input,.gc-riga select{padding:7px 9px; height:38px}
.gc-metodi{border:0; padding:0; margin:0; min-width:0}
.gc-metodi legend{padding:0; margin:0 0 4px; font-size:.85em; color:var(--ink-2); font-weight:500}
.gc-checks{display:flex; gap:2px; flex-wrap:nowrap; align-items:center; height:38px; padding:0 3px; border:1px solid var(--line-2); border-radius:var(--radius-s); background:var(--surface)}
.gc-checks label{display:flex; align-items:center; gap:5px; margin:0; padding:5px 7px; white-space:nowrap; font-size:.86em; color:var(--ink); border-radius:5px; cursor:pointer}
.gc-checks label:hover{background:var(--surface-2)}
.gc-checks label:has(input:checked){background:var(--accent-soft); color:var(--accent-2); font-weight:600}
.gc-checks input{width:auto; height:auto; padding:0; margin:0}
.gc-cerca button{height:38px; padding:0 18px}
.gc-riga2{display:flex; gap:12px; align-items:center; margin-top:10px}
.gc-riga2 input{flex:1 1 auto; max-width:360px; padding:7px 9px}
.gc-riga2 .btn{margin-left:auto; height:38px; display:inline-flex; align-items:center}
@media (max-width:900px){.gc-riga{grid-template-columns:repeat(3,minmax(0,1fr))} .gc-metodi{grid-column:span 2} .gc-checks{flex-wrap:wrap; height:auto}}
.gc-r{position:absolute; opacity:0; pointer-events:none; width:1px; height:1px}
.gc-tabs{display:flex; gap:4px; border-bottom:1px solid var(--line); margin:2px 0 12px}
.gc-tabs label{margin:0 0 -1px; padding:8px 14px; font-size:.95em; font-weight:600; color:var(--ink-2); border:1px solid transparent; border-radius:var(--radius-s) var(--radius-s) 0 0; cursor:pointer}
.gc-tabs label:hover{color:var(--accent-2)}
#gc-s1:checked ~ .gc-tabs label[for=gc-s1],#gc-s2:checked ~ .gc-tabs label[for=gc-s2]{background:var(--surface); border-color:var(--line); border-bottom-color:var(--surface); color:var(--accent-2)}
#gc-s1:focus-visible ~ .gc-tabs label[for=gc-s1],#gc-s2:focus-visible ~ .gc-tabs label[for=gc-s2]{outline:2px solid var(--focus)}
.gc-n{font-size:.78em; font-weight:600; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:0 6px; margin-left:4px; color:var(--ink-2)}
.gc-pan{display:none}
#gc-s1:checked ~ .gc-pan1,#gc-s2:checked ~ .gc-pan2{display:block}
.gc-tot{display:flex; gap:20px; flex-wrap:wrap; align-items:baseline; padding:8px 12px; margin:0 0 8px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--radius-s); font-size:.92em}
.gc-tab{table-layout:fixed}
.gc-tab td{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tbl.rep .gc-num{text-align:right}
#gcCons col.c-cli{width:40%} #gcCons col.c-n{width:12%} #gcCons col.c-ops{width:36%}
#gcCons td:last-child{white-space:normal}
#gcPag col.c-data{width:13%} #gcPag col.c-cli2{width:35%} #gcPag col.c-eur{width:13%} #gcPag col.c-met{width:15%} #gcPag col.c-om{width:12%} #gcPag col.c-pt{width:12%}
#statsTable.gc-tab col.c-g{width:20%} #statsTable.gc-tab col.c-eur{width:20%} #statsTable.gc-tab col.c-bar{width:60%}
.gc-nota{font-size:.84em; margin:0 0 6px}
/* Chiama dal gestionale (voce 18): bottone spento = sbiadito, il motivo è nel suggerimento e al clic */
.iconbtn.chiama-off{opacity:.35; cursor:not-allowed}
