/* PCMO Update 015. Presentation only; authorization remains in the server API.
   This stylesheet is statically linked LAST in each authenticated workspace.
   Login forms, invoice documents and the independent updater are not restyled. */
body[data-pcmo-ui]{--pcmo-rail:304px;--pcmo-rail-padding:18px;--pcmo-divider:#e5e9f1}
body[data-pcmo-ui] :is(#sidebar,.side,.fin-side,.rb-side){
 box-sizing:border-box;width:var(--pcmo-rail);padding:26px var(--pcmo-rail-padding) 18px;
 background:#fff;border-right:1px solid var(--pcmo-divider);overflow-y:auto;overflow-x:hidden;
 scrollbar-gutter:stable;overscroll-behavior:contain;display:flex;flex-direction:column;
}
body[data-pcmo-ui] :is(.layout>.sidebar,.layout>.side){position:fixed;inset:0 auto 0 0;height:100dvh;z-index:90}
body[data-pcmo-ui] :is(.fin-side,.rb-side){height:100dvh;z-index:90}
body[data-pcmo-ui] :is(.brand.portal-brand,.side>.identity,.fin-brand,.rb-brand){
 display:block;flex:0 0 auto;min-height:0;padding:0 9px 23px!important;margin:0;
 color:#24334b;text-decoration:none;border:0;gap:0;
}
body[data-pcmo-ui] .pcmo-brand{display:block;text-decoration:none}
body[data-pcmo-ui] :is(.brand,.identity,.fin-brand,.rb-brand) .pcmo-brand-logo{
 display:block;width:204px;max-width:100%;height:91px;max-height:91px;object-fit:contain;
 object-position:left center;margin:0 0 16px;
}
body[data-pcmo-ui] .pcmo-brand-title{display:block;font:700 17px/1.4 'Segoe UI',Arial,sans-serif;color:#21334e;overflow-wrap:anywhere;letter-spacing:0}
body[data-pcmo-ui] .pcmo-brand-subtitle{display:block;font:500 10px/1.5 'Segoe UI',Arial,sans-serif;color:#75859e;margin-top:7px;letter-spacing:.25px;text-transform:none}
body[data-pcmo-ui] :is(#sidebar,.side,.fin-side,.rb-side)>.nav-section{font:700 10px/1.4 'Segoe UI',Arial,sans-serif;letter-spacing:1.2px;padding:15px 10px 10px;margin:0;flex:0 0 auto;color:#8290a4}
body[data-pcmo-ui] .uw-nav{display:block!important;flex:1 0 auto;min-width:0;width:100%;padding:0 0 14px!important;font-family:'Segoe UI',Arial,sans-serif}
body[data-pcmo-ui] .uw-group{margin:7px 0;border:0!important;padding:0;min-width:0;box-shadow:none}
body[data-pcmo-ui] .uw-group>summary{
 list-style:none;display:flex;flex-flow:row nowrap;align-items:center;gap:10px;min-height:46px;
 padding:11px 12px;border-radius:10px;font:650 14px/1.4 'Segoe UI',Arial,sans-serif;
 white-space:nowrap;word-break:normal;overflow-wrap:normal;cursor:pointer;
}
body[data-pcmo-ui] .uw-group>summary::marker{content:''}
body[data-pcmo-ui] .uw-group>summary::-webkit-details-marker{display:none}
body[data-pcmo-ui] .uw-group>summary::after{content:'⌄';flex:0 0 12px;width:12px;margin-left:auto;text-align:center;font-size:15px;line-height:1;transform:rotate(-90deg)}
body[data-pcmo-ui] .uw-group[open]>summary::after{transform:rotate(0)}
body[data-pcmo-ui] .uw-icon{display:inline-flex;width:20px;height:20px;flex:0 0 20px;align-items:center;justify-content:center}
body[data-pcmo-ui] .uw-label{display:block;flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;word-break:normal;overflow-wrap:normal}
body[data-pcmo-ui] .uw-nav .uw-sub{border-left:1px solid #e4dfef;margin:5px 0 6px 20px;padding:3px 0 3px 10px;min-width:0}
body[data-pcmo-ui] .uw-nav .uw-sub>a{
 display:flex!important;flex-flow:row nowrap;align-items:center;gap:0;min-height:36px;
 margin:1px 0;padding:8px 9px;font:500 13px/1.45 'Segoe UI',Arial,sans-serif;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
body[data-pcmo-ui] .uw-nav .uw-sub>a.uw-selected{background:#eee9fb;color:#5d3dc1;font-weight:650;box-shadow:inset 3px 0 0 #7960d3}
body[data-pcmo-ui] .uw-nav a.uw-home{font:700 14px/1.45 'Segoe UI',Arial,sans-serif;margin:0 0 10px;padding:12px;min-height:46px;white-space:nowrap;gap:10px}
body[data-pcmo-ui] .uw-nav :is(summary,a,button):focus-visible{outline:2px solid #8b73da;outline-offset:2px}
body[data-pcmo-ui] .uw-loading{padding:15px 10px;color:#72819a;font:13px/1.5 'Segoe UI',Arial,sans-serif;display:flex;gap:10px;align-items:center}
body[data-pcmo-ui] .uw-loading-dot{width:12px;height:12px;border-radius:50%;border:2px solid #e5dff8;border-top-color:#8264ce;animation:pcmo-nav-spin .8s linear infinite}
body[data-pcmo-ui] .uw-menu-error{font-size:13px;line-height:1.5;color:#934655;padding:10px;margin:0;overflow-wrap:anywhere}
body[data-pcmo-ui] .uw-retry{font:600 13px/1.4 'Segoe UI',Arial,sans-serif;border:1px solid #dad1ed;border-radius:8px;padding:9px 12px;background:#f6f2fd;color:#6243a7;cursor:pointer;margin:5px 10px}
body[data-pcmo-ui] :is(.sidebar-bottom,.side-bottom){flex:0 0 auto;padding-top:15px;margin-top:auto;min-width:0}
body[data-pcmo-ui] .profile-text,body[data-pcmo-ui] .side-bottom .profile>div{min-width:0}
body[data-pcmo-ui] .profile-text strong,body[data-pcmo-ui] .side-bottom .profile strong{overflow-wrap:anywhere}
body[data-pcmo-ui] .side-bottom .profile small{display:block;overflow-wrap:anywhere;line-height:1.5}
@keyframes pcmo-nav-spin{to{transform:rotate(360deg)}}
@media(min-width:1001px){
 body[data-pcmo-ui]>.layout,body[data-pcmo-ui] #app>.layout,body[data-pcmo-ui] #ops-app>.layout{display:grid;grid-template-columns:var(--pcmo-rail) minmax(0,1fr)}
 body[data-pcmo-ui] .layout>.main{grid-column:2;margin-left:0;width:auto;min-width:0}
 body[data-pcmo-ui] :is(.fin-main,.rb-main){margin-left:var(--pcmo-rail);min-width:0}
 body[data-pcmo-ui] :is(.sidebar,.side,.fin-side,.rb-side){display:flex;transform:none}
 body[data-pcmo-ui] :is(.topbar,.top,.fin-top,.rb-top){height:76px;min-height:76px}
 body[data-pcmo-ui] :is(.mobile-menu,#mobile-menu){display:none!important}
}
@media(max-width:1000px){
 body[data-pcmo-ui] #app>.layout,body[data-pcmo-ui] #ops-app>.layout{display:block}
 body[data-pcmo-ui] :is(.layout>.main,.fin-main,.rb-main){margin-left:0;width:100%;min-width:0}
 body[data-pcmo-ui] :is(#sidebar,.side,.fin-side,.rb-side){position:fixed;inset:0 auto 0 0;z-index:400;
  width:min(var(--pcmo-rail),calc(100vw - 24px));height:100dvh;display:none;transform:none;
  padding:23px 16px 18px;box-shadow:12px 0 38px #1d29432b;
 }
 body[data-pcmo-ui] :is(#sidebar,.side,.fin-side,.rb-side).open{display:flex;transform:none}
 body[data-pcmo-ui] :is(.mobile-menu,#mobile-menu){display:inline-flex!important}
 body[data-pcmo-ui] :is(.topbar,.top,.fin-top,.rb-top){min-height:72px;height:auto;gap:10px}
 body[data-pcmo-ui] .fin-top>label{min-width:0;flex:1 1 0}
 body[data-pcmo-ui] .fin-top select{min-width:0;width:100%;max-width:100%}
 body[data-pcmo-ui] .fin-top>.mobile-menu{flex:0 0 auto}
 body[data-pcmo-ui] .fin-top>.who{flex:0 0 auto}
 body[data-pcmo-ui] .uw-group>summary{padding:11px 10px;font-size:14px}
}
@media(prefers-reduced-motion:reduce){body[data-pcmo-ui] .uw-loading-dot{animation:none}}
@media print{
 body[data-pcmo-ui] :is(#sidebar,.side,.fin-side,.rb-side,.topbar,.top,.fin-top,.rb-top){display:none!important}
 body[data-pcmo-ui] #app>.layout,body[data-pcmo-ui] #ops-app>.layout{display:block!important}
 body[data-pcmo-ui] :is(.main,.fin-main,.rb-main){margin:0!important;width:100%!important}
}

/* Update 016: remove unused logo/text spacing when no web heading is displayed. */
body[data-pcmo-ui] .pcmo-brand.pcmo-brand-logo-only .pcmo-brand-logo{margin-bottom:0}
body[data-pcmo-ui] .pcmo-brand-subtitle:first-child{margin-top:0}
#sidebar-branding-panel .sidebar-branding-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(240px,1fr);gap:28px;margin-top:22px}
#sidebar-branding-panel .sidebar-presets{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}
#sidebar-branding-panel .sidebar-presets button{font-size:12px;min-height:36px;padding:8px 10px}
#sidebar-branding-panel .sidebar-brand-preview{max-width:304px;padding:26px 22px;border:1px solid #e1e5ef;border-radius:12px;background:white;overflow-wrap:anywhere}
#sidebar-branding-panel .pcmo-brand-logo{display:block;width:204px;max-width:100%;height:91px;object-fit:contain;object-position:left center;margin:0 0 16px}
#sidebar-branding-panel [hidden]{display:none!important}
#sidebar-branding-panel #sidebar-branding-status{min-height:22px;margin-top:12px}
@media(max-width:900px){#sidebar-branding-panel .sidebar-branding-grid{grid-template-columns:minmax(0,1fr)}}

.initial-branding .pcmo-brand-logo{display:block;width:220px;max-width:100%;height:100px;object-fit:contain;margin:0 auto 16px}.initial-branding{max-width:350px;margin:auto}.initial-branding .pcmo-brand-logo-only .pcmo-brand-logo{margin-bottom:0}
