:root{font-family:'IBM Plex Sans Thai',sans-serif;color:#153d35;background:#eef6f2}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input{font-family:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}.screen{min-height:100dvh;display:flex;flex-direction:column}.topbar{background:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 24px;border-bottom:1px solid #d8eae0}.brand{display:flex;gap:13px;align-items:center}.brand-mark{width:46px;height:46px;border-radius:14px;background:#094e40;color:#f5b84e;display:grid;place-items:center;font-size:31px;border:2px solid #f6c962}.brand small,.side-card small,.overline{color:#25866d;letter-spacing:1.2px;font-size:10px;font-weight:800}.brand h1{font:600 clamp(18px,2vw,24px) Kanit;margin:0;color:#075038}.top-actions{display:flex;align-items:center;gap:11px}.sync-indicator{border-radius:100px;background:#e9f8ee;border:1px solid #b7e6cc;padding:8px 12px;color:#177052;display:flex;align-items:center;gap:8px;font-size:11px}.sync-indicator span{width:8px;height:8px;border-radius:50%;background:#98ad9d}.sync-indicator.ok span{background:#16bb7d}.sync-indicator.error span{background:#ec794f}.go-back,.sidebar a{display:inline-flex;align-items:center;text-decoration:none;border:1px solid #c5e4d1;border-radius:11px;padding:10px 13px;color:#13674a;font-weight:700;font-size:11px;background:#f5fbf6}.go-back:hover{background:#e9f9ed}.info-strip{background:linear-gradient(105deg,#073c34,#0c6654);color:white;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:18px}.info-strip h2{font:600 clamp(15px,1.8vw,21px) Kanit;margin:2px 0}.info-strip p{color:#c3e8d9;font-size:11px;line-height:1.55;margin:0}.overline{color:#9eead4}.stats{display:flex;gap:8px}.stats>div{background:#ffffff15;border:1px solid #ffffff26;border-radius:12px;min-width:105px;padding:8px 11px}.stats span{font-size:10px;display:block;color:#c9eadc}.stats b{font:650 23px Kanit;color:#fff}.layout{padding:14px;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:12px;flex:1;min-height:0}.map-panel{position:relative;min-height:min(70vh,760px);border-radius:17px;overflow:hidden;background:#bdd8c9;box-shadow:0 12px 32px #0b403026}#liveMap{width:100%;height:100%;min-height:min(70vh,760px)}.map-tools{position:absolute;z-index:800;top:13px;right:13px;display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end;max-width:90%}.map-tools button{border-radius:9px;background:#fff;color:#0a4d40;border:1px solid #cce1d8;padding:8px 11px;box-shadow:0 4px 10px #122d292b;font-size:11px;font-weight:700}.map-tools button.selected{background:#075e4a;color:white;border-color:#0b8463}.map-legend{position:absolute;left:12px;bottom:18px;z-index:800;display:flex;flex-wrap:wrap;gap:10px;border-radius:12px;background:#0c3935e8;color:#fff;padding:9px 13px;font-size:10px}.map-legend span{display:inline-flex;align-items:center;gap:7px}.map-legend i{width:16px;height:4px;display:inline-block;background:#0ce9a0;border-radius:5px}.map-legend i.spot{background:#ff9b20;width:10px;height:10px;border:2px solid white;border-radius:50%}.map-legend i.line-blue{background:transparent;border-top:3px dashed #62c9ff;border-radius:0}.sidebar{overflow:auto;max-height:calc(100dvh - 220px);display:flex;flex-direction:column;gap:12px}.side-card{background:#fff;border:1px solid #d8e9df;border-radius:17px;padding:15px;box-shadow:0 8px 25px #0c433811}.card-head{display:flex;justify-content:space-between;align-items:center;gap:9px}.card-head h3{font:600 17px Kanit;margin:2px 0 0;color:#074a36}.card-head button{border:1px solid #d7eadf;border-radius:8px;padding:7px 10px;color:#0d7555;background:#eff9f3;font-size:11px}.faint{font-size:10px;color:#839e92}.sidebar input[type=search]{width:100%;border:1px solid #d5e5de;border-radius:10px;background:#f7fbf8;padding:10px;font-size:12px;outline-color:#20a77a;margin:5px 0 10px}.staff-list,.point-list{display:grid;gap:8px}.empty{font-size:11px;color:#78958b;padding:14px;border-radius:11px;background:#f2f8f5;line-height:1.7;margin:0}.person,.point{width:100%;border:1px solid #d9e9df;border-radius:11px;background:#f8fcf9;display:flex;gap:10px;padding:10px;align-items:center;text-align:left}.person:hover,.point:hover{background:#eaf8ee}.person .info,.point .info{min-width:0;flex:1}.person b,.point b{font-size:12px;color:#0d513a;display:block}.person small,.point small{display:block;font-size:10px;color:#708e7f;letter-spacing:0;line-height:1.4}.live-spot{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:100%;background:#ff9a22;color:#fff;flex:none;box-shadow:0 0 0 4px #ff9b2233}.point .num{display:grid;place-items:center;background:#108c70;color:white;border-radius:9px;width:29px;height:29px;font-weight:800;flex:none;font-size:11px}.count-five{background:#e8f8f0;color:#147453;border-radius:9px;padding:3px 9px;font:700 12px Kanit}.privacy{padding:15px;border:1px solid #d2e4d8;background:#e7f3ed;border-radius:14px;color:#456d5b}.privacy b{font-size:12px}.privacy p{font-size:10px;line-height:1.6}.privacy a{background:white}footer{display:flex;justify-content:space-between;gap:10px;padding:9px 18px;font-size:10px;color:#597d6c;background:#e8f3ec}.staff-live-icon{background:transparent;border:0}.staff-live-pulse{position:relative;width:26px;height:26px;display:grid;place-items:center}.staff-live-pulse:before{content:'';position:absolute;inset:0;border:2px solid #ff8b08;border-radius:50%;animation:pulse 2s ease-out infinite;background:#ffba4a33}.staff-live-pulse span{position:relative;width:13px;height:13px;border-radius:50%;border:2px solid white;background:#ff8d0a;box-shadow:0 1px 8px #57260080}.leaflet-popup-content{font-family:'IBM Plex Sans Thai',sans-serif;line-height:1.6}.leaflet-popup-content b{color:#10634e}.leaflet-control-zoom a{color:#0a644e!important}.auth-overlay{position:fixed;inset:0;background:#062e26ef;z-index:9999;display:flex;align-items:center;justify-content:center;padding:16px}.auth-overlay.hidden{display:none}.auth-card{width:min(430px,100%);border-radius:18px;background:#fff;padding:24px;box-shadow:0 25px 70px #071d175b;display:grid;gap:12px}.auth-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:13px;background:#0c634e;color:#ffb62b;font-size:28px}.auth-card small{color:#1c9672;font-weight:800;letter-spacing:1px}.auth-card h2{font:600 25px Kanit;margin:0;color:#064d3d}.auth-card p{font-size:12px;line-height:1.6;color:#6b857a;margin:0}.auth-card label{font-size:11px;color:#295c48;font-weight:700;display:grid;gap:6px}.auth-card input{padding:12px;border:1px solid #cfe4d9;border-radius:10px;font-size:13px}.login-button{padding:12px;border-radius:10px;background:#0b8063;color:#fff;font-weight:700;border:0}.auth-message{background:#f0f7f2;border-radius:9px;padding:10px;font-size:11px;line-height:1.6;color:#567664}.auth-card>a{text-align:center;font-size:12px;color:#0a755a}@keyframes pulse{0%{transform:scale(.75);opacity:.95}100%{transform:scale(1.9);opacity:0}}@media(prefers-reduced-motion:reduce){.staff-live-pulse:before{animation:none;opacity:.5}}@media(max-width:950px){.layout{grid-template-columns:minmax(0,1fr) 285px;padding:9px;gap:9px}.stats>div{min-width:80px}.info-strip{padding:12px 14px}.map-panel,#liveMap{min-height:650px}.sidebar{max-height:none}}@media(max-width:700px){.topbar{padding:10px;flex-wrap:wrap}.top-actions{width:100%;justify-content:space-between}.info-strip{display:block}.stats{margin-top:10px}.layout{grid-template-columns:1fr}.map-panel,#liveMap{height:62vh;min-height:400px}.sidebar{max-height:none}.map-legend{font-size:9px}.map-tools{top:8px;right:8px;max-width:96%}.map-tools button{font-size:10px;padding:7px}footer{flex-direction:column}}

/* V20 — seven task departments, marker colours retain textual labels */
.staff-live-pulse:before{border-color:var(--dept-color,#f18a17)!important;background:color-mix(in srgb,var(--dept-color,#f18a17) 20%,transparent)!important}
.staff-live-pulse span{background:var(--dept-color,#f18a17)!important}
.live-spot{background:var(--dept-color,#f18a17)!important;box-shadow:0 0 0 4px color-mix(in srgb,var(--dept-color,#f18a17) 20%,transparent)!important}
.dept-legend-grid{display:grid;gap:8px;margin-top:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
.dept-legend-item{display:flex;align-items:center;gap:8px;font-size:10px;line-height:1.45;color:#375c4e;min-width:0}
.dept-color-dot{display:inline-block;width:12px;height:12px;flex:none;border-radius:50%;background:var(--dept-color,#869a8f);border:1.5px solid white;box-shadow:0 0 0 1px #cddbd3;vertical-align:middle}
@media(max-width:460px){.dept-legend-grid{grid-template-columns:1fr 1fr}}
