:root{--teal:#113f55;--sage:#3b7179;--gold:#b3a177;--grey:#4e4e4c;--ink:#22272e;--bord:#5a0e2d;--bg:#f4f2ed;--line:#e2ded3;--ok:#2e7d4f;--warn:#b86a00;--bad:#b3261e}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.4 "Core Sans","Montserrat",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
button,input,select,textarea{font:inherit;color:inherit}
h1,h2,h3,p{margin:0}
.top{background:var(--teal);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:5}
.top .brand{font-weight:700;letter-spacing:.14em;text-transform:uppercase;font-size:13px;color:var(--gold)}
.top .title{font-weight:600;font-size:17px}
.top .grow{flex:1}
.top button{background:none;border:1px solid rgba(255,255,255,.35);color:#fff;border-radius:8px;padding:6px 10px;font-size:13px}
.wrap{max-width:560px;margin:0 auto;padding:14px}
.wide{max-width:1280px}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:10px}
.card.tap{cursor:pointer}
.row{display:flex;align-items:center;gap:10px}
.row .grow{flex:1;min-width:0}
.muted{color:#6f6f6b;font-size:14px}
.small{font-size:13px}
.b{font-weight:700}
.big{font-size:30px;font-weight:700;line-height:1.1}
.sec{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--grey);margin:18px 2px 8px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;border-radius:10px;padding:12px 16px;font-weight:700;background:var(--bord);color:#fff;cursor:pointer;text-decoration:none}
.btn.full{width:100%}
.btn.teal{background:var(--teal)}
.btn.ok{background:var(--ok)}
.btn.line{background:#fff;color:var(--ink);border:1px solid #c9c4b6}
.btn.warn{background:#fff;color:var(--bad);border:1px solid var(--bad)}
.btn.sm{padding:8px 11px;font-size:14px;border-radius:8px}
.btn:disabled{opacity:.4;cursor:default}
.field{display:block;margin-bottom:12px}
.field span{display:block;font-size:13px;font-weight:600;margin-bottom:4px;color:var(--grey)}
.field input,.field select,.in{width:100%;padding:12px;border:1px solid #c9c4b6;border-radius:10px;background:#fff}
.err{background:#fbe9e7;color:var(--bad);border-radius:10px;padding:10px 12px;margin-bottom:12px;font-size:14px}
.note{background:#f6f1e3;border-left:4px solid var(--gold);border-radius:8px;padding:10px 12px;font-size:14px;margin:10px 0}
.badge{display:inline-block;border-radius:6px;padding:2px 7px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;background:#ece8dc;color:var(--grey);white-space:nowrap}
.badge.prio,.badge.alarm{background:var(--bad);color:#fff}
.badge.warn,.badge.nudged{background:#fdebc8;color:var(--warn)}
.badge.overdue{background:#7a0c0c;color:#fff}
.badge.ok,.badge.accepted,.badge.onboard,.badge.at{background:#dcefe3;color:var(--ok)}
.badge.queued,.badge.review{background:#dde8ee;color:var(--teal)}
.step{display:flex;align-items:center;justify-content:center;gap:18px;margin:14px 0}
.step button{width:48px;height:48px;border-radius:50%;border:1px solid #c9c4b6;background:#fff;font-size:24px;font-weight:700;cursor:pointer}
.step b{font-size:32px;min-width:44px;text-align:center}
.step.mini{gap:8px;margin:0}
.step.mini button{width:32px;height:32px;font-size:18px}
.step.mini b{font-size:18px;min-width:22px}
.sheet{position:fixed;inset:0;background:rgba(10,11,9,.55);display:flex;align-items:flex-end;justify-content:center;z-index:20}
.sheet>*{background:#fff;color:var(--ink,#1c1c1a);border-radius:18px 18px 0 0;padding:18px;width:100%;max-width:560px;max-height:92vh;max-height:92dvh;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;overflow:auto;box-shadow:0 10px 40px rgba(0,0,0,.35)}
@media (min-width:700px){.sheet{align-items:center}.sheet>*{border-radius:18px;padding:24px}}
.center{text-align:center}
.gap>*+*{margin-top:8px}
.ico{width:40px;height:40px;border-radius:50%;border:1px solid #c9c4b6;background:#fff;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:18px;color:var(--ink)}
.dim{opacity:.55}
.prio-card{border:2px solid var(--bad)}
.at-card{border:2px solid var(--ok)}
.chips{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.chip{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px;min-width:200px}
.chip.off{background:#eee;opacity:.75}
.alert{background:var(--bad);color:#fff;border-radius:10px;padding:12px 14px;font-weight:700;margin-bottom:12px}
table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}
th,td{padding:9px 10px;text-align:left;border-bottom:1px solid var(--line);font-size:14px;vertical-align:middle}
th{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--grey);background:#faf8f3}
tr.alarm td{background:#fdecea}
tr.overdue td{background:#f7d4d0}
.acts{display:flex;gap:6px;flex-wrap:wrap}
.formrow{display:flex;gap:8px;flex-wrap:wrap;align-items:end}
.formrow .field{margin:0;flex:1;min-width:120px}
.scroll{overflow-x:auto}
@media (max-width:700px){th,td{padding:7px 6px;font-size:13px}}
.btn.sage{background:var(--sage)}
.in-card{border-left:6px solid var(--bord)}
.out-card{border-left:6px solid var(--sage)}
.wrap>.btn.sm{margin-bottom:10px}
.tabs{display:flex;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:62px;z-index:4}
.tab{flex:1;border:0;background:none;padding:12px 6px;font-weight:700;color:var(--grey);border-bottom:3px solid transparent;cursor:pointer}
.tab.in{width:auto;border:0;border-bottom:3px solid transparent;border-radius:0;background:none;padding:12px 6px}
.tab.on.in{color:var(--bord);border-bottom-color:var(--bord)}
.tab.on.out{color:var(--sage);border-bottom-color:var(--sage)}
.tab.glow{animation:glow 1s infinite alternate}
@keyframes glow{from{background:#fff}to{background:#fbe3a6}}
.badge.out,.badge.booked{background:#d9e8ea;color:var(--sage)}
.switch{display:inline-flex;align-items:center;gap:8px;font-weight:600}
.miss-notfound{background:#1c1c1c;color:#fff;border-color:#1c1c1c}
.miss-badphone{background:#8a8a8a;color:#fff;border-color:#8a8a8a}
.miss-noanswer{background:#6b4423;color:#fff;border-color:#6b4423}
.miss-notfound .muted,.miss-badphone .muted,.miss-noanswer .muted{color:#e6e6e6}
tr.miss-notfound td{background:#1c1c1c;color:#fff}
tr.miss-badphone td{background:#8a8a8a;color:#fff}
tr.miss-noanswer td{background:#6b4423;color:#fff}
tr[class^="miss-"] td a{color:#fff}
.badge.badphone{background:#8a8a8a;color:#fff}
.badge.noanswer{background:#6b4423;color:#fff}
.badge.notfound{background:#1c1c1c;color:#fff}
.chip.amber{background:#fdebc8;border-color:#e0b25a}
.chip.red{background:var(--bad);border-color:var(--bad);color:#fff}
.chip.red .muted{color:#fff}
.alert.black{background:#1c1c1c}
.hint{font-size:13px;color:#6f6f6b}
.btn.edit{padding:3px 8px;font-size:13px}
.row.tel{gap:6px;white-space:nowrap}
.tabs.adm{overflow-x:auto}
.tabs.adm .tab{white-space:nowrap;flex:0 0 auto;padding:12px 18px}
.tabs.adm .tab.on{color:var(--teal);border-bottom-color:var(--teal)}
tr.total td{font-weight:700;background:#faf8f3}
tr.offseason td{color:#9a9a96}
.prow{padding:8px 0;border-bottom:1px solid var(--line)}
.prow:last-child{border-bottom:0}
.in.num{width:150px;flex:0 0 auto}
.band{margin-bottom:6px}
.band .in{width:auto}
textarea.in{resize:vertical;font:inherit}
.wrap.wide>.btn{margin-top:10px}
.chip.spec{background:#dfe5ea;border:1px dashed #9aa7b1}
.chip.spec.on{background:#cfead8;border:1px solid var(--ok)}
.badge.role{background:var(--gold);color:#fff}
.hero{display:block;width:100%;max-height:46vh;object-fit:cover}
.gb{position:fixed;right:10px;bottom:10px;width:30px;height:30px;border-radius:50%;border:0;background:var(--teal);color:var(--gold);font-size:11px;font-weight:700;letter-spacing:.04em;opacity:.55;cursor:pointer;padding:0}
.card.amarok{background:#dfe5ea;border:1px dashed #9aa7b1}
.maplink{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--teal);font-weight:600}
.go{font-weight:700;color:var(--ok)}
.bandnote{font-weight:600;color:var(--warn)}
.gbrow{display:flex;justify-content:flex-end;margin-top:70px}
.gb{position:static}
.hero.small{max-height:26vh;border-radius:14px;margin-bottom:10px}
.hero.sheetimg{max-height:30vh;border-radius:12px}
.ico.map,.maplink{background:#1a73e8;color:#fff;border:0}
.maplink{padding:8px 12px;border-radius:999px;text-decoration:none}
.ico.map{width:auto;padding:0 12px;border-radius:999px;font-size:13px;font-weight:700}
.tick{color:var(--ok);font-weight:700}
.badge.extra{background:var(--sage);color:#fff}
.tick.off{color:#b9b6ad}
.tick{font-size:18px}
.big2{font-size:17px}
.h2sec{font-size:20px;font-weight:700;padding:11px 16px;border-radius:12px;color:#fff;margin:26px 0 10px;align-items:center}
.h2sec.in,.phonehead.in{background:var(--bord)}
.h2sec.out,.phonehead.out{background:var(--sage)}
.h2sec.hist{background:var(--grey)}
.phonebox{border-radius:14px;margin:14px 0 10px;overflow:hidden;background:#fff}
.phonebox.in{border:2px solid var(--bord)}
.phonebox.out{border:2px solid var(--sage)}
.phonehead{color:#fff;font-weight:700;font-size:17px;padding:9px 14px;align-items:center}
.phonebox .card{border:0;margin:0;border-radius:0}
.flash{animation:flashcard .7s ease-in-out infinite alternate;border:2px solid var(--ok)}
@keyframes flashcard{from{background:#fff}to{background:#cfead8}}
.flash.late{border:2px solid var(--bad);animation-name:flashlate}
@keyframes flashlate{from{background:#fff}to{background:#f9d2cd}}
.drv{margin-top:6px;border-top:1px solid rgba(0,0,0,.12);padding-top:6px}
.chip.red .btn.line{color:var(--ink)}
.code{font-family:Consolas,Menlo,monospace;font-size:17px;letter-spacing:.06em;padding:2px 0}
.more-here{background:#dcefe3;border:2px solid var(--ok);border-radius:10px;padding:10px 12px;display:grid;gap:8px}
.keep{background:#fff4d6;border:2px solid #e0b040;border-radius:10px;padding:10px 12px;font-weight:600}
.roomgrid{display:flex;flex-wrap:wrap;gap:6px}
.rchip{display:inline-block;min-width:44px;text-align:center;padding:4px 8px;border-radius:8px;font-weight:700;font-size:13px;border:2px solid transparent}
.rs-house{background:#d9ebe7;color:#0f4a43}.rs-arr{background:#fdecc8;color:#7a4b00}.rs-both{background:#e6dcf5;color:#4a2a80}.rs-free{background:#ececE6;color:#666}
.rchip.odd{border-color:#b3261e;color:#b3261e}
.badge.rs-house,.badge.rs-arr,.badge.rs-both,.badge.rs-free{font-size:11px}
.floor{display:flex;gap:12px;align-items:flex-start}.floorname{min-width:84px;font-weight:700;padding-top:5px}
button.rchip{font:inherit;font-weight:700;font-size:13px;cursor:pointer}button.rchip.go:hover{filter:brightness(.93)}
span.rchip:not(.go){opacity:.75}
tr.hl td{background:#fff4d6 !important;transition:background .3s}
.rs-manual{background:#d6e6fb;color:#123f7a}.badge.rs-manual{font-size:11px}
tr.dimrow td{background:#fafaf7}
span.rchip:not(.go){opacity:1}
tr.dimrow td .muted{white-space:nowrap}
.row.tel{flex-wrap:wrap}
table.users{border-left:5px solid var(--line)}table.users.role-admin{border-left-color:var(--bord)}table.users.role-office{border-left-color:var(--teal)}table.users.role-driver{border-left-color:var(--ok)}
table.users th:first-child,table.users td:first-child{width:22%}table.users th:nth-child(2),table.users td:nth-child(2){width:26%}
.wakevid{position:fixed;left:0;top:0;width:100vw;height:60vh;opacity:.01;pointer-events:none;z-index:-1}
.hide{display:none!important}
.in.gpsin{min-width:260px;max-width:340px}
/* cartina generica (ufficio, driver, «Sono altrove») */
.gmap{position:relative;height:300px;border-radius:14px;overflow:hidden;background:#dfe8df;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
.gmap .map-tiles,.gmap .map-pins{position:absolute;inset:0}
.gmap .map-tiles img{position:absolute;width:256px;height:256px;max-width:none}
.gmap .map-zoom{position:absolute;right:8px;top:8px;display:flex;flex-direction:column;gap:6px;z-index:5}
.gmap .map-zoom button,.gmap .map-me{width:38px;height:38px;border:0;border-radius:10px;background:#fff;color:#113f55;font:700 22px/1 system-ui,sans-serif;box-shadow:0 1px 5px rgba(0,0,0,.35);cursor:pointer;padding:0}
.gmap .map-me{position:absolute;right:8px;bottom:30px;z-index:5;color:#1a73e8}
.gmap .map-attr{position:absolute;right:0;bottom:0;z-index:5;background:rgba(255,255,255,.85);color:#333;font:11px/1.6 system-ui,sans-serif;padding:0 6px;border-radius:6px 0 0 0;text-decoration:none}
.gmap .pin{position:absolute;width:26px;height:26px;margin:-26px 0 0 -13px;background:#5a0e2d;border-radius:50% 50% 50% 0;transform:rotate(-45deg);box-shadow:0 2px 5px rgba(0,0,0,.4);z-index:1}
.gmap .pin::after{content:"";position:absolute;left:8px;top:8px;width:10px;height:10px;border-radius:50%;background:#fff}
.gmap .pin.dim{background:#8b979b;width:18px;height:18px;margin:-18px 0 0 -9px;opacity:.85;z-index:0}
.gmap .pin.dim::after{left:5px;top:5px;width:8px;height:8px}
.gmap .pin.guest{background:#d23b2a;width:34px;height:34px;margin:-34px 0 0 -17px;z-index:3}
.gmap .pin.guest::after{left:11px;top:11px;width:12px;height:12px}
.gmap .gm-lab{position:absolute;transform:translate(-50%,6px);background:rgba(255,255,255,.94);color:#1c1c1a;font:600 12px/1.25 system-ui,sans-serif;padding:2px 7px;border-radius:7px;white-space:nowrap;box-shadow:0 1px 3px rgba(0,0,0,.3);z-index:2;pointer-events:none}
.gmap .gm-lab.dim{font-weight:500;font-size:11px;color:#56605f;z-index:1}
.gmap .gm-lab.guest{background:#d23b2a;color:#fff;font-size:13px;z-index:4}
.gmap .hpin{position:absolute;width:66px;height:32px;margin:-38px 0 0 -33px;padding:3px 6px;border:1.5px solid #b3a177;border-radius:10px;background:#fff;box-shadow:0 2px 6px rgba(17,63,85,.35);z-index:0;display:flex;align-items:center;justify-content:center}
.gmap .hpin img{display:block;width:100%;height:100%;object-fit:contain}
.gmap .me-dot{position:absolute;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;background:#1a73e8;border:3px solid #fff;box-shadow:0 0 0 6px rgba(26,115,232,.25);z-index:4}
/* scegli il punto: segnaposto fisso al centro, la cartina si muove sotto */
.gmap.pick .gm-centre{position:absolute;left:50%;top:50%;width:34px;height:34px;margin:-34px 0 0 -17px;background:#d23b2a;border-radius:50% 50% 50% 0;transform:rotate(-45deg);box-shadow:0 3px 8px rgba(0,0,0,.45);z-index:6;pointer-events:none}
.gmap.pick .gm-centre::after{content:"";position:absolute;left:11px;top:11px;width:12px;height:12px;border-radius:50%;background:#fff}
/* ufficio: tasto «Posizione da verificare» che lampeggia */
@keyframes posblink{0%,100%{background:#d23b2a;color:#fff}50%{background:#fff;color:#d23b2a}}
.btn.posbtn{border:2px solid #d23b2a;background:#d23b2a;color:#fff;animation:posblink 1.1s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){.btn.posbtn{animation:none}}
.sheet>.possheet{max-width:760px}
.possheet .gmap{height:min(52vh,460px)}
/* crocetta di chiusura nell'angolo della finestra con la cartina */
.sheet>.possheet{position:relative}
.possheet .xclose{position:absolute;right:12px;top:12px;width:44px;height:44px;border:0;border-radius:50%;background:#eef1f0;color:#1c1c1a;font:700 20px/1 system-ui,sans-serif;cursor:pointer;z-index:7;padding:0}
.possheet h2{padding-right:52px}
/* chiamata in app */
.sheet.callsheet{z-index:60}
.call{text-align:center}
.call .call-ico{width:76px;height:76px;margin:4px auto 0;border-radius:50%;background:#113f55;color:#fff;font-size:36px;line-height:76px}
.call .call-status{font-size:18px;font-weight:600;margin:0}
.call .call-btns{display:flex;flex-direction:column;gap:10px}
.call audio{display:none}
/* posizione del driver sulla cartina dell'ospite */
.gmap .gm-drv{position:absolute;width:40px;height:40px;margin:-20px 0 0 -20px;border-radius:50%;background:#113f55;border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.45);font-size:21px;line-height:34px;text-align:center;z-index:5}
.gmap .gm-lab.drv{background:#113f55;color:#fff;transform:translate(-50%,24px);z-index:5}
.gmap.track{height:260px;margin-top:4px}
/* riquadro notifiche */
.pushcard{display:flex;flex-direction:column;gap:8px}
.pushcard p{margin:0}
.pushwrap:empty{display:none}
.pushwrap{padding-bottom:0}
.gmap .gm-drv.old{background:#7c8a90;opacity:.85}
.homecard.strong{border:2px solid #b3a177}
html{overflow-anchor:none}
.lrow{padding:10px 0;margin:0;border-bottom:1px solid var(--line)}
.lrow:last-child{border-bottom:0}
.lrow .lit{font-weight:500;font-size:14px;white-space:pre-wrap}
.lrow .lnota{font-weight:400;font-size:12px;font-style:italic}
.lrow textarea{resize:vertical;min-height:44px;font:inherit}
.lrow.lch textarea{border-color:var(--teal);box-shadow:0 0 0 2px rgba(18,62,84,.18)}
.lmiss{white-space:nowrap;font-size:14px}
.lrow .lcur{font-weight:600;font-size:14px;color:var(--teal);white-space:pre-wrap}
.lrow .lcur.none{font-weight:400;font-style:italic;color:#a0562b}
.gmap .map-me.left{right:auto;left:8px;bottom:8px;width:34px;height:34px;font-size:19px}
.pushline{display:flex;align-items:center;gap:10px;font-size:13px;color:#56605f;padding:2px 4px}
.pushline .grow{flex:1}
