/* Shared reports shell: central sidebar + topbar. Scoped to .appShell to minimize page-level regressions. */
/* --brand-accent* defaults to 2WCF blue; overridden at runtime by reports-shell.js from GET /branding (white-label). */
:root{--brand-accent:#00B6F1;--brand-accent-dark:#0090c2;--brand-accent-soft:#e6f8fe;--shell-navy:#0f172a;--shell-navy-border:#1f2937;--shell-shadow:rgba(0,0,0,.08);}

/* Hide the whole app (nav + page content) until reports-shell.js confirms a
   session, so an unauthenticated visitor sees only the shared sign-in gate
   below, not the page structure/labels behind it. */
html.authPending #appShell{display:none!important}
/* Superseded by the shared #reportsAuthGate; several pages still carry their
   own copy of this overlay markup (cleanup tracked separately). */
#loginOverlay{display:none!important}

.authGate{position:fixed;inset:0;background:#f6f7fb;display:none;align-items:center;justify-content:center;z-index:200;padding:16px;box-sizing:border-box}
.authGate.open{display:flex}
.authGateBox{width:380px;max-width:100%;background:#fff;border-radius:14px;padding:22px;border:1px solid #e4e7ec;box-shadow:0 20px 50px rgba(15,23,42,.18);box-sizing:border-box}
.authGateBox h2{margin:0 0 6px 0;font-size:20px}
.authGateBox .authGateSub{margin:0 0 16px 0;color:#667085;font-size:13px}
.authGateBox .row{margin-bottom:12px}
.authGateBox label{display:block;font-size:12px;font-weight:700;color:#667085;margin-bottom:5px}
.authGateBox input{width:100%;height:38px;border:1px solid #e4e7ec;border-radius:10px;padding:0 10px;font:inherit;box-sizing:border-box}
.authGateBox .authGateError{color:#b42318;font-size:13px;min-height:18px;margin:6px 0}
.authGateBox button{width:100%;height:40px;border-radius:10px;border:1px solid var(--brand-accent);background:var(--brand-accent);color:#fff;font-weight:800;cursor:pointer}
.appShell{display:flex!important;min-height:100vh;width:100%}
.appShell .sidebar{background:var(--shell-navy);color:#e5e7eb;display:flex;flex-direction:column;border-right:1px solid var(--shell-navy-border);min-width:0;position:sticky;top:0;height:100vh;flex:0 0 260px!important;width:260px!important;transition:flex-basis .18s ease,width .18s ease;z-index:30;left:auto;bottom:auto;transform:none;margin:0}
.appShell.sidebarCollapsed .sidebar{flex-basis:74px!important;width:74px!important}
.appShell .sideTop{height:58px;display:flex;align-items:center;gap:10px;padding:0 14px;border-bottom:1px solid var(--shell-navy-border);flex:0 0 auto}
.appShell .brandMark{width:34px;height:34px;border-radius:10px;background:#fff;border:1px solid rgba(255,255,255,.18);color:var(--brand-accent);display:flex;align-items:center;justify-content:center;flex:0 0 auto;box-shadow:0 4px 10px rgba(15,23,42,.18);overflow:hidden}.appShell .brandMark img{width:100%;height:100%;display:block;object-fit:contain}.appShell .brandMark .brandMarkInitials{font-size:16px;font-weight:900;letter-spacing:.02em}
.appShell .brandText{min-width:0;white-space:nowrap;overflow:hidden;transition:opacity .12s ease,width .12s ease}
.appShell .brandText strong{display:block;font-size:14px;line-height:1.1;color:#fff;font-weight:900}
.appShell .brandText span{display:block;color:#94a3b8;font-size:11px;margin-top:2px}
.appShell.sidebarCollapsed .brandText,.appShell.sidebarCollapsed .navText,.appShell.sidebarCollapsed .sideFooterText{opacity:0!important;width:0!important;overflow:hidden!important;display:block!important}
.appShell .sideNav{padding:12px 10px;display:flex;flex-direction:column;gap:6px;flex:1;overflow:auto}
.appShell .sideLink{display:flex;align-items:center;gap:12px;min-height:42px;color:#cbd5e1;text-decoration:none;border-radius:12px;padding:0 12px;font-weight:750;white-space:nowrap;overflow:hidden;font-size:16px;line-height:1}
.appShell .sideLink:hover{background:#1e293b;color:#fff}
.appShell .sideLink.active{background:linear-gradient(135deg,var(--brand-accent),var(--brand-accent-dark));color:#fff;box-shadow:0 10px 24px rgba(15,23,42,.22)}
.appShell .navIcon{width:22px;text-align:center;font-size:16px;flex:0 0 auto}
.appShell .navText{transition:opacity .12s ease,width .12s ease}
.appShell .sideFooter{border-top:1px solid #1f2937;padding:12px 10px;display:flex;flex-direction:column;gap:8px;flex:0 0 auto}
.appShell .sideFooterText{font-size:12px;color:#94a3b8;white-space:nowrap;overflow:hidden}
.appShell .collapseSidebarBtn{width:100%;height:38px;border:1px solid var(--brand-accent)!important;background:#fff!important;color:var(--brand-accent-dark)!important;border-radius:11px;cursor:pointer;font-weight:900;display:flex;align-items:center;justify-content:center;padding:0}
.appShell .main{min-width:0;flex:1 1 auto!important;width:auto!important;margin-left:0!important;padding:0!important;transition:none!important}
.appShell.sidebarCollapsed .main{width:auto!important;margin-left:0!important}
.appShell .shellTopbar{height:58px;background:#fff;color:#07142f;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #dfe5ee;position:sticky;top:0;z-index:20;box-shadow:inset 0 -3px 0 var(--shell-shadow)}
.appShell .shellTopbar h1{font-size:18px;margin:0;font-weight:800;line-height:1.15;letter-spacing:-.02em}
.appShell .headerLeft{display:flex;align-items:center;gap:12px;min-width:0}
.appShell .headerTitleSub{color:#5b6d89;font-size:12px;margin-top:2px}
.appShell .iconBtn{width:38px;height:38px;border:1px solid #dfe5ee;background:#fff;color:#07142f;border-radius:11px;cursor:pointer;font-weight:900;display:none;align-items:center;justify-content:center}
.appShell .shellUserbar{display:flex;gap:10px;align-items:center}
.appShell .shellUserbar .btn{height:38px;border:1px solid #dfe5ee;background:#fff;color:#07142f;border-radius:10px;padding:0 12px;font-weight:800;cursor:pointer}
.appShell .shellUserbar .btn.danger{background:#fff;color:#07142f;border-color:#dfe5ee}.appShell .shellUserbar .btn:hover,.appShell .iconBtn:hover{border-color:var(--brand-accent);box-shadow:0 0 0 3px var(--brand-accent-soft)}
.appShell .mobileBackdrop{display:none}
@media(max-width:1100px){.appShell:not(.sidebarOpen) .sidebar{flex-basis:74px!important;width:74px!important}.appShell:not(.sidebarOpen) .brandText,.appShell:not(.sidebarOpen) .navText,.appShell:not(.sidebarOpen) .sideFooterText{opacity:0!important;width:0!important;overflow:hidden!important}.appShell .main{width:auto!important;margin-left:0!important}}
@media(max-width:700px){.appShell{display:block!important}.appShell .main,.appShell.sidebarCollapsed .main{width:100%!important;margin-left:0!important}.appShell .shellTopbar{padding:0 14px}.appShell .iconBtn{display:inline-flex}.appShell .sidebar{position:fixed;z-index:60;transform:translateX(-100%);transition:transform .18s ease;width:260px!important;flex-basis:260px!important}.appShell.sidebarOpen .sidebar{transform:translateX(0)}.appShell.sidebarCollapsed .sidebar{width:260px!important;flex-basis:260px!important}.appShell .brandText,.appShell .navText,.appShell .sideFooterText{opacity:1!important;width:auto!important}.appShell .mobileBackdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:50}.appShell.sidebarOpen .mobileBackdrop{display:block}}
.error:empty{display:none}
html.embedded .appShell .sidebar,
html.embedded .appShell .shellTopbar,
html.embedded .appShell .mobileBackdrop{display:none!important}
html.embedded .appShell .main{overflow-y:auto}
.drillOverlay{position:fixed;inset:0;z-index:200;background:rgba(15,23,42,.55);display:none;align-items:flex-start;justify-content:center;padding:20px;box-sizing:border-box}
.drillOverlay.open{display:flex}
.drillPanel{width:100%;max-width:1440px;height:calc(100vh - 40px);background:#fff;border-radius:16px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 24px 70px rgba(15,23,42,.3)}
.drillHeader{display:flex;align-items:center;justify-content:space-between;padding:11px 18px;border-bottom:1px solid #e5e7eb;background:#f8fafc;flex:0 0 auto;gap:16px}
.drillTitle{font-weight:800;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drillClose{border:1px solid #e5e7eb;background:#fff;border-radius:10px;padding:6px 14px;cursor:pointer;font-weight:800;flex-shrink:0}
.drillClose:hover{border-color:#2563eb;color:#2563eb}
.drillFrame{flex:1;border:none;width:100%;height:100%}
.drillRow{cursor:pointer;transition:background .1s}
.drillRow:hover{background:#f0f6ff !important}
.drillRow:hover b,.drillRow:hover .metricTitle,.drillRow:hover .extNum{color:#2563eb}
