/* CERT ERP - visual system "B: dark and premium", chosen by Daniel on 11 Nov 2026
   from three samples (styles.html). Dark is the lead look; light is the same design
   on a pale surface. Theme = data-theme on <html>; default follows the device. */
:root {
  --red: #FB454C;
  --red-2: #FF7A59;
  --navy: #0F0F30;
  --font: Sora, "Segoe UI", system-ui, sans-serif;
  --rail: 244px;
  --r-card: 22px;
  --r-ctl: 14px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: radial-gradient(120% 70% at 82% 0%, #2a2470 0%, #0d0d24 55%, #07070f 100%);
  --bg-flat: #0b0b1d;
  --surface: rgba(255,255,255,.07);
  --surface-2: rgba(255,255,255,.04);
  --solid: #15153a;
  --stroke: rgba(255,255,255,.13);
  --text: #FFFFFF;
  --muted: #B6B5D3;
  --track: rgba(255,255,255,.1);
  --ring-in: #0f0f2a;
  --input: rgba(255,255,255,.06);
  --ok: #7DF0B4;
  --ok-bg: rgba(125,240,180,.14);
  --red-soft: rgba(251,69,76,.18);
  --shadow: none;
  --glow: 0 0 60px -8px rgba(251,69,76,.55);
  --tag-bg: rgba(255,255,255,.1);
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: radial-gradient(120% 70% at 85% 0%, #D9D4FF 0%, #F1F2FA 52%, #F7F7FB 100%);
  --bg-flat: #F4F4FA;
  --surface: rgba(255,255,255,.82);
  --surface-2: rgba(255,255,255,.55);
  --solid: #FFFFFF;
  --stroke: rgba(15,15,48,.1);
  --text: #0F0F30;
  --muted: #56566F;
  --track: rgba(15,15,48,.09);
  --ring-in: #FFFFFF;
  --input: #FFFFFF;
  --ok: #17764B;
  --ok-bg: #E2F5EA;
  --red-soft: #FDE4E5;
  --shadow: 0 20px 44px -26px rgba(15,15,48,.38);
  --glow: 0 18px 44px -14px rgba(251,69,76,.5);
  --tag-bg: #0F0F30;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { background: var(--bg-flat); }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--text); background: var(--bg) fixed; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.boot { padding: 72px 16px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }

.glass { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-card); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ---------------------------------------------------------------- controls */
.btn { border: 0; border-radius: var(--r-ctl); padding: 13px 20px; font-weight: 600; color: #fff; background: linear-gradient(90deg, var(--red), var(--red-2)); box-shadow: 0 14px 30px -14px rgba(251,69,76,.9); }
.btn:hover { filter: brightness(1.06); }
.btn.wide { width: 100%; margin-top: 22px; padding: 15px; }
.btn.quiet { background: var(--surface); color: var(--text); border: 1px solid var(--stroke); box-shadow: none; font-weight: 500; padding: 9px 13px; font-size: 13px; }
.btn.quiet:hover { filter: none; border-color: var(--text); }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
label { display: block; font-weight: 500; font-size: 14px; margin: 16px 0 7px; }
input[type=email], input[type=password], input[type=search], input[type=text], input[type=time], input[type=date], select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--stroke); border-radius: var(--r-ctl); background: var(--input); color: var(--text);
}
select option { color: #0F0F30; background: #fff; }
input::placeholder { color: var(--muted); }
input:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.msg { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-ctl); font-size: 14px; }
.msg.err { background: var(--red-soft); color: var(--text); border: 1px solid var(--red); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }

/* ---------------------------------------------------------------- code tag */
.tag { display: inline-grid; place-items: center; min-width: 3.4em; padding: .32em .6em; font-weight: 700; font-size: 13px; letter-spacing: .06em; line-height: 1; border-radius: 10px; background: var(--tag-bg); color: #fff; }
.tag.trainer { background: linear-gradient(90deg, var(--red), var(--red-2)); }
.tag.left { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--stroke); }

/* ---------------------------------------------------------------- sign in */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-box { width: 100%; max-width: 420px; padding: 34px 30px 28px; }
.wordmark { font-weight: 700; font-size: 20px; letter-spacing: .04em; }
.wordmark i { font-style: normal; color: var(--red); }
.auth-box h1 { font-size: 30px; line-height: 1.15; margin: 26px 0 6px; letter-spacing: -.01em; }
.auth-box p.sub { color: var(--muted); margin: 0 0 22px; }
.auth-foot { margin-top: 22px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.auth-foot .tools { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { padding: 22px 16px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--stroke); background: var(--surface-2); }
.rail .wordmark { padding: 4px 10px 20px; }
.rail nav { display: grid; gap: 4px; }
.rail nav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 1px solid transparent; color: var(--muted); padding: 11px 12px; border-radius: var(--r-ctl); font-weight: 500; }
.rail nav button:hover { color: var(--text); }
.rail nav button.on { color: var(--text); background: var(--surface); border-color: var(--stroke); }
.rail nav button.on svg { color: var(--red); }
.rail nav svg { width: 20px; height: 20px; flex: none; }
.rail .me { margin-top: auto; padding: 14px; display: grid; gap: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--stroke); }
.rail .me b { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.rail .me span { color: var(--muted); font-size: 12.5px; }
.rail .me .row { display: flex; gap: 8px; flex-wrap: wrap; }
main { padding: clamp(18px, 3.4vw, 44px); max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
h1 { font-weight: 700; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.12; margin: 0; letter-spacing: -.015em; }
.page-head .when { color: var(--muted); font-size: 14px; margin-top: 4px; }
.chip { font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--stroke); white-space: nowrap; }
h2 { font-weight: 600; font-size: 17px; margin: 0 0 12px; }

/* ---------------------------------------------------------------- home */
.home { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.clock-card { padding: 26px 22px 22px; text-align: center; }
.ring { margin: 0 auto 18px; width: 216px; height: 216px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--red) 0 var(--pct, 0%), var(--track) var(--pct, 0%) 100%); box-shadow: var(--glow); }
.ring > div { width: 184px; height: 184px; border-radius: 50%; background: var(--ring-in); display: grid; place-items: center; }
.ring strong { font-size: 44px; font-weight: 700; letter-spacing: -.03em; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.ring em { font-style: normal; font-size: 13px; color: var(--muted); display: block; margin-top: 8px; }
.clock-card p { margin: 0; color: var(--muted); font-size: 14px; }
.clock-card .soon { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 14px; background: var(--red-soft); color: var(--text); }
.me-card { padding: 22px clamp(18px, 2.6vw, 28px); }
/* My own page: the portrait leads, the way a staff card does. */
.me-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.me-head h1 { margin: 0 0 4px; }
.me-head .role { color: var(--muted); margin: 0 0 12px; }
.me-head .row { display: flex; gap: 8px; flex-wrap: wrap; }
/* The portrait is a circle with a red ring, as on the printed staff card. */
.portrait { flex: none; border-radius: 50%; object-fit: cover; object-position: center top; background: var(--surface-2); box-shadow: 0 0 0 3px var(--red); }
.portrait.lg { width: 132px; height: 132px; box-shadow: 0 0 0 4px var(--red), 0 18px 34px -16px rgba(251,69,76,.7); }
.portrait.md { width: 92px; height: 92px; display: block; margin: 6px 0 14px; }
.portrait.sm { width: 40px; height: 40px; box-shadow: 0 0 0 2px var(--red); }
.portrait.letters { display: grid; place-items: center; font-weight: 700; letter-spacing: .02em; color: var(--muted); box-shadow: 0 0 0 2px var(--stroke); }
.portrait.lg.letters { font-size: 36px; }
.portrait.md.letters { font-size: 26px; }
.portrait.sm.letters { font-size: 13px; }
.who-in { display: flex; align-items: center; gap: 12px; }
.who-in > div { min-width: 0; }
.me-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.me-card .name { font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.01em; }
.me-card .role { color: var(--muted); margin: 0 0 18px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0; }
.facts > div { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--stroke); }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 3px 0 0; font-weight: 500; overflow-wrap: break-word; }
.facts .span2 { grid-column: span 2; }
.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 22px; }
.next > div { padding: 16px 18px; display: flex; gap: 14px; align-items: center; }
.next i { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); flex: none; }
.next i svg { width: 21px; height: 21px; }
.next b { display: block; font-weight: 600; }
.next span { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- people */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; padding: 16px 8px; margin-bottom: 16px; }
.stats > div { padding: 4px 8px; border-left: 1px solid var(--stroke); }
.stats > div:first-child { border-left: 0; }
.stats b { font-size: 30px; font-weight: 700; display: block; line-height: 1.1; letter-spacing: -.02em; }
.stats span { color: var(--muted); font-size: 13px; }
.filters { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.shown { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.roster { overflow: hidden; }
.roster table { border-collapse: collapse; width: 100%; font-size: 14px; }
.roster th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 14px 16px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.roster td { padding: 12px 16px; border-bottom: 1px solid var(--stroke); vertical-align: middle; }
.roster tr:last-child td { border-bottom: 0; }
.roster tr.row { cursor: pointer; }
.roster tr.row:hover td { background: var(--surface-2); }
.roster .who b { font-weight: 600; display: block; line-height: 1.3; }
.roster .who span { color: var(--muted); font-size: 12.5px; }
.state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 20px; background: var(--ok-bg); color: var(--ok); }
.state.probation { background: transparent; box-shadow: inset 0 0 0 1px var(--ok); }
.state.resigned { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--stroke); }
.note { color: var(--muted); font-size: 13.5px; margin: 14px 2px 0; max-width: 70ch; }

/* ---------------------------------------------------------------- access */
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.lv { display: inline-block; width: 15px; height: 15px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--stroke); }
.lv.view { box-shadow: inset 0 0 0 2px var(--red); }
.lv.edit { background: linear-gradient(135deg, var(--red), var(--red-2)); box-shadow: none; }
.matrix th:not(:first-child), .matrix td:not(:first-child) { text-align: center; }
.matrix td:first-child b { font-weight: 500; }

/* ---------------------------------------------------------------- person drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(5,5,16,.6); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--solid); border-left: 1px solid var(--stroke); z-index: 21; overflow-y: auto; padding: 22px; }
.drawer .close { float: right; }
.drawer .tag { font-size: 15px; }
.drawer h2 { font-size: 24px; font-weight: 700; margin: 14px 0 2px; line-height: 1.2; }
.drawer p { margin: 0 0 18px; color: var(--muted); }
.drawer .facts { grid-template-columns: 1fr 1fr; }

/* ---------------------------------------------------------------- phone */
.bar { display: none; }
.topline { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
  .topline .tools { display: flex; gap: 8px; }
  main { padding: 16px 16px 112px; }
  .bar { display: flex; align-items: center; gap: 4px; position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 10; padding: 8px; border-radius: 24px; background: var(--solid); border: 1px solid var(--stroke); box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); }
  .bar .side { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .bar .side button { background: none; border: 0; display: grid; justify-items: center; gap: 3px; padding: 8px 4px; font-size: 12px; color: var(--muted); border-radius: 16px; }
  .bar .side button.on { color: var(--text); font-weight: 600; background: var(--surface); }
  .bar .side button.on svg { color: var(--red); }
  .bar svg { width: 23px; height: 23px; }
  .home { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .stats > div:nth-child(3) { border-left: 0; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type=search], .filters select:last-child { grid-column: 1 / -1; }
  .roster .wide-only, .roster thead { display: none; }
  .roster.scroll { overflow-x: auto; }
  .roster.scroll thead { display: table-header-group; }
  .drawer .facts { grid-template-columns: 1fr; }
  .facts .span2 { grid-column: auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slide .18s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------------------------------------------------------------- check-in */
.badge { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 20px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.late { background: var(--red-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--red); }
.clock-card .btn.wide { margin-top: 18px; }
.clock-card p { margin-top: 0; }
.ring.done { box-shadow: none; }
.hist { padding: 20px clamp(16px, 2.4vw, 24px); }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--stroke); font-size: 14px; }
.hrow:first-of-type { border-top: 0; }
.hrow b { display: block; font-weight: 600; }
.hrow span { color: var(--muted); font-size: 12.5px; }
.hrow .times { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sheet { position: fixed; z-index: 21; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 28px)); max-height: calc(100vh - 28px); overflow-y: auto; background: var(--solid); border: 1px solid var(--stroke); border-radius: 26px; padding: 22px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.sheet-head h2 { font-size: 22px; font-weight: 700; margin: 0; }
.tiles { border: 0; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiles legend { font-weight: 500; font-size: 14px; padding: 0; margin-bottom: 8px; }
.tile { margin: 0; position: relative; }
.tile input { position: absolute; opacity: 0; inset: 0; }
.tile span { display: flex; align-items: center; min-height: 54px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--surface-2); font-weight: 500; font-size: 14px; cursor: pointer; }
.tile input:checked + span { border-color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }
.tile input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.more.two { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.more.two[hidden] { display: none; }
.fine { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; }
@media (max-width: 860px) {
  .sheet { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; border-radius: 26px 26px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .more.two { grid-template-columns: 1fr; }
  .hrow { grid-template-columns: minmax(0, 1fr) auto; }
  .hrow .times { grid-column: 1; grid-row: 2; }
  .hrow .badge { grid-row: 1 / span 2; grid-column: 2; }
}

.fab { display: none; }
@media (max-width: 860px) {
  .bar .fab { display: grid; place-items: center; flex: none; width: 68px; height: 68px; margin: -34px 6px 0; border-radius: 50%; border: 5px solid var(--solid); color: #fff; background: linear-gradient(135deg, var(--red), var(--red-2)); box-shadow: 0 16px 30px -12px rgba(251,69,76,.85); }
  .bar .fab svg { width: 30px; height: 30px; color: #fff; }
  .bar .fab:active { transform: scale(.96); }
}

/* Check-in photo */
.snap { margin: 14px 0 4px; display: grid; justify-items: center; gap: 10px; }
.snap-btn { width: 100%; min-height: 120px; display: grid; place-items: center; gap: 6px; border-radius: 20px; border: 1.5px dashed var(--red); background: var(--red-soft); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.snap-btn svg { width: 34px; height: 34px; color: var(--red); }
.snap-btn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.snap-img { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--red); }
.cam { width: 100%; display: grid; gap: 12px; }
.cam video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 22px; background: #000; transform: scaleX(-1); }
.cam-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.cam-row .btn { justify-self: start; }
.shutter { width: 72px; height: 72px; border-radius: 50%; border: 5px solid var(--solid); background: linear-gradient(135deg, var(--red), var(--red-2)); box-shadow: 0 0 0 3px var(--red), 0 14px 28px -12px rgba(251,69,76,.85); cursor: pointer; }
.shutter:active { transform: scale(.94); }
.shutter:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }
.msg .tech { display: block; margin-top: 6px; font-size: 11.5px; opacity: .7; word-break: break-word; }
.shutter:disabled { opacity: .45; cursor: wait; }

/* Today board */
.daynav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.daynav input[type=date] { width: auto; min-width: 150px; flex: 1; }
:root[data-theme=dark] input[type=date]::-webkit-calendar-picker-indicator, :root[data-theme=dark] input[type=time]::-webkit-calendar-picker-indicator { filter: invert(1); }
.daynav .icon-btn { font-size: 22px; line-height: 1; }
.stats b small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stats b.warn { color: var(--red); }
.segs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.seg { font: inherit; font-size: 13.5px; font-weight: 500; padding: 9px 14px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--surface); color: var(--muted); cursor: pointer; }
.seg b { font-weight: 700; color: var(--text); margin-left: 4px; }
.seg.on { color: var(--text); border-color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }
.seg:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.filters.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.roster td.end { text-align: right; white-space: nowrap; }
.roster tr.gone .who b { color: var(--muted); font-weight: 500; }
.roster tr.gone .portrait { opacity: .55; }
.badge.none { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--stroke); }
.narrow-only { display: none; }
.wide-only-inline { display: inline; }
.visit { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--stroke); }
.visit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cshots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.cshot { margin: 0; display: grid; gap: 6px; justify-items: center; min-width: 0; }
.drawer { overflow-x: hidden; }
.cshot figcaption { font-size: 12.5px; color: var(--muted); }
.cshot-in { width: 100%; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--stroke); display: grid; place-items: center; font-size: 13px; }
.cshot-in img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.maplink { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.maplink svg { width: 16px; height: 16px; color: var(--red); }
.lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(5,5,16,.92); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 16px; }
@media (max-width: 860px) {
  .narrow-only { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .roster.board table { table-layout: fixed; }
  .roster.board td.end { width: 128px; padding-left: 0; }
  .roster.board .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .roster .who-in > div { min-width: 0; }
  .wide-only-inline { display: none; }
  .stats b { font-size: 24px; }
  .stats span { font-size: 11.5px; }
  .filters.two { grid-template-columns: 1fr; }
}

/* HR correction and roll call */
textarea { font: inherit; color: var(--text); width: 100%; padding: 13px 14px; border: 1px solid var(--stroke); border-radius: var(--r-ctl); background: var(--input); resize: vertical; min-height: 76px; }
textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.fx-who { display: flex; align-items: center; gap: 12px; margin: 12px 0 2px; padding: 12px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--stroke); }
.fx-who > div { min-width: 0; }
.fx-who b { display: block; font-weight: 600; line-height: 1.3; }
.fx-who span { display: block; color: var(--muted); font-size: 13px; }
.tick { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; padding: 14px; border-radius: var(--r-ctl); border: 1px solid var(--stroke); background: var(--surface-2); cursor: pointer; }
.tick input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--muted); background: transparent; flex: none; margin: 0; display: grid; place-items: center; cursor: pointer; }
.tick input:checked { background: linear-gradient(90deg, var(--red), var(--red-2)); border-color: transparent; }
.tick input:checked::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.tick input:focus { outline: none; }
.tick:has(input:checked) { border-color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }
.tick:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.btn.under { width: 100%; margin-top: 10px; padding: 13px; }
.visit-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.facts > .hrfix { border-color: var(--red); background: var(--red-soft); }
.hrfix dt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hrfix dt b { color: var(--text); font-weight: 600; }
.hrfix dd { line-height: 1.5; }
.hrnote { font-weight: 400; }
.badge.reason { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--stroke); }
.roster tr.gone.told .who b { color: var(--text); }
.roster tr.row:focus-visible td { background: var(--surface-2); }

/* nickname, event calendar */
.me-head .fullname { color: var(--muted); margin: 0 0 2px; }
.evline { display: grid; gap: 6px; padding: 14px 18px; margin-bottom: 14px; border-radius: 20px; font-size: 14px; border-left: 3px solid var(--red); }
.evline div { display: flex; gap: 4px 10px; align-items: baseline; flex-wrap: wrap; }
.evline b { font-weight: 600; }
.evh { font-size: 14px; font-weight: 600; color: var(--muted); margin: 24px 2px 10px; }
.evlist { display: grid; gap: 10px; }
.ev { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 16px; border-radius: 20px; border: 1px solid var(--stroke); background: var(--surface); color: var(--text); font: inherit; }
button.ev { cursor: pointer; }
button.ev:hover { border-color: var(--text); }
button.ev:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.ev-date { flex: none; width: 54px; height: 58px; border-radius: 16px; background: var(--red-soft); display: grid; place-items: center; align-content: center; line-height: 1.15; }
.ev-date b { font-size: 20px; font-weight: 700; }
.ev-date small { font-size: 11.5px; color: var(--muted); }
.ev-main { min-width: 0; display: grid; gap: 2px; }
.ev-main b { font-weight: 600; overflow-wrap: anywhere; }
.ev-main span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 12px; }
.picker { max-height: 230px; overflow-y: auto; border: 1px solid var(--stroke); border-radius: var(--r-ctl); margin-top: 8px; background: var(--input); }
.picker label { display: flex; align-items: center; gap: 12px; margin: 0; padding: 11px 14px; border-bottom: 1px solid var(--stroke); font-weight: 400; cursor: pointer; }
.picker label:last-child { border-bottom: 0; }
.picker label span { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.picker input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--muted); background: transparent; flex: none; margin: 0; display: grid; place-items: center; cursor: pointer; }
.picker input:checked { background: linear-gradient(90deg, var(--red), var(--red-2)); border-color: transparent; }
.picker input:checked::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.picker input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.btn.danger { background: transparent; color: var(--text); border: 1px solid var(--red); box-shadow: none; font-weight: 500; }

/* old (Vimigo) records */
.chip.old { font-size: 11.5px; font-weight: 500; padding: 3px 9px; margin-left: 6px; vertical-align: middle; }
.placetext { font-weight: 400; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.oldrec { margin-top: 22px; padding: 20px 22px; border-radius: 22px; }
.oldrec h2 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.oldrec p { margin: 0 0 14px; max-width: 70ch; font-size: 14px; }

/* monthly punctuality ranking: three views of one list */
.rk-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.rk-views { display: inline-flex; padding: 4px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--surface); margin-bottom: 12px; }
.rk-views button { font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); background: none; border: 0; padding: 7px 12px; border-radius: 10px; cursor: pointer; }
.rk-views button.on { color: #fff; background: linear-gradient(90deg, var(--red), var(--red-2)); font-weight: 600; }
.rk-views button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.rk-medal { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--stroke); white-space: nowrap; }
.rk-medal.gold, .rk-pp.first .rk-medal { color: #fff; border: 0; background: linear-gradient(90deg, var(--red), var(--red-2)); }
.rk-podium { display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: end; gap: 8px; margin: 6px 0 18px; text-align: center; max-width: 560px; }
.rk-pp { display: grid; justify-items: center; gap: 6px; padding: 14px 6px 12px; border-radius: 22px; background: var(--surface); border: 1px solid var(--stroke); min-width: 0; }
.rk-pp.first { padding-top: 20px; padding-bottom: 18px; border-color: var(--red); background: linear-gradient(180deg, var(--red-soft), var(--surface)); box-shadow: 0 18px 40px -22px rgba(251,69,76,.9); }
.rk-pp .portrait { width: 64px; height: 64px; }
.rk-pp.first .portrait { width: 88px; height: 88px; }
.rk-pp b { font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.rk-pp small { color: var(--muted); font-size: 12px; }
.rk-list { border-radius: 22px; overflow: hidden; }
.rk-row { display: grid; grid-template-columns: 26px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--stroke); }
.rk-row:last-child { border-bottom: 0; }
.rk-no { font-weight: 700; color: var(--muted); text-align: center; }
.rk-row b { display: block; font-weight: 600; line-height: 1.3; }
.rk-row span { color: var(--muted); font-size: 12.5px; }
.rk-row .rk-avg { font-weight: 600; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.rk-row .rk-why { text-align: right; }
.rk-tablebox { border-radius: 22px; padding: 4px 10px; overflow-x: auto; }
.rk-table { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.rk-table col.c-no { width: 32px; } .rk-table col.c-n { width: 36px; } .rk-table col.c-n2 { width: 44px; } .rk-table col.c-avg { width: 68px; }
.rk-table th { font-weight: 500; color: var(--muted); font-size: 11.5px; padding: 10px 2px; border-bottom: 1px solid var(--stroke); }
.rk-table th.l { text-align: left; }
.rk-table td { padding: 10px 2px; text-align: center; border-bottom: 1px solid var(--stroke); font-variant-numeric: tabular-nums; }
.rk-table tr:last-child td { border-bottom: 0; }
.rk-table td.nm { text-align: left; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-table td.nm small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.rk-table tr.top td { background: var(--red-soft); }
.rk-table .bad { color: var(--red); font-weight: 700; }
.rk-table .zero { color: var(--muted); }
.rk-table .rk-medal { padding: 3px 8px; }
.rk-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px; border-radius: 24px; border: 1px solid var(--red); background: linear-gradient(135deg, var(--red-soft), var(--surface)); margin-bottom: 14px; max-width: 560px; }
.rk-hero .portrait { width: 96px; height: 96px; }
.rk-hero h2 { margin: 8px 0 2px; font-size: 20px; font-weight: 700; line-height: 1.25; }
.rk-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.rk-card { padding: 14px 16px; border-radius: 20px; margin-bottom: 10px; max-width: 560px; }
.rk-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rk-top > div { min-width: 0; }
.rk-top b { font-weight: 600; display: block; line-height: 1.3; }
.rk-top span { color: var(--muted); font-size: 12.5px; }
.rk-top .rk-big { margin-left: auto; font-size: 22px; font-weight: 700; color: var(--muted); }
.rk-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rk-tiles div { text-align: center; padding: 8px 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--stroke); }
.rk-tiles b { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rk-tiles span { font-size: 10.5px; color: var(--muted); }
.rk-tiles .bad b { color: var(--red); }
.rk-dates { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }
@media (min-width: 861px) {
  .rk-table { font-size: 14px; }
  .rk-table col.c-no { width: 56px; } .rk-table col.c-n { width: 90px; } .rk-table col.c-n2 { width: 110px; } .rk-table col.c-avg { width: 110px; }
  .rk-table th { font-size: 12.5px; }
  .rk-tablebox { padding: 6px 18px; }
}

/* year record: twelve months per person; the name column stays put while the months scroll */
.tick.slim { margin: 0; padding: 11px 14px; }
.yr-box { border-radius: 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.yr-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.yr-table th { font-weight: 500; color: var(--muted); font-size: 12px; padding: 11px 6px; border-bottom: 1px solid var(--stroke); text-align: center; white-space: nowrap; }
.yr-table td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--stroke); }
.yr-table tr:last-child td { border-bottom: 0; }
.yr-table .nm { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--solid); padding-left: 16px; min-width: 150px; max-width: 190px; }
.yr-table td.nm b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.yr-table td.nm small { color: var(--muted); font-size: 11.5px; }
.yr-table .zero { color: var(--muted); opacity: .55; }
.yr-table .future { background: transparent; }
.yr-table th.future { opacity: .4; }
.yr-table .amber { color: #F2A93B; font-weight: 700; }
.yr-table .red { color: var(--red); font-weight: 700; }
.yr-table .tot { font-weight: 700; border-right: 1px solid var(--stroke); min-width: 54px; }
.yr-table td.tot.amber { background: rgba(242,169,59,.16); color: var(--text); box-shadow: inset 3px 0 0 #F2A93B; }
.yr-table td.tot.red { background: var(--red-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--red); }
.yr-table tr.sum td { font-weight: 600; color: var(--muted); }
:root[data-theme="light"] .yr-table .amber { color: #A66300; }
@media (max-width: 860px) {
  .yr-table .nm { min-width: 118px; max-width: 118px; padding-left: 12px; }
}

/* HR section: its four pages */
.hr-nav { display: flex; gap: 4px; padding: 5px; margin: 0 0 20px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--surface); flex-wrap: wrap; width: fit-content; max-width: 100%; }
.hr-nav::-webkit-scrollbar { display: none; }
.hr-nav button { flex: none; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--muted); background: none; border: 0; padding: 9px 14px; border-radius: 12px; cursor: pointer; white-space: nowrap; }
.hr-nav button:hover { color: var(--text); }
.hr-nav button.on { color: #fff; background: linear-gradient(90deg, var(--red), var(--red-2)); font-weight: 600; }
.hr-nav button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.hr-mods { display: flex; gap: 24px; margin: 0 0 16px; border-bottom: 1px solid var(--stroke); }
.hr-mods button { font: inherit; font-size: 16px; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 4px 2px 12px; margin-bottom: -1px; cursor: pointer; }
.hr-mods button:hover { color: var(--text); }
.hr-mods button.on { color: var(--text); border-bottom-color: var(--red); }
.hr-mods button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
main { min-width: 0; }

/* leave applications and emergency-leave review */
.lv-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--stroke); cursor: pointer; }
.lv-row:last-child { border-bottom: 0; }
.lv-row:hover, .lv-row:focus-visible { background: var(--surface-2); outline: none; }
.lv-row b { display: block; font-weight: 600; line-height: 1.3; }
.lv-row span { color: var(--muted); font-size: 12.5px; }
.lv-row .badge { color: inherit; }
.lv-el { display: inline-block; margin-top: 5px; font-size: 11.5px !important; font-weight: 600; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--stroke); color: var(--text) !important; }
.lv-el.todo { border-color: #F2A93B; background: rgba(242,169,59,.16); }
.lv-el.bad { border-color: var(--red); background: var(--red-soft); }
.lv-el.good { background: var(--ok-bg); border-color: transparent; }
.lv-cards { display: grid; gap: 10px; max-width: 640px; }
.lv-card { padding: 14px 16px; border-radius: 20px; }
.lv-card .rk-top { margin-bottom: 8px; }
.lv-card .rk-top .badge { margin-left: auto; }
.lv-reason { margin: 0 0 6px; font-size: 14px; overflow-wrap: anywhere; }
.lv-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
.lv-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.lv-acts .btn { padding: 12px 10px; font-size: 14px; font-weight: 600; }
.lv-acts .btn.picked.good { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.lv-acts .btn.picked.bad { background: var(--red-soft); border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.rk-tiles .t-avg b { font-size: 12.5px; line-height: 1.8; }
.rk-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.35fr); }
.msg.warn { background: rgba(242,169,59,.16); border: 1px solid #F2A93B; color: var(--text); }

/* sign-in screen: two links on the left of the foot */
.auth-links { display: grid; gap: 8px; justify-items: start; }

/* work-from-home applications */
.wfh-card h2 { margin-bottom: 4px; }
.wfh-count { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.wfh-count b { font-size: 26px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.wfh-card .btn.wide { margin-top: 14px; }
.wfh-card .hrow .btn { padding: 7px 11px; font-size: 12.5px; }
.flag { font-weight: 600; font-size: 11.5px; padding: 2px 8px; border-radius: 20px; background: var(--red-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--red); white-space: nowrap; }
.lv-meta.over b { color: var(--red); }

/* group points */
.gp-table tr.gp-row { cursor: pointer; }
.gp-table tr.gp-row:hover td, .gp-table tr.gp-row:focus-visible td { background: var(--surface-2); outline: none; }
.gp-table tr.gp-row.on td { background: var(--red-soft); }
.gp-table tr.gp-row.on td.nm { box-shadow: inset 3px 0 0 var(--red); }
.gp-lines .nm { min-width: 230px; max-width: 260px; }
.gp-lines td.nm b { white-space: normal; font-weight: 500; }
.gp-lines tr.sum td.nm b { font-weight: 700; color: var(--text); }
.gp-lines tr.sum td { color: var(--text); background: var(--surface-2); }
@media (max-width: 860px) { .gp-lines .nm { min-width: 168px; max-width: 168px; } }

/* my own record, and the late alert */
.rec-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0 4px; }
.rec-tile { font: inherit; color: var(--text); text-align: center; padding: 12px 2px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--stroke); }
.rec-tile b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.rec-tile b small { font-size: 12px; font-weight: 500; color: var(--muted); }
.rec-tile span { font-size: 11px; color: var(--muted); }
.rec-tile[data-rec] { cursor: pointer; }
.rec-tile.bad { border-color: var(--red); background: var(--red-soft); }
.rec-tile.bad b { color: var(--red); }
.rec-tile:disabled { opacity: 1; cursor: default; }
.rec-tile:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
@media (max-width: 420px) { .rec-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.late-alert { text-align: center; padding: 10px 4px 4px; }
.late-mark { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--red), var(--red-2)); box-shadow: 0 18px 44px -14px rgba(251,69,76,.95); animation: latepop .45s cubic-bezier(.2,1.4,.4,1); }
.late-alert h2 { font-size: 30px; font-weight: 700; margin: 0 0 4px; color: var(--red); }
.late-time { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; font-variant-numeric: tabular-nums; }
.late-alert p { margin: 0 0 6px; color: var(--muted); }
.late-alert .late-time { color: var(--text); }
@keyframes latepop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .late-mark { animation: none; } }

/* yesterday's loose ends on today's board */
.follow { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 14px; border-radius: 20px; border-left: 3px solid #F2A93B; }
.follow > div:first-child b { display: block; font-weight: 600; }
.follow > div:first-child span { color: var(--muted); font-size: 13px; }
.follow-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.follow-acts .btn b { font-weight: 700; color: var(--red); margin-right: 2px; }

/* group points: hand-entered items */
.pi-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.pi-head b { font-weight: 600; overflow-wrap: anywhere; }
.pi-sum, .pi-pts { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ok); }
.pi-sum.neg, .pi-pts.neg { color: var(--red); }
.pi-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--stroke); font-size: 14px; }
.pi-row small { color: var(--muted); font-size: 12px; }
.pi-row .pi-note { display: block; }
.pi-row .btn { padding: 6px 10px; font-size: 12px; }

/* the company badge beside the system name */
.wordmark { display: flex; align-items: center; gap: 10px; }
.wordmark .logo { width: 34px; height: 34px; flex: none; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.rail .wordmark .logo { width: 40px; height: 40px; }
.auth-box .wordmark { flex-direction: column; align-items: flex-start; gap: 14px; }
.auth-box .wordmark .logo { width: 72px; height: 72px; box-shadow: 0 0 0 3px rgba(255,255,255,.95), 0 16px 36px -18px rgba(251,69,76,.9); }

/* leave: my applications on the home page, and the small tools in the leave sheet */
.hrow.tap { cursor: pointer; border-radius: 10px; }
.hrow.tap:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.wait-line { margin-bottom: 10px; border-color: var(--amber, #e2a13a); }
.wait-line b { color: var(--red); margin-right: 4px; }
.lv-days { display: grid; grid-template-columns: auto minmax(0, 90px) auto; gap: 10px; align-items: center; margin-top: 14px; }
.lv-days label { margin: 0; }
.lv-days input { margin: 0; text-align: center; }

/* time-off card and page */
.to-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.to-btns .btn { padding: 12px 8px; font-size: 13.5px; }
.wfh-count.owing b { color: var(--red); }
.toff-line { margin: 12px 0 4px; }
.lv-acts.one { grid-template-columns: 1fr; }
@media (max-width: 420px) { .to-btns { grid-template-columns: 1fr; } }

/* check-in: where the phone says you are */
.locbox { margin: 12px 0 4px; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 16px; background: var(--glass, transparent); }
.loc-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.loc-line svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--ok); }
.locbox.bad .loc-line svg, .locbox.bad .loc-text { color: var(--red); }
.locbox.weak .loc-line svg { color: var(--amber, #e2a13a); }
.loc-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.loc-acts .btn { padding: 8px 12px; font-size: 13px; }
.loc-map { margin-top: 10px; }
.loc-map iframe { display: block; width: 100%; height: 220px; border: 0; border-radius: 12px; background: var(--stroke); }
.loc-map .maplink { display: inline-flex; margin-top: 8px; }

/* leave balances, replacement leave, public holidays */
.bal-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 2px 0 12px; }
.bal-tiles > div { padding: 10px 8px; border: 1px solid var(--stroke); border-radius: 14px; text-align: center; min-width: 0; }
.bal-tiles b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.bal-tiles span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.bal-tiles em { display: block; font-style: normal; font-size: 11px; color: var(--muted); opacity: .8; }
.bal-table td.red { color: var(--red); }
.bal-table tr.row { cursor: pointer; }
.ph-add { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 12px 14px; align-items: end; padding: 16px; border-radius: 20px; margin-bottom: 14px; max-width: 860px; }
.ph-add label { margin-top: 0; }
.ph-add .tick { grid-column: 1 / 3; margin: 0; }
.ph-row { grid-template-columns: 96px minmax(0, 1fr) auto; }
.ph-date b { display: block; } .ph-date span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) { .ph-add { grid-template-columns: 1fr; } .ph-add .tick { grid-column: auto; } .ph-row { grid-template-columns: 78px minmax(0, 1fr) auto; } }

/* test mode: always obvious */
.testbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; margin-bottom: 16px; border-radius: 18px; border: 1px dashed var(--red); background: var(--red-soft); }
.testbar b { display: block; color: var(--red); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.testbar span { font-size: 14px; }
.testbar-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.testbar-acts .btn { padding: 8px 12px; font-size: 13px; }
.testbar-acts .btn.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }

/* decisions on my applications; number on the HR tab; a person's year in the People drawer */
.updates { padding: 14px 18px; margin-bottom: 14px; border-radius: 20px; }
.updates > b { display: block; margin-bottom: 8px; }
.upd { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14px; }
.upd .badge { flex: none; }
.nav-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; font-style: normal; }
.bar .nav-dot { position: absolute; top: 4px; right: 18%; margin: 0; }
.prec { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--stroke); }
.prec h3 { margin: 0 0 10px; font-size: 15px; }
.rec-tiles .bad b { color: var(--red); }
input[type=file] { width: 100%; padding: 10px; border: 1px dashed var(--stroke); border-radius: 14px; background: transparent; color: inherit; font: inherit; font-size: 13px; }

/* set-up pages */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.rule-box { padding: 16px 18px; border-radius: 20px; }
.rule-box h2 { margin: 0 0 6px; font-size: 16px; }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 6px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--stroke); }
.rule:first-of-type { border-top: 0; }
.rule label { margin: 0; font-size: 14px; }
.rule input { margin: 0; }
.rule .muted { grid-column: 1 / 3; font-size: 12px; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.pg-box { padding: 16px 18px; border-radius: 20px; }
.pg-box h2 { margin: 0 0 10px; font-size: 16px; }
.pg-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border: 1px solid var(--stroke); border-radius: 999px; font-size: 13px; }
.pg-chip small { color: var(--muted); }
.pg-chip.gone { opacity: .55; }
.pg-chip button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--stroke); color: inherit; cursor: pointer; line-height: 1; }
.log-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--stroke); font-size: 14px; }
.log-row b { display: block; font-weight: 600; } .log-row span { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .log-row { grid-template-columns: 96px minmax(0, 1fr); } .rule { grid-template-columns: minmax(0, 1fr) 120px; } }

/* phone top bar never breaks into two lines (seen on a 384 px Android phone with a larger system font) */
.topline .wordmark { white-space: nowrap; min-width: 0; }
.topline .tools { flex: none; }
.topline .tools .btn { white-space: nowrap; }
@media (max-width: 420px) {
  .topline { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .topline .wordmark { font-size: 17px; gap: 8px; }
  .topline .wordmark .logo { width: 30px; height: 30px; }
  .topline .tools { gap: 6px; }
  .topline .tools .btn { padding: 8px 10px; font-size: 12.5px; }
}
@media (max-width: 350px) { .topline .wordmark span { display: none; } }
/* the number on the HR tab sits on the HR tab */
.bar button { position: relative; }
.bar .nav-dot { top: 2px; right: 8px; }
