/* Shared compact shell. Does not touch invoice panes, source grid widths or formulas. */
body:is(.portal-active,.portal-invoices) #portal-shell .p-top{min-height:60px;padding-block:9px}
body:is(.portal-active,.portal-invoices) #portal-shell .p-nav-horizontal{padding-block:5px 9px}
body:is(.portal-active,.portal-invoices) #portal-shell .p-nav-horizontal>button{min-height:40px;padding-block:8px}
body:is(.portal-active,.portal-invoices) #portal-shell .p-subnav{min-height:0;padding-block:8px;gap:8px}
body:is(.portal-active,.portal-invoices) #portal-shell .p-subnav>button{min-height:52px;padding:9px 12px}
body:is(.portal-active,.portal-invoices) :is(#module-kw,#module-home,#module-reporting,#module-sources,#module-planning,#module-analytics,#module-administration,#module-reports)>.p-heading:not(.cmp-heading){display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 16px!important;min-height:0!important;margin-bottom:12px}
body.portal-active #module-kw>.p-heading:not(.cmp-heading)>.p-muted{display:none}body.portal-active #module-kw>.p-heading:not(.cmp-heading)>h1{font-size:23px;margin:0;flex:1 1 220px;order:-3}body.portal-active #module-kw>.p-heading:not(.cmp-heading)>.kw-area-tabs{order:3;flex-basis:100%;margin:0;padding:4px 0}.p-heading:not(.cmp-heading)>.p-page-help{min-height:0;max-width:240px;padding:0;margin:0}.p-heading:not(.cmp-heading)>.p-page-help>summary{padding:7px 10px;min-height:0}
body:is(.portal-active,.portal-invoices) :is(#module-kw,#module-home,#module-reporting,#module-sources,#module-planning,#module-analytics,#module-administration,#module-reports)>.p-heading.cmp-heading{display:block!important;padding:12px 16px!important;margin-bottom:12px;min-height:0!important}
.cmp-heading .cmp-heading-line{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cmp-heading .cmp-heading-line>h1,.cmp-heading .cmp-heading-line>h2{margin:0;font-size:23px;line-height:1.35;min-width:0;overflow-wrap:break-word}
.cmp-heading .cmp-heading-more{position:relative;flex:0 0 auto;width:auto;max-width:none;padding:0;margin:0;background:transparent;border:0}
.cmp-heading-more>summary{font-size:12px;padding:8px 10px;min-height:32px;border:1px solid #dae4ef;border-radius:8px;background:#f7f9fc;cursor:pointer}
.cmp-heading-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:min(540px,calc(100vw - 60px));max-height:65vh;overflow:auto;padding:16px;background:#fff;border:1px solid #d8e2ef;box-shadow:0 10px 28px #12365b1a;border-radius:12px}
.cmp-heading-menu p{font-size:12px;line-height:1.55;margin:0 0 10px}.cmp-heading-menu>button{margin:5px 6px 0 0}.cmp-heading-menu>.p-page-help{width:auto;max-width:none;margin:0;padding:0;border:0;background:transparent}.cmp-heading-menu .p-page-help>summary{padding:6px 0;min-height:0}
body.portal-active #module-kw .cmp-heading>.kw-area-tabs{padding:8px 0 0;margin:0;gap:6px;white-space:normal;flex-wrap:wrap;overflow:visible}
body.portal-active #module-kw .cmp-heading .kw-area-tabs>button{padding:7px 11px;min-height:34px;font-size:12px}
body.portal-active #module-kw>.rc-tools{margin:8px 0}.rc-staff>.rc-tools{margin:8px 0;gap:8px}.rc-staff>.rc-tools>input{flex:1 1 300px;min-height:38px}.rc-count{margin:8px 0}.rc-gallery{margin:12px 0;grid-template-columns:repeat(auto-fill,minmax(min(100%,275px),1fr));align-items:stretch}
/* A former 65vh table viewport cannot contain a multi-row card gallery. */
body:is(.portal-active,.portal-invoices) :is(#module-kw,#module-home,#module-reporting,#module-sources,#module-planning,#module-analytics,#module-administration,#module-reports) .rc-host,body.portal-invoices #module-register .rc-host{display:flow-root!important;max-height:none!important;height:auto!important;min-height:0!important;overflow:visible!important;position:static;min-width:0;contain:none}
.rc-gallery>.rc-tile{min-width:0;height:auto;max-height:none;min-height:180px;white-space:normal;word-break:normal;overflow-wrap:break-word;padding:16px;justify-content:flex-start}
.rc-gallery>.rc-tile h3{min-width:0;max-width:100%;height:auto;max-height:none;white-space:normal;word-break:normal;overflow-wrap:break-word;line-height:1.45;font-size:16px;margin:7px 0 12px}
.rc-preview dt,.rc-preview dd{min-width:0;white-space:normal;overflow-wrap:break-word;word-break:normal;line-height:1.45}.rc-open{margin-top:auto}.kw-module>.p-toolbar{position:static;clear:both;min-height:0;flex-wrap:wrap}.kw-module>.p-toolbar>strong{white-space:normal;overflow-wrap:break-word}
body.portal-active .rc-person-modal,body.portal-active .rc-record-modal,body.portal-active .kw-record-drawer,body.portal-active dialog.www-row-panel{position:fixed;inset:0;margin:auto;width:min(980px,calc(100vw - 32px));height:auto;max-width:calc(100vw - 32px);max-height:88dvh;overflow:auto;border:1px solid #d6e1ee;border-radius:16px;padding:22px;background:#fff;color:#173655;box-shadow:0 24px 80px #0b284940;box-sizing:border-box;overscroll-behavior:contain}
.rc-person-modal::backdrop,.rc-record-modal::backdrop{background:#0c254b66;backdrop-filter:blur(2px)}.rc-person-modal>.rc-person{margin:0;padding:0;border:0;box-shadow:none}.rc-person-modal .rc-detail-head,.rc-record-modal .rc-detail-head{position:sticky;top:-22px;margin:-2px 0 12px;padding:12px 0;background:#fff;z-index:2}.rc-person-modal h2,.rc-record-modal h2{font-size:22px;margin:0}.rc-person-modal .rc-tools{margin:10px 0}.rc-person-modal details{padding:12px 0}.rc-fields{margin:12px 0;gap:12px}
#module-administration .rc-admin-form{gap:12px}#module-administration .rc-admin-section{padding:16px}#module-administration .rc-admin-section>h3{font-size:18px}#module-administration .rc-admin-form .security-access-row{padding:12px 0}#module-administration .rc-admin-actual{gap:16px;padding:13px}
/* In-page navigation never reserves a sidebar or changes content width. */
.cmp-section-rail{position:fixed;left:0;top:42%;z-index:35;display:flex;align-items:flex-start;flex-direction:column;gap:5px;max-height:46vh;overflow:visible}.cmp-section-rail[hidden],.cmp-top[hidden]{display:none!important}
.cmp-rail-toggle{display:none}.cmp-rail-links{display:flex;flex-direction:column;gap:5px}.cmp-section-link{display:flex;align-items:center;gap:10px;width:32px;min-height:32px;overflow:hidden;white-space:nowrap;padding:6px 9px 6px 5px;border:1px solid #dce5f0;border-left:0;border-radius:0 9px 9px 0;background:#f8fafde8;color:#12365b;box-shadow:0 2px 6px #12365b08;text-align:left;font:12px/1.4 inherit;transition:width .16s,background .16s,box-shadow .16s}
.cmp-rail-number{display:grid;place-items:center;width:20px;flex:0 0 20px;font-size:10px;color:#56708b}.cmp-rail-label{overflow:hidden;text-overflow:ellipsis;opacity:0}.cmp-section-rail:hover .cmp-section-link,.cmp-section-rail:focus-within .cmp-section-link,.cmp-section-rail.is-open .cmp-section-link{width:min(240px,70vw);background:#fff;box-shadow:0 3px 10px #12365b14}.cmp-section-rail:hover .cmp-rail-label,.cmp-section-rail:focus-within .cmp-rail-label,.cmp-section-rail.is-open .cmp-rail-label{opacity:1}.cmp-section-link:hover{background:#eaf0f7!important}
.cmp-top{position:fixed;right:22px;bottom:22px;z-index:40;display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:10px;border:1px solid #12365b;border-radius:50%;background:#12365b!important;color:#fff!important;box-shadow:0 4px 16px #12365b26;transition:background .16s,transform .16s,box-shadow .16s}.cmp-top svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.cmp-top:hover{background:#1b4774!important;transform:translateY(-2px);box-shadow:0 6px 20px #12365b38}.cmp-top:focus-visible,.cmp-section-link:focus-visible{outline:3px solid #8eb6de;outline-offset:3px}
body:is(.portal-active,.portal-invoices) #cmp-scroll-top{display:grid;place-items:center;box-sizing:border-box;min-width:44px;max-width:44px;width:44px;height:44px;min-height:44px;padding:9px;border-radius:50%!important}
[data-cmp-anchor]{scroll-margin-top:160px}
@media(max-width:650px){.cmp-heading .cmp-heading-line{gap:8px}.cmp-heading .cmp-heading-line>h1{font-size:20px}.cmp-heading-more>summary{font-size:11px}.cmp-heading-menu{width:min(420px,calc(100vw - 48px))}.cmp-top{right:14px;bottom:14px}.cmp-rail-toggle{display:block;width:30px;min-height:32px;border:1px solid #dce5f0;border-left:0;border-radius:0 8px 8px 0;background:#fff;color:#12365b}.cmp-rail-links{display:none}.cmp-section-rail.is-open .cmp-rail-links{display:flex;position:absolute;top:0;left:31px;max-height:45vh;overflow:auto}.rc-gallery{grid-template-columns:1fr}body.portal-active .rc-person-modal,body.portal-active .rc-record-modal,body.portal-active .kw-record-drawer{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:92dvh;padding:16px}.rc-person-modal .rc-detail-head,.rc-record-modal .rc-detail-head{top:-16px}.rc-detail-head{align-items:flex-start;gap:10px}.rc-fields{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.cmp-top,.cmp-section-link{transition:none}.cmp-top:hover{transform:none}}
.ops-panel{min-width:0;background:#fff;border:1px solid #dce6ef;border-radius:12px;padding:16px}.ops-panel>h2{font-size:19px;margin:0 0 8px}.ops-panel>.p-muted{font-size:12px;line-height:1.5;margin:0 0 12px}.ops-panel form>input[type=search]{min-width:0;flex:1 1 250px}.ops-panel form>label{display:flex;align-items:center;gap:8px;flex-direction:row}.ops-panel form>label>input[type=checkbox]{width:16px;min-height:0}.ops-toolbar button[aria-pressed=true]{background:#e8eef6;border-color:#a5bad1;color:#12365b}.ops-dialog{width:min(800px,calc(100vw - 28px));max-height:88dvh;overflow:auto}.ops-dialog .rc-detail-head{margin:0 0 15px}.ops-dialog h2{font-size:22px;margin:0}.ops-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.ops-form-grid>label{display:flex;flex-direction:column;gap:6px}.ops-form-grid>label:last-child{grid-column:1/-1}.ops-form-grid textarea{min-height:100px}.ops-dialog form>button{margin:4px 8px 4px 0}.ops-dialog form>label{display:grid;gap:6px}.ops-dialog textarea{width:100%}.ops-dialog .p-error{white-space:pre-wrap}.ops-panel .rc-tile .p-muted{line-height:1.5;overflow-wrap:break-word}
@media(max-width:600px){.ops-form-grid{grid-template-columns:1fr}.ops-panel{padding:12px}}

/* C3: scoped, aligned parallelogram tabs; text remains completely upright. */
body:is(.portal-active,.portal-invoices) .cmp-section-rail{top:36%;max-height:56vh;gap:4px}
body:is(.portal-active,.portal-invoices) .cmp-rail-links{gap:4px;max-height:56vh;overflow-y:auto;overflow-x:hidden;padding:4px 10px 5px 0;scrollbar-width:thin;scrollbar-color:#64829f transparent}
body:is(.portal-active,.portal-invoices) .cmp-section-link{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-start;gap:10px;box-sizing:border-box;width:42px;min-width:42px;min-height:40px;height:40px;max-height:none;margin:0;padding:8px 18px 8px 8px;border:0!important;border-radius:0!important;overflow:visible;white-space:normal;background:transparent!important;color:#fff!important;box-shadow:none!important;transform:none!important;font-family:Arial,sans-serif!important;font-size:12px!important;font-weight:600!important;line-height:1.35!important;text-align:left;transition:width .18s}
body:is(.portal-active,.portal-invoices) .cmp-section-link::before{content:"";position:absolute;inset:0;z-index:-1;background:#12365b;clip-path:polygon(9px 0,100% 0,calc(100% - 9px) 100%,0 100%);transition:background .15s;pointer-events:none}
body:is(.portal-active,.portal-invoices) .cmp-section-link:hover::before,body:is(.portal-active,.portal-invoices) .cmp-section-link:focus-visible::before{background:#214d78}
body:is(.portal-active,.portal-invoices) .cmp-section-link[aria-current=location]::before{background:#24547f}
body:is(.portal-active,.portal-invoices) .cmp-section-link[aria-current=location] .cmp-rail-number{color:#fff;box-shadow:inset 0 -2px #9bc7ed}
body:is(.portal-active,.portal-invoices) .cmp-section-link .cmp-rail-number{display:grid;place-items:center;flex:0 0 22px;width:22px;height:22px;margin:0;padding:0;color:#c1d4e7;font:600 10px/1 Arial,sans-serif!important;font-variant-numeric:tabular-nums;border:0;transform:none;letter-spacing:.25px}
body:is(.portal-active,.portal-invoices) .cmp-section-link .cmp-rail-label{flex:1 1 auto;min-width:0;max-width:100%;margin:0;padding:0;text-align:left;white-space:normal;word-break:normal;overflow-wrap:break-word;overflow:hidden;text-overflow:clip;color:#fff!important;font:600 12px/1.35 Arial,sans-serif!important;opacity:0;transform:none;letter-spacing:0}
body:is(.portal-active,.portal-invoices) .cmp-section-rail:is(:hover,:focus-within,.is-open) .cmp-section-link{width:min(244px,75vw);height:48px;min-height:48px;padding-block:7px;background:transparent!important;box-shadow:none!important}
body:is(.portal-active,.portal-invoices) .cmp-section-rail:is(:hover,:focus-within,.is-open) .cmp-rail-label{opacity:1}
body:is(.portal-active,.portal-invoices) .cmp-section-link:focus-visible{outline:2px solid #93b9db!important;outline-offset:2px}
body:is(.portal-active,.portal-invoices) #cmp-scroll-top svg{width:24px;height:24px;stroke:#fff;stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;fill:none}
@media(max-width:650px){body:is(.portal-active,.portal-invoices) .cmp-section-rail{top:38%}body:is(.portal-active,.portal-invoices) .cmp-rail-toggle{box-sizing:border-box;width:32px;height:36px;min-height:36px;margin:0;padding:6px;border:0;border-radius:0 9px 9px 0;background:#12365b;color:#fff;font:700 18px/1 Arial,sans-serif}body:is(.portal-active,.portal-invoices) .cmp-section-rail .cmp-rail-links{display:none}body:is(.portal-active,.portal-invoices) .cmp-section-rail.is-open .cmp-rail-links{display:flex;left:33px;top:0;max-height:52vh;padding:3px 8px 3px 0}body:is(.portal-active,.portal-invoices) .cmp-section-rail.is-open .cmp-section-link{width:min(244px,calc(100vw - 60px));height:44px;min-height:44px}}
@media(prefers-reduced-motion:reduce){body:is(.portal-active,.portal-invoices) .cmp-section-link,body:is(.portal-active,.portal-invoices) .cmp-section-link::before{transition:none}}
@media(max-width:650px){body:is(.portal-active,.portal-invoices) .cmp-section-rail.is-open .cmp-section-link{height:48px;min-height:48px}}
/* Account details use the same centered top-layer pattern as other record cards. */
body #module-administration dialog.rc-admin-modal{box-sizing:border-box;width:min(1060px,calc(100vw - 40px));max-width:1060px;max-height:90dvh;margin:auto;padding:0 24px 24px;border:1px solid #d5e0ec;border-radius:16px;background:#f7f9fc;color:#12365b;box-shadow:0 24px 80px #0d294a38;overflow:auto;overscroll-behavior:contain}
body #module-administration dialog.rc-admin-modal::backdrop{background:#122a4766;backdrop-filter:blur(3px)}
body #module-administration .rc-admin-modal-bar{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;background:#f7f9fc;border-bottom:1px solid #dce5ee;margin-bottom:18px}
body #module-administration .rc-admin-modal-bar>strong{font-size:14px}
body #module-administration .rc-admin-close{margin:0;min-height:40px;border:1px solid #cfdce9;border-radius:9px;background:#fff;color:#12365b;padding:8px 14px}
body #module-administration .rc-admin-modal .security-user-header{position:static;padding:0;margin:0 0 18px}
body #module-administration .rc-admin-modal .security-user-header h2{font-size:24px;margin:0 0 8px;overflow-wrap:anywhere}
body #module-administration .rc-admin-modal #security-user{display:block;width:100%;min-width:0}
body #module-administration .rc-admin-modal #security-user[hidden]{display:none!important}
body #module-administration .rc-admin-leave{padding:14px;border:1px solid #d7a765;border-radius:10px;background:#fff8eb;margin:0 0 18px;scroll-margin-top:70px}
body #module-administration .rc-admin-leave[hidden]{display:none!important}
body #module-administration .rc-admin-leave button{margin:4px 8px 0 0}
@media(max-width:650px){body #module-administration dialog.rc-admin-modal{width:calc(100vw - 16px);padding:0 12px 12px;max-height:94dvh}.rc-admin-modal .rc-admin-section{padding:14px!important}}
/* Region list: original block/column/merge structure, modern WWW typography. */
body.portal-active #module-kw .kw-route-blocks{gap:18px;min-width:0}
body.portal-active #module-kw .kw-route-blocks>.kw-route-layout{max-height:none!important;min-width:0;max-width:100%;overflow:auto;border:1px solid #d9e3ef;border-radius:12px;box-shadow:0 2px 9px #12365b06;background:#fff}
body.portal-active #module-kw .kw-route-blocks table{width:100%;min-width:760px;border-collapse:separate;border-spacing:0;table-layout:fixed;font-family:Arial,sans-serif}
body.portal-active #module-kw .kw-route-blocks td{border-color:#d9e3ed!important;overflow-wrap:break-word;word-break:normal}
body.portal-active #module-kw .kw-route-blocks td button{box-sizing:border-box;min-width:0;max-width:100%;min-height:36px;padding:8px 10px!important;font-family:Arial,sans-serif;font-size:13px;line-height:1.5!important;white-space:pre-wrap!important;overflow-wrap:break-word;word-break:normal}
body.portal-active #module-kw .kw-route-blocks .route-web-heading td{background:#eaf0f7!important;color:#12365b!important;font-weight:700}
body.portal-active #module-kw .kw-route-blocks .route-web-heading button{font-weight:700!important}
body.portal-active #module-kw .kw-route-blocks td:focus-within{outline:2px solid #6d97bf;outline-offset:-2px}
body.portal-active #module-kw .kw-route-all{margin:12px 0;border:1px solid #dce5ef;border-radius:10px;background:#fff}

/* C4: one brand accent, sampled from the unchanged APCOA wordmark (#0a2547).
   Semantic success/warning/error colors and chart series remain independent. */
:root{--apcoa-brand:#0a2547;--apcoa-brand-hover:#061a33;--apcoa-brand-soft:#edf1f6;--apcoa-brand-line:#c5d0de;--apcoa-brand-focus:#8196b1;--navy:var(--apcoa-brand);--blue:var(--apcoa-brand);--blue-hover:var(--apcoa-brand-hover)}
body:is(.portal-active,.portal-invoices){--navy:var(--apcoa-brand);--blue:var(--apcoa-brand);--blue-hover:var(--apcoa-brand-hover);--p-blue:var(--apcoa-brand);--p-ink:var(--apcoa-brand);--p-navy:var(--apcoa-brand);--rc-accent:var(--apcoa-brand)}
body:is(.portal-active,.portal-invoices) :is(h1,h2,h3,.rc-kind,.rc-open,.rc-month strong,.kw-sheet-controls strong,.p-link){color:var(--apcoa-brand)}
body:is(.portal-active,.portal-invoices) :is(button.p-primary,.p-primary,button.primary,.button.primary),html.apcoa-login-page :is(button.primary,button[type=submit]){background:var(--apcoa-brand)!important;border-color:var(--apcoa-brand)!important;color:#fff!important}
body:is(.portal-active,.portal-invoices) :is(button.p-primary,.p-primary,button.primary,.button.primary):hover,html.apcoa-login-page :is(button.primary,button[type=submit]):hover{background:var(--apcoa-brand-hover)!important;border-color:var(--apcoa-brand-hover)!important}
body:is(.portal-active,.portal-invoices) #portal-shell :is(.p-nav-horizontal,.p-subnav)>button[aria-current=page],body:is(.portal-active,.portal-invoices) :is(.kw-area-tabs,.kw-tabs,.rc-modes,.security-tabs,.p-tabs,.p-chart-modes) button:is([aria-pressed=true],[aria-current=page],[aria-selected=true]),body:is(.portal-active,.portal-invoices) .rc-month[aria-pressed=true]{background:var(--apcoa-brand-soft)!important;color:var(--apcoa-brand)!important;border-color:var(--apcoa-brand-line)!important;box-shadow:inset 0 -2px var(--apcoa-brand)!important}
body:is(.portal-active,.portal-invoices) #portal-shell .p-nav-horizontal>button,body:is(.portal-active,.portal-invoices) #portal-shell .p-subnav>button,body:is(.portal-active,.portal-invoices) :is(.rc-month strong,.rc-gallery>.rc-tile h3,.rc-kind,.rc-open){color:var(--apcoa-brand)!important}
body:is(.portal-active,.portal-invoices) :is(.cmp-heading-more>summary,.p-page-help>summary,.rc-admin-close,.rc-admin-section>h3,.security-access-heading>strong,.kw-route-blocks .route-web-heading button){color:var(--apcoa-brand)!important}
body #module-administration .rc-admin-form .security-level:has(input:checked){background:var(--apcoa-brand)!important;border-color:var(--apcoa-brand)!important;color:#fff!important}
body #module-administration .rc-admin-form .security-access-state[data-level=edit]{color:var(--apcoa-brand);background:var(--apcoa-brand-soft)}
body:is(.portal-active,.portal-invoices) :is(input[type=checkbox],input[type=radio]),html.apcoa-login-page input[type=checkbox]{accent-color:var(--apcoa-brand)}
html.apcoa-login-page :is(.auth-brand,.auth-brand-name,#security-login>h1,#login>h1){color:var(--apcoa-brand)!important}
body:is(.portal-active,.portal-invoices) #cmp-scroll-top{background:var(--apcoa-brand)!important;border-color:var(--apcoa-brand)!important}
body:is(.portal-active,.portal-invoices) #cmp-scroll-top:hover{background:var(--apcoa-brand-hover)!important}
/* Edge tabs extend underneath the edge instead of leaving a white diagonal notch. */
body:is(.portal-active,.portal-invoices) .cmp-section-rail{left:0;padding-left:0}
body:is(.portal-active,.portal-invoices) .cmp-rail-links{gap:3px;padding:0 6px 2px 0}
body:is(.portal-active,.portal-invoices) .cmp-section-link{width:44px;min-width:44px;padding-left:8px}
body:is(.portal-active,.portal-invoices) .cmp-section-link::before{left:-12px;clip-path:polygon(0 0,100% 0,calc(100% - 10px) 100%,0 100%);background:var(--apcoa-brand)}
body:is(.portal-active,.portal-invoices) .cmp-section-link:is(:hover,:focus-visible)::before{background:var(--apcoa-brand-hover)}
body:is(.portal-active,.portal-invoices) .cmp-section-link[aria-current=location]::before{background:var(--apcoa-brand)}
body:is(.portal-active,.portal-invoices) .cmp-section-link .cmp-rail-number{color:#fff!important;font:800 12px/1 Arial,sans-serif!important;letter-spacing:0}
body:is(.portal-active,.portal-invoices) .cmp-section-link[aria-current=location] .cmp-rail-number{box-shadow:inset 0 -2px #fff}
body:is(.portal-active,.portal-invoices) .cmp-section-link .cmp-rail-label{color:#fff!important;font:700 13px/1.3 Arial,sans-serif!important;transform:none}
body:is(.portal-active,.portal-invoices) #cmp-scroll-top svg path{stroke:#fff;stroke-width:3.6}
@media(max-width:650px){body:is(.portal-active,.portal-invoices) .cmp-rail-toggle{background:var(--apcoa-brand)!important;color:#fff!important}body:is(.portal-active,.portal-invoices) .cmp-section-rail.is-open .cmp-rail-links{left:0;top:40px;padding-top:0;max-height:calc(52vh - 40px)}body:is(.portal-active,.portal-invoices) .cmp-section-rail.is-open .cmp-section-link{width:min(244px,calc(100vw - 32px));height:48px;min-height:48px}}

/* Professional WEB palette: explicit text/status chips, never color-only meaning. */
body.portal-active #module-kw .g5-tools{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
body.portal-active #module-kw .g5-tools>button{padding:12px 16px;border:1px solid #ccd8e6;border-left:4px solid #0a2547;border-radius:10px;background:#fff;color:#0a2547;font-weight:700;min-height:48px}
.g5-notice{padding:10px 14px;border-left:3px solid #708eab;border-radius:6px;background:#f0f4f8;color:#344f6a;font-size:12px;margin:10px 0}
.g5-legend{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 12px;font-size:11px}.g5-legend>span{padding:4px 8px;border-radius:6px;background:#edf0f4;color:#566678}.g5-legend>[data-kind=planned]{background:#e7f4eb;color:#205b3a}.g5-legend>[data-kind=leave]{background:#fff3d9;color:#76551e}.g5-legend>[data-kind=sick]{background:#fbe9ed;color:#87364b}
.g5-review{padding:12px;border:1px solid #dcc696;background:#fffbef;border-radius:10px;margin:12px 0}.g5-review ul{max-height:240px;overflow:auto;font-size:12px}
body.portal-active dialog.g5-rules{position:fixed;inset:0;margin:auto;width:min(820px,calc(100vw - 24px));max-width:820px;max-height:90dvh;overflow:auto;padding:20px;border:1px solid #d2deeb;border-radius:16px;background:#fff;color:#0a2547}
.g5-rules::backdrop{background:#0a254766;backdrop-filter:blur(2px)}.g5-modal-head{display:flex;align-items:center;justify-content:space-between;gap:15px;position:sticky;top:-20px;background:#fff;padding:12px 0;z-index:1}.g5-modal-head h2{margin:0}.g5-rules label{margin:12px 0}.g5-rules form>.p-muted{font-size:12px}.g5-rules form>button{margin-right:8px}.g5-rules [hidden]{display:none!important}
body.portal-active #module-kw .kw-week-cards .kw-day-card{border:1px solid #d5dfeb;border-radius:12px;overflow:hidden;box-shadow:0 3px 12px #0a25470a;background:#fff}
body.portal-active #module-kw .kw-week-cards .kw-day-card>h3{background:#0a2547!important;color:#fff!important;font:700 14px/1.4 "Segoe UI",sans-serif;padding:12px 14px;margin:0;border:0}
body.portal-active #module-kw .kw-week-cards .kw-day-card[data-day-index="5"]>h3{background:#1c5b5b!important}
body.portal-active #module-kw .kw-week-cards .kw-day-card[data-day-index="6"]>h3{background:#535277!important}
body.portal-active #module-kw .kw-day-card td{background:#fff!important;color:#0a2547!important;font-style:normal!important;border:1px solid #e1e8f0!important}
body.portal-active #module-kw .kw-day-card tbody tr:nth-child(even)>td{background:#f6f8fb!important}
body.portal-active #module-kw .kw-day-card .kw-web-heading{background:#eaf0f7!important;font-weight:700!important;color:#0a2547!important}
body.portal-active #module-kw .kw-inline-cell{min-height:38px;border:1px solid #d4dfeb!important;background:#fff!important;color:#0a2547!important;border-radius:7px;padding:7px 8px;font:400 12px/1.4 "Segoe UI",sans-serif;max-width:100%;box-sizing:border-box}
body.portal-active #module-kw .kw-inline-person:disabled{opacity:1!important;font-weight:650;background:#f0f4f8!important;color:#0a2547!important;cursor:default}
body.portal-active #module-kw .kw-inline-region{background:#edf3fa!important}
body.portal-active #module-kw .kw-inline-shift[data-schedule-kind=planned]{background:#e7f4eb!important;border-color:#b7d8c1!important;color:#205b3a!important}
body.portal-active #module-kw .kw-inline-shift[data-schedule-kind=leave]{background:#fff3d9!important;border-color:#e5cc91!important;color:#76551e!important}
body.portal-active #module-kw .kw-inline-shift[data-schedule-kind=sick]{background:#fbe9ed!important;border-color:#e7bbc5!important;color:#87364b!important}
body.portal-active #module-kw .kw-inline-shift[data-schedule-kind=off]{background:#edf0f4!important;color:#566678!important}
body.portal-active #module-kw .kw-week-cards .kw-day-scroll{scrollbar-width:thin;scrollbar-color:#b3c3d6 #f7f9fc}
/* Keep actual names and region labels readable instead of clipping dropdowns. */
body.portal-active #module-kw .kw-week-cards{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0}
@media(min-width:1200px){body.portal-active #module-kw .kw-week-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1800px){body.portal-active #module-kw .kw-week-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
body.portal-active #module-kw .kw-day-card{min-width:0}
body.portal-active #module-kw .kw-day-card table{width:100%;min-width:580px;table-layout:fixed}
body.portal-active #module-kw .kw-day-card thead td:nth-child(1){width:28%}
body.portal-active #module-kw .kw-day-card thead td:nth-child(2){width:20%}
body.portal-active #module-kw .kw-day-card thead td:nth-child(3){width:29%}
body.portal-active #module-kw .kw-day-card thead td:nth-child(4){width:23%}
body.portal-active #module-kw .kw-day-card .kw-web-heading .kw-cell-button{opacity:1!important;color:#0a2547!important;font:700 12px/1.4 "Segoe UI",sans-serif!important;white-space:normal!important;word-break:normal!important;min-height:34px;padding:8px!important;text-align:left!important}
.g5-person-name{display:block;white-space:normal;overflow-wrap:break-word;word-break:normal;font:650 13px/1.5 "Segoe UI",sans-serif;color:#0a2547;padding:8px 6px}
.g5-region-control{display:block;position:relative;box-sizing:border-box;min-height:38px;padding:8px 22px 8px 8px;border:1px solid #d4dfeb;border-radius:7px;background:#edf3fa;color:#0a2547;font:400 12px/1.5 "Segoe UI",sans-serif;white-space:normal;overflow-wrap:break-word;word-break:normal}
.g5-region-control::after{content:"⌄";position:absolute;right:7px;top:8px;pointer-events:none;font-weight:700}
.g5-region-control>select{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;opacity:0!important;margin:0!important;cursor:pointer}
.g5-region-control:focus-within{outline:2px solid #8196b1;outline-offset:2px}.g5-region-control:has(select:disabled){opacity:.55}
.g5-shift-control{background:#fff}
.g5-shift-control:has([data-schedule-kind=planned]){background:#e7f4eb;border-color:#b7d8c1;color:#205b3a}
.g5-shift-control:has([data-schedule-kind=leave]){background:#fff3d9;border-color:#e5cc91;color:#76551e}
.g5-shift-control:has([data-schedule-kind=sick]){background:#fbe9ed;border-color:#e7bbc5;color:#87364b}
.g5-shift-control:has([data-schedule-kind=off]){background:#edf0f4;color:#566678}

body.portal-active dialog.g5-rules.g6-bulk{width:min(1040px,calc(100vw - 24px));max-width:1040px}
.g6-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
.g6-grid>section{min-width:0}.g6-grid h3{margin:8px 0;font-size:15px}.g6-people{max-height:360px;overflow:auto;border:1px solid #d3dfeb;border-radius:10px;padding:5px;background:#f8fafc}
.g6-people label{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;text-align:left!important;align-items:center;gap:10px;padding:10px!important;margin:0!important;border-bottom:1px solid #e4eaf2;cursor:pointer;background:#fff;color:#0a2547!important}
.g6-people label:last-child{border-bottom:0}.g6-people label:has(input:checked){background:#eaf1f8}.g6-people input[type=checkbox]{width:18px!important;height:18px;min-height:0!important;flex:0 0 18px;margin:0!important;accent-color:#0a2547}.g6-people strong{display:block;line-height:1.4;color:#0a2547!important}.g6-people small{display:block;color:#58708a;margin-top:3px;line-height:1.4}.g6-people label>span{min-width:0;overflow-wrap:anywhere;flex:1}
.g6-select-tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:8px 0}.g6-count{font-weight:700;font-size:12px}.g6-bulk form label{display:flex;flex-direction:column;gap:6px}.g6-bulk [hidden]{display:none!important}.g6-bulk .g6-message{padding:10px 12px;background:#eff4f9;border-radius:8px;font-size:13px}.g6-bulk .g6-message:empty{display:none}.g6-preview{margin:14px 0;border:1px solid #cddbe9;border-radius:10px;padding:12px;background:#f7f9fc}.g6-preview ul{max-height:230px;overflow:auto;padding-left:20px}.g6-preview li{padding:5px 0;font-size:12px}.g6-actions{display:flex;gap:8px;flex-wrap:wrap}.g6-empty{font-size:13px;padding:15px}.g6-bulk input:disabled,.g6-bulk button:disabled,.g6-bulk select:disabled{cursor:not-allowed}
@media(max-width:720px){.g6-grid{grid-template-columns:minmax(0,1fr)}.g6-people{max-height:240px}}
