:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#17263b;background:#f3f6fa}*{box-sizing:border-box}body{margin:0}header{background:#152c49;color:white;padding:17px max(20px,calc((100% - 1200px)/2));display:flex;justify-content:space-between;align-items:center}.brand{font-size:22px;font-weight:800}.brand span{font-weight:400;color:#b5c9dd}header button{margin-left:12px}main{max-width:1200px;padding:26px 20px;margin:auto}h1{margin:0;font-size:29px}h2{margin-top:0}p,.muted{color:#708095}button{cursor:pointer;background:#215fbd;color:white;border:0;border-radius:8px;padding:11px 15px;font-weight:650}button:hover{filter:brightness(.94)}button.secondary{background:#e9eef5;color:#23415c}button.danger{background:#bd293b}button:disabled{opacity:.5;cursor:not-allowed}input,select,textarea{font:inherit;padding:11px 12px;border:1px solid #cfd9e5;border-radius:8px;min-width:0;width:100%;background:#fff}label{display:block;font-weight:650;font-size:14px}label input,label select,label textarea{margin-top:7px}.card{background:white;border:1px solid #e0e7f0;border-radius:14px;padding:22px;box-shadow:0 3px 14px #172c4610}.login{max-width:420px;margin:75px auto}.login form{display:grid;gap:17px}.top{display:flex;justify-content:space-between;align-items:center;gap:10px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:25px 0}.stat{background:white;padding:20px;border-radius:12px;border:1px solid #e2e9f2}.stat b{display:block;font-size:31px;margin-top:6px}nav{display:flex;gap:9px;border-bottom:1px solid #d7e1ed;padding-bottom:12px;flex-wrap:wrap}.tab{background:transparent;color:#51677f}.tab.active{background:#dceafa;color:#174f9c}.filters{display:flex;gap:10px;margin:21px 0}.filters input{flex:1}.filters select{max-width:200px}.deviceGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:13px}.device{background:white;padding:20px;border:1px solid #e1e8f1;border-radius:13px}.deviceTitle{display:flex;align-items:center;justify-content:space-between;gap:12px}.deviceTitle strong{font-size:17px;overflow-wrap:anywhere}.pill{font-size:12px;font-weight:800;padding:6px 9px;border-radius:30px;background:#fce7e7;color:#a72932}.pill.online{background:#e0f6e8;color:#146d39}.pulse{display:inline-block;background:#dd4040;width:11px;height:11px;border-radius:50%;margin-right:5px}.pulse.online{background:#19a45d;animation:heartbeat 1.8s infinite}@keyframes heartbeat{0%,65%,100%{box-shadow:0 0 0 0 #1aa45d60}30%{box-shadow:0 0 0 6px #1aa45d12}}.metadata{font-size:13px;color:#667b91;line-height:1.9;margin:14px 0}.metadata b{color:#354d64}.actions{display:flex;gap:8px;flex-wrap:wrap}.actions button{font-size:12px;padding:9px 10px}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}td,th{text-align:left;padding:10px;border-bottom:1px solid #e2eaf3}.formgrid{display:grid;gap:12px;max-width:500px}dialog{border:0;border-radius:15px;padding:25px;width:min(520px,95vw);box-shadow:0 20px 70px #142a4166}dialog::backdrop{background:#142a4177}.close{float:right;background:#edf1f5;color:#2d455e}#notice{position:fixed;bottom:20px;right:20px;background:#1a3e60;color:#fff;padding:12px 18px;border-radius:10px;display:none;max-width:400px;z-index:10}code{overflow-wrap:anywhere;background:#edf2f7;padding:5px;border-radius:5px}.copycode{font-size:15px;line-height:1.6;word-break:break-all;display:block;padding:12px;margin:15px 0;background:#f0f5fa}.hint{font-size:12px;color:#62778c}@media(max-width:620px){.stats{grid-template-columns:repeat(2,1fr)}.top{align-items:flex-start;flex-direction:column}.filters{flex-direction:column}.filters select{max-width:none}}

/* MFA setup and recovery screens */
#mfa{margin-top:55px}#mfaEnrollment{margin:15px 0}.qrarea{display:flex;justify-content:center;padding:12px;background:#fff}.qrarea img{width:min(250px,95%);height:auto;image-rendering:pixelated}.authBack{margin-top:18px;width:100%}#mfaCode{letter-spacing:1px}.codeLine{display:block}.copycode{white-space:pre-wrap;user-select:all}#accountView{margin-top:18px;max-width:650px}

/* v1.3: audit filters */
.auditCategories{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 20px}
.auditFilter{background:#edf2f8;color:#345069;border:1px solid #dce5ee;border-radius:22px;padding:8px 12px;font-size:12px;font-weight:700;line-height:1.4}
.auditFilter.selected{color:#fff;background:#215fbd;border-color:#215fbd}
.auditFilter:focus-visible{outline:3px solid #77a4e2;outline-offset:2px}
.auditCount{font-variant-numeric:tabular-nums;display:inline-block;margin-left:5px;padding:1px 7px;border-radius:12px;background:#d9e4f0;color:#30465d}
.auditFilter.selected .auditCount{background:#ffffff30;color:#fff}
.auditSearchRow{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:13px;flex-wrap:wrap}
.auditSearchLabel{flex:1 1 320px;max-width:480px}
.auditSummary{font-size:12px;margin:0 0 9px}
.auditTag{display:inline-block;background:#edf2f8;color:#345069;padding:5px 9px;border-radius:12px;font-size:11px;font-weight:700;white-space:nowrap}
.auditEmpty{padding:26px;text-align:center;color:#708095;background:#f6f9fc;border-radius:10px}
.auditHint{margin:18px 0 0}
#auditView .tablewrap table{min-width:700px}

/* v1.4: server-timed heartbeat countdown with three missed-beat dots */
.deviceTitle{align-items:flex-start}.deviceTitle strong{min-width:0}
.pill.waiting{background:#e9eff7;color:#586b82}.pill.deleted{background:#e9eff7;color:#586b82}
.pulse.waiting,.pulse.deleted{background:#94a3b8;animation:none}
.heartbeatTracker{margin-top:12px;padding:11px 12px;border-radius:9px;background:#f5f8fc;border:1px solid #e3ebf4}
.heartbeatText{display:flex;gap:10px;align-items:center;justify-content:space-between;color:#51667e;font-size:12px;line-height:1.5}
.beatCountdown{font-size:15px;font-weight:800;color:#1f3d5c;white-space:nowrap;font-variant-numeric:tabular-nums}
.missedRow{display:flex;align-items:center;gap:9px;margin-top:9px}.missedDots{display:inline-flex;align-items:center;gap:6px}
.missDot{width:11px;height:11px;border:1.5px solid #b9c9d9;border-radius:50%;background:#f2f5f9;display:inline-block}
.missDot.missed{background:#d93a46;border-color:#d93a46}
.missedCount{font-size:11px;color:#698098}
@media(max-width:370px){.heartbeatText{align-items:flex-start;flex-direction:column;gap:2px}}

/* v1.4 alignment: timer directly under the status pill; dots beside the timer */
.deviceTitle{align-items:flex-start}
.statusStack{display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:159px;max-width:180px;flex-shrink:0}
.statusStack .pill{display:inline-flex;align-items:center;white-space:nowrap}
.heartbeatTracker{width:100%;margin-top:0;padding:7px 8px}
.beatLine{display:flex;justify-content:space-between;align-items:center;gap:6px}
.beatCountdown{font-size:15px}
.heartbeatSub{display:flex;gap:5px;align-items:flex-start;justify-content:space-between;margin-top:2px;font-size:10px;color:#657991;line-height:1.4}
.missedCount{font-size:10px;color:#657991;white-space:nowrap}
@media(max-width:390px){.statusStack{min-width:142px;max-width:150px}}
/* Five summary tiles: Inventory, Online, Waiting, Offline, Deleted. */
.stats{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:850px){.stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v1.5 — pulse ONLY once on observed, new server heartbeat (5s polling latency). */
.pulse.online{animation:none;box-shadow:none}
.pulse.warning{background:#eab308;animation:none}
.pulse.offline{background:#dc3545;animation:none}
.pulse.beatFlash{animation:receivedBeat .85s ease-out 1}
@keyframes receivedBeat{0%{box-shadow:0 0 0 0 #16a34a90;transform:scale(1)}45%{box-shadow:0 0 0 8px #16a34a22;transform:scale(1.2)}100%{box-shadow:0 0 0 0 #16a34a00;transform:scale(1)}}
.pill.warning{background:#fff1c7;color:#805900}
.pill.offline{background:#fce7e7;color:#a72932}
.statusStack{min-width:185px;max-width:215px;gap:7px}
.statusLine{display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap}
.statusLine .beatCountdown{font-size:14px;font-weight:750}
.missedPanel{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:11px;justify-content:flex-end}
.missedPanel[hidden]{display:none!important}
.missedPanel .missDot{width:11px;height:11px}
.deviceCategories{display:flex;flex-wrap:wrap;gap:8px;margin:22px 0 -7px}
.deviceCategories[hidden]{display:none}
.deviceFilter{background:#e9eef6;color:#344b64;padding:8px 14px;border:1px solid #d4dfea;border-radius:20px}
.deviceFilter.selected{background:#215fbd;color:#fff}
.deviceFilter span{font-size:11px;margin-left:5px;opacity:.85}
.userList{display:grid;gap:7px;margin-top:15px}
.userRow{border:1px solid #e4ebf3;border-radius:9px;padding:11px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.userRow small{display:block;color:#718298;font-size:12px;margin-top:4px}
#accountView hr,#usersView hr{border:0;border-top:1px solid #dce5ef;margin:22px 0}
@media (max-width:500px){.statusStack{min-width:140px;max-width:180px}.deviceTitle{align-items:flex-start}}

/* v1.6: Account management actions and locked super-admin label */
.userActions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.userActions button{font-size:12px;padding:8px 10px}
.accountProtected{display:inline-block;margin-left:6px;color:#735922;background:#fff0c4;border-radius:20px;padding:4px 8px;font-size:11px;font-weight:700}
#passwordChange .formgrid{max-width:none}
@media(max-width:540px){.userActions{justify-content:flex-start;width:100%}}

/* v1.7: deliberately distinct permanent purge action in Deleted view */
.clearDeletedBar{margin:18px 0 10px;border:1px solid #e7c7cb;background:#fff8f7;border-radius:12px;padding:14px 16px;display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.clearDeletedBar[hidden]{display:none!important}
.clearDeletedBar p{margin:6px 0 0}.clearDeletedBar button{white-space:nowrap}
#clearDeletedForm input[readonly]{background:#e9eff5;color:#4c6178}
@media(max-width:520px){.clearDeletedBar button{width:100%}}

.uuidText {overflow-wrap:anywhere;}
.inlineOption {display:flex;gap:.5rem;align-items:center;}
.inlineOption input[type="checkbox"] {width:auto;flex:none;}

/* v1.9 — dense dashboard header and compact stat tiles */
main{max-width:1390px;padding:16px 24px}
.top{gap:14px;margin:4px 0 10px}
.top h1{font-size:25px;letter-spacing:-.025em;line-height:1.2}
.top p{font-size:12px;line-height:1.3;margin:5px 0;color:#718299}
.enrollAction{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#216cc7;color:#fff;border-radius:9px;padding:9px 13px;font-size:13px;white-space:nowrap;box-shadow:0 2px 7px #22518e1b}
.enrollAction svg{flex:none}
.stats{margin:12px 0 13px;gap:10px}
.stat{padding:11px 15px;border-radius:11px;min-height:74px}
.stat .muted{font-size:12px}
.stat b{font-size:24px;margin-top:2px;line-height:1.2}
nav{padding-bottom:8px;gap:6px}
nav button{padding:8px 12px;font-size:12px}
.filters{margin:13px 0;gap:10px}
.filters input,.filters select{padding:9px 11px}
.deviceCategories{margin:12px 0 0}
.deviceFilter{padding:7px 11px;font-size:12px}

/* Grid is intentionally not masonry/dense. Expanding one card spans exactly two rows.
   Its neighbors keep their column positions, while later cards move down. */
.deviceGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));grid-auto-rows:137px;grid-auto-flow:row;align-items:stretch;gap:13px}
.device{padding:15px 16px 10px;border-radius:14px;min-width:0;min-height:0;overflow:hidden;grid-row:span 1;display:flex;flex-direction:column;transition:border-color .25s ease,box-shadow .25s ease}
.device.expanded{grid-row:span 2;border-color:#a7c2e2;box-shadow:0 6px 20px #163b6c14}
.deviceTitle{display:flex;gap:8px;align-items:flex-start;flex:none;min-height:57px}
.deviceNameBlock{min-width:0;flex:1}
.deviceNameBlock strong{display:block;overflow-wrap:anywhere;font-size:15px;line-height:1.28;color:#172d45}
.deviceIcon{font-size:14px;color:#244361}
.deviceNote{font-size:11px;color:#8290a2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;padding:4px 0 1px 17px;min-height:18px}
.statusStack{flex:none;min-width:0;max-width:49%;gap:4px}
.statusLine{gap:5px;flex-wrap:nowrap}
.statusStack .pill{font-size:11px;padding:5px 7px}
.pill .pulse{height:9px;width:9px;margin-right:4px}
.statusLine .beatCountdown{font-size:12px}
.missedPanel{padding:0;font-size:10px;gap:5px}
.missedPanel .missDot{width:8px;height:8px}
.missedDots{gap:3px}
.missedCount{font-size:9px}
.deviceCompactActions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;flex:none;min-height:28px}
.deviceCompactActions button{border-radius:8px;font-size:11px;padding:5px 7px;line-height:1.1}
.iconAction{background:transparent;color:#8799ad;display:inline-flex;align-items:center;justify-content:center;padding:6px}
.iconAction:hover{background:#fcecec;color:#b52f44}
.expandToggle{display:inline-flex;align-items:center;gap:5px;border:1px solid #dce5ef;background:#f4f7fb;color:#516a85}
.expandToggle svg{transition:transform .3s ease}
.device.expanded .expandToggle svg{transform:rotate(180deg)}
.device.expanded .quickDelete{visibility:hidden;pointer-events:none}
.deviceDetailsWrap{display:grid;grid-template-rows:0fr;opacity:0;min-height:0;pointer-events:none;transition:grid-template-rows .27s ease,opacity .27s ease;margin:0}
.device.expanded .deviceDetailsWrap{grid-template-rows:1fr;opacity:1;pointer-events:auto;margin-top:4px;flex:1}
.deviceDetailsInner{min-height:0;overflow:hidden;display:flex;flex-direction:column}
.device .metadata{font-size:11px;line-height:1.6;margin:4px 0 8px;overflow-wrap:anywhere;color:#687b90}
.device .metadata div{margin-bottom:2px}
.device .metadata b{color:#39526d}
.uuidText{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.shortUuid{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;cursor:help;color:#285580;background:#f3f7fb;border-radius:5px;padding:1px 4px}
.uuidCopy{display:inline-flex;align-items:center;justify-content:center;background:#ecf3fc;color:#285d96;border:1px solid #dbe7f5;padding:3px 5px!important;border-radius:5px!important}
.device .actions{margin-top:auto;gap:5px;padding-top:6px;flex-wrap:wrap}
.device .actions button{font-size:11px;padding:6px 9px}
/* Always compact in closed state, even for very long hostnames or notes */
.device:not(.expanded) .deviceDetailsWrap{visibility:hidden}
.device.expanded .deviceDetailsWrap{visibility:visible}
@media(max-width:640px){
  main{padding:13px}
  .top h1{font-size:22px}
  .stats{grid-template-columns:repeat(3,minmax(0,1fr))}
  .stat{padding:10px;min-height:65px}
  .stat b{font-size:22px}
  .deviceGrid{grid-template-columns:1fr;grid-auto-rows:140px}
}
@media(max-width:380px){.statusStack .pill{font-size:10px}.statusLine .beatCountdown{font-size:11px}}
@media(prefers-reduced-motion:reduce){.device,.deviceDetailsWrap,.expandToggle svg{transition:none!important}}

/* UUID and local-calendar event-log filters */
.auditAdvanced{display:flex;gap:10px;flex-wrap:wrap;align-items:end;padding:12px 13px;margin:0 0 13px;background:#f5f8fc;border:1px solid #e0e8f2;border-radius:11px}
.auditAdvanced label{flex:1 1 135px;min-width:130px;font-size:12px}
.auditAdvanced label:has(#auditUuid){flex:2 1 205px}
.auditAdvanced input{padding:8px 10px}
.auditAdvanced button{font-size:12px;padding:9px 12px}
#auditView .tablewrap table{min-width:920px}

/* v1.9.1: Details button remains anchored directly below the title in both
   states; expanding the card adds height BELOW the button only. */
.deviceCompactActions{margin-top:6px;min-height:28px;height:28px}
.deviceCompactActions .expandToggle{width:118px;min-width:118px;justify-content:space-between}
.previousNamesRow{display:flex;align-items:baseline;gap:5px;max-width:100%;min-width:0}
.previousNamesRow>b{flex:none}
.previousNamesRow [data-previous-names]{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.previousNamesNone{color:#74859a;cursor:help;border-bottom:1px dotted #afbdcc}
.previousNamesFound{color:#315d91;cursor:help}
.previousNamesLoading,.previousNamesError{color:#74859a;font-style:italic}

/* Hotfix: keep the expand/collapse control in the same lower-right slot.
   The hidden quick-delete button continues occupying the left slot. */
.deviceCompactActions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
.deviceCompactActions .expandToggle{grid-column:2;justify-self:end}

/* v1.9.1 follow-up: keep the trash action icon-sized instead of stretching
   across the flexible left grid column. Preserve the right-side toggle slot. */
.deviceCompactActions .quickDelete{
  grid-column:1;
  justify-self:start;
  align-self:center;
  width:34px;
  min-width:34px;
  max-width:34px;
  height:32px;
  padding:6px;
}
.deviceCompactActions .quickDelete svg{width:17px;height:17px;flex:none}


/* v1.9.2 Public read-only viewer: only offices and closed tiles. */
.publicEntry{border-top:1px solid #e2e8f1;margin-top:23px;padding-top:19px;text-align:center}
.publicEntryLabel{font-weight:700;margin-bottom:9px}
.publicAccessButton{display:inline-flex;gap:10px;align-items:center;justify-content:center;background:#1765bd;width:100%;min-height:46px}
.publicEntry .hint{margin-bottom:0}
.publicTop{display:flex;gap:18px;align-items:center;justify-content:space-between;margin:8px 0 21px}
.publicTop h1{font-size:26px}
.publicTop p{margin:5px 0 0}
.publicLayout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:18px;align-items:start}
.publicSidebar{border:1px solid #e1e8f1;background:white;border-radius:14px;padding:16px;position:sticky;top:18px}
.publicSidebar h2{font-size:17px;margin:0 0 12px}
.publicOffices{display:flex;flex-direction:column;gap:6px;max-height:70vh;overflow:auto}
.publicOffice{display:flex;align-items:center;justify-content:space-between;gap:7px;background:transparent;color:#334d68;border-radius:9px;width:100%;padding:10px 11px;text-align:left;font-size:14px}
.publicOffice.selected{background:#e3efff;color:#135bb0}
.publicOffice span{font-size:12px;color:#68819b}
.publicSummary{font-size:14px;color:#60788f;padding:3px 0 13px}
.publicGrid{grid-auto-rows:minmax(126px,auto)}
.publicDevice{min-height:126px;display:flex;align-items:flex-start}
.publicDevice .deviceTitle{width:100%}
.publicDevice .deviceNote{white-space:normal;overflow-wrap:anywhere}
.publicDevice .statusStack{min-width:132px;max-width:185px}
.publicDevice button,.publicDevice .deviceCompactActions,.publicDevice .deviceDetailsWrap{display:none!important}
@media(max-width:720px){.publicLayout{grid-template-columns:1fr}.publicSidebar{position:static}.publicOffices{flex-direction:row;overflow-x:auto;max-height:none}.publicOffice{flex:0 0 auto;width:auto;gap:12px}.publicTop{align-items:flex-start;flex-direction:column}}
@media(max-width:420px){.publicDevice .deviceTitle{flex-wrap:wrap}.publicDevice .statusStack{margin-left:18px;align-items:flex-start}.publicDevice .statusLine{justify-content:flex-start}}

/* v1.9.3: compact office selector; no public note block or office sidebar. */
.publicToolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:2px 0 15px}
.publicToolbar label{font-size:13px;color:#435b76;flex:0 1 270px;min-width:200px}
.publicToolbar select{display:block;width:100%;margin-top:6px;background:#fff;border:1px solid #cad8e9;min-height:42px}
.publicToolbar .publicSummary{padding:0 0 10px;font-size:13px}
.publicGrid{width:100%}
.publicDevice .deviceTitle{min-height:auto}
.publicDevice .deviceNameBlock{padding-top:4px}
@media(max-width:520px){.publicToolbar{align-items:stretch;gap:8px}.publicToolbar label{flex:1 1 100%;min-width:0}.publicToolbar .publicSummary{padding-bottom:4px}}

/* v1.9.8: keep Open Enrollment on the far-right end of the navigation row.
   Enroll Device remains in the Workstations header. */
nav #bulkDeploy {
  margin-left: auto;
}

/* v1.9.9 — Inventory Mapping tab next to right-aligned Open Enrollment. */
nav #bulkDeploy{margin-left:auto}
nav #mappingTab{margin-left:0}
#mappingView{margin-top:17px}
#mappingView hr{border:0;border-top:1px solid #dce5ef;margin:23px 0}
.mappingSummary{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:16px 0}
.mappingSummary>div{background:#f5f8fc;border:1px solid #dce7f3;border-radius:10px;padding:13px;min-width:0}
.mappingSummary strong{display:block;font-size:12px;color:#4b647d;margin-bottom:7px}
.mappingSummary span{font-size:13px;overflow-wrap:anywhere}
.mappingUpload{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-top:18px}
.mappingUpload label{flex:1 1 290px}
.mappingUpload button{white-space:nowrap}
.mappingActions{display:flex;align-items:center;gap:12px;margin:14px 0;flex-wrap:wrap}
.mappingActions .hint{margin:0}
.mappingNote{font-size:13px;background:#f4f7fc;border-left:3px solid #2a68bc;border-radius:5px;padding:13px 15px;line-height:1.55;color:#3f5975}
#mappingSuperAdmin{margin-top:24px}
.compactRightActions{display:inline-flex;gap:5px;align-items:center;min-width:0;margin-left:auto}
/* v1.9.9: Use the exact same visual rules for Details and ManageEngine.
   Keep Details width unchanged and let ManageEngine use its natural label width.
   Both controls are 28px tall inside the existing 28px action row. */
.deviceCompactActions .expandToggle,
.deviceCompactActions .manageEngineCompact {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 28px;
    border: 1px solid #dce5ef;
    border-radius: 8px;
    background: #f4f7fb;
    color: #516a85;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.1;
    padding: 5px 7px;
    white-space: nowrap;
}
.deviceCompactActions .manageEngineCompact {
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    font-weight: 650 !important; /* Overrides the earlier user-added 400 rule, if present. */
}
.deviceCompactActions .manageEngineCompact:hover { filter: brightness(.94); }
@media(max-width:660px){nav #bulkDeploy{margin-left:0}}

/* v1.9.9 Users tab: place account management beside Add user on wider screens.
   Only targets the Users tab; all existing account form and action IDs are retained. */
#usersView .usersColumns {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: clamp(20px, 3vw, 42px);
    align-items: start;
}
#usersView .userCreateColumn,
#usersView .userManageColumn { min-width: 0; }
#usersView .userCreateColumn .formgrid { max-width: none; }
#usersView .userManageColumn .userList { min-width: 0; }
@media (max-width: 980px) {
    #usersView .usersColumns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    #usersView .userManageColumn {
        border-top: 1px solid #dce5ef;
        padding-top: 24px;
    }
}

/* v1.9.10 — Task queue and CSV assignment log; no workstation-card sizing changes. */
#tasksView{margin-top:17px}
#tasksView hr{border:0;border-top:1px solid #dce5ef;margin:23px 0}
.replacementTask{display:flex;align-items:flex-start;gap:14px;padding:14px;margin:9px 0;border-radius:9px;border:1px solid #edc58e;background:#fffaf1;color:#3b5065}
.replacementTask input{width:18px;height:18px;flex:none;margin-top:3px;accent-color:#258050}
.replacementTask.taskDone{border-color:#a3d8b8;background:#ecf9f0}
.replacementTask .taskBody{min-width:0;flex:1;overflow-wrap:anywhere}
.replacementTask .taskBody p{font-size:13px;margin:8px 0;line-height:1.5}
.taskLabel{display:inline-block;margin-left:8px;font-size:11px;font-weight:600}
.stagedRow{border:1px solid #dce5ef;padding:13px;border-radius:9px;margin:10px 0;overflow-wrap:anywhere}
.stagedRow .hint{margin:7px 0 0}
.mappingUsageScroll{overflow:auto;max-height:350px;border:1px solid #dce5ef;border-radius:9px;margin-top:10px}
.mappingUsageScroll table{width:100%;border-collapse:collapse;font-size:12px}
.mappingUsageScroll td,.mappingUsageScroll th{padding:9px 12px;border-bottom:1px solid #e5ebf2;text-align:left}
.mappingUsageScroll thead{position:sticky;top:0;background:#f4f7fc}
.mappingUsageScroll .assigned{color:#16804c;font-weight:600}

/* v1.9.10 local fixes: task badge and staged archival action only. */
.tasksPendingCount{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;margin-left:4px;border-radius:10px;background:#b63f38;color:#fff;font-size:11px;font-weight:600;vertical-align:middle;box-sizing:border-box}
.tasksPendingCount[hidden]{display:none}
.stagedRow .stagedArchive{margin-top:12px;font-size:12px}


/* v1.9.10 Audit Log: four primary columns; optional metadata is hidden by default. */
#auditView .auditSearchOptions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}
#auditView .auditColumnsPreference{display:inline-flex;gap:7px;align-items:center;white-space:nowrap;font-size:12px;font-weight:600;color:#48627e;cursor:pointer}
#auditView .auditColumnsPreference input{width:15px;height:15px;accent-color:#215fbd;cursor:pointer}
#auditView .auditSummary{margin:0;font-size:12px;white-space:nowrap}
#auditView .tablewrap{overflow-x:auto;max-width:100%}
#auditView .tablewrap .auditTable{width:100%;min-width:690px;table-layout:auto;border-collapse:collapse}
#auditView .tablewrap .auditTableExpanded{min-width:1180px}
#auditView .auditTable th{font-size:12px;font-weight:700;color:#465d77;background:#f6f8fb;white-space:nowrap}
#auditView .auditTable td{font-size:13px;line-height:1.45;color:#33475f;vertical-align:top;padding:12px 10px}
#auditView .auditTable .auditWhen{white-space:nowrap;font-size:12px;color:#546a82;width:166px}
#auditView .auditTable .auditHost{font-weight:650;overflow-wrap:anywhere;width:160px}
#auditView .auditTable .auditAction{font-weight:600;width:175px}
#auditView .auditTable .auditDetail{width:auto;min-width:240px;overflow-wrap:anywhere}
#auditView .auditDetailShort{display:block}
#auditView .auditRaw{margin-top:5px;font-size:11px;color:#526b83}
#auditView .auditRaw summary{cursor:pointer;color:#245f9f;font-weight:600;display:inline-block;padding:2px 0}
#auditView .auditRaw[open] div{margin-top:4px;background:#f4f7fb;border-left:2px solid #d4e2f1;padding:8px 10px;border-radius:4px;white-space:pre-wrap;overflow-wrap:anywhere}
#auditView .auditSubject,#auditView .auditUuid{overflow-wrap:anywhere;max-width:250px;font-size:11px;color:#546a82}
@media(max-width:660px){#auditView .auditSearchOptions{justify-content:flex-start}#auditView .auditSearchRow{align-items:stretch}}

/* v1.9.10 — Tasks: category chips, pending/completed review, no card-size changes */
#tasksView .taskCategories{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}
#tasksView .taskCategory{font-size:12px;border-radius:18px;border:1px solid #d5e2ee;background:#eef3f9;color:#35516d;padding:8px 12px}
#tasksView .taskCategory.active{background:#215fbd;border-color:#215fbd;color:white}
#tasksView .taskCategory span{font-variant-numeric:tabular-nums;margin-left:4px;opacity:.83}
#tasksView .taskViewToggle{display:inline-flex;border:1px solid #d6e2f0;background:#f5f8fc;border-radius:10px;padding:3px;gap:2px;margin:4px 0 12px}
#tasksView .taskToggle{border:0;background:transparent;color:#48617a;font-size:12px;padding:8px 14px;border-radius:7px}
#tasksView .taskToggle.selected{background:white;color:#194e95;box-shadow:0 1px 5px #172c4618}
#tasksView .taskCard{padding:14px 15px;border:1px solid #ecd3aa;background:#fffcf5;border-radius:10px;margin:10px 0;overflow-wrap:anywhere}
#tasksView .taskCard.taskDone{background:#f1fbf4;border-color:#aed9bd}
#tasksView .taskCardTop{display:flex;gap:12px;align-items:start}
#tasksView .taskCheck{font-size:19px;color:#9c7022;line-height:1.1;flex:none}
#tasksView .taskDone .taskCheck{color:#187a49}
#tasksView .taskCardText{flex:1;min-width:0;font-size:13px;line-height:1.5;color:#344d67}
#tasksView .taskCardText b{font-size:14px;color:#1f3853}
#tasksView .taskCardText p{margin:8px 0;color:#45617b;font-size:13px}
#tasksView .taskChip{font-size:11px;border-radius:15px;padding:4px 8px;white-space:nowrap;font-weight:650}
#tasksView .taskChip.pending{background:#fbe9c9;color:#8c5c19}
#tasksView .taskChip.complete{background:#d9f4e2;color:#187546}
#tasksView .taskActions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:10px}
#tasksView .taskActions button,#tasksView .taskLink{font-size:12px;padding:8px 10px}
#tasksView .taskLink{display:inline-flex;align-items:center;color:#205c9e;background:#eef4fc;border:1px solid #d1e0f2;border-radius:7px;text-decoration:none}
#tasksView .taskCompare{display:flex;gap:10px;flex-wrap:wrap}
#tasksView .taskCompare span{background:#f1f5fa;padding:7px 9px;border-radius:7px}
#tasksView .taskCompare b{display:block;color:#1c3e62}
#tasksView .taskFoot{margin-top:10px;margin-left:31px}
#tasksView .taskEmpty{padding:20px 10px}
#resolveMappingTaskForm label:has(input[type=radio]){display:flex;align-items:center;gap:8px;font-weight:500}
#resolveMappingTaskForm label input[type=radio]{width:auto;margin:0}

/* v1.9.10 local UI polish — only task navigation, audit UUID, account security,
   mapping upload width and in-app confirmation dialog. */
#tasksView .taskViewCount{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 5px;margin-left:5px;border-radius:12px;background:#dce7f5;color:#244f82;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
#tasksView .taskToggle.selected .taskViewCount{background:#e2effe;color:#194e95}
#tasksView .taskRelated{background:transparent;color:#205c9e;border:1px solid #cbdcf0;font-weight:650;font-size:12px;padding:7px 10px}
#tasksView .taskRelated:hover{background:#ecf4ff}
#tasksView .taskJumpTarget{outline:2px solid #2565bd;outline-offset:3px;transition:outline-color .5s ease}
#auditView .auditUuidCopy{display:inline-flex;align-items:center;justify-content:center;margin-left:6px;padding:2px 6px;border:1px solid #d5e2f0;background:#edf4fb;color:#285c93;border-radius:5px;font-size:14px;font-weight:600;vertical-align:middle}
#accountView{max-width:none}
#accountView .accountSecurityColumns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:34px;row-gap:20px;align-items:start}
#accountView .accountSecurityLeft,#accountView .accountSecurityRight{min-width:0}
#accountView .accountSecurityRight{border-left:1px solid #dce5ef;padding-left:28px}
#accountView .accountSecurityRight h3{margin-top:0}
#accountView #ownPasswordForm{max-width:none}
#mappingView .mappingUpload{max-width:680px;align-items:end}
#mappingView .mappingUpload label{flex:1 1 300px;min-width:0}
#mappingView .mappingUpload button{flex:0 0 auto}
#dialog .appConfirm h2{margin-top:0;margin-bottom:14px;color:#17263b}
#dialog .appConfirm p{line-height:1.5;color:#425b76;margin-bottom:22px}
#dialog .appConfirmActions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
#dialog .appConfirmActions button{min-width:104px}
@media(max-width:750px){#accountView .accountSecurityColumns{grid-template-columns:1fr}#accountView .accountSecurityRight{border-left:0;border-top:1px solid #dce5ef;padding:18px 0 0}#mappingView .mappingUpload{max-width:100%}}


/* v1.9.10: Deleted-card readability / fixed-height action visibility.
   Does not affect active device cards, their grid dimensions, or public tiles. */
.device.deletedCard .deletedReason{
    grid-column:1;
    justify-self:start;
    align-self:center;
    min-width:0;
    max-width:100%;
    color:#586e85;
    font-size:11px;
    font-weight:600;
    line-height:1.2;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
/* Deleted cards retain the original notes below the hostname.
   The deletion reason is shown next to Details when collapsed. */
.device.deletedCard.expanded .deletedReason{visibility:hidden}
/* Reclaim space from the expanded header and rows without growing the card. */
.device.deletedCard.expanded .deviceTitle{min-height:44px}
.device.deletedCard.expanded .deviceDetailsWrap{margin-top:0}
.device.deletedCard.expanded .deviceDetailsInner{min-height:0}
.device.deletedCard.expanded .metadata{
    margin:1px 0 2px;
    font-size:11px;
    line-height:1.35;
    min-height:0;
    flex:1 1 auto;
    overflow-y:auto;
    scrollbar-width:thin;
}
.device.deletedCard.expanded .metadata > div{margin-bottom:1px}
/* Action row never gets clipped even when metadata needs an extra line. */
.device.deletedCard.expanded .actions{
    flex:0 0 auto;
    margin-top:0;
    padding-top:4px;
    gap:5px;
}

/* v1.9.13: two-step MFA onboarding and preferred second-factor chooser */
#mfaSelect,#mfaEnroll{margin-top:55px}
.authMethodChoices{display:grid;gap:10px;margin:18px 0}
.authMethodButton{width:100%;padding:13px 16px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:12px}
.authMethodPreferred{font-size:.75rem;font-weight:700;border-radius:99px;padding:4px 9px;background:#e1f4e8;color:#174e30}
.authEnrollmentSummary{background:#f3f6fa;border:1px solid #dce5ef;border-radius:12px;padding:14px;line-height:1.85}
#finishMfaEnrollment{width:100%;margin-top:10px}
#mfaEnroll .hint,#mfaSelect .hint{line-height:1.5}

/* Compact workstation dashboard: one-line summary, aligned filters, and bulk details toggle. */
#app .top{margin:0 0 6px}
#app .top h1{font-size:23px}
#app .top p{margin:2px 0 0}
#app .stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:8px 0 9px}
#app .stat{display:flex;justify-content:space-between;align-items:center;gap:9px;padding:8px 12px;min-height:50px;border-radius:10px}
#app .stat .muted{font-size:12px;white-space:nowrap}
#app .stat b{display:inline;margin:0;font-size:22px;line-height:1;letter-spacing:-.02em}
#app nav{padding-bottom:6px}
#app .deviceCategories{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:9px 0 0}
#app .deviceCategories #officeFilter{width:210px;max-width:40%;margin-left:auto;flex:0 1 210px;min-height:35px;padding:6px 10px;font-size:13px}
#app .filters{display:flex;align-items:center;justify-content:flex-start;gap:8px;margin:8px 0 10px}
#app .filters #search{flex:1 1 500px;max-width:650px;min-height:36px;padding:7px 11px;font-size:13px}
#app .toggleAllDevices{display:inline-flex;align-items:center;justify-content:center;width:38px;height:36px;min-width:38px;padding:0;border:1px solid #cbd9e9;background:#e7effa;color:#1b538f;border-radius:9px;font-size:23px;font-weight:600;line-height:1;transition:background .15s ease}
#app .toggleAllDevices:hover{background:#d4e6fd}
#app .toggleAllDevices:focus-visible{outline:3px solid #79a9ec;outline-offset:2px}
#app .toggleAllDevices:disabled{opacity:.45}
@media(max-width:1000px){#app .stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){#app .stats{grid-template-columns:repeat(2,minmax(0,1fr))}#app .deviceCategories #officeFilter{width:100%;max-width:none;flex:1 1 100%;margin-left:0}#app .filters{flex-direction:row}#app .filters #search{flex:1 1 auto;min-width:0}}

/* Confirm sensitive actions without opening a second native dialog. */
#dialog .appConfirmInline{border:1px solid #cbd8e9;border-radius:10px;background:#f2f6fb;padding:15px;margin:4px 0 18px}
#dialog .appConfirmInline p{margin-bottom:15px}

/* Workstation UI: layout switch, click-to-copy hostnames, whole-card interactions. */
#identity{display:flex;align-items:center;gap:8px;justify-content:flex-end;flex-wrap:wrap;font-size:13px}
#identity .identityLabel{font-weight:600;white-space:nowrap}
#identity button{margin-left:0}
#identity .themeToggle{height:34px;width:36px;padding:6px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #7d9bbd;background:#234363;color:#ffda82;border-radius:9px}
#identity .themeToggle:hover{background:#31577e}
#app .deviceCategories .officeViewControls{display:flex;flex-direction:column;gap:5px;align-items:flex-end;margin-left:auto;min-width:0}
#app .deviceCategories .officeViewControls #officeFilter{margin-left:0;width:210px;max-width:100%;flex:none}
#app .viewSwitch{display:flex;gap:4px;justify-content:flex-end}
#app .viewMode{display:inline-flex;align-items:center;justify-content:center;width:30px;height:27px;min-width:30px;padding:0;border:1px solid #cbd7e6;color:#546c86;background:#f0f4fa;border-radius:7px}
#app .viewMode.active{color:#fff;background:#245eaa;border-color:#245eaa}
#app .viewMode:focus-visible,.hostnameCopy:focus-visible,.device:focus-visible{outline:2px solid #78a8ed;outline-offset:2px}
.hostnameCopy{padding:0;border:0;border-radius:3px;background:transparent;color:inherit;font:inherit;font-weight:inherit;line-height:inherit;text-align:left;overflow-wrap:anywhere;display:inline;cursor:copy}
.hostnameCopy:hover{color:#1764b6;text-decoration:underline;text-underline-offset:3px;filter:none}
.device .hostnameCopy{color:inherit}
.device[data-device-id]{cursor:pointer}
.device .deviceDetailsInner, .device .deviceDetailsInner .metadata{cursor:auto}
.device .listSummary{display:none}
#devices.viewList{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;gap:9px}
#devices.viewList .device{display:grid;grid-template-columns:minmax(245px,1.1fr) minmax(0,2fr);gap:8px 18px;grid-row:span 1!important;min-height:0;height:auto;overflow:visible;padding:13px 16px 12px;align-items:start}
#devices.viewList .deviceTitle{grid-column:1;grid-row:1;min-height:0;gap:8px}
#devices.viewList .deviceNameBlock{min-width:0}
#devices.viewList .statusStack{min-width:135px;max-width:175px}
#devices.viewList .statusStack .heartbeatTracker{display:none}
#devices.viewList .listSummary{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding-top:3px;min-width:0}
#devices.viewList .listSummary>div{min-width:0}
#devices.viewList .listSummary span{display:block;font-size:10px;font-weight:700;letter-spacing:.025em;text-transform:uppercase;color:#8291a6;margin-bottom:5px}
#devices.viewList .listSummary b{display:block;font-size:12px;color:#2b415a;overflow-wrap:anywhere;line-height:1.3;font-weight:650}
#devices.viewList .deviceCompactActions{grid-column:1 / -1;grid-row:2;margin:0;padding:4px 0 0;border-top:1px solid #edf1f6;min-height:27px}
#devices.viewList .deviceDetailsWrap{grid-column:1 / -1;grid-row:3;min-height:0;margin-top:0}
#devices.viewList .device.expanded .deviceDetailsWrap{margin-top:0}
#devices.viewList .deviceDetailsInner{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;padding:1px 0 0}
#devices.viewList .device .metadata{display:grid;grid-template-columns:1fr 1fr;gap:3px 18px;flex:1 1 420px;margin:0;line-height:1.45;overflow:visible;max-height:none}
#devices.viewList .device .metadata>div:nth-child(-n+3){display:none}
#devices.viewList .device .metadata>div{margin:0}
#devices.viewList .device .actions{margin:0;padding:0;align-self:start;flex:0 0 auto}
#devices.viewList .device.deletedCard.expanded .metadata{overflow:visible;max-height:none}
#devices.viewList .device.expanded .quickDelete{visibility:visible;pointer-events:auto}
#tasksView .hostnameCopy{color:#1c609d}
#tasksView .hostnameCopy:hover{color:#144f83}
@media(max-width:850px){
  #devices.viewList .device{grid-template-columns:1fr;gap:9px}
  #devices.viewList .deviceTitle,#devices.viewList .listSummary,#devices.viewList .deviceCompactActions,#devices.viewList .deviceDetailsWrap{grid-column:1;grid-row:auto}
  #devices.viewList .listSummary{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
}
@media(max-width:620px){
  #app .deviceCategories .officeViewControls{margin-left:0;align-items:stretch;width:100%}
  #app .deviceCategories .officeViewControls #officeFilter{width:100%;max-width:100%;flex:none}
  #app .viewSwitch{justify-content:flex-end}
  #identity .identityLabel{font-size:12px}
  #identity .themeToggle{height:32px;width:32px}
  #devices.viewList .device .metadata{grid-template-columns:1fr}
}

/* Local-browser theme: no server-side user settings, auth, or inventory changes. */
html[data-theme="dark"]{color-scheme:dark;background:#0c1523;color:#e5edf8}
html[data-theme="dark"] body{background:#0c1523;color:#e5edf8}
html[data-theme="dark"] header{background:#091729;border-bottom:1px solid #30445e}
html[data-theme="dark"] .brand span{color:#a7c4e7}
html[data-theme="dark"] :is(h1,h2,h3,h4,strong,b,label){color:#e4edf9}
html[data-theme="dark"] :is(p,.muted,.hint){color:#a8bacd}
html[data-theme="dark"] :is(.card,.stat,.device,.publicSidebar,.userRow,.taskCard,.taskEmpty,.auditEmpty,.mappingSummary>div,.authEnrollmentSummary){background:#17263a;color:#e5edf8;border-color:#354a64;box-shadow:none}
html[data-theme="dark"] :is(input,textarea,select,dialog){background:#132236;color:#edf5ff;border-color:#425773}
html[data-theme="dark"] :is(input,textarea,select)::placeholder{color:#91a6bd}
html[data-theme="dark"] :is(.tab,.taskToggle,.taskCategory){color:#b3c9e4}
html[data-theme="dark"] :is(.tab.active,.taskToggle.selected,.taskCategory.active){background:#23518a;color:#fff}
html[data-theme="dark"] :is(.deviceFilter,.auditFilter,.secondary,.viewMode,.expandToggle,.uuidCopy,.taskRelated,button.secondary){background:#233b55;color:#d5e7fa;border-color:#46617e}
html[data-theme="dark"] :is(.deviceFilter.selected,.auditFilter.selected,#app .viewMode.active){background:#306ebc;color:#fff;border-color:#397cc9}
html[data-theme="dark"] :is(.deviceNameBlock strong,.device .hostnameCopy,.device .metadata b,.device .metadata,.device .listSummary b,.device .beatCountdown,.deviceIcon){color:#e0ecfc}
html[data-theme="dark"] :is(.deviceNote,.heartbeatText,.heartbeatSub,.missedCount,.device .listSummary span,.userRow small,.statusLine .beatCountdown){color:#9eb4cc}
html[data-theme="dark"] :is(.heartbeatTracker,.shortUuid,.copycode,code,.mappingNote,.auditRaw,.auditTag,.appConfirmInline,.clearDeletedBar,.taskCompare,.auditCount,.publicSummary){background:#20344c;color:#d8e6f7;border-color:#3e5471}
html[data-theme="dark"] :is(.deviceCompactActions,.deviceDetailsWrap,nav,.userRow,#usersView hr,#accountView hr,#mappingView hr){border-color:#344b65}
html[data-theme="dark"] :is(th,td){color:#d9e7f7;border-color:#354b65}
html[data-theme="dark"] :is(.auditTable td,.auditRaw,.mappingSummary span,.userList small){color:#a8bbcf}
html[data-theme="dark"] :is(.pill.waiting,.pill.deleted){background:#34445b;color:#e0ebf7}
html[data-theme="dark"] :is(.pill.offline){background:#592832;color:#ffd9dc}
html[data-theme="dark"] :is(.pill.online){background:#174834;color:#c6f9dc}
html[data-theme="dark"] :is(.pill.warning){background:#5b4317;color:#ffdf91}
html[data-theme="dark"] :is(.missDot){background:#253d58;border-color:#65809e}
html[data-theme="dark"] .missDot.missed{background:#df4c5f;border-color:#df4c5f}
html[data-theme="dark"] :is(.hostnameCopy:hover,#tasksView .hostnameCopy,#tasksView .hostnameCopy:hover){color:#82beff}
html[data-theme="dark"] .device.expanded{border-color:#6585ac;box-shadow:0 6px 16px #0003}
html[data-theme="dark"] #devices.viewList .deviceCompactActions{border-color:#31465f}
html[data-theme="dark"] :is(.taskCheck,.taskFoot){color:#b0c4dc}
html[data-theme="dark"] :is(.taskChip.pending){background:#594621;color:#ffdb91}
html[data-theme="dark"] :is(.taskChip.complete){background:#174934;color:#c6f9dc}
html[data-theme="dark"] #dialog .appConfirmInline{background:#203852;border-color:#517297}
html[data-theme="dark"] :is(.authMethodPreferred){background:#22543d;color:#d4fbe2}
html[data-theme="dark"] :is(.accountProtected){background:#564321;color:#ffe3a1}
html[data-theme="dark"] .publicToolbar select{background:#132236}
html[data-theme="dark"] :is(.qrarea){background:white}
html[data-theme="dark"] #notice{background:#254e75;color:#fff}
/* List view must not hide the disposition of a retired device. */
#devices.viewList .device.deletedCard.expanded .deletedReason{visibility:visible}


/* UI follow-up: dark Task/Audit readability and smooth grid-only card details. */
/* Override legacy selectors that are more specific than the original theme rule. */
html[data-theme="dark"] #tasksView .taskCard{background:#1d2d42;border-color:#745b36;color:#eaf1fb}
html[data-theme="dark"] #tasksView .taskCard.taskDone{background:#19372e;border-color:#41765d}
html[data-theme="dark"] #tasksView .taskCardText,
html[data-theme="dark"] #tasksView .taskCardText p{color:#d0deef}
html[data-theme="dark"] #tasksView .taskCardText b,
html[data-theme="dark"] #tasksView .taskCompare b{color:#f1f6ff}
html[data-theme="dark"] #tasksView .taskFoot{color:#adbed1}
html[data-theme="dark"] #tasksView .taskViewToggle{background:#16263a;border-color:#425b78}
html[data-theme="dark"] #tasksView .taskToggle{color:#c0d3ea}
html[data-theme="dark"] #tasksView .taskToggle.selected{background:#26568c;color:#fff;box-shadow:none}
html[data-theme="dark"] #tasksView .taskCategory{background:#233a54;color:#d9eafa;border-color:#4b6481}
html[data-theme="dark"] #tasksView .taskCategory.active{background:#306db7;color:#fff;border-color:#4383ca}
html[data-theme="dark"] #tasksView .taskViewCount{background:#304761;color:#e2edfc}
html[data-theme="dark"] #tasksView .taskToggle.selected .taskViewCount{background:#4076ae;color:#fff}
html[data-theme="dark"] #tasksView .taskCompare span{background:#263d57;color:#e3eefc}
html[data-theme="dark"] #tasksView .taskLink{background:#213b56;border-color:#46688b;color:#a6d2ff}
html[data-theme="dark"] #tasksView .taskRelated{background:#213b56;color:#b8d9ff;border-color:#46688b}
html[data-theme="dark"] #tasksView .taskRelated:hover{background:#2e5276}
html[data-theme="dark"] #tasksView .taskChip.pending{background:#65502a;color:#ffe9b0}
html[data-theme="dark"] #tasksView .taskChip.complete{background:#205b44;color:#c8ffe0}
html[data-theme="dark"] #tasksView .taskCheck{color:#f1c77e}
html[data-theme="dark"] #tasksView .taskDone .taskCheck{color:#86e4b4}
html[data-theme="dark"] #tasksView .taskCard .hint{color:#aabed5}

html[data-theme="dark"] #auditView .auditAdvanced{background:#1b3048;border-color:#3b5675;color:#e7effb}
html[data-theme="dark"] #auditView .auditAdvanced label{color:#e4efff}
html[data-theme="dark"] #auditView .auditColumnsPreference{color:#d1e3f9}
html[data-theme="dark"] #auditView .auditTable th{background:#203750;color:#e5f0ff;border-color:#455f7c}
html[data-theme="dark"] #auditView .auditTable td{background:#17283d;color:#d9e8fa;border-color:#364f69}
html[data-theme="dark"] #auditView .auditTable tbody tr:nth-child(even) td{background:#1a2f46}
html[data-theme="dark"] #auditView .auditTable tbody tr:hover td{background:#27425e}
html[data-theme="dark"] #auditView .auditTable .auditWhen,
html[data-theme="dark"] #auditView .auditTable .auditHost,
html[data-theme="dark"] #auditView .auditTable .auditAction,
html[data-theme="dark"] #auditView .auditTable .auditDetail,
html[data-theme="dark"] #auditView .auditTable .auditSubject,
html[data-theme="dark"] #auditView .auditTable .auditUuid{color:#d6e5f8}
html[data-theme="dark"] #auditView .auditRaw{color:#c3d7ec}
html[data-theme="dark"] #auditView .auditRaw summary{color:#9dccff}
html[data-theme="dark"] #auditView .auditRaw[open] div{background:#263f5a;color:#e2effc;border-left-color:#547fae}
html[data-theme="dark"] #auditView .auditUuidCopy{background:#294c6d;color:#d8eeff;border-color:#537ca2}
html[data-theme="dark"] #auditView .auditEmpty{background:#1b3046;color:#c6d9ed}

/* Whole-card interaction replaces the Details button. Keep ManageEngine right-aligned. */
#devices .deviceCompactActions .compactRightActions{grid-column:2;justify-self:end;display:flex;justify-content:flex-end}
#devices .deviceCompactActions .manageEngineCompact{min-width:118px;text-align:center}
#toggleAllDevices[hidden]{display:none!important}
/* Do not instantly change visibility: the contents need time to retract. */
#devices .device:not(.expanded) .deviceDetailsWrap{visibility:visible}
#devices .device.collapsing{grid-row:span 2}
#devices.viewList .device{cursor:default}
#devices.viewList .deviceDetailsWrap{opacity:1;visibility:visible;pointer-events:auto;grid-template-rows:1fr}
#devices.viewList .device .quickDelete{visibility:visible;pointer-events:auto}
@media(prefers-reduced-motion:reduce){#devices .deviceDetailsWrap{transition:none!important}}


/* Follow-up: Inventory Mapping CSV grid uses a light sticky header by default.
   Cover both header *and* body/empty states without altering CSV data. */
html[data-theme="dark"] #mappingView .mappingUsageScroll{background:#142439;border-color:#415a75;color:#e1edfc}
html[data-theme="dark"] #mappingView .mappingUsageScroll thead{background:#253f5a}
html[data-theme="dark"] #mappingView .mappingUsageScroll th{background:#253f5a;color:#eef5ff;border-color:#496482}
html[data-theme="dark"] #mappingView .mappingUsageScroll td{background:#15283e;color:#dce9f8;border-color:#354f68}
html[data-theme="dark"] #mappingView .mappingUsageScroll tbody tr:nth-child(even) td{background:#1b3149}
html[data-theme="dark"] #mappingView .mappingUsageScroll tbody tr:hover td{background:#2a4762}
html[data-theme="dark"] #mappingView .mappingUsageScroll .assigned{color:#8cebb8}
html[data-theme="dark"] #mappingView .mappingSummary strong{color:#bcd5ee}

/* Shared traveling selection bubble. Tabs remain actual buttons with their
   own focus rings; the decorative indicator cannot capture input. */
#app #mainNav{position:relative;isolation:isolate}
#app #mainNav .navGlider{position:absolute;left:0;top:0;width:0;height:0;z-index:0;pointer-events:none;border-radius:8px;background:#dceafa;box-shadow:0 1px 3px #102b4514;transform:translate3d(0,0,0);transition:transform .48s cubic-bezier(.21,.84,.22,1),width .34s ease,height .34s ease,background-color .25s ease;will-change:transform,width}
#app #mainNav .navGlider.navGliderInstant{transition:none!important}
#app #mainNav .tab{position:relative;z-index:1;background:transparent;transition:color .22s ease}
#app #mainNav .tab.active{background:transparent;color:#174f9c}
#app #mainNav .tab:focus-visible{outline:2px solid #4e89db;outline-offset:2px}
html[data-theme="dark"] #app #mainNav .navGlider{background:#23518a;box-shadow:0 1px 3px #0004}
html[data-theme="dark"] #app #mainNav .tab.active{background:transparent;color:#fff}

/* Grid: animate the *visible card height*, rather than only changing a
   two-row grid span. Keep the expanded row reserved through closing. */
#devices:not(.viewList){--device-row-height:137px;--device-row-gap:13px}
#devices:not(.viewList) .device{
  height:var(--device-row-height);align-self:start;
  transition:height .38s cubic-bezier(.2,.74,.22,1),border-color .25s ease,box-shadow .25s ease;
}
#devices:not(.viewList) .device.expanded{height:calc(var(--device-row-height) * 2 + var(--device-row-gap))}
#devices:not(.viewList) .device.collapsing{grid-row:span 2}
#devices:not(.viewList) .deviceDetailsWrap{transition:grid-template-rows .38s cubic-bezier(.2,.74,.22,1),opacity .32s ease;min-height:0}
#devices.viewList .device{height:auto;transition:none}
@media(max-width:640px){#devices:not(.viewList){--device-row-height:140px}}
@media(prefers-reduced-motion:reduce){
  #devices:not(.viewList) .device,#devices:not(.viewList) .deviceDetailsWrap,
  #app #mainNav .navGlider{transition:none!important}
}

/* v2 motion fix: avoid the page/header moving sideways when the active tab
   changes from a scrollable device list to a short On Hand / Audit view. */
html{scrollbar-gutter:stable;overflow-y:scroll}
/* JavaScript drives a single persistent nav glider using WAAPI. Resize
   notifications can no longer cancel the motion halfway through. */
#app #mainNav .navGlider{transition:background-color .25s ease}
/* Grid reservations are updated by the expanded state; card/neighbor motion
   is measured and driven by the Web Animations API instead of CSS row spans. */
#devices:not(.viewList) .device{transition:border-color .25s ease,box-shadow .25s ease}
@media(prefers-reduced-motion:reduce){#app #mainNav .navGlider,#devices .device{animation:none!important}}

/* LMA IT folder workspaces — inventory and protected data sheets */
.brand{display:inline-flex;align-items:center;gap:10px}
.brand .brandMain{font-weight:800;color:#fff}
.brandWorkstation{flex:none;opacity:.95}
.workspaceFolders{display:flex;gap:5px;align-items:end;margin:0 0 0;padding:0 12px;position:relative;z-index:2;border-bottom:3px solid #d7c5a9}
.workspaceFolder{position:relative;display:inline-flex;align-items:center;gap:10px;min-width:155px;justify-content:center;border:1px solid #b7bec9;border-bottom:0;border-radius:12px 12px 0 0;padding:11px 22px;margin-top:4px;color:#28354c;box-shadow:inset 0 -5px 8px #384e6b0a;transition:transform .18s ease,background .2s ease}
.workspaceFolder.active{padding-top:15px;box-shadow:0 -3px 15px #172c4615;border-color:#bb9e70;transform:translateY(2px);z-index:1}
.workspaceFolder:focus-visible{outline:3px solid #5c92df;outline-offset:2px}
.inventoryFolder{background:#e2edf9}.inventoryFolder.active{background:#e2edf9}
.sheetsFolder{background:#dff2e9}.sheetsFolder.active{background:#e2f4ec}
#inventoryWorkspace{padding-top:14px}
#sheetsWorkspace{background:linear-gradient(160deg,#f5fbf7,#f8fafc 420px);border:1px solid #d1e6dd;border-top:none;border-radius:0 0 18px 18px;min-height:530px;padding:25px 28px 32px}
.sheetsHeader,.sheetHeading{display:flex;justify-content:space-between;align-items:center;gap:18px}
.sheetsHeader{margin-bottom:21px}.sheetsHeader h1{font-size:27px;letter-spacing:-.025em}.sheetsSubtitle{margin:6px 0;color:#62778c;font-size:13px}
.sheetsEyebrow{color:#5c897b;letter-spacing:.11em;font-size:10px;font-weight:800;margin-bottom:5px}
.sheetsPrimary{background:#16775b;color:white;white-space:nowrap;font-size:13px;padding:10px 13px}
.sheetsLayout{display:grid;grid-template-columns:225px minmax(0,1fr);gap:17px;align-items:start}
.sheetSidebar{background:#fff;border:1px solid #dbe9e4;border-radius:13px;padding:13px;box-shadow:0 4px 14px #143b2b0a}
.sheetSideTitle{padding:8px 9px 13px;font-size:11px;font-weight:800;color:#718397;letter-spacing:.11em;display:flex;gap:7px;align-items:center}
.sheetsNav{display:flex;flex-direction:column;gap:5px}
.sheetNavItem{display:flex;align-items:center;gap:10px;justify-content:space-between;width:100%;font-size:13px;font-weight:650;padding:11px 12px;text-align:left;background:transparent;color:#395267;box-shadow:none}
.sheetNavItem.active{background:#e3f4ec;color:#176b4f}.sheetNavItem:hover{background:#f0f7f5;filter:none}
.sheetNavItem .sheetTabName{overflow-wrap:anywhere;text-align:left}.sheetNavItem .sheetTabCount{color:#6e8c84;font-size:11px}
.sheetSideFooter{border-top:1px solid #e5ece9;padding:16px 7px 5px;margin-top:20px;display:flex;gap:9px;color:#788994;font-size:11px;line-height:1.45}.sheetSideFooter svg{flex:none}
.sheetMain{min-width:0;background:white;border:1px solid #dce9e4;border-radius:14px;padding:21px;box-shadow:0 5px 18px #143b2b09}
.sheetHeading{margin-bottom:15px}.sheetHeading h2{margin:0;font-size:22px}.sheetHeading .hint{margin:6px 0 0}
.sheetTools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.sheetSearchLabel{flex:1;max-width:560px}.sheetSearchLabel input{margin:0;background:#f8fafc}
.sheetRecordCount{white-space:nowrap;font-size:12px;color:#788da0}
.sheetsImport{border-radius:12px;padding:13px 15px;border:1px solid #cbdff7;background:#f0f7ff;display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:15px;font-size:12px}
.sheetsImport[hidden]{display:none!important}.sheetsImport strong{font-size:13px}.sheetsImport p{margin:6px 0 0;color:#5d718b;line-height:1.5;max-width:520px}
.sheetsImport form{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.sheetsImport input{width:min(250px,100%);font-size:11px}.sheetsImport button{font-size:12px;background:#245eab;white-space:nowrap;padding:10px}
.sheetTableShell{border:1px solid #e0e8ec;border-radius:12px;overflow:hidden}
.sheetTableScroll{overflow-x:auto}.sheetTable{font-size:12px;min-width:700px;white-space:nowrap}
.sheetTable thead{background:#f1f6f4}.sheetTable th{color:#547267;font-size:11px;font-weight:800;padding:12px 11px;border-bottom:1px solid #dce8e2;letter-spacing:.025em}
.sheetTable td{padding:10px 11px;color:#344b60;border-bottom:1px solid #e8efeb;max-width:285px;overflow:hidden;text-overflow:ellipsis}
.sheetTable tbody tr:hover{background:#f7fbf8}.sheetTable tbody tr:last-child td{border-bottom:none}
.sheetTable .sheetPrimaryCell{font-weight:800;color:#194b3c}.sheetTable .sheetCopy{border:0;background:none;color:inherit;text-align:left;font:inherit;padding:3px 0;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sheetTable .sheetCopy:hover{text-decoration:underline;filter:none}
.sheetSecretPill{background:#e6f4ed!important;color:#207358!important;border:1px solid #c9e8d8!important;border-radius:7px!important;padding:5px 9px!important;font-size:11px!important}
.sheetSecretPill:disabled{background:#edf0f4!important;color:#8e9caa!important;border-color:#edf0f4!important;opacity:1}
.sheetTable .sheetRowAction{padding:5px 8px;font-size:11px}.sheetRowAction[disabled]{display:none}
.sheetEmpty{padding:45px 20px;text-align:center;color:#6b7c88}.sheetEmpty strong{display:block;color:#254c40;font-size:15px;margin-bottom:8px}
.sheetBottomNote{font-size:11px;color:#829493;margin-top:14px;line-height:1.6}
.sheetRecordForm{display:grid;grid-template-columns:1fr 1fr;gap:12px}.sheetRecordForm label{min-width:0}.sheetRecordForm .sheetWide{grid-column:1/-1}.sheetRecordForm input,.sheetRecordForm textarea{width:100%}.sheetRecordForm .sheetSecretHint{font-size:11px;color:#6a7e91;font-weight:400}.sheetRecordForm .sheetClear{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:500}.sheetRecordForm .sheetClear input{width:auto;margin:0}
.srOnly{position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap}
/* Preserve dark-mode readability for the entire Sheets workspace */
html[data-theme="dark"] .workspaceFolders{border-color:#447b68}
html[data-theme="dark"] .inventoryFolder{background:#253b59;border-color:#395a7f;color:#dce9ff}
html[data-theme="dark"] .sheetsFolder{background:#184b3d;border-color:#26795d;color:#ddffee}
html[data-theme="dark"] .workspaceFolder.active{box-shadow:0 -3px 15px #0004}
html[data-theme="dark"] #sheetsWorkspace{background:linear-gradient(145deg,#102c2b,#101b29 480px);border-color:#36574d}
html[data-theme="dark"] .sheetsEyebrow{color:#86c7b0}
html[data-theme="dark"] .sheetsSubtitle,html[data-theme="dark"] .sheetRecordCount,html[data-theme="dark"] .sheetBottomNote{color:#a2b7bb}
html[data-theme="dark"] .sheetSidebar,html[data-theme="dark"] .sheetMain{background:#192a33;border-color:#36505a;color:#e3edf0}
html[data-theme="dark"] .sheetSideTitle,html[data-theme="dark"] .sheetSideFooter{color:#b3c4c6}
html[data-theme="dark"] .sheetSideFooter{border-color:#40535d}
html[data-theme="dark"] .sheetNavItem{color:#c2d6d8}
html[data-theme="dark"] .sheetNavItem.active{background:#235845;color:#e1fff2}
html[data-theme="dark"] .sheetNavItem:hover{background:#2a4d47}
html[data-theme="dark"] .sheetTools input{background:#15232c;color:#e7f0f4;border-color:#48606b}
html[data-theme="dark"] .sheetsImport{background:#1b3648;border-color:#3a6480;color:#e9f5fb}
html[data-theme="dark"] .sheetsImport p{color:#b6cbdf}
html[data-theme="dark"] .sheetTableShell{border-color:#37545b}
html[data-theme="dark"] .sheetTable thead{background:#203b3b}
html[data-theme="dark"] .sheetTable th{color:#b9d9ca;border-color:#3a5a59}
html[data-theme="dark"] .sheetTable td{color:#d5e5e4;border-color:#354d53}
html[data-theme="dark"] .sheetTable tbody tr:hover{background:#223b3f}
html[data-theme="dark"] .sheetTable .sheetPrimaryCell{color:#c8f2dc}
html[data-theme="dark"] .sheetSecretPill{background:#265c4b!important;color:#e0f6e9!important;border-color:#387a63!important}
html[data-theme="dark"] .sheetSecretPill:disabled{background:#263943!important;color:#829eaa!important;border-color:#263943!important}
html[data-theme="dark"] .sheetEmpty strong{color:#ccebdd}
@media(max-width:880px){.sheetsLayout{grid-template-columns:1fr}.sheetSidebar{padding:10px}.sheetsNav{flex-direction:row;overflow-x:auto}.sheetNavItem{width:auto;min-width:160px}.sheetSideFooter{display:none}}
@media(max-width:600px){#sheetsWorkspace{padding:16px 12px}.workspaceFolder{padding:10px 13px;min-width:0;flex:1}.workspaceFolder.active{padding-top:13px}.sheetsHeader,.sheetHeading{align-items:flex-start;flex-direction:column}.sheetMain{padding:13px}.sheetsImport{flex-direction:column;align-items:start}.sheetRecordForm{grid-template-columns:1fr}}

/* Sheets V2: folder groups, sheet builder and export controls */
.sheetSideGroup{border-top:1px solid #e5ece9;margin-top:9px;padding-top:10px}
.sheetSideGroup:first-child{border-top:0;margin-top:0}
.sheetSideGroupName{font-size:10px;font-weight:800;letter-spacing:.08em;color:#6a847c;display:flex;justify-content:space-between;padding:9px 10px}
.sheetSideBlank{display:block;font-size:11px;color:#879b98;padding:7px 10px}
.sheetArchivedNav{display:flex;justify-content:space-between;align-items:center;gap:6px;color:#5c7580;padding:6px 9px;font-size:12px;overflow-wrap:anywhere}
.sheetArchivedNav button{font-size:11px;padding:5px 7px;white-space:nowrap}
.sheetToolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 14px}
.sheetToolbar button{font-size:12px;padding:8px 11px}
.sheetDesignerForm{display:flex;flex-direction:column;gap:15px;min-width:min(540px,80vw)}
.sheetDesignerForm label{min-width:0}
.sheetDesignVisibility{display:flex;gap:20px;flex-wrap:wrap;border:1px solid #cbdad7;border-radius:10px;padding:10px 12px}
.sheetDesignVisibility legend{font-size:12px;font-weight:750}
.sheetDesignVisibility label{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600}
.sheetDesignVisibility input{width:auto;margin:0}
.sheetEditorHeading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.sheetDesignerRow{display:grid;grid-template-columns:minmax(120px,1fr) 126px auto;gap:6px;align-items:center}
.sheetDesignerRow input,.sheetDesignerRow select{min-width:0;width:100%;margin:0}
.sheetColumnButtons{display:flex;gap:3px}
.sheetColumnButtons button{padding:5px 7px;min-width:27px}
.sheetDesignerForm button[type=submit]{align-self:flex-start}
html[data-theme="dark"] .sheetSideGroup{border-color:#36534f}
html[data-theme="dark"] .sheetSideGroupName,html[data-theme="dark"] .sheetSideBlank{color:#a4c9bc}
html[data-theme="dark"] .sheetArchivedNav{color:#d2dfe5}
html[data-theme="dark"] .sheetDesignVisibility{border-color:#4b626d}
@media(max-width:660px){.sheetDesignerRow{grid-template-columns:minmax(100px,1fr) 110px;grid-template-areas:"name type" "buttons buttons"}.sheetDesignerRow input{grid-area:name}.sheetDesignerRow select{grid-area:type}.sheetColumnButtons{grid-area:buttons}}

.sheetFieldGroup{min-width:0;display:flex;flex-direction:column;gap:3px}.sheetFieldGroup label{display:block}.sheetFieldGroup label.sheetClear{display:flex;gap:8px;align-items:center}
@media(max-width:880px){.sheetsNav{flex-direction:column;overflow:visible}.sheetSideGroup{width:100%}}

/* Sheets V3: responsive sheet builder, no horizontal modal clipping */
#dialog:has(.sheetDesignerForm){width:min(700px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);overflow-y:auto;overflow-x:hidden;padding:clamp(15px,2.5vw,26px);overscroll-behavior:contain}
#dialog:has(.sheetDesignerForm) #dialogContents{min-width:0;max-width:100%}
.sheetDesignerForm{min-width:0!important;width:100%;max-width:100%;gap:13px}
.sheetDesignerForm > label,.sheetDesignVisibility,.sheetEditorHeading,.sheetDesignColumns,.sheetDesignerRow{min-width:0;max-width:100%}
.sheetDesignerRow{grid-template-columns:minmax(0,1fr) minmax(100px,140px) auto;gap:8px}
.sheetEditorHeading{flex-wrap:wrap}.sheetEditorHeading button{max-width:100%}
.sheetColumnButtons{display:flex;gap:3px;flex-shrink:0}
.sheetColumnButtons button{min-width:29px;padding:7px}
.sheetDesignerForm input,.sheetDesignerForm select{min-width:0;max-width:100%}
.sheetDesignerForm fieldset{min-width:0}
@media(max-width:620px){.sheetDesignerRow{grid-template-columns:minmax(0,1fr) minmax(90px,120px);grid-template-areas:"name type" "buttons buttons"}.sheetColumnButtons{justify-content:flex-end}#dialog:has(.sheetDesignerForm){max-height:calc(100dvh - 20px);padding:14px}.sheetEditorHeading button{font-size:12px}}
.sheetNavRow{display:flex;align-items:center;gap:4px;min-width:0}
.sheetNavRow .sheetNavItem{flex:1;min-width:0}
.sheetSideTrash{background:transparent!important;color:#9e3e49!important;border:0!important;border-radius:8px;padding:6px 8px!important;flex:0 0 auto;font-size:15px;min-width:31px;white-space:nowrap}
.sheetSideTrash:hover{background:#fce8ea!important;filter:none}
.sheetArchivedNav{min-width:0}.sheetArchivedNav>span{min-width:0;overflow-wrap:anywhere}
.sheetArchivedActions{display:flex;align-items:center;gap:3px;flex:0 0 auto}
.sheetPurgeActions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.sheetTitleRow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sheetTitleTrash{padding:7px!important;background:#fbe8e8!important;color:#aa2638!important;display:grid;place-items:center;flex:none}
.sheetTitleTrash:hover{background:#f4cfd4!important}
.sheetUploadArea{margin:11px 0 2px;padding:12px 7px;border-top:1px solid #e5ece9}
.sheetUploadButton{display:block;width:100%;background:#e3f2e9!important;color:#137354!important;font-size:12px}
.sheetUploadArea .hint{margin:7px 4px 0;font-size:11px;font-weight:400;line-height:1.5}
html[data-theme="dark"] .sheetSideTrash{color:#ffb2b7!important}
html[data-theme="dark"] .sheetSideTrash:hover{background:#4f2e3a!important}
html[data-theme="dark"] .sheetTitleTrash{background:#53303e!important;color:#ffbfc8!important}
html[data-theme="dark"] .sheetUploadArea{border-color:#36534f}
html[data-theme="dark"] .sheetUploadButton{background:#244d42!important;color:#c5ffde!important}

/* Workbooks V4 */
.wbUploadTop{margin:8px 0 12px;padding:8px 0 13px;border-bottom:1px solid #dce8e2}
.wbUploadTop .sheetUploadButton{display:block;width:100%;background:#d8f1e4;color:#0f684e;border:1px solid #90d8b7;padding:9px 11px;font-weight:800;font-size:12px;box-shadow:0 2px 6px #0e644518}
.wbUploadTop .hint{font-size:10px;line-height:1.45;margin:7px 3px 0;color:#6e8d81}
.wbTabCount{font-size:10px;font-weight:600;white-space:nowrap;color:#739488}
.wbSheetTabs{display:flex;gap:5px;align-items:flex-end;flex-wrap:wrap;border-bottom:2px solid #d9eae2;margin:0 0 15px;padding:0 2px}
.wbSheetTab{background:#eff5f1;border:1px solid #d6e6df;border-bottom:0;border-radius:9px 9px 0 0;color:#456459;padding:10px 17px;font-size:12px;font-weight:750;box-shadow:none;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wbSheetTab.active{background:#d8f3e5;color:#075a3f;box-shadow:inset 0 3px #158568}
.wbSheetTab:hover{filter:none;background:#e3f4e9}
.wbSheetTab.wbAddTab{font-size:18px;padding:5px 15px}
.wbTitleAction{font-size:16px;padding:7px 10px;background:#eef4f1;border:1px solid #dce9e2;color:#315b4d;border-radius:9px;box-shadow:none}
.wbTitleAction:last-of-type{font-size:11px;white-space:nowrap;letter-spacing:-.6px}
.wbTitleAction.active,.wbTitleAction:hover{background:#b9e9d0;color:#075941;filter:none}
.wbCellEdit{width:100%;min-width:115px;max-width:260px;border:1px solid #d0e1d9;background:#fff;color:#233c33;padding:8px 9px;border-radius:7px;font:inherit;font-size:12px}
.wbCellEdit:focus{border-color:#21856b;outline:2px solid #4ab79547}
.wbCellEdit.wbSaving{border-color:#e8c55d}.wbCellEdit.wbSaveError{border-color:#d72e45;background:#fff2f2}
.wbSecretCopy{border:0;background:#e5f1eb;color:#12654b;padding:4px 7px;font-size:10px;box-shadow:none;margin-left:3px}
.wbRowNumber{font-variant-numeric:tabular-nums;color:#879a90!important;min-width:42px}
.wbBlankRow{background:#f3fbf6}
.wbBlankRow td{border-top:2px dashed #b9daca}
.wbMoveCell{min-width:108px;white-space:nowrap!important}
.wbOrderButton{border:1px solid #cbdcd5;background:#f2f8f4;color:#326451;border-radius:7px;font-size:15px;padding:3px 7px;box-shadow:none}
.wbDragHandle{color:#3d8e77;font-size:19px;cursor:grab;margin-left:5px}
tr[draggable="true"]{cursor:grab}
html[data-theme="dark"] .wbUploadTop{border-color:#325248}
html[data-theme="dark"] .wbUploadTop .sheetUploadButton{background:#205a44;color:#e6fff1;border-color:#357e63}
html[data-theme="dark"] .wbUploadTop .hint,html[data-theme="dark"] .wbTabCount{color:#a4c9bb}
html[data-theme="dark"] .wbSheetTabs{border-color:#365549}
html[data-theme="dark"] .wbSheetTab{background:#253b36;color:#b8d9cb;border-color:#446457}
html[data-theme="dark"] .wbSheetTab.active{background:#23674e;color:#f0fff7}
html[data-theme="dark"] .wbTitleAction{background:#27443a;color:#daeee4;border-color:#406456}
html[data-theme="dark"] .wbTitleAction.active{background:#286d53}
html[data-theme="dark"] .wbCellEdit{background:#152c27;border-color:#43665a;color:#e4f5ec}
html[data-theme="dark"] .wbBlankRow{background:#1d332e}
html[data-theme="dark"] .wbBlankRow td{border-color:#3e6554}
html[data-theme="dark"] .wbOrderButton,html[data-theme="dark"] .wbSecretCopy{background:#2b5143;color:#e5fff1;border-color:#477b63}
@media(max-width:650px){.wbSheetTabs{flex-wrap:nowrap;overflow-x:auto}.wbSheetTab{flex:none}.wbTitleAction{padding:5px 7px}.sheetTable .wbCellEdit{min-width:105px}}
.wbBlankPrompt{cursor:text}
.wbBlankHint{color:#6c9483!important;font-style:italic;padding:14px 12px!important}
.wbBlankPrompt:hover{background:#e3f5eb!important}
html[data-theme="dark"] .wbBlankHint{color:#a2d3bd!important}
html[data-theme="dark"] .wbBlankPrompt:hover{background:#224538!important}


/* Workbooks V5 — persistent sidebar, compact workbook actions. */
@media (min-width: 881px) {
  .sheetsLayout { grid-template-columns: minmax(255px, 275px) minmax(0, 1fr); }
  #sheetsWorkspace .sheetSidebar {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    z-index: 3;
  }
  #sheetsWorkspace .sheetSidebar .sheetsNav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    overscroll-behavior: contain;
    padding-right: 2px;
  }
  #sheetsWorkspace .sheetSidebar .sheetSideTitle,
  #sheetsWorkspace .sheetSidebar .wbUploadTop,
  #sheetsWorkspace .sheetSidebar .sheetSideFooter { flex: 0 0 auto; }
  #sheetsWorkspace .sheetSidebar .sheetSideFooter { margin-top: 10px; }
}
#sheetsWorkspace .sheetNavRow { align-items: center; gap: 3px; padding: 1px 0; }
#sheetsWorkspace .sheetNavItem { min-width: 0; padding: 9px 7px; gap: 5px; }
#sheetsWorkspace .sheetNavItem .sheetTabName { min-width: 0; flex: 1; overflow-wrap: anywhere; line-height: 1.3; }
#sheetsWorkspace .wbTabCount { flex: none; font-size: 9px; }
.wbSidebarActions { flex: none; display: flex; align-items: center; gap: 2px; }
.wbSidebarAction { width: 29px; height: 31px; padding: 4px; display: grid; place-items: center;
  background: transparent; box-shadow: none; border: 1px solid transparent; border-radius: 7px;
  color: #416e5f; transition: background .18s ease, border-color .18s ease; }
.wbSidebarAction:hover { background: #e2f4eb; border-color: #b6d9c8; filter: none; }
.wbSidebarAction.active { background: #bbebd2; color: #075941; border-color: #6cbf92; }
.wbSidebarAction:focus-visible { outline: 2px solid #1f8a69; outline-offset: 1px; }
.wbMergeSection { border-top: 1px solid #dbe6df; padding: 15px 0 0; margin-top: 18px; }
.wbMergeSection .hint { margin: 7px 0 12px; }
.wbMergeSection button { font-size: 12px; }
html[data-theme="dark"] .wbSidebarAction { color: #b4dfca; }
html[data-theme="dark"] .wbSidebarAction:hover { background: #2d5645; border-color: #476d5a; }
html[data-theme="dark"] .wbSidebarAction.active { background: #1e7555; color: #e8fff1; border-color: #4c9b75; }
html[data-theme="dark"] .wbMergeSection { border-color: #3a594c; }
@media (max-width: 880px) {
  #sheetsWorkspace .sheetSidebar { position: static; max-height: none; overflow: visible; }
  #sheetsWorkspace .sheetsNav { max-height: min(52dvh, 410px); overflow-y: auto; overscroll-behavior: contain; }
}

/* Compact Workbooks sidebar title and top-right Upload button. */
#sheetsWorkspace .sheetSideTop {display:flex;justify-content:space-between;align-items:center;gap:10px;
  padding:3px 4px 10px;border-bottom:1px solid #dce8e2;flex:0 0 auto;}
#sheetsWorkspace .sheetSideTop .sheetSideTitle {padding:5px 4px;min-width:0;}
#sheetsWorkspace .sheetSideTop .wbUploadTop {margin:0;padding:0;border:0;flex:none;}
#sheetsWorkspace .sheetSideTop .sheetUploadButton {display:inline-flex;align-items:center;justify-content:center;
  width:auto;min-width:0;padding:6px 10px!important;min-height:31px;font-size:11px;line-height:1.2;
  border-radius:8px;white-space:nowrap;}
html[data-theme="dark"] #sheetsWorkspace .sheetSideTop {border-color:#325248;}

/* On Repair is an independent device lifecycle marker beside Online/Offline. */
.repairBadge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 7px;background:#fff0cc;color:#845000;font-size:10px;font-weight:800;white-space:nowrap;line-height:1.2}
.statusStack:has(.repairBadge){max-width:min(270px,55%)}
.statusLine:has(.repairBadge){flex-wrap:wrap;justify-content:flex-end}
.repairToggle{display:flex;align-items:flex-start;gap:10px;border:1px solid #cfd9e5;border-radius:10px;padding:12px;background:rgba(135,151,171,.07)}
.repairToggle input[type=checkbox]{width:18px;height:18px;min-width:18px;margin:2px 0 0;accent-color:#215fbd}
.repairToggle span{display:flex;flex-direction:column;gap:5px}
.repairToggle small{font-size:12px;font-weight:400;color:#62778c;line-height:1.5}
html[data-theme="dark"] .repairBadge{background:#5e481e;color:#ffdb90}
html[data-theme="dark"] .repairToggle{border-color:#344b65}
html[data-theme="dark"] .repairToggle small{color:#aabbd0}
