/* ===========================================================================
 EUROPRIM PCC / D5 — UNIFIED ENTERPRISE VISUAL SYSTEM
 Single source of truth for identity & component foundations, not business logic.
 Palette derives from locally approved EUROPRIM navy + red logo.
 =========================================================================== */
:root {
 color-scheme:light;
 --ep-brand-navy:#0b2539;--ep-brand-mid:#17425b;--ep-brand-red:#d50918;
 --ep-brand-red-dark:#ad0915;--ep-background:#eff4f7;--ep-surface:#ffffff;
 --ep-surface-muted:#f5f8fa;--ep-ink:#162d40;--ep-muted:#586f80;
 --ep-stroke:#d9e5ed;--ep-stroke-strong:#a9c0cf;--ep-link:#17577a;
 --ep-positive:#168060;--ep-caution:#9a641f;--ep-danger:#a92735;
 --ep-radius-sm:8px;--ep-radius-md:12px;--ep-radius-lg:18px;
 --ep-shadow:0 12px 32px rgba(15,44,65,.085);
 --ep-shadow-high:0 24px 52px rgba(7,34,55,.14);
 --navy:#0b2539;--navy2:#17425b;--red:#d50918;--accent:#d50918;
 --ink:#162d40;--muted:#586f80;--line:#d9e5ed;--bg:#eff4f7;
 --canvas:#eff4f7;--shadow:0 12px 32px rgba(15,44,65,.085);
}
html{scroll-behavior:smooth}
body.ep-ui:not(.ep-login-page):not(.r5-auth){background:var(--ep-background);color:var(--ep-ink);font-family:'Segoe UI',Arial,sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}
body.ep-ui,body.ep-ui *{box-sizing:border-box}
body.ep-ui :where(h1,h2,h3,h4){font-family:'Segoe UI',Arial,sans-serif;color:var(--ep-ink);letter-spacing:-.023em}
body.ep-ui :where(h1){line-height:1.13;font-weight:780}
body.ep-ui :where(h2){line-height:1.25;font-weight:750}
body.ep-ui :where(p){line-height:1.58}
body.ep-ui :where(a){text-underline-offset:3px}
body.ep-ui :where(a:hover){text-decoration-color:var(--ep-brand-red)}
body.ep-ui :where(a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible){outline:3px solid #dc5260!important;outline-offset:3px!important}
/* Visual baseline for operational page wrappers, leaving diagrams, charts & maps untouched. */
body.ep-ui :where(.panel,.card,.r5-card,.r5-hero,.wf-card,.hub-card,.settings-panel,.fc-panel,.ep-panel,.kpis article,.r5-panel,.ep-role-extra .card){border:1px solid var(--ep-stroke);border-radius:var(--ep-radius-lg);box-shadow:var(--ep-shadow)}
body.ep-ui :where(.panel,.card,.r5-card,.r5-hero,.wf-card,.settings-panel,.fc-panel,.ep-panel,.kpis article,.r5-panel){background-color:#fff}
body.ep-ui :where(.hub-card,.ep-role-modules>a,.ep-role-modules .ep-role-card){transition:transform .17s ease,box-shadow .17s ease,border-color .17s ease}
body.ep-ui :where(.hub-card,.ep-role-modules>a,.ep-role-modules .ep-role-card):hover{transform:translateY(-3px);box-shadow:var(--ep-shadow-high);border-color:#c4d3de}
body.ep-ui :where(.eyebrow,.hub-eyebrow,.fc-eyebrow,.ep-kicker,.r5-kicker,.topline,.ep-overline){letter-spacing:.125em;font-weight:800;text-transform:uppercase}
body.ep-ui :where(.eyebrow,.hub-eyebrow,.fc-eyebrow,.ep-kicker,.r5-kicker){color:var(--ep-brand-red)}
body.ep-ui :where(.notice,.hint,.help,.fc-help,.explanation,.intro p,.heading p){line-height:1.55}
/* Form and data-entry family (keeps checkbox/radio sizes & specific operational states) */
body.ep-ui:not(.ep-login-page):not(.r5-auth) :where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select,textarea){background-color:#fff;color:var(--ep-ink);border:1px solid #b9cbd7;border-radius:var(--ep-radius-sm);box-shadow:0 1px 2px rgba(15,35,49,.04);accent-color:var(--ep-brand-red)}
body.ep-ui:not(.ep-login-page):not(.r5-auth) :where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select,textarea):hover:not(:disabled){border-color:#7199b1}
body.ep-ui:not(.ep-login-page):not(.r5-auth) :where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),select,textarea):disabled{background:#eef2f5;color:#81919b;cursor:not-allowed}
body.ep-ui:not(.ep-login-page):not(.r5-auth) :where(input[type=checkbox],input[type=radio]){accent-color:var(--ep-brand-red)}
body.ep-ui :where(button,a.button,[role=button]){font-family:'Segoe UI',Arial,sans-serif;font-weight:700;transition:background-color .16s,color .16s,border-color .16s,box-shadow .16s,transform .16s}
body.ep-ui :where(button):not(:disabled):active{transform:translateY(1px)}
/* Primary action canon, without changing state / warning / secondary meaning */
body.ep-ui:not(.ep-login-page):not(.r5-auth) :where(button.primary,button.r5-primary,button.ep-primary,button.fc-primary,button.wf-primary,button[type=submit]:not(.secondary):not(.subtle):not(.muted):not(.danger)):not(.ep-submit)){background-color:var(--ep-brand-red);border-color:var(--ep-brand-red);color:#fff;border-radius:var(--ep-radius-sm)}
body.ep-ui:not(.ep-login-page):not(.r5-auth) :where(button.primary,button.r5-primary,button.ep-primary,button.fc-primary,button.wf-primary,button[type=submit]:not(.secondary):not(.subtle):not(.muted):not(.danger)):not(.ep-submit)):hover:not(:disabled){background-color:var(--ep-brand-red-dark);border-color:var(--ep-brand-red-dark);color:#fff;box-shadow:0 5px 13px rgba(213,9,24,.18)}
body.ep-ui :where(.badge,.tag,.chip,.fc-chip){border-radius:999px}
body.ep-ui :where(.tablewrap,.scroller,.r5-table-wrap,.fc-tablewrap){border-radius:var(--ep-radius-md);max-width:100%;}
body.ep-ui :where(table){font-variant-numeric:tabular-nums}
body.ep-ui :where(thead th){font-size:12px;letter-spacing:.016em}
body.ep-ui :where(tbody tr:hover){background-color:rgba(225,238,245,.28)}
body.ep-ui :where(details > summary){outline-offset:3px}
/* Common topmost application chrome */
body.ep-ui:not(.ep-login-page):not(.r5-auth) > header,
body.ep-ui:not(.ep-login-page):not(.r5-auth) > .shell > header.header{
 background:linear-gradient(110deg,var(--ep-brand-navy),#163c54 82%,#20516c);
 color:#fff;border-bottom:3px solid var(--ep-brand-red)}
body.ep-ui:not(.ep-login-page):not(.r5-auth) > header :where(b,strong,small),
body.ep-ui:not(.ep-login-page):not(.r5-auth) > .shell > header.header :where(b,strong,small){color:inherit}
body.ep-ui:not(.ep-login-page):not(.r5-auth) > header img[src*='europrim-logo'],
body.ep-ui:not(.ep-login-page):not(.r5-auth) > .shell > header.header img[src*='europrim-logo']{background:#fff;padding:5px;border-radius:7px;object-fit:contain}
body.ep-ui > footer,body.ep-ui main > footer{color:#718697;font-size:11px}
/* Consistent hero/cover treatments on the three operational main areas */
body.ep-ui .hub-main h1{color:var(--ep-brand-navy)}
body.ep-ui .hub-card{overflow:hidden}
body.ep-ui .hub-card .hub-photo{overflow:hidden}
body.ep-ui .hub-card .hub-photo img{transition:transform .3s ease}
body.ep-ui .hub-card:hover .hub-photo img{transform:scale(1.035)}
body.ep-ui .hub-card:focus-visible{outline:3px solid var(--ep-brand-red);outline-offset:4px}
body.ep-ui .hub-status{border-radius:999px}
body.ep-ui .fc-hero,body.ep-ui .ep-role-hero{border-radius:var(--ep-radius-lg);box-shadow:var(--ep-shadow-high)}
body.ep-ui .ep-role-hero{border-left:5px solid var(--ep-brand-red)}
body.ep-ui .ep-role-copy::before{display:none}
body.ep-ui .ep-role-copy h1,body.ep-ui .fc-hero h1{color:#fff}
body.ep-ui .ep-role-copy .ep-overline{color:#a8cfdf}
body.ep-ui .ep-role-photo{overflow:hidden}
body.ep-ui .ep-role-modules{gap:16px}
body.ep-ui .ep-role-modules :where(a,article){border-radius:var(--ep-radius-md)}
body.ep-ui .ep-role-extra .card{border-radius:var(--ep-radius-lg)}
/* Header/banner images consistently filtered and sized. */
body.ep-ui .ep-role-photo img,body.ep-ui .ep-role-module-photo img{object-fit:cover}
/* Tables and dense workspaces remain flat/readable for field use */
body.ep-ui .matrix-table th:first-child,body.ep-ui .matrix-table td:first-child{background:#fff}
body.ep-ui .matrix-table thead th{background:#eaf1f6}
body.ep-ui .matrix-table thead th:first-child{background:#f4f7f9}
body.ep-ui :where(.fc-tabs,.steps,.taskgroups,.taskGroup,.fc-tablewrap){scrollbar-color:#9cb4c4 transparent}
/* Navigation inherits the same core brand across ALL current role workspaces. */
#ep-global-nav{background:linear-gradient(180deg,#0a2133 0%,#102f45 65%,#081f30 100%)!important;border-right:1px solid #2e4f65!important;box-shadow:4px 0 25px rgba(5,23,38,.11)!important}
#ep-global-nav::before{content:'';height:4px;background:var(--ep-brand-red);position:sticky;top:-17px;margin:-17px -13px 17px;flex:0 0 4px;z-index:2}
#ep-global-nav .epw-logo{display:flex;align-items:center;gap:10px;padding:11px 9px 4px;border-radius:9px}
#ep-global-nav .epw-logo img{width:146px;height:auto;max-height:40px;object-fit:contain;background:#fff;padding:6px;border-radius:7px}
#ep-global-nav .epw-sub{letter-spacing:.06em;text-transform:uppercase;color:#aec9da;margin-top:7px}
#ep-global-nav .epw-home{background:#ffffff0b;border:1px solid #ffffff20}
#ep-global-nav .epw-home:hover{background:#24465d}
#ep-global-nav .epw-finder{background:#ffffff0e;border-color:#426176;color:#dce9f2}
#ep-global-nav .epw-section{border-top-color:#3b5467}
#ep-global-nav .epw-section-title{font-size:12.5px}
#ep-global-nav .epw-link{border-radius:8px;color:#cbdfeb}
#ep-global-nav .epw-link[aria-current=page]{background:#264a61;border-left-color:var(--ep-brand-red);color:#fff}
#ep-global-nav .epw-bottom{border-top-color:#3b5467}
#epnav-toggle{background:#0b2539!important;color:#fff!important;border-color:#45677b!important}
body.ep-ui .epw-crumb{font-size:12px}
/* Login is deliberately cinematic and isolated from white enterprise forms. */
body.ep-ui.ep-login-page .ep-login-card{border:1px solid #ffffff28;box-shadow:0 32px 75px #071a2a65}
body.ep-ui.ep-login-page .ep-login-card::before{background:var(--ep-brand-red)}
body.ep-ui.ep-login-page :where(input,button){font-family:'Segoe UI',Arial,sans-serif}
body.ep-ui.ep-login-page .ep-submit{background:var(--ep-brand-red)}
/* Small-screen ergonomics and reduced-motion accommodation. */
@media(max-width:1050px){body.ep-ui .ep-role-modules{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}}
@media(max-width:780px){body.ep-ui :where(main,.r5-main,.fc-main){max-width:100%}body.ep-ui .ep-role-hero{grid-template-columns:1fr}body.ep-ui .ep-role-photo{max-height:245px}}
@media(max-width:600px){body.ep-ui :where(.panel,.card,.r5-card,.fc-panel){border-radius:12px}body.ep-ui :where(h1){font-size:clamp(26px,7vw,34px)}body.ep-ui .hub-grid{gap:14px}}
@media(prefers-reduced-motion:reduce){body.ep-ui *,body.ep-ui *::before,body.ep-ui *::after{transition-duration:.01ms!important;animation-duration:.01ms!important;scroll-behavior:auto!important}}
/* D5 QA refinements — brand contrast, consistent action hierarchy and workforce chrome */
body.ep-ui.ep-login-page :where(h1,h2,h3){color:#fff}
body.ep-ui.ep-login-page .ep-subtitle{color:#d6e3ed}
body.ep-ui .fc-hero{
 background:linear-gradient(112deg,#0b2539 0%,#17425b 100%);
 padding:23px 26px;border-left:5px solid var(--ep-brand-red);align-items:center;
}
body.ep-ui .fc-hero h1{color:white}
body.ep-ui .fc-hero :where(p:not(.fc-eyebrow),#fc-session){color:#d5e7ef}
body.ep-ui .fc-hero .fc-eyebrow{color:#ffb3ba}
body.ep-ui .fc-hero .fc-hero-actions button:not(.fc-primary){background:#fff;color:#14374d}
body.ep-ui .fc-tabs button[aria-selected=true]{background:#0b2539;border-bottom:3px solid var(--ep-brand-red)}
body.ep-ui.pme2 button:not(.subtle):not(.muted):not(.strong):not(.lookday):not([disabled]),
body.ep-ui .wf-btn:not(.wf-btn-alt):not(.wf-btn-danger):not([disabled]){
 background:var(--ep-brand-red);border-color:var(--ep-brand-red);color:#fff
}
body.ep-ui.pme2 button:not(.subtle):not(.muted):not(.strong):not(.lookday):hover:not([disabled]),
body.ep-ui .wf-btn:not(.wf-btn-alt):not(.wf-btn-danger):hover:not([disabled]){background:var(--ep-brand-red-dark)}
body.ep-ui .wf-head{justify-content:flex-start;gap:18px}
body.ep-ui .wf-head > div{margin-left:0}
body.ep-ui :where(.wf-panel,.fc-card,.fc-kpi){border-radius:var(--ep-radius-lg);border-color:var(--ep-stroke);box-shadow:var(--ep-shadow)}
@media(max-width:700px){body.ep-ui .fc-hero{padding:18px 15px;align-items:flex-start}}
body.ep-ui .fc-hero #fc-session{color:#d5e7ef}
@media(max-width:700px){
 body.ep-ui{overflow-x:clip}
 body.ep-ui.pme2 .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.ep-ui.pme2 .kpis article{min-width:0;overflow:hidden}
 body.ep-ui.pme2 .kpis article strong{overflow-wrap:anywhere;font-size:clamp(17px,5vw,24px)}
 body.ep-ui.pme2 .steps{max-width:100%;overflow-x:auto}
 body.ep-ui .fc-tabs{max-width:100%;overflow-x:auto}
 body.ep-ui>header.top{gap:9px;padding-right:10px!important}
 body.ep-ui>header.top button#logout{font-size:12px;padding:8px!important}
}
@media(max-width:700px){
 body.ep-ui .fc-top{gap:10px;min-height:68px;padding:9px 10px 9px 62px!important}
 body.ep-ui .fc-top img{width:122px;max-width:122px}
 body.ep-ui .fc-top div{min-width:0;flex:1}
 body.ep-ui .fc-top .fc-version{display:none}
}

/* EUROPRIM PCC D7.7 — shared ergonomic and accessible refinements.
   Presentation only: never changes task, payroll, permissions or financial state. */
:root{--ep77-focus:#087fb0;--ep77-border:#d8e1e9;--ep77-ink:#10283b}
html{scroll-behavior:smooth;scroll-padding-top:22px}
html,body{max-width:100%}
body{overflow-wrap:break-word}
:where(button,input,select,textarea,a,summary,[tabindex]):focus-visible{
 outline:3px solid var(--ep77-focus)!important;outline-offset:3px!important;
 box-shadow:0 0 0 5px rgba(8,127,176,.13);
}
:where(input,select,textarea):disabled{opacity:.68;cursor:not-allowed}
:where(button,[role=button]):disabled{cursor:not-allowed;opacity:.62}
:where(label){overflow-wrap:anywhere}
:where(.tablewrap,.table-wrap,.table-responsive){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
:where(table){font-variant-numeric:tabular-nums}
:where(.epw-quick-panel){max-height:min(80vh,740px);overflow-y:auto}
.epw-logout{display:block;width:calc(100% - 24px);margin:14px 12px 20px;padding:12px 15px;
 text-align:left;background:transparent;color:#f6dbe0;border:1px solid #758895;border-radius:9px;
 font:600 14px 'Segoe UI',Arial,sans-serif;cursor:pointer}
.epw-logout:hover{background:rgba(255,255,255,.10);color:white}
@media(max-width:700px){
 body{overflow-x:hidden}
 main{min-width:0}
 :where(button,select,input:not([type=checkbox]):not([type=radio])){touch-action:manipulation}
 :where(input,select,textarea){max-width:100%}
 .epw-logout{min-height:44px}
}
@media(prefers-reduced-motion:reduce){
 html{scroll-behavior:auto}
 *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
@media print{.epw-nav,.epw-toggle,.epw-overlay,.epw-quick,.epw-logout{display:none!important}
 body.epnav-active{padding-left:0!important}}
