/* Polylon Fabrics edition (PF-23 stage 1): design tokens, base, shell, sheet, sign-in, Today, People and the person page.
   Structure follows the owner's Ausvast reference app (soft ground, white 22 px cards, one dark hero card, big Archivo numbers
   with mono labels, pill chips, floating pill tab bar, sidebar on desktop) in Polylon's indigo and saffron. Light theme only.
   polylon-pages.css (loaded after this file) restyles the other pages with the same tokens. */

/* BUG-05: the hidden attribute always wins over component display rules (buttons are display:flex). */
[hidden] { display: none !important; }

:root {
  --bg: #F5F6FA;
  --phone-bg: linear-gradient(165deg, #ECEEF9 0%, #F6F6F2 45%, #FBEFE3 100%);
  --surface: #FFFFFF;
  --surface-2: #EEF0F6;
  --surface-3: #E4E7F0;
  --ink: #1A2133;
  --ink-2: #2E3850;
  --muted: #5A6378;
  --line: #E0E3EC;
  --line-2: #CBD0DD;
  --field-line: #7B859B; /* 3:1 against white: input boundaries */

  --brand: #23306E;
  --brand-2: #1A2456;
  --brand-soft: #E3E6F6;
  --saffron: #E8862A;
  --saffron-soft: #FDEBD6;
  --saffron-ink: #8A4A0C;
  --green: #1A8F62;
  --green-soft: #DDF2E8;
  --green-ink: #0E6B47;
  --red: #C9433F;
  --red-soft: #FBE3E2;
  --red-ink: #A12E2A;
  --violet: #6153C7;
  --violet-soft: #ECE8FA;
  --violet-ink: #4A3DA8;
  --sky-soft: #E1EBFB;
  --sky-ink: #1B4A9E;
  --gold-soft: #FFF1BF;
  --gold-ink: #5E4700;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-card: 22px;
  --shadow: 0 1px 2px rgba(26, 33, 51, .05), 0 8px 24px rgba(26, 33, 51, .07);
  --shadow-lg: 0 2px 6px rgba(26, 33, 51, .08), 0 24px 60px rgba(26, 33, 51, .20);
  --tap: 48px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 64px;
  --sidebar-w: 256px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --quick: 160ms;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; min-height: 100dvh; background: var(--phone-bg); background-color: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 800; font-stretch: 108%; letter-spacing: -.015em; line-height: 1.1; }
h2 { font-size: 20px; font-weight: 700; font-stretch: 104%; line-height: 1.2; }
h3 { font-size: 16px; font-weight: 700; line-height: 1.3; }
h4 { font-size: 14px; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.no-print { }
.print-only { display: none; }
.skip { position: fixed; left: 12px; top: -90px; z-index: 100; padding: 12px 16px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg); font-weight: 700; }
.skip:focus { top: calc(12px + var(--safe-t)); }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow, .mono-label, .eh-eyebrow, .dashboard-eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0;
}

/* ---------- controls ---------- */
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px;
  border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 15px; line-height: 1.2; cursor: pointer; text-align: center;
  transition: background var(--quick) ease, border-color var(--quick) ease, box-shadow var(--quick) ease, transform 120ms var(--ease);
}
button:hover:not(:disabled) { background: var(--surface-2); }
button:active:not(:disabled) { transform: scale(.985); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary, a.primary, .primary { background: var(--brand); color: #fff; border-color: var(--brand); }
button.primary:hover:not(:disabled) { background: var(--brand-2); }
a.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border-radius: var(--r); text-decoration: none; font-weight: 700; font-size: 15px; }
button.accent { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }
button.accent:hover:not(:disabled) { background: #D9791E; }
button.quiet { background: transparent; border-color: transparent; color: var(--brand); }
button.quiet:hover:not(:disabled) { background: var(--brand-soft); }
button.danger { background: var(--red-soft); color: var(--red-ink); border-color: #F0C2BF; }
button.danger:hover:not(:disabled) { background: #F7D2D0; }
/* Coloured actions with an icon (owner, 3 November 2026): View photo blue, Make employee green, Remove red. */
.tone { display: inline-flex; align-items: center; gap: 8px; }
.tone .icon { width: 18px; height: 18px; stroke-width: 2; }
button.tone-blue, a.button.tone-blue { background: var(--brand-soft); color: var(--brand); border-color: #C9CFEC; }
button.tone-blue:hover:not(:disabled), a.button.tone-blue:hover { background: #D3D8F0; }
button.tone-green { background: var(--green-soft); color: var(--green-ink); border-color: #B5E0CC; }
button.tone-green:hover:not(:disabled) { background: #C9EADB; }
button.tone-red { background: var(--red-soft); color: var(--red-ink); border-color: #F0C2BF; }
button.tone-red:hover:not(:disabled) { background: #F7D2D0; }
button.tone-red-solid { background: var(--red); color: #fff; border-color: var(--red); }
button.tone-red-solid:hover:not(:disabled) { background: var(--red-ink); border-color: var(--red-ink); }
button.small { min-height: var(--tap); padding: 0 14px; font-size: 14px; border-radius: 12px; }
button.full, .full { width: 100%; }
.button, a.button { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 18px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; }
.icon-btn { width: var(--tap); padding: 0; border-radius: 50%; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.field > span, .field > label { font-weight: 650; font-size: 14px; color: var(--ink-2); }
.field > small { font-size: 13px; line-height: 1.45; color: var(--muted); }
input, select, textarea {
  width: 100%; min-width: 0; min-height: var(--tap); padding: 0 14px; border: 1.5px solid var(--field-line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.3;
}
textarea { padding: 12px 14px; min-height: 104px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #6B7488; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); }
select {
  appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 50%, calc(100% - 15px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
}
input[type=search] { appearance: none; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 22px; padding: 0; accent-color: var(--brand); flex: none; margin: 0; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 12px 0; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check > span { padding-top: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.span-2 { grid-column: 1 / -1; }
.stack { display: grid; gap: 16px; min-width: 0; }
.form-error { margin: 12px 0 0; color: var(--red-ink); font-size: 14px; font-weight: 600; line-height: 1.5; }
.form-error:empty { display: none; }
.form-error:not(:empty)::before { content: "Please check: "; font-weight: 700; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
/* The Show/Hide button sits inside the box and never moves: the wrapper holds only the input (errors are outside it),
   and the button is pinned to the input's own top and bottom instead of a 50% translate. */
.password-field { position: relative; display: flex; align-items: stretch; }
.password-field input { flex: 1 1 auto; width: 100%; margin: 0; padding-right: 84px; }
.password-field .reveal { position: absolute; right: 6px; top: 6px; bottom: 6px; height: auto; min-height: 0; transform: none; margin: 0; display: inline-flex; align-items: center; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--brand); font-size: 14px; }
.password-field .reveal:hover:not(:disabled) { background: var(--brand-soft); }

/* ---------- badges, chips, avatars ---------- */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2);
  font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap;
}
.badge.green, .pill.ok { background: var(--green-soft); color: var(--green-ink); }
.badge.amber, .pill.warn { background: var(--saffron-soft); color: var(--saffron-ink); }
.badge.blue, .pill.info { background: var(--brand-soft); color: var(--brand); }
.badge.red, .pill.bad { background: var(--red-soft); color: var(--red-ink); }
.badge.violet, .pill.violet { background: var(--violet-soft); color: var(--violet-ink); }
.badge .dot, .pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; flex: none; letter-spacing: .02em;
}
.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: 999px; border: 1.5px solid transparent;
  background: var(--surface); color: var(--ink-2); font-weight: 650; font-size: 14px; box-shadow: 0 2px 10px rgba(26, 33, 51, .06); text-decoration: none; white-space: nowrap;
}
.chip .n { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--muted); }
.chip:hover:not(:disabled) { background: var(--surface-2); }
.chip[aria-pressed=true], .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip[aria-pressed=true] .n, .chip.on .n { color: #fff; }
.chip .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--saffron); color: var(--ink); font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
/* Employee type in Add employee (29 Oct 2026): Regular / Contractual / Cash as one-tap chips; the radio stays for keyboard and forms. */
.type-choice { border: 0; padding: 0; margin: 0; min-width: 0; }
.type-choice legend { font-weight: 650; font-size: 14px; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.type-choice .chip { position: relative; cursor: pointer; }
.type-choice .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-choice .chip:has(input:checked) { background: var(--brand); color: #fff; border-color: var(--brand); }
.type-choice .chip:has(input:focus-visible) { outline: 3px solid var(--saffron); outline-offset: 2px; }
/* People: the department filter is one dropdown instead of a long row of chips (29 Oct 2026). */
.dept-select { min-height: 44px; max-width: 100%; padding: 0 36px 0 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font: inherit; font-weight: 650; color: var(--ink); }
progress { appearance: none; width: 100%; height: 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: rgba(255, 255, 255, .18); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--saffron); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--saffron); border-radius: 999px; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.sidebar { display: none; }
.workspace { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 16px 10px;
  background: rgba(246, 246, 250, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar .nb-header-brand { display: flex; align-items: center; min-width: 0; }
.topbar .nb-header-brand .nb-brand-symbol { width: 48px; height: 48px; }
.nb-brand-symbol { display: block; width: 40px; height: 40px; flex: none; }
.nb-brand-symbol svg, .nb-brand-symbol img { display: block; width: 100%; height: 100%; }
.topbar-title { min-width: 0; flex: 1; }
.topbar-title .mono-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.15; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar .identity { display: none; }
.environment-badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 10px; border-radius: 999px; background: var(--saffron-soft); color: var(--saffron-ink);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.environment-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--saffron); }
/* Polylon Dev (28 Oct 2026): an orange DEV mark on the logo and a saffron-tinted header, so Dev is never mistaken for QA. */
.nb-brand-dev { position: relative; }
.nb-dev-mark {
  position: absolute; right: -7px; bottom: -5px; padding: 1px 4px; border-radius: 5px; border: 1.5px solid #fff; background: var(--saffron); color: #fff;
  font-family: var(--font-mono); font-size: 9px; font-weight: 800; line-height: 1.2; letter-spacing: .06em;
}
[data-environment="polylon-dev"] .topbar, [data-environment="v2-dev"] .topbar { background: rgba(253, 235, 214, .94); box-shadow: inset 0 -2px 0 var(--saffron); }
[data-environment="polylon-dev"] .environment-badge, [data-environment="v2-dev"] .environment-badge { background: var(--saffron); color: #fff; }
[data-environment="polylon-dev"] .environment-badge::before, [data-environment="v2-dev"] .environment-badge::before { background: #fff; }
.content { padding: 8px 16px calc(var(--tabbar-h) + var(--safe-b) + 44px); max-width: 760px; margin: 0 auto; width: 100%; }
.content:focus { outline: none; }
.demo-workspace-banner { display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--r-lg); background: var(--saffron-soft); color: var(--saffron-ink); }
.demo-workspace-banner strong { font-size: 14px; }
.demo-workspace-banner span, .demo-workspace-banner small { font-size: 13px; line-height: 1.5; }

.mobile-nav {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 520px); bottom: calc(12px + var(--safe-b));
  height: var(--tabbar-h); padding: 6px; border-radius: 999px; background: var(--brand-2); box-shadow: 0 14px 34px rgba(26, 36, 86, .32);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
}
.mobile-nav a, .mobile-nav button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; min-width: 0; padding: 0 2px; border-radius: 999px;
  border: 0; background: transparent; color: rgba(255, 255, 255, .78); text-decoration: none; font-size: 12px; font-weight: 600; line-height: 1.1;
}
.mobile-nav a .icon, .mobile-nav button .icon { width: 22px; height: 22px; }
.mobile-nav a:hover, .mobile-nav button:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: #fff; }
.mobile-nav a[aria-current=page] { background: rgba(255, 255, 255, .16); color: #fff; }
.mobile-nav a[aria-current=page] .icon { color: var(--saffron); }
.mobile-nav :focus-visible { outline-color: #fff; outline-offset: -3px; }
.nav-badge {
  position: absolute; top: 3px; left: calc(50% + 4px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--saffron); color: var(--ink);
  font-size: 12px; font-weight: 800; display: grid; place-items: center; line-height: 1;
}
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px); z-index: 80; max-width: min(92vw, 560px);
  background: var(--ink); color: #fff; padding: 14px 18px; border-radius: var(--r); font-size: 15px; font-weight: 600; line-height: 1.45; box-shadow: var(--shadow-lg);
}
.toast[hidden] { display: none; }
.boot { max-width: 520px; margin: 22vh auto 0; padding: 24px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.boot .nb-brand-symbol { width: 104px; height: 104px; }
.boot .nb-brand-symbol img { display: block; width: 100%; height: 100%; }
.boot h1 { font-size: 22px; }
.boot p { color: var(--muted); }

@media (min-width: 768px) {
  .content { max-width: 900px; padding: 12px 28px 56px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
}
@media (min-width: 1024px) {
  body { background: var(--bg); }
  .content { max-width: 1240px; padding: 8px 40px 72px; }
  .topbar { padding: 14px 40px; }
  .topbar-title .mono-label { font-size: 12px; }
  .topbar-title strong { font-size: 18px; }
  .topbar .identity { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); min-width: 0; }
  .topbar .identity > div { display: grid; min-width: 0; }
  .topbar .identity strong { font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .identity small { font-size: 12px; color: var(--muted); line-height: 1.2; }
  .toast { bottom: 28px; }
}

/* ---------- design B (owner, 3 Nov 2026): section rail + the section's pages ----------
   Phone (<768): no rail; the floating tab bar. Tablet (768-1023): the rail alone; a section opens its own page.
   Desktop (1024+): the rail and the page list. Pinned (default) the list sits beside the rail; unpinned only the rail shows
   and the list slides over the page while the mouse or keyboard focus is on the side, then closes by itself. */
:root { --rail-w: 84px; --panel-w: 228px; }
@media (min-width: 768px) {
  .shell { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .mobile-nav { display: none; }
  .sidebar { display: block; position: sticky; top: 0; z-index: 40; height: 100dvh; width: var(--rail-w); transition: width .26s var(--ease); }
  .topbar .nb-header-brand { display: none; }
}
.rail {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: var(--rail-w); height: 100%;
  padding: 14px 8px calc(14px + var(--safe-b)); background: var(--brand-2); overflow-y: auto; scrollbar-width: none;
}
.rail-mark { display: block; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 13px; }
.rail-mark svg, .rail-mark img { display: block; width: 100%; height: 100%; }
.rail > a[data-section] {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 8px; border-radius: 14px;
  color: rgba(255, 255, 255, .78); text-decoration: none; font-size: 12px; font-weight: 650; line-height: 1.1; text-align: center;
  transition: background var(--quick) ease, color var(--quick) ease;
}
.rail > a[data-section] .icon { width: 24px; height: 24px; }
.rail > a[data-section]:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.rail > a[aria-current] { background: #fff; color: var(--brand); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.rail > a[aria-current] .icon { color: var(--saffron); }
.rail .nav-badge { top: 4px; left: calc(50% + 6px); }
.rail :focus-visible { outline-color: #fff; outline-offset: -2px; }
.rail-foot { margin-top: auto; display: grid; justify-items: center; gap: 8px; padding-top: 12px; }
.rail-me, .rail-out { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: rgba(255, 255, 255, .8); text-decoration: none; }
.rail-me .avatar { width: 40px; height: 40px; font-size: 14px; background: var(--saffron); color: var(--ink); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.rail-me[aria-current] .avatar { box-shadow: 0 0 0 3px #fff; }
.rail-out:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-panel { display: none; }
@media (min-width: 1024px) {
  .sidebar[data-pinned="true"] { width: calc(var(--rail-w) + var(--panel-w)); }
  .nav-panel {
    position: absolute; z-index: 1; top: 0; bottom: 0; left: var(--rail-w); width: var(--panel-w); display: flex; flex-direction: column; gap: 6px;
    padding: 18px 12px 16px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    transition: transform .26s var(--ease), opacity .2s ease, visibility 0s linear 0s, box-shadow .26s ease;
  }
  /* Unpinned: hidden until the side is hovered or focused; closing waits a moment so a brief slip of the mouse does not shut it. */
  .sidebar[data-pinned="false"] .nav-panel { transform: translateX(-14px); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .22s var(--ease) .14s, opacity .18s ease .14s, visibility 0s linear .36s, box-shadow .22s ease; }
  .sidebar[data-pinned="false"]:hover .nav-panel, .sidebar[data-pinned="false"]:focus-within .nav-panel {
    transform: none; opacity: 1; visibility: visible; pointer-events: auto; box-shadow: 18px 0 44px rgba(26, 33, 51, .16); transition: transform .26s var(--ease), opacity .2s ease, visibility 0s, box-shadow .26s ease;
  }
}
.nav-pin { position: absolute; top: 18px; right: 12px; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--muted); }
.nav-pin:hover { background: var(--surface-2); color: var(--ink); }
.nav-pin[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.nav-pin[aria-pressed="true"] svg path { fill: currentColor; }
.nav-pages { display: grid; gap: 2px; animation: nav-pages-in .22s var(--ease); }
.nav-pages h2 { font-size: 26px; font-weight: 800; padding: 4px 52px 14px 12px; min-height: 48px; }
@keyframes nav-pages-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.sidebar .nb-brand { display: grid; gap: 4px; }
.nb-lockup { position: relative; display: block; width: min(176px, 100%); }
.nb-lockup svg { display: block; width: 100%; height: auto; }
/* v2 (owner, 20 November 2026): the logo picture beside the plain name, in place of the redrawn lockup. */
.nb-lockup-v2 { display: flex; align-items: center; gap: 10px; }
.nb-lockup-v2 img { display: block; width: 40px; height: 40px; flex: none; }
.nb-lockup-v2 b { font-weight: 800; font-size: 24px; letter-spacing: -.01em; color: #0A1236; }
.nb-lockup-v2 b i { font-style: normal; color: #0E7C86; }
.nb-lockup .nb-dev-mark { right: auto; left: 23%; bottom: -2px; }
.nb-for { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .02em; padding-left: 4px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: 15px;
}
.nav a > span:not(.count) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a .icon { color: var(--muted); flex: none; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current=page] { background: var(--brand-soft); color: var(--brand); }
.nav a[aria-current=page] .icon { color: var(--brand); }
.nav a .count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--saffron); color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.sidebar-footer { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.sidebar-footer .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-footer .who > div { display: grid; min-width: 0; }
.sidebar-footer .who strong { color: var(--ink); font-size: 14px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer .who small { font-size: 12px; }
[data-environment="polylon-dev"] .nav-panel, [data-environment="v2-dev"] .nav-panel { background: linear-gradient(180deg, var(--saffron-soft) 0, var(--surface) 140px); }
[data-environment="polylon-dev"] .rail, [data-environment="v2-dev"] .rail { box-shadow: inset -3px 0 0 var(--saffron); }
/* The phone's user tab: a circle with the user's initials, opening More (owner, 3 Nov 2026). */
.mobile-nav .nav-me .avatar { width: 28px; height: 28px; font-size: 12px; background: var(--saffron); color: var(--ink); box-shadow: 0 0 0 2px rgba(255, 255, 255, .22); }
.mobile-nav .nav-me[aria-current=page] .avatar { box-shadow: 0 0 0 2px #fff; }
.mobile-nav .nav-me > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-slot:empty { display: none; }

/* ---------- page head, cards ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 4px 0 20px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; flex: 1 1 280px; }
.page-head h1 { margin-bottom: 6px; }
.page-head p { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 68ch; }
.page-head .actions { margin: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 0; }
.section-head h2 { font-size: 20px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; min-width: 0; box-shadow: var(--shadow);
}
.panel > h2:first-child { margin-bottom: 8px; }
.panel p { font-size: 15px; line-height: 1.55; max-width: 72ch; }
.panel .muted { font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.route-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.callout {
  padding: 14px 16px; border: 1px solid #F3D4A9; background: var(--saffron-soft); color: #5B3207; border-radius: var(--r); font-size: 14px; line-height: 1.6;
}
.callout.info { background: var(--brand-soft); border-color: #C8CEEA; color: var(--brand-2); }
.callout.success { background: var(--green-soft); border-color: #B7E0CC; color: #0B4F35; }
.callout.danger { background: var(--red-soft); border-color: #F0C2BF; color: var(--red-ink); }
.callout ul { margin: 8px 0 0; padding-left: 20px; }
.empty { text-align: center; padding: 36px 20px; display: grid; justify-items: center; gap: 10px; color: var(--muted); }
.empty > .icon { width: 40px; height: 40px; color: var(--brand); opacity: .55; }
.empty h2 { color: var(--ink); font-size: 20px; }
.empty p { max-width: 44ch; }
.loading { display: grid; gap: 14px; padding: 26px 20px; }
.loading span { display: block; height: 16px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.loading span:nth-child(2) { width: 75%; }
.loading span:nth-child(3) { width: 50%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.person-link { color: var(--ink); text-decoration: none; font-weight: 700; }
.person-link:hover { color: var(--brand); text-decoration: underline; }

/* tables: cards on phones, real tables on wide screens */
.table-wrap { overflow-x: auto; max-width: 100%; border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; font-size: 14px; text-align: left; }
/* Table headers (owner, 3 Nov 2026): proper bold labels in the body font, on a light brand tint. */
th { font-family: var(--font-body); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--brand, #23306E); font-weight: 700; background: #EEF0F8; padding: 12px 14px; white-space: nowrap; border-bottom: 1px solid #D9DEEE; }
td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td strong { display: block; font-size: 15px; }
td small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFAFD; }

/* ---------- sheet (full screen on phones, drawer from 768 px) ---------- */
.sheet-root[hidden] { display: none; }
.sheet-root { position: fixed; inset: 0; z-index: 60; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(26, 33, 51, .5); touch-action: none; animation: scrim-in 200ms ease-out; }
.sheet {
  position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface); height: var(--vv-h, 100dvh); max-height: 100dvh; overflow: hidden;
  animation: sheet-up 240ms var(--ease); touch-action: auto;
}
.sheet-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-t)) 14px 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.sheet-title { font-size: 20px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sheet-x { width: var(--tap); padding: 0; border-radius: 50%; flex: none; }
.sheet-x-space { width: 12px; flex: none; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px calc(24px + var(--safe-b)); scroll-padding-bottom: 120px; }
.sheet-intro { color: var(--muted); font-size: 15px; line-height: 1.55; margin-bottom: 16px; }
.sheet form > .actions:last-child, .sheet .sheet-body > .actions:last-child {
  position: sticky; bottom: calc(-24px - var(--safe-b)); z-index: 2; margin: 24px -20px calc(-24px - var(--safe-b)); padding: 14px 20px calc(14px + var(--safe-b));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px rgba(26, 33, 51, .06);
}
.sheet form > .actions:last-child .primary, .sheet .sheet-body > .actions:last-child .primary { flex: 1 1 160px; }
.sheet .form-error { margin-bottom: 4px; }
.sheet-confirm {
  position: sticky; top: -18px; z-index: 3; margin: -18px -20px 16px; padding: 14px 20px; background: var(--saffron-soft); border-bottom: 1px solid #F3D4A9; color: #5B3207; display: grid; gap: 10px;
}
.sheet-confirm p { font-size: 15px; font-weight: 650; }
.sheet .sheet-confirm .actions { position: static; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
.sheet .finance-form, .sheet .app-access { border: 0; padding: 0; margin: 0; }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes sheet-in-right { from { transform: translateX(32px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 768px) {
  .sheet { inset: 0 0 0 auto; width: 480px; max-width: 100vw; border-radius: 22px 0 0 22px; box-shadow: var(--shadow-lg); animation-name: sheet-in-right; height: 100dvh; }
  .sheet[data-size=lg] { width: 640px; }
  .sheet[data-size=sm] { inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 460px; height: auto; max-height: min(86dvh, 720px); border-radius: 22px; animation-name: sheet-pop; }
  .sheet[data-size=sm] .sheet-body { padding-bottom: 24px; }
  .sheet[data-size=sm] form > .actions:last-child, .sheet[data-size=sm] .sheet-body > .actions:last-child { bottom: -24px; margin-bottom: -24px; padding-bottom: 14px; }
  .sheet-head { padding-top: 14px; }
}
@keyframes sheet-pop { from { transform: translate(-50%, -48%); opacity: .6; } to { transform: translate(-50%, -50%); opacity: 1; } }

/* ---------- sign-in ---------- */
.auth-page {
  min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 22px; padding: calc(28px + var(--safe-t)) 20px calc(28px + var(--safe-b));
  background: var(--phone-bg); background-color: var(--bg);
}
.auth-hero { text-align: center; display: grid; justify-items: center; gap: 10px; max-width: 460px; }
/* Sign-in: the kit's splash plays once (corners close on the face, the tick draws, then "Hazir-E" and its Hindi line rise in). */
.auth-hero .auth-splash { display: block; width: min(176px, 46vw); height: auto; }
.auth-hero h1 { font-size: clamp(34px, 8vw, 44px); font-stretch: 112%; letter-spacing: -.02em; margin-top: 6px; }
.auth-hero .tagline { color: var(--ink-2); font-size: 17px; line-height: 1.45; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 26px; padding: 24px 22px 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.auth-card h2 { font-size: 22px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
.auth-card form { display: grid; gap: 16px; }
.auth-card .primary { width: 100%; min-height: 54px; font-size: 17px; border-radius: 16px; }
.auth-card .field-error { color: var(--red-ink); font-size: 14px; font-weight: 600; line-height: 1.45; }
.auth-card .field-error:empty { display: none; }
.auth-card .field-error::before { content: "! "; font-weight: 800; }
.auth-card input[aria-invalid=true] { border-color: var(--red); }
.auth-alt { display: flex; justify-content: center; margin-top: 8px; }
.auth-alt button { color: var(--brand); }
.auth-foot { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.auth-card .code-input { font-family: var(--font-mono); font-size: 26px; letter-spacing: .4em; text-align: center; min-height: 60px; padding: 0 0 0 .4em; }

/* ---------- Today ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.hello h1 { font-size: 28px; }
.hello p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.date-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.date-bar .date-label { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 15px; padding: 0 4px; }
.date-bar .icon-btn { background: var(--surface); }
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--r-card); padding: 20px; box-shadow: 0 14px 34px rgba(26, 36, 86, .28);
  background: linear-gradient(155deg, var(--brand) 0%, var(--brand-2) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 9px), repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 9px);
  mask-image: linear-gradient(120deg, transparent 20%, #000 100%); -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000 100%);
}
.hero > * { position: relative; z-index: 1; }
.hero .mono-label { color: rgba(255, 255, 255, .78); }
.hero .big { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 12px; flex-wrap: wrap; }
.hero .big strong { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: 56px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero .big span { color: rgba(255, 255, 255, .85); font-size: 16px; font-weight: 600; }
.hero .hero-away { margin: -6px 0 10px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.hero .meta { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.hero .meta b { color: #fff; font-family: var(--font-display); font-size: 17px; }
.hero a, .hero button.light { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; min-height: var(--tap); padding: 0 16px; border-radius: var(--r); background: #fff; color: var(--brand); font-weight: 700; text-decoration: none; border: 0; }
.hero :focus-visible { outline-color: #fff; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.kpi { position: relative; display: grid; gap: 4px; align-content: space-between; min-height: 112px; padding: 16px; border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); text-decoration: none; color: inherit; }
.kpi .mono-label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.kpi .mono-label i { width: 10px; height: 10px; border-radius: 50%; background: var(--tone, var(--brand)); flex: none; }
.kpi strong { font-family: var(--font-display); font-weight: 800; font-stretch: 112%; font-size: 42px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.kpi.present { --tone: var(--green); } .kpi.late { --tone: var(--saffron); } .kpi.fines { --tone: var(--red); } .kpi.absent { --tone: var(--red); } .kpi.leave { --tone: var(--violet); } .kpi.ot { --tone: var(--brand); }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi { transition: transform var(--quick) var(--ease), box-shadow var(--quick) ease; }
.needs { display: grid; margin: 0; padding: 0; list-style: none; }
.needs li { border-top: 1px solid var(--line); }
.needs li:first-child { border-top: 0; }
.needs a { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 0; color: inherit; text-decoration: none; }
.needs a:hover .need-text strong { color: var(--brand); }
.need-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--saffron-soft); color: var(--saffron-ink); display: grid; place-items: center; flex: none; }
.need-text { flex: 1; min-width: 0; }
.need-text strong { display: block; font-size: 16px; }
.need-text small { color: var(--muted); font-size: 14px; }
.need-count { min-width: 32px; height: 32px; padding: 0 10px; border-radius: 16px; background: var(--saffron); color: var(--ink); font-family: var(--font-display); font-weight: 800; display: grid; place-items: center; }
.clear-note { display: flex; align-items: center; gap: 10px; color: var(--green-ink); font-weight: 650; padding: 6px 0; }
.punch-list { margin: 0; padding: 0; list-style: none; display: grid; }
.punch-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.punch-list li:first-child { border-top: 0; }
.punch-list .when { font-family: var(--font-mono); font-size: 13px; color: var(--muted); min-width: 52px; }
.punch-list .who { flex: 1; min-width: 0; }
.punch-list .who strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.punch-list .who small { color: var(--muted); font-size: 13px; }
.today-grid { display: grid; gap: 14px; }
.today-grid > section { min-width: 0; }
.today-grid h2 { font-size: 18px; margin-bottom: 4px; }
.today-grid .sub { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.dept-table { min-width: 560px; }
.dept-table th:not(:first-child), .dept-table td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.dept-table tbody th { background: transparent; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); text-align: left; padding: 14px; border-bottom: 1px solid var(--line); }
.filter-sheet-note { font-size: 14px; color: var(--muted); }
.payroll-card .big-money { font-family: var(--font-display); font-weight: 800; font-size: 32px; letter-spacing: -.02em; margin: 6px 0; overflow-wrap: anywhere; }

@media (min-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero .big strong { font-size: 64px; }
}
@media (min-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .today-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .today-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
  .today-top > .hero { display: flex; flex-direction: column; justify-content: space-between; }
}

/* ---------- People ---------- */
.people-tools { display: grid; gap: 10px; margin-bottom: 12px; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { padding-left: 46px; border-radius: 999px; border-color: var(--field-line); box-shadow: 0 2px 10px rgba(26, 33, 51, .06); }
.people-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.people-bar p { color: var(--muted); font-size: 14px; }
.people-list { display: grid; gap: 10px; }
.people-head { display: none; }
.person-card {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 12px 14px 12px 12px; background: var(--surface); border-radius: var(--r-card);
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.person-main { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; min-height: 56px; border-radius: var(--r); }
.person-main:hover .person-name { color: var(--brand); }
.person-main .avatar { width: 48px; height: 48px; }
.person-text { min-width: 0; display: grid; gap: 2px; }
.person-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta .mono { font-size: 13px; }
.person-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.person-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 2px 2px; }
.person-action { }
.person-department, .person-position { display: none; }
@media (min-width: 1024px) {
  /* Columns give way when the pinned page list takes its space (owner, 3 Nov 2026): no sideways scroll. */
  .people-head, .person-card { grid-template-columns: minmax(170px, 1.6fr) minmax(70px, 1fr) minmax(70px, 1fr) 118px 150px; gap: 0 14px; }
  .person-card > * { min-width: 0; }
  .people-head { display: grid; align-items: center; padding: 12px 16px 12px 12px; border-radius: var(--r-lg); background: #EEF0F8; border: 1px solid #D9DEEE; font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--brand, #23306E); }
  .people-list { gap: 8px; }
  .person-card { border-radius: var(--r-lg); padding: 8px 14px 8px 12px; box-shadow: none; }
  .person-card:hover { box-shadow: var(--shadow); }
  .person-department, .person-position { display: block; font-size: 15px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .person-meta .dept-inline { display: none; }
  .person-foot { display: contents; }
  .person-chips { justify-content: flex-start; }
  .person-action { justify-self: end; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .people-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.person-action button { min-height: var(--tap); }
.people-empty { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); }
.catalog-panel .catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
.catalog-list { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-list li { background: var(--surface-2); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.catalog-panel details summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--brand); }

/* ---------- person page ---------- */
.profile-hero {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--r-card); padding: 18px; background: linear-gradient(155deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 14px 34px rgba(26, 36, 86, .28); display: grid; gap: 14px;
}
.profile-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 9px); mask-image: linear-gradient(120deg, transparent 30%, #000 100%); -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000 100%); }
.profile-hero > * { position: relative; z-index: 1; }
.profile-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 26px; flex: none; }
.profile-hero h1 { color: #fff; font-size: 26px; overflow-wrap: anywhere; }
.profile-hero .sub { color: rgba(255, 255, 255, .85); font-size: 15px; margin-top: 3px; }
.profile-hero .chip-line { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-hero .badge { background: rgba(255, 255, 255, .16); color: #fff; }
.profile-hero .badge.green { background: #DDF2E8; color: var(--green-ink); }
.profile-hero .badge.amber { background: var(--saffron-soft); color: var(--saffron-ink); }
.profile-hero .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.profile-hero .hero-actions button { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.profile-hero .hero-actions button:hover:not(:disabled) { background: rgba(255, 255, 255, .22); }
.profile-hero :focus-visible { outline-color: #fff; }
.profile-layout { display: grid; gap: 14px; margin-top: 14px; align-items: start; }
.profile-side { display: grid; gap: 14px; min-width: 0; }
.profile-main { min-width: 0; display: grid; gap: 14px; }
.info-card { background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 10px; min-width: 0; }
.info-card h3 { font-size: 17px; }
.info-card .info-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.info-card p { font-size: 15px; line-height: 1.5; }
.info-card dl { margin: 0; display: grid; gap: 10px; }
.info-card dl > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.info-card dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.info-card dt { color: var(--muted); font-size: 14px; }
.info-card dd { margin: 0; font-weight: 650; font-size: 15px; text-align: right; overflow-wrap: anywhere; }
.month-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.month-dl > div { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 2px; border: 0; }
.month-dl dt { font-size: 12px; font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.month-dl dd { font-family: var(--font-display); font-weight: 800; font-size: 22px; text-align: left; }
.profile-tabs { display: flex; gap: 6px; padding: 6px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.profile-tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); border-radius: 999px; min-height: 44px; padding: 0 12px; }
.profile-tabs button[aria-current=page] { background: var(--brand); color: #fff; }
.remove-confirm { border: 1px solid #F0C2BF; background: var(--red-soft); border-radius: var(--r); padding: 14px; display: grid; gap: 12px; }
.remove-confirm p { font-size: 15px; line-height: 1.5; color: var(--ink); }
.remove-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.danger-zone { background: transparent; border: 1.5px dashed #E6B4B1; box-shadow: none; }
@media (min-width: 768px) {
  .profile-hero { padding: 24px; }
  .profile-hero .hero-actions { grid-template-columns: repeat(4, auto); justify-content: start; }
}
@media (min-width: 1024px) {
  .profile-layout { grid-template-columns: 360px minmax(0, 1fr); }
  .profile-side { position: sticky; top: 84px; }
}

/* ---------- misc dialogs ---------- */
dialog { border: 0; border-radius: var(--r-card); padding: 20px; width: min(560px, 92vw); max-height: 90dvh; color: var(--ink); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(26, 33, 51, .6); }
dialog header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
dialog h2 { font-size: 20px; }
dialog img { display: block; max-width: 100%; max-height: 60dvh; margin: 16px auto; object-fit: contain; border-radius: var(--r); }
dialog p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.photo-frame { position: relative; display: inline-block; max-width: 100%; margin: 16px auto; line-height: 0; }
.photo-frame img { margin: 0; }
.face-box { position: absolute; border: 3px solid #2ECC71; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); pointer-events: none; }

@media (max-width: 767px) {
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .split { grid-template-columns: 1fr; }
  .catalog-panel .catalog-grid { grid-template-columns: 1fr; }
  .page-head .actions { width: 100%; }
  .page-head h1 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .page-head { margin-top: 0; }
  .hello h1, .profile-hero h1 { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.radio-row { display: flex; gap: 20px; flex-wrap: wrap; }

/* Today: coverage facts, payroll card, odd KPI tile */
.kpi-grid .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 96px; }
.dashboard-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.dashboard-facts > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-2); border-radius: var(--r); padding: 10px 14px; min-height: 52px; }
.dashboard-facts dt { font-size: 14px; color: var(--muted); }
.dashboard-facts dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.dashboard-paid { display: grid; gap: 4px; margin: 16px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.dashboard-paid strong { font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.t-cover .profile-section-head { margin-bottom: 4px; }
@media (min-width: 768px) { .kpi-grid .kpi:last-child:nth-child(odd) { grid-column: auto; } }
@media (min-width: 1024px) {
  .today-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; grid-template-areas: "hero needs" "kpi needs" "cover punches" "dept pay"; }
  .today-layout > .t-hero { grid-area: hero; } .today-layout > .t-kpi { grid-area: kpi; margin: 0; } .today-layout > .t-needs { grid-area: needs; }
  .today-layout > .t-punches { grid-area: punches; } .today-layout > .t-cover { grid-area: cover; } .today-layout > .t-pay { grid-area: pay; } .today-layout > .t-dept { grid-area: dept; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
@media (min-width: 1280px) { .today-layout .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; } .today-layout .kpi strong { font-size: 36px; } .today-layout .kpi { padding: 14px; } }
@media (max-width: 1023px) { .today-layout { display: grid; gap: 14px; } .today-layout > .t-kpi { margin: 0; } }
.people-tools > *, .filter-row, .today-layout > *, .profile-layout > * { min-width: 0; }
.info-card dl.month-dl > div { display: grid; justify-content: stretch; border-bottom: 0; padding-bottom: 10px; }
.info-card dl.month-dl > div:last-child { padding-bottom: 10px; }
.month-dl dd { overflow-wrap: anywhere; }
.month-dl > div:last-child:nth-child(3n+1) { grid-column: span 3; }
.month-dl > div:last-child { grid-column: 1 / -1; }
.sheet-body > form { display: flex; flex-direction: column; gap: 16px; min-height: 100%; }
.sheet-body > form > .actions:last-child { margin-top: auto; }
.sheet-body > form > .stack { display: grid; }
.profile-section-head .person-link, .info-head .person-link { display: inline-flex; align-items: center; min-height: var(--tap); }

/* Face service warning on Today (24 October 2026). */
.face-warning { border: 1px solid var(--red); background: var(--red-soft, #FBE3E2); margin-bottom: 16px; }
.face-warning h2 { color: var(--red); margin: 0 0 6px; }
.face-warning p { margin: 4px 0; color: var(--ink); }
.nav-brand { margin-top: auto; padding: 16px 8px 4px; opacity: .9; }
.nav-brand .nb-lockup { width: 128px; }
.nav-brand + .sidebar-footer { margin-top: 0; }
@media (max-width: 359px) { .mobile-nav a, .mobile-nav button { font-size: 11px; letter-spacing: -.01em; } }
.nav-sub { font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 4px; margin: 0; }
.nav-pages .nav-sub + a, .nav-pages h2 + a { margin-top: 0; }

/* Company logo after sign-in (HazirE v2): from the session, beside the company name; never before login. */
.company-logo { width: 22px; height: 22px; border-radius: 6px; object-fit: contain; vertical-align: middle; margin-right: 6px; }
