/* Navy + teal, left sidebar, Inter throughout (Montserrat only for the HRView wordmark), compact SaaS density. Light theme via the Theme button. */
:root {
  --bg: #06111f; --bg-glow: rgba(35, 213, 196, .10); --side: rgba(5, 14, 27, .92);
  --surface: #0c1d33; --surface-2: #10263f; --sunk: #091829; --line: #1b3956; --line-teal: rgba(47, 227, 207, .30);
  --ink: #eaf4fb; --muted: #8fa8be;
  --accent: #2fe3cf; --accent-2: #1f8fd6; --accent-soft: rgba(47, 227, 207, .12); --on-accent: #032421; --blue: #60a5fa;
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .14); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .14);
  --crit: #f87171; --crit-soft: rgba(248, 113, 113, .14); --idle: #a78bfa; --idle-soft: rgba(167, 139, 250, .16);
  --map-bg: #0a1b2f; --map-road: #17324f;
  --f-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-brand: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --f-print: "IBM Plex Sans", system-ui, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 10px; --logo-a: #ffffff; --logo-b: #22b3a9;
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f3f6fa; --bg-glow: rgba(14, 159, 148, .08); --side: rgba(255, 255, 255, .96);
  --surface: #ffffff; --surface-2: #f8fafc; --sunk: #f2f5f9; --line: #d8e0ea; --line-teal: rgba(14, 159, 148, .35);
  --ink: #102030; --muted: #586a7d;
  --accent: #0b8f86; --accent-2: #1d6fd1; --accent-soft: rgba(11, 143, 134, .12); --on-accent: #ffffff; --blue: #2563eb;
  --ok: #15803d; --ok-soft: rgba(21, 128, 61, .12); --warn: #b45309; --warn-soft: rgba(180, 83, 9, .12);
  --crit: #c2331f; --crit-soft: rgba(194, 51, 31, .1); --idle: #6d28d9; --idle-soft: rgba(109, 40, 217, .1);
  --map-bg: #e8eef5; --map-road: #ffffff; --logo-a: #00203f; --logo-b: #017670;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); font: 14px/1.5 var(--f-body); font-feature-settings: "cv11", "ss01";
  background: var(--bg); min-height: 100vh;
}
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
h2 { font-size: .95rem; font-weight: 600; }
h3 { font-size: .875rem; font-weight: 600; }
.num, td.n { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-size: .86em; }
.muted { color: var(--muted); }
.eyebrow { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 16px; padding: 18px 12px; background: var(--side); border-right: 1px solid var(--line); }
.brand { border: 0; background: none; padding: 0 6px; cursor: pointer; display: grid; gap: 6px; text-align: left; }
.logo { width: 128px; height: auto; display: block; }
.product { font-family: var(--f-brand); font-weight: 800; font-size: 1.05rem; }
.product span { color: var(--accent); }
.tabs { display: flex; flex-direction: column; gap: 2px; }
.navsec { display: flex; flex-direction: column; gap: 2px; }
.navgroup { display: flex; align-items: center; justify-content: space-between; width: 100%; border: 0; background: none; cursor: pointer; font: 600 .68rem/1.4 var(--f-body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 10px 4px; }
.navgroup::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -3px 2px 0; opacity: .7; transition: transform .15s; }
.navgroup[aria-expanded="false"]::after { transform: rotate(-45deg); margin-top: 0; }
.navgroup:hover { color: var(--ink); }
.tab { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 10px; border-radius: 7px; color: var(--muted); font-size: .875rem; font-weight: 500; line-height: 1.43; cursor: pointer; text-align: left; white-space: nowrap; }
.tab:hover { color: var(--ink); background: rgba(127, 127, 127, .07); }
.tab[aria-selected="true"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tab .count { margin-left: auto; font-size: .7rem; line-height: 1.5; padding: 0 6px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.pilot { margin-top: auto; padding: 16px; border-radius: 12px; background: linear-gradient(160deg, rgba(47, 227, 207, .14), rgba(31, 143, 214, .08)); border: 1px solid var(--line-teal); display: grid; gap: 8px; font-size: .85rem; }
.pilot strong { font-family: var(--f-display); font-size: .95rem; font-weight: 600; line-height: 1.3; }
.pilot .eyebrow { color: var(--accent); }
.side-foot { font-size: .75rem; color: var(--muted); padding-inline: 6px; }

/* A column whose footer always sits at the bottom of the window, however short the page. */
.maincol { min-width: 0; padding: 18px 28px 48px; display: flex; flex-direction: column; gap: 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; min-height: 40px; }
.top > div:first-child { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; min-width: 0; }
.top h1 { font-size: 1.375rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.top .sub { color: var(--muted); margin: 0; font-size: .85rem; }
.topRight { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.company { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: .8125rem; }
.chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 99px; font-size: .72rem; font-weight: 600; white-space: nowrap; background: var(--accent-soft); color: var(--accent); }

@media (max-width: 900px) {
  .app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .maincol { flex: 1 0 auto; }
  .side { position: sticky; top: 0; z-index: 5; height: auto; gap: 10px; padding: 12px 16px 6px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: flex; align-items: center; gap: 10px; padding: 0; }
  .logo { width: 112px; } .product { font-size: 1rem; }
  .tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; }
  .tabs::-webkit-scrollbar { display: none; }
  .navgroup, .pilot, .side-foot { display: none; }
  .tab { padding: 7px 10px; gap: 8px; font-size: .875rem; }
  .navsec { display: contents; }
  .maincol { padding: 14px 16px 40px; gap: 14px; }
  .company .eyebrow { display: none; }
  input, select, textarea { font-size: 16px; }
}

.view { display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
html[data-theme="light"] .panel, html[data-theme="light"] .kpi { box-shadow: 0 1px 2px rgba(16, 32, 48, .06); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.panel-head p { margin: 0; color: var(--muted); font-size: .8125rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; min-width: 0; align-content: start; }
.kpi .kh { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); }
.kpi .kh svg.i { width: 15px; height: 15px; color: var(--accent); }
.kpi .v { white-space: nowrap; font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.kpi.warn .v { color: var(--warn); } .kpi.crit .v { color: var(--crit); } .kpi.ok .v { color: var(--ok); }
.kpi .l { font-weight: 500; font-size: .8125rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: .75rem; color: var(--muted); }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 10px 12px; } .kpi .v { font-size: 1.25rem; } }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alert { display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px 8px 0; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.alert .stripe { align-self: stretch; background: var(--accent); }
.alert.crit .stripe { background: var(--crit); } .alert.warn .stripe { background: var(--warn); } .alert.idle .stripe { background: var(--idle); }
.alert .t { font-weight: 600; font-size: .8125rem; }
.alert .d { font-size: .75rem; color: var(--muted); }

.btn { border: 1px solid var(--line); background: var(--surface-2); min-height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .8125rem; line-height: 1.2; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); color: var(--on-accent); }
.btn.sm { min-height: 26px; padding: 0 9px; font-size: .75rem; border-radius: 7px; }
.btn.ok { border-color: var(--ok); color: var(--ok); } .btn.no { color: var(--crit); }
.btn.danger { border-color: var(--crit); color: var(--crit); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg.i { width: 15px; height: 15px; }
.linkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; font-size: inherit; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; }
.acts.nw { flex-wrap: nowrap; }
td.nw { white-space: nowrap; }
select.st-Active { border-color: var(--ok) !important; color: var(--ok); }
select.st-Completed { border-color: var(--line-teal) !important; color: var(--accent); }
select.st-Inactive { color: var(--muted); }

.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .72rem; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.crit { background: var(--crit-soft); color: var(--crit); } .pill.idle { background: var(--idle-soft); color: var(--idle); }
.pill.info { background: var(--accent-soft); color: var(--accent); } .pill.none { color: var(--muted); border: 1px solid var(--line); }

.tbl-wrap { overflow-x: auto; margin-inline: -4px; }
table { border-collapse: collapse; width: 100%; font-size: .8125rem; }
th { text-align: left; font-size: .75rem; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sunk); }
thead th:first-child { border-top-left-radius: 6px; } thead th:last-child { border-top-right-radius: 6px; }
td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.4; }
tbody tr:hover td { background: rgba(127, 127, 127, .06); }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
td .sub { display: block; font-size: .72rem; color: var(--muted); }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
tr.clickable { cursor: pointer; }
td input.cell { width: 70px; text-align: right; background: var(--sunk); border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; }
td select.cell { background: var(--sunk); border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; }
.who { display: flex; align-items: center; gap: 8px; min-width: 160px; }
.av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; font-weight: 600; flex: none; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line-teal); }
.selfie { width: 36px; height: 36px; border-radius: 9px; object-fit: cover; display: grid; place-items: center; border: 1px solid var(--line-teal); cursor: zoom-in; padding: 0; font-size: .7rem; font-weight: 700; color: #fff; background: linear-gradient(150deg, hsl(var(--h, 180) 45% 42%), hsl(calc(var(--h, 180) + 40) 50% 26%)); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label, .field > span { font-size: .8125rem; color: var(--muted); font-weight: 500; }
input[type="search"], input[type="text"], input[type="number"], input[type="date"], input[type="time"], input[type="month"], input[type="email"], input[type="tel"], input[type="password"], select, textarea { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; min-height: 34px; min-width: 0; color: var(--ink); }
.pwWrap { position: relative; display: grid; }
.pwWrap input { width: 100%; padding-right: 42px; }
.pwEye { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 34px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.pwEye:hover { color: var(--ink); }
.pwEye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pwEye svg.i { width: 17px; height: 17px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.filters input[type="search"] { width: min(300px, 100%); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--sunk); flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: .8125rem; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.form { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .form-row, .form-row.three { grid-template-columns: minmax(0, 1fr); } }
.form input, .form select, .form textarea { width: 100%; }
.form input[type="checkbox"], .form input[type="radio"] { width: auto; flex: none; accent-color: var(--accent); }
.form input[type="range"] { accent-color: var(--accent); }
.hint { font-size: .75rem; color: var(--muted); margin: 0; }
.err { font-size: .82rem; color: var(--crit); margin: 0; min-height: 1.2em; }

.nowList { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nowList li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); font-size: .87rem; }
.nowList .n2 { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; color: var(--accent); }
.nowList .ppl { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dates li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); font-size: .87rem; }
.dates .dd { text-align: center; font-family: var(--f-display); font-weight: 700; line-height: 1.05; color: var(--accent); }
.dates .dd small { display: block; font-size: .64rem; font-family: var(--f-body); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.dates .d { color: var(--muted); font-size: .78rem; }

/* Maps (schematic SVG, no tiles) */
.mapsvg { width: 100%; height: auto; display: block; border-radius: 12px; background: var(--map-bg); border: 1px solid var(--line); }
.mapsvg .road { stroke: var(--map-road); stroke-width: 7; fill: none; stroke-linecap: round; }
.mapsvg .road.thin { stroke-width: 3; }
.mapsvg .fence { fill: rgba(47, 227, 207, .12); stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 5; }
.mapsvg .site { fill: var(--accent); }
.mapsvg .me { fill: var(--blue); stroke: #fff; stroke-width: 3; }
.mapsvg .me.out { fill: var(--crit); }
.mapsvg .pulse { fill: var(--blue); opacity: .25; }
.mapsvg .pulse.out { fill: var(--crit); }
.mapsvg text { font: 600 11px var(--f-body); fill: var(--muted); }
.mapsvg text.lbl { fill: var(--ink); font-size: 12px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .85rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; }
.siteForm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 18px; align-items: start; }
@media (max-width: 760px) { .siteForm { grid-template-columns: minmax(0, 1fr); } }

/* Staff app (phone) */
.phoneWrap { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1000px) { .phoneWrap { grid-template-columns: minmax(0, 1fr); } }
.phone { border: 10px solid #0b1422; border-radius: 38px; background: var(--bg); box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--line); overflow: hidden; max-width: 390px; width: 100%; justify-self: center; }
html[data-theme="light"] .phone { border-color: #1d2a3a; }
.phone .scr { padding: 16px 16px 22px; display: grid; gap: 12px; }
.phone .notch { height: 22px; display: flex; justify-content: space-between; padding: 0 22px; font-size: .74rem; font-weight: 600; align-items: center; color: var(--muted); background: var(--side); }
.phone select, .phone input { width: 100%; }
.clockBig { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.clockBig .t { font-family: var(--f-display); font-size: 2.2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.clockBig input[type="time"] { width: 120px; }
.step { display: grid; gap: 6px; }
.step > span { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.step > span b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .7rem; margin-right: 6px; }
.step.done > span b { background: var(--ok); color: var(--on-accent); }
.camRow { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; }
.camBox { width: 112px; height: 112px; border-radius: 14px; overflow: hidden; background: var(--sunk); border: 1px dashed var(--line-teal); display: grid; place-items: center; position: relative; }
.camBox video, .camBox img { width: 100%; height: 100%; object-fit: cover; }
.camBox video { transform: scaleX(-1); }
.camBox .ph { color: var(--muted); font-size: .72rem; text-align: center; display: grid; gap: 4px; justify-items: center; }
.camBox .ph svg { width: 28px; height: 28px; }
.camBtns { display: grid; gap: 6px; }
.statusBox { border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; font-size: .88rem; border: 1px solid var(--line); background: var(--sunk); }
.statusBox.in { border-color: var(--ok); background: var(--ok-soft); }
.statusBox.out { border-color: var(--crit); background: var(--crit-soft); }
.statusBox.field { border-color: var(--warn); background: var(--warn-soft); }
.statusBox b { display: block; }
.clockBtn { width: 100%; border: 0; border-radius: 14px; padding: 15px; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; cursor: pointer; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
.clockBtn.outBtn { background: linear-gradient(90deg, #fb923c, #f43f5e); color: #fff; }
.clockBtn:disabled { opacity: .45; cursor: not-allowed; }
.miniCards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.miniCards div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; font-size: .72rem; color: var(--muted); }
.miniCards b { display: block; font-family: var(--f-display); font-size: 1.15rem; color: var(--ink); }
.explain { display: grid; gap: 12px; }
.explain ol { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); font-size: .9rem; }
.explain ol b { color: var(--ink); }

/* Modal + paper documents (payslip, EA form) */
.modal { position: fixed; inset: 0; background: rgba(2, 8, 16, .72); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal .box { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line-teal); border-radius: 16px; padding: 18px; display: grid; gap: 14px; }
.modal .box.wide { width: min(920px, 100%); }
.modal .mbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal .mbar .acts { display: flex; gap: 8px; }
.bigSelfie { width: min(320px, 100%); border-radius: 14px; display: block; margin: 0 auto; }
.paper { background: #fff; color: #14202c; border-radius: 6px; padding: 28px; font-size: 12.5px; line-height: 1.45; font-family: var(--f-print); }
.paper h1, .paper h2, .paper h3 { font-family: "Montserrat", var(--f-print); letter-spacing: 0; }
.paper h3 { font-size: 15px; color: #00203f; }
.paper .ph { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #00203f; padding-bottom: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.paper .ph .r { text-align: right; }
.paper .meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 24px; margin-bottom: 14px; }
.paper .meta div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dotted #c9d3dd; padding: 2px 0; }
.paper .meta span { color: #5a6b7c; }
.paper .cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.paper table { font-size: 12.5px; }
.paper th { color: #5a6b7c; border-bottom: 1px solid #c9d3dd; padding: 5px 6px; background: #f2f5f8; }
.paper td { border-bottom: 1px solid #e3e9ef; padding: 5px 6px; }
.paper tfoot td { border-top: 1px solid #00203f; }
.paper .net { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #e6f6f4; border: 1px solid #017670; border-radius: 6px; font-weight: 700; font-size: 15px; color: #00203f; }
.paper .small { font-size: 11px; color: #5a6b7c; }
.paper .sec { background: #00203f; color: #fff; font-weight: 700; padding: 4px 8px; margin: 14px 0 4px; font-size: 12px; }
.paper .line { display: grid; grid-template-columns: 34px minmax(0, 1fr) 120px; gap: 8px; padding: 4px 6px; border-bottom: 1px solid #e3e9ef; }
.paper .line .a { text-align: right; font-variant-numeric: tabular-nums; }
.paper .line.tot { font-weight: 700; border-top: 1px solid #00203f; }
@media (max-width: 600px) { .paper { padding: 16px; } .paper .meta, .paper .cols2 { grid-template-columns: minmax(0, 1fr); } }

.profile { display: grid; gap: 14px; }
.profHead { display: flex; gap: 14px; align-items: center; }
.profHead .av { width: 56px; height: 56px; font-size: 1rem; }
.profGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 600px) { .profGrid { grid-template-columns: minmax(0, 1fr); } }
.profGrid section { background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }

.note { padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--line-teal); color: var(--muted); font-size: .88rem; margin: 0; }
.note b { color: var(--ink); }
.rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rates div { background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .85rem; color: var(--muted); display: grid; gap: 4px; }
.rates b { color: var(--ink); font-family: var(--f-display); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-teal); padding: 10px 16px; border-radius: 10px; font-weight: 500; font-size: .9rem; z-index: 60; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.foot { margin-top: auto; color: var(--muted); font-size: .8rem; display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.empty { padding: 22px 10px; text-align: center; color: var(--muted); font-size: .9rem; }

@media print {
  body { background: #fff; }
  .app, .toast { display: none !important; }
  .modal { position: static; background: none; padding: 0; display: block; }
  .modal .box { border: 0; padding: 0; max-height: none; overflow: visible; width: 100%; background: #fff; }
  .modal .mbar { display: none; }
  .paper { padding: 0; }
}

/* ---------- Real app additions ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.authBox { width: min(420px, 100%); display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.authBox .brandRow { display: flex; align-items: center; gap: 12px; }
.authBox .logo { width: 130px; }
.authBox h1 { font-size: 1.4rem; }
.authBox .links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .88rem; }
.authBox input { width: 100%; }
.btn.block { width: 100%; justify-content: center; min-height: 40px; font-size: .875rem; }
.userBox { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunk); font-size: .82rem; }
.userBox b { font-size: .9rem; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.banner { display: flex; gap: 6px 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 7px 12px; border-radius: 8px; font-size: .8125rem; border: 1px solid var(--line); background: var(--sunk); }
.banner.warn { border-color: var(--warn); background: var(--warn-soft); }
.banner.crit { border-color: var(--crit); background: var(--crit-soft); }
.banner.ok { border-color: var(--ok); background: var(--ok-soft); }
.linkBox { display: grid; gap: 10px; }
.linkBox input { width: 100%; font-family: var(--f-mono); font-size: .8rem; }
.clockCard { max-width: 460px; width: 100%; display: grid; gap: 14px; }
.camBox.big { width: 100%; height: auto; aspect-ratio: 1; max-width: 260px; justify-self: center; }
.shiftList { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shiftList li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--sunk); font-size: .87rem; }
.balCards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.balCards div { background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; font-size: .8rem; color: var(--muted); }
.balCards b { display: block; font-family: var(--f-display); font-size: 1.5rem; color: var(--ink); }
.thumb { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line-teal); cursor: zoom-in; display: block; background: var(--sunk); }
.inl { display: inline-flex; gap: 6px; align-items: center; }
.small { font-size: .8rem; }
.right { margin-left: auto; }
.mt { margin-top: 12px; }
/* Phones: keep the clock near the top. Name and company move out of the way; sign-out becomes an icon. */
@media (max-width: 900px) {
  .userBox, .top .sub, .company { display: none; }
  .top { flex-wrap: nowrap; align-items: center; }
  .top h1 { font-size: 1.35rem; }
  #logoutBtn span { display: none; }
  .clockBig .t { font-size: 2.4rem; }
}
.shiftList .sub { display: block; font-size: .76rem; color: var(--muted); }
/* Plain, password and phone inputs get the same look as the other fields. */
input:not([type]), input[type="password"], input[type="tel"], input[type="email"], input[type="datetime-local"] { background: var(--sunk); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; min-width: 0; color: var(--ink); }

/* ---------- Alignment ---------- */
/* Lists with columns: every row uses the same grid so times, hours and buttons line up. */
.shiftList.rows3 li { display: grid; grid-template-columns: minmax(0, 1fr) 118px 118px; gap: 4px 14px; align-items: center; }
.shiftList.rows2 li { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 4px 14px; align-items: center; }
.shiftList .c { text-align: center; white-space: nowrap; }
.shiftList .r { text-align: right; justify-self: end; }
.shiftList .num { font-variant-numeric: tabular-nums; }
/* Table action buttons sit in fixed slots, so the same button is in the same place on every row. */
.slots { display: grid; grid-template-columns: 52px 74px 68px; gap: 6px; justify-items: stretch; }
.slots.s2 { grid-template-columns: 74px 68px; }
.slots .btn.sm { padding: 4px 6px; }
.who { min-width: 150px; }
.slots .btn { justify-content: center; width: 100%; }
/* Leave balance cards: number, label, "of N days" on every card */
.balCards div { display: grid; gap: 2px; justify-items: center; }
.balCards span { color: var(--ink); font-weight: 600; font-size: .85rem; }
.balCards small { color: var(--muted); font-size: .76rem; }
/* One selfie button, full width beside the photo */
.camBtns .btn { justify-content: center; }
@media (max-width: 480px) {
  .shiftList.rows3 li { grid-template-columns: minmax(0, 1fr) auto; }
  .shiftList.rows3 li > :nth-child(2) { grid-column: 1; grid-row: 2; text-align: left; justify-self: start; color: var(--muted); }
  .shiftList.rows3 li > :nth-child(3) { grid-row: 1 / span 2; grid-column: 2; }
  .balCards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .balCards div { padding: 10px 4px; }
}
/* Wide tables (attendance, payroll): tighter cells so they fit a 1280 px laptop without sideways scrolling. */
table.dense { font-size: .82rem; }
table.dense th, table.dense td { padding: 8px 6px; }
table.dense th { letter-spacing: .04em; white-space: normal; vertical-align: bottom; }
table.dense .who { min-width: 132px; gap: 8px; }
table.dense .av { width: 28px; height: 28px; font-size: .66rem; }
.steps { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .88rem; color: var(--muted); }
.steps b { color: var(--ink); }

/* Help & FAQ */
#faqQ { width: min(340px, 100%); }
.faqGroup { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.faqGroup:first-child { margin-top: 0; }
.faq { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--sunk); }
.faq summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq[open] summary::after { content: "\2212"; }
.faq p { margin: 0; padding: 0 14px 14px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.faq p b { color: var(--ink); }
.foot .linkbtn { font-size: inherit; }

/* My day: even spacing between the site list, map, location box and selfie; a compact location box */
#ckBody { display: grid; gap: 12px; }
.clockCard .statusBox { padding: 10px 12px; font-size: .84rem; line-height: 1.4; gap: 10px; align-items: flex-start; }
.clockCard .statusBox svg.i { width: 18px; height: 18px; margin-top: 1px; }
.clockCard .statusBox b { font-size: .88rem; margin-bottom: 2px; }
.clockCard .step { gap: 8px; }
@media (max-width: 480px) {
  .clockCard .mapsvg { max-height: 190px; }
  .clockCard { gap: 12px; }
}

/* Hidden field that only bots fill in (access request form). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Plans */
/* Each card shares the grid's rows (subgrid), so the price, notes, description and every feature line up across plans. */
.planGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.planCard { display: grid; grid-row: span 8; grid-template-rows: subgrid; row-gap: 10px; margin-bottom: 16px; }
@supports not (grid-template-rows: subgrid) { .planCard { grid-row: auto; display: flex; flex-direction: column; } }
.planCard.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.planCard .price { font-family: var(--f-display); font-size: 1.8rem; font-weight: 700; }
.planCard .price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.planCard p { margin: 0; font-size: .9rem; }
.planCard .btn.block { margin-top: auto; align-self: end; }
/* Pay online + "Request an invoice instead": one grid item, so the card keeps its 8 rows. */
.planCard .payActs { align-self: end; display: grid; gap: 10px; justify-items: center; margin-top: 6px; }
.planCard .payActs .linkbtn { font-size: .85rem; }
.planCard .setupLine:empty { display: block; min-height: 0; }
.planCard.recommended { border-color: var(--accent-soft); }
.featList { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; }
.featList li { display: flex; gap: 8px; }
.featList li::before { content: "✓"; color: var(--accent); font-weight: 700; flex: none; width: 1em; }
.featList li.off { color: var(--muted); opacity: .6; }
.featList li.off::before { content: "–"; color: var(--muted); font-weight: 600; }
.featPick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px; }
#planBanner .btn { text-decoration: none; }
.featList.mt { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.planCard .setupLine { font-size: .82rem; color: var(--accent); font-weight: 600; margin-top: -6px; }

/* Sidebar on laptops: scrolls by itself when the menu is taller than the window, so the bottom (name + Sign out) is always reachable. */
@media (min-width: 901px) {
  .side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; gap: 18px; }
  .side::-webkit-scrollbar { width: 6px; }
  .side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
  .userBox { margin-top: auto; flex: none; }
  .userBox .btn { justify-self: start; margin-top: 4px; }
}
/* Short laptop screens: a tighter menu so more fits before scrolling. */
@media (min-width: 901px) and (max-height: 820px) {
  .side { padding: 16px 14px; gap: 12px; }
  .tab { padding: 5px 10px; }
  .navgroup { padding: 8px 10px 2px; }
  .logo { width: 120px; }
}
.planCard .setupLine.paid { color: var(--muted); font-weight: 500; }

/* Short forms on the sign-in card (Request access): tighter spacing, two fields a row on wider screens. */
.form.compact { gap: 10px; }
.authBox:has(.form.compact) { gap: 12px; }
/* Browser autofill keeps the dark input colours. */
input:-webkit-autofill, input:-webkit-autofill:focus { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 40px var(--sunk) inset; caret-color: var(--ink); }
.err:empty { display: none; }

/* Petty cash */
.strike { text-decoration: line-through; }
.warnText { color: var(--warn); }
/* Plan page: optional setup */
.setupOpts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .setupOpts { grid-template-columns: minmax(0, 1fr); } }
.setupOpts .opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); cursor: pointer; font-size: .88rem; color: var(--muted); }
.setupOpts .opt b { display: block; color: var(--ink); margin-bottom: 2px; }
.setupOpts .opt.on, .setupOpts .opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.setupOpts input { margin-top: 3px; accent-color: var(--accent); }
.banner.info { border-color: var(--accent); background: var(--accent-soft); }
.banner .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* Feature lists grouped under headings */
.featList li.grp { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; opacity: 1; }
.featList li.grp:first-child { margin-top: 0; }
.featList li.grp::before { content: none; }
.grpRow td { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 14px; }
.featPick .grpHead { grid-column: 1 / -1; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.featList li .sub { display: block; font-size: .78rem; color: var(--muted); }

/* Plan cards: bold category headings; categories a plan doesn't have say "Not included"; add-ons note */
.featList li.grp { font-size: .9rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink); margin-top: 10px; }
.featList li.grp.off { color: var(--muted); }
.featList li.none { color: var(--muted); font-size: .82rem; font-style: italic; padding-left: 24px; }
.featList li.none::before { content: none; }
.addonLine { font-size: .84rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.addonLine b { color: var(--ink); }
.adGrp { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0; display: grid; gap: 6px; }
.adGrp legend { padding: 0 6px; }

.adItem { display: flex !important; justify-content: space-between; gap: 10px; }
.adItem span:first-of-type { flex: 1; }
.adTotal { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }

/* App icon setting */
.iconSet { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.iconSet .form { flex: 1; min-width: 240px; }
.iconPrev { width: 96px; height: 96px; border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); flex: none; }
.iconSet input[type=color] { width: 40px; height: 30px; padding: 0 2px; border-radius: 6px; vertical-align: middle; cursor: pointer; }

/* Four fields in a row (children for tax relief) */
.form-row.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .form-row.four { grid-template-columns: 1fr 1fr; } }

/* Salary advance: two balance cards */
.balCards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }

/* Roster: a week grid of shifts */
table.roster th, table.roster td { vertical-align: top; }
table.roster th.now, table.roster td.now { background: var(--accent-soft); }
.rcell { min-width: 112px; padding: 4px !important; }
.rslot { width: 100%; min-height: 54px; display: grid; align-content: center; justify-items: start; gap: 2px; text-align: left; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 10px; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.rslot:hover { border-color: var(--accent, #2fe3cf); }
.rslot.on { border-style: solid; background: var(--sunk); }
.rslot .plus { color: var(--muted); font-size: 1.1rem; justify-self: center; }
.rslot .sub { font-size: .74rem; }
/* Employee form: the "Borrowed from another company" box. */
.lentBox { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 10px 0; background: var(--surface-2); }
.lentBox summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.lentBox[open] summary { margin-bottom: 8px; }
.lentBox .inl { margin-right: 14px; }
/* Tick lists of people, departments or sites: even columns, name on top, details below (see tickList in app.js). */
.pickQ { width: 100%; margin: 4px 0 8px; }
.pickList { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; max-height: 340px; overflow: auto; padding: 2px; margin: 4px 0; }
.pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; min-width: 0; }
.pick:hover { border-color: var(--line-teal); }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pick[hidden] { display: none; }
.pick input { flex: none; margin: 2px 0 0; }
.pick > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick b { font-weight: 600; font-size: .86rem; line-height: 1.3; overflow-wrap: anywhere; }
.pick small { font-size: .76rem; color: var(--muted); line-height: 1.3; }
.pick .warnTxt { color: var(--warn); }
.pickList > .empty { grid-column: 1 / -1; }
.checkGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; margin: 6px 0; }
.checkGrid.days { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.scanNote.crit b { color: var(--crit); }

/* Announcements */
.newsList { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.newsList li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--sunk); }
.newsList li.pinned { border-color: var(--accent); }
.newsList li.unread { box-shadow: inset 3px 0 0 var(--accent); }
.newsList li.empty { background: none; border-style: dashed; color: var(--muted); }
.newsList .nt { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.newsList .nt .sub { flex-basis: 100%; }
.newsList p { margin: 8px 0 6px; line-height: 1.5; }
.newsList .acts { display: flex; gap: 8px; align-items: center; }
.newsList .acts .right { margin-left: auto; }
/* LHDN form details: click a value to copy it */
table.kv td:first-child { color: var(--muted); width: 44%; }
table.kv td.copy { cursor: copy; }
table.kv td.copy:hover { background: var(--accent-soft); }

/* Home-screen app on phones with a notch / status bar: keep the header and edges clear of it */
.side { padding-top: calc(22px + env(safe-area-inset-top, 0px)); }
@media (max-width: 900px) {
  .side { padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-left: calc(16px + env(safe-area-inset-left, 0px)); padding-right: calc(16px + env(safe-area-inset-right, 0px)); }
  .maincol { padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
}
.newsList .acts .right { margin-left: auto; }

/* Nexvora console: features built in to every plan */
.featPick label.builtin { color: var(--muted); }
tr.builtin td:first-child { color: var(--muted); }

/* Nexvora console: add-on prices by category */
.apGroup { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.apGroup h3 { margin: 0 0 6px; font-size: 1rem; }
.apGroup .apBundle label { color: var(--accent); }
.apSave { position: sticky; bottom: 0; padding: 10px 0 2px; background: var(--surface); }
.adGrp .adAuto { margin: 4px 0 0; color: var(--ok); }
/* HRD Corp rules and sources (Settings) */
.hrdRules { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.hrdRules li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--sunk); }
.hrdRules li > div { display: flex; flex-wrap: wrap; gap: 6px; }
.hrdRules p { margin: 6px 0 0; overflow-wrap: anywhere; }
details > summary { cursor: pointer; }
/* Salary bank file: problems to fix / check */
.bfList { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: .8125rem; }
.bfList.crit li::marker { color: var(--crit); } .bfList.warn li::marker { color: var(--warn); }

/* This tab's account was switched in another tab */
.acctSwitched { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(3, 10, 20, .72); backdrop-filter: blur(3px); }
.acctSwitched .box { max-width: 460px; width: 100%; display: grid; gap: 10px; padding: 22px; border-radius: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--warn); box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.acctSwitched h2 { margin: 0; font-size: 1.15rem; }
.acctSwitched p { margin: 0; }

/* A new version of HRView is ready */
.newVer { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: max-content; max-width: calc(100% - 32px); padding: 10px 12px 10px 14px; border-radius: 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--accent); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); font-size: .875rem; }
.newVer .i { color: var(--accent); flex: none; }
.newVer span { flex: 1 1 220px; }

/* PDPA: two-step sign-in, privacy notice and consent, sign-in & security */
.codeInput { font-family: var(--f-mono); font-size: 1.3rem; letter-spacing: .18em; text-align: center; max-width: 220px; }
.mfaSteps { margin: 0; padding-left: 20px; display: grid; gap: 14px; font-size: .9rem; }
.mfaSteps li > b:first-child { display: block; margin-bottom: 4px; }
.qrBox { width: 184px; height: 184px; padding: 8px; margin: 8px 0; background: #fff; border-radius: 10px; display: grid; place-items: center; }
.qrBox svg { width: 100%; height: 100%; }
.mfaKey { display: block; font-family: var(--f-mono); font-size: 1rem; letter-spacing: .06em; margin: 6px 0 2px; word-break: break-all; user-select: all; }
.backupCodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-family: var(--f-mono); font-size: 1.05rem; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 10px; background: var(--sunk); margin: 10px 0; }
.secRow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.secRow .sub { display: block; }
.subhead { font-size: .85rem; margin: 18px 0 6px; }
.devList { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; font-size: .88rem; }
.devList .sub { display: block; }
.consentQ { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 6px; }
.consentQ legend { font-weight: 600; padding: 0 4px; }
.seg2 { display: flex; gap: 18px; flex-wrap: wrap; }
.langSw { display: flex; gap: 14px; justify-content: flex-end; font-size: .85rem; }
.langSw [aria-pressed="true"] { font-weight: 700; text-decoration: underline; }
.noticeText { font-size: .88rem; display: grid; gap: 8px; }
.noticeText p, .noticeText ul { margin: 0; }
.noticeText ul { padding-left: 18px; display: grid; gap: 4px; }
.authBox:has(.noticeText), .authBox:has(.mfaSteps) { width: min(560px, 100%); }
label.tick { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; line-height: 1.5; cursor: pointer; }
label.tick input { margin: 3px 0 0; flex: none; width: 16px; height: 16px; }
label.tick span { flex: 1; min-width: 0; }
@media (max-width: 480px) { .backupCodes { grid-template-columns: 1fr; } }
label.tick a { color: var(--accent); font-weight: 600; }
/* Employee form: tabs, one part of the record at a time; Save always at the bottom of the window */
.ftabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); position: sticky; top: -18px; z-index: 2; background: var(--surface); margin: 0 -18px; padding: 6px 18px 0; }
.ftabs::-webkit-scrollbar { display: none; }
.ftabs button { border: 0; background: none; padding: 9px 12px; font: inherit; font-weight: 600; font-size: .875rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; }
.ftabs button:hover { color: var(--ink); }
.ftabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.fpanel { display: grid; gap: 12px; min-height: 300px; align-content: start; }
.fpanel[hidden] { display: none; }
.fpanel h4 { margin: 6px 0 -4px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fpanel h4 .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.fsave { position: sticky; bottom: -18px; z-index: 2; background: var(--surface); border-top: 1px solid var(--line); margin: 0 -18px -18px; padding: 12px 18px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.fsave .err { margin: 0 auto 0 0; }
/* Settings: sections as tabs at the top of the page */
.setTabs { margin: 0; padding: 0 2px; top: 0; background: var(--bg); }
.setGroup { display: grid; gap: 16px; }
.setGroup[hidden] { display: none; }
[data-coform] > button[type="submit"] { justify-self: start; }
/* My day: clocking in first; My shifts is one line under it that opens for the coming days */
.stack { display: grid; gap: 16px; align-content: start; }
.rosterMini { padding: 12px 16px; }
.rosterMini summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.rosterMini summary::-webkit-details-marker { display: none; }
.rosterMini summary::after { content: "▾"; color: var(--muted); }
.rosterMini[open] summary::after { content: "▴"; }
.rosterMini summary .sub { display: block; font-size: .8rem; color: var(--muted); }
.rosterMini summary > .small { margin-left: auto; white-space: nowrap; }
.rosterMini[open] { display: grid; gap: 10px; }
.shiftList.compact { gap: 4px; }
.shiftList.compact li { padding: 6px 10px; font-size: .82rem; }
