
:root {
  --green:#399845; --green-d:#2a7434; --green-l:#eaf4eb;
  --blue:#1865b0;  --blue-d:#0f4d8a;  --blue-l:#e8f0fa;
  --gray:#58585b;  --gray-l:#f4f4f5;  --gray-m:#e2e2e4;
  --text:#2c2c2e;  --muted:#6b6b6e;   --white:#fff;
  --red-l:#fdeaea; --red-t:#a32d2d;
  --amber-l:#fef3e0; --amber-t:#854f0b;
  --sidebar:200px; --detail:288px;
  /* Wave 30A — design tokens */
  --brand-grad:linear-gradient(135deg,#0f4d8a 0%,#1865b0 46%,#1d7a5f 100%);
  --accent-line:linear-gradient(90deg,var(--green) 0%,#2a7a7a 55%,var(--blue) 100%);
  --surface:#fff; --surface-2:#f4f4f5; --surface-3:#e2e2e4;
  --shadow-1:0 1px 2px rgba(16,34,53,.06),0 1px 8px rgba(16,34,53,.05);
  --shadow-2:0 8px 24px rgba(16,34,53,.14);
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'DM Sans',sans-serif;font-size:13px;color:var(--text);background:var(--gray-l);height:100vh;display:flex;flex-direction:column;overflow:hidden}

/* ── TOPBAR ── */
.topbar{background:var(--blue);display:flex;align-items:center;padding:0 16px;height:52px;gap:12px;flex-shrink:0;z-index:100}
.topbar-logo{height:34px;object-fit:contain;background:white;padding:5px 10px;border-radius:7px}
.topbar-divider{width:1px;height:26px;background:rgba(255,255,255,.22);margin:0 4px}
.topbar-app{display:flex;flex-direction:column}
.topbar-app-name{font-family:'Barlow Condensed',sans-serif;font-size:15px;font-weight:700;color:#fff;letter-spacing:.5px;line-height:1.1}
.topbar-app-sub{font-size:10px;color:rgba(255,255,255,.6)}
.client-select{display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.13);border-radius:6px;padding:5px 10px;cursor:pointer;border:none;color:#fff;font-family:'DM Sans',sans-serif;font-size:12px;font-weight:500}
.client-select select{background:transparent;border:none;color:#fff;font-size:12px;font-family:'DM Sans',sans-serif;outline:none;cursor:pointer}
.client-select select option{color:var(--text);background:#fff}
.topbar-spacer{flex:1}
.topbar-badge{background:var(--green);color:#fff;font-size:10px;font-weight:600;padding:3px 9px;border-radius:20px;letter-spacing:.3px}
.topbar-refresh{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:7px;border:none;background:rgba(255,255,255,.13);color:#fff;cursor:pointer;font-size:16px;transition:background .12s}
.topbar-refresh:hover{background:rgba(255,255,255,.26)}
.topbar-navtoggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:7px;border:none;background:rgba(255,255,255,.13);color:#fff;cursor:pointer;font-size:18px;transition:background .12s;flex-shrink:0}
.topbar-navtoggle:hover{background:rgba(255,255,255,.26)}
.topbar-refresh.spin i{animation:tb-spin .7s linear}
@keyframes tb-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
.topbar-status{display:flex;align-items:center;gap:5px;font-size:11px;color:rgba(255,255,255,.75)}
.status-dot{width:7px;height:7px;border-radius:50%;background:#aaa}
.status-dot.connected{background:#5dca8a}
.status-dot.offline{background:#e05252}
.topbar-badge.err{background:#e0a800}
.topbar-badge.off{background:#888}
/* ── AUTH (Phase 4) ── */
.login-overlay{position:fixed;inset:0;background:linear-gradient(135deg,#1865b0 0%,#2a7a7a 55%,#399845 100%);display:none;align-items:center;justify-content:center;z-index:9000;overflow:hidden}
.login-overlay.show{display:flex}
.login-circuit{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.login-circuit path{fill:none;stroke:#fff;stroke-width:1.5;opacity:.14}
.login-circuit circle{fill:#fff;opacity:.22}
.login-circuit rect{fill:none;stroke:#fff;stroke-width:1.5;opacity:.18}
.login-card{position:relative;background:#fff;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.35);width:390px;max-width:92vw;padding:30px 34px 26px}
.login-logo{text-align:center;margin-bottom:14px}
.login-logo img{max-width:220px;max-height:78px}
.login-logo .lg-fallback{display:none}
.login-logo .lg-word{font-size:24px;font-weight:800;letter-spacing:2.5px;color:#1865b0}
.login-logo .lg-word b{color:#399845;font-weight:800}
.login-logo .lg-tag{font-size:9.5px;letter-spacing:4px;color:#399845;font-weight:600;margin-top:2px}
.login-card h1{font-size:16px;color:#1865b0;margin:0 0 2px;text-align:center}
.login-card .lc-sub{font-size:11.5px;color:#888;margin-bottom:18px;text-align:center}
.login-card label{display:block;font-size:11.5px;font-weight:600;color:#58585b;margin:12px 0 4px}
.login-card input{width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #d5d5d8;border-radius:8px;font-size:14px}
.login-card input:focus{outline:none;border-color:#1865b0}
.login-btn{width:100%;margin-top:20px;padding:11px;border:none;border-radius:8px;background:#399845;color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.login-btn:hover{background:#2f8039}
.login-btn:disabled{background:#9bc9a3;cursor:wait}
.lc-links{margin-top:12px;text-align:center}
.lc-links a{font-size:12px;color:#1865b0;cursor:pointer;text-decoration:none}
.lc-links a:hover{text-decoration:underline}
.login-err{margin-top:12px;font-size:12.5px;color:#c0392b;min-height:16px}
.login-ok{margin-top:12px;font-size:12.5px;color:#2f8039;min-height:16px}
.login-note{margin-top:14px;font-size:11px;color:#999;text-align:center}
.um-table{width:100%;border-collapse:collapse;font-size:12px;margin-top:10px}
.um-table th{text-align:left;font-size:10.5px;text-transform:uppercase;letter-spacing:.4px;color:#888;padding:6px 8px;border-bottom:1px solid #e5e5e8}
.um-table td{padding:7px 8px;border-bottom:1px solid #f0f0f2}
.um-pill{font-size:10px;font-weight:600;padding:2px 8px;border-radius:10px}
.um-pill.admin{background:#e3edf7;color:#1865b0}
.um-pill.user{background:#e9f5eb;color:#399845}
.um-pill.inactive{background:#f4d7d7;color:#b03a3a}
.um-mini{font-size:11px;padding:4px 9px;border:1px solid #d5d5d8;border-radius:6px;background:#fff;cursor:pointer}
.um-mini:hover{border-color:#1865b0;color:#1865b0}
.um-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
.um-form input,.um-form select{padding:8px 10px;border:1px solid #d5d5d8;border-radius:7px;font-size:12.5px}
.topbar-logo{cursor:pointer;transition:transform .12s}
.topbar-logo:hover{transform:scale(1.04)}
.topbar-welcome{color:#fff;font-size:12.5px;font-weight:500;white-space:nowrap;margin-left:2px}
.topbar-welcome .tw-name{font-weight:700}
.topbar-conn{display:flex;flex-direction:column;line-height:1.15;font-size:10px;color:rgba(255,255,255,.6)}
.topbar-conn .tc-time{color:rgba(255,255,255,.85);font-weight:600}
/* favorites */
.topbar-fav{position:relative}
.topbar-fav-btn{display:flex;align-items:center;gap:5px;background:rgba(255,255,255,.13);border:none;color:#fff;font-family:'DM Sans',sans-serif;font-size:12px;font-weight:500;padding:6px 11px;border-radius:6px;cursor:pointer;transition:background .12s}
.topbar-fav-btn:hover{background:rgba(255,255,255,.22)}
.topbar-fav-btn i{font-size:14px;color:#ffd56b}
.topbar-fav-menu{position:absolute;top:calc(100% + 8px);right:0;width:300px;background:var(--white);border:.5px solid var(--gray-m);border-radius:9px;box-shadow:0 10px 34px rgba(0,0,0,.22);z-index:300;overflow:hidden}
.fav-save-row{display:flex;gap:6px;padding:11px 12px;border-bottom:.5px solid var(--gray-m);background:var(--gray-l)}
.fav-save-row input{flex:1;font-family:'DM Sans',sans-serif;font-size:12px;color:var(--text);background:var(--white);border:.5px solid var(--gray-m);border-radius:5px;padding:6px 8px;outline:none}
.fav-save-row input:focus{border-color:var(--blue)}
.fav-save-row button{flex-shrink:0;background:var(--blue);color:#fff;border:none;border-radius:5px;padding:0 11px;cursor:pointer;font-size:14px;display:flex;align-items:center}
.fav-save-row button:hover{background:var(--blue-d)}
.fav-list{max-height:320px;overflow-y:auto}
.fav-empty{padding:20px 14px;text-align:center;color:var(--muted);font-size:12px}
.fav-item{display:flex;align-items:center;gap:9px;padding:9px 12px;cursor:pointer;border-bottom:.5px solid var(--gray-m);transition:background .1s}
.fav-item:last-child{border-bottom:none}
.fav-item:hover{background:var(--blue-l)}
.fav-item i.fav-ico{color:var(--blue);font-size:15px;flex-shrink:0}
.fav-item-body{flex:1;min-width:0}
.fav-item-name{font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fav-item-meta{font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fav-item-del{flex-shrink:0;color:var(--muted);font-size:14px;padding:3px;border-radius:4px}
.fav-item-del:hover{color:var(--red-t);background:var(--gray-l)}
.fav-item-edit{flex-shrink:0;color:var(--muted);font-size:14px;padding:3px;border-radius:4px}
.fav-item-edit:hover{color:var(--blue);background:var(--gray-l)}
.fav-item.fav-editing{background:var(--blue-l)}
.fav-edit-input{flex:1;min-width:0;font-family:'DM Sans',sans-serif;font-size:12.5px;font-weight:600;color:var(--text);background:var(--white);border:.5px solid var(--blue);border-radius:5px;padding:5px 7px;outline:none}
.fav-item-ok{flex-shrink:0;color:var(--green-d);font-size:16px;padding:3px;border-radius:4px}
.fav-item-ok:hover{background:var(--white)}
.fav-item-cancel{flex-shrink:0;color:var(--muted);font-size:16px;padding:3px;border-radius:4px}
.fav-item-cancel:hover{color:var(--red-t);background:var(--white)}
/* global back-to-top */
.global-scrolltop{display:none;position:fixed;bottom:22px;right:22px;width:44px;height:44px;border-radius:50%;border:none;background:var(--blue);color:#fff;box-shadow:0 4px 16px rgba(0,0,0,.28);cursor:pointer;align-items:center;justify-content:center;font-size:21px;z-index:250}
.global-scrolltop:hover{background:var(--blue-d)}
/* settings / account */
.acct-name{font-weight:600;color:var(--text)}
/* W35C.3 LAYERING FIX (Frank, 7/28 screenshots): this was z-index:400, which
   put EVERY standard modal underneath the phone bottom tray (#mobileNav, 900)
   and underneath the whole right-side panel family — .preview-panel 2100,
   .eqhome-fly/.lochome-fly 2200, .eqfly-overlay 2210, .eqpv-panel 2300/2600,
   .terra-panel 2400. Opening My Account while an equipment fly-out was up
   painted the fly-out straight over the modal. 2700 clears that family and
   still sits below the surfaces that must stay on top: #fileViewerModal 3000,
   _adeRaise's counter (3000+), the notification panel 3500 and adeDialog. */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(15,30,50,.45);z-index:2700;align-items:center;justify-content:center}
.modal-overlay.open{display:flex}
/* The file viewer must stack above the fullscreen preview pane (z-index 2000) */
#fileViewerModal{z-index:3000}
/* W28.1: the viewer card in native full screen — same treatment as
   #policyDocModalPanel:fullscreen, or the card keeps its 90vh box on black */
#fvCard:fullscreen{width:100%;height:100%;max-width:none;max-height:none;border-radius:0}
/* W30D.6: phones — the viewer card is full-bleed by default; the full-screen
   button toggles READER MODE (.fv-max): secondary controls hide, the toolbar
   slims down, and the document text grows for maximum readability. */
@media (max-width:860px){
  #fileViewerModal{padding:0;align-items:stretch;justify-content:stretch}
  #fvCard{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;border-radius:0!important}
  /* W33.1: phones — no "open in new tab" (it lands in Chrome's own
     about:blank chrome, which the app cannot style or hide); the
     full-screen button is BACK and now opens IMMERSIVE reading. */
  #fvNewTab{display:none!important}
  #fileViewerModal.fv-max #fvCard>div:first-child{padding:7px 10px}
  #fileViewerModal.fv-max #fvDownload,#fileViewerModal.fv-max #fvCard .btn-outline,#fileViewerModal.fv-max #fvNewTab{display:none!important}
  #fileViewerModal.fv-max #fvTitle{font-size:12.5px}
  #fileViewerModal.fv-max #fvHtml{padding:14px 12px!important;font-size:15.5px!important;line-height:1.65!important}
}
#fvCard:-webkit-full-screen{width:100%;height:100%;max-width:none;max-height:none;border-radius:0}

/* ── W33.1: IMMERSIVE reading, phones — the viewer's full-screen button hides
   every control: no toolbar, no borders, just the document plus one floating
   exit. Same visual language as the process-flow explorer mode. */
#fileViewerModal.fv-immerse #fvCard>div:first-child{display:none!important}
#fileViewerModal.fv-immerse #fvHtml{padding:16px 14px!important;font-size:15.5px!important;line-height:1.65!important}
#fileViewerModal.fv-immerse #fvImmerseClose{display:flex}
#fvImmerseClose{display:none;position:fixed;top:calc(10px + env(safe-area-inset-top));right:calc(10px + env(safe-area-inset-right));z-index:60;width:38px;height:38px;border-radius:50%;border:none;background:rgba(20,30,40,.55);color:#fff;align-items:center;justify-content:center;font-size:19px;cursor:pointer}

/* ── W33: PROCESS-FLOW VIEWER, phones ──────────────────────────────────────
   Portrait: the published-flow pop-up is full-bleed (same treatment as the
   document viewer). Landscape: EXPLORER MODE (.pfv-explore) — every control
   and border disappears, just the diagram plus one floating close. Rotating
   the phone switches between the two automatically (see _pfvExploreSync). */
@media (max-width:860px){
  #pfViewModal{padding:0;align-items:stretch;justify-content:stretch}
  #pfViewModal .modal-card{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;border-radius:0!important}
  #pfViewModal #pfViewModalBody{display:flex;flex-direction:column;flex:1;min-height:0}
  #pfViewModal #pfModalCanvasWrap{flex:1;height:auto!important;min-height:0}
  #pfvToolbar .um-mini{padding:8px 10px;font-size:12px}
}
#pfViewModal.pfv-explore{padding:0;align-items:stretch;justify-content:stretch}
#pfViewModal.pfv-explore .modal-card{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:none!important;border-radius:0!important;border:0!important}
#pfViewModal.pfv-explore .modal-card>div:first-child{display:none!important}
#pfViewModal.pfv-explore #pfvToolbar{display:none!important}
#pfViewModal.pfv-explore #pfViewModalBody{padding:0!important;display:flex;flex-direction:column;flex:1;min-height:0}
#pfViewModal.pfv-explore #pfModalCanvasWrap{flex:1;width:100%;height:auto!important;min-height:0;border:0!important;border-radius:0!important}
#pfViewModal.pfv-explore #pfvExploreClose{display:flex}
/* W33.2: explorer mode — the in-canvas legend and rotate hint give way; the
   floating controls menu (pfvExploreMenuBtn) replaces them. The canvas
   flex-centers its shell; margin:auto on the shell is the safe centering
   (never clips when Actual size overflows). */
#pfViewModal.pfv-explore #pfModalCanvasWrap>div:not([id]){display:none!important}
#pfViewModal.pfv-explore #pfvRotateHint{display:none!important}
#pfViewModal.pfv-explore #pfModalCanvasWrap{display:flex}
#pfViewModal.pfv-explore #pfvExploreMenuBtn{display:flex}
#pfvExploreMenuBtn{display:none;position:fixed;top:calc(10px + env(safe-area-inset-top));left:calc(10px + env(safe-area-inset-left));z-index:60;width:38px;height:38px;border-radius:50%;border:none;background:rgba(20,30,40,.55);color:#fff;align-items:center;justify-content:center;font-size:19px;cursor:pointer}
#pfvExploreMenu{position:fixed;top:calc(56px + env(safe-area-inset-top));left:calc(10px + env(safe-area-inset-left));z-index:61;background:rgba(20,30,40,.93);color:#fff;border-radius:12px;padding:10px 12px;min-width:215px;max-width:75vw;max-height:72vh;overflow:auto;box-shadow:0 8px 30px rgba(0,0,0,.45)}
#pfvExploreMenu .pfvm-row{display:flex;align-items:center;gap:8px;padding:7px 2px;font-size:13px}
#pfvExploreMenu .pfvm-row i{cursor:pointer;font-size:17px}
#pfvExploreClose{display:none;position:fixed;top:calc(10px + env(safe-area-inset-top));right:calc(10px + env(safe-area-inset-right));z-index:60;width:38px;height:38px;border-radius:50%;border:none;background:rgba(20,30,40,.55);color:#fff;align-items:center;justify-content:center;font-size:19px;cursor:pointer}
.pfv-rotate-hint{position:absolute;left:50%;top:14px;transform:translateX(-50%);z-index:40;display:flex;align-items:center;gap:8px;background:rgba(20,30,40,.85);color:#fff;font-size:13px;font-weight:700;padding:10px 16px;border-radius:22px;pointer-events:none;white-space:nowrap;box-shadow:0 4px 14px rgba(0,0,0,.35);opacity:1;transition:opacity .6s}
.pfv-rotate-hint i{font-size:17px}
.pfv-rotate-hint.fade{opacity:0}

.modal-card{background:var(--white);border-radius:12px;width:560px;max-width:92vw;max-height:86vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 18px 50px rgba(0,0,0,.3)}
.modal-head{display:flex;align-items:center;gap:10px;padding:15px 18px;border-bottom:.5px solid var(--gray-m)}
.modal-head h3{font-family:'Barlow Condensed',sans-serif;font-size:18px;font-weight:700;flex:1}
.modal-head .modal-x{cursor:pointer;color:var(--muted);font-size:20px;padding:2px 6px;border-radius:5px}
.modal-head .modal-x:hover{background:var(--gray-l);color:var(--text)}
.modal-body{padding:16px 18px;overflow-y:auto}
/* W35C.4: the account holder's name beside the modal title. The rule draws the
   divider, so an empty name never leaves a stray bar. */
#settingsWho::before{content:"|";margin:0 8px 0 2px;color:var(--gray-m);font-weight:400}
@media (max-width:560px){#settingsWho{display:none!important}}
.settings-tabs{display:flex;gap:6px;margin-bottom:14px;border-bottom:.5px solid var(--gray-m)}
.settings-tab{padding:7px 12px;font-size:12px;color:var(--muted);cursor:pointer;border-bottom:2px solid transparent;font-weight:500}
.settings-tab.active{color:var(--blue);border-bottom-color:var(--blue)}
.settings-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:.5px solid var(--gray-m);font-size:13px}
.settings-row:last-child{border-bottom:none}
.settings-row .sr-label{color:var(--muted)}
.settings-row .sr-val{font-weight:600;color:var(--text)}
/* W35C.4 (Frank): a settings GROUP — closed, its summary is indistinguishable
   from an ordinary settings row, so the Preferences list reads as one uniform
   column; open, its children indent to read as sub-settings of it. Token
   coloured, so dark mode is free (design-system layer 1). */
.settings-grp{border-bottom:.5px solid var(--gray-m)}
.settings-grp:last-child{border-bottom:none}
.settings-grp>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;padding:10px 0;font-size:13px;border-bottom:none}
.settings-grp>summary::-webkit-details-marker{display:none}
.settings-grp>summary .sr-label{color:var(--muted)}
.settings-grp>summary .grp-chev{color:var(--muted);font-size:15px;transition:transform .15s}
.settings-grp[open]>summary .grp-chev{transform:rotate(90deg)}
.settings-grp[open]>summary{border-bottom:.5px solid var(--gray-m)}
.settings-grp>summary:hover .sr-label,.settings-grp>summary:hover .grp-chev{color:var(--blue)}
.settings-grp .tmark-in{display:inline-block!important;width:14px;height:14px;vertical-align:-2px;margin-right:6px;flex:none}
/* The indent is what makes these read as belonging to the row above them. */
.settings-grp-body{padding-left:20px;border-left:2px solid var(--gray-m);margin-left:2px}
.settings-grp-body .settings-row:last-child{border-bottom:none}
/* W35C.4: the Company Profile collapsible-section chevron. The 35C.2 rule was
   scoped to #cpLists; the Terra card sits outside it, so the rule is global now
   and both use it. */
details[open]>summary .cp-chev{transform:rotate(90deg)}
.settings-sub-hd{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding-bottom:2px}
.settings-sub-hd .terra-mark{width:15px;height:15px;flex:none}
/* location document library (embedded in expanded location panel) */
.ldoc-wrap{margin-top:16px;border-top:.5px solid var(--gray-m);padding-top:14px}
.ldoc-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.ldoc-title{display:flex;align-items:center;gap:7px;font-family:'Barlow Condensed',sans-serif;font-size:15px;font-weight:700;color:var(--text)}
.ldoc-title i{color:var(--blue);font-size:16px}
.ldoc-count{background:var(--blue-l);color:var(--blue-d);font-size:11px;font-weight:600;padding:1px 8px;border-radius:10px}
.ldoc-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.ldoc-search{position:relative;display:flex;align-items:center}
.ldoc-search i{position:absolute;left:8px;color:var(--muted);font-size:13px;pointer-events:none}
.ldoc-search input{font-family:'DM Sans',sans-serif;font-size:12px;color:var(--text);background:var(--white);border:.5px solid var(--gray-m);border-radius:5px;padding:6px 8px 6px 26px;outline:none;width:230px}
.ldoc-search input:focus{border-color:var(--blue)}
.ldoc-btn{padding:5px 9px;font-size:11.5px}
.ldoc-list{background:var(--white);border:.5px solid var(--gray-m);border-radius:8px;max-height:360px;overflow-y:auto}
.ldoc-row{display:flex;align-items:center;gap:9px;padding:8px 11px;border-bottom:.5px solid var(--gray-m);transition:background .1s}
.ldoc-row:last-child{border-bottom:none}
.ldoc-row:hover{background:var(--blue-l)}
.ldoc-row.sel{background:var(--blue-l)}
.ldoc-row input[type=checkbox]{flex-shrink:0;cursor:pointer;width:15px;height:15px;accent-color:var(--blue)}
.ldoc-ico{color:var(--blue);font-size:17px;flex-shrink:0}
.ldoc-row-body{flex:1;min-width:0;cursor:pointer}
.ldoc-name{font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ldoc-meta{font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px}
.ldoc-act{flex-shrink:0;color:var(--muted);font-size:15px;padding:4px;border-radius:5px;cursor:pointer}
.ldoc-act:hover{color:var(--blue);background:var(--white)}
/* employee training report cards */
.emprep-card{background:var(--white);border:.5px solid var(--gray-m);border-radius:10px;margin-bottom:16px;overflow:hidden}
.emprep-head{display:flex;align-items:center;gap:8px;padding:12px 14px;background:var(--gray-l);border-bottom:.5px solid var(--gray-m)}
.emprep-name{font-family:'Barlow Condensed',sans-serif;font-size:17px;font-weight:700;color:var(--text);line-height:1.1}
.emprep-sub{font-size:11.5px;color:var(--muted);margin-top:2px}
.emprep-remove{flex-shrink:0;color:var(--muted);font-size:16px;padding:4px;border-radius:5px;cursor:pointer}
.emprep-remove:hover{color:var(--red-t);background:var(--white)}
.emprep-table-wrap{overflow:visible}
.emprep-table-wrap table{width:100%}
.emprep-classlink{color:var(--blue);cursor:pointer;font-weight:500}
.emprep-classlink:hover{text-decoration:underline}
.emprep-classlink i{opacity:.55}
.cf-sesslink{color:var(--blue);cursor:pointer;text-decoration:none;font-weight:500}
.cf-sesslink:hover{text-decoration:underline}

/* ── BODY ── */
.body{display:flex;flex:1;overflow:hidden}

/* ── SIDEBAR ── */
.sidebar{width:var(--sidebar);background:var(--white);border-right:.5px solid var(--gray-m);display:flex;flex-direction:column;flex-shrink:0;transition:margin-left .24s ease, opacity .2s ease}
.mnav-cust-row,.mob-acct-row{display:none!important}   /* mobile-only sidebar rows: customize-tray (3z.14) + My Account (W33). !important — the later .nav-item{display:flex} rule was out-ranking this and leaking them onto desktop */
body.nav-collapsed .sidebar{margin-left:calc(-1 * var(--sidebar));opacity:0;pointer-events:none}
.sidebar-section{padding:10px 0}
.sidebar-label{font-size:10px;font-weight:600;color:var(--muted);letter-spacing:.8px;text-transform:uppercase;padding:0 13px;margin-bottom:3px}
.nav-item{display:flex;align-items:center;gap:8px;padding:7px 13px;cursor:pointer;color:var(--gray);font-size:12px;border-left:3px solid transparent;transition:background .12s;user-select:none}
.nav-item:hover{background:var(--gray-l);color:var(--text)}
.nav-item.active{background:var(--green-l);color:var(--green-d);border-left-color:var(--green);font-weight:500}
.nav-item i{font-size:14px;flex-shrink:0}
.nav-badge{margin-left:auto;background:var(--green-l);color:var(--green-d);font-size:10px;font-weight:600;padding:1px 6px;border-radius:10px}
.nav-item.active .nav-badge{background:var(--green);color:#fff}
.nav-tr-chev{margin-left:6px;font-size:12px!important;color:var(--muted);opacity:.7;transition:transform .15s,background .12s,opacity .12s;transform:rotate(90deg);border-radius:4px;padding:1px}
.nav-tr-chev:hover{background:var(--gray-m);color:var(--text);opacity:1}
.sidebar-divider{height:.5px;background:var(--gray-m);margin:3px 0}
.sidebar-fav-header{display:flex;align-items:center;gap:6px;padding:0 13px;margin-bottom:3px;cursor:pointer;user-select:none}
.sidebar-fav-header:hover .sidebar-label{color:var(--text)}
.sidebar-fav-header .sfh-chev{margin-left:auto;font-size:13px;color:var(--muted);transition:transform .15s}
.sidebar-fav-count{font-size:10px;font-weight:600;color:var(--blue-d);background:var(--blue-l);border-radius:9px;padding:0 6px}
.sidebar-fav-item{display:flex;align-items:center;gap:7px;padding:6px 13px 6px 16px;cursor:pointer;color:var(--gray);font-size:12px;transition:background .12s}
.sidebar-fav-item:hover{background:var(--gray-l);color:var(--text)}
.sidebar-fav-item i{font-size:13px;color:#ecb73a;flex-shrink:0}
.sidebar-fav-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-fav-empty{padding:4px 13px 6px 16px;font-size:11px;color:var(--muted)}
.sidebar-footer{margin-top:auto;padding:10px 13px;border-top:.5px solid var(--gray-m)}
.db-info{font-size:10.5px;color:var(--muted);display:flex;align-items:flex-start;gap:5px}
.db-dot{width:7px;height:7px;border-radius:50%;background:var(--green);flex-shrink:0;margin-top:3px}
.db-text strong{color:var(--text);display:block;font-size:11.5px;margin-bottom:1px}

/* ── MAIN ── */
.main{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}
.main-header{background:var(--white);border-bottom:.5px solid var(--gray-m);padding:11px 15px;flex-shrink:0}
.main-header-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}
.main-header-top h2{font-family:'Barlow Condensed',sans-serif;font-size:19px;font-weight:700;letter-spacing:.3px}
.main-header-top h2 span{color:var(--blue)}
.btn-group{display:flex;gap:5px}
.btn{display:inline-flex;align-items:center;gap:5px;padding:6px 11px;border-radius:6px;font-size:11.5px;font-weight:500;cursor:pointer;border:.5px solid transparent;transition:all .13s;font-family:'DM Sans',sans-serif;text-decoration:none}
.btn-primary{background:var(--green);color:#fff;border-color:var(--green-d)}
.btn-primary:hover{background:var(--green-d)}
.btn-outline{background:var(--white);color:var(--gray);border-color:var(--gray-m)}
.btn-outline:hover{background:var(--gray-l)}
.btn-blue{background:var(--blue);color:#fff;border-color:var(--blue-d)}
.btn-blue:hover{background:var(--blue-d)}
.btn-full{width:100%;justify-content:center}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ── FILTERS ── */
.filters{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.filter-group{display:flex;align-items:center;gap:4px}
.filter-label{font-size:10.5px;color:var(--muted);font-weight:500;white-space:nowrap}
.filter-input{font-family:'DM Sans',sans-serif;font-size:12px;color:var(--text);background:var(--gray-l);border:.5px solid var(--gray-m);border-radius:5px;padding:5px 7px;outline:none;transition:border .13s}
.filter-input:focus{border-color:var(--blue);background:var(--white)}
.search-wrap{position:relative}
.search-wrap i{position:absolute;left:6px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:13px;pointer-events:none}
.search-wrap input{padding-left:22px;width:160px}

/* ── STATS ── */
.stats-bar{display:flex;gap:7px;padding:9px 15px;background:var(--gray-l);border-bottom:.5px solid var(--gray-m);flex-shrink:0}
.stat-card{background:var(--white);border:.5px solid var(--gray-m);border-radius:7px;padding:7px 12px;flex:1}
.stat-val{font-size:20px;font-weight:700;font-family:'Barlow Condensed',sans-serif;letter-spacing:.5px;color:var(--text)}
.stat-lbl{font-size:9.5px;color:var(--muted);font-weight:500;text-transform:uppercase;letter-spacing:.5px;margin-top:1px}
.stat-card.green .stat-val{color:var(--green-d)}
.stat-card.blue .stat-val{color:var(--blue)}

/* ── TABLE ── */
.content-area{display:flex;flex:1;overflow:hidden}
.table-wrap{flex:1;overflow-y:auto;min-width:0}
table{width:100%;border-collapse:collapse;font-size:12px}
thead th{background:var(--white);position:sticky;top:0;z-index:1;padding:7px 11px;text-align:left;font-size:9.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;border-bottom:.5px solid var(--gray-m);white-space:nowrap}
thead th[data-sort]:hover{color:var(--blue)}
thead th.sorted{color:var(--blue)}
.sort-caret{font-size:9px}
tbody tr{border-bottom:.5px solid var(--gray-m);cursor:pointer;transition:background .1s}
tbody tr:hover{background:var(--blue-l)}
tbody tr.selected{background:var(--green-l)}
td{padding:7px 11px;color:var(--text);vertical-align:middle;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
td.muted{color:var(--muted)}
.inc-id{font-family:'Barlow Condensed',sans-serif;font-weight:700;color:var(--blue);font-size:13px}

/* ── PILLS ── */
.pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:20px;font-size:9.5px;font-weight:600;white-space:nowrap}
.pill-red{background:var(--red-l);color:var(--red-t)}
.pill-amber{background:var(--amber-l);color:var(--amber-t)}
.pill-green{background:var(--green-l);color:var(--green-d)}
.pill-blue{background:var(--blue-l);color:var(--blue-d)}
.pill-gray{background:var(--gray-l);color:var(--gray)}

/* ── DETAIL PANEL ── */
.detail-panel{width:var(--detail);background:var(--white);border-left:.5px solid var(--gray-m);display:flex;flex-direction:column;flex-shrink:0;overflow:hidden;position:relative}
.detail-resizer{position:absolute;left:0;top:0;bottom:0;width:6px;cursor:col-resize;z-index:5;background:transparent;transition:background .15s}
.detail-resizer:hover,.detail-resizer.dragging{background:var(--blue,#1865b0);opacity:.35}
body.ade-resizing{cursor:col-resize!important}
body.ade-resizing *{user-select:none!important}
body.ade-resizing iframe{pointer-events:none}
/* ── BOOT GATE: nothing renders until the session check answers ── */
body.ade-boot > .topbar, body.ade-boot > .body{visibility:hidden}
body.ade-boot::after{content:"";position:fixed;inset:0;z-index:8900;background:linear-gradient(135deg,#1865b0 0%,#2a7a7a 55%,#399845 100%)}
/* ── SIMPLIFIED DASHBOARD GRID ── */
.dash-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.dash-card{background:var(--white);border:1px solid var(--gray-m,#e2e2e6);border-radius:12px;padding:18px 18px 15px;cursor:pointer;transition:box-shadow .15s,transform .1s,border-color .15s;display:flex;flex-direction:column;gap:4px}
.dash-card:hover{box-shadow:0 6px 18px rgba(24,101,176,.13);border-color:var(--blue);transform:translateY(-1px)}
.dash-card .dc-ico{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:19px;margin-bottom:6px}
.dash-card .dc-count{font-size:24px;font-weight:700;font-family:'Barlow Condensed',sans-serif;color:var(--blue);line-height:1}
.dash-card .dc-label{font-size:13.5px;font-weight:600;color:#222}
.dash-card .dc-sub{font-size:11.5px;color:var(--muted)}
.dash-tools-label{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--muted);margin:20px 0 8px}
.dash-grid-tools .dash-card{flex-direction:row;align-items:center;gap:12px;padding:13px 16px}
.dash-grid-tools .dc-ico{margin-bottom:0;flex-shrink:0}
@media (max-width:700px){
/* ── Wave 3u.1 — MOBILE PHASE 1: app-wide touch & sheet framework ─────── */
.modal-overlay .modal-card{width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh!important;border-radius:0!important}
/* W35C.3 (Frank): the Account pop-up — and every other full-screen modal on a
   phone — closes with a downward swipe. The 30B engine already armed that
   gesture from a layer's header; what was missing was any sign that it was
   there. This is the same grab pill the nav bottom-sheet uses (.sidebar::before),
   drawn on the header so the touch that starts on it is already inside the
   element the engine listens to. Confirmation dialogs are excluded — they are
   small, centred, and their safe action is the explicit button. */
.modal-overlay:not(#adeDialog)>.modal-card>:first-child{position:relative;padding-top:16px!important}
.modal-overlay:not(#adeDialog)>.modal-card>:first-child::after{content:"";position:absolute;top:6px;left:50%;transform:translateX(-50%);width:46px;height:5px;border-radius:3px;background:#d4d8de;pointer-events:none}
.btn{min-height:38px}
.um-mini{padding:6px 10px;min-height:32px}
.filter-input, select.filter-input, input.filter-input{min-height:36px}
.ms-box{min-height:36px}
.topbar-welcome{display:none}
.topbar-app-sub{display:none}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
/* Wave 3u.4 — ONE-HANDED FIELD CONTROLS: big targets, bottom navigation */
.topbar{height:58px!important;gap:8px;padding:0 10px}
.topbar-navtoggle{width:44px;height:44px;font-size:24px}
/* Wave 3u.6 — the module menu is a BOTTOM SHEET on phones: flies UP from the
   bottom (not out from the left), grab handle, big one-handed rows */
.sidebar{position:fixed;top:auto!important;bottom:0;left:0;right:0;width:100%!important;
  max-height:78vh;height:auto;z-index:950!important;border-radius:20px 20px 0 0!important;
  border-right:none;box-shadow:0 -14px 44px rgba(0,0,0,.35)!important;
  margin-left:0!important;opacity:1!important;pointer-events:auto!important;
  transform:translateY(0)!important;transition:transform .26s ease!important;
  overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding-bottom:calc(10px + env(safe-area-inset-bottom))}
body.nav-collapsed .sidebar{transform:translateY(105%)!important}
.sidebar::before{content:"";display:block;width:46px;height:5px;border-radius:3px;background:#d4d8de;margin:9px auto 3px;flex-shrink:0}
#navBackdrop{top:0!important;z-index:940!important}
.topbar-refresh{width:54px!important;height:54px!important;font-size:25px!important;border-radius:14px!important;margin-left:2px}
.topbar-fav-btn{min-height:44px;padding:0 14px;font-size:14px}
/* Wave 3u.6 — Favorites pops CENTERED like Quick Add (was hanging off-screen)
   with real touch sizing; no keyboard auto-open on phones */
#favMenu{position:fixed!important;top:70px;left:50%;right:auto!important;transform:translateX(-50%);
  width:min(92vw,380px)!important;max-height:min(66vh,500px);flex-direction:column;
  z-index:1200;border-radius:14px!important;box-shadow:0 18px 50px rgba(0,0,0,.35)!important}
#favMenu .fav-save-row input{min-height:44px;font-size:16px;padding:6px 12px}
#favMenu .fav-save-row button{min-width:50px;min-height:44px;justify-content:center;font-size:17px}
#favMenu .fav-list{max-height:none;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}
#favMenu .fav-item{padding:14px;gap:12px}
#favMenu .fav-item-name{font-size:14.5px}
#favMenu .fav-item-meta{font-size:11.5px}
#favMenu .fav-item i.fav-ico{font-size:18px}
#favMenu .fav-item-del,#favMenu .fav-item-edit,#favMenu .fav-item-ok{font-size:18px;padding:8px}
.topbar-logo{height:34px}
#brandLogoTop{height:34px!important}
#mobileNav{display:flex!important;position:fixed;left:0;right:0;bottom:0;z-index:900;background:#fff;border-top:1px solid var(--gray-m);box-shadow:0 -4px 18px rgba(0,0,0,.09);padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
#mobileNav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;border:none;background:none;color:var(--muted);font-size:10.5px;font-weight:700;padding:6px 2px;cursor:pointer;border-radius:10px;min-height:52px}
#mobileNav button i{font-size:23px}
#mobileNav button.active{color:var(--blue);background:var(--blue-l,#eef5fc)}
.mnav-cust-row,.mob-acct-row{display:flex!important}
/* Back-to-top arrow rides ABOVE the bottom tray on phones */
.global-scrolltop{bottom:calc(84px + env(safe-area-inset-bottom))!important;right:14px}
#policyScrollTop{bottom:calc(84px + env(safe-area-inset-bottom))!important}
.main{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
.sidebar .nav-item{padding:16px 22px;font-size:16.5px;gap:15px}
.sidebar .nav-item i{font-size:23px}
.sidebar-label{font-size:11.5px;padding:0 22px}
/* Wave 3u.2 — contain the viewport: no more sideways page shift on phones */
html,body{max-width:100vw;overflow-x:hidden}
.main{overflow-x:hidden;min-width:0}
.main-header,.content-area{min-width:0}
.main-header-top h2{font-size:19px;word-break:break-word}
/* Locations: expanded panel stacks to one column on phones */
.locdet-grid{grid-template-columns:1fr!important}
.locdocs-grid{grid-template-columns:1fr!important}
[id^="locexpand-inner-"]{padding:10px 8px 12px!important}
[id^="locexpand-inner-"] .um-mini{white-space:nowrap}
/* W29 mobile sweep: profile rows stack, inputs and mini-toggles reach thumb size */
.ld-row,.lp-row,.comp-dates{grid-template-columns:1fr!important}
[id^="locexpand-inner-"] input[type=text],[id^="locexpand-inner-"] input[type=date],[id^="locexpand-inner-"] input[type=number],[id^="locexpand-inner-"] select{min-height:36px}
.loc-seg{padding:8px 13px!important;font-size:12px!important;min-height:32px}
#locColsPop .um-mini{min-height:32px!important;padding:0 10px!important}
#locColsPop input[type=checkbox]{width:18px;height:18px}
.main-header .btn-group{flex-wrap:wrap}
.stats-bar{overflow-x:auto}

  .dash-grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .dash-card{padding:14px 13px 12px}
  .dash-card .dc-count{font-size:20px}
  .dash-card .dc-label{font-size:12.5px}
  .dash-card .dc-sub{display:none}
}
.detail-header{padding:11px 13px;background:var(--blue);flex-shrink:0}
.detail-header h3{font-family:'Barlow Condensed',sans-serif;font-size:16px;font-weight:700;color:#fff;letter-spacing:.3px}
.detail-header p{font-size:10.5px;color:rgba(255,255,255,.7);margin-top:2px}
.detail-body{padding:12px 13px;flex:1;overflow-y:auto}
.detail-field{margin-bottom:10px}
.detail-field label{font-size:9.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.6px;display:block;margin-bottom:2px}
.detail-field p{font-size:12px;color:var(--text);line-height:1.55}
.detail-divider{height:.5px;background:var(--gray-m);margin:10px 0}
.detail-actions{padding:11px 13px;border-top:.5px solid var(--gray-m);display:flex;flex-direction:column;gap:5px;flex-shrink:0}
.attach-icon{display:inline-flex;align-items:center;gap:3px;color:var(--blue);font-size:11px}
.attach-clickable{cursor:pointer;padding:2px 6px;border-radius:4px;transition:background .15s}
.attach-clickable:hover{background:var(--blue-l)}
.file-item{display:flex;align-items:center;gap:7px;padding:6px 9px;background:var(--gray-l);border-radius:5px;margin-bottom:4px;border:.5px solid var(--gray-m)}
.file-item-link{text-decoration:none;color:var(--text);cursor:pointer;transition:all .13s}
.file-item-link:hover{background:var(--blue-l);border-color:var(--blue)}
.file-dl-icon{margin-left:auto;color:var(--green);font-size:14px}
.file-item-link:hover .file-dl-icon{color:var(--green-d)}
.file-item i{color:var(--blue);font-size:15px;flex-shrink:0}
.file-name{font-size:10.5px;font-weight:500;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.empty-panel{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--muted);gap:8px;padding:20px;text-align:center}
.empty-panel i{font-size:32px;color:var(--gray-m)}
.empty-panel p{font-size:11.5px;line-height:1.5}

/* ── LOADING / EMPTY STATES ── */
.loading-row td{text-align:center;color:var(--muted);padding:32px;font-size:13px}
.spinner{display:inline-block;width:16px;height:16px;border:2px solid var(--gray-m);border-top-color:var(--blue);border-radius:50%;animation:spin .7s linear infinite;vertical-align:middle;margin-right:6px}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── TOAST ── */
.toast{position:fixed;bottom:20px;right:20px;background:var(--text);color:#fff;padding:10px 16px;border-radius:8px;font-size:12px;z-index:9999;opacity:0;transition:opacity .3s;pointer-events:none}
.toast.show{opacity:1}
.toast.success{background:var(--green-d)}
.toast.error{background:var(--red-t)}

.expandable-row{cursor:pointer;transition:background .12s}
.expandable-row:hover{background:var(--blue-l)}
.expand-chevron{font-size:13px;color:var(--blue);transition:transform .18s;display:inline-block;vertical-align:middle}
.expand-content-row td{border-top:none!important}
.expand-content-row table th{background:var(--gray-l);font-size:10px;padding:5px 8px}
.expand-content-row table td{padding:5px 8px}

.nested-sess-row{cursor:pointer;transition:background .1s}
.nested-sess-row:hover{background:var(--blue-l)}
.nested-expand-row td{border-top:none!important}

.ms-box{display:flex;align-items:center;gap:6px;min-width:170px;max-width:240px;padding:6px 10px;border:.5px solid var(--gray-m);border-radius:6px;background:white;cursor:pointer;font-size:12.5px;min-height:32px;flex-wrap:wrap}
.ms-box:hover{border-color:var(--blue)}
.ms-placeholder{color:var(--muted)}
.ms-chip{display:inline-flex;align-items:center;gap:4px;background:var(--blue-l);color:var(--blue);padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}
.ms-chip i{cursor:pointer;font-size:12px}
.ms-chip i:hover{color:var(--red-t)}
.ms-dropdown{position:absolute;top:100%;left:0;margin-top:4px;width:260px;max-height:280px;background:white;border:.5px solid var(--gray-m);border-radius:8px;box-shadow:0 6px 20px rgba(0,0,0,.12);z-index:500;display:flex;flex-direction:column;overflow:hidden}
/* W35F.1 (Frank's screenshot): every ms dropdown's OPEN code sets inline
   display:block, overriding this container's display:flex — so the search
   input fell back to the browser's intrinsic ~175px width and floated inside
   the 260px panel, wearing the global :focus-visible ring across the panel
   edge: the "detached search bar". display:block+width:100% makes the input
   fill the panel under EITHER display mode (fixing all 14 dropdowns in one
   place), and the focus ring draws INSIDE the box (negative offset) so it
   reads as a highlight, not an escapee. */
.ms-search{display:block;width:100%;box-sizing:border-box;border:none;border-bottom:.5px solid var(--gray-m);padding:8px 10px;font-size:12px;outline:none}
.ms-search:focus-visible{outline:2px solid var(--blue);outline-offset:-2px;border-radius:8px 8px 0 0}
.ms-options{overflow-y:auto;max-height:230px}
.ms-option{display:flex;align-items:center;gap:8px;padding:7px 10px;font-size:12px;cursor:pointer}
.ms-option:hover{background:var(--gray-l)}
.ms-option.selected{background:var(--blue-l);color:var(--blue);font-weight:500}
.ms-option i{font-size:14px;width:16px}
.trs-group-header:hover td{background:var(--gray-m)!important}

.dash-loading{grid-column:1/-1;text-align:center;padding:40px;color:var(--muted);font-size:13px}
.dash-stat{background:white;border:.5px solid var(--gray-m);border-radius:12px;padding:20px 22px;transition:all .15s}
.dash-stat.clickable{cursor:pointer}
.dash-stat.clickable:hover{border-color:var(--blue);box-shadow:0 4px 14px rgba(0,0,0,.08);transform:translateY(-1px)}
.dash-stat-icon{width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:12px}
.dash-stat-val{font-size:32px;font-weight:700;line-height:1;font-family:'Barlow Condensed',sans-serif}
.dash-stat-lbl{font-size:12.5px;color:var(--gray);margin-top:6px;font-weight:500}
.dash-stat-sub{font-size:11px;color:var(--muted);margin-top:3px}
.dash-section-title{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--gray);margin:24px 0 12px;display:flex;align-items:center;gap:8px}
.dash-section-title i{color:var(--blue)}
.dash-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:12px}
.dash-stat.compact{padding:14px 16px;border-radius:10px}
.dash-stat.compact .dash-stat-icon{width:34px;height:34px;font-size:18px;margin-bottom:9px;border-radius:9px}
.dash-stat.compact .dash-stat-val{font-size:25px}
.dash-stat.compact .dash-stat-lbl{font-size:11.5px;margin-top:4px}
.dash-stat.compact .dash-stat-sub{font-size:10px}
/* Dashboard body: scrollable main + Policy Manual right rail */
.dash-body{flex:1;display:flex;overflow:hidden;min-height:0}
.dash-main{flex:1;min-width:0;overflow-y:auto}
.dash-rail{width:340px;flex-shrink:0;background:#fff;border-left:1px solid var(--gray-m);display:flex;flex-direction:column;overflow:hidden}
.dash-rail .dash-loading{padding:24px}
.dash-pol{display:flex;flex-direction:column;min-height:0;flex:1}
.dash-pol-head{background:linear-gradient(135deg,var(--blue) 0%,#14538f 100%);color:#fff;padding:16px 18px;flex-shrink:0}
.dash-pol-head h3{font-family:'Barlow Condensed',sans-serif;font-size:19px;font-weight:700;margin:0;display:flex;align-items:center;gap:8px}
.dash-pol-metrics{display:flex;gap:8px;margin-top:12px}
.dash-pol-metric{flex:1;background:rgba(255,255,255,.14);border-radius:8px;padding:8px 10px}
.dash-pol-metric .v{font-size:21px;font-weight:700;font-family:'Barlow Condensed',sans-serif;line-height:1}
.dash-pol-metric .l{font-size:9.5px;opacity:.85;text-transform:uppercase;letter-spacing:.4px;margin-top:3px}
.dash-pol-browse{padding:12px 16px;border-bottom:.5px solid var(--gray-m);flex-shrink:0}
.dash-pol-sub{font-size:10.5px;font-weight:700;color:var(--gray);text-transform:uppercase;letter-spacing:.5px;padding:12px 16px 6px;flex-shrink:0}
.dash-pol-list{flex:1;min-height:0;overflow-y:auto;padding:0 8px 8px}
.dash-pol-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;cursor:pointer;transition:background .12s}
.dash-pol-item:hover{background:var(--blue-l)}
.dash-pol-item .pi-icon{width:30px;height:30px;border-radius:8px;background:var(--blue-l);color:var(--blue);display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0}
.dash-pol-item .pi-name{flex:1;min-width:0;font-size:12.5px;font-weight:500;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dash-pol-item .pi-meta{font-size:10.5px;color:var(--muted);white-space:nowrap}
.dash-pol-item .pi-chev{color:var(--gray-m);font-size:14px}
.dash-pol-item:hover .pi-chev{color:var(--blue)}
/* Stack the rail under the main content on narrower screens */
@media (max-width:1024px){
  .dash-body{flex-direction:column;overflow-y:auto}
  .dash-main{overflow:visible;flex:0 0 auto}
  .dash-rail{width:auto;flex:0 0 auto;border-left:none;border-top:1px solid var(--gray-m)}
  .dash-pol{flex:0 0 auto}
  .dash-pol-list{flex:0 0 auto;max-height:none}
}
#policyDocModalPanel:fullscreen{width:100%;height:100%;max-width:none;border-radius:0}
#policyDocModalPanel:-webkit-full-screen{width:100%;height:100%;max-width:none;border-radius:0}

/* File Preview Panel */
.preview-panel{position:fixed;top:0;right:0;height:100vh;width:0;background:var(--white);border-left:.5px solid var(--gray-m);box-shadow:-8px 0 28px rgba(0,0,0,.16);display:flex;flex-direction:column;z-index:2100;overflow:hidden;transition:width .28s cubic-bezier(.4,0,.2,1)}
.preview-panel.open{width:min(680px,55vw)}
.preview-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:var(--blue);color:white;flex-shrink:0}
.preview-close{background:rgba(255,255,255,.15);border:none;color:white;width:30px;height:30px;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.preview-bulk{background:rgba(255,255,255,.15);border:none;color:white;height:30px;padding:0 10px;border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:600;flex-shrink:0;transition:background .15s}
.preview-bulk:hover{background:rgba(255,255,255,.3)}
.preview-bulk i{font-size:15px}
.preview-close:hover{background:rgba(255,255,255,.28)}
.preview-stage{flex:1;position:relative;display:flex;align-items:center;justify-content:center;background:#525659;overflow:hidden;min-height:0}
.preview-content{width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:auto}
.preview-content img{max-width:100%;max-height:100%;object-fit:contain;display:block}
.preview-content iframe{width:100%;height:100%;border:none;background:white}
.preview-nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.45);border:none;color:white;width:42px;height:42px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:22px;z-index:5;transition:background .15s}
.preview-nav:hover{background:rgba(0,0,0,.7)}
.preview-nav:disabled{opacity:.25;cursor:default}
.preview-nav-prev{left:14px}
.preview-nav-next{right:14px}
.preview-thumbs{display:flex;gap:8px;padding:10px 14px;background:var(--gray-l);border-top:.5px solid var(--gray-m);overflow-x:auto;flex-shrink:0;min-height:74px}
.preview-thumb{flex-shrink:0;width:54px;height:54px;border-radius:6px;border:2px solid transparent;background:white;display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}
.preview-thumb.active{border-color:var(--blue)}
.preview-thumb img{width:100%;height:100%;object-fit:cover}
.preview-thumb .thumb-icon{font-size:22px;color:var(--gray)}
.ob-bar{height:6px;background:var(--gray-l);border-radius:3px;margin-top:6px;overflow:hidden;max-width:420px}
.ob-bar div{height:100%;width:0;background:var(--green,#399845);transition:width .3s}
/* W39a: creation-mode cards. Colors live in the CLASS (the W33.5 rule) so the
   dark override below can win; JS only toggles .sel / .ob-mode-locked. */
.ob-mode-card{text-align:left;padding:12px 14px;border:1.5px solid #d5d5d8;border-radius:9px;background:var(--surface,#fff);cursor:pointer;font-size:12px;display:grid;gap:4px;font-family:inherit}
.ob-mode-card b{font-size:13px;color:var(--text,#222)}
.ob-mode-card span{color:var(--muted);font-size:11.5px;line-height:1.35;font-weight:400}
.ob-mode-card.sel{border-color:var(--green,#399845);box-shadow:0 0 0 2px rgba(57,152,69,.16)}
.ob-mode-locked{opacity:.55;pointer-events:none}
.preview-thumb .thumb-ext{position:absolute;bottom:1px;left:0;right:0;text-align:center;font-size:7.5px;font-weight:700;color:var(--gray);text-transform:uppercase;background:rgba(255,255,255,.85)}
.preview-empty{text-align:center;color:#cfd2d4;padding:40px}
.preview-empty i{font-size:48px;display:block;margin-bottom:14px;opacity:.5}
.file-preview-btn{margin-left:auto;background:none;border:none;color:var(--blue);cursor:pointer;font-size:13px;padding:2px 6px;border-radius:4px}
.file-preview-btn:hover{background:var(--blue-l)}

.preview-context{background:var(--gray-l);border-bottom:.5px solid var(--gray-m);padding:10px 18px;flex-shrink:0;font-size:12px}
.preview-context .pc-row{display:flex;flex-wrap:wrap;gap:14px 22px;margin-bottom:6px}
.preview-context .pc-item{display:flex;flex-direction:column;gap:1px;min-width:0}
.preview-context .pc-label{font-size:9px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);font-weight:600}
.preview-context .pc-val{font-size:12px;color:var(--gray-d,#333);font-weight:500}
.preview-context .pc-what{margin-top:4px;padding-top:6px;border-top:.5px dashed var(--gray-m)}
.preview-context .pc-what .pc-val{font-weight:400;line-height:1.4}
.preview-context .pc-type-pill{display:inline-block;padding:1px 8px;border-radius:10px;font-size:10.5px;font-weight:600}

.sortable-th{cursor:pointer;user-select:none;white-space:nowrap;transition:color .15s}
.sortable-th:hover{color:var(--blue)}
.sort-arrow{font-size:12px;margin-left:3px;opacity:.35;vertical-align:middle}
.sort-arrow.active{opacity:1;color:var(--blue)}
.loc-view-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 14px;font-size:12px;font-weight:500;border:1px solid var(--gray-m);border-radius:999px;background:#fff;color:var(--gray);cursor:pointer;transition:all .12s;font-family:inherit;white-space:nowrap}
.loc-view-btn:hover{border-color:var(--blue);color:var(--blue)}
.loc-view-btn.active{background:var(--blue);border-color:var(--blue);color:#fff}
.loc-view-btn i{font-size:14px}
.policy-cat{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:7px;font-size:12.5px;color:var(--gray);cursor:pointer;margin-bottom:2px;transition:background .12s}
.policy-cat:hover{background:var(--gray-l)}
.policy-cat.active{background:var(--blue-l);color:var(--blue);font-weight:600}
.policy-cat .cat-count{margin-left:auto;font-size:10.5px;color:var(--muted);font-weight:500}
.policy-cat.active .cat-count{color:var(--blue)}
.policy-cat i{font-size:15px}
.policy-card{display:flex;align-items:center;gap:12px;padding:11px 14px;border:1px solid var(--gray-m);border-radius:9px;margin-bottom:8px;transition:box-shadow .12s,border-color .12s}
.policy-card:hover{border-color:var(--blue);box-shadow:0 2px 10px rgba(0,0,0,.05)}
.policy-doc-icon{font-size:22px;color:var(--blue);flex-shrink:0}
.policy-act{display:inline-flex;align-items:center;gap:4px;padding:5px 11px;font-size:11.5px;border:1px solid var(--gray-m);border-radius:6px;background:#fff;color:var(--gray);cursor:pointer;white-space:nowrap}
.policy-act:hover{border-color:var(--blue);color:var(--blue)}
.policy-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:.5px solid var(--gray-m);cursor:pointer;transition:background .1s}
.policy-row:hover{background:var(--gray-l)}
.policy-row.sel{background:var(--blue-l)}
.policy-row .pr-icon{font-size:18px;color:var(--blue);flex-shrink:0}
.policy-row .pr-info{flex:1;min-width:0}
.policy-row .pr-name{font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.policy-row .pr-meta{font-size:10.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px}
.policy-row .pr-acts{display:flex;gap:2px;flex-shrink:0;opacity:0;transition:opacity .1s}
.policy-row:hover .pr-acts,.policy-row.sel .pr-acts{opacity:1}
.policy-row .pr-acts i{font-size:15px;color:var(--muted);padding:4px;border-radius:5px;cursor:pointer}
.policy-row .pr-acts i:hover{background:#fff;color:var(--blue)}
.policy-row .pr-check{flex-shrink:0;width:15px;height:15px;cursor:pointer;accent-color:var(--blue)}
.pane-resizer{flex:0 0 6px;cursor:col-resize;background:var(--gray-m);position:relative;transition:background .12s}
.pane-resizer:hover,.pane-resizer.dragging{background:var(--blue)}
.pane-resizer::after{content:"";position:absolute;inset:0 -3px}
.policy-prev-close{display:none}
.pp-ctrl{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:8px;border:1px solid var(--gray-m);background:rgba(255,255,255,.95);color:var(--text);cursor:pointer;font-size:16px;box-shadow:0 2px 8px rgba(0,0,0,.16);transition:background .12s,color .12s}
.pp-ctrl:hover{background:var(--blue);color:#fff;border-color:var(--blue)}
.pp-ctrl.policy-prev-close{display:none}
.eqpv-panel{position:fixed;top:0;right:0;height:100vh;width:0;background:var(--white);border-left:.5px solid var(--gray-m);box-shadow:-8px 0 28px rgba(0,0,0,.16);display:flex;flex-direction:column;z-index:2300;overflow:hidden;transition:width .28s cubic-bezier(.4,0,.2,1)}
.eqpv-panel.open{width:min(820px,60vw)}
.eqpv-head{display:flex;align-items:center;gap:10px;padding:12px 16px;background:var(--blue);color:#fff;flex-shrink:0}
.eqpv-ic{font-size:18px;flex-shrink:0}
.eqpv-title{font-weight:700;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eqpv-sub{font-size:11.5px;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.eqpv-x{margin-left:auto;background:rgba(255,255,255,.15);border:none;color:#fff;width:30px;height:30px;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.eqpv-x:hover{background:rgba(255,255,255,.28)}
.eqpv-stage{flex:1;position:relative;background:#525659;overflow:hidden;min-height:0}
.eqpv-ctrls{position:absolute;top:10px;right:14px;z-index:6;display:flex;gap:6px}
.eqpv-stage iframe{width:100%;height:100%;border:none;background:#525659;display:block}
.eqpv-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:10px;color:#fff;font-size:13px;background:#525659;z-index:4}
@media (max-width:760px){.eqpv-panel.open{width:100vw}}
.pp-fullscreen{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;max-width:none!important;max-height:none!important;z-index:2000!important;border:0!important;margin:0!important;border-radius:0!important}
.fac-card{display:flex;align-items:center;gap:8px;min-width:0;font-size:12.5px;padding:6px 10px;border:1px solid var(--gray-m);border-radius:7px;transition:border-color .1s,background .1s}
.fac-card:hover{border-color:var(--blue);background:var(--blue-l)}
.fac-card input[type=checkbox]{flex-shrink:0;width:15px;height:15px;cursor:pointer;accent-color:var(--blue)}
.fac-card .fac-body{flex:1;min-width:0;display:flex;align-items:center;gap:8px;cursor:pointer}
.fac-card.fac-flash{animation:facFlash 1.6s ease}
.fac-state-hd{font-size:11px;font-weight:700;color:var(--blue);text-transform:uppercase;letter-spacing:.5px;margin:16px 0 6px}
.fac-state-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 18px;min-width:0}
@keyframes facFlash{0%{background:var(--blue);border-color:var(--blue)}30%{background:var(--blue-l)}100%{background:transparent}}

/* ===== COURSE FILES LIBRARY ===== */
.cf-section{margin-top:0}
.cf-head{display:flex;align-items:flex-start;gap:10px;flex-wrap:wrap;margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--gray-m)}
.cf-head-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.cf-title{font-size:10.5px;font-weight:700;color:var(--blue);text-transform:uppercase;letter-spacing:.6px}
.cf-title i{margin-right:5px}
.cf-course{font-size:17px;font-weight:700;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'Barlow Condensed',sans-serif;line-height:1.1}
.cf-headright{display:flex;align-items:center;gap:10px;flex-shrink:0}
.cf-count{font-size:12px;color:var(--muted);white-space:nowrap;font-weight:600}
.cf-selhint{font-size:11px;color:var(--blue);font-weight:600;white-space:nowrap}
.cf-btn{padding:5px 11px;font-size:11.5px}
.cf-actbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.cf-actcluster{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-left:auto}
.cf-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.cf-search{position:relative;flex:1;min-width:160px;max-width:340px}
.cf-search>i{position:absolute;left:9px;top:50%;transform:translateY(-50%);font-size:13px;color:var(--muted)}
.cf-search input{width:100%;font-size:12px;padding:6px 9px 6px 28px;border:1px solid var(--gray-m);border-radius:7px}
.cf-date{font-size:11.5px;padding:5px 7px;border:1px solid var(--gray-m);border-radius:7px}
.cf-sep{font-size:10.5px;color:var(--muted)}
.cf-fltbtn{display:none}
.cf-daterow{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cf-tablewrap{max-width:none;max-height:520px;overflow:auto}
.cf-selallrow{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.cf-filerow:hover{background:var(--blue-l)!important}

/* Class-detail tabs (Sessions / Course Files) */
.cd-tabs{display:flex;gap:2px;margin:0 0 14px;border-bottom:1px solid var(--gray-m)}
.cd-tab{display:inline-flex;align-items:center;gap:7px;padding:9px 16px;font-size:13px;font-weight:600;color:var(--muted);background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;font-family:'Barlow Condensed',sans-serif;letter-spacing:.3px;transition:color .12s,border-color .12s;margin-bottom:-1px}
.cd-tab:hover{color:var(--text)}
.cd-tab.active{color:var(--blue);border-bottom-color:var(--blue)}
.cd-tab>i{font-size:16px}
.cd-tabcount{font-size:10.5px;font-weight:700;background:var(--gray-l);color:var(--gray);padding:1px 8px;border-radius:20px;min-width:16px;text-align:center}
.cd-tab.active .cd-tabcount{background:var(--blue-l);color:var(--blue)}

/* ===== POLICY "PROGRAMS" NAV (mobile graphical filter) ===== */
.pgm-nav{display:none}
.pgm-chip{flex:0 0 auto;display:flex;align-items:center;gap:7px;padding:8px 12px;background:#fff;border:1px solid var(--gray-m);border-radius:11px;cursor:pointer;white-space:nowrap;font-size:12.5px;font-weight:500;color:var(--text);transition:border-color .12s,background .12s,color .12s;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.pgm-chip:active{transform:scale(.97)}
.pgm-chip.active{background:var(--blue);border-color:var(--blue);color:#fff}
.pgm-chip>i{font-size:15px;color:var(--blue)}
.pgm-chip.active>i{color:#fff}
.pgm-count{font-size:10.5px;font-weight:700;background:var(--blue-l);color:var(--blue);padding:1px 7px;border-radius:20px;min-width:16px;text-align:center}
.pgm-chip.active .pgm-count,.pgm-row.active .pgm-count{background:rgba(255,255,255,.25);color:#fff}

/* ===== MOBILE FILTER / KPI TOGGLES ===== */
.mobile-hdr-toggles{display:none;gap:8px;margin-top:4px;flex-wrap:wrap}
.mhx-btn{padding:6px 12px;font-size:12px}
.mhx-btn.mhx-on{background:var(--blue);border-color:var(--blue);color:#fff}
.mhx-chev{font-size:13px;transition:transform .2s ease}

/* ===== INCIDENTS MOBILE ACCORDION ===== */
.inc-chev{display:none}
.inc-expand-row{display:none}
@media (min-width:861px){ .inc-expand-row{display:none!important} }

/* ===== RESPONSIVE / MOBILE ===== */
#navBackdrop{display:none}
@media (max-width: 860px){
  .topbar{padding:0 8px;gap:7px;height:48px}
  .topbar-logo{display:none!important}   /* Wave 30A: the circle icon replaces the wordmark on phones */
  .topbar-app,.topbar-divider,.topbar-welcome,.topbar-conn,.topbar-badge{display:none!important}
  .topbar-status span{display:none}
  #fullscreenBtn{display:none!important}
  .client-select{position:relative;padding:5px 8px;max-width:none;min-width:0;overflow:visible;gap:3px}
  .client-select>i{font-size:17px;color:#fff!important}
  .client-select::after{content:"";width:0;height:0;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid rgba(255,255,255,.85);pointer-events:none}
  .client-select select{position:absolute;inset:0;width:100%;height:100%;opacity:0;font-size:16px;cursor:pointer}
  .topbar-fav-btn{font-size:0!important;padding:6px 8px;gap:0}
  .topbar-fav-btn i{font-size:15px}
  .topbar-fav-menu{right:0;left:auto;width:min(320px,calc(100vw - 20px))}
  .sidebar{position:fixed;top:48px;left:0;bottom:0;z-index:60;width:min(338px,86vw);
    box-shadow:2px 0 22px rgba(0,0,0,.28);transform:translateX(0);transition:transform .24s ease;
    margin-left:0!important;opacity:1!important;pointer-events:auto!important;background:var(--white);
    overflow-y:auto;-webkit-overflow-scrolling:touch}
  body.nav-collapsed .sidebar{transform:translateX(-100%)}
  .topbar-navtoggle{width:40px;height:40px;font-size:23px}
  .sidebar-section{padding:8px 0}
  .sidebar-label{font-size:11px;padding:0 20px;margin-bottom:6px}
  .nav-item{padding:14px 20px;font-size:16px;gap:15px;border-left-width:4px}
  .nav-item i{font-size:22px}
  .nav-badge{font-size:12.5px;padding:3px 10px;border-radius:13px}
  #nav-trsearch,#nav-empreports{padding-left:54px!important;font-size:15px!important}
  #nav-trsearch i,#nav-empreports i{font-size:19px}
  .sidebar-divider{margin:6px 0}
  .sidebar-fav-header{padding:8px 20px;margin-bottom:4px}
  .sidebar-fav-header .sfh-chev{font-size:19px}
  .sidebar-fav-count{font-size:12px;padding:1px 9px}
  .sidebar-fav-item{padding:13px 20px 13px 28px;font-size:15px;gap:13px}
  .sidebar-fav-item i{font-size:18px}
  .sidebar-fav-empty{padding:8px 20px 8px 28px;font-size:13px}
  .sidebar-footer{padding:16px 20px}
  .db-info{font-size:12px;gap:7px}
  #navBackdrop{position:fixed;top:48px;left:0;right:0;bottom:0;background:rgba(0,0,0,.4);z-index:55}
  body:not(.nav-collapsed) #navBackdrop{display:block}
  .main{width:100%;min-width:0}
  .main-header{padding:9px 11px}
  .main-header-top{flex-wrap:wrap;gap:8px;margin-bottom:0}
  .main-header-top h2{font-size:19px}
  .filters{gap:6px}
  /* Generic: hide non-essential table columns on phones */
  .col-sm-hide{display:none!important}
  /* Document preview panel goes full-screen on phones */
  .preview-panel.open{width:100vw}
  /* "Back to ..." buttons collapse to a compact icon to save space */
  .back-btn .back-lbl{display:none}
  .back-btn{padding:8px 11px!important}
  .back-btn i{font-size:18px;margin:0}
  /* Collapsible filters + KPIs behind header toggle buttons */
  .mobile-hdr-toggles{display:flex}
  .main-header .filters{overflow:hidden;max-height:0;opacity:0;margin-top:0;transition:max-height .28s ease,opacity .2s ease,margin-top .2s ease}
  .main-header.flt-open .filters{max-height:2000px;opacity:1;margin-top:10px}
  .stats-bar{overflow:hidden;max-height:0;opacity:0;padding-top:0;padding-bottom:0;transition:max-height .28s ease,opacity .2s ease,padding .2s ease}
  .stats-bar.kpi-open{max-height:600px;opacity:1;padding-top:9px;padding-bottom:9px}
  #policyPanes{flex-direction:column;overflow:auto}
  #policyPanes .pane-resizer{display:none}
  #policyCategories{display:none!important}
  /* Programs filter: vertical, expandable/collapsible (thumb-friendly) */
  .pgm-nav{display:block;padding:10px 12px;border-bottom:1px solid var(--gray-m);background:var(--gray-l);flex:0 0 auto}
  .pgm-vtoggle{display:flex;align-items:center;gap:10px;width:100%;padding:13px 14px;background:#fff;border:1px solid var(--gray-m);border-radius:11px;font-weight:600;font-size:14.5px;color:var(--text);cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.05);text-align:left}
  .pgm-vtoggle:active{transform:scale(.99)}
  .pgm-vtoggle>i:first-child{font-size:19px;color:var(--blue);flex-shrink:0}
  .pgm-vtoggle-lbl{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .pgm-vchev{font-size:19px;color:var(--muted);transition:transform .22s ease;flex-shrink:0}
  .pgm-nav.pgm-open .pgm-vchev{transform:rotate(180deg)}
  .pgm-vlist{display:flex;flex-direction:column;gap:7px;max-height:0;overflow:hidden;opacity:0;
    transition:max-height .26s ease,opacity .2s ease,margin-top .26s ease}
  .pgm-nav.pgm-open .pgm-vlist{max-height:62vh;overflow-y:auto;-webkit-overflow-scrolling:touch;opacity:1;margin-top:9px}
  .pgm-row{display:flex;align-items:center;gap:11px;padding:14px;background:#fff;border:1px solid var(--gray-m);border-radius:10px;font-weight:500;font-size:14.5px;color:var(--text);cursor:pointer}
  .pgm-row:active{transform:scale(.99)}
  .pgm-row.active{background:var(--blue);border-color:var(--blue);color:#fff}
  .pgm-row>i{font-size:19px;color:var(--blue);flex-shrink:0}
  .pgm-row.active>i{color:#fff}
  .pgm-row-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* Full-height scrolling document list; preview becomes an inline slide-down */
  #policyListPane{width:auto!important;max-height:none;flex:1;border-bottom:none}
  #policyPanes>#policyPreviewPane{display:none!important}
  .policy-acc{max-height:0;overflow:hidden;opacity:0;transition:max-height .3s ease,opacity .2s ease;background:var(--gray-l)}
  .policy-acc.open{max-height:76vh;opacity:1}
  .policy-acc>#policyPreviewPane{display:flex!important;flex:none!important;width:100%!important;min-width:0!important;height:72vh;max-height:72vh;border-top:1px solid var(--gray-m)}
  /* Compact, touch-friendly preview controls inside the slide-down */
  .pp-ctrl{width:40px;height:40px;font-size:18px}
  .policy-prev-close{display:inline-flex!important}
  /* Location picker: single vertical column grouped by state, easy thumb scroll */
  .fac-picker{padding:14px 14px!important}
  .fac-state-grid{grid-template-columns:1fr!important;gap:8px}
  .fac-state-hd{position:sticky;top:0;z-index:2;background:#fff;margin:10px 0 7px;padding:7px 2px;font-size:12px;border-bottom:1px solid var(--gray-m)}
  .fac-card{padding:12px 12px;font-size:14px}
  .fac-card input[type=checkbox]{width:18px;height:18px}
  .fac-card .fac-body i{font-size:17px}
  .modal-body{max-height:75vh}
  /* Policy doc viewer opens straight to a full-screen view on mobile */
  #policyDocModal{padding:0}
  #policyDocModalPanel{width:100%!important;height:100%!important;max-width:none!important;border-radius:0!important}
  #policyDocModalFsBtn{display:none}
  #transcriptModal>div{width:96%!important}
  /* Course Files library on mobile */
  .cf-head{flex-direction:column;gap:6px}
  .cf-actbar{gap:6px}
  .cf-actbar .cf-selall-btn{flex:1;justify-content:center;min-width:0}
  .cf-actcluster{width:100%;margin-left:0;gap:6px}
  .cf-actcluster .cf-btn{flex:1;justify-content:center;min-width:0;padding:10px 0}
  .cf-actcluster .cf-btn i{font-size:18px;margin:0}
  .cf-iconbtn .cf-lbl{display:none}
  /* Filters toggle button (mobile only) + collapsible toolbar */
  .cf-fltbtn{display:inline-flex}
  .cf-fltbtn.cf-flt-on{background:var(--blue);color:#fff;border-color:var(--blue)}
  .cf-toolbar{flex-direction:column;align-items:stretch;gap:9px;max-height:0;opacity:0;overflow:hidden;
    margin-bottom:0;transition:max-height .22s ease,opacity .18s ease,margin-bottom .22s ease}
  .cf-toolbar.cf-open{max-height:340px;opacity:1;margin-bottom:10px}
  .cf-search{max-width:none;flex-basis:auto;order:-1}
  .cf-search input{font-size:14px;padding:9px 10px 9px 30px}
  .cf-search>i{font-size:14px;left:10px}
  .cf-daterow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;order:1}
  .cf-date{flex:1;min-width:0;font-size:13px;padding:8px 8px}
  .cf-toolbar .cf-selall-btn{order:2}
  .cf-toolbar .cf-btn{padding:8px 12px;font-size:13px;justify-content:center}
  .cf-tablewrap{max-width:none}
  .cf-col-type{display:none}
  /* Class-detail action buttons → compact icon-only on mobile */
  .cd-iconbtn .cdbtn-lbl{display:none}
  .cd-iconbtn{padding:8px 12px!important}
  .cd-iconbtn i{font-size:18px;margin:0}
  /* Incidents: drop the side detail panel; rows expand inline as an accordion */
  #module-incidents .detail-panel{display:none}
  #module-incidents .table-wrap{flex:1 1 100%;width:100%}
  #module-incidents .inc-hide-mobile{display:none}
  .inc-chev{display:inline-block;font-size:13px;color:var(--blue);transition:transform .18s ease;margin-right:4px;vertical-align:middle}
  .inc-expand-row>td{padding:0;background:var(--blue-l)}
  .inc-acc{border-top:2px solid var(--blue)}
  .inc-acc-head{padding:12px 14px;background:linear-gradient(135deg,var(--blue) 0%,#14538f 100%);color:#fff}
  .inc-acc-title{font-family:'Barlow Condensed',sans-serif;font-size:17px;font-weight:700;line-height:1.1}
  .inc-acc-sub{font-size:11.5px;opacity:.85;margin-top:2px}
  .inc-acc-body{padding:12px 14px;background:#fff}
  .inc-acc-actions{display:flex;flex-direction:column;gap:8px;padding:12px 14px;background:#fff;border-top:.5px solid var(--gray-m)}
}
@media (max-width: 560px){
  .btn{padding:6px 9px;font-size:11.5px}
  .main-header-top .btn-group{flex-wrap:wrap}
  .dash-stat.compact{padding:12px 13px}
}
/* Per-location attached files (Policy Manual) */
#policyFacFilesWrap{margin-top:8px;border-top:2px dashed #c9ced6;padding-top:18px}
.polfac-head{display:flex;align-items:center;gap:7px;font-size:13.5px;font-weight:700;color:var(--text);margin-bottom:10px}
.polfac-head .ti{color:var(--blue)}
.polfac-count{background:var(--blue-l);color:var(--blue);font-size:11px;font-weight:700;padding:1px 9px;border-radius:11px}
.polfac-toolbar{display:flex;gap:8px;align-items:center;margin-bottom:8px;flex-wrap:wrap}
.polfac-search{display:flex;align-items:center;gap:6px;flex:1;min-width:150px;background:var(--gray-l);border:1px solid var(--gray-m);border-radius:7px;padding:5px 9px}
.polfac-search .ti{color:var(--muted);font-size:14px}
.polfac-search input{border:0;background:transparent;outline:none;font-size:12.5px;width:100%;color:var(--text)}
.polfac-sort{border:1px solid var(--gray-m);border-radius:7px;padding:5px 8px;font-size:12px;background:#fff;color:var(--text)}
.polfac-selrow{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px;flex-wrap:wrap}
.polfac-selall{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);cursor:pointer;user-select:none}
.polfac-bulk{display:flex;align-items:center;gap:6px}
.polfac-selcount{font-size:11px;color:var(--blue);font-weight:600}
.polfac-list{max-height:360px;overflow-y:auto;border:1px solid var(--gray-m);border-radius:8px}
.polfac-row{display:flex;align-items:center;gap:9px;padding:7px 10px;border-bottom:.5px solid var(--gray-m);cursor:pointer;font-size:12.5px;transition:background .12s}
.polfac-row:last-child{border-bottom:0}
.polfac-row:hover{background:var(--blue-l)}
.polfac-row.sel{background:#eaf3fd}
.polfac-cb{display:flex;align-items:center}
.polfac-ic{color:var(--blue);font-size:17px;flex-shrink:0}
.polfac-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-weight:500}
.polfac-meta{color:var(--muted);font-size:11px;flex-shrink:0;text-align:right}
.polfac-ext{width:42px}
.polfac-size{width:62px}
.polfac-date{width:92px}
.polfac-dl{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:3px 5px;border-radius:5px;flex-shrink:0;font-size:15px}
.polfac-dl:hover{background:var(--blue);color:#fff}
.fac-filebadge{display:inline-flex;align-items:center;gap:3px;background:var(--blue-l);color:var(--blue);font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:10px;flex-shrink:0}
.fac-filebadge .ti{font-size:11px}
.fac-card.has-files{border-color:#bcd8f5}
/* Policy Manual: view toggle + folder explorer */
.pview-toggle{display:inline-flex;border:1px solid var(--gray-m);border-radius:8px;overflow:hidden;flex-shrink:0}
.pview-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:30px;border:0;background:var(--white);color:var(--muted);cursor:pointer;font-size:16px;transition:background .12s,color .12s}
.pview-btn+.pview-btn{border-left:1px solid var(--gray-m)}
.pview-btn.active{background:var(--blue);color:#fff}
.pview-btn:not(.active):hover{background:var(--gray-l);color:var(--text)}
.pfx-head{display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:700;color:var(--text);padding:12px 16px;border-bottom:1px solid var(--gray-m);background:var(--white);flex-shrink:0}
.pfx-head .ti{color:var(--blue)}
.pfx-count{background:var(--blue-l);color:var(--blue);font-size:11px;font-weight:700;padding:1px 9px;border-radius:11px}
.pfx-folderttl{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:700;color:var(--text);min-width:0;overflow:hidden}
.pfx-folderttl span.pfx-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pfx-scroll{flex:1;overflow-y:auto;padding:12px 14px}
.pfx-foldergrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(210px,100%),1fr));gap:12px}
.pfx-folder{display:flex;align-items:center;gap:12px;padding:15px 14px;border:1px solid var(--gray-m);border-radius:10px;cursor:pointer;background:var(--white);transition:border-color .12s,box-shadow .12s,background .12s}
.pfx-folder:hover{border-color:var(--blue);background:var(--blue-l);box-shadow:0 2px 10px rgba(0,0,0,.06)}
.pfx-fic{font-size:28px;color:var(--blue);flex-shrink:0}
.pfx-fbody{flex:1;min-width:0}
.pfx-fname{font-size:13.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pfx-fcount{font-size:11.5px;color:var(--muted);margin-top:2px}
.pfx-fchev{color:var(--muted);font-size:16px;flex-shrink:0}
.pfx-selrow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 16px;border-bottom:1px solid var(--gray-m);background:var(--white);flex-shrink:0}
.pfx-selall{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);cursor:pointer;user-select:none}
.pfx-bulk{display:flex;align-items:center;gap:6px}
.pfx-selcount{font-size:11.5px;font-weight:700;color:var(--blue);white-space:nowrap}
.pfx-empty{padding:30px;text-align:center;color:var(--muted);font-size:12.5px}
@media (max-width:860px){.pview-toggle{display:none}}
/* Equipment module */
.eq-rail-head{padding:10px 12px;border-bottom:1px solid var(--gray-m);flex-shrink:0;background:var(--white)}
.eq-search{display:flex;align-items:center;gap:6px;background:var(--gray-l);border:1px solid var(--gray-m);border-radius:7px;padding:6px 9px}
.eq-search .ti{color:var(--muted);font-size:14px}
.eq-search input{border:0;background:transparent;outline:none;font-size:12.5px;width:100%;color:var(--text)}
.eq-rail-list{flex:1;overflow-y:auto}
.eq-loc{display:flex;align-items:center;gap:9px;padding:9px 12px;border-bottom:.5px solid var(--gray-m);cursor:pointer;transition:background .12s}
.eq-loc:hover{background:var(--blue-l)}
.eq-loc.eq-loc-sel{background:#eaf3fd;border-left:3px solid var(--blue);padding-left:9px}
.eq-loc-name{font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eq-loc-sub{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eq-loc-count{background:var(--gray-l);color:var(--gray);font-size:11px;font-weight:700;padding:1px 8px;border-radius:10px;flex-shrink:0}
.eq-loc.eq-loc-sel .eq-loc-count{background:var(--blue);color:#fff}
.eq-list-head{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;color:var(--text);padding:13px 18px;background:var(--white);border-bottom:1px solid var(--gray-m);position:sticky;top:0;z-index:2}
.eq-list-head .ti{color:var(--blue)}
.eq-hcount{background:var(--blue-l);color:var(--blue);font-size:11px;font-weight:700;padding:1px 9px;border-radius:11px}
.eq-list-scroll{padding:12px 16px}
.eq-type-hd{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:var(--blue);text-transform:uppercase;letter-spacing:.5px;margin:14px 0 6px}
.eq-type-hd:first-child{margin-top:0}
.eq-type-count{background:var(--blue-l);color:var(--blue);font-size:10px;font-weight:700;padding:0 7px;border-radius:9px}
.eq-item{border:1px solid var(--gray-m);border-radius:8px;margin-bottom:6px;background:var(--white);overflow:hidden}
.eq-item.open{border-color:#bcd8f5}
.eq-item-active{border-color:var(--blue);box-shadow:0 0 0 1px var(--blue) inset}
.eq-item-active .eq-item-row{background:var(--blue-l)}
.eq-item-row{display:flex;align-items:center;gap:10px;padding:9px 12px;cursor:pointer;transition:background .12s}
.eq-item-row:hover{background:var(--blue-l)}
.eq-selck{width:15px;height:15px;flex-shrink:0;cursor:pointer;accent-color:var(--blue)}
.eq-selbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 16px;background:var(--blue-l);border-bottom:1px solid var(--gray-m)}
.eq-selbar .eq-selcount{font-size:12.5px;font-weight:700;color:var(--blue);display:flex;align-items:center;gap:6px}
.eq-selbar .eq-selcount .ti{font-size:16px}
.eq-selbar-spacer{margin-left:auto}
.eq-selbtn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:1px solid var(--gray-m);border-radius:6px;background:var(--white);color:var(--gray);cursor:pointer;font-size:12px;font-weight:600}
.eq-selbtn:hover{border-color:var(--blue);color:var(--blue)}
.eq-selbtn.primary{background:var(--green);border-color:var(--green);color:#fff}
.eq-selbtn.primary:hover{background:var(--green-d,#256528);border-color:var(--green-d,#256528);color:#fff}
.eq-selbtn .ti{font-size:15px}
.eq-rep-type{display:flex;gap:10px;margin:2px 0 4px}
.eq-rep-opt{flex:1;border:1.5px solid var(--gray-m);border-radius:9px;padding:10px 12px;cursor:pointer;transition:border-color .12s,background .12s}
.eq-rep-opt:hover{border-color:var(--blue)}
.eq-rep-opt.active{border-color:var(--green);background:var(--green-l)}
.eq-rep-opt .eq-rep-t{font-size:13px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:7px}
.eq-rep-opt .eq-rep-d{font-size:11px;color:var(--muted);margin-top:3px;line-height:1.35}
.eq-xl-note{font-weight:400;color:var(--muted);font-size:11px;margin-left:8px}
.eq-xl-seg{display:flex;gap:8px}
.eq-xl-opt{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;border:1.5px solid var(--gray-m);border-radius:9px;padding:9px 10px;cursor:pointer;background:var(--white);font-size:12.5px;font-weight:600;color:var(--gray);transition:border-color .12s,background .12s,color .12s}
.eq-xl-opt:hover{border-color:var(--blue)}
.eq-xl-opt.active{border-color:var(--green);background:var(--green-l);color:var(--text)}
.eq-xl-sublabel{font-size:11px;color:var(--muted);font-weight:600;margin:0 0 5px}
.eq-xl-hint{font-size:11px;color:var(--muted);margin-top:6px;line-height:1.35}
.eq-filter-banner{display:none;align-items:center;gap:9px;flex-wrap:wrap;padding:9px 16px;background:var(--blue-l);border-bottom:1px solid var(--gray-m);border-left:3px solid var(--blue)}
.eq-fb-ic{color:var(--blue);font-size:17px;flex-shrink:0}
.eq-fb-lead{font-size:12.5px;color:var(--text);font-weight:600;flex-shrink:0}
.eq-fb-lead b{color:var(--blue)}
.eq-fb-chips{display:flex;align-items:center;gap:6px;flex-wrap:wrap;flex:1;min-width:0}
.eq-fchip{display:inline-flex;align-items:center;gap:4px;background:var(--white);border:1px solid var(--blue);color:var(--blue);border-radius:14px;padding:3px 4px 3px 10px;font-size:11.5px;font-weight:600;line-height:1.2;max-width:100%}
.eq-fchip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eq-fchip-x{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border:none;border-radius:50%;background:transparent;color:var(--blue);cursor:pointer;font-size:12px;flex-shrink:0;padding:0}
.eq-fchip-x:hover{background:var(--blue);color:#fff}
.eq-fb-clear{margin-left:auto;border:none;background:transparent;color:var(--muted);cursor:pointer;font-size:12px;font-weight:600;text-decoration:underline;flex-shrink:0}
.eq-fb-clear:hover{color:var(--blue)}
.eq-item-ic{color:var(--blue);font-size:17px;flex-shrink:0}
.eq-item-name{font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eq-item-sub{font-size:11px;color:var(--muted);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eq-item-chev{color:var(--muted);font-size:15px;flex-shrink:0}
.eq-crit{display:inline-block;background:#fde8e8;color:#c0392b;font-size:9.5px;font-weight:700;padding:1px 7px;border-radius:9px;text-transform:uppercase;letter-spacing:.4px;vertical-align:middle;margin-left:4px}
.eq-detail{padding:10px 14px 12px 40px;border-top:1px dashed var(--gray-m);background:var(--gray-l)}
/* ── Equipment split: list pane + resizable side panel ── */
.eq-split{flex:1;display:flex;min-height:0;overflow:hidden;background:var(--gray-l)}
.eq-listpane{flex:1;min-width:0;overflow-y:auto;background:var(--gray-l)}
.eq-resizer{width:6px;flex-shrink:0;cursor:col-resize;background:var(--gray-m);position:relative;transition:background .12s}
.eq-resizer:hover,.eq-resizer.dragging{background:var(--blue)}
.eq-resizer::after{content:"";position:absolute;top:50%;left:1px;width:4px;height:34px;margin-top:-17px;border-left:2px dotted rgba(255,255,255,.7);border-right:2px dotted rgba(255,255,255,.7)}
.eq-sidepanel{width:580px;flex-shrink:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;background:var(--white);box-shadow:-6px 0 20px rgba(20,40,60,.08);display:flex;flex-direction:column}
.eq-sp-top{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--gray-m);position:sticky;top:0;background:var(--white);z-index:3}
.eq-sp-nav{display:flex;align-items:center;gap:6px}
.eq-sp-navb{width:30px;height:30px;display:flex;align-items:center;justify-content:center;border:1px solid var(--gray-m);border-radius:7px;background:var(--white);color:var(--gray);cursor:pointer;font-size:16px}
.eq-sp-navb:hover:not([disabled]){border-color:var(--blue);color:var(--blue);background:var(--blue-l)}
.eq-sp-navb[disabled]{opacity:.4;cursor:default}
.eq-sp-pos{font-size:12px;font-weight:600;color:var(--muted);min-width:64px;text-align:center}
.eq-sp-ctx{display:flex;gap:4px;margin-left:4px}
.eq-sp-ctxb{font-size:11px;font-weight:600;color:var(--gray);border:1px solid var(--gray-m);background:var(--white);border-radius:14px;padding:3px 10px;cursor:pointer}
.eq-sp-ctxb.active{border-color:var(--green);background:var(--green-l);color:var(--text)}
.eq-sp-close{margin-left:auto;width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:none;border-radius:7px;background:transparent;color:var(--muted);cursor:pointer;font-size:19px}
.eq-sp-close:hover{background:var(--gray-l);color:var(--text)}
.eq-sp-head{padding:14px 16px 10px}
.eq-sp-name{font-size:18px;font-weight:700;color:var(--text);line-height:1.25}
.eq-sp-meta{font-size:12.5px;color:var(--muted);margin-top:3px}
.eq-sp-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 12px;border-bottom:1px solid var(--gray-l)}
.eq-sp-body{padding:6px 16px 24px;flex:1}
@media (max-width:900px){
  .eq-resizer{display:none!important}
  .eq-sidepanel{position:fixed;top:0;right:0;bottom:0;width:100%!important;max-width:100%;z-index:140;box-shadow:none}
}
.eq-dfield{display:flex;gap:10px;padding:3px 0;font-size:12px}
.eq-dlbl{flex:0 0 92px;color:var(--muted);font-weight:600}
.eq-dval{flex:1;min-width:0;color:var(--text);white-space:pre-wrap;word-break:break-word}
.eq-railbtn{flex-shrink:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border:1px solid var(--gray-m);border-radius:6px;background:var(--white);color:var(--gray);cursor:pointer;font-size:16px}
.eq-railbtn:hover{border-color:var(--blue);color:var(--blue);background:var(--blue-l)}
.eq-railgroup{display:flex;align-items:center;gap:4px}
.eq-grouplbl{font-size:10px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;margin-right:2px}
.eq-gbtn{width:28px;height:26px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--gray-m);border-radius:6px;background:var(--white);color:var(--gray);cursor:pointer;font-size:14px}
.eq-gbtn:hover{border-color:var(--blue);color:var(--blue)}
.eq-gbtn.active{background:var(--green-l);border-color:var(--green);color:var(--green-d)}
.eq-grp-hd{display:flex;align-items:center;gap:7px;padding:8px 12px;background:var(--gray-l);border-bottom:.5px solid var(--gray-m);cursor:pointer;font-size:11.5px;font-weight:700;color:var(--text);text-transform:uppercase;letter-spacing:.3px;position:sticky;top:0;z-index:1}
.eq-grp-hd:hover{background:#eef1f4}
.eq-grp-hd .ti{color:var(--muted);font-size:14px}
.eq-grp-count{background:var(--white);color:var(--gray);font-size:10px;font-weight:700;padding:0 7px;border-radius:9px;border:.5px solid var(--gray-m)}
.eq-grp-body{border-bottom:1px solid var(--gray-m)}
.eq-subgrp-hd{display:flex;align-items:center;gap:7px;padding:6px 12px 6px 26px;background:#fbfcfd;border-bottom:.5px solid var(--gray-m);cursor:pointer;font-size:11px;font-weight:600;color:var(--gray);letter-spacing:.2px}
.eq-subgrp-hd:hover{background:#f1f4f7;color:var(--text)}
.eq-subgrp-count{margin-left:auto;background:var(--white);color:var(--gray);font-size:9.5px;font-weight:700;padding:0 6px;border-radius:9px;border:.5px solid var(--gray-m)}
.eq-subgrp-body{border-bottom:.5px solid var(--gray-m)}
.eq-subgrp-body .eq-item-row{padding-left:30px}
.eq-thenlbl{font-size:11px;color:var(--muted);font-weight:600;margin-left:2px;text-transform:lowercase}
.eq-gsub{padding:4px 9px;font-size:11px}
.eq-gsub.active{background:var(--blue-l);border-color:var(--blue);color:var(--blue)}
.eq-viewbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:8px 16px;background:var(--white);border-top:1px solid var(--gray-m);border-bottom:1px solid var(--gray-m)}
.eq-gbtn2{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid var(--gray-m);border-radius:6px;background:var(--white);color:var(--gray);cursor:pointer;font-size:11.5px;font-weight:600}
.eq-gbtn2:hover{border-color:var(--blue);color:var(--blue)}
.eq-gbtn2.active{background:var(--green-l);border-color:var(--green);color:var(--green-d)}
.eq-gbtn2 .ti{font-size:14px}
.eq-cap-note{display:flex;align-items:center;gap:7px;padding:9px 12px;margin-top:4px;font-size:11.5px;color:var(--muted);background:#fbfaf4;border:1px dashed var(--gray-m);border-radius:7px}
.pf-art-vec *{vector-effect:non-scaling-stroke}
.eq-cap-note .ti{color:var(--amber,#b8860b)}
.eq-clip{display:inline-flex;align-items:center;gap:3px;flex-shrink:0;background:var(--blue-l);color:var(--blue);font-size:11px;font-weight:700;padding:2px 8px;border-radius:11px;margin-right:6px}
.eq-clip .ti{font-size:13px}
.eq-files{margin-top:10px;padding-top:10px;border-top:1px dashed var(--gray-m)}
.eq-spec-hd{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700;color:var(--blue);text-transform:uppercase;letter-spacing:.4px;margin:12px 0 7px;padding-top:10px;border-top:1px dashed var(--gray-m)}
details.eqed-sec[open]>summary .eqed-chev{transform:rotate(90deg)}
details.eqed-sec>summary::-webkit-details-marker{display:none}
/* W11: My Equipment facility fly-out + the profile panel hoisted over it */
.eqhome-fly{position:fixed;top:0;right:0;bottom:0;width:420px;max-width:96vw;background:var(--white);box-shadow:-8px 0 26px rgba(20,40,60,.18);z-index:2200;display:flex;flex-direction:column}
.eq-sidepanel.eqfly-overlay{position:fixed;top:0;right:0;bottom:0;width:580px;max-width:96vw;z-index:2210;box-shadow:-8px 0 26px rgba(20,40,60,.2)}
.eq-sidepanel.eqfly-overlay.pp-fullscreen{z-index:2210!important}
/* ── W29: My Locations location-profile fly-out (My Equipment drawer pattern).
   The body reuses the Locations List profile renderer; these two grid overrides
   are what make it the SIMPLIFIED single-column reading of the same profile. ── */
.lochome-fly{position:fixed;top:0;right:0;bottom:0;width:min(720px,72vw);max-width:96vw;background:var(--gray-l);box-shadow:-8px 0 26px rgba(20,40,60,.18);z-index:2200;display:none;flex-direction:column}
.lochome-fly .locdet-grid{grid-template-columns:1fr!important}
.lochome-fly .locdocs-grid{grid-template-columns:1fr!important}
/* W28.1 rule: BOTH pseudo-classes, as SEPARATE rules — a combined selector list
   with an unrecognized pseudo-class would invalidate the whole rule */
#locHomeFly:fullscreen{width:100%!important;max-width:none!important;height:100%;top:0!important;border-radius:0}
#locHomeFly:-webkit-full-screen{width:100%!important;max-width:none!important;height:100%;top:0!important;border-radius:0}
/* ── W18: MOBILE My Equipment — one-thumb filters, stacked cards, full-screen
   fly-out & profile (matches the Equipment List's full-screen mobile panel) ── */
@media (max-width:860px){
  #module-equiphome .filters{flex-direction:column;align-items:stretch;gap:8px}
  #module-equiphome .filters .filter-group{width:100%;min-width:0}
  #module-equiphome .filters .search-wrap{width:100%}
  #module-equiphome .filters .ms-box{width:100%;box-sizing:border-box;min-width:0!important;padding:11px 12px;font-size:13px}
  #module-equiphome .filters select.filter-input,#module-equiphome .filters input.filter-input{width:100%;box-sizing:border-box;padding:11px 12px;font-size:13px;min-width:0!important}
  #eqHomeViewWrap{display:none!important}   /* phones standardize on the stacked card view */
  .eqhome-fly{width:100%!important;max-width:100%!important;top:0!important}
  .eq-sidepanel.eqfly-overlay{width:100%!important;max-width:100%!important;top:0!important}
  .lochome-fly{width:100%!important;max-width:100%!important;top:0!important}   /* W29: phones open the location profile full screen */
}
/* ── W19: MOBILE FILTER STANDARD — one look for every module. Opened filter
   bars become a stacked, full-width, thumb-sized column. Covers the static
   .main-header .filters bars (behind the existing "Filters" toggle) AND
   dynamically-rendered bars marked .ade-fbar (toggled by adeFbarToggle). ── */
.ade-fbar-tglrow{display:none}
@media (max-width:860px){
  .main-header.flt-open .filters{flex-direction:column;align-items:stretch;gap:8px}
  .main-header.flt-open .filters .filter-group{width:100%;min-width:0}
  .main-header.flt-open .filters .search-wrap{width:100%}
  .main-header.flt-open .filters .ms-box{width:100%;box-sizing:border-box;min-width:0!important;padding:11px 12px;font-size:13px}
  .main-header.flt-open .filters select.filter-input,.main-header.flt-open .filters input.filter-input{width:100%;box-sizing:border-box;padding:11px 12px;font-size:13px;min-width:0!important}
  .ade-fbar-tglrow{display:block}
  .ade-fbar{display:none!important}
  .ade-fbar.open{display:flex!important;flex-direction:column;align-items:stretch;gap:8px}
  .ade-fbar.open>*{width:100%;box-sizing:border-box;min-width:0!important;margin-left:0!important}
  .ade-fbar.open input:not([type=checkbox]),.ade-fbar.open select{width:100%;box-sizing:border-box;padding:11px 12px!important;font-size:13px!important;min-width:0!important}
}
#eqhMsSheet .ms-option{padding:12px 8px!important;font-size:13.5px!important}
#eqhMsSheet .ms-option input[type=checkbox]{width:18px;height:18px}
/* W29: the Locations List multi-selects share the same bottom-sheet standard */
#locMsSheet .ms-option{padding:12px 8px!important;font-size:13.5px!important}
#locMsSheet .ms-options{max-height:none;flex:1}
/* ── W20: the Equipment Settings modal HOSTED inside its full-screen view ── */
#module-equipsettings #equipTypesModal{position:static!important;inset:auto!important;background:none!important;display:flex!important;padding:0!important;flex:1;min-height:0;z-index:auto!important}
#module-equipsettings #equipTypesModal .modal-card{position:static!important;width:100%!important;max-width:none!important;max-height:none!important;height:100%;box-shadow:none!important;border-radius:0!important;border:none!important}
#module-equipsettings #equipTypesModal .modal-card>div:first-child{display:none!important}   /* modal title bar — the module header replaces it */
/* ── W20: MOBILE Locations cleanup — everything fits, one-thumb friendly ── */
@media (max-width:860px){
  #module-locations .loc-view-bar{flex-wrap:nowrap!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch;padding-bottom:5px}
  #module-locations .loc-view-bar .loc-view-btn{flex-shrink:0;padding:9px 12px;font-size:12.5px;white-space:nowrap}
  #module-locations .loc-view-bar>span{flex-shrink:0}
  #module-locations .main-header-top{flex-wrap:wrap;gap:8px}
  #module-locations .main-header-top .btn-group{flex-wrap:wrap}
  #module-locations .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  #module-locations [id^="locexpand-inner-"]{padding:10px 8px 12px!important}
  #module-locations [id^="locexpand-inner-"] img,#module-locations [id^="locexpand-inner-"] iframe{max-width:100%}
  /* My Locations grid stacks like My Equipment */
  #module-lochome .filters .ms-box{width:100%;box-sizing:border-box;min-width:0!important}
}
.eq-maint-report-btn{margin-left:auto;display:inline-flex;align-items:center;gap:5px;border:1px solid var(--green);background:#fff;color:var(--green);font-size:10.5px;font-weight:700;text-transform:none;letter-spacing:0;padding:4px 9px;border-radius:7px;cursor:pointer;transition:background .15s,color .15s}
.eq-maint-report-btn:hover{background:var(--green);color:#fff}
.eq-maint-report-btn i{font-size:14px}
.eq-spec-cats{column-count:2;column-gap:30px;margin-top:6px}
@media (max-width:780px){.eq-spec-cats{column-count:1}}
.eq-cat-blk{break-inside:avoid;-webkit-column-break-inside:avoid;page-break-inside:avoid;margin:0 0 14px}
.eq-spec-tbl{width:100%;border-collapse:collapse;table-layout:fixed}
.eq-spec-tbl th{text-align:left;vertical-align:top;width:48%;color:var(--muted);font-weight:600;font-size:12px;padding:3px 12px 3px 0;word-break:break-word;line-height:1.35}
.eq-spec-tbl td{text-align:left;vertical-align:top;color:var(--text);font-size:12px;padding:3px 0;word-break:break-word;line-height:1.35}
.eq-spec-tbl tr+tr th,.eq-spec-tbl tr+tr td{border-top:1px solid var(--gray-l)}
.eq-spec-tbl td.blank{color:var(--gray-m);font-style:italic}
.eq-ident{margin:2px 0 4px;max-width:600px}
.eq-ident-tbl{table-layout:fixed}
.eq-ident-tbl th{width:120px}
.eq-cat-hd{font-size:11px;font-weight:700;color:var(--text);text-transform:uppercase;letter-spacing:.3px;padding:5px 0 3px;border-bottom:1px solid var(--gray-m);margin-bottom:4px;display:flex;align-items:center;gap:7px}
.eq-cat-x{font-size:10px;color:var(--muted);font-weight:600;background:var(--gray-l);padding:0 6px;border-radius:8px;text-transform:none;letter-spacing:0}
.eq-inst-blk{margin:0 0 8px;padding-left:8px;border-left:2px solid var(--blue-l,#dbeafe)}
.eq-inst-hd{font-size:10.5px;font-weight:700;color:var(--blue);text-transform:none;letter-spacing:.2px;padding:2px 0 1px}
.eq-cat-extra{font-size:9.5px;color:var(--amber,#b8860b);font-weight:700;text-transform:uppercase;border:1px solid #e6d8a8;background:#fbfaf0;padding:0 6px;border-radius:8px;letter-spacing:.3px}
.eq-dval-blank{color:var(--gray-m)!important;font-style:italic}
.eq-insp-cat{margin-bottom:4px}
.eq-insp-cathd{position:sticky;top:0;background:var(--gray-l);border-radius:5px;padding:4px 7px;margin:6px 0 2px}
.eq-insp-catck{display:flex;align-items:center;gap:8px;font-size:11.5px;font-weight:700;color:var(--text);text-transform:uppercase;letter-spacing:.3px;cursor:pointer}
.eq-insp-catx{font-size:10px;color:var(--muted);font-weight:600;text-transform:none}
.eq-insp-group{margin:0 0 4px}
.eq-insp-grouphd{font-size:11px;font-weight:700;color:var(--blue);text-transform:uppercase;letter-spacing:.3px;padding:4px 0 2px}
.eq-insp-cat-inst{margin-left:10px;padding-left:8px;border-left:2px solid var(--blue-l,#dbeafe)}
.eq-insp-cat-inst .eq-insp-catck span{color:var(--blue);text-transform:none;font-size:12px}
.eq-sheet-actions{display:flex;justify-content:flex-end;gap:8px;margin-bottom:10px}
.eq-sheet-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 11px;border:1px solid var(--gray-m);border-radius:6px;background:var(--white);color:var(--gray);cursor:pointer;font-size:11.5px;font-weight:600}
.eq-sheet-btn:hover{border-color:var(--blue);color:var(--blue);background:var(--blue-l)}
.eq-sheet-btn .ti{font-size:14px}
.eq-insp-overlay{position:fixed;inset:0;background:rgba(20,28,38,.5);z-index:3000;display:none;align-items:center;justify-content:center;padding:24px}
.eq-insp-card{background:var(--white);border-radius:12px;width:560px;max-width:100%;max-height:86vh;display:flex;flex-direction:column;box-shadow:0 18px 50px rgba(0,0,0,.3);overflow:hidden}
.eq-insp-hd{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--gray-m)}
.eq-insp-title{font-size:15px;font-weight:700;color:var(--text)}
.eq-insp-sub{font-size:12.5px;color:var(--muted);margin-top:1px}
.eq-insp-x{background:none;border:0;cursor:pointer;color:var(--muted);font-size:20px;line-height:1;padding:0}
.eq-insp-x:hover{color:var(--text)}
.eq-insp-body{padding:14px 18px;overflow-y:auto}
.eq-insp-opts{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:10px}
.eq-insp-opt{display:flex;flex-direction:column;gap:3px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.3px;flex:1;min-width:160px}
.eq-insp-opt input{font-size:13px;padding:6px 9px;border:1px solid var(--gray-m);border-radius:6px;color:var(--text);font-weight:400;text-transform:none;letter-spacing:0}
.eq-insp-checks{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.eq-insp-checks label{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--text);cursor:pointer}
.eq-insp-fhd{display:flex;align-items:center;justify-content:space-between;font-size:11px;font-weight:700;color:var(--blue);text-transform:uppercase;letter-spacing:.4px;border-top:1px solid var(--gray-m);padding-top:10px;margin-bottom:6px}
.eq-insp-selall a{color:var(--blue);cursor:pointer;font-weight:600}
.eq-insp-selall a:hover{text-decoration:underline}
.eq-insp-fields{display:flex;flex-direction:column;gap:2px;max-height:280px;overflow-y:auto;border:1px solid var(--gray-m);border-radius:8px;padding:6px}
.eq-insp-row{display:flex;align-items:center;gap:9px;padding:5px 7px;border-radius:6px;cursor:pointer;font-size:12.5px}
.eq-insp-row:hover{background:var(--blue-l)}
.eq-insp-fname{font-weight:600;color:var(--text);flex-shrink:0;min-width:140px}
.eq-insp-fval{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eq-insp-multi{white-space:normal;overflow:visible}
.eq-insp-ft{display:flex;justify-content:flex-end;gap:10px;padding:13px 18px;border-top:1px solid var(--gray-m);flex-wrap:wrap}
@media(max-width:860px){.eq-insp-ft{gap:7px;padding:10px 12px}.eq-insp-ft .btn{flex:1 1 auto;padding:9px 8px;font-size:12px;white-space:nowrap}}
.eq-insp-gen{background:var(--green);border-color:var(--green);color:#fff}
.eq-insp-gen:hover{background:var(--green-d);border-color:var(--green-d);color:#fff}
.eq-files-hd{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700;color:var(--blue);text-transform:uppercase;letter-spacing:.4px;margin-bottom:7px}
.eq-files-loading{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);padding:4px 0}
.eq-maint-empty{font-size:12px;color:var(--muted);font-style:italic;padding:2px 0 4px}
.eq-maint-sub{font-size:11px;font-weight:700;color:var(--gray);text-transform:uppercase;letter-spacing:.3px;margin:8px 0 4px}
.eq-maint-pm{max-width:560px}
.eq-maint-pm th{width:60%}
.eq-pm-crit{display:inline-block;background:#fde8e8;color:#c0392b;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;padding:0 6px;border-radius:8px;margin-left:6px;vertical-align:middle}
.eq-wo-tbl{width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed}
.eq-wo-tbl thead th{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;color:var(--muted);text-align:left;padding:0 8px 5px 0;border-bottom:1px solid var(--gray-m);white-space:nowrap}
.eq-wo-tbl thead th.wo-h-files{text-align:center}
.eq-wo-tbl thead th.wo-h-st{text-align:right}
.wo-h-date{width:74px}.wo-h-by{width:88px}.wo-h-files{width:46px}.wo-h-st{width:82px}
.eq-wo-tbl td{padding:6px 8px 6px 0;vertical-align:top;border-bottom:1px solid var(--gray-l)}
.eq-wo-name{font-weight:600;color:var(--text);line-height:1.32;display:flex;gap:2px;align-items:flex-start}
.eq-wo-name-tx{word-break:break-word}
.eq-wo-date,.eq-wo-by{color:var(--gray);white-space:normal;word-break:break-word;font-size:11.5px}
.eq-wo-files{text-align:center}
.eq-wo-files .eq-clip{margin-right:0}
.eq-wo-dim{color:var(--muted)}
.eq-wo-st{text-align:right;white-space:nowrap}
.eq-wo-badge{display:inline-block;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;padding:2px 8px;border-radius:10px}
.eq-wo-badge.ok{background:#e6f4ea;color:#256528}
.eq-wo-badge.od{background:#fde8e8;color:#c0392b}
.eq-wo-badge.op{background:#fff3d6;color:#9a6700}
.eq-wo-od{color:#c0392b;font-weight:700}
.eq-maint-more{font-size:11.5px;color:var(--muted);font-style:italic;padding:6px 0 2px}
.eq-wo-clip{cursor:pointer;transition:background .12s,color .12s}
.eq-wo-clip:hover{background:var(--blue);color:#fff}
.eq-wo-chev{font-size:13px;color:var(--muted);margin-right:4px;vertical-align:middle;flex-shrink:0;margin-top:1px}
.eq-wo-chev-sp{display:inline-block;width:17px;flex-shrink:0}
.eq-wo-type-x{cursor:pointer}
.eq-wo-type-x:hover{color:var(--blue)}
.eq-wo-steprow td{background:var(--gray-l);padding:6px 10px 8px 21px!important;border-bottom:1px solid var(--gray-m)}
.eq-wo-steps{margin:0;padding-left:20px}
.eq-wo-steps li{margin:4px 0}
.eq-wo-step-nm{font-weight:600;color:var(--text);font-size:12px}
.eq-wo-step-txt{color:var(--gray);font-size:11.5px;margin-top:1px}
.eq-wo-step-meta{color:var(--muted);font-size:11px;margin-top:1px}
.eq-files-empty{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}
.eq-files-list{display:flex;flex-direction:column;gap:5px}
.eq-file{display:flex;align-items:center;gap:10px;padding:8px 10px;background:var(--white);border:1px solid var(--gray-m);border-radius:7px;cursor:pointer;transition:border-color .12s,background .12s}
.eq-file:hover{border-color:var(--blue);background:var(--blue-l)}
.eq-file-ic{font-size:18px;color:var(--blue);flex-shrink:0}
.eq-file-name{font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.eq-file-meta{font-size:11px;color:var(--muted)}
.eq-file-eye{font-size:15px;color:var(--muted);flex-shrink:0}
.eq-file:hover .eq-file-eye{color:var(--blue)}
@media (max-width:860px){#equipLocPane{width:200px!important}}
@media (max-width:560px){
  .polfac-ext,.polfac-size{display:none}
  .polfac-date{width:74px}
}

/* ═══ W35: TERRA AI ASSISTANT — token-colored throughout (dark mode = free) ═══ */
.terra-panel{position:fixed;top:0;right:0;height:100vh;height:100dvh;width:min(430px,100vw);background:var(--surface);border-left:.5px solid var(--gray-m);box-shadow:-10px 0 32px rgba(0,0,0,.18);display:flex;flex-direction:column;z-index:2750;transform:translateX(105%);transition:transform .28s cubic-bezier(.4,0,.2,1);overscroll-behavior:contain}
.terra-panel.open{transform:translateX(0)}
.terra-head{background:var(--brand-grad);color:#fff;padding:11px 13px;display:flex;align-items:center;gap:10px;flex-shrink:0}
.terra-ava{width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.18);display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
.terra-head-t{flex:1;min-width:0}
.terra-head-t b{font-size:15.5px;display:block;line-height:1.15;font-family:'Barlow Condensed',sans-serif;letter-spacing:.4px}
.terra-head-t span{font-size:10.5px;opacity:.85;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.terra-hbtn{width:30px;height:30px;border:none;border-radius:7px;background:rgba(255,255,255,.15);color:#fff;cursor:pointer;font-size:15px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.terra-hbtn:hover{background:rgba(255,255,255,.28)}
.terra-body{flex:1;min-height:0;overflow-y:auto;padding:14px 12px;display:flex;flex-direction:column;gap:10px;background:var(--gray-l);overscroll-behavior:contain}
.terra-msg{max-width:88%;padding:9px 12px;border-radius:14px;font-size:13.2px;line-height:1.45;word-wrap:break-word;overflow-wrap:break-word}
.terra-msg.user{align-self:flex-end;background:var(--blue);color:#fff;border-bottom-right-radius:4px}
.terra-msg.bot{align-self:flex-start;background:var(--white);color:var(--text);border:.5px solid var(--gray-m);border-bottom-left-radius:4px;box-shadow:var(--shadow-1)}
.terra-p{margin:0 0 6px}.terra-msg .terra-p:last-child{margin-bottom:0}
.terra-ul{margin:2px 0 6px;padding-left:18px}.terra-ul li{margin:2px 0}
.terra-msg code{background:var(--gray-l);padding:1px 5px;border-radius:4px;font-size:12px}
.terra-meta{align-self:flex-start;display:flex;gap:2px;margin:-7px 0 0 6px}
.terra-fb{border:none;background:none;color:var(--muted);cursor:pointer;font-size:13.5px;padding:3px 6px;border-radius:6px;line-height:1}
.terra-fb:hover{background:var(--gray-m);color:var(--text)}
.terra-fb.on{color:var(--green)}.terra-fb.down.on{color:#c0392b}
.terra-chips{align-self:flex-start;display:flex;flex-wrap:wrap;gap:6px;margin:-2px 0 0}
.terra-chip{border:1px solid var(--blue);background:var(--white);color:var(--blue);border-radius:999px;padding:5px 12px;font-size:12px;cursor:pointer;font-family:inherit}
.terra-chip:hover{background:var(--blue);color:#fff}
.terra-sugg{border:1px solid var(--gray-m);background:var(--white);color:var(--text);border-radius:10px;padding:8px 11px;font-size:12.5px;cursor:pointer;text-align:left;font-family:inherit;box-shadow:var(--shadow-1)}
.terra-sugg:hover{border-color:var(--blue);color:var(--blue)}
.terra-typing{display:flex;gap:4px;align-items:center;padding:12px 14px}
.terra-typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);display:block;animation:terraDot 1.2s infinite}
.terra-typing i:nth-child(2){animation-delay:.2s}.terra-typing i:nth-child(3){animation-delay:.4s}
@keyframes terraDot{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.terra-foot{padding:10px;border-top:.5px solid var(--gray-m);background:var(--surface);display:flex;gap:8px;align-items:flex-end;flex-shrink:0;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
.terra-in{flex:1 1 0;min-width:0;resize:none;border:1px solid var(--gray-m);border-radius:12px;padding:9px 12px;font-size:13.2px;font-family:inherit;max-height:110px;background:var(--white);color:var(--text);min-height:38px;box-sizing:border-box}
.terra-in:focus{outline:none;border-color:var(--blue)}
/* W35F (Frank): a bigger message box on phones. Gated on coarse pointer AND
   width so the ~447px Document PiP window (fine pointer) keeps the compact
   composer — the inverse of the PiP min-width trap. 16px font also stops iOS
   zooming the whole page when the box gets focus. terraGrow's cap mirrors the
   38vh ceiling. */
@media (max-width:860px) and (pointer:coarse){
  .terra-in{min-height:58px;font-size:16px;padding:11px 13px;max-height:38vh}
}
.terra-send{width:38px;height:38px;border:none;border-radius:50%;background:var(--brand-grad);color:#fff;font-size:16px;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.terra-send:disabled{opacity:.45;cursor:default}
.terra-hist-item{background:var(--white);border:.5px solid var(--gray-m);border-radius:10px;padding:9px 11px;cursor:pointer;display:flex;align-items:center;gap:8px;box-shadow:var(--shadow-1)}
.terra-hist-item:hover{border-color:var(--blue)}
.terra-hist-item .th-t{flex:1;min-width:0}
.terra-hist-item b{font-size:12.8px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.terra-hist-item span{font-size:11px;color:var(--muted)}
.terra-note{font-size:11.5px;color:var(--muted);text-align:center;margin:2px 8px}
/* W35C.5: the greeting has a full and a compact form; mini shows the compact one. */
.terra-intro-short{display:none}
@media (max-width:860px){.terra-panel{width:100vw;border-left:none}}
/* ═══ W35C.5: Terra's settings menu — GLOBAL, never inside a media query ═══
   It lives inside #terraPanel so it travels into the Document PiP window, whose
   viewport is ~447px wide. While these rules sat inside
   @media (min-width:861px) and (pointer:fine) they simply did not apply there,
   and the menu rendered as unstyled buttons stacked under the composer (Frank's
   7/28 screenshot). Which ITEMS the menu offers is decided in JS, so the styling
   never needed to be desktop-only. Same trap as the 35B.2 header buttons. */
.terra-wmenu{position:absolute;top:48px;right:8px;z-index:6;background:var(--white);border:.5px solid var(--gray-m);border-radius:11px;box-shadow:var(--shadow-2);padding:5px;min-width:190px;max-width:calc(100% - 16px);max-height:calc(100% - 58px);overflow:auto;display:flex;flex-direction:column;gap:1px}
.terra-wmi{display:flex;align-items:center;gap:9px;width:100%;border:none;background:none;color:var(--text);font-family:inherit;font-size:12.6px;text-align:left;padding:7px 9px;border-radius:8px;cursor:pointer}
.terra-wmi span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.terra-wmi:hover{background:var(--gray-l);color:var(--blue)}
.terra-wmi.on{color:var(--blue);font-weight:600}
.terra-wsep{font-size:10px;letter-spacing:.6px;text-transform:uppercase;color:var(--muted);padding:8px 9px 3px}
/* W35C.3: Terra sits ABOVE .modal-overlay (2700). Raising modals over the
   fly-out family is what fixed Frank's layering report, but it would otherwise
   have buried Terra under every modal's full-viewport backdrop — greyed out,
   with clicks on her composer landing on the backdrop and closing the modal
   instead. She stays below #fileViewerModal (3000), _adeRaise's counter
   (3000+), the notification panel and adeDialog, so anything explicitly
   raised still wins. */
/* W35B-0 voice: controls are hidden until the server says that half is configured. */
.terra-panel .terra-fb.speak,.terra-panel .terra-mic{display:none}
.terra-panel.tts-on .terra-fb.speak{display:inline-block}
.terra-panel.stt-on .terra-mic{display:flex}
/* W35H: conversation mode needs BOTH halves — the mic to hear and the voice to
   answer. One compound selector, so a server with only STT (or only TTS) never
   shows a button that would half-work. All state colors ride tokens (dark free). */
#terraConvoBtn{display:none}
.terra-panel.stt-on.tts-on #terraConvoBtn{display:flex}
/* The header sits on the brand gradient (white icons), so the ON state is the
   INVERSE — a solid white chip with the brand icon — plus a full-opacity,
   bolded status line. No hex catch-alls needed in dark mode: the header
   gradient is identical in both themes. */
.terra-panel.convo-on #terraConvoBtn{background:#fff;color:var(--blue)}
.terra-panel.convo-on #terraSub{opacity:1;font-weight:600}
/* Review F8: mini mode hides the subtitle — but in conversation mode that line
   IS the state (Listening/Thinking/Speaking). Bring it back for the mode. */
.terra-panel.terra-mini.convo-on .terra-head-t span{display:block}
.terra-fb.speak.on{color:var(--blue)}
.terra-mic{width:38px;height:38px;border:.5px solid var(--gray-m);border-radius:50%;background:var(--surface-2);color:var(--muted);font-size:16px;cursor:pointer;flex-shrink:0;align-items:center;justify-content:center;transition:background .15s,color .15s}
.terra-mic:hover{color:var(--blue)}
/* ═══ W35C.3: attachments in chat ═══
   .terra-abtn deliberately does NOT reuse .terra-mic — that class is hidden
   until the server reports speech-to-text is configured, and attachments have
   nothing to do with the voice chain. Same 38px circle, own visibility. */
.terra-abtn{width:38px;height:38px;border:.5px solid var(--gray-m);border-radius:50%;background:var(--surface-2);color:var(--muted);font-size:16px;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:background .15s,color .15s}
/* W35E: clear-the-composer button. GLOBAL rules (no min-width media query —
   the PiP window is ~447px; two prior defects). Hidden until the box has
   text; terraClearSync (called from terraGrow) toggles .show, so every path
   that changes the box — typing, paste, a voice transcript landing, send
   emptying it — updates the button for free. */
.terra-clear{width:32px;height:32px;border:none;border-radius:50%;background:var(--surface-3);color:var(--muted);font-size:14px;cursor:pointer;flex-shrink:0;display:none;align-items:center;justify-content:center;align-self:center;padding:0;transition:background .15s,color .15s}
.terra-clear.show{display:flex}
.terra-clear:hover{color:var(--blue)}
.terra-abtn:hover{color:var(--blue)}
.terra-abtn:disabled{opacity:.5;cursor:default}
/* Camera capture is a phone/tablet affordance — a desktop file picker already
   covers "choose a picture", and capture= does nothing on most desktops. */
.terra-cam{display:none}
@media (pointer:coarse){.terra-cam{display:flex}}
.terra-atts{display:none;gap:7px;flex-wrap:wrap;padding:8px 10px 0;flex-shrink:0}
.terra-atts.on{display:flex}
.terra-att{position:relative;width:60px;height:60px;border-radius:9px;overflow:hidden;border:.5px solid var(--gray-m);background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.terra-att img{width:100%;height:100%;object-fit:cover;display:block}
.terra-att .tat-f{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:9.5px;color:var(--muted);padding:3px;text-align:center;line-height:1.15;word-break:break-all;overflow:hidden}
.terra-att .tat-f i{font-size:17px}
.terra-att .tat-x{position:absolute;top:2px;right:2px;width:18px;height:18px;border:none;border-radius:50%;background:rgba(15,25,35,.72);color:#fff;font-size:11px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.terra-att.busy{opacity:.55}
.terra-att .tat-sp{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--blue);font-size:17px}
.terra-att .tat-sp i{animation:terraSpin .9s linear infinite}
/* Images the user sent, rendered in their own bubble */
.terra-imgs{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:88%;align-self:flex-end;margin:-2px 0 0}
.terra-imgs img{max-width:132px;max-height:132px;border-radius:10px;border:.5px solid var(--gray-m);display:block}
.terra-msg a{color:var(--blue);text-decoration:underline;word-break:break-word}
.terra-msg.bot a:hover{color:var(--green)}
.terra-conf{border:1px solid var(--blue);border-radius:12px;background:var(--surface-2);padding:10px 12px;margin:2px 0;max-width:92%;display:flex;flex-direction:column;gap:5px}
.terra-conf .tcf-h{display:flex;align-items:center;gap:6px;font-size:12.6px;font-weight:800;color:var(--blue);margin-bottom:2px}
.terra-conf .tcf-r{display:flex;gap:10px;justify-content:space-between;font-size:12px;border-top:.5px solid var(--gray-m);padding-top:4px}
/* W35D: preview keys are now user-authored form-field labels, up to ~80 chars —
   flex-shrink:0 sized them at max-content and pushed the value off the card. */
.terra-conf .tcf-r span{color:var(--muted);text-transform:capitalize;flex:1 1 auto;min-width:0;overflow-wrap:anywhere}
.terra-conf .tcf-r b{text-align:right;word-break:break-word;flex:0 1 auto;min-width:38%}
.terra-conf .tcf-b{display:flex;gap:7px;margin-top:7px}
.terra-conf .tcf-ok{background:var(--green);border-color:var(--green);color:#fff;font-weight:700}
.terra-imgs .tim-f{font-size:11px;color:var(--muted);border:.5px dashed var(--gray-m);border-radius:9px;padding:6px 9px;display:flex;align-items:center;gap:5px}
.terra-mic.rec{background:#c0392b;border-color:#c0392b;color:#fff;animation:terraPulse 1.1s ease-in-out infinite}
.terra-mic.busy{opacity:.65;cursor:default}
.terra-mic.busy .ti-loader-2,.terra-fb.speak .ti-loader-2{display:inline-block;animation:terraSpin .9s linear infinite}
@keyframes terraPulse{0%,100%{box-shadow:0 0 0 0 rgba(192,57,43,.5)}50%{box-shadow:0 0 0 7px rgba(192,57,43,0)}}
@keyframes terraSpin{to{transform:rotate(360deg)}}
/* ═══ W35B.1: Terra mark, launch modes, floating launcher ═══ */
/* The mark inherits font-size (width:1em) so it scales with whatever button
   it sits in — the topbar button grows to 25px on tablets. */
.terra-mark{display:block;width:1em;height:1em;flex-shrink:0}
.terra-ava .terra-mark{width:21px;height:21px}
#terraNavOpen{display:flex;align-items:center;gap:9px}
#terraNavOpen .terra-mark{width:19px;height:19px}
#nav-terraconsole .terra-mark{width:19px;height:19px}   /* W35F: match sibling nav icons (review F4) */
.terra-float{position:fixed;left:0;top:0;z-index:350;width:52px;height:52px;border-radius:50%;border:none;background:var(--brand-grad);color:#fff;box-shadow:var(--shadow-2);cursor:grab;display:none;align-items:center;justify-content:center;padding:0;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:box-shadow .15s,transform .12s}
.terra-float.on{display:flex}
body.ade-terra-open .terra-float{display:none}
.terra-float .terra-mark{width:27px;height:27px;pointer-events:none}
.terra-float:active{transform:scale(.94)}
.terra-float.dragging{transition:none;cursor:grabbing;box-shadow:0 10px 30px rgba(0,0,0,.34);transform:scale(1.06)}
@media (max-width:860px){.terra-float{width:56px;height:56px}.terra-float .terra-mark{width:29px;height:29px}}
/* W35C.3 (Frank): Terra leaves the cramped phone header entirely. On phones she
   is reached the way the user already chose in Preferences — the floating
   launcher, or the ASSISTANT entry at the top of the main navigation. This is a
   media rule rather than a change to terraApplyPrefs() on purpose: that function
   writes an INLINE display, which a plain rule could not beat, and a width rule
   re-evaluates on rotate and resize for free. The JS still owns whether Terra
   exists at all (permission + personal switch + company kill switch). */
@media (max-width:860px){#terraBtn{display:none!important}}
/* ═══ W35B.2: TERRA WINDOW SYSTEM — free-float · 4-edge snap-dock · mini · PiP ═══
   Desktop only (min-width:861px AND fine pointer), matching _adeDeskUI(). On
   touch the panel stays exactly as W35A/35B.1 shipped it, because there the
   header belongs to the 30B swipe-to-close gesture and drag excludes touch. */
@media (min-width:861px) and (pointer:fine){
  /* Free-float and docked both drop the slide-in transform; JS writes the box. */
  .terra-panel.terra-win,.terra-panel.terra-dock{transform:none;opacity:0;pointer-events:none;transition:opacity .18s ease}
  .terra-panel.terra-win.open,.terra-panel.terra-dock.open{transform:none;opacity:1;pointer-events:auto}
  .terra-panel.terra-win{top:auto;right:auto;bottom:auto;height:auto;width:auto;border:.5px solid var(--gray-m);border-radius:14px;overflow:hidden;resize:both;box-shadow:0 18px 48px rgba(0,0,0,.28);min-width:320px;min-height:260px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px)}
  .terra-panel.terra-win>.terra-head{cursor:grab}
  .terra-panel.terra-win.tw-drag{transition:none;box-shadow:0 26px 62px rgba(0,0,0,.4)}
  .terra-panel.terra-win.tw-drag>.terra-head{cursor:grabbing}
  /* The UA resize corner would otherwise sit on top of the Send button. */
  .terra-panel.terra-win .terra-foot{padding-right:26px}
  body.ade-twdrag{user-select:none!important}
  body.ade-twdrag iframe{pointer-events:none}

  /* Docked: the app reflows BESIDE the panel, never underneath it. */
  .terra-panel.terra-dock{border-radius:0;resize:none}
  .terra-panel.terra-dock.tdock-right{top:0;bottom:auto;right:0;left:auto;height:100vh;height:100dvh;width:var(--tdw,430px);border-left:.5px solid var(--gray-m)}
  .terra-panel.terra-dock.tdock-left{top:0;bottom:auto;left:0;right:auto;height:100vh;height:100dvh;width:var(--tdw,430px);border-left:none;border-right:.5px solid var(--gray-m);box-shadow:10px 0 32px rgba(0,0,0,.18)}
  .terra-panel.terra-dock.tdock-top{top:0;bottom:auto;left:0;right:0;width:auto;height:var(--tdh,320px);border-left:none;border-bottom:.5px solid var(--gray-m);box-shadow:0 10px 32px rgba(0,0,0,.18)}
  .terra-panel.terra-dock.tdock-bottom{top:auto;bottom:0;left:0;right:0;width:auto;height:var(--tdh,320px);border-left:none;border-top:.5px solid var(--gray-m);box-shadow:0 -10px 32px rgba(0,0,0,.18)}
  /* body is height:100vh;display:flex;overflow:hidden — a top/bottom push MUST
     also shrink it, or the bottom of the app is clipped instead of reflowed. */
  body.ade-tpush{margin-left:var(--tpl,0px);margin-right:var(--tpr,0px);margin-top:var(--tpt,0px);margin-bottom:var(--tpb,0px);height:calc(100vh - var(--tpt,0px) - var(--tpb,0px))}
  /* A docked modal (30C) and a docked Terra can be open at once — compose. */
  body.ade-tpush.ade-dockpush{margin-right:calc(var(--tpr,0px) + min(560px,44vw))}
  /* R4: the body push only moves things laid out BY the body. Every fixed
     right-edge surface still pins to the viewport and would sit UNDER a docked
     Terra (z 2400) with its close control unreachable. Inset them by the same
     amount — the launcher already gets this treatment in _terraFloatBounds. */
  /* W35C.3: EVERY modal overlay — not only docked ones — insets beside a
     docked Terra. A centred modal that keeps inset:0 centres itself against
     the whole viewport, so half of it hides under her and the backdrop paints
     over her too. This must stay ABOVE the .ade-docked rule (same specificity
     would otherwise depend on source order). */
  body.ade-tpush .modal-overlay{inset:var(--tpt,0px) var(--tpr,0px) var(--tpb,0px) var(--tpl,0px)}
  body.ade-tpush .modal-overlay.ade-docked{inset:var(--tpt,0px) var(--tpr,0px) var(--tpb,0px) var(--tpl,0px)}
  body.ade-tpush .modal-overlay.ade-docked>.modal-card{height:100%!important;max-height:100%!important}
  body.ade-tpush .preview-panel,body.ade-tpush .eqpv-panel{top:var(--tpt,0px);bottom:var(--tpb,0px);right:var(--tpr,0px);height:auto}
  body.ade-tpush .eqhome-fly,body.ade-tpush .lochome-fly,body.ade-tpush .eq-sidepanel.eqfly-overlay{top:var(--tpt,0px);bottom:var(--tpb,0px);right:var(--tpr,0px)}
  body.ade-tpush .global-scrolltop{right:calc(22px + var(--tpr,0px));bottom:calc(22px + var(--tpb,0px))}
  /* R4b: .pp-fullscreen is z-2000 with !important inset/width/height, so it
     both misses the inset AND overrides the ones above. width/height:auto is
     load-bearing — 100vw/100vh would over-constrain the box and win. */
  body.ade-tpush .pp-fullscreen{inset:var(--tpt,0px) var(--tpr,0px) var(--tpb,0px) var(--tpl,0px)!important;width:auto!important;height:auto!important}

  /* Mini chat: one line in, one line out. It shares .terra-win, so it has to
     drop that mode's minimums or it can never be smaller than a float card. */
  /* ═══ W35C.5 (Frank): mini chat, reformatted ═══
     It was 300x170 and NOT resizable, with the head, body and composer all
     fighting for that. Anything longer than a sentence became a two-line
     scroller and the composer lost its input. Mini now means "compact", not
     "unusable": a workable floor, resizable like every other window mode, and
     a body that is the part that flexes. */
  .terra-panel.terra-mini{resize:both;min-width:340px;min-height:280px;max-height:70vh}
  .terra-panel.terra-mini .terra-head{padding:7px 10px;gap:8px;flex-shrink:0}
  .terra-panel.terra-mini .terra-ava{width:26px;height:26px}
  .terra-panel.terra-mini .terra-ava .terra-mark{width:16px;height:16px}
  .terra-panel.terra-mini .terra-head-t b{font-size:14px}
  .terra-panel.terra-mini .terra-head-t span{display:none}
  /* + and history stay — losing "new conversation" in the mode people leave
     open all day was the single most annoying part of it. */
  .terra-panel.terra-mini .terra-hbtn{width:28px;height:28px;font-size:14px}
  /* The body is the ONLY part that flexes, so the composer can never be pushed
     off the bottom however long the conversation gets. */
  .terra-panel.terra-mini .terra-body{padding:8px 10px;gap:6px;flex:1 1 auto;min-height:0;overflow-y:auto}
  .terra-panel.terra-mini .terra-msg{max-width:100%;font-size:12.6px;padding:7px 10px;line-height:1.45}
  .terra-panel.terra-mini .terra-note{display:none}
  /* Starter questions stack instead of hiding — in a narrow window they are the
     fastest way in, and hiding them left a blank card. */
  .terra-panel.terra-mini .terra-sugg{font-size:12px;padding:6px 9px}
  /* Five starter questions fill a 340px window before a word is typed; mini
     shows the first three — both W35D form starters sit inside that three. */
  .terra-panel.terra-mini .terra-sugg:nth-of-type(n+4){display:none}
  .terra-panel.terra-mini .terra-foot{padding:7px 8px;gap:6px;flex-shrink:0}
  /* Four round buttons plus a textarea will not fit 340px. The camera is a
     phone affordance and mini is desktop-only, so it is the one that goes. */
  .terra-panel.terra-mini .terra-cam{display:none}
  .terra-panel.terra-mini .terra-abtn,.terra-panel.terra-mini .terra-mic,
  .terra-panel.terra-mini .terra-send{width:32px;height:32px;font-size:14px}
  .terra-panel.terra-mini .terra-in{font-size:12.6px;padding:7px 10px;min-height:32px;max-height:70px}
  /* The long greeting is written for a full panel; in mini it swallowed the
     whole window before a word had been typed. */
  .terra-panel.terra-mini .terra-intro-long{display:none}
  .terra-panel.terra-mini .terra-intro-short{display:block}
  .terra-panel.terra-mini .terra-imgs img{max-width:88px;max-height:88px}
  .terra-panel.terra-mini .terra-conf{max-width:100%}

  /* A docked or mini Terra must NOT hide its own launcher — the whole point is
     that you keep working beside it. A full-height side panel or a floating
     window still does, because the panel itself is the way back. */
  body.ade-terra-open.ade-tmode-dock .terra-float.on,
  body.ade-terra-open.ade-tmode-mini .terra-float.on{display:flex}

  /* Pre-snap affordance: the footprint the window is about to take, filling in
     over the hold. Without it, auto-snap feels like the window being taken away. */
  #terraSnapBand{position:fixed;z-index:2399;background:var(--blue);border-radius:2px;pointer-events:none;display:none;opacity:0}
  #terraSnapBand.on{display:block;animation:terraSnapFill 2s linear forwards}
  @keyframes terraSnapFill{from{opacity:.12}to{opacity:.4}}
}
/* Window modes are desktop-only — never offer a control that cannot work.
   W35C.1: gate on POINTER only. The old max-width:860px arm also matched the
   ~447px Document PiP window, which is why its controls "disappeared". */
@media (pointer:coarse){#terraWinBtn,#terraPipBtn{display:none!important}}
/* Inside the popped-out window: the settings menu works, popping out again
   does not — and the launcher swap rows act on a window you cannot see. */
.terra-pip #terraPipBtn{display:none!important}
/* W35C.1: slidable divider on the inner edge of a docked Terra. */
.terra-ddiv{position:absolute;z-index:6;background:transparent;transition:background .12s}
.terra-ddiv:hover,.terra-ddiv.on{background:var(--blue);opacity:.4}
.tdock-right .terra-ddiv{left:-3px;top:0;bottom:0;width:7px;cursor:ew-resize}
.tdock-left .terra-ddiv{right:-3px;top:0;bottom:0;width:7px;cursor:ew-resize}
.tdock-top .terra-ddiv{bottom:-3px;left:0;right:0;height:7px;cursor:ns-resize}
.tdock-bottom .terra-ddiv{top:-3px;left:0;right:0;height:7px;cursor:ns-resize}
.terra-panel:not(.terra-dock) .terra-ddiv{display:none}
/* W35C.1 (Frank): the topbar profile picture must never squish — keep its
   circle, and hide it entirely once the (possibly dock-pushed) topbar gets
   tight, before it distorts. body.ade-tbtight is set from JS because a docked
   Terra shrinks the topbar WITHOUT changing the viewport media queries see. */
#myAccountBtn{flex-shrink:0}
body.ade-tbtight #myAccountBtn{display:none!important}
/* Document Picture-in-Picture is a SEPARATE document with its own viewport, so
   this rule sits OUTSIDE the desktop media query — a PiP window is usually
   narrower than 861px and would otherwise match the phone rules alone. */
.terra-panel.terra-pip{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;transform:none;opacity:1;pointer-events:auto;border:none;border-radius:0;box-shadow:none;resize:none}


/* ── W53: PUBLISHED-DOCUMENT READER TABLES (.ade-docread wraps server-rendered
   document HTML in the Policy Manual preview pane, the My Locations document
   preview, the full-view modal, and the editor's location preview). Two things
   made those tables unreadable: DEKRA-era baked-in widths (tables ran off the
   right edge) and the app's data-grid rules above (thead sticky/nowrap, td
   max-width 220px + ellipsis + nowrap, row hover/pointer) leaking into
   document prose. Both are neutralized here, reader-side only. Managed tables
   (.ade-mtable) keep their own content-sized column layout; their cells still
   gain honest wrapping. The editor pane (#deBody) has its own W52h rules; the
   red legacy-link tint is deliberately NOT replicated — readers never see it. */
.ade-docread table:not(.ade-mtable){table-layout:fixed;width:100%!important;max-width:100%}
.ade-docread table:not(.ade-mtable) col,.ade-docread table:not(.ade-mtable) td,.ade-docread table:not(.ade-mtable) th{width:auto!important;min-width:0!important;max-width:none!important}
.ade-docread td,.ade-docread th{white-space:normal!important;max-width:none;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;vertical-align:top}
.ade-docread td *,.ade-docread th *{white-space:normal!important}
.ade-docread thead th{position:static;white-space:normal!important}
.ade-docread tbody tr{cursor:auto}
.ade-docread tbody tr:hover{background:transparent}
