
/* Installable application controls */
.pwa-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}body>.pwa-tools{padding:12px 5.5vw;background:#fff;border-bottom:1px solid #dce6ed}.pwa-control{font:600 12px Arial,Helvetica,sans-serif;min-height:44px;padding:10px 15px;border:1px solid #075b94;border-radius:8px;background:#075b94;color:#fff;cursor:pointer;line-height:1.4}.pwa-control-secondary{background:#fff;color:#075b94;border-color:#dce6ed}.pwa-mode{font:12px Arial,Helvetica,sans-serif;color:#007f86}.pwa-tools [hidden]{display:none!important}#pwa-help{box-sizing:border-box;width:min(480px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:26px;border:1px solid #dce6ed;border-radius:16px;background:#fff;color:#18364d;font-family:Arial,Helvetica,sans-serif;box-shadow:0 20px 60px #123e6326}#pwa-help::backdrop{background:#123e6370}#pwa-help h2{font-size:21px;margin:0 0 14px}#pwa-help p{font-size:14px;line-height:1.8;white-space:pre-line}#pwa-help button{margin-top:12px}body{min-height:100dvh}@media (max-width: 650px){body>.pwa-tools{padding:10px 16px;justify-content:flex-start}.pwa-tools{gap:6px}.pwa-control{font-size:11px;padding:9px 12px}}@media (display-mode: standalone),(display-mode: fullscreen){body{padding-bottom:env(safe-area-inset-bottom)}}@media print{.pwa-tools,#pwa-help{display:none!important}}

.pwa-back{text-decoration:none;display:inline-flex;align-items:center}.pwa-workspace-tools{width:100%;justify-content:flex-start;flex-basis:100%;padding-top:5px}.pwa-back{order:-1}#pwa-help .pwa-control{display:inline-flex;align-items:center;text-decoration:none;margin-right:8px}.pwa-address{font-weight:700;overflow-wrap:anywhere}@media (max-width: 650px){.pwa-workspace-tools{position:relative}.pwa-back{font-size:12px;min-height:44px}}
.topbar .right .pwa-workspace-tools{grid-column:1/-1}

/* Compact shared workspace shell. Installation belongs to the portal login. */
#portal-install{margin-top:20px}#portal-install .pwa-tools{justify-content:flex-start}
.workspace-shell .topbar{display:flex!important;align-items:center;gap:12px;padding:10px 18px;min-height:64px;flex-wrap:nowrap!important}
.workspace-shell .topbar>.left,.workspace-shell .topbar>div:first-of-type{flex:1;min-width:100px}
.workspace-shell .topbar .left small,.workspace-shell .topbar #pageSubtitle{display:none}
.workspace-shell .topbar h1,.workspace-shell .topbar strong{font-size:16px;margin:0;line-height:1.4}
.workspace-shell .topbar .right,.workspace-shell .topbar-actions{display:flex!important;align-items:center;gap:8px;flex-wrap:nowrap!important;width:auto!important;min-width:0}
.workspace-menu-toggle{flex:none;width:42px;min-height:42px;border:1px solid #d8e5eb;border-radius:9px;background:#fff;color:#123e63;font-size:20px;cursor:pointer}
.workspace-shell .mobile-menu,.workspace-shell .mobile-menu-toggle{display:none!important}
.workspace-shell .workspace-period,.workspace-shell .period-pill{display:flex;align-items:center;gap:6px;padding:3px 7px;background:#f5f8fb;border:1px solid #d8e5eb;border-radius:9px;white-space:nowrap}
.workspace-shell .workspace-period>span,.workspace-shell .period-pill>span{font-size:11px;color:#607787}
.workspace-shell .topbar select{min-width:0!important;width:auto!important;min-height:38px;padding:6px;font-size:12px;border:0;background:transparent}
.workspace-shell #scopeSelect{max-width:150px;border:1px solid #d8e5eb;border-radius:9px;background:#fff}
.workspace-shell [hidden]{display:none!important}
.workspace-shell .portal-return{min-height:42px;padding:8px 10px;white-space:nowrap;font-size:12px}
.workspace-more{position:relative;flex:none}
.workspace-more>summary{display:flex;align-items:center;gap:7px;list-style:none;cursor:pointer;border:1px solid #d8e5eb;border-radius:9px;padding:10px;font-size:12px;font-weight:600;min-height:42px;color:#123e63;background:#fff}
.workspace-more>summary:after{content:'⌄'}.workspace-more>summary::-webkit-details-marker{display:none}
.workspace-more-panel{position:absolute;right:0;top:calc(100% + 8px);width:270px;max-width:calc(100vw - 32px);display:flex;flex-direction:column;gap:10px;background:#fff;padding:16px;border:1px solid #d8e5eb;border-radius:12px;box-shadow:0 12px 40px #123e6326;z-index:50}
.workspace-more-panel #authToolbar{border:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.workspace-more-panel .auth-current-user{display:grid!important;text-align:left;width:100%;max-width:100%}
.workspace-more-panel .btn,.workspace-more-panel>a{display:flex!important;min-height:42px;white-space:normal}
.workspace-more-panel #dataMode{font-size:11px;align-self:flex-start}
.workspace-backdrop{display:none}
@media (min-width: 901px){.workspace-shell.nav-collapsed .sidebar{display:none!important}.workspace-shell.nav-collapsed .app-shell{grid-template-columns:minmax(0,1fr)}}
@media (max-width: 1200px){.workspace-shell .topbar{flex-wrap:wrap!important}.workspace-shell .topbar .right,.workspace-shell .topbar-actions{margin-left:auto}.workspace-shell .topbar>.left,.workspace-shell .topbar>div:first-of-type{min-width:160px}}
@media (max-width: 900px){
 .workspace-shell .layout{display:block!important}.workspace-shell .app-shell{grid-template-columns:minmax(0,1fr)!important}
 .workspace-shell .sidebar{display:flex!important;flex-direction:column;position:fixed!important;left:0!important;top:0;width:min(280px,84vw)!important;height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;z-index:80;transform:translateX(-100%);visibility:hidden;padding:20px 14px!important;border-right:1px solid #d8e5eb;border-bottom:0}
 .workspace-shell.nav-open .sidebar{transform:translateX(0);visibility:visible}
 .workspace-shell .sidebar .menu{display:block!important;max-height:none!important;overflow:visible!important}
 .workspace-shell .sidebar .brand{flex:none}.workspace-shell .workspace-backdrop:not([hidden]){display:block;position:fixed;inset:0;border:0;background:#102b4566;z-index:70;cursor:pointer}
 .workspace-shell .topbar{padding:10px 12px;gap:8px}.workspace-shell .topbar>.left,.workspace-shell .topbar>div:first-of-type{min-width:0}
 .workspace-shell .topbar .right,.workspace-shell .topbar-actions{width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:6px}
 .workspace-shell .topbar select{font-size:16px!important;min-height:42px}
 .workspace-shell .workspace-period,.workspace-shell .period-pill{flex:1;justify-content:center}.workspace-shell #scopeSelect{max-width:none;flex:1}
 .workspace-shell .workspace-period>span,.workspace-shell .period-pill>span{display:none}
 .workspace-shell .portal-return{flex:1;font-size:11px;min-height:44px}.workspace-more>summary{font-size:11px;min-height:44px}
 .workspace-shell .workspace-more-panel #scopeSelect{width:100%}.workspace-shell .main{width:100%}
}
@media print{.workspace-menu-toggle,.workspace-more,.workspace-backdrop,.workspace-shell .portal-return{display:none!important}}

.workspace-nav-group{margin:4px 0;border-bottom:1px solid #ffffff18;padding-bottom:4px}.workspace-nav-group>summary{padding:12px 9px;font-weight:700;font-size:12px;cursor:pointer;list-style:none;display:flex;justify-content:space-between;color:inherit}.workspace-nav-group>summary:after{content:'+'}.workspace-nav-group[open]>summary:after{content:'−'}.workspace-nav-group>summary::-webkit-details-marker{display:none}
.data-coverage{padding:9px 20px;border-bottom:1px solid #d8e5eb;background:#f5f9fb;color:#526b7c;font-size:11px;line-height:1.6;overflow-wrap:anywhere}
.workspace-shell .modal,.workspace-shell .modal-card{box-sizing:border-box;max-width:calc(100vw - 32px)!important;max-height:calc(100dvh - 32px)!important;min-width:0!important;overflow:auto;overscroll-behavior:contain}
.workspace-shell .modalback,.workspace-shell .modal-backdrop{padding:16px!important;overflow:auto;overscroll-behavior:contain}
.workspace-shell .modal h2,.workspace-shell .modal-head>*{min-width:0;overflow-wrap:anywhere}
.workspace-shell .modal-head{gap:10px;flex-wrap:wrap}.workspace-shell .modal-close{flex-shrink:0;min-width:44px;min-height:44px}
.workspace-shell .modal .table-wrap{overflow-x:auto;max-width:100%}.workspace-shell .modal input,.workspace-shell .modal select,.workspace-shell .modal textarea{max-width:100%;min-width:0;box-sizing:border-box}
@media (max-width: 650px){
 .workspace-shell .modalback,.workspace-shell .modal-backdrop{padding:8px!important;align-items:flex-start!important;padding-top:max(8px,env(safe-area-inset-top))!important}
 .workspace-shell .modal,.workspace-shell .modal-card{width:100%!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:0!important;border-radius:12px!important}
 .workspace-shell #modalroot .modal{padding:16px!important}.workspace-shell .modal-head,.workspace-shell .modal-body{padding:14px!important}
 .workspace-shell .modal .grid,.workspace-shell .modal .cols,.workspace-shell .modal .row,.workspace-shell .modal .detail-summary,.workspace-shell .modal .auth-grid,.workspace-shell .modal .goal-card{grid-template-columns:minmax(0,1fr)!important}
 .workspace-shell .modal .row{display:flex;flex-wrap:wrap}.workspace-shell .modal .row>*,.workspace-shell .modal .field{min-width:0;max-width:100%}
 .workspace-shell .modal .footer,.workspace-shell .modal .btn-row{display:flex;flex-wrap:wrap;gap:8px}.workspace-shell .modal button{min-height:44px;white-space:normal}
 .workspace-shell .modal h2{font-size:18px!important}.workspace-shell .modal .chart-shell,.workspace-shell .modal .chartbox{max-width:100%;overflow-x:auto}
 .workspace-shell .data-coverage{padding:8px 12px}.workspace-shell .analysis-shell,.workspace-shell .studio-main,.workspace-shell .studio-side{min-width:0;max-width:100%}
}

