/* Peta tim — konsep era spreadsheet: status LIVE, peta besar + daftar staf dengan bar 24 jam. */
#team-map-root{position:relative}
.tm-status{display:flex;align-items:center;gap:10px;margin-bottom:12px;min-height:40px}
.tm-live,.tm-hist{flex:none;display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;letter-spacing:.8px;border-radius:99px;padding:4px 10px}
.tm-live{background:#e2f6eb;color:#12683e}
.tm-live::before{content:"";width:7px;height:7px;border-radius:50%;background:#22b573;box-shadow:0 0 0 0 rgba(34,181,115,.6);animation:tm-pulse 2s infinite}
.tm-hist{background:#eef2f4;color:#46606a}
@keyframes tm-pulse{70%{box-shadow:0 0 0 7px rgba(34,181,115,0)}100%{box-shadow:0 0 0 0 rgba(34,181,115,0)}}
.tm-status-text{flex:1;min-width:0;font-size:14px;color:#46606a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-tools{flex:none;display:flex;gap:8px;align-items:center}
.tm-tools input{min-height:40px;border:1px solid var(--line);border-radius:9px;padding:6px 10px;font:inherit;font-size:14px;background:#fff}
.tm-icon-btn{width:40px;height:40px;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:18px;cursor:pointer;color:#12683e}
.tm-icon-btn:hover{background:#f0f7f3}
.tm-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px;align-items:stretch}
.tm-layout.is-locked{filter:blur(2.5px) saturate(.85);pointer-events:none;user-select:none}
.tm-map-card,.tm-list-card{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;min-width:0}
.tm-map-card{display:flex;flex-direction:column}
.tm-map{position:relative;flex:1;min-height:max(420px,calc(100vh - 300px));background:#e9efec}
.tm-legend{display:flex;flex-wrap:wrap;gap:6px 16px;padding:10px 16px;border-top:1px solid var(--line);font-size:12.5px;color:var(--muted)}
.tm-legend span{display:inline-flex;align-items:center;gap:6px}
.tm-dot{flex:none;display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--c,#94a3b8)}
.tm-dot-stop{background:transparent;border:2px solid #8b5cf6;width:11px;height:11px}
.tm-list-card{display:flex;flex-direction:column;max-height:calc(max(420px,calc(100vh - 300px)) + 44px)}
.tm-list-head{padding:14px 16px 10px;border-bottom:1px solid var(--line)}
.tm-list-head h2{font-size:16px}
.tm-head-sub{display:block;margin-top:2px;font-size:12px;font-weight:500;color:var(--muted)}
.tm-list-head input{width:100%;margin-top:10px;min-height:42px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:#f4f7f5;font:inherit;font-size:14px}
.tm-barlegend{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:10px;font-size:12px;color:var(--muted)}
.tm-barlegend>span{display:inline-flex;align-items:center;gap:5px}
.tm-axis{margin-left:auto;font-variant-numeric:tabular-nums;letter-spacing:.2px}
.tm-k{display:inline-block;width:10px;height:10px;border-radius:3px;flex:none}
.tm-site{background:#22b573}.tm-moving{background:#ef743d}.tm-stop{background:#8b5cf6}.tm-unknown{background:#94a3b8}
.tm-list,.tm-list-card .tm-list{flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;padding:8px;display:grid;gap:4px;align-content:start}
.tm-person{border:1px solid transparent;border-left:3px solid transparent;border-radius:10px;transition:background .15s}
.tm-person:hover{background:#f5f8f6}
.tm-person.is-selected{background:#e7f5ee;border-color:#bfe3cf;border-left-color:var(--green)}
.tm-person[hidden]{display:none}
.tm-person-btn{display:grid;gap:3px;width:100%;text-align:left;background:none;border:0;padding:10px 12px 11px;cursor:pointer;font:inherit;color:inherit}
.tm-row1{display:flex;align-items:center;gap:8px;min-width:0}
.tm-row1 strong{flex:1;min-width:0;font-size:14.5px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-role{flex:none;font-size:11.5px;font-weight:700;color:#46606a;background:#eef2f4;border-radius:99px;padding:2px 9px}
.is-selected .tm-role{background:#1f5f46;color:#fff}
.tm-row2{font-size:12.5px;color:var(--muted);padding-left:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-row2 b{color:var(--ink);font-weight:650}
.tm-warn{font-style:normal;color:#b4521f;font-weight:700}
.tm-row3{font-size:12px;color:var(--muted);padding-left:18px}
.h-site{color:#178a52;font-weight:700}.h-moving{color:#c35a22;font-weight:700}.h-stop{color:#7c4ddb;font-weight:700}.h-unknown{color:#64748b;font-weight:700}
.tm-bar24{position:relative;display:block;height:10px;margin:6px 0 0 18px;background:#e6ecea;border-radius:99px;overflow:hidden}
.tm-bar24 .tm-seg{position:absolute;top:0;bottom:0;display:block}
.tm-tick{position:absolute;top:0;bottom:0;width:1px;background:rgba(7,26,34,.12);z-index:1}
.tm-now{position:absolute;top:-1px;bottom:-1px;width:2px;background:#071a22;z-index:2;border-radius:2px}
.tm-more{padding:0 12px 10px 30px}
.tm-stopnote{display:block;font-size:12.5px;color:var(--muted)}
.tm-stops{display:grid;gap:4px}
.tm-stop-row{display:flex;align-items:center;gap:8px;font-size:12.5px;color:#46606a}
.tm-stop-row b{color:var(--ink)}
.tm-stop-row a{margin-left:auto;color:var(--link);font-weight:700;text-decoration:none;padding:4px 0}
.tm-none{padding:14px;color:var(--muted);font-size:14px}
/* Penanda peta */
.tm-marker-wrap{background:none;border:0}
.tm-pin{display:block;width:16px;height:16px;margin:3px;border-radius:50%;background:var(--c);border:3px solid #fff;box-shadow:0 1px 6px rgba(7,26,34,.35)}
.tm-pin.is-on{width:20px;height:20px;margin:1px;box-shadow:0 0 0 6px color-mix(in srgb,var(--c) 30%,transparent),0 1px 6px rgba(7,26,34,.35);animation:tm-ring 2.4s infinite}
@keyframes tm-ring{50%{box-shadow:0 0 0 11px color-mix(in srgb,var(--c) 12%,transparent),0 1px 6px rgba(7,26,34,.35)}}
.leaflet-tooltip.tm-label{background:#fff;border:0;border-radius:7px;box-shadow:0 2px 8px rgba(7,26,34,.18);padding:3px 8px;font:600 12px/1.35 'Plus Jakarta Sans',system-ui,sans-serif;color:#0b2530}
.leaflet-tooltip.tm-label::before{display:none}
.leaflet-tooltip.tm-label-on{padding:7px 11px;font-size:13px;font-weight:500;color:#46606a}
.leaflet-tooltip.tm-label-on b{color:#0b2530;font-size:14px}.leaflet-tooltip.tm-label-on span{font-size:11.5px;color:#7a8d93}
.tm-geofence{filter:drop-shadow(0 0 4px rgba(56,189,248,.55))}
.tm-tile-error::after{content:"Peta jalan belum termuat. Posisi tetap ditampilkan.";position:absolute;left:12px;bottom:12px;z-index:500;background:#fff;border-radius:8px;padding:6px 10px;font-size:12.5px;color:#46606a;box-shadow:0 2px 8px rgba(0,0,0,.12)}
.tm-hint{margin:0;color:#52676e;font-size:14px;line-height:1.5}
.tm-empty{border:1px dashed #c9d7cf;border-radius:12px;padding:16px;display:grid;gap:6px;margin:4px}
.tm-empty p{margin:0;color:#52676e;font-size:13.5px;line-height:1.55}
.tm-loading{padding:40px;text-align:center;color:#52676e}
.tm-lock{position:absolute;left:50%;top:160px;transform:translateX(-50%);width:min(520px,calc(100% - 32px));background:#071a22;color:#fff;border-radius:22px;padding:28px;box-shadow:0 30px 80px rgba(7,26,34,.35);z-index:600}
.tm-lock h2{margin:8px 0 10px;font-size:24px;letter-spacing:-.02em}
.tm-lock p{color:#c4d6d9;line-height:1.6;margin:0 0 16px}
.tm-lock .tm-hint{color:#c4d6d9}
.tm-lock-icon{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;background:rgba(43,201,124,.15);color:#2bc97c;font-size:20px}
@media(max-width:1100px){.tm-layout{grid-template-columns:minmax(0,1fr) 320px}}
@media(max-width:820px){.tm-layout{grid-template-columns:1fr}.tm-map{min-height:44vh}.tm-list-card{max-height:none;height:calc(100dvh - 130px);min-height:420px}.tm-list{max-height:none}}
@media(max-width:580px){
 .tm-status{flex-wrap:wrap;gap:6px 8px}
 .tm-status-text{flex-basis:calc(100% - 80px);white-space:normal;font-size:13px}
 .tm-tools{width:100%}.tm-tools input{flex:1}
 .tm-map{min-height:40vh}
 .tm-legend{font-size:11.5px;gap:4px 12px;padding:8px 12px}
 .tm-list-head{padding:12px}
 .tm-axis{display:none}
 .tm-lock{top:120px;padding:22px}
}
/* Absen via web (tanpa pelacakan Android) */
.tm-web{background:#22b573}
.tm-dot-web{background:#22b573;box-shadow:0 0 0 2px #fff,0 0 0 3px #22b573}
.tm-src{flex:none;font-size:10.5px;font-weight:800;letter-spacing:.4px;border-radius:5px;padding:2px 6px;text-transform:uppercase}
.tm-src-android{background:#e2f6eb;color:#12683e}
.tm-src-web{background:#fff1e6;color:#a84a17}
.tm-muted{color:#8a9aa0;font-size:11.5px}
.tm-pin.is-live{animation:tm-live 1.8s ease-out infinite}
@keyframes tm-live{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--c) 55%,transparent),0 1px 6px rgba(7,26,34,.35)}80%,100%{box-shadow:0 0 0 14px color-mix(in srgb,var(--c) 0%,transparent),0 1px 6px rgba(7,26,34,.35)}}
.tm-pin.is-web{border-style:dashed;border-color:#fff}
.tm-pin.is-on.is-live{animation:tm-live 1.4s ease-out infinite;width:20px;height:20px;margin:1px}
/* ===== Salinan tampilan peta era spreadsheet (SML Monitor web v48) ===== */
#tm-map .leaflet-tile-pane{filter:brightness(.86) contrast(1.06) saturate(.9)}
/* Penanda staf: salinan persis dari APK/web SML Monitor */
#tm-map .person-marker{width:34px;height:34px;margin:0;position:relative;border-radius:50%}
#tm-map .person-marker .beacon-core{position:absolute;inset:10px;border:2px solid #92a1b8;border-radius:50%;background:#526078;box-shadow:0 0 0 3px #17233a;z-index:2}
#tm-map .person-marker .beacon-ring{display:none}
#tm-map .person-marker:not(.current):not(.overview){width:7px;height:7px;margin:13.5px}
#tm-map .person-marker:not(.current):not(.overview) .beacon-core{inset:1px;border-width:1px;background:#56647c;border-color:#fff;box-shadow:0 0 0 1px #5c6b80}
#tm-map .person-marker.current,#tm-map .person-marker.overview{--radar-color:#0f9d4f;--radar-border:#fff}
#tm-map .person-marker.delayed.current,#tm-map .person-marker.delayed.overview{--radar-color:#ffa272;--radar-border:#fff}
#tm-map .person-marker.current .beacon-core,#tm-map .person-marker.overview .beacon-core{inset:10px;background:var(--radar-color);border:2px solid var(--radar-border);box-shadow:0 0 12px var(--radar-color),0 0 0 1px rgba(10,61,36,.55)}
#tm-map .person-marker.current .beacon-ring,#tm-map .person-marker.overview .beacon-ring{display:block;position:absolute;inset:1px;border:3px solid var(--radar-color);border-radius:50%;opacity:0;animation:smlPulse 2.4s ease-out infinite;animation-delay:var(--pulse-delay,0s)}
#tm-map .person-marker.current .beacon-ring.second,#tm-map .person-marker.current .beacon-ring.third,#tm-map .person-marker.overview .beacon-ring.second,#tm-map .person-marker.overview .beacon-ring.third{display:none}
#tm-map .person-marker.slideshow:not(.current):not(.overview){width:24px;height:24px;margin:5px;--radar-color:#0f9d4f;--radar-border:#fff}
#tm-map .person-marker.delayed.slideshow:not(.current):not(.overview){--radar-color:#ffa272;--radar-border:#fff}
#tm-map .person-marker.slideshow:not(.current):not(.overview) .beacon-core{inset:7px;border:1.5px solid var(--radar-border);background:var(--radar-color);box-shadow:0 0 8px var(--radar-color)}
#tm-map .person-marker.slideshow:not(.current):not(.overview) .beacon-ring{display:block;position:absolute;inset:2px;border:1.5px solid var(--radar-color);border-radius:50%;opacity:0;animation:smlPulse 2.4s ease-out infinite;animation-delay:var(--pulse-delay,0s)}
/* Saat slideshow berhenti (pilih manual), yang online tetap hijau kecil seperti versi lama */
#tm-map .person-marker.online:not(.slideshow):not(.current):not(.overview) .beacon-core{background:#0f9d4f;border-color:#fff}
#tm-map .person-marker.delayed:not(.slideshow):not(.current):not(.overview) .beacon-core{background:#ffa272;border-color:#fff}
#tm-map .person-marker.offline .beacon-ring{display:none!important}
#tm-map .person-marker.group{width:34px!important;height:34px!important;margin:0!important;--radar-color:#0f9d4f;--radar-border:#fff}
#tm-map .person-marker.group.delayed{--radar-color:#ffa272;--radar-border:#fff}
#tm-map .person-marker.group.offline{--radar-color:#56647c;--radar-border:#fff}
#tm-map .person-marker.group .beacon-core{inset:6px!important;border:2px solid var(--radar-border)!important;background:var(--radar-color)!important;box-shadow:0 0 10px var(--radar-color)!important}
#tm-map .person-marker.group.offline .beacon-core{box-shadow:0 0 0 1px #17233a!important}
#tm-map .person-marker.group:not(.offline) .beacon-ring{display:block;position:absolute;inset:1px;border:2px solid var(--radar-color);border-radius:50%;opacity:0;animation:smlPulse 2.4s ease-out infinite;animation-delay:var(--pulse-delay,0s)}
#tm-map .person-marker.group .beacon-ring.second,#tm-map .person-marker.group .beacon-ring.third{display:none!important}
#tm-map .person-marker.group .group-count{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:3;font:800 12px/1 system-ui,sans-serif;color:#fff}
#tm-map .person-marker.group.offline .group-count{color:#e8eef7}
@keyframes smlPulse{0%{transform:scale(.5);opacity:.85}100%{transform:scale(2);opacity:0}}
/* Kotak label: nama + jabatan di atas, lokasi di bawah */
#tm-map .leaflet-tooltip.tip{--tip-bg:#edf4fc;--tip-line:#8cacc4;--tip-ink:#173047;--tip-detail:#356d6a;--tip-row:#47666d;--tip-shadow:#2846592b;background:var(--tip-bg);border:1px solid var(--tip-line);color:var(--tip-ink);border-radius:10px;box-shadow:0 4px 14px var(--tip-shadow);font:600 12.5px 'Plus Jakarta Sans',system-ui,sans-serif;padding:6px 9px}
#tm-map .leaflet-tooltip.tip.leaflet-tooltip-top:before{border-top-color:var(--tip-bg)}
#tm-map .leaflet-tooltip.tip.leaflet-tooltip-right:before{border-right-color:var(--tip-bg)}
#tm-map .leaflet-tooltip.tip.leaflet-tooltip-left:before{border-left-color:var(--tip-bg)}
#tm-map .leaflet-tooltip.tip.leaflet-tooltip-bottom:before{border-bottom-color:var(--tip-bg)}
#tm-map .tip small{display:block;font-weight:500;color:var(--tip-detail)}
#tm-map .tip-title{font-weight:700;margin-bottom:3px;color:var(--tip-ink)}
#tm-map .leaflet-tooltip.person-map-tip{padding:7px 10px;width:max-content;max-width:250px;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
#tm-map .person-map-tip .tip-title{font-size:14px;font-weight:700;margin-bottom:2px;line-height:1.35}
#tm-map .person-map-tip small{font-size:12px;line-height:1.4}
#tm-map .person-map-tip .tip-job{font-size:11px;font-weight:600;opacity:.62;margin-left:4px;white-space:nowrap}
#tm-map .person-map-tip.group-tip{max-width:290px}
#tm-map .person-map-tip.group-tip .tip-title{animation:tipSwap .35s ease}
#tm-map .leaflet-tooltip.tip-current{z-index:1000}
@keyframes tipSwap{from{opacity:.15;transform:translateY(2px)}to{opacity:1;transform:none}}
.grp-popup .leaflet-popup-content{margin:10px 12px}
.grp-pop .tip-title{font-size:14px;font-weight:700;margin-bottom:6px}
.grp-pick{display:grid;grid-template-columns:10px 1fr;column-gap:8px;align-items:center;width:100%;text-align:left;background:none;border:0;border-radius:8px;padding:6px;cursor:pointer;color:inherit;font:inherit}
.grp-pick:hover,.grp-pick.sel{background:#e7f5ee}
.grp-pick .tm-dot{grid-row:span 2}
.grp-pick span:not(.tm-dot){font-weight:700;font-size:13px}
.grp-pick small{grid-column:2;font-size:11px;opacity:.7}
/* Batas lokasi kerja: biru menyala; area staf yang disorot berdenyut */
#tm-map .leaflet-homeAreas-pane>svg{filter:drop-shadow(0 0 3px #0284c7cc) drop-shadow(0 0 10px #0284c766)}
#tm-map .leaflet-homeAreasOn-pane>svg{animation:areaGlowLight 2.4s ease-in-out infinite}
@keyframes areaGlowLight{0%,100%{filter:drop-shadow(0 0 3px #0284c7cc) drop-shadow(0 0 10px #0284c766)}50%{filter:drop-shadow(0 0 6px #0ea5e9) drop-shadow(0 0 18px #0284c799)}}
/* Kartu staf terpilih: tosca seperti versi lama */
.tm-person.is-selected{background:#cfeae4;border-color:#2f807740;border-left-color:#2f8077;box-shadow:0 6px 18px #2f807726}
.tm-person.is-selected .tm-row1 strong,.tm-person.is-selected .tm-row2 b{color:#0f3437}
.tm-person.is-selected .tm-row2,.tm-person.is-selected .tm-row3{color:#3c5e63}
.tm-person.is-selected .h-site{color:#1f6a43}.tm-person.is-selected .h-moving{color:#8a4a1f}
.tm-person.is-selected .tm-role{background:#2f8077;color:#fff}
.tm-person.is-selected .tm-bar24{background:#a9cec7}
.tm-search-toggle{display:none}
@media (prefers-reduced-motion:reduce){#tm-map .beacon-ring,#tm-map .leaflet-homeAreasOn-pane>svg{animation:none!important}}

/* ===== HP: susunan seperti era spreadsheet — peta diam di atas (45%), daftar staf menggulir (55%) ===== */
@media(max-width:640px){
 #team-map-root{display:flex;flex-direction:column;height:calc(100dvh - 92px);min-height:480px}
 .tm-status{flex:0 0 auto;flex-wrap:nowrap;gap:5px;margin-bottom:6px;min-height:0}
 .tm-live,.tm-hist{padding:3px 6px;font-size:9px;letter-spacing:.5px}
 .tm-status-text{flex:1;min-width:0;font-size:10.5px;line-height:1.35;white-space:normal}
 .tm-tools{width:auto;gap:4px}
 .tm-tools input{width:118px;min-height:34px;padding:4px 6px;font-size:12px;flex:none}
 .tm-icon-btn{width:34px;height:34px;border-color:transparent;background:transparent}
 .tm-layout{flex:1;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,45fr) minmax(0,55fr);gap:8px}
 .tm-map-card,.tm-list-card{min-height:0;max-height:none;border-radius:14px}
 .tm-map{min-height:0;flex:1}
 .tm-legend{padding:6px 8px;gap:4px 10px;font-size:9px;line-height:1.3}
 .tm-legend .tm-dot{width:7px;height:7px}
 .tm-list-head{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:0 6px;padding:2px 8px 2px 12px}
 .tm-list-head h2{font-size:14px}
 .tm-search-toggle{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:#2f8077;cursor:pointer}
 .tm-search-toggle[aria-expanded="true"]{background:#e7f5ee}
 .tm-list-head input{display:none;grid-column:1/-1;margin:0 0 6px}
 .tm-list-head.search-open input{display:block}
 .tm-barlegend{display:none}
 .tm-list{max-height:none;flex:1;min-height:0;padding:5px;-webkit-overflow-scrolling:touch}
 .tm-person-btn{padding:10px 9px;gap:2px}
 .tm-row1 strong{font-size:13px}
 .tm-row2{font-size:11px;line-height:1.5;padding-left:16px}
 .tm-row3{font-size:10px;line-height:1.5;padding-left:16px}
 .tm-bar24{margin:8px 0 0 16px;height:7px}
 #tm-map .leaflet-tooltip.person-map-tip{padding:5px 7px;max-width:min(200px,calc(100vw - 80px))}
 #tm-map .person-map-tip .tip-title{font-size:12px;margin-bottom:1px;line-height:1.3}
 #tm-map .person-map-tip small{font-size:11px;line-height:1.35}
 #tm-map .person-map-tip .tip-job{font-size:10px}
 .tm-lock{top:90px}
}
/* Tinjauan UX 0.4.13: teks peta terbaca & target sentuh di HP */
@media (pointer:coarse){.tm-icon-btn{width:44px;height:44px;min-height:44px}.tm-tools input{min-height:44px}}
@media(max-width:640px){
 .tm-live,.tm-hist{font-size:10.5px}
 .tm-status-text{font-size:12px}
 .tm-row1 strong{font-size:14px}
 .tm-row2,.tm-row3{font-size:12px}
 .tm-role,.tm-src{font-size:11px}
 .tm-legend{font-size:11px}.tm-legend .tm-dot{width:8px;height:8px}
 #tm-map .person-map-tip .tip-title{font-size:13px}
 #tm-map .person-map-tip small,#tm-map .person-map-tip .tip-job{font-size:12px}
}
/* 0.4.31: kelas "overview" pada penanda bentrok dengan kartu gelap .overview di Beranda (latar hitam membulat). Penanda harus transparan. */
#tm-map .person-marker.overview,#tm-map .person-marker.current{background:transparent!important;color:inherit;overflow:visible!important;margin-bottom:0!important;border-radius:50%}

/* 0.4.35 — Layar lebar: peta dan daftar staf memenuhi sisa layar sampai bawah (tinggi diatur team-map.js). */
@media(min-width:821px){
 #team-map-root{display:flex;flex-direction:column}
 #team-map-root>.tm-layout{flex:1;min-height:0}
 .tm-map{min-height:240px}
 .tm-list-card{max-height:none;min-height:0}
 .tm-list{flex:1;min-height:0}
}
@media(min-width:821px){body.tm-fill .app-footer{display:none}}

/* Jam komputer (StaffCop): biru, berbeda dari hijau Kerja, oranye Perjalanan, abu Lainnya */
.tm-office{background:#2f80ed}
.h-office{color:#1d63c4;font-weight:700}
.tm-bar24 .tm-pc{background:#2f80ed;z-index:1}
.tm-person.is-selected .h-office{color:#174f9c}
.tm-src-komputer{background:#e3ecf8;color:#1d63c4}

/* Pil jam komputer di baris lokasi; titik berdenyut hanya saat komputer aktif */
.tm-row2{white-space:normal}
.tm-pcon{display:flex;width:max-content;max-width:100%;align-items:center;gap:6px;margin:4px 0 1px;padding:2px 10px 2px 8px;border-radius:99px;background:#e3ecf8;color:#1d63c4;font-style:normal;font-size:11.5px;font-weight:700;white-space:nowrap}
.tm-pcon::before{content:"";width:6px;height:6px;border-radius:50%;background:#9db8e0}
.tm-pcon.is-live::before{background:#2f80ed;animation:tmpc 1.8s ease-in-out infinite}
@keyframes tmpc{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.tm-pcon.is-live::before{animation:none}}
.tm-person.is-selected .tm-pcon{background:#cfe0f8}

/* 0.4.147 kartu staf: kepala, status satu baris, bar berlabel, empat kotak angka tetap */
.tm-list .tm-person.tm-c{border:1px solid var(--line,#e3e8e5);border-radius:16px;background:#fff;box-shadow:none}
.tm-list .tm-person.tm-c:hover{background:#fff;border-color:#c5d3cb}
.tm-list .tm-person.tm-c.is-selected{background:#fff;border:2px solid #22b573;box-shadow:none}
.tm-list .tm-c .tm-person-btn{display:flex;flex-direction:column;gap:11px;padding:14px 16px}
.tm-list .tm-c.is-selected .tm-person-btn{padding:13px 15px}
.tm-c-head{display:flex;align-items:center;gap:12px;min-width:0}
.tm-c-avwrap{position:relative;flex:none;width:42px;height:42px;border-radius:50%;box-shadow:0 0 0 2px #fff,0 0 0 4px var(--c,#94a3b8)}
.tm-c-avwrap .tm-av{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;overflow:hidden;font-weight:700;font-size:15px}
.tm-av-i{background:#e6efe9;color:#1f5f46}
.tm-c-dot{position:absolute;right:-3px;bottom:-3px;width:12px;height:12px;border-radius:50%;border:2px solid #fff;box-sizing:border-box;background:var(--c,#94a3b8)}
.tm-c-id{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:1px}
.tm-c-id strong{font-size:15.5px;line-height:1.25;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-c-id span{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-c-total{flex:none;display:flex;flex-direction:column;align-items:flex-end;line-height:1.1}
.tm-c-total b{font-size:22px;font-weight:700;letter-spacing:-.02em;color:var(--ink);font-variant-numeric:tabular-nums}
.tm-c-total span{font-size:11.5px;color:var(--muted);margin-top:2px}
.tm-c-status{display:flex;align-items:baseline;gap:8px;font-size:13px;line-height:1.35;min-width:0}
.tm-c-status b{flex:none;font-weight:650;color:var(--ink)}
.tm-c-status b.is-pc{color:#2a56b5}.tm-c-status b.is-warn{color:#b4491a}
.tm-c-status>span{flex:1 1 auto;min-width:0;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-c-bar{display:flex;flex-direction:column;gap:4px}
.tm-bar24.tm-bar24-v2{margin:0;height:10px}
.tm-bar24-v2 .tm-tick{background:#fff;opacity:.9}
.tm-c-axis{position:relative;display:block;height:13px;font-size:11px;color:#6a7770;font-variant-numeric:tabular-nums}
.tm-c-axis i{position:absolute;font-style:normal}
.tm-c-axis i:nth-child(2),.tm-c-axis i:nth-child(3),.tm-c-axis i:nth-child(4){transform:translateX(-50%)}
.tm-c-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tm-c-stats.is-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.tm-c-stat{display:flex;flex-direction:column;gap:3px;background:#f6f8f7;border-radius:10px;padding:8px 10px;min-width:0}
.tm-c-sl{display:flex;align-items:center;gap:5px;font-size:11.5px;color:#4b5852;white-space:nowrap}
.tm-c-sw{flex:none;width:8px;height:8px;border-radius:2px;background:#94a3b8}
.tm-c-sw.k{background:#22b573}.tm-c-sw.j{background:#ef743d}.tm-c-sw.l{background:#9aa4b2}.tm-c-sw.p{background:#3b6fd8}
.tm-c-sw.p.is-live{border-radius:50%;animation:tmpc 1.8s ease-in-out infinite}
.tm-c-stat b{font-size:16px;font-weight:650;font-variant-numeric:tabular-nums;color:var(--ink)}
.tm-c-stat.is-dim b{color:#9aa6a0;font-weight:600}
@media (max-width:420px){.tm-list .tm-c .tm-person-btn{padding:12px 12px;gap:10px}.tm-list .tm-c.is-selected .tm-person-btn{padding:11px 11px}.tm-c-stat{padding:7px 8px}.tm-c-stat b{font-size:15px}.tm-c-total b{font-size:20px}.tm-c-sl{font-size:11px}}
@media (prefers-reduced-motion:reduce){.tm-c-sw.p.is-live{animation:none}}

/* 0.4.148 kartu staf PADAT (menggantikan ukuran besar 0.4.147) */
.tm-list{gap:0;padding:0}
.tm-list .tm-person.tm-c,.tm-list .tm-person.tm-c.is-selected{border:0;border-bottom:1px solid #e9eeeb;border-radius:0;background:#fff;box-shadow:none}
.tm-list .tm-person.tm-c:hover{background:#f7faf8}
.tm-list .tm-person.tm-c.is-selected{background:#eef8f2;box-shadow:inset 3px 0 0 #22b573}
.tm-list .tm-c .tm-person-btn,.tm-list .tm-c.is-selected .tm-person-btn{gap:0;padding:11px 14px 10px}
.tm-c-head{gap:10px}
.tm-c-avwrap,.tm-c-avwrap .tm-av{width:34px;height:34px}
.tm-c-avwrap{box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--c,#94a3b8)}
.tm-c-avwrap .tm-av{font-size:13px}
.tm-c-dot{width:11px;height:11px;right:-2px;bottom:-2px}
.tm-c-id{gap:0}
.tm-c-name{display:flex;align-items:baseline;gap:8px;min-width:0}
.tm-c-name strong{flex:none;max-width:100%;font-size:14.5px;font-weight:650;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tm-c-name>span{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.tm-c-id .tm-c-status{font-size:12.5px;line-height:1.4}
.tm-c-total{flex-direction:row;align-items:baseline;gap:3px}
.tm-c-total b{font-size:17px}
.tm-c-total span{font-size:11.5px;margin:0}
.tm-c-bar{margin-top:9px}
.tm-bar24.tm-bar24-v2{height:6px}
.tm-c-chips{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:8px;font-size:12px;color:#3d4a44;font-variant-numeric:tabular-nums}
.tm-c-chip{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
@media (max-width:420px){.tm-list .tm-c .tm-person-btn,.tm-list .tm-c.is-selected .tm-person-btn{padding:10px 10px 9px}}

/* 0.4.149 perbaikan: teks panjang (nama lokasi) tidak boleh melebarkan kartu atau daftar */
.tm-list{grid-template-columns:minmax(0,1fr);overflow-x:hidden}
.tm-list .tm-c{min-width:0;max-width:100%}
.tm-list .tm-c .tm-person-btn{min-width:0;max-width:100%;overflow:hidden;box-sizing:border-box}
.tm-c-head,.tm-c-id,.tm-c-name,.tm-c-status{min-width:0}
.tm-c-id{overflow:hidden}
.tm-c-status b{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-c-status:not(.is-place) b{flex:none}
.tm-c-status.is-place>span{flex:none}
.tm-c-status:not(.is-place)>span{flex:0 1 auto}
.tm-c-bar,.tm-c-chips{min-width:0;max-width:100%}
.tm-layout>*{min-width:0}


/* 0.4.164: HP: kotak daftar mengisi barisnya (55% layar) dan hanya daftar di dalamnya yang bergulir; geser di mana pun tidak macet. */
@media(max-width:640px){.tm-layout>.tm-list-card{height:auto;min-height:0;max-height:none}.tm-layout>.tm-map-card{height:auto;min-height:0}.tm-list{overflow-y:auto;overscroll-behavior:auto;touch-action:pan-y}}

/* ===== Tema gelap Peta Tim =====
   Permukaan: kartu #111b20 di atas halaman #0c1519, garis #26363c. Teks memakai --ink/--muted.
   Hijau tetap sebagai aksen (terpilih, online); warna status dinaikkan terangnya agar terbaca di latar gelap. */
:root[data-theme=dark] #tm-map .leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.9) contrast(.88) saturate(.8)}
:root[data-theme=dark] .tm-map{background:#1b2428}
:root[data-theme=dark] .tm-map-card,:root[data-theme=dark] .tm-list-card{background:#111b20;border-color:#26363c}
:root[data-theme=dark] .tm-list-head{border-bottom-color:#26363c}
:root[data-theme=dark] .tm-list-head input,:root[data-theme=dark] .tm-tools input{background:#0c1519;border-color:#2d3f46;color:var(--ink)}
:root[data-theme=dark] .tm-icon-btn{background:#162126;border-color:#2d3f46;color:#4fd19a}
:root[data-theme=dark] .tm-icon-btn:hover{background:#1c2b31}
:root[data-theme=dark] .tm-legend{border-top-color:#26363c}
:root[data-theme=dark] .tm-live{background:#123626;color:#6fe0a8}
:root[data-theme=dark] .tm-hist,:root[data-theme=dark] .tm-role{background:#1d2b31;color:#a9bcc2}
:root[data-theme=dark] .tm-status-text,:root[data-theme=dark] .tm-stop-row{color:#a9bcc2}
:root[data-theme=dark] .tm-hint,:root[data-theme=dark] .tm-empty p,:root[data-theme=dark] .tm-loading{color:#9db0b6}
:root[data-theme=dark] .tm-empty{border-color:#2d3f46}
:root[data-theme=dark] .tm-muted{color:#8499a0}
/* Baris staf */
:root[data-theme=dark] .tm-list .tm-person.tm-c,:root[data-theme=dark] .tm-list .tm-person.tm-c.is-selected{background:#111b20;border-bottom-color:#1f2d33}
:root[data-theme=dark] .tm-list .tm-person.tm-c:hover{background:#16242a}
:root[data-theme=dark] .tm-list .tm-person.tm-c.is-selected{background:#12301f;background:#133126;box-shadow:inset 3px 0 0 #2bc97c}
:root[data-theme=dark] .tm-person:hover{background:#16242a}
:root[data-theme=dark] .tm-person.is-selected{background:#133126;border-color:#245c43;border-left-color:#2bc97c;box-shadow:none}
:root[data-theme=dark] .tm-person.is-selected .tm-row1 strong,:root[data-theme=dark] .tm-person.is-selected .tm-row2 b{color:var(--ink)}
:root[data-theme=dark] .tm-person.is-selected .tm-row2,:root[data-theme=dark] .tm-person.is-selected .tm-row3{color:#a9c4b8}
:root[data-theme=dark] .tm-person.is-selected .tm-role,:root[data-theme=dark] .is-selected .tm-role{background:#245c43;color:#e6f7ee}
:root[data-theme=dark] .tm-c-avwrap{box-shadow:0 0 0 2px #111b20,0 0 0 3.5px var(--c,#94a3b8)}
:root[data-theme=dark] .tm-c-dot{border-color:#111b20}
:root[data-theme=dark] .tm-av-i{background:#1d3a30;color:#9fe3c2}
:root[data-theme=dark] .tm-c-stat{background:#162126}
:root[data-theme=dark] .tm-c-sl,:root[data-theme=dark] .tm-c-chips{color:#b5c6cb}
:root[data-theme=dark] .tm-c-axis{color:#8499a0}
:root[data-theme=dark] .tm-c-stat.is-dim b{color:#6f848b}
/* Bilah 24 jam */
:root[data-theme=dark] .tm-bar24{background:#243238}
:root[data-theme=dark] .tm-person.is-selected .tm-bar24{background:#1e4536}
:root[data-theme=dark] .tm-tick,:root[data-theme=dark] .tm-bar24-v2 .tm-tick{background:#111b20;opacity:.9}
:root[data-theme=dark] .tm-now{background:#e6efec}
/* Warna status: versi terang untuk latar gelap */
:root[data-theme=dark] .h-site,:root[data-theme=dark] .tm-person.is-selected .h-site{color:#5fdca0}
:root[data-theme=dark] .h-moving,:root[data-theme=dark] .tm-person.is-selected .h-moving{color:#ff9d6b}
:root[data-theme=dark] .h-stop{color:#b79bff}
:root[data-theme=dark] .h-unknown{color:#94a7ae}
:root[data-theme=dark] .h-office,:root[data-theme=dark] .tm-person.is-selected .h-office,:root[data-theme=dark] .tm-c-status b.is-pc{color:#7fb0ff}
:root[data-theme=dark] .tm-c-status b.is-warn,:root[data-theme=dark] .tm-warn{color:#ff9d6b}
:root[data-theme=dark] .tm-src-android{background:#123626;color:#6fe0a8}
:root[data-theme=dark] .tm-src-web{background:#3a2314;color:#ffb48a}
:root[data-theme=dark] .tm-src-komputer,:root[data-theme=dark] .tm-pcon,:root[data-theme=dark] .tm-person.is-selected .tm-pcon{background:#16294a;color:#9fc3ff}
/* Label dan kotak info di peta */
:root[data-theme=dark] .leaflet-tooltip.tm-label{background:#162126;color:#e6efec;box-shadow:0 2px 10px rgba(0,0,0,.5)}
:root[data-theme=dark] .leaflet-tooltip.tm-label-on{color:#b5c6cb}
:root[data-theme=dark] .leaflet-tooltip.tm-label-on b{color:#e6efec}
:root[data-theme=dark] .leaflet-tooltip.tm-label-on span{color:#8499a0}
:root[data-theme=dark] #tm-map .leaflet-tooltip.tip{--tip-bg:#162126;--tip-line:#2d4750;--tip-ink:#e6efec;--tip-detail:#6fe0a8;--tip-row:#a9bcc2;--tip-shadow:#00000066}
:root[data-theme=dark] .grp-pick:hover,:root[data-theme=dark] .grp-pick.sel{background:#1c2b31}
:root[data-theme=dark] .tm-tile-error::after{background:#162126;color:#e6efec}
:root[data-theme=dark] .tm-search-toggle[aria-expanded="true"]{background:#1c2b31}
:root[data-theme=dark] .tm-k.tm-unknown,:root[data-theme=dark] .tm-unknown{background:#94a7ae}
:root[data-theme=dark] .tm-map .leaflet-bar a{background:#162126;color:#e6efec;border-color:#2d3f46}
:root[data-theme=dark] .tm-map .leaflet-bar a.leaflet-disabled{color:#5d7078}
:root[data-theme=dark] .tm-map .leaflet-control-attribution{background:rgba(17,27,32,.8);color:#9db0b6}
:root[data-theme=dark] .tm-map .leaflet-control-attribution a{color:#6fe0a8}

/* 0.4.178: hanya perusahaan dengan StaffCop (kelas tm-compact): keterangan 4 kategori selalu satu baris; huruf mengecil bila kartu sempit. Klien lain tetap ukuran asli. */
.tm-compact .tm-c-chips{flex-wrap:nowrap;gap:4px clamp(4px,1.2vw,8px);font-size:clamp(9px,2.6vw,11px);overflow:hidden}
.tm-compact .tm-c-chip{flex:0 1 auto;min-width:0;gap:clamp(3px,.8vw,4px)}

/* 0.4.203 Kartu rinci staf (pop up) */
.tp-ov{position:fixed;inset:0;z-index:120;background:rgba(7,26,34,.5);display:flex;align-items:flex-end;justify-content:center;padding:0}
.tp-card{width:min(520px,100%);max-height:88dvh;overflow:auto;background:#fff;border-radius:18px 18px 0 0;box-shadow:0 -8px 30px rgba(7,26,34,.25);padding-bottom:max(12px,env(safe-area-inset-bottom))}
@media(min-width:700px){.tp-ov{align-items:center;padding:24px}.tp-card{border-radius:18px}}
.tp-head{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid #e6ece8}
.tp-head .tm-av,.tp-head .ts-av{width:34px;height:34px;flex:none}
.tp-head strong{flex:1;min-width:0;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tp-x{border:0;background:#eef3f0;border-radius:50%;width:34px;height:34px;font-size:22px;line-height:1;color:#46606a;cursor:pointer}
.tp-body{padding:12px 16px 6px}
.tp-date{font-size:13px;color:#51636a;margin-bottom:6px}
.tp-main{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.tp-big b{display:block;font-size:34px;line-height:1.05;letter-spacing:-.8px;color:#10232b}
.tp-big span{font-size:12.5px;color:#51636a}
.tp-chips{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.tp-chip{background:#eef3f0;border-radius:999px;padding:4px 11px;font-size:12px;font-weight:600;color:#33433b;white-space:nowrap}
.tp-body .tm-c-bar{display:block;margin:12px 0 0}
.tp-axis{display:flex;justify-content:space-between;font-size:11px;color:#6b7f78;margin:2px 0 8px}
.tp-places{list-style:none;margin:0;padding:8px 0;border-top:1px solid #e6ece8}
.tp-places li{display:flex;align-items:center;gap:10px;padding:6px 0;font-size:14px;font-weight:600}
.tp-places li span{flex:1;min-width:0;overflow-wrap:anywhere}
.tp-places li b{white-space:nowrap}
.tp-places .tp-minor{font-weight:500;font-size:13px;color:#51636a}
.tp-dot{width:10px;height:10px;border-radius:50%;background:#4fb37a;flex:none}.tp-dot.j{background:#ef743d}.tp-dot.l{background:#9aa8b4}
.tp-empty{padding:12px 0;color:#51636a;font-size:13px}
.tp-det{border-top:1px dashed #dfe7e2;padding:8px 0}
.tp-det summary{cursor:pointer;font-weight:700;font-size:13.5px;color:#25664b;min-height:32px;display:flex;align-items:center}
.tp-det ul{list-style:none;margin:4px 0 0;padding:0;font-size:13px}
.tp-det li{display:flex;gap:10px;padding:4px 0}.tp-det li b{white-space:nowrap}.tp-det li span{color:#51636a}
