/* =====================================================================
   LaQuest Payroll — Component layer (premium pass)
   LAYER 3 component tokens + the component library. Every value routes
   through a semantic token. Calm, confident, enterprise-fintech.
   ===================================================================== */

:root {
  --button-height: 38px;
  --button-height-sm: 30px;
  --button-radius: var(--radius-sm);
  --button-pad-x: var(--space-4);

  --card-bg: var(--color-surface);
  --card-border: var(--color-border);
  --card-radius: var(--radius-lg);
  --card-pad: var(--space-6);
  --card-shadow: var(--shadow-sm);

  --input-height: 38px;
  --input-radius: var(--radius-sm);

  --table-row-h: 40px;
  --table-head-bg: var(--color-surface);

  --step-size: 28px;
}

/* --------------------------------------------------------------------- */
/* Brand + sidebar navigation                                            */
/* --------------------------------------------------------------------- */
.brand { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-1) var(--space-2) var(--space-2); }
.brand__logo {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  background: var(--color-primary); color: var(--color-on-primary);
  font-weight: var(--weight-extra); font-size: var(--text-md);
  display: grid; place-items: center; letter-spacing: -0.04em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}
.brand__name { color: var(--color-sidebar-fg-strong); font-weight: var(--weight-bold); font-size: var(--text-md); letter-spacing: var(--tracking-snug); }
.brand__tag  { color: var(--slate-500); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.09em; margin-top: 1px; }

.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; overflow-y: auto; margin: 0 calc(-1 * var(--space-1)); padding: 0 var(--space-1); }
.nav__section { color: var(--color-ink-subtle); font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: 0.08em; padding: var(--space-5) var(--space-3) var(--space-2); font-weight: var(--weight-semibold); }
.nav__section:first-child { padding-top: var(--space-2); }
.nav__item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  color: var(--color-sidebar-fg); font-size: var(--text-md); font-weight: var(--weight-medium);
  cursor: pointer; border: none; background: none; width: 100%; text-align: left; position: relative;
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.nav__item:hover { background: var(--color-sidebar-active-bg); color: var(--color-sidebar-fg-strong); }
.nav__item.active { background: var(--color-sidebar-active-bg); color: var(--color-sidebar-active-fg); font-weight: var(--weight-semibold); }
/* Active accent strip removed 2026-08-17 — see the quiet selected state in lq-components.css. */
.nav__icon { width: 18px; height: 18px; flex-shrink: 0; color: currentColor; opacity: 0.8; transition: color var(--dur-fast), opacity var(--dur-fast); }
.nav__item:hover .nav__icon, .nav__item.active .nav__icon { color: currentColor; opacity: 1; }
.nav__item .badge { margin-left: auto; }

.tenant-card {
  background: var(--color-sidebar-active-bg); border: 1px solid var(--color-sidebar-border);
  border-radius: var(--radius-md); padding: var(--space-3); display: flex; flex-direction: column; gap: 2px;
}
.tenant-card b { color: var(--color-sidebar-fg-strong); font-size: var(--text-md); letter-spacing: var(--tracking-snug); }
.tenant-card small { color: var(--slate-500); font-size: var(--text-2xs); }
.tenant-card .status-dot { display: inline-flex; align-items: center; gap: 6px; }
.tenant-card .status-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--slate-500); }
.tenant-card .status-dot.live::before { background: var(--green-500); box-shadow: 0 0 0 3px rgba(42,156,91,0.18); }

/* --------------------------------------------------------------------- */
/* Topbar                                                                */
/* --------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--color-surface) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-8);
}
.topbar { min-width: 0; }
.topbar__head { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.topbar__title { font-size: var(--text-lg); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-snug); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__crumb { color: var(--color-ink-muted); font-size: var(--text-sm); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__spacer { flex: 1 1 0; min-width: var(--space-2); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-sm);
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-ink-muted); cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.icon-btn:hover { background: var(--color-surface-hover); color: var(--color-ink); border-color: var(--color-border-strong); }
.icon-btn--ghost { border-color: transparent; background: transparent; }
.icon-btn--ghost:hover { background: var(--color-surface-hover); border-color: var(--color-border); }
/* Burger toggles the rail on desktop and the drawer on mobile — always shown. */
.menu-btn { display: grid; }
@media (max-width: 900px) {
  .topbar { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
}

/* Topbar brand (logo + name), left side after the burger */
.brand--top { padding: 0; gap: var(--space-2); text-decoration: none; cursor: pointer; flex-shrink: 0; }
.brand--top .brand__name { color: var(--color-ink); font-size: var(--text-md); font-weight: var(--weight-bold); letter-spacing: var(--tracking-snug); }
@media (max-width: 560px) { .brand--top .brand__name { display: none; } }

/* Global search */
.topbar__search { position: relative; display: flex; align-items: center; width: 320px; max-width: 34vw; }
.topbar__search-ic { position: absolute; left: 12px; display: grid; place-items: center; color: var(--color-ink-subtle); pointer-events: none; }
.topbar__search-ic svg { width: 16px; height: 16px; }
.topbar__search input { width: 100%; height: 38px; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-pill); padding: 0 var(--space-4) 0 36px; font: inherit; font-size: var(--text-md); color: var(--color-ink); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.topbar__search input::placeholder { color: var(--color-ink-subtle); }
.topbar__search input:focus { outline: none; border-color: var(--color-border-focus); box-shadow: var(--shadow-focus); }
@media (max-width: 720px) { .topbar__search { display: none; } }

/* Pinned Settings gear at the bottom of the rail */
.nav-foot { margin-top: auto; padding-top: var(--space-2); border-top: 1px solid var(--color-sidebar-border); }

/* --------------------------------------------------------------------- */
/* Top-right cluster: search, theme, notifications, avatar menu          */
/* --------------------------------------------------------------------- */
.topbar__cluster { display: inline-flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.topbar__cluster .divider { width: 1px; height: 24px; background: var(--color-border); margin: 0 var(--space-1); }

.bell { position: relative; }
.bell__dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 2px solid var(--color-surface); }

.menu-anchor { position: relative; }
.avatar-btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: 3px 3px 3px 4px; border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-pill); cursor: pointer; color: var(--color-ink); transition: border-color var(--dur-fast), background var(--dur-fast); }
.avatar-btn:hover { border-color: var(--color-border-strong); background: var(--color-surface-hover); }
.avatar-btn .avatar-chevron { width: 15px; height: 15px; color: var(--color-ink-subtle); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: var(--text-xs); font-weight: var(--weight-bold);
  background: var(--color-primary); color: var(--color-on-primary); letter-spacing: -0.02em;
  background-size: cover; background-position: center;
}
.avatar--lg { width: 44px; height: 44px; font-size: var(--text-md); }
/* Circular headshot photo (soft ring, no chevron) */
.avatar-btn--photo { padding: 0; border: none; background: none; border-radius: 50%; }
.avatar-btn--photo:hover { background: none; }
.avatar--photo {
  width: 38px; height: 38px; color: transparent;
  background-color: var(--color-surface-sunken);
  /* Real headshot avatar.jpg preferred; avatar.svg is the graceful fallback. */
  background-image: url('../assets/avatar.jpg'), url('../assets/avatar.svg');
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 3px var(--color-border);
}
.avatar--photo.avatar--lg { width: 44px; height: 44px; }

/* Dropdown popover (avatar menu) */
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 248px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-2);
  z-index: var(--z-modal); opacity: 0; transform: translateY(-6px) scale(0.98);
  transform-origin: top right; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.menu-pop.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.menu-pop__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); }
.menu-pop__name { font-weight: var(--weight-semibold); color: var(--color-ink); font-size: var(--text-md); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.menu-pop__mail { color: var(--color-ink-muted); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.menu-pop__sep { height: 1px; background: var(--color-hairline); margin: var(--space-2) var(--space-1); }
.menu-item {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); border: none; background: none;
  color: var(--color-ink); font: inherit; font-size: var(--text-md); cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--color-surface-hover); outline: none; }
.menu-item svg { width: 16px; height: 16px; color: var(--color-ink-subtle); flex-shrink: 0; }
.menu-item--danger { color: var(--color-danger-fg); }
.menu-item--danger svg { color: var(--color-danger-fg); }
.menu-item__right { margin-left: auto; color: var(--color-ink-subtle); font-size: var(--text-xs); }

/* Segmented control (theme picker) — used in the menu + Settings */
.segmented { display: inline-flex; background: var(--color-surface-sunken); border-radius: var(--radius-md); padding: 3px; gap: 2px; }
.segmented button { border: none; background: none; padding: 6px var(--space-3); border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-ink-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background var(--dur-fast), color var(--dur-fast); }
.segmented button svg { width: 15px; height: 15px; }
.segmented button:hover { color: var(--color-ink); }
.segmented button.active { background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-xs); }
.segmented--block { display: flex; }
.segmented--block button { flex: 1; justify-content: center; }
/* Trim non-essential topbar chrome on phones so the row never overflows. */
@media (max-width: 768px) {
  /* Demo role-switcher: cap width and scroll rather than force the row wide. */
  .role-switch { max-width: 46vw; overflow-x: auto; flex-shrink: 1; scrollbar-width: none; }
  .role-switch::-webkit-scrollbar { display: none; }
}
@media (max-width: 560px) {
  .topbar__crumb { display: none; }
  .topbar .status-pill { display: none; }
  .topbar__title { max-width: 52vw; }
  .user-chip { gap: var(--space-2); }
  .user-chip .btn__label { display: none; }   /* Sign out -> icon only */
}

.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-ink-muted); padding: 5px var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-pill); }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--slate-400); }
.status-pill.live { color: var(--color-success-fg); border-color: var(--green-100); }
.status-pill.live::before { background: var(--green-500); box-shadow: 0 0 0 3px rgba(42,156,91,0.16); }

.role-switch { display: inline-flex; background: var(--color-surface-sunken); border-radius: var(--radius-pill); padding: 3px; gap: 2px; }
.role-switch button { border: none; background: none; padding: 5px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-ink-muted); cursor: pointer; transition: color var(--dur-fast), background var(--dur-fast); }
.role-switch button:hover { color: var(--color-ink); }
.role-switch button.active { background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-xs); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-7); flex-wrap: wrap; }
.page-head h1 { font-size: var(--text-2xl); letter-spacing: var(--tracking-tight); text-wrap: balance; }
.page-head p { color: var(--color-ink-muted); font-size: var(--text-md); margin-top: var(--space-2); max-width: 62ch; }

/* --------------------------------------------------------------------- */
/* Buttons                                                               */
/* --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: var(--button-height); padding: 0 var(--button-pad-x);
  border-radius: var(--button-radius); border: 1px solid transparent;
  font-size: var(--text-md); font-weight: var(--weight-medium); line-height: 1; font-family: inherit;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast);
}
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn__icon { width: 16px; height: 16px; }

.btn--primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-xs); font-weight: var(--weight-semibold); }
.btn--primary:hover:not(:disabled) { background: var(--color-primary-hover); }
.btn--primary:active { background: var(--color-primary-active); }

.btn--secondary { background: var(--color-surface); color: var(--color-ink); border-color: var(--color-border-strong); box-shadow: var(--shadow-xs); }
.btn--secondary:hover:not(:disabled) { background: var(--color-surface-hover); border-color: var(--color-ink-subtle); }

.btn--ghost { background: transparent; color: var(--color-ink-muted); }
.btn--ghost:hover:not(:disabled) { background: var(--color-surface-hover); color: var(--color-ink); }

.btn--danger { background: var(--color-danger); color: var(--white); }
.btn--danger:hover:not(:disabled) { background: var(--red-700); }
.btn--success { background: var(--color-success); color: var(--white); }
.btn--success:hover:not(:disabled) { background: var(--green-700); }

.btn--sm { height: var(--button-height-sm); padding: 0 var(--space-3); font-size: var(--text-sm); }
.btn--block { width: 100%; }

/* --------------------------------------------------------------------- */
/* Cards & surfaces                                                      */
/* --------------------------------------------------------------------- */
.card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--card-radius); padding: var(--card-pad); box-shadow: var(--card-shadow);
}
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.card__head svg { width: 18px; height: 18px; color: var(--color-ink-subtle); }
.card__title { font-size: var(--text-lg); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-snug); }
.card__sub { color: var(--color-ink-muted); font-size: var(--text-sm); margin-top: 2px; }
.card__foot { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--color-hairline); color: var(--color-ink-muted); font-size: var(--text-sm); }
/* Footer action rows wrap so button groups never exceed a narrow card. */
.card__foot.row, .card__foot .row { flex-wrap: wrap; gap: var(--space-3); }
/* Numeric/monospace cells stay on one line but can scroll within their wrap. */
.card, .stat { min-width: 0; }
.section-label { font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-ink-muted); }

/* --------------------------------------------------------------------- */
/* Stat tiles (KPI) — no accent rail; hierarchy carries it               */
/* --------------------------------------------------------------------- */
.stat {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius);
  padding: var(--space-5); box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: var(--space-3);
}
.stat__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.stat__label { font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-ink-muted); }
.stat__glyph { width: 16px; height: 16px; color: var(--color-ink-subtle); }
.stat__value { font-size: var(--text-2xl); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-tight); color: var(--color-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat__meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-ink-muted); }
.stat--lead .stat__value { color: var(--color-primary-ink); }

.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: var(--weight-semibold); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.delta--up { color: var(--color-delta-up); }
.delta--down { color: var(--color-delta-down); }
.delta svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------------- */
/* Skeleton loading                                                      */
/* --------------------------------------------------------------------- */
.skeleton { display: inline-block; background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-150) 37%, var(--slate-100) 63%); background-size: 400% 100%; border-radius: var(--radius-xs); animation: shimmer 1.4s ease-in-out infinite; color: transparent; }
.skeleton--value { width: 8.5ch; height: 1.1em; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* --------------------------------------------------------------------- */
/* Badges & pills                                                        */
/* --------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 2px var(--space-2); border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: var(--weight-medium); line-height: 1.6;
  background: var(--color-surface-sunken); color: var(--color-ink-muted);
}
.badge--dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--success { background: var(--color-success-weak); color: var(--color-success-fg); }
.badge--warning { background: var(--color-warning-weak); color: var(--color-warning-fg); }
.badge--danger  { background: var(--color-danger-weak);  color: var(--color-danger-fg); }
.badge--info    { background: var(--color-info-weak);    color: var(--color-info-fg); }
.badge--gold    { background: var(--color-gold-weak);    color: var(--color-gold); }
.badge--primary { background: var(--color-primary-weak); color: var(--color-primary-weak-fg); }
.badge--soft    { background: transparent; border: 1px solid var(--color-border); color: var(--color-ink-muted); }

/* --------------------------------------------------------------------- */
/* Inputs & fields                                                       */
/* --------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field__label { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-ink-muted); }
.field__hint { font-size: var(--text-xs); color: var(--color-ink-subtle); }
.field__error { font-size: var(--text-xs); color: var(--color-danger-fg); display: flex; align-items: center; gap: 4px; }
.input, .select {
  height: var(--input-height); background: var(--color-surface);
  border: 1px solid var(--color-border-strong); border-radius: var(--input-radius);
  padding: 0 var(--space-3); font-size: var(--text-md); color: var(--color-ink); width: 100%; font-family: inherit;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input:focus, .select:focus { outline: none; border-color: var(--color-border-focus); box-shadow: var(--shadow-focus); }
.input.is-invalid { border-color: var(--color-danger); }
.input.is-invalid:focus { box-shadow: 0 0 0 3px var(--red-100); }
.input::placeholder { color: var(--color-ink-subtle); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }

/* --------------------------------------------------------------------- */
/* Tables                                                                */
/* --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius-md); -webkit-overflow-scrolling: touch; }
/* min-width forces horizontal scroll INSIDE the bounded wrap on narrow screens
   (columns stay readable) rather than crushing or overflowing the page. */
table.data { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--text-md); }
table.data thead th {
  background: var(--table-head-bg); text-align: left; font-size: var(--text-2xs); font-weight: var(--weight-semibold);
  text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-ink-muted);
  padding: var(--space-3) var(--space-4); white-space: nowrap; border-bottom: 1px solid var(--color-border);
}
table.data tbody td { padding: 0 var(--space-4); height: var(--table-row-h); border-bottom: 1px solid var(--color-hairline); color: var(--color-ink); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background var(--dur-fast); }
table.data tbody tr:hover td { background: var(--color-surface-sunken); }
table.data .num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-strong { font-weight: var(--weight-semibold); }
.cell-money { font-variant-numeric: tabular-nums; font-weight: var(--weight-medium); }
.cell-money.neg { color: var(--color-money-neg); }

/* --------------------------------------------------------------------- */
/* Stepper (run progress) — animated                                     */
/* --------------------------------------------------------------------- */
.stepper-scroll { overflow-x: auto; scrollbar-width: none; }
.stepper-scroll::-webkit-scrollbar { display: none; }
.stepper { display: flex; align-items: flex-start; }
@media (max-width: 560px) { .stepper { min-width: 360px; } }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; text-align: center; }
.step__track { position: absolute; top: calc(var(--step-size) / 2 - 1px); left: 50%; width: 100%; height: 2px; background: var(--color-border); z-index: 0; overflow: hidden; }
.step__track::after { content: ''; position: absolute; inset: 0; background: var(--color-success); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-slow) var(--ease-out); }
.step.done .step__track::after { transform: scaleX(1); }
.step__dot {
  width: var(--step-size); height: var(--step-size); aspect-ratio: 1; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--color-surface); border: 2px solid var(--color-border-strong); color: var(--color-ink-muted);
  font-size: var(--text-xs); font-weight: var(--weight-semibold); z-index: 1; position: relative;
  transition: background var(--dur-med) var(--ease-standard), border-color var(--dur-med), color var(--dur-med);
}
.step.done .step__dot { background: var(--color-success); border-color: var(--color-success); color: var(--white); }
.step.current .step__dot { background: var(--color-primary); border-color: var(--color-primary); color: var(--white); }
.step.current .step__dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--color-primary); opacity: 0.35; animation: stepPulse 2s var(--ease-in-out) infinite; }
@keyframes stepPulse { 0%,100% { transform: scale(1); opacity: 0.35; } 50% { transform: scale(1.12); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .step.current .step__dot::after { animation: none; } .step__track::after { transition: none; } }
.step__label { margin-top: var(--space-2); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-ink-muted); }
.step.current .step__label { color: var(--color-ink); font-weight: var(--weight-semibold); }
.step.done .step__label { color: var(--color-ink); }
.step__dot svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------- */
/* Validation gate — calm and scannable                                  */
/* --------------------------------------------------------------------- */
.gate { display: flex; flex-direction: column; gap: var(--space-2); }
.gate__summary { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface-sunken); margin-bottom: var(--space-2); }
.gate__summary.pass  { background: var(--color-success-weak); border-color: var(--green-100); }
.gate__summary.block { background: var(--color-danger-weak);  border-color: var(--red-100); }
.gate__summary.warn  { background: var(--color-warning-weak); border-color: var(--amber-100); }
.gate__shield { width: 38px; height: 38px; border-radius: var(--radius-md); display: grid; place-items: center; flex-shrink: 0; color: var(--white); }
.gate__summary.pass  .gate__shield { background: var(--color-success); }
.gate__summary.block .gate__shield { background: var(--color-danger); }
.gate__summary.warn  .gate__shield { background: var(--color-warning); }
.gate__shield svg { width: 20px; height: 20px; }
.gate__headline { font-weight: var(--weight-semibold); font-size: var(--text-md); letter-spacing: var(--tracking-snug); }
.gate__sub { color: var(--color-ink-muted); font-size: var(--text-sm); margin-top: 1px; }
.gate__meter { display: flex; gap: 4px; margin-top: var(--space-2); }
.gate__seg { height: 4px; border-radius: 2px; flex: 1; background: var(--color-border); }
.gate__seg.pass { background: var(--color-success); }
.gate__seg.warn { background: var(--color-warning); }
.gate__seg.block { background: var(--color-danger); }

.check-item { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); border: 1px solid transparent; transition: background var(--dur-fast); }
.check-item:hover { background: var(--color-surface-sunken); }
.check-item__icon { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.check-item__icon svg { width: 12px; height: 12px; }
.check-item.pass  .check-item__icon { background: var(--color-success-weak); color: var(--color-success); }
.check-item.warn  .check-item__icon { background: var(--color-warning-weak); color: var(--color-warning); }
.check-item.block .check-item__icon { background: var(--color-danger-weak); color: var(--color-danger); }
.check-item.info  .check-item__icon { background: var(--color-surface-sunken); color: var(--color-ink-muted); }
.check-item.block { border-color: var(--red-100); background: var(--color-danger-weak); }
.check-item__title { font-weight: var(--weight-medium); font-size: var(--text-md); }
.check-item__detail { color: var(--color-ink-muted); font-size: var(--text-sm); margin-top: 1px; }
.check-item__count { margin-left: auto; font-size: var(--text-xs); color: var(--color-ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }

/* --------------------------------------------------------------------- */
/* Banners / callouts                                                    */
/* --------------------------------------------------------------------- */
.banner { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: var(--text-sm); border: 1px solid var(--color-border); background: var(--color-surface); }
.banner__icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--color-ink-subtle); }
.banner--info { background: var(--color-surface-sunken); border-color: var(--color-border); color: var(--color-ink); }
.banner--warn { background: var(--color-warning-weak); border-color: var(--amber-100); color: var(--color-warning-fg); }
.banner--warn .banner__icon { color: var(--color-warning); }
.banner--danger { background: var(--color-danger-weak); border-color: var(--red-100); color: var(--color-danger-fg); }
.banner--danger .banner__icon { color: var(--color-danger); }
.banner--success { background: var(--green-t); border-color: var(--green-100); color: var(--green-700); }
.banner--success .banner__icon { color: var(--green); }
.banner a { font-weight: var(--weight-medium); }

/* Data maintenance (Settings > Owner-only) */
.mdup { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); background: var(--color-surface); }
.mdup__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.mdup__title { font-weight: var(--weight-semibold); color: var(--color-ink); }

/* --------------------------------------------------------------------- */
/* Tabs                                                                  */
/* --------------------------------------------------------------------- */
.tabs { display: inline-flex; gap: 2px; border-bottom: 1px solid var(--color-border); width: 100%; }
.tab { border: none; background: none; padding: var(--space-3) var(--space-4); font-size: var(--text-md); font-weight: var(--weight-medium); color: var(--color-ink-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--color-ink); }
.tab.active { color: var(--color-primary-ink); border-bottom-color: var(--color-primary); }

/* --------------------------------------------------------------------- */
/* Data-viz — cost breakdown bar                                         */
/* --------------------------------------------------------------------- */
.vizbar { display: flex; flex-direction: column; gap: var(--space-3); }
.vizbar__track { display: flex; height: 34px; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface-sunken); }
.vizbar__seg { height: 100%; min-width: 2px; }
.vizbar__seg.net { background: var(--viz-1); }
.vizbar__seg.tax { background: var(--viz-2); }
.vizbar__seg.stat { background: var(--viz-3); }
.vizbar__legend { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.legend-item { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-ink-muted); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-item b { color: var(--color-ink); font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); }

/* --------------------------------------------------------------------- */
/* Modal & toast                                                         */
/* --------------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: var(--color-overlay); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: var(--z-modal); padding: var(--space-4); }
.modal-backdrop.open { display: flex; animation: fade var(--dur-med) var(--ease-out); }
.modal { background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; animation: rise var(--dur-med) var(--ease-out); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; padding: var(--space-5) var(--space-6); border-bottom: 1px solid var(--color-hairline); }
.modal__body { padding: var(--space-6); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .modal, .modal-backdrop.open { animation: none; } }

.toast { position: fixed; bottom: var(--space-6); left: 50%; transform: translateX(-50%) translateY(20px); background: var(--slate-950); color: var(--white); padding: var(--space-3) var(--space-5); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); font-size: var(--text-sm); opacity: 0; pointer-events: none; transition: opacity var(--dur-med), transform var(--dur-med) var(--ease-out); z-index: var(--z-toast); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --------------------------------------------------------------------- */
/* Payslip lines                                                         */
/* --------------------------------------------------------------------- */
.kv { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--color-hairline); font-size: var(--text-md); }
.kv:last-child { border-bottom: none; }
.kv__k { color: var(--color-ink-muted); }
.kv__v { font-variant-numeric: tabular-nums; font-weight: var(--weight-medium); }
/* FIXED 2026-08-19: with no gap and a shrinkable amount, a narrow column broke the label
   mid-phrase and split the minus sign onto its own line above the figure ("-" then "P1,728.75").
   The amount is now unshrinkable and never wraps; the label absorbs the shortfall. */
.payslip-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-hairline); font-size: var(--text-md); }
.payslip-line > span:first-child { min-width: 0; }
.payslip-line span:last-child { font-variant-numeric: tabular-nums; flex: none; white-space: nowrap; }
.payslip-line.total { border-top: 2px solid var(--color-ink); border-bottom: none; margin-top: var(--space-2); padding-top: var(--space-3); font-weight: var(--weight-bold); font-size: var(--text-lg); }
.payslip-line .neg { color: var(--color-money-neg); }

/* Empty state */
.empty { text-align: center; padding: var(--space-9) var(--space-5); color: var(--color-ink-muted); }
.empty__icon { width: 42px; height: 42px; margin: 0 auto var(--space-4); color: var(--color-ink-subtle); display: grid; place-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.empty__icon svg { width: 22px; height: 22px; }

/* AI assistant chat */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat__log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-2); }
.msg { display: flex; gap: var(--space-3); max-width: 80%; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }
.msg__avatar { width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; flex-shrink: 0; font-size: var(--text-xs); font-weight: var(--weight-bold); }
.msg--ai .msg__avatar { background: var(--slate-950); color: var(--white); }
.msg--user .msg__avatar { background: var(--color-surface-sunken); color: var(--color-ink-muted); }
.msg__bubble { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: var(--text-md); line-height: var(--leading-snug); }
.msg__bubble { font-variant-numeric: tabular-nums; }
.msg--ai .msg__bubble { background: var(--color-surface-sunken); color: var(--color-ink); border-top-left-radius: var(--radius-xs); }
.msg--user .msg__bubble { background: var(--color-primary); color: var(--color-on-primary); border-top-right-radius: var(--radius-xs); }

/* Suggestion chips (assistant) */
.chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: 5px var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-ink-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast); }
.chip:hover { border-color: var(--color-border-focus); color: var(--color-ink); background: var(--color-surface-hover); }

/* Typing indicator */
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 2px 0; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--color-ink-subtle); animation: typing 1.2s var(--ease-in-out) infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .typing span { animation: none; } }

/* Assistant welcome (empty state) */
.chat__welcome { text-align: center; padding: var(--space-7) var(--space-4) var(--space-5); }
.chat__welcome .msg__avatar { width: 44px; height: 44px; border-radius: var(--radius-md); margin: 0 auto var(--space-3); font-size: var(--text-md); }

/* --------------------------------------------------------------------- */
/* Table footer (register / disbursement totals)                         */
/* --------------------------------------------------------------------- */
table.data tfoot td { padding: var(--space-3) var(--space-4); height: var(--table-row-h); border-top: 2px solid var(--color-border-strong); background: var(--color-surface-sunken); color: var(--color-ink); }
table.data tfoot .num { text-align: right; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------- */
/* Zoho People bundle panel                                              */
/* --------------------------------------------------------------------- */
.bundle { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: var(--space-4); }
.bundle__side { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); background: var(--color-surface); }
.bundle__owner { font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); }
.bundle__side--people .bundle__owner { color: var(--color-ink-muted); }
.bundle__side--laquest .bundle__owner { color: var(--color-primary-ink); }
.bundle__list { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: flex; flex-direction: column; gap: var(--space-3); }
.bundle__list li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-ink); }
.bundle__list li svg { width: 15px; height: 15px; color: inherit; flex-shrink: 0; }
.bundle__conn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); min-width: 96px; color: var(--color-ink-subtle); }
.bundle__conn svg { width: 20px; height: 20px; }
.bundle__arrow { font-size: var(--text-2xl); color: var(--color-border-strong); line-height: 1; }
@media (max-width: 768px) { .bundle { grid-template-columns: 1fr; } .bundle__conn { flex-direction: row; min-height: 44px; } }

/* --------------------------------------------------------------------- */
/* Payslip document                                                      */
/* --------------------------------------------------------------------- */
.payslip-doc { max-width: 780px; margin: 0 auto; }
/* A4 print-ready sheet: the on-screen preview reads as a page (centred, A4 width, page
   shadow) and prints at true A4. Only the host WRAPPER is styled — the payslip HTML itself
   is the shared PayslipLayout output (screen === released PDF, parity-guarded). */
#payslipHost { display: flex; justify-content: center; padding: var(--space-2) 0 var(--space-6); }
#payslipHost .slip { width: 100%; max-width: 794px; box-shadow: 0 10px 30px rgba(31,39,51,.14); }

/* --------------------------------------------------------------------- */
/* Print — isolate the payslip                                           */
/* --------------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .no-print, .page-head, .scrim,
  .lq-sidebar, .lq-topbar, .lq-nav-scrim { display: none !important; }
  .app { display: block; grid-template-columns: 1fr; }
  .main__scroll { padding: 0; }
  .printable { display: block; }
  #payslipHost { display: block; padding: 0; }
  #payslipHost .slip, .payslip-doc { box-shadow: none; border: none; max-width: 100%; }
  body { background: #fff; }
  @page { size: A4; margin: 12mm; }
}

/* --------------------------------------------------------------------- */
/* Signed-in user chip (topbar)                                          */
/* --------------------------------------------------------------------- */
.user-chip { display: inline-flex; align-items: center; gap: var(--space-3); }
.user-chip__meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.user-chip__meta b { color: var(--color-ink); font-weight: var(--weight-semibold); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .user-chip__meta b { display: none; } }

/* --------------------------------------------------------------------- */
/* Anomaly review queue (Run Payroll > Review)                           */
/* --------------------------------------------------------------------- */
.anomaly-list { display: flex; flex-direction: column; gap: var(--space-2); }
.anomaly-row { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.anomaly-row.is-block { border-color: var(--red-100); }
.anomaly-row__head { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3) var(--space-4); background: none; border: none; cursor: pointer; text-align: left; font: inherit; color: var(--color-ink); min-height: 48px; transition: background var(--dur-fast); }
.anomaly-row__head:hover { background: var(--color-surface-sunken); }
.anomaly-row__title { font-size: var(--text-md); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anomaly-row__chev { width: 15px; height: 15px; color: var(--color-ink-subtle); flex-shrink: 0; }
.anomaly-row__body { padding: var(--space-4); border-top: 1px solid var(--color-hairline); background: var(--color-surface-sunken); font-size: var(--text-md); }
.anomaly-row__body .kv { padding: var(--space-2) 0; }

/* --------------------------------------------------------------------- */
/* Dashboard polish — breadcrumb, quick links, status chips, breakdown   */
/* --------------------------------------------------------------------- */
.crumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-ink-muted); margin-bottom: var(--space-3); flex-wrap: wrap; }
.crumb a { color: var(--color-ink-muted); cursor: pointer; }
.crumb a:hover { color: var(--color-link); }
.crumb__sep { color: var(--color-ink-subtle); }
.crumb__here { color: var(--color-ink); font-weight: var(--weight-medium); }

/* Status chips row (payment due, anomalies …) */
.chips-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.stchip { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-3); border-radius: var(--radius-pill); border: 1px solid var(--color-border); background: var(--color-surface); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-ink); }
.stchip svg { width: 15px; height: 15px; color: var(--color-ink-subtle); }
.stchip--accent { border-color: var(--color-primary); background: var(--color-primary-weak); color: var(--color-primary-weak-fg); }
.stchip--accent svg { color: var(--color-primary-ink); }
.stchip--warn { border-color: var(--amber-100); background: var(--color-warning-weak); color: var(--color-warning-fg); }
.stchip--warn svg { color: var(--color-warning); }
.stchip--ok { border-color: var(--green-100); background: var(--color-success-weak); color: var(--color-success-fg); }
.stchip--ok svg { color: inherit; }
.stchip b { font-variant-numeric: tabular-nums; }

/* Additional Insights — quick-link tiles */
.quicklinks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 900px) { .quicklinks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .quicklinks { grid-template-columns: minmax(0, 1fr); } }
.quicklink {
  display: flex; align-items: center; gap: var(--space-3); text-align: left; width: 100%;
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius);
  padding: var(--space-4); box-shadow: var(--card-shadow); cursor: pointer; color: var(--color-ink);
  font: inherit; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast), background var(--dur-fast);
}
.quicklink:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.quicklink:active { transform: translateY(0); }
.quicklink__ic { width: 38px; height: 38px; border-radius: var(--radius-md); display: grid; place-items: center; flex-shrink: 0; background: var(--color-primary-weak); color: var(--color-primary-ink); }
.quicklink__ic svg { width: 18px; height: 18px; }
.quicklink__t { font-weight: var(--weight-semibold); font-size: var(--text-md); letter-spacing: var(--tracking-snug); }
.quicklink__d { color: var(--color-ink-muted); font-size: var(--text-sm); margin-top: 1px; }
.quicklink__arrow { margin-left: auto; width: 16px; height: 16px; color: var(--color-ink-subtle); flex-shrink: 0; transition: transform var(--dur-fast), color var(--dur-fast); }
.quicklink:hover .quicklink__arrow { transform: translateX(2px); color: var(--color-primary-ink); }

/* Anomaly severity breakdown (mini) */
.sevbreak { display: flex; flex-direction: column; gap: var(--space-3); }
.sevbreak__bar { display: flex; height: 10px; border-radius: var(--radius-pill); overflow: hidden; background: var(--color-surface-sunken); }
.sevbreak__seg { height: 100%; min-width: 3px; }
.sevbreak__seg.block { background: var(--color-danger); }
.sevbreak__seg.warn { background: var(--color-warning); }
.sevbreak__seg.info { background: var(--color-info); }
.sevbreak__legend { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.sevbreak__item { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-ink-muted); }
.sevbreak__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sevbreak__dot.block { background: var(--color-danger); }
.sevbreak__dot.warn { background: var(--color-warning); }
.sevbreak__dot.info { background: var(--color-info); }
.sevbreak__item b { color: var(--color-ink); font-variant-numeric: tabular-nums; }

/* Settings screen layout */
.settings-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
.settings-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 900px) { .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
.settings-nav a { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--color-ink-muted); font-size: var(--text-md); font-weight: var(--weight-medium); cursor: pointer; }
.settings-nav a svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--color-ink-subtle); }
.settings-nav a:hover { background: var(--color-surface-hover); color: var(--color-ink); }
.settings-nav a.active { background: var(--color-primary-weak); color: var(--color-primary-weak-fg); }
.settings-nav a.active svg { color: var(--color-primary-ink); }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-hairline); }
.opt-row:last-child { border-bottom: none; }
.opt-row__t { font-weight: var(--weight-medium); font-size: var(--text-md); }
.opt-row__d { color: var(--color-ink-muted); font-size: var(--text-sm); margin-top: 1px; max-width: 52ch; }
.soon { font-size: var(--text-2xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-ink-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-pill); padding: 2px var(--space-2); }

/* ===================================================================== */
/* DASHBOARD (Phase 9) — pastel tiles, KPI, stepper, progress, heatmap    */
/* ===================================================================== */

/* Pastel icon tiles (rotate per card) */
.tile { width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center; flex-shrink: 0; }
.tile svg { width: 20px; height: 20px; }
.tile--sm { width: 34px; height: 34px; } .tile--sm svg { width: 17px; height: 17px; }
.tile--1 { background: var(--tile-1-bg); color: var(--tile-1-fg); }
.tile--2 { background: var(--tile-2-bg); color: var(--tile-2-fg); }
.tile--3 { background: var(--tile-3-bg); color: var(--tile-3-fg); }
.tile--4 { background: var(--tile-4-bg); color: var(--tile-4-fg); }

/* Dashboard header (title + date + progress + controls) */
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-6); }
.dash-head__title { display: flex; align-items: center; gap: var(--space-2); }
.dash-head__title h1 { font-size: var(--text-2xl); letter-spacing: var(--tracking-tight); }
.dash-head__title .info { color: var(--color-ink-subtle); width: 17px; height: 17px; cursor: help; }
.dash-head__date { color: var(--color-ink-muted); font-size: var(--text-md); margin-top: var(--space-1); }
.dash-head__right { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-3); min-width: 260px; }
.dash-head__controls { display: inline-flex; align-items: center; gap: var(--space-2); }
@media (max-width: 720px) { .dash-head__right { align-items: stretch; width: 100%; min-width: 0; } }

/* Overall progress bar */
.progbar { display: flex; align-items: center; gap: var(--space-3); width: 100%; }
.progbar__label { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-ink-muted); white-space: nowrap; }
.progbar__track { flex: 1; height: 8px; border-radius: var(--radius-pill); background: var(--color-progress-track); overflow: hidden; min-width: 90px; }
.progbar__fill { height: 100%; border-radius: var(--radius-pill); background: var(--color-progress); transition: width var(--dur-slow) var(--ease-out); }
.progbar__pct { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--color-ink); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* KPI cards */
.kpi { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.kpi__top { display: flex; align-items: center; gap: var(--space-3); }
.kpi__label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-ink-muted); }
.kpi__chev { margin-left: auto; color: var(--color-ink-subtle); width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--dur-fast), color var(--dur-fast); }
.kpi__value { font-size: var(--text-2xl); font-weight: var(--weight-bold); letter-spacing: var(--tracking-tight); color: var(--color-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi__sub { font-size: var(--text-sm); color: var(--color-ink-muted); }
/* D-006: employer-share breakdown as spaced, legible tags (not a cramped caption). */
/* AI Payroll Copilot — persistent floating button + bottom-right chat DRAWER. */
.cpl-fab { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; background: var(--card-bg, #fff); border: 1px solid var(--card-border, #e5e7eb); box-shadow: 0 8px 22px -6px rgba(20, 22, 28, .26); display: flex; align-items: center; justify-content: center; transition: transform .12s, box-shadow .12s; }
.cpl-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(20, 22, 28, .34); }
.cpl-fab:focus-visible { outline: 2px solid var(--color-primary, #1E36C9); outline-offset: 3px; }
.cpl-fab svg { width: 24px; height: 24px; }
/* Right-docked, near-full-height slide-over (like Deel): sits under the top bar, hugs the right
   edge, and slides in from the right. Calmer and roomier than the old floating bottom card. */
.cpl-panel { position: fixed; top: 62px; right: 14px; bottom: 14px; z-index: 61; width: 408px; max-width: calc(100vw - 28px); height: auto; max-height: none; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px; box-shadow: 0 24px 60px -18px rgba(20, 22, 28, .34); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateX(24px); pointer-events: none; transition: opacity .18s ease, transform .22s cubic-bezier(.22,.61,.36,1); }
body.cpl-open .cpl-panel { opacity: 1; transform: none; pointer-events: auto; }
/* Hide the floating button while the panel is open (the panel has its own close control). */
body.cpl-open .cpl-fab { opacity: 0; transform: scale(.85); pointer-events: none; }
.cpl-panel__hd { display: flex; align-items: center; gap: 10px; padding: 13px 14px 13px 16px; border-bottom: 1px solid var(--color-hairline); flex: none; }
.cpl-panel__t { font-size: 15px; font-weight: var(--weight-semibold); color: var(--color-ink); flex: 1; }
.cpl-x { background: none; border: none; cursor: pointer; color: var(--color-ink-muted); display: inline-flex; padding: 4px; border-radius: 8px; }
.cpl-x:hover { background: var(--color-surface-subtle, rgba(0, 0, 0, .05)); color: var(--color-ink); }
.cpl-x svg { width: 18px; height: 18px; }
.cpl-panel__body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.cpl-panel__ask { display: block; padding: 10px 16px 2px; flex: none; }
/* Drawer intro must STACK (text over chips), not sit in a flex row — raise specificity so it
   beats the base `.cpl-intro { display:flex }` rule that is declared later in the file. */
.cpl-intro.cpl-intro--sm { display: block; }
.cpl-intro.cpl-intro--sm .cpl-intro__d { font-size: 12px; max-width: none; }
.cpl-intro.cpl-intro--sm .cpl-chips { margin-top: 10px; }
@media (max-width: 480px) { .cpl-panel { top: 10px; right: 10px; left: 10px; bottom: 10px; width: auto; max-width: none; height: auto; } .cpl-fab { right: 16px; bottom: 16px; } }

/* AI Payroll Copilot — grounded chat panel (read-only). Theme-aware via app tokens. */
.cpl-intro { display: flex; gap: 16px; align-items: flex-start; }
.cpl-badge { width: 40px; height: 40px; border-radius: 12px; background: var(--color-primary-tint, rgba(30, 54, 201, .1)); color: var(--color-primary, #1E36C9); display: flex; align-items: center; justify-content: center; flex: none; }
.cpl-badge svg { width: 20px; height: 20px; }
.cpl-intro__t { font-size: var(--text-md, 15px); font-weight: var(--weight-semibold); color: var(--color-ink); }
.cpl-intro__d { font-size: var(--text-sm); color: var(--color-ink-muted); margin-top: 3px; max-width: 74ch; line-height: 1.55; }
.cpl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cpl-ask { display: flex; gap: 10px; margin: 18px 0; }
.cpl-ask .input { flex: 1; }
.cpl-thread { display: flex; flex-direction: column; gap: 14px; }
.cpl-turn { display: flex; }
.cpl-turn--user { justify-content: flex-end; }
.cpl-bubble { background: var(--color-primary, #1E36C9); color: #fff; padding: 10px 14px; border-radius: 14px 14px 4px 14px; max-width: 72%; font-size: var(--text-sm); line-height: 1.5; }
.cpl-turn--bot { justify-content: flex-start; }
.cpl-answer { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px 14px 14px 4px; padding: 14px 16px; max-width: 86%; box-shadow: var(--card-shadow); }
.cpl-answer__hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cpl-mark { color: var(--color-primary, #1E36C9); display: inline-flex; }
.cpl-mark svg { width: 16px; height: 16px; }
.cpl-intent { font-size: 11px; color: var(--color-ink-muted); text-transform: capitalize; }
.cpl-ro { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--color-ink-subtle); }
.cpl-answer__tx { font-size: var(--text-sm); color: var(--color-ink); line-height: 1.6; }
.cpl-cites { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--color-hairline); }
.cpl-cite { display: inline-flex; flex-direction: column; gap: 1px; border: 1px solid var(--color-hairline); border-radius: 8px; padding: 5px 10px; background: var(--color-surface-subtle, transparent); max-width: 100%; }
.cpl-cite__k { font-size: 11px; font-weight: 700; color: var(--color-ink); }
.cpl-cite__r { font-size: 11px; color: var(--color-ink-muted); }
.cpl-cite__m { font-size: 10.5px; color: var(--color-ink-subtle); }
@media (max-width: 720px) { .cpl-answer, .cpl-bubble { max-width: 100%; } }

/* ---- Modern chat layer: avatars, markdown, message actions, follow-up chips, streaming reveal ---- */
.cpl-turn--bot { align-items: flex-start; gap: 10px; }
.cpl-av { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; margin-top: 2px; background: transparent; }
.cpl-av svg { width: 22px; height: 22px; }
.cpl-answer { animation: cpl-rise .28s cubic-bezier(.22,.61,.36,1) backwards; }
@keyframes cpl-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cpl-answer__md { font-size: var(--text-sm); color: var(--color-ink); line-height: 1.62; font-variant-numeric: tabular-nums; }
.cpl-answer__md p { margin: 0 0 8px; } .cpl-answer__md p:last-child { margin-bottom: 0; }
.cpl-answer__md strong { font-weight: 700; color: var(--color-ink); }
.cpl-answer__md .cpl-num { color: var(--color-primary, #1E36C9); font-weight: 700; }
.cpl-ul { margin: 4px 0 8px; padding-left: 2px; list-style: none; display: flex; flex-direction: column; gap: 5px; }
.cpl-ul li { position: relative; padding-left: 18px; }
.cpl-ul li::before { content: ""; position: absolute; left: 3px; top: .58em; width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-primary, #1E36C9); opacity: .55; }
.cpl-acts { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.cpl-copy { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--color-ink-muted);
  background: transparent; border: 1px solid var(--color-hairline); border-radius: 8px; padding: 4px 10px; cursor: pointer; transition: .14s; }
.cpl-copy:hover { color: var(--color-ink); border-color: var(--color-primary, #1E36C9); background: rgba(30,54,201,.05); }
.cpl-copy svg { width: 13px; height: 13px; }
.cpl-copy.is-done { color: #16a34a; border-color: #16a34a; }
.cpl-fups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cpl-fup { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--color-primary, #1E36C9);
  background: rgba(30,54,201,.06); border: 1px solid rgba(30,54,201,.16); border-radius: 999px; padding: 6px 13px; cursor: pointer; transition: .14s; }
.cpl-fup:hover { background: rgba(30,54,201,.12); transform: translateY(-1px); }
.cpl-fup::before { content: "\2192"; opacity: .6; font-weight: 700; }
.cpl-typing { display: inline-flex; gap: 4px; align-items: center; padding: 3px 2px; }
.cpl-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary, #1E36C9); opacity: .5; animation: cpl-blink 1.1s infinite; }
.cpl-typing i:nth-child(2) { animation-delay: .18s; } .cpl-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes cpl-blink { 0%,60%,100% { opacity: .25; transform: translateY(0); } 30% { opacity: .95; transform: translateY(-3px); } }
.cpl-conv .pstat { display: none; }

/* ---- Calm empty-state: two-tier greeting + Deel-style suggestion cards (leading icon + label) ---- */
.cpl-home { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 2px 2px; }
.cpl-home__spark { margin: 4px auto 12px; line-height: 0; }
.cpl-hello { font-size: 13.5px; font-weight: 600; color: var(--color-ink-muted); margin: 0; }
.cpl-greet2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; color: var(--color-ink); margin: 2px 0 10px; }
.cpl-home__sub { font-size: 12.5px; color: var(--color-ink-muted); line-height: 1.55; max-width: 42ch; margin: 0 auto 16px; }
.cpl-sugg { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.cpl-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; font: inherit;
  border: 1px solid var(--color-hairline); background: var(--card-bg); border-radius: 14px; padding: 12px 13px;
  transition: background .15s, border-color .15s, transform .15s; }
.cpl-card:hover { background: var(--color-surface-subtle, rgba(30,54,201,.04)); border-color: var(--color-primary, #1E36C9); transform: translateY(-1px); }
.cpl-card__ic { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--color-primary-tint, rgba(30,54,201,.09)); color: inherit; }
.cpl-card__ic svg { width: 16px; height: 16px; }
.cpl-card__t { font-size: 13px; font-weight: 600; color: var(--color-ink); line-height: 1.4; }
.cpl-foot { font-size: 11px; color: var(--color-ink-subtle); text-align: center; line-height: 1.5; }

/* ---- Composer box (Deel-style): rounded card, placeholder on top, circular arrow-up send ---- */
.cpl-box { width: 100%; border: 1px solid var(--color-border, #e4e7f2); background: var(--card-bg); border-radius: 16px;
  padding: 12px 14px 10px; box-shadow: 0 6px 20px -14px rgba(20,22,28,.3); transition: border-color .15s, box-shadow .15s; }
.cpl-box:focus-within { border-color: var(--color-primary, #1E36C9); box-shadow: 0 0 0 3px rgba(30,54,201,.10); }
.cpl-box__ta { width: 100%; background: transparent; border: 0; outline: 0; resize: none; font: inherit; font-size: 15px;
  line-height: 1.5; color: var(--color-ink); max-height: 140px; overflow-y: auto; display: block; }
.cpl-box__ta::placeholder { color: var(--color-ink-muted); }
.cpl-box__row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cpl-box__hint { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--color-ink-subtle); }
.cpl-box__hint svg { width: 13px; height: 13px; }
.cpl-go { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer; display: grid;
  place-items: center; background: var(--color-primary, #1E36C9); color: #fff; box-shadow: 0 4px 12px rgba(30,54,201,.3);
  transition: transform .12s, filter .12s; flex: 0 0 auto; }
.cpl-go:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cpl-go svg { width: 17px; height: 17px; }
.cpl-hicon { width: 30px; height: 30px; border: 0; background: transparent; color: var(--color-ink-muted); border-radius: 8px;
  display: grid; place-items: center; cursor: pointer; transition: background .14s, color .14s; }
.cpl-hicon:hover { background: var(--color-surface-subtle, rgba(20,22,28,.05)); color: var(--color-ink); }
.cpl-hicon svg { width: 17px; height: 17px; }

.cpl-panel__ask { align-items: flex-end; }
.cpl-ask-ta { flex: 1; min-width: 0; resize: none; max-height: 120px; overflow-y: auto; line-height: 1.5; }
.cpl-panel__ask .cps-send { flex: 0 0 auto; width: 38px; height: 38px; border: 0; cursor: pointer; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #a855f7, #3b82f6 55%, #22d3ee); color: #fff; box-shadow: 0 6px 16px rgba(59,130,246,.38); }
.cpl-panel__ask .cps-send svg { width: 17px; height: 17px; }
.cpl-panel__hd .cpl-av { width: 28px; height: 28px; } .cpl-panel__hd .cpl-av svg { color: #fff; width: 15px; height: 15px; }

.kpi__break { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-2); }
.kpi__break .kb { font-size: 11px; font-weight: var(--weight-semibold); line-height: 1.55; color: var(--color-ink-muted); background: var(--color-surface-subtle, transparent); border: 1px solid var(--color-hairline); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.kpi__rows { display: flex; flex-direction: column; gap: var(--space-3); }
.kpi__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.kpi__row-k { font-size: var(--text-sm); color: var(--color-ink-muted); }
.kpi__row-v { display: inline-flex; align-items: baseline; gap: var(--space-2); font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); color: var(--color-ink); }
.kpi--link { cursor: pointer; text-align: left; font: inherit; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); }
.kpi--link:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi--link:hover .kpi__chev { color: var(--color-primary-ink); transform: translateX(2px); }

/* Vertical cycle stepper */
.vstep { display: flex; flex-direction: column; }
.vstep__item { display: flex; gap: var(--space-4); }
.vstep__rail { display: flex; flex-direction: column; align-items: center; align-self: stretch; }
.vstep__dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); border: 2px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-ink-muted); }
.vstep__dot svg { width: 16px; height: 16px; }
.vstep__line { flex: 1; width: 2px; background: var(--color-border); margin: 4px 0; min-height: 14px; }
.vstep__item:last-child .vstep__line { display: none; }
.vstep__item.done .vstep__dot { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.vstep__item.done .vstep__line { background: var(--color-success); }
.vstep__item.current .vstep__dot { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); box-shadow: 0 0 0 4px var(--color-primary-weak); }
.vstep__body { padding: 4px 0 var(--space-5); min-width: 0; }
.vstep__item:last-child .vstep__body { padding-bottom: 0; }
.vstep__t { font-weight: var(--weight-semibold); font-size: var(--text-md); color: var(--color-ink); }
.vstep__item.pending .vstep__t { color: var(--color-ink-muted); font-weight: var(--weight-medium); }
.vstep__d { font-size: var(--text-sm); color: var(--color-ink-muted); margin-top: 1px; }

/* Collapsible panel header */
.panel-head { display: flex; align-items: center; gap: var(--space-3); width: 100%; background: none; border: none; cursor: pointer; text-align: left; font: inherit; color: var(--color-ink); padding: 0; }
.panel-head__chev { margin-left: auto; color: var(--color-ink-subtle); width: 18px; height: 18px; transition: transform var(--dur-fast); flex-shrink: 0; }
.panel-head.is-collapsed .panel-head__chev { transform: rotate(-90deg); }

/* Anomalies severity heatmap */
.heat { display: flex; flex-direction: column; gap: 8px; }
.heat__cols, .heat__row { display: grid; grid-template-columns: 108px 1fr 30px; align-items: center; gap: var(--space-3); }
.heat__colhead { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.heat__colhead span { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-ink-subtle); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat__corner { font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-ink-subtle); }
.heat__label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-ink); display: flex; align-items: center; gap: var(--space-2); }
.heat__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.heat__cells { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.heat__cell { height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: var(--text-xs); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; border: 1px solid var(--color-border); color: var(--color-ink); }
.heat__cell.z { color: var(--color-ink-subtle); background: var(--color-surface-sunken); }
.heat__total { font-variant-numeric: tabular-nums; font-weight: var(--weight-bold); font-size: var(--text-sm); color: var(--color-ink); text-align: right; }
.heat__legend { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-ink-muted); margin-top: 2px; }
.heat__scale { display: inline-flex; gap: 3px; }
.heat__swatch { width: 16px; height: 10px; border-radius: 3px; }

/* Status chip: due/critical red variant */
.stchip--danger { border-color: var(--red-100); background: var(--color-danger-weak); color: var(--color-danger-fg); }
.stchip--danger svg { color: var(--color-danger); }

/* ===================================================================== */
/* EMPLOYEES data table (Phase 12)                                        */
/* ===================================================================== */
.etable-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--card-shadow); overflow: visible; }
.etable-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border); }
.etable-head__count { font-size: var(--text-md); color: var(--color-ink-muted); }
.etable-head__count b { color: var(--color-ink); font-weight: var(--weight-semibold); }
.etable-head__right { display: inline-flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }

.etabs { display: inline-flex; background: var(--color-surface-sunken); border-radius: var(--radius-md); padding: 3px; gap: 2px; }
.etab { border: none; background: none; padding: 6px var(--space-3); border-radius: var(--radius-sm); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-ink-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background var(--dur-fast), color var(--dur-fast); }
.etab:hover { color: var(--color-ink); }
.etab.active { background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-xs); }
.etab__n { font-variant-numeric: tabular-nums; font-size: var(--text-xs); color: var(--color-ink-subtle); }
.etab.active .etab__n { color: var(--color-primary-ink); }

.etable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.etable { width: 100%; min-width: 960px; border-collapse: collapse; font-size: var(--text-md); }
.etable thead th { text-align: left; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-ink-muted); text-transform: uppercase; letter-spacing: var(--tracking-label); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); white-space: nowrap; background: var(--color-surface); }
.etable th.sortable { cursor: pointer; user-select: none; }
.etable th.sortable:hover { color: var(--color-ink); }
.etable .th-in { display: inline-flex; align-items: center; gap: 5px; }
.etable th.num, .etable td.num { text-align: right; }
.etable th.num .th-in { justify-content: flex-end; }
.sort-ic { width: 13px; height: 13px; opacity: 0.4; flex-shrink: 0; }
.etable th.sorted { color: var(--color-ink); }
.etable th.sorted .sort-ic { opacity: 1; color: inherit; }
.etable tbody td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-hairline); vertical-align: middle; color: var(--color-ink); white-space: nowrap; transition: background var(--dur-fast); }
.etable tbody tr:last-child td { border-bottom: none; }
.etable tbody tr:hover td { background: var(--color-surface-hover); }
.etable tbody tr.is-selected td { background: var(--color-primary-weak); }
.etable .tnum { font-variant-numeric: tabular-nums; }
.etable__check { width: 44px; text-align: center; padding-left: var(--space-5); }
.etable__check input { width: 16px; height: 16px; accent-color: var(--color-primary); cursor: pointer; vertical-align: middle; }
.etable__more-cell { width: 52px; text-align: center; }
.etable__more { width: 30px; height: 30px; }

.ename { display: flex; align-items: center; gap: var(--space-3); }
.ename__av { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--color-surface-sunken); color: var(--color-ink-muted); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.ename__name { font-weight: var(--weight-semibold); color: var(--color-ink); }
.ename__open { border: none; background: none; padding: 2px; cursor: pointer; color: var(--color-ink-subtle); display: inline-grid; place-items: center; border-radius: var(--radius-xs); }
.ename__open:hover { color: var(--color-primary); }
.ename__open svg { width: 14px; height: 14px; }
.ename__no { font-weight: var(--weight-medium); color: var(--color-ink); }
.ename__mail { font-size: var(--text-xs); color: var(--color-ink-muted); }

.pill-neutral { display: inline-flex; align-items: center; padding: 3px var(--space-3); border-radius: var(--radius-pill); background: var(--color-surface-sunken); color: var(--color-ink-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); border: 1px solid var(--color-border); }

.etable tbody td.cell-ded { color: var(--color-money-neg); font-variant-numeric: tabular-nums; }
.etable tbody td.cell-net { font-weight: var(--weight-bold); color: var(--color-money-pos); font-variant-numeric: tabular-nums; }

.spill { display: inline-flex; align-items: center; gap: 6px; padding: 3px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.spill__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.spill--paid { background: var(--color-success-weak); color: var(--color-success-fg); }
.spill--pending { background: var(--color-warning-weak); color: var(--color-warning-fg); }
.spill--unpaid { background: var(--color-danger-weak); color: var(--color-danger-fg); }

/* Floating row overflow menu (rendered on <body> to escape table clipping) */
.menu-pop--float { position: fixed; min-width: 188px; }

/* ===================================================================== */
/* Shell — full-width top bar spanning ABOVE the sidebar (T-layout).      */
/* Hamburger sits in the very top-left corner, above the OVERVIEW header. */
/* ===================================================================== */
:root { --topbar-h: 60px; }
.app { grid-template-rows: var(--topbar-h) 1fr; grid-template-areas: "top top" "side main"; }
.topbar { grid-area: top; height: var(--topbar-h); padding: 0 var(--space-6) 0 var(--space-4); gap: var(--space-3); z-index: var(--z-nav); }
.sidebar { grid-area: side; }
.main { grid-area: main; }
@media (min-width: 901px) {
  .sidebar { top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); }
}
@media (max-width: 900px) {
  .app { grid-template-areas: "top" "main"; }
  .topbar { padding: 0 var(--space-4); }
}
/* Top-bar icons a hair heavier than the sidebar's 1.4 (per spec: 1.5). */
.topbar svg {  }

/* ===================================================================== */
/* DASHBOARD (Phase 14) — breadcrumb pills, sections, gauges, charts      */
/* ===================================================================== */

/* Breadcrumb pills */
.crumbs { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-5); }
.crumb-pill { display: inline-flex; align-items: center; padding: 4px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-medium); background: var(--blue-t2); color: var(--color-ink-muted); }
.crumb-pill--current { background: var(--blue-t); color: var(--blue); }
.crumbs__sep { color: var(--color-ink-subtle); font-size: var(--text-xs); }

/* Header sub-line */
.dash-head__sub { color: var(--color-ink-muted); font-size: var(--text-md); margin-top: var(--space-1); }

/* Labeled sections */
.dsec { margin-bottom: var(--space-8); }
.dsec__head { margin-bottom: var(--space-4); }
.dsec__title { font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--color-ink); letter-spacing: var(--tracking-snug); }
.dsec__cap { font-size: var(--text-sm); color: var(--color-ink-subtle); margin-top: 2px; }

/* Mini card head (tile + label) */
.mhead { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.mhead__label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-ink-muted); }
.big-num { font-size: var(--text-2xl); font-weight: var(--weight-bold); letter-spacing: var(--tracking-tight); color: var(--color-ink); font-variant-numeric: tabular-nums; line-height: 1.15; margin-bottom: var(--space-3); }

/* Slim blue progress bar */
.slimbar { height: 8px; border-radius: var(--radius-pill); background: var(--color-progress-track); overflow: hidden; }
.slimbar__fill { height: 100%; border-radius: var(--radius-pill); background: var(--blue); transition: width var(--dur-slow) var(--ease-out); }

/* Ring gauge */
/* Payroll Readiness gauge (ringGauge in app.js). UNIQUE class — must NOT share .ring with the
   92px shell widget in components.css, which clipped this 132px SVG so the score + caption
   overlapped the ring (D-001). The score is centered inside the ring; the caption is a separate
   sibling below with its own space (block gauge, auto margins). */
.rgauge { position: relative; width: 132px; height: 132px; margin: var(--space-2) auto var(--space-3); }
.rgauge svg { transform: rotate(-90deg); }
.rgauge__c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rgauge__score { font-size: var(--text-3xl); font-weight: var(--weight-bold); color: var(--color-ink); font-variant-numeric: tabular-nums; line-height: 1; }
.rgauge__of { font-size: var(--text-xs); color: var(--color-ink-subtle); margin-top: 2px; }

/* KPI sparkline + positive value */
.kpi__spark { margin-top: var(--space-3); }
.kpi__spark svg { display: block; width: 100%; height: 40px; }
.kpi__value.big-pos { color: var(--color-money-pos); }

/* Chart cards */
.chartbox svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-4); }
.chart-legend__i { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-ink-muted); }
.chart-legend__sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.chart-legend__i b { color: var(--color-ink); font-variant-numeric: tabular-nums; font-weight: var(--weight-semibold); }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: var(--space-7); flex-wrap: wrap; }
.donut { position: relative; width: 180px; height: 180px; flex-shrink: 0; }
.donut__c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut__total { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--color-ink); font-variant-numeric: tabular-nums; }
.donut__lbl { font-size: var(--text-2xs); color: var(--color-ink-subtle); text-transform: uppercase; letter-spacing: var(--tracking-label); margin-top: 2px; }

/* Payroll pipeline — five inline stages.
   RENAMED FROM .pipeline (2026-08-18). Two unrelated components shared that one class name:
   this five-column grid of .pstage stat cards (Dashboard → "Payroll pipeline"), and the run
   LIFECYCLE strip in ui/shell.js, a flex row of .stage nodes and connectors. The collision was
   invisible only because lq-components.css — which gives the lifecycle strip `display:flex`
   globally — was never linked in index.html. The moment that link was added, this grid became a
   wrapping flex row and the five cards lost their equal columns. Distinct components get
   distinct names; the .pstage children were already prefixed, only the container was not. */
.pstage-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pstage { padding: var(--space-5); border-right: 1px solid var(--color-hairline); display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.pstage:last-child { border-right: none; }
.pstage--link { cursor: pointer; transition: background var(--fast, .15s); }
.pstage--link:hover { background: var(--color-surface-hover); }
.pstage--link:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.pstage__label { font-size: var(--text-sm); color: var(--color-ink-muted); font-weight: var(--weight-medium); }
.pstage__val { font-size: var(--text-lg); font-weight: var(--weight-semibold); color: var(--color-ink); font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .pstage-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pstage { border-right: none; border-bottom: 1px solid var(--color-hairline); } .pstage:last-child, .pstage:nth-last-child(2) { border-bottom: none; } }
@media (max-width: 560px) { .pstage-row { grid-template-columns: 1fr; } .pstage:nth-last-child(2) { border-bottom: 1px solid var(--color-hairline); } }

/* Data-driven status pills */
.pstat { display: inline-flex; align-items: center; gap: 6px; padding: 3px var(--space-3); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.pstat__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pstat--green { background: var(--green-t); color: var(--green-text); }
.pstat--amber { background: var(--amber-t); color: var(--amber-text); }
.pstat--blue  { background: var(--blue-t);  color: var(--blue); }
.pstat--red   { background: var(--red-t);   color: var(--red-text); }
.pstat--gray  { background: var(--color-surface-sunken); color: var(--color-ink-muted); }

/* ===================================================================== */
/* EMPLOYEES — premium resizable data grid (Phase 16)                    */
/* ===================================================================== */
.egrid { padding: 0; overflow: hidden; border-radius: 16px; box-shadow: var(--shadow-md); }
.egrid-wrap { overflow: auto; max-height: 66vh; -webkit-overflow-scrolling: touch; }

/* table-layout: fixed so per-column widths hold exactly while dragging. */
.egrid__table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: var(--text-md); }
/* Clean HORIZONTAL rows only (approved demo .reg finish) — no vertical grid lines. */
.egrid__table th, .egrid__table td { border: none; vertical-align: middle; }
.egrid__table tbody td { border-bottom: 1px solid var(--lq-border); }
.egrid__table td { height: 48px; /* APPROVED page 6: 44px standard, 48px when the row carries
   secondary text or row actions. Register rows carry BOTH (name + email, and the eye/more
   actions), so 48 is the approved height. It was 46 — a value from neither rule. */ padding: 0 var(--lq-space-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lq-ink-primary); }

/* Header row — subtle fill, 11px uppercase, letter-spaced, muted; single bottom rule. */
.egrid__table thead th { position: sticky; top: 0; z-index: 2; height: 38px; padding: 0 var(--lq-space-4); background: var(--lq-surface-subtle); border-bottom: 1px solid var(--lq-border); overflow: visible; }
.egrid__table thead .th-in { display: flex; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.egrid__table thead th.c-right .th-in { justify-content: flex-end; }
.egrid__table thead th.c-center .th-in { justify-content: center; }
.th-lbl, .th-sort { font-size: var(--text-2xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-sort { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; padding: 0; cursor: pointer; font-family: inherit; }
.th-sort:hover { color: var(--color-ink); }
.sortic { flex-shrink: 0; color: var(--color-ink-subtle); }
.sortic--on { color: var(--blue); }

/* Body rows — 56px, generous padding, light-tint hover, no zebra. */
.egrid__table tbody tr { background: var(--color-surface); transition: background var(--dur-fast); }
.egrid__table tbody tr:hover td { background: var(--color-surface-hover); }
.egrid__table tbody tr.is-sel td { background: var(--blue-t2); }
.c-right { text-align: right; }
.c-center { text-align: center; }
.egrid__rate { font-weight: var(--weight-bold); color: var(--color-ink); font-variant-numeric: tabular-nums; }

/* Employee ID — tabular, medium weight, muted ink. */
.eid { font-variant-numeric: tabular-nums; font-weight: var(--weight-medium); color: var(--color-ink-muted); letter-spacing: 0.01em; }

/* Row-select checkboxes. */
.ecbx { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; vertical-align: middle; margin: 0; }
th.c-sel, td.c-sel { text-align: center; }

/* Name cell — 36px colored-initials avatar with a soft ring + email sub-line. */
.ename { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
/* No avatar circle: just the name + muted email, left-aligned with breathing room. */
.ename--noav { gap: 0; padding: var(--space-1) 0; }
.ename__tx { min-width: 0; }
.ename__name { font-weight: var(--weight-bold); color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ename__mail { font-size: var(--text-xs); color: var(--color-ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eav { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: var(--text-xs); font-weight: var(--weight-bold); box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 4px currentColor; }
.eav--blue   { background: var(--blue-t);   color: var(--blue); }
.eav--teal   { background: var(--teal-t);   color: var(--teal); }
.eav--purple { background: var(--purple-t); color: var(--purple); }
.eav--orange { background: var(--orange-t); color: var(--orange); }
.eav--green  { background: var(--green-t);  color: var(--green-text); }

/* Department — small colored dot + label (not a filled pill). */
.edept { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-medium); color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ddot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ddot--blue   { background: var(--blue); }
.ddot--teal   { background: var(--teal); }
.ddot--purple { background: var(--purple); }
.ddot--orange { background: var(--orange); }

/* Actions cell */
.erow-actions { display: inline-flex; gap: var(--space-1); justify-content: center; }

/* Clickable employee name — opens the detail view. Link-styled button, no chrome. */
.ename__link { background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer;
  font-weight: var(--lq-weight-semibold); color: var(--lq-ink-primary); text-align: left; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ename__link:hover { text-decoration: underline; color: var(--lq-accent); }
.ename__link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--blue-t); border-radius: 4px; }
.epaymode { color: var(--color-ink); font-weight: var(--weight-medium); }

/* ── Run payroll: two-column wizard layout + sticky summary rail ────── */
.run-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: var(--space-6); align-items: start; }
.run-main { min-width: 0; }
.summary-rail { position: sticky; top: var(--space-4); background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: var(--space-5); display: flex; flex-direction: column; gap: 2px; }
.summary-rail__title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--color-ink-muted); font-weight: var(--weight-bold); margin-bottom: var(--space-2); }
.summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--line); font-size: var(--text-sm); }
.summary-row span { color: var(--color-ink-muted); }
.summary-row b { color: var(--color-ink); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.summary-row.is-lead b { color: var(--blue-d); font-size: var(--text-md); }
.summary-row.is-warn b { color: var(--amber-d, var(--orange)); }
.summary-rail__foot { font-size: var(--text-xs); margin-top: var(--space-3); line-height: 1.5; }
@media (max-width: 900px) { .run-layout { grid-template-columns: 1fr; } .summary-rail { position: static; order: -1; } }

/* Table caption + footnote + hint rows (approved demo parity). */
.emp-caption, .egrid__table caption { caption-side: top; text-align: left; padding: var(--lq-space-3) var(--lq-space-4);
  font-size: var(--lq-text-caption); color: var(--lq-ink-muted); background: var(--lq-surface-card); border-bottom: 1px solid var(--lq-border); }
.table-footnote { padding: var(--lq-space-3) var(--lq-space-4); font-size: var(--lq-text-caption); color: var(--lq-ink-muted); border-top: 1px solid var(--lq-border); }
.hint-row { font-size: var(--lq-text-caption); color: var(--lq-ink-muted); margin-top: var(--lq-space-3); }

/* ── Employees toolbar redesign (approved demo parity) ─────────────── */
/* Full-width search above the action row. */
.search-box-lg { display: flex; align-items: center; gap: var(--space-2); width: 100%;
  border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-md);
  padding: 0 var(--space-3); height: 44px; margin-bottom: var(--space-3); }
.search-box-lg:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-t); }
.search-box-lg__glyph { width: 18px; height: 18px; color: var(--color-ink-muted); flex-shrink: 0; }
.search-box-lg input { flex: 1; border: none; outline: none; background: none; font: inherit; color: inherit; height: 100%; }
/* Two-part action row: bulk-selection bar + compact search (left) + tools at the edge (right). */
.entity-action-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.entity-action-row__left { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.entity-action-row__right { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
/* Compact search — relocated from the old full-width bar into the action row's left cluster. */
.search-box-sm { display: flex; align-items: center; gap: var(--space-2); width: 260px; max-width: 100%;
  border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-md); padding: 0 var(--space-3); height: 36px; }
.search-box-sm:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-t); }
.search-box-sm__glyph { width: 16px; height: 16px; color: var(--color-ink-muted); flex-shrink: 0; }
.search-box-sm input { flex: 1; min-width: 0; border: none; outline: none; background: none; font: inherit; color: inherit; height: 100%; }
/* Icon-only status filter: dot the button when a non-default status is applied (no text label). */
.emp-filter-btn.is-active { border-color: var(--blue); color: var(--blue); position: relative; }
.emp-filter-btn.is-active::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.selection-bar { display: flex; align-items: center; gap: var(--space-2); min-height: 34px; }
.selection-bar__count { font-size: var(--text-sm); color: var(--color-ink-muted); }
.selection-bar__count b { color: var(--color-ink); }
.btn--sm { padding: 6px 10px; font-size: var(--text-sm); min-height: 34px; }
.btn--ghost { background: transparent; border: 1px solid transparent; color: var(--color-ink); }
.btn--ghost:hover:not([disabled]) { background: var(--color-surface-hover); border-color: var(--color-border); }
.btn--ghost[disabled] { opacity: .5; cursor: not-allowed; }
/* Table shell head: freeze toggle + shown-count on the left, hint meta on the right. */
.table-shell-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.table-shell-head__left { display: flex; align-items: center; gap: var(--space-3); }
.table-shell-head__meta { font-size: var(--text-xs); }
.shown-count { font-size: var(--text-sm); color: var(--color-ink-muted); }
.shown-count b { color: var(--color-ink); }
.freeze-toggle { width: 34px; height: 34px; }
.freeze-toggle[aria-pressed="true"] { background: var(--blue-t); border-color: var(--blue); color: var(--blue-d); }
/* OPTIONAL EMPLOYEE COLUMNS (2026-08-19, added with the column picker).
   Each optional column gets a rule so the single-class cascade guard passes and, more usefully,
   so a long designation or email truncates instead of forcing the table wider than the viewport
   and pushing the row actions off-screen. Money and count columns stay on one line: a wrapped
   figure reads as two numbers. */
.c-desig, .c-cc, .c-email, .c-freq, .c-tax, .c-govids {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.c-hired, .c-sep { white-space: nowrap; }
.c-sep .ename__mail { text-transform: capitalize; }
.c-daily, .c-hourly, .c-hpd, .c-wdy, .c-housing, .c-dmin { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* The column picker holds every pickable column at once, so it needs to scroll rather than run
   off the bottom of the window. */
.menu-pop--tall { max-height: 60vh; overflow-y: auto; }
/* Data-completeness chip. */
.c-complete { white-space: nowrap; }
.cbadge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--radius-pill, 999px);
  font-size: var(--text-xs); font-weight: var(--weight-medium); }
.cbadge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.cbadge--ok { background: var(--green-t); color: var(--green-d, var(--green)); }
.cbadge--warn { background: var(--amber-t, var(--orange-t)); color: var(--amber-d, var(--orange)); }
.fixnow { background: none; border: 0; padding: 0 0 0 8px; margin: 0; font: inherit; font-size: var(--text-xs);
  font-weight: var(--weight-bold); color: var(--blue-d); cursor: pointer; }
.fixnow:hover { text-decoration: underline; }
/* Frozen leading columns (select · Employee ID · Name) — sticky when data-freeze="name". The
   left offsets are pushed as custom props from JS because columns are resizable. */
.egrid-wrap[data-freeze="name"] .egrid__table th.c-sel,
.egrid-wrap[data-freeze="name"] .egrid__table td.c-sel { position: sticky; left: 0; z-index: 2; }
.egrid-wrap[data-freeze="name"] .egrid__table th.c-id,
.egrid-wrap[data-freeze="name"] .egrid__table td.c-id { position: sticky; left: var(--froz-id, 48px); z-index: 2; }
.egrid-wrap[data-freeze="name"] .egrid__table th.c-name,
.egrid-wrap[data-freeze="name"] .egrid__table td.c-name { position: sticky; left: var(--froz-name, 176px); z-index: 2; }
.egrid-wrap[data-freeze="name"] .egrid__table thead th.c-sel,
.egrid-wrap[data-freeze="name"] .egrid__table thead th.c-id,
.egrid-wrap[data-freeze="name"] .egrid__table thead th.c-name { z-index: 4; background: var(--lq-surface-subtle); }
.egrid-wrap[data-freeze="name"] .egrid__table tbody td.c-sel,
.egrid-wrap[data-freeze="name"] .egrid__table tbody td.c-id,
.egrid-wrap[data-freeze="name"] .egrid__table tbody td.c-name { background: var(--lq-surface-card); }
.egrid-wrap[data-freeze="name"] .egrid__table tbody tr:hover td.c-sel,
.egrid-wrap[data-freeze="name"] .egrid__table tbody tr:hover td.c-id,
.egrid-wrap[data-freeze="name"] .egrid__table tbody tr:hover td.c-name { background: var(--color-surface-hover); }
.egrid-wrap[data-freeze="name"] .egrid__table tbody tr.is-sel td.c-sel,
.egrid-wrap[data-freeze="name"] .egrid__table tbody tr.is-sel td.c-id,
.egrid-wrap[data-freeze="name"] .egrid__table tbody tr.is-sel td.c-name { background: var(--blue-t2); }
.egrid-wrap[data-freeze="name"].is-hscrolled .egrid__table th.c-name,
.egrid-wrap[data-freeze="name"].is-hscrolled .egrid__table td.c-name { box-shadow: 8px 0 8px -8px rgba(0,0,0,.22); }

/* ── Employee detail (five-tab record) ─────────────────────────────── */
.empdetail-head { margin-bottom: var(--space-4); }
.eavatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-size: var(--text-sm); font-weight: var(--weight-bold); box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 4px currentColor; }
.eavatar--blue   { background: var(--blue-t);   color: var(--blue); }
.eavatar--teal   { background: var(--teal-t);   color: var(--teal); }
.eavatar--purple { background: var(--purple-t); color: var(--purple); }
.eavatar--orange { background: var(--orange-t); color: var(--orange); }
.eavatar--green  { background: var(--green-t);  color: var(--green-text); }
/* Tab bar */
.emptabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: var(--space-4); overflow-x: auto; }
.emptab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 16px; margin-bottom: -1px;
  font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-ink-muted);
  cursor: pointer; white-space: nowrap; transition: color var(--fast, .15s), border-color var(--fast, .15s); }
.emptab:hover { color: var(--color-ink); }
.emptab.is-active { color: var(--blue-d); border-bottom-color: var(--blue); font-weight: var(--weight-bold); }
.emptab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--blue-t); border-radius: 6px 6px 0 0; }
/* Definition grid (read-only field pairs) */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3) var(--space-5); }
.dl-item { min-width: 0; padding: var(--space-2) 0; border-bottom: 1px solid var(--line); }
.dl-item__l { font-size: var(--text-xs); color: var(--color-ink-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.dl-item__v { color: var(--color-ink); font-weight: var(--weight-medium); overflow-wrap: anywhere; }

/* Column resize handle — subtle grip that turns --blue on hover/drag. */
.colrz { position: absolute; top: 0; right: -1px; width: 10px; height: 100%; display: flex; align-items: center; justify-content: center; cursor: col-resize; z-index: 3; }
.colrz::after { content: ''; width: 2px; height: 15px; border-radius: 1px; background: var(--color-border-strong); transition: background var(--dur-fast), height var(--dur-fast); }
.colrz:hover::after, .colrz.is-dragging::after { background: var(--blue); height: 62%; }
body.col-resizing { cursor: col-resize; user-select: none; }

/* Pagination footer */
.emp-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border); flex-wrap: wrap; }
.emp-foot__info { font-size: var(--text-sm); color: var(--color-ink-muted); display: inline-flex; align-items: center; gap: var(--space-3); }
.emp-foot__info b { color: var(--color-ink); font-variant-numeric: tabular-nums; }
.emp-foot__sel { display: inline-flex; align-items: center; padding: 2px var(--space-2); border-radius: var(--radius-pill); background: var(--blue-t); color: var(--blue); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
/* CONTAINER RULE REMOVED (2026-08-18). components.css loads after this sheet and declares the
   same class as `display:flex; align-items:center; gap:6px; margin-left:auto`, so every
   declaration here was already dead — two sheets claiming one container, with the loser left in
   place to look authoritative. components.css owns the .pager box; this sheet owns its buttons. */
.pager button { min-width: 32px; height: 32px; padding: 0 var(--space-2); border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-sm); color: var(--color-ink-muted); cursor: pointer; font: inherit; font-size: var(--text-sm); }
.pager button:hover:not(:disabled) { background: var(--color-surface-hover); color: var(--color-ink); }
.pager button.active { background: var(--blue-t); color: var(--blue); border-color: transparent; font-weight: var(--weight-semibold); }
.pager button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Filter menu active item */
.menu-item.is-active { color: var(--blue); font-weight: var(--weight-semibold); }
.menu-item.is-active svg { color: inherit; }

/* ===================================================================== */
/* SECURITY (Phase 17) — 2FA · password policy · sessions                */
/* ===================================================================== */
.opt-sep { height: 1px; background: var(--color-border); margin: var(--space-5) 0; }
.opt-row--stack { display: block; }
.opt-row--stack > div { width: 100%; }

/* Live password-policy checklist */
.pw-rules { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); }
.pw-rule { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-ink-muted); }
.pw-rule__ic { width: 15px; height: 15px; flex-shrink: 0; color: var(--color-ink-subtle); opacity: 0.5; }
.pw-rule.is-pass { color: var(--color-ink); }
.pw-rule.is-pass .pw-rule__ic { color: var(--green); opacity: 1; }
@media (max-width: 620px) { .pw-rules { grid-template-columns: 1fr; } }

/* Active sessions list */
.sess-list { margin-top: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.sess { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-bottom: 1px solid var(--color-hairline); }
.sess:last-child { border-bottom: none; }
.sess__icon { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--blue-t); color: inherit; }
.sess__icon svg { width: 18px; height: 18px; }
.sess__main { flex: 1; min-width: 0; }
.sess__dev { font-weight: var(--weight-semibold); color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess__meta { font-size: var(--text-xs); color: var(--color-ink-muted); font-variant-numeric: tabular-nums; }
.sess__end { flex-shrink: 0; }

/* MFA enrolment modal (QR + manual key) */
.mfa-enroll { display: grid; grid-template-columns: auto 1fr; gap: var(--space-6); align-items: start; }
.mfa-qr { background: #ffffff; padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--color-border); display: grid; place-items: center; }
.mfa-qr img { display: block; width: 200px; height: 200px; image-rendering: pixelated; }
.mfa-enroll__side { min-width: 0; }
.mfa-secret { font-family: var(--font-mono); font-size: var(--text-md); letter-spacing: 0.14em; word-break: break-all; user-select: all; background: var(--color-surface-sunken); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-3); color: var(--color-ink); margin-top: var(--space-2); }
@media (max-width: 560px) { .mfa-enroll { grid-template-columns: 1fr; } .mfa-qr { justify-self: center; } }

/* Backup codes grid */
.bcodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.bcode { font-family: var(--font-mono); font-size: var(--text-md); letter-spacing: 0.1em; text-align: center; padding: var(--space-3); background: var(--color-surface-sunken); border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-ink); user-select: all; }

/* Login-time MFA challenge gate */
.mfa-gate { min-height: 66vh; display: grid; place-items: center; }
.mfa-gate__card { width: 100%; max-width: 420px; text-align: center; padding: var(--space-8) var(--space-7); }
.mfa-gate__icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto var(--space-4); display: grid; place-items: center; background: var(--blue-t); color: var(--blue); }
.mfa-gate__icon svg { width: 26px; height: 26px; }
.mfa-gate__title { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--color-ink); letter-spacing: var(--tracking-snug); }
.mfa-gate__sub { color: var(--color-ink-muted); font-size: var(--text-sm); margin: var(--space-2) 0 var(--space-5); }
.mfa-gate__input { text-align: center; font-size: var(--text-2xl); letter-spacing: 0.4em; font-variant-numeric: tabular-nums; font-family: var(--font-mono); padding: var(--space-4); }
.mfa-gate__alt { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-5); }
.mfa-gate__sep { color: var(--color-ink-subtle); }
.mfa-gate__err { color: var(--color-danger); font-size: var(--text-sm); min-height: 1.2em; margin-top: var(--space-3); }
.linkbtn { border: none; background: none; padding: 0; cursor: pointer; font: inherit; font-size: var(--text-sm); color: var(--color-link); }
.linkbtn:hover { text-decoration: underline; }

/* ===================================================================== */
/* SETTINGS v2 (Phase 18) — sub-nav card + panels, photo, plan/billing    */
/* ===================================================================== */
.settings-navcard { position: sticky; top: var(--space-4); align-self: start; }
.snav.card { padding: var(--space-2); }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav__item { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3); border: none; background: none; border-radius: var(--radius-sm); color: var(--color-ink-muted); font: inherit; font-size: var(--text-md); font-weight: var(--weight-medium); cursor: pointer; text-align: left; transition: background var(--dur-fast), color var(--dur-fast); }
.snav__item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--color-ink-subtle); }
.snav__item:hover { background: var(--color-surface-hover); color: var(--color-ink); }
.snav__item.active { background: var(--color-primary-weak); color: var(--color-primary-weak-fg); }
.snav__item.active svg { color: var(--color-primary-ink); }
.snav__sep { height: 1px; background: var(--color-border); margin: var(--space-2) var(--space-1); }
.snav__item--accent { color: var(--purple); }
.snav__item--accent svg { color: inherit; }
.snav__item--accent:hover { background: var(--purple-t); color: var(--purple); }
@media (max-width: 900px) { .settings-navcard { position: static; } .snav { flex-direction: row; flex-wrap: wrap; } .snav__item { width: auto; } .snav__sep { display: none; } }

.input--static { display: flex; align-items: center; background: var(--color-surface-sunken); color: var(--color-ink); }

/* Profile photo + company logo */
.photo-row { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.photo-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.photo-hint { flex-basis: 100%; font-size: var(--text-xs); }
.photo-preview { width: 72px; height: 72px; border-radius: 50%; background-size: cover; background-position: center; display: grid; place-items: center; border: 1px solid var(--color-border); flex-shrink: 0; }
.photo-preview--empty { background: var(--blue-t); color: var(--blue); font-weight: var(--weight-bold); font-size: var(--text-xl); }
.logo-preview { width: 96px; height: 72px; border-radius: var(--radius-md); background-size: contain; background-position: center; background-repeat: no-repeat; background-color: var(--color-surface); display: grid; place-items: center; border: 1px solid var(--color-border); flex-shrink: 0; }
.logo-preview--empty svg { width: 26px; height: 26px; color: var(--color-ink-subtle); }

/* Top-bar avatar camera badge */
.avatar-btn--cam { position: relative; }
.avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 17px; height: 17px; border-radius: 50%; background: var(--blue); color: var(--white); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--color-canvas); }
.avatar-cam svg { width: 10px; height: 10px;  }

/* Category chips (suggestion) */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { border: 1px solid var(--color-border); background: var(--color-surface); border-radius: var(--radius-pill); padding: 6px var(--space-4); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-ink-muted); cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.chip:hover { border-color: var(--color-border-strong); color: var(--color-ink); }
.chip--on { background: var(--blue-t); border-color: transparent; color: var(--blue); }

/* Share-a-suggestion popup body */
.suggest__badge { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto var(--space-4); display: grid; place-items: center; background: var(--purple-t); color: var(--purple); }
.suggest__badge svg { width: 26px; height: 26px; }
.suggest__badge--ok { background: var(--green-t); color: var(--green-text); }
.suggest__ta { width: 100%; min-height: 120px; height: auto; resize: vertical; margin-top: var(--space-4); font: inherit; padding: var(--space-3); line-height: 1.5; }
.suggest--thanks { text-align: center; padding: var(--space-4) 0; }
.suggest__thx { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--color-ink); margin-bottom: var(--space-2); text-align: center; }

/* Demo-data marker */
.demo-pill { display: inline-block; margin-left: var(--space-2); padding: 1px var(--space-2); border-radius: var(--radius-pill); background: var(--amber-t); color: var(--amber-text); font-size: var(--text-2xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); vertical-align: middle; }

/* Plan */
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-sunken); }
.plan-head__name { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--color-ink); }
.plan-head__price { font-size: var(--text-md); color: var(--color-ink); font-weight: var(--weight-semibold); margin-top: 2px; font-variant-numeric: tabular-nums; }
.plan-usage { margin-top: var(--space-5); }
.plan-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); margin-top: var(--space-5); }
.plan-feat { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-ink); }
.plan-feat svg { width: 16px; height: 16px; color: inherit; flex-shrink: 0; }
@media (max-width: 620px) { .plan-feats { grid-template-columns: 1fr; } }
.planc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 720px) { .planc-grid { grid-template-columns: 1fr; } }
.planc { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); }
.planc--on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.planc__name { font-weight: var(--weight-semibold); color: var(--color-ink); display: flex; align-items: center; gap: var(--space-2); }
.planc__badge { font-size: var(--text-2xs); font-weight: var(--weight-semibold); color: var(--blue); background: var(--blue-t); border-radius: var(--radius-pill); padding: 1px var(--space-2); text-transform: uppercase; letter-spacing: var(--tracking-label); }
.planc__price { font-size: var(--text-xl); font-weight: var(--weight-bold); color: var(--color-ink); margin: var(--space-2) 0 2px; font-variant-numeric: tabular-nums; }
.planc__price span { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-ink-muted); }
.planc__tag { font-size: var(--text-sm); }
.planc__note { font-size: var(--text-xs); margin-top: 2px; }

/* Billing */
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.pay-card { display: flex; align-items: center; gap: var(--space-3); }
.pay-card > svg { width: 34px; height: 24px; color: inherit; flex-shrink: 0; }
.pay-card__num { font-weight: var(--weight-semibold); color: var(--color-ink); font-variant-numeric: tabular-nums; }
.inv-grid { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-top: var(--space-4); overflow: auto; }
.inv-grid .egrid__table td { height: 48px; }

/* Support */
.support-list { display: flex; flex-direction: column; gap: var(--space-2); }
.support-res { display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); font: inherit; cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast); }
.support-res:hover { background: var(--color-surface-hover); border-color: var(--color-border-strong); }
.support-res__ic { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--blue-t); color: inherit; display: grid; place-items: center; flex-shrink: 0; }
.support-res__ic svg { width: 18px; height: 18px; }
.support-res__t { font-weight: var(--weight-semibold); color: var(--color-ink); }
.support-res__d { font-size: var(--text-xs); }
.support-res__arrow { width: 16px; height: 16px; color: var(--color-ink-subtle); margin-left: auto; flex-shrink: 0; }
.support-contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (max-width: 560px) { .support-contacts { grid-template-columns: 1fr; } }
.support-contact { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.support-contact svg { width: 20px; height: 20px; color: var(--color-ink-muted); flex-shrink: 0; }
.support-contact__t { font-weight: var(--weight-semibold); color: var(--color-ink); }

/* ===================================================================== */
/* STEP 5 — access-aware shell: what-needs-me, statutory, notifications   */
/* ===================================================================== */
.samplebar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--amber-t); color: var(--color-ink-muted); font-size: var(--text-sm); }
.samplebar svg { width: 16px; height: 16px; color: inherit; flex-shrink: 0; }

/* What needs me */
.wnm-list { display: flex; flex-direction: column; }
.wnm { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-hairline); }
.wnm:first-child { padding-top: 0; }
.wnm:last-child { border-bottom: none; padding-bottom: 0; }
.wnm__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wnm__dot--red { background: var(--red); } .wnm__dot--amber { background: var(--amber); } .wnm__dot--blue { background: var(--blue); } .wnm__dot--gray { background: var(--faint); }
.wnm__ic { width: 34px; height: 34px; border-radius: 50%; background: var(--color-surface-sunken); color: var(--color-ink-muted); display: grid; place-items: center; flex-shrink: 0; }
.wnm__ic svg { width: 17px; height: 17px; }
.wnm__ic--ok { background: var(--green-t); color: inherit; }
.wnm__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wnm__t { font-weight: var(--weight-semibold); color: var(--color-ink); }
.wnm__d { font-size: var(--text-sm); color: var(--color-ink-muted); }
.wnm-empty { display: flex; align-items: center; gap: var(--space-3); }

/* Statutory deadlines */
.sdl-list { display: flex; flex-direction: column; }
.sdl { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-hairline); }
.sdl:first-child { padding-top: 0; }
.sdl:last-child { border-bottom: none; padding-bottom: 0; }
.sdl__agency { flex-shrink: 0; width: 82px; text-align: center; padding: 4px var(--space-2); border-radius: var(--radius-sm); font-size: var(--text-2xs); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: var(--tracking-label); }
.sdl__agency--blue { background: var(--blue-t); color: var(--blue); } .sdl__agency--green { background: var(--green-t); color: var(--green-text); } .sdl__agency--teal { background: var(--teal-t); color: var(--teal); } .sdl__agency--orange { background: var(--orange-t); color: var(--orange); }
.sdl__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sdl__t { font-weight: var(--weight-medium); color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdl__d { font-size: var(--text-xs); }
.sdl-note { display: flex; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border); font-size: var(--text-xs); color: var(--color-ink-muted); }
.sdl-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: inherit; }
.sdl-note b { color: var(--color-ink); font-weight: var(--weight-semibold); }

/* Employee dashboard key-values */
.emp-kv { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }

/* Notifications center */
.menu-pop--wide { min-width: 340px; max-width: 366px; }
.notif-sub { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-3) var(--space-1); }
.notif-sub .menu-item__right { font-size: var(--text-xs); color: var(--color-ink-muted); }
.notif-sample { font-size: var(--text-2xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--amber-text); background: var(--amber-t); border-radius: var(--radius-pill); padding: 1px var(--space-2); }
/* Renamed `.notif` → `.notif-item`: the bare `.notif` selector collided with the <body> state-flag class
   `notif` (added when the bell opens), which forced the whole page to display:flex + opacity:.7. This block
   is legacy/unused (current rows use `.nrow`); renaming removes the collision for good. */
.notif-item { display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; text-align: left; padding: var(--space-3); border: none; background: none; font: inherit; cursor: pointer; border-radius: var(--radius-sm); }
.notif-item:hover { background: var(--color-surface-hover); }
.notif__ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.notif__ic svg { width: 16px; height: 16px; }
.notif__ic--amber { background: var(--amber-t); color: inherit; } .notif__ic--blue { background: var(--blue-t); color: inherit; } .notif__ic--green { background: var(--green-t); color: inherit; } .notif__ic--orange { background: var(--orange-t); color: inherit; }
.notif__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.notif__t { font-weight: var(--weight-semibold); color: var(--color-ink); font-size: var(--text-sm); }
.notif__d { font-size: var(--text-xs); color: var(--color-ink-muted); }
.notif__time { font-size: var(--text-2xs); color: var(--color-ink-subtle); margin-top: 2px; }
.notif__unread { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; margin-top: 6px; visibility: hidden; }
.notif-item.is-unread .notif__unread { visibility: visible; }
.notif-item:not(.is-unread) { opacity: 0.7; }

/* ===================================================================== */
/* STEP 6 — Employee Self-Service (ESS)                                   */
/* ===================================================================== */
.samplebar--preview { background: var(--blue-t); }
.samplebar--preview svg { color: inherit; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-6); margin-top: var(--space-2); }
.info-grid .kv { border-bottom: 1px solid var(--color-hairline); }
@media (max-width: 620px) { .info-grid { grid-template-columns: 1fr; } }

/* ESS admin preview affordance */
.menu-badge { margin-left: auto; font-size: var(--text-2xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--blue); background: var(--blue-t); border-radius: var(--radius-pill); padding: 1px var(--space-2); }
.nav-preview { margin: 0 var(--space-2) var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--blue-t); }
.nav-preview__t { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--blue); line-height: 1.25; }
.nav-preview__t svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-preview__t b { font-weight: var(--weight-bold); }
.nav-preview__exit { margin-top: var(--space-2); width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-ink); border-radius: var(--radius-sm); padding: 6px var(--space-3); font: inherit; font-size: var(--text-xs); font-weight: var(--weight-medium); cursor: pointer; }
.nav-preview__exit:hover { background: var(--color-surface-hover); }
.nav-preview__exit svg { width: 13px; height: 13px; transform: rotate(180deg); }

/* ===================================================================== */
/* STEP 8 — Statutory rate versions (admin)                              */
/* ===================================================================== */
.rate-unverified { display: flex; align-items: flex-start; gap: var(--space-2); margin: var(--space-4) 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--amber); border-radius: var(--radius-md); background: var(--amber-t); color: var(--color-ink); font-size: var(--text-sm); }
.rate-unverified__ic { flex-shrink: 0; margin-top: 1px; color: inherit; display: inline-grid; place-items: center; }
.rate-unverified__ic svg { width: 16px; height: 16px; }
.rate-unverified b { font-weight: var(--weight-semibold); }
.rate-agency { margin-top: var(--space-5); }
.rate-agency:first-of-type { margin-top: 0; }
.rate-agency__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.rate-agency__name { font-weight: var(--weight-semibold); color: var(--color-ink); font-size: var(--text-md); }
.rate-ver { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-top: var(--space-2); }
.rate-ver__main { flex: 1; min-width: 0; }
.rate-ver__range { font-weight: var(--weight-medium); color: var(--color-ink); font-variant-numeric: tabular-nums; }
.rate-ver__src { font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; }
.rate-ver__end { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }

/* ===================================================================== */
/* STEP 9 — Government filing catalog                                    */
/* ===================================================================== */
.filing-group { margin-top: var(--space-6); }
.filing-group:first-child { margin-top: var(--space-4); }
.filing-group__head { font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: var(--tracking-label); color: var(--color-ink-muted); margin-bottom: var(--space-3); }
.filing-card { display: flex; flex-direction: column; gap: var(--space-2); }
.filing-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.filing-card__code { font-weight: var(--weight-bold); color: var(--color-ink); font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.filing-card__name { font-size: var(--text-sm); color: var(--color-ink-muted); min-height: 34px; }
.filing-card__foot { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }

/* --- Privacy Center (Data Privacy Act) ------------------------------- */
.privacy-tabs { margin-bottom: var(--space-5); overflow-x: auto; flex-wrap: nowrap; }
.notice-body { display: flex; flex-direction: column; gap: var(--space-3); }
.notice-body--scroll { max-height: 46vh; overflow-y: auto; padding-right: var(--space-2); }
.notice-sec__h { font-weight: var(--weight-semibold); color: var(--color-ink); font-size: var(--text-sm); margin-bottom: 2px; }
.notice-sec p { margin: 0; color: var(--color-ink-muted); font-size: var(--text-sm); line-height: 1.6; }
.notice-ack { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-left: 3px solid var(--color-primary); background: var(--color-surface-sunken); border-radius: var(--radius-sm); font-size: var(--text-sm); font-style: italic; color: var(--color-ink); }
.dsr-row { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--space-3); }
.dsr-row .field { margin: 0; min-width: 210px; }
.dsr-actions { align-items: flex-end; }
.dsr-res { display: flex; align-items: flex-start; gap: var(--space-2); margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); background: var(--blue-t); color: var(--color-ink-muted); font-size: var(--text-xs); }
.dsr-res svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: inherit; }
.reten-row { margin-bottom: var(--space-3); }
.reten-input { width: 88px; }
.reten-yrs { font-weight: var(--weight-semibold); color: var(--color-ink); font-variant-numeric: tabular-nums; }
.legal-grid { gap: var(--space-4); }
.legal-card { display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer; border: 1px solid var(--color-border); transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast); }
.legal-card:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.legal-card__title { font-weight: var(--weight-semibold); color: var(--color-ink); font-size: var(--text-md); }
.legal-card__go { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-3); color: var(--color-primary-ink); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.legal-card__go svg { width: 15px; height: 15px; }
.legal-draft-banner { display: flex; align-items: flex-start; gap: var(--space-2); margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--amber); border-radius: var(--radius-md); background: var(--amber-t); color: var(--color-ink); font-size: var(--text-sm); line-height: 1.5; }
.legal-draft-banner svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: inherit; }

/* --- Payroll inputs (attendance / leave / loans) --------------------- */
.dtr-drop { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); padding: var(--space-5); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface-sunken); }

/* --- Accounting (cost centers / GL export) --------------------------- */
.gl-total td { border-top: 2px solid var(--color-border-strong); background: var(--color-surface-sunken); }
