/* ---------- Left menu: icons, open / closed (icons only) / pinned ---------- */
.sidehead{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px}
/* The round Hyrex icon opens the menu; a thin light ring shows it on the navy menu */
.navicon{flex:none;width:36px;height:36px;padding:0;margin:0;border:0;border-radius:50%;background:none;cursor:pointer;line-height:0;box-shadow:0 0 0 1px rgba(255,255,255,.45);transition:box-shadow .2s}
.navicon svg{width:36px;height:36px;display:block}
.navicon:hover{box-shadow:0 0 0 2px #DDFF54}
.navicon:focus-visible,.pinicon:focus-visible,.topbell:focus-visible{outline:3px solid var(--lime);outline-offset:2px}
/* The small pin on the right: lime while the menu is kept open */
.pinicon{flex:none;width:34px;height:34px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;color:#fff;opacity:.85;cursor:pointer;transition:background-color .2s,color .2s,opacity .2s}
.pinicon:hover{opacity:1;background:var(--side-line)}
.pinicon[aria-pressed="true"]{color:#DDFF54;opacity:1}
.pinicon .pin-panel{fill:transparent;transition:fill .2s}
.pinicon[aria-pressed="true"] .pin-panel{fill:currentColor}
.mb-mob{display:none}
.navbackdrop{display:none}
.nav button{justify-content:flex-start;padding:9px 14px}
.nav .nic,.prev .nic{flex:none;display:inline-grid;place-items:center;width:20px;height:20px}
.nav .nic svg,.prev .nic svg{width:20px;height:20px}
.nav .nlab{flex:1;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav .cnt{flex:none;min-width:20px;text-align:center;line-height:18px;padding:0 6px}
.prev button{display:inline-flex;align-items:center;gap:6px}
.prev .nic,.prev .nic svg{width:16px;height:16px}
@media (min-width:861px){
  /* One layout for open and closed: the icons stay in the same place, only the width changes (smoothly) */
  .shell{grid-template-columns:218px minmax(0,1fr)}
  .shell>.main{grid-column:2}
  /* contain: opening the menu only re-lays out the menu itself, never the page beside it */
  .side{width:208px;padding:20px 6px 18px;z-index:50;contain:layout paint style;transition:width .2s ease-out}
  .sidehead{padding:0 5px;min-height:32px}
  .side .nav{align-items:stretch;margin-right:0;padding:24px 5px 4px}
  .side .nav button{min-height:32px;padding:6px 12px 6px 6px;gap:10px}
  .side .prev,.side .co{margin-left:5px;margin-right:5px}
  .navicon{display:none}
  /* closed: icons only, a slim strip */
  .shell.rail{grid-template-columns:64px minmax(0,1fr)}
  .shell.rail .side{width:54px}
  .shell.rail:not(.navover) .side .pinicon,.shell.rail:not(.navover) .side .logo,.shell.rail:not(.navover) .side .nlab,.shell.rail:not(.navover) .side .subnav,
  .shell.rail:not(.navover) .side .stg,.shell.rail:not(.navover) .side .co,.shell.rail:not(.navover) .side .prev small{display:none}
  .shell.rail:not(.navover) .navicon{display:block;width:32px;height:32px}
  .shell.rail:not(.navover) .navicon svg{width:32px;height:32px}
  .shell.rail:not(.navover) .side .nav{align-items:flex-start}
  .shell.rail:not(.navover) .side .navgroup{align-items:flex-start}
  .shell.rail:not(.navover) .side .nav button,.shell.rail:not(.navover) .side .navgroup>button{width:32px;height:32px;padding:6px;position:relative;overflow:visible}
  /* the number sits on the icon's corner, fully inside the strip */
  .shell.rail:not(.navover) .side .cnt{position:absolute;top:-5px;right:-4px;min-width:16px;line-height:15px;padding:0 4px;font-size:10px;box-shadow:0 0 0 1.5px var(--side)}
  .shell.rail:not(.navover) .side .prev div{flex-direction:column;align-items:flex-start}
  .shell.rail:not(.navover) .side .prev button{padding:8px;width:32px;height:32px;justify-content:center}
  /* opened while unpinned (pointing at it, or the round icon): it widens over the page, the page stays where it is */
  .shell.rail.navover .side{width:208px;box-shadow:0 18px 50px rgba(10,26,58,.35)}
  .shell.rail.navopening .side .nlab,.shell.rail.navopening .side .logo,.shell.rail.navopening .side .pinicon,.shell.rail.navopening .side .co,
  .shell.rail.navopening .side .stg,.shell.rail.navopening .side .prev small,.shell.rail.navopening .side .cnt{animation:navfade .2s ease-out}
}
@keyframes navfade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.side,.shell.rail.navover .side *{transition:none!important;animation:none!important}}
@media (prefers-reduced-motion:reduce){.shell{transition:none}}
/* Bottom bar and More sheet: phone only */
.bbar,.bsheet{display:none}
/* phone More sheet: the sub menu pop-up of Payroll and Maintenance (centred, white, rounded; × or tap outside closes) */
.bsubpop{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:16px}
.bsubpop[hidden]{display:none}
.bsubbg{position:absolute;inset:0;background:rgba(10,26,58,.45)}
.bsubcard{position:relative;width:min(320px,100%);background:#fff;color:var(--fg);border-radius:18px;padding:14px 16px 16px;box-shadow:0 24px 60px rgba(10,26,58,.3);display:flex;flex-direction:column;gap:8px}
.bsubcard .dph{margin:0 0 4px}
.bsubcard h3{margin:0;color:#0a1a3a}
.bsubbtn{border:1px solid var(--line);background:#fff;color:#0a1a3a;font:500 16px/1.2 var(--sans);border-radius:100px;padding:12px 16px;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent}
.bsubbtn:active:not([aria-current]){background:rgba(190,215,234,.35)}
.bsubbtn[aria-current]{background-image:linear-gradient(90deg,#DDFF54,#002233);color:#fff;border-color:transparent;font-weight:600}
/* ---------- Phone: top bar (logo, bell, round icon) and a bar of icons at the bottom; More opens a sheet from the bottom ---------- */
@media (max-width:860px){
  .side{position:sticky;top:0;z-index:40;flex-direction:row;align-items:center;justify-content:space-between;margin:0;border-radius:0 0 14px 14px;padding:10px max(14px,env(safe-area-inset-right,0px)) 10px max(14px,env(safe-area-inset-left,0px))}
  .side>.nav,.side>.prev,.side>.co{display:none}
  .sidehead{width:100%;justify-content:space-between}
  .sidehead .logo{display:flex}
  .sidehead .logo svg{width:96px}
  .sidehead>.navicon,.pinicon{display:none}
  .mb-mob{display:flex;align-items:center;gap:10px}
  .topbell{position:relative;width:38px;height:38px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:#002233;color:#fff;cursor:pointer}
  .topbell .nic,.topbell .nic svg{width:20px;height:20px;display:block}
  .topicon{display:block;width:38px;height:38px}
  .topicon svg{width:38px;height:38px}
  .topbell .bdot{position:absolute;top:6px;right:7px}
  .main{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
  /* no page scrollbar on phones: it took a strip down the right and stopped the bottom bar reaching the edge */
  html{scrollbar-width:none}
  html::-webkit-scrollbar{display:none;width:0;height:0}
  /* the top bar (logo, bell, round icon) only on the first page (Live / Overview); inside the app the page title is at the top */
  .shell:not(.home) .side{height:0;min-height:0;padding:0;background:transparent;box-shadow:none}
  .shell:not(.home) .sidehead{display:none}
  .shell:not(.home) .main{padding-top:max(20px,env(safe-area-inset-top,0px))}
  /* the bar */
  .bbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:2;background:var(--side);border-radius:0;
    padding:6px max(6px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(6px,env(safe-area-inset-left,0px));box-shadow:0 -6px 24px rgba(10,26,58,.18)}
  .btab{flex:1 1 0;min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px 0;border:0;background:none;color:var(--side-fg);font:inherit;font-size:11px;cursor:pointer}
  .btab .nic{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;transition:background-color .2s}
  .btab .nic svg{width:21px;height:21px}
  .btab .blab{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .btab[aria-current="page"]{color:#fff;font-weight:600}
  .btab[aria-current="page"] .nic{background-image:linear-gradient(90deg,#DDFF54,#002233);color:#fff}
  .bbar .cnt{position:absolute;top:0;left:calc(50% + 8px);min-width:17px;line-height:15px;padding:0 5px;font-size:10px;text-align:center;box-shadow:0 0 0 2px var(--side)}
  .bdot{position:absolute;top:4px;left:calc(50% + 13px);width:9px;height:9px;border-radius:50%;background-image:linear-gradient(90deg,#DDFF54,#B5D14F);box-shadow:0 0 0 2px var(--side)}
  /* More: a sheet that slides up from the bottom */
  .bsheet{display:block;position:fixed;left:0;right:0;bottom:0;z-index:3;max-height:80dvh;overflow-y:auto;background:var(--side);color:var(--side-fg);border-radius:22px 22px 0 0;
    padding:8px max(16px,env(safe-area-inset-right,0px)) calc(18px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));
    box-shadow:0 -18px 50px rgba(10,26,58,.35);transform:translateY(105%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s}
  .shell.navover .bsheet{transform:none;visibility:visible;transition:transform .25s ease}
  .bgrip{width:40px;height:4px;border-radius:4px;background:var(--side-line);margin:4px auto 14px}
  .bgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
  .btile{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 4px 12px;border:0;border-radius:16px;background:#002233;color:#fff;font:inherit;font-size:13px;cursor:pointer;position:relative}
  .btile .nic svg{width:24px;height:24px}
  .btile[aria-current="page"]{background-image:linear-gradient(90deg,#DDFF54,#002233);font-weight:600}
  .btile .cnt{position:absolute;top:8px;right:10px;font-size:10px;padding:0 6px;line-height:16px}
  .bfoot{margin-top:16px;padding-top:14px;border-top:1px solid var(--side-line);display:flex;flex-direction:column;gap:10px}
  .bgrip+.bfoot{margin-top:0;padding-top:0;border-top:0}
  .bfoot small{font-size:12px;opacity:.8}
  .bfoot>div{display:flex;gap:8px;flex-wrap:wrap}
  .bfoot button{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:100px;background:#002233;color:#fff;padding:9px 16px;font:inherit;font-size:14px;cursor:pointer}
  .bfoot button .nic,.bfoot button .nic svg{width:18px;height:18px}
  .bsheet .prev.stg{margin-top:14px;display:flex}
  .shell.navover .navbackdrop{display:block;position:fixed;inset:0;z-index:1;background:rgba(10,26,58,.35)}
  /* Pressing a menu item: no square browser flash; a round, faded sky-blue highlight instead */
  *{-webkit-tap-highlight-color:transparent}
  /* pressing a bottom-bar item: a faded sky circle over the icon and its title, which then fades as the page opens */
  .btab::before{content:"";position:absolute;left:50%;top:50%;width:80px;height:80px;margin:-40px 0 0 -40px;border-radius:50%;background:rgba(190,215,234,.28);opacity:0;transform:scale(.85);transition:opacity .35s ease,transform .35s ease;pointer-events:none}
  .btab.press::before{opacity:1;transform:none;transition:opacity .08s ease,transform .12s ease}
  .btile:active:not([aria-current="page"]),.bfoot button:active{background-color:rgba(190,215,234,.28)}
  .sidehead button:active{background-color:rgba(190,215,234,.28);border-radius:50%}
  .phback:active{background-color:rgba(190,215,234,.55)}
}
/* Installed on a phone (home-screen app): pulling down never reloads the page, like a real app */
@media (display-mode:standalone){html,body{overscroll-behavior-y:none}}
@media (prefers-reduced-motion:reduce){.bsheet{transition:none!important}}
/* Calendar day pop-up, Worked list: the same columns on every row so late, idle and hours line up */
.dprw{display:grid;grid-template-columns:minmax(0,1fr) 108px 58px;align-items:center;column-gap:10px}
.dprw.adm{grid-template-columns:minmax(0,1fr) 108px 96px 58px}
.dprw .who{min-width:0}
.dprw .who u{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dprw .c-late,.dprw .c-idle{display:flex;justify-content:flex-start}
.dprw .c-hrs{text-align:right;font-variant-numeric:tabular-nums}
.dprw .pill{white-space:nowrap}
.dprw .pill.gh{display:none}
.dp .dpr{min-height:44px}
.dpg .dps:has(.dprw){grid-column:1/-1} /* Worked spans the full width of the pop-up */
.dprw{grid-template-columns:minmax(0,1fr) 130px 70px}
.dprw.adm{grid-template-columns:minmax(0,1fr) 130px 120px 70px}
/* Notifications list: the same three columns on every row, so the Approve / Decline buttons and dates line up */
.al.nrow{display:grid;grid-template-columns:minmax(0,1fr) 210px 150px;align-items:center;gap:16px}
.nrow .ndo{display:flex;justify-content:flex-start}
.nrow .ndo .acts{display:flex;gap:8px;flex-wrap:nowrap;margin:0}
.nrow .ndo .btn{min-width:96px;justify-content:center;text-align:center}
.nrow .ndate{text-align:right;white-space:nowrap}
