/* ============================================================================
   Payroll theme — design system (2026-09-21, after Dribbble "Time Tracking
   SaaS Dashboard UI" reference). Replaces the prior dark-navy + Bootstrap-blue
   look with a soft gradient canvas + single white rounded container +
   gradient stat tiles + light sidebar with lavender active states.

   Usage: <link href="{{ url_for('static', filename='css/payroll-theme.css') }}">
   in templates/base.html. All other styles are additive over Bootstrap 5.
   ============================================================================ */

:root {
  /* Brand */
  --color-primary:        #6366F1;   /* indigo */
  --color-primary-hover:  #4F46E5;
  --color-primary-soft:   #EEF2FF;
  --color-primary-ink:    #4338CA;

  /* Project / stat-tile gradients */
  --grad-purple:   linear-gradient(135deg, #A78BFA 0%, #6366F1 100%);
  --grad-blue:     linear-gradient(135deg, #60A5FA 0%, #2563EB 100%);
  --grad-amber:    linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  --grad-pink:     linear-gradient(135deg, #F472B6 0%, #EC4899 100%);
  --grad-emerald:  linear-gradient(135deg, #34D399 0%, #059669 100%);
  --grad-rose:     linear-gradient(135deg, #FB7185 0%, #E11D48 100%);
  --grad-slate:    linear-gradient(135deg, #94A3B8 0%, #475569 100%);

  /* Neutrals */
  --color-canvas-top:    #DBEAFE;    /* sky-100 */
  --color-canvas-mid:    #E0E7FF;    /* indigo-100 */
  --color-canvas-bot:    #EDE9FE;    /* violet-100 */
  --bg-canvas:           linear-gradient(135deg, var(--color-canvas-top) 0%, var(--color-canvas-mid) 50%, var(--color-canvas-bot) 100%);

  --color-surface:       #FFFFFF;
  --color-surface-alt:   #F8FAFC;    /* slate-50 */
  --color-surface-2:     #F1F5F9;    /* slate-100 */
  --color-text:          #0F172A;    /* slate-900 */
  --color-text-soft:     #334155;    /* slate-700 */
  --color-text-muted:    #64748B;    /* slate-500 */
  --color-text-faint:    #94A3B8;    /* slate-400 */
  --color-border:        #E2E8F0;    /* slate-200 */
  --color-border-soft:   #F1F5F9;    /* slate-100 */

  /* Semantic */
  --color-success:       #10B981;
  --color-success-soft:  #D1FAE5;
  --color-warning:       #F59E0B;
  --color-warning-soft:  #FEF3C7;
  --color-danger:        #EF4444;
  --color-danger-soft:   #FEE2E2;
  --color-info:          #3B82F6;
  --color-info-soft:     #DBEAFE;

  /* Spacing scale (4px) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radii */
  --radius-sm:   6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;
  --radius-pill: 9999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, .08), 0 2px 4px -2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 24px -6px rgba(15, 23, 42, .10), 0 4px 8px -4px rgba(15, 23, 42, .04);
  --shadow-xl: 0 24px 48px -12px rgba(99, 102, 241, .18);
}

/* =============== BASE / TYPOGRAPHY =============== */
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-canvas);
  background-attachment: fixed;
  color: var(--color-text);
  font-size: 16px;          /* 2026-09-21 — bumped from 15px (user feedback: "slightly bigger") */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* 2026-10-08 — smooth anchor jumps (dashboard "View all" → on-page
   cards), small breathing gap above the target. */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 16px; }
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-top: 0;
}
h1 { font-size: 1.85rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
small, .small { font-size: .9rem; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); }
hr { border-color: var(--color-border-soft); }
code { font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace; font-size: .88em; color: var(--color-text-soft); background: var(--color-surface-2); padding: 1px 6px; border-radius: var(--radius-sm); }
/* 2026-10-05 (corrections #53 + #36) — code tags on the EA form and
   Notifications pages must read as plain grey text, not red/pink chips.
   Bootstrap's default code colour is pinkish-red; these page-scoped
   classes drop both the colour and the chip background where the user
   asked for it. */
code.code-plain,
.employer-ea-page code,
.employer-notif-page code {
  color: var(--color-text-muted);
  background: transparent;
  padding: 0;
  border-radius: 0;
}

/* 2026-10-08 — Manages cell hover-expand on the employees list.
   Cell shows "n: A, B +X" by default and pops a card with the
   full outlet list on mouse-over. Pure CSS — no JS. Hidden until
   the wrapper is hovered, then positioned under the trigger with
   z-index above the table. */
.manages-wrap { position: relative; display: inline-block; }
.manages-wrap .manages-truncated { cursor: help; }
.manages-wrap .manages-expand {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  max-width: 320px;
  background: #ffffff;
  color: var(--color-text);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  padding: 10px 12px;
  z-index: 50;
  visibility: hidden;
  opacity: 0;
  transition: opacity 120ms ease, visibility 0s linear 120ms;
  text-align: left;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
}
.manages-wrap:hover .manages-expand,
.manages-wrap:focus-within .manages-expand {
  visibility: visible;
  opacity: 1;
  transition: opacity 120ms ease, visibility 0s linear 0s;
}
.manages-expand-head {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.85rem;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
}
.manages-expand-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 0;
  font-size: 0.85rem;
}
.manages-expand-list li {
  padding: 2px 0;
}
.manages-expand-list li::before {
  content: "▸ ";
  color: var(--color-primary);
  font-size: 0.7rem;
  margin-right: 4px;
}

/* 2026-10-09 — "Button skill" (indigo) on .btn-app-outline:
   generic reusable variant for actions that should read as
   primary. Word + outline in indigo at rest; on hover the
   background fills indigo and the word flips to white. Drop the
   class on any <a class="btn-app btn-app-outline"> to opt in. */
.btn-app-outline.btn-app-skill {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-app-outline.btn-app-skill:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* 2026-10-09 — "Button skill" (danger) on .btn-app-outline:
   the destructive-action variant. Red border + red text at rest,
   red background + WHITE text on hover (user update 2026-10-09:
   "change the detail of button colour in red and word in white
   when mouse rollover instead of black" — the standard
   white-on-red reads as destructive-delete). Sibling to the indigo
   .btn-app-skill above. Drop on any <a class="btn-app btn-app-outline">
   for a reusable Delete / Cancel / Deactivate button look. */
.btn-app-outline.btn-app-skill-danger,
.btn-app-outline.btn-no-show {
  border-color: var(--color-danger);
  color: var(--color-danger);
}
.btn-app-outline.btn-app-skill-danger:hover,
.btn-app-outline.btn-no-show:hover {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

/* 2026-10-10 — "Latched button" (third member of the button-skill
   family). When a decision/action button's POST persists a status and
   the page re-renders, the template swaps the button to its latched
   variant: FILLED background + white word + glyph beside the word.
   The system "knows" via the persisted status (server-driven, not JS
   memory) — the template branch keys off the record. Indigo =
   approved / downloaded; danger red = rejected.
   NOTE: latched buttons stay CLICKABLE-by-default — the approve/
   reject latch is rendered as a <span> (inert by nature); the
   Download latch is an <a> the employer may re-click. */
.btn-app-outline.btn-app-skill-latched,
.btn-app.btn-app-skill-latched,
.btn-app-outline.btn-app-skill-danger-latched,
.btn-app.btn-app-skill-danger-latched {
  cursor: default;
}
.btn-app.btn-app-skill-latched {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-app.btn-app-skill-danger-latched {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}
/* 2026-10-05 (correction #11) — dark-blue wording on info chips. The
   default text-info on bg-info-subtle reads washed-out; darken it so
   "Trial"/"Probation" chips are easy to read. */
.badge.bg-info-subtle.text-info,
.badge.bg-info-subtle.text-info i { color: #1D4ED8 !important; }

/* 2026-10-05 (corrections #27 + #47) — Bootstrap's text-warning is
   #ffc107 (yellow) which reads poorly on light backgrounds. Darken any
   warning-toned TEXT to a deep orange (readable, still clearly
   "attention"). Keeps .bg-warning fills untouched. */
.text-warning { color: #B45309 !important; }
.text-warning-emphasis { color: #92400E !important; }
.alert-warning { color: #7C2D12; }

/* Override Bootstrap surface defaults to match the new look */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--color-border-soft);
  font-weight: 600;
}
.btn { border-radius: var(--radius-md); font-weight: 500; }
.btn-sm { border-radius: var(--radius-md); }
.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
.btn-outline-primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline-primary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.form-control, .form-select {
  border-radius: var(--radius-md);
  border-color: var(--color-border);
  padding: .5rem .75rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.badge {
  border-radius: var(--radius-pill);
  font-weight: 500;
  padding: .3em .65em;
}
.table {
  --bs-table-bg: transparent;
}
.table > :not(caption) > * > * {
  padding: var(--space-3);
}

/* =============== APP SHELL (floating card on gradient) =============== */
.app-shell {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  min-height: calc(100vh - 32px);
  margin: 16px;
  display: flex;
  flex-wrap: nowrap;
  /* 2026-09-21 (user, 2nd bump) — 14.5 -> 15.5px; small text .82 -> .875rem.
     Small/sub-menu text was reading too small, especially on highlighted
     submenu items. Staff portal stays at 15px (separate scope). */
  font-size: 15.5px;
}
.app-shell .app-content h1 { font-size: 1.75rem; }
.app-shell .app-content h2 { font-size: 1.35rem; }
.app-shell .app-content h3 { font-size: 1.1rem; }
.app-shell small,
.app-shell .small { font-size: .875rem; }
.app-shell > .app-sidebar { border-top-left-radius: var(--radius-xl); border-bottom-left-radius: var(--radius-xl); }
.app-shell > .app-main    { border-top-right-radius: var(--radius-xl); border-bottom-right-radius: var(--radius-xl); }

@media (max-width: 768px) {
  /* 2026-10-10 (manager-portal build) — ☰ drawer shell: the sidebar
     becomes an off-canvas panel toggled by the topbar burger button,
     replacing the old sidebar-stacks-above-content phone fallback. */
  .app-shell { margin: 8px; border-radius: var(--radius-lg); min-height: calc(100vh - 16px); position: relative; overflow: hidden; }
  /* Beats the desktop hide rule below (and any .icon-btn display rule). */
  .app-shell .app-topbar .nav-burger { display: inline-flex; }
  /* Higher specificity (.app-shell .app-sidebar) than the base .app-sidebar
     rule below — otherwise width:248px overrides the drawer width. */
  .app-shell .app-sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: min(82vw, 300px);
    z-index: 1060;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-105%);
    transition: transform .22s ease;
    border-right: 1px solid var(--color-border-soft);
    box-shadow: none;
  }
  .app-shell.sidebar-open .app-sidebar { transform: none; box-shadow: 0 12px 40px rgba(15, 23, 42, .3); }
  .sidebar-scrim { display: none; }
  .app-shell.sidebar-open .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(15, 23, 42, .45);
  }
  .app-main { width: 100%; }
}

/* Burger is mobile-only — the desktop shell keeps the always-visible sidebar.
   Owns a higher-specificity selector so a later .icon-btn display rule
   can never un-hide it. */
.app-main .nav-burger { display: none; }

/* 2026-10-10 (manager portal, grill Q1=A) — the MANAGER shell is
   phone-first at ANY viewport: .app-shell-mobile forces the same ☰
   drawer shell the ≤768px media query gives everyone else. Rule
   bodies mirror that block 1:1; selectors stay higher-specificity so
   the base .app-sidebar / .icon-btn rules can never override them. */
.app-shell.app-shell-mobile { position: relative; overflow: hidden; }
.app-shell.app-shell-mobile .app-topbar .nav-burger { display: inline-flex; }
.app-shell.app-shell-mobile .app-sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: min(82vw, 300px);
  z-index: 1060;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-105%);
  transition: transform .22s ease;
  border-right: 1px solid var(--color-border-soft);
  box-shadow: none;
  border-radius: 0;
}
.app-shell.app-shell-mobile.sidebar-open .app-sidebar { transform: none; box-shadow: 0 12px 40px rgba(15, 23, 42, .3); }
.app-shell.app-shell-mobile .sidebar-scrim { display: none; }
.app-shell.app-shell-mobile.sidebar-open .sidebar-scrim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(15, 23, 42, .45);
}
.app-shell.app-shell-mobile .app-main { width: 100%; }

/* 2026-10-11 (user checked vs mock artifact b2588b1fda34214a) — the
   manager header follows the approved mock: white title band, navy bold
   title, grey sub-line — NOT the boss's turquoise topbar. Only the
   notification bell keeps its seat (Help + Settings are boss chrome).
   Selectors stay high-specificity so base rules can't win. */
.app-shell.app-shell-mobile .app-topbar { background: #fff; padding: 10px 14px; }
.app-shell.app-shell-mobile .app-topbar div.min-w-0 { font-size: 12px; color: #64748b; }
.app-shell.app-shell-mobile .app-topbar div.min-w-0 h1 {
  color: #0F2044; font-size: 17px; font-weight: 800; margin: 0; }
.app-shell.app-shell-mobile .app-topbar .icon-btn[title="Help"],
.app-shell.app-shell-mobile .app-topbar .icon-btn[title="Settings"] { display: none; }
/* 2026-10-11 (user: "remove the upper part 6 mini icon. useless") — the
   whole icon cluster goes: bell / help / gear buttons AND the ⓘ chips
   the absorption engine drops into the band. The mock band has only ☰ +
   title. (Button titles were consumed by the ⓘ engine, so hiding by
   title="" failed — this hides the containers.) */
.app-shell.app-shell-mobile .app-topbar .app-topbar-actions { display: none; }
.app-shell.app-shell-mobile .app-topbar .app-info-btn { display: none; }

/* =============== SIDEBAR =============== */
.app-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border-soft);
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-6);
  padding: 0 var(--space-2);
}
.app-brand-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-purple);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.app-brand-name { font-size: 1.15rem; font-weight: 700; color: var(--color-text); }
.app-brand-tag  { font-size: .68rem; color: var(--color-text-muted); font-weight: 500; display: block; margin-top: -2px; }

.nav-section-title {
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: none;
  margin: var(--space-5) var(--space-2) var(--space-2);
  letter-spacing: .02em;
}
.nav-section-title:first-of-type { margin-top: var(--space-2); }

/* 2026-10-14 (cash flow sidebar rearrangement grill 2026-10-13, Q1-Q11
   LOCKED, build shipped 2026-10-14) — 2 new sub-cluster chrome tokens
   for the manager Cash flow section. The locked grill reorganized the
   7 tabs into 1 glance landing (Cash Flow at the top) + 2 sub-clusters
   (Daily cycle / EOM closing) with 2 thin rule dividers + 2 per-cluster
   sub-titles. The sub-title is smaller + uppercase + letter-spaced to
   create a clear visual hierarchy below the existing .nav-section-title
   (SECTION = "Cash flow", SUB-CLUSTER = "Daily Circlye").

   Using the same var(--color-border-soft) as the existing hr rule for
   visual consistency with the rest of the sidebar chrome. */
.nav-sub-section-title {
  font-size: .65rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: var(--space-3) var(--space-2) var(--space-1);
  padding-left: var(--space-1);
}
.nav-divider-thin {
  border: 0;
  border-top: 1px solid var(--color-border-soft);
  margin: var(--space-2) var(--space-2);
}

.nav-item, .nav-link-app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-soft);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  position: relative;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.nav-item i, .nav-link-app i {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item:hover, .nav-link-app:hover {
  background: var(--color-primary-soft);
  color: var(--color-primary-ink);
}
.nav-item:hover i, .nav-link-app:hover i { color: var(--color-primary); }

.nav-item.active, .nav-link-app.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-ink);
  font-weight: 600;
}
.nav-item.active i, .nav-link-app.active i { color: var(--color-primary); }

/* Dropdown submenu (replaces the Bootstrap dropdown menus in the old sidebar) */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle::after {
  content: "\F282";   /* bi-chevron-down */
  font-family: "bootstrap-icons";
  margin-left: auto;
  font-size: .85rem;
  color: var(--color-text-faint);
  transition: transform .15s;
}
.nav-dropdown.open .nav-dropdown-toggle::after { transform: rotate(180deg); }
.nav-dropdown.open > .nav-item,
.nav-dropdown.open > .nav-link-app { background: var(--color-primary-soft); color: var(--color-primary-ink); font-weight: 600; }

.nav-submenu {
  list-style: none;
  margin: 4px 0 4px 0;
  padding: 4px 0 4px 14px;
  border-left: 2px solid var(--color-border-soft);
  display: none;
}
.nav-dropdown.open > .nav-submenu { display: block; }
.nav-submenu a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: var(--radius-md);
  color: var(--color-text-soft); text-decoration: none;
  font-size: .88rem;
}
.nav-submenu a:hover { background: var(--color-surface-2); color: var(--color-text); }
.nav-submenu a.active { background: var(--color-primary-soft); color: var(--color-primary-ink); font-weight: 600; }
.nav-submenu a i { font-size: .95rem; color: var(--color-text-muted); }
.nav-submenu .nav-badge {
  margin-left: auto;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0 6px;
  font-size: .65rem; font-weight: 600;
  min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0 7px;
  font-size: .68rem; font-weight: 600;
  min-width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-badge.warn  { background: var(--color-warning); color: #fff; }
.nav-badge.ok    { background: var(--color-success); color: #fff; }
.nav-badge.danger{ background: var(--color-danger);  color: #fff; }

/* sidebar footer (user profile) */
.app-sidebar-foot {
  margin-top: auto;
  padding: var(--space-3) var(--space-2);
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--color-border-soft);
  padding-top: var(--space-4);
}
.app-sidebar-foot .avatar-circle { width: 36px; height: 36px; }
.app-sidebar-foot .name { font-weight: 600; font-size: .9rem; line-height: 1.1; }
.app-sidebar-foot .name small { display: block; font-size: .72rem; color: var(--color-text-muted); font-weight: 500; }

/* =============== MAIN + TOPBAR =============== */
.app-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
}
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border-soft);
  gap: var(--space-4);
}
.app-topbar h1 { margin: 0; font-size: 1.45rem; font-weight: 700;
  color: #055160; /* turquoise, matches the Xilnex card header */ }
.app-topbar .topbar-sub { font-size: .85rem; color: var(--color-text-muted); margin-top: 2px; }
.app-topbar-actions { display: flex; align-items: center; gap: var(--space-2); }

/* 2026-10-11 (ku ai mei, mobile) — the ☰ hamburger in the employer/
   manager topbar matches the staff portal's brand-toggle: a 36px circle
   on the milky indigo gradient with a white glyph. Two-class specificity
   (beats the grey .icon-btn base regardless of order). Colour-only — the
   display rules above own visibility. */
.app-topbar .nav-burger {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-purple);
  border: none;
  color: #fff;
  font-size: 1.15rem;
  padding: 0; flex-shrink: 0;
}
.app-topbar .nav-burger i { color: #fff; }
.app-topbar .nav-burger:hover { background: var(--grad-purple); opacity: .92; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-surface-2);
  border: none;
  color: var(--color-text-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  position: relative;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--color-primary-soft); color: var(--color-primary); }
.icon-btn .notif-dot {
  position: absolute; top: 2px; right: 0px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-surface);
  box-sizing: border-box;
}

.app-content {
  padding: var(--space-6);
  flex: 1 1 auto;
  background: var(--color-surface);
  overflow-y: auto;
}
@media (max-width: 768px) {
  .app-topbar { padding: var(--space-4); }
  .app-content { padding: var(--space-4); }
}

/* =============== STAT TILES (gradient) =============== */
.stat-tile {
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-tile .stat-head { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-tile .stat-label {
  font-size: .82rem;
  opacity: .92;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.stat-tile .stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-top: var(--space-2);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-tile .stat-foot { margin-top: var(--space-3); }
.stat-tile .stat-progress {
  height: 4px;
  background: rgba(255, 255, 255, .22);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.stat-tile .stat-progress-bar { height: 100%; background: rgba(255, 255, 255, .85); border-radius: var(--radius-pill); }
.stat-tile .stat-sub { font-size: .75rem; opacity: .85; margin-top: 6px; }

.stat-tile-grad-purple  { background: var(--grad-purple); }
.stat-tile-grad-blue    { background: var(--grad-blue); }
.stat-tile-grad-amber   { background: var(--grad-amber); }
.stat-tile-grad-pink    { background: var(--grad-pink); }
.stat-tile-grad-emerald { background: var(--grad-emerald); }
.stat-tile-grad-rose    { background: var(--grad-rose); }
.stat-tile-grad-slate   { background: var(--grad-slate); }

.stat-tile .tile-menu {
  background: rgba(255, 255, 255, .25);
  border: none;
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.stat-tile .tile-menu:hover { background: rgba(255, 255, 255, .4); }

/* avatar stack on tiles */
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .av {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 700;
  border: 2px solid currentColor;
  margin-left: -8px;
}
.avatar-stack .av:first-child { margin-left: 0; }
.avatar-stack .av-more { background: rgba(255, 255, 255, .95); color: var(--color-text); font-weight: 700; }

/* =============== CONTENT CARD =============== */
.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.app-card + .app-card { margin-top: var(--space-4); }
.app-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}
/* 2026-10-13 — added for the form.html R9 polish. The OLD Bootstrap
   .card-body class was a padding wrapper inside the .card; this is
   its 1:1 replacement under the new-look .app-card vocabulary.
   Has its own padding so the inner .row g-3 negative margins don't
   bleed into the .app-card's outer padding. */
.app-card-body { padding: 0 var(--space-3) var(--space-3); }
/* 2026-10-13 — soft tinted card-head backgrounds (replaces the
   OLD .card-header .bg-info .text-white / .bg-success / .bg-warning
   / .bg-primary patterns). Defined here once so the page-scoped
   code stays clean. The negative margins pull the strip flush
   to the .app-card edges. */
.app-card-head-soft {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: calc(-1 * var(--space-5)) calc(-1 * var(--space-5)) 0;
  padding: var(--space-3) var(--space-5);
  font-weight: 600;
  color: var(--color-text);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
}
.app-card-head-soft-info    { background: rgba(13,202,240,.10); }
.app-card-head-soft-primary { background: rgba(79,70,229,.10); }
.app-card-head-soft-success { background: rgba(25,135,84,.10); }
.app-card-head-soft-danger  { background: rgba(220,53,69,.10); }
.app-card-head-soft-amber   { background: rgba(255,193,7,.15); }
.app-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
  display: flex; align-items: center; gap: 8px;
}
.app-card-title i { color: var(--color-primary); font-size: 1.1rem; }
.menu-btn {
  background: transparent;
  border: none;
  color: var(--color-text-faint);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.menu-btn:hover { background: var(--color-surface-2); color: var(--color-text); }

/* =============== ACTION ROW (Needs your action) =============== */
.action-row {
  display: flex; align-items: center;
  padding: var(--space-3) 0;
  gap: var(--space-3);
  border-bottom: 1px solid var(--color-border-soft);
}
.action-row:last-child { border-bottom: none; padding-bottom: 0; }
.action-row-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.action-row-icon.warn  { background: var(--color-warning-soft); color: var(--color-warning); }
.action-row-icon.ok    { background: var(--color-success-soft); color: var(--color-success); }
.action-row-icon.danger{ background: var(--color-danger-soft);  color: var(--color-danger); }
.action-row-icon.info  { background: var(--color-info-soft);    color: var(--color-info); }
.action-row-icon.muted { background: var(--color-surface-2);    color: var(--color-text-muted); }
.action-row-body { flex: 1 1 auto; min-width: 0; }
.action-row-body .title { font-weight: 600; font-size: .9rem; color: var(--color-text); }
.action-row-body .sub   { font-size: .8rem; color: var(--color-text-muted); }
.action-row .action-cta { flex-shrink: 0; }

/* =============== PILLS / TOGGLE TABS =============== */
.toggle-pills {
  display: inline-flex;
  background: var(--color-surface-2);
  padding: 4px;
  border-radius: var(--radius-pill);
  gap: 2px;
}
.toggle-pill {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: .82rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.toggle-pill:hover { color: var(--color-text); }
.toggle-pill.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* =============== AVATAR / INITIALS =============== */
.avatar-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--grad-purple);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: .02em;
}
.avatar-circle.av-grad-blue   { background: var(--grad-blue); }
.avatar-circle.av-grad-amber  { background: var(--grad-amber); }
.avatar-circle.av-grad-pink   { background: var(--grad-pink); }
.avatar-circle.av-grad-emerald{ background: var(--grad-emerald); }
.avatar-circle.av-grad-rose   { background: var(--grad-rose); }
.avatar-circle.av-grad-slate  { background: var(--grad-slate); }
.avatar-circle.av-sm { width: 24px; height: 24px; font-size: .68rem; }
.avatar-circle.av-lg { width: 44px; height: 44px; font-size: .95rem; }

/* =============== BANNERS / ALERTS =============== */
/* 2026-10-09 — base banner matches the edit-page card border
   (var(--color-warning-soft), the user's selected series). The
   .warning / .danger / .success / .info variants override for
   semantic meaning (used elsewhere) — the base stays in the
   warm-yellow series so the list page banner reads as part of
   the same colour family as the edit-page card edges. */
.app-banner {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-warning);
  background: var(--color-warning-soft);
  color: var(--color-text);
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.app-banner i.banner-icon { font-size: 1.25rem; color: var(--color-primary); flex-shrink: 0; line-height: 1.4; }
.app-banner-body { flex: 1; min-width: 0; }
.app-banner-body strong { font-weight: 600; color: var(--color-text); }
.app-banner-body small { display: block; color: var(--color-text-soft); font-size: .82rem; margin-top: 2px; }
.app-banner.warning  { background: var(--color-warning-soft); border-left-color: var(--color-warning); }
.app-banner.warning  i.banner-icon { color: var(--color-warning); }
.app-banner.danger   { background: var(--color-danger-soft);  border-left-color: var(--color-danger); }
.app-banner.danger   i.banner-icon { color: var(--color-danger); }
.app-banner.info     { background: var(--color-info-soft);    border-left-color: var(--color-info); }
.app-banner.info     i.banner-icon { color: var(--color-info); }
.app-banner.success  { background: var(--color-success-soft); border-left-color: var(--color-success); }
.app-banner.success  i.banner-icon { color: var(--color-success); }

/* =============== FLASH CHAT BUBBLES (2026-10-01) =============== */
/* Off-day OT note — user correction on Phase A: the default amber warn
   flash clashed with home's missing-docs banner. Rendered as a distinct
   chat-bubble card instead (category=info + inline .chatbubble markup). */
.chatbubble {
  background: var(--color-surface);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 14px 14px 14px 4px;   /* asymmetric — bubble feel */
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 10px 14px;
  margin-bottom: 6px;
  font-size: .82rem;
  color: var(--color-text);
  max-width: 320px;
  line-height: 1.45;
  position: relative;
}
.chatbubble::before {                 /* bubble tail */
  content: "";
  position: absolute;
  left: -6px; top: 12px;
  width: 12px; height: 12px;
  background: inherit;
  border-left: 1px solid var(--color-border, #e5e7eb);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  transform: rotate(45deg);
}
.chatbubble-head {
  font-weight: 700;
  font-size: .78rem;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
}
.chatbubble-offday { background: #eef4ff; border-color: #c7d7f7; }
.chatbubble-offday::before { border-color: #c7d7f7; }
.chatbubble-offday .chatbubble-head { color: #3b5bdb; }
.chatbubble-offday .bi-calendar-x { font-size: .95rem; }

/* 2026-10-05 (correction #12) — EMPLOYER portal pop-out messages render
   as chat-bubble cards (same visual language as the staff portal's
   2026-10-01 skin). The staff layout scopes its rule to .staff-mobile;
   the employer shell gets its own scope so the full-width Bootstrap
   alert look is replaced on every flash toast.
   2026-10-08 redesign — a save on the employee-edit page fires 3+
   toasts at once (summary + eligibility notes + validation warnings)
   and the old stack crammed them against each other at one narrow
   width. The deck is now a staggered conversation: the container is a
   right-anchored flex column with a real 14px gap, each bubble sizes
   to its own text (max 400px), carries a coloured round icon chip, and
   pops in one beat after the last. */
/* 2026-10-10 (user) — deck no longer glued to the top-right corner on
   EMPLOYER pages: it floats on the RIGHT margin, vertically centred
   between the top and bottom margins (24px each side), so Save popouts
   never cover the page head or poke out of frame.
   Non-employer layouts (staff, standalone) keep the original top anchor
   via .chat-flash-anchor (bootstrap's top-0 was removed — its !important
   overrode the centring). */
.position-fixed.chat-flash-anchor { top: 0; }
.app-shell ~ .position-fixed,
.app-shell ~ .employer-chat-flash {
  top: 50%;
  transform: translateY(-50%);
  max-height: calc(100vh - 48px);
}
.app-shell ~ .position-fixed,
.employer-chat-flash {
  display: flex;
  flex-direction: column;
  align-items: flex-end;   /* hug the right edge like a chat deck */
  gap: 14px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.app-shell ~ .position-fixed .alert,
.employer-chat-flash .alert {
  /* 2026-10-10 (user grill Q1=A) — body is BLOCK flow, not a flex row:
     short content stays ONE line ("Profile saved. Updated: Outlet"),
     code briefs flow inline ("BBC053, CT0346, CT0771"), and only content
     wider than the 400px bubble wraps — no vertical-column squeeze. */
  display: block;
  position: relative;
  width: fit-content;
  min-width: 260px;
  max-width: min(400px, calc(100vw - 32px));
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border-soft, #e5e7eb);
  border-radius: 16px 16px 16px 4px;   /* bubble tail bottom-left */
  box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
  padding: 12px 34px 12px 44px;   /* left room for the absolute icon chip */
  font-size: .86rem;
  line-height: 1.5;
  color: var(--color-text, #0F172A);
  margin-bottom: 0;   /* deck gap handles separation (bootstrap adds 1rem) */
  animation: toastpop .3s cubic-bezier(.21, 1.02, .55, 1) both;
}
@keyframes toastpop {
  from { opacity: 0; transform: translateX(26px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
/* staggered pop — each following bubble lands a beat after the last */
.app-shell ~ .position-fixed .alert:nth-child(2) { animation-delay: .08s; }
.app-shell ~ .position-fixed .alert:nth-child(3) { animation-delay: .16s; }
.app-shell ~ .position-fixed .alert:nth-child(4) { animation-delay: .24s; }
.app-shell ~ .position-fixed .alert:nth-child(5) { animation-delay: .32s; }
.app-shell ~ .position-fixed .alert:nth-child(n+6) { animation-delay: .4s; }
/* category icon chip — replaces the old left accent bar; absolutely
   positioned so body text flows one-line-first and wraps only when long */
.app-shell ~ .position-fixed .alert::before,
.employer-chat-flash .alert::before {
  content: "•";
  position: absolute;
  left: 13px;
  top: 13px;
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  background: var(--color-primary, #6366f1);
}
/* 2026-10-11 (user: welcome-back green tick → indigo) — the ✓ chip now
   uses the brand indigo instead of green (applies to every success toast). */
.app-shell ~ .position-fixed .alert-success::before { content: "\2713"; background: var(--color-primary, #6366f1); }  /* ✓ */
.app-shell ~ .position-fixed .alert-danger::before  { content: "\2715"; background: #c0392b; }  /* ✕ */
.app-shell ~ .position-fixed .alert-warning::before { content: "!";     background: #e8a13c; }
.app-shell ~ .position-fixed .alert-info::before    { content: "i";     background: #3b5bdb; }
.app-shell ~ .position-fixed .alert a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.app-shell ~ .position-fixed .alert a:hover { text-decoration: underline; }
.app-shell ~ .position-fixed .btn-close {
  position: absolute;   /* anchor top-right; body text flows independently */
  top: 10px; right: 10px;
  padding: 2px; font-size: .7rem;
}

/* ============================================================
   "info" skill — 2026-10-09 (user: make all popout windows chat-box
   style, opened right beside the 	i symbol).
   Usage: <i class="bi bi-info-circle app-info-btn"
             data-info-title="TITLE"
             data-info="HTML or plain text"></i>
   The JS below (templates render it once per layout) clones the flash
   bubble design and pins the popup beside the trigger, left-anchored,
   with the same tail. */
.app-info-btn {
  cursor: pointer;
  color: var(--color-primary, #6366f1);
  font-size: .95rem;
  line-height: 1;
}
.app-info-btn:hover { color: var(--color-primary-deep, #4f46e5); }
/* 2026-10-10 (user: "apply the new colour range to other tabs too") —
   the clock-tab gradient hero language, reused on the other STAFF tabs'
   lead cards: indigo = info/ready, green = active/hit, amber = PH/on
   break, grey = off/done. */
.staff-hero { border-radius: 14px; padding: 12px 14px; color: #fff; margin-bottom: 12px; }
.staff-hero .sh-big { font-size: 1.02rem; font-weight: 800; }
.staff-hero .sh-sub { font-size: .8rem; opacity: .92; }
.sh-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.sh-green  { background: linear-gradient(135deg, #10b981, #059669); }
.sh-amber  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.sh-grey   { background: linear-gradient(135deg, #64748b, #475569); }
/* 2026-10-10 (user pick: "banners → green, badges → new amber") — the STAFF
   portal drops Bootstrap's yellow for the clock palette:
   • .app-banner.warning strips → On-the-clock GREEN family
   • state badges (Pending / Probation / MC-pending / headers / text-warnings
     / card borders) → the amber family (--color-warning #F59E0B — the SAME
     amber the clock heroes use)
   Scoped to .staff-shell (wrapper div in staff/_layout.html) so the
   EMPLOYER portal keeps its locked warm-yellow banner series. */
.staff-shell .app-banner.warning {
  background: var(--color-success-soft);
  border-left-color: var(--color-success);
}
.staff-shell .app-banner.warning i.banner-icon,
.staff-shell .app-banner.warning .text-warning {
  color: var(--color-success) !important;
}
.staff-shell .badge.bg-warning {
  background-color: var(--color-warning) !important;
  color: #fff !important;
}
.staff-shell .badge.bg-warning.bg-opacity-25 {
  background-color: rgba(245, 158, 11, .25) !important;
  color: #92400e !important;
}
.staff-shell .badge.bg-warning-subtle {
  background-color: var(--color-warning-soft) !important;
  color: #92400e !important;
}
.staff-shell .text-warning { color: #92400e !important; }
.staff-shell .border-warning { border-color: var(--color-warning) !important; }
.staff-shell .card-header.bg-warning {
  background-color: var(--color-warning) !important;
  color: #fff !important;
}
.staff-shell .progress-bar.bg-warning { background-color: var(--color-warning) !important; }
.staff-shell .badge[style*="#ffe0b2"] {
  background: var(--color-warning-soft) !important; color: #92400e !important;
}
.staff-shell .amb-card { border-left-color: var(--color-warning) !important; }
/* 2026-10-10 (user: "apply the clock tab's colour palette family, font type,
   button design with font colour to the whole staff portal — widely indigo")
   — the clock tab's design language, scoped to .staff-shell:
   • every .btn takes the clock-tab shape — rounded 12px, semibold; the
     clock tab's own .clk-btn keeps its exact 14px/700 via :not() guard
   • filled Bootstrap buttons re-ink to the CLOCK palette: success →
     on-the-clock green #10B981, danger → red #EF4444, warning → clock
     amber; primary stays theme indigo (already themed globally)
   • indigo, widely: bg-primary badges + text-primary become the theme
     indigo (not Bootstrap blue); card headers/section titles go indigo ink
     and semibold-bold like the clock hero's big line; form labels semibold */
.staff-shell .btn:not(.clk-btn) { border-radius: 12px; font-weight: 600; }
.staff-shell .btn-app { border-radius: 12px; }
.staff-shell .btn-primary:not(.clk-btn),
.staff-shell .btn-app-primary {
  background-image: linear-gradient(135deg, #6366f1, #4f46e5);
  font-weight: 700;
}
.staff-shell .btn-primary:not(.clk-btn):hover,
.staff-shell .btn-app-primary:hover {
  background-image: linear-gradient(135deg, #4f46e5, #4338ca);
}
.staff-shell .badge.bg-primary {
  background: var(--color-primary) !important;
  background-image: linear-gradient(135deg, #6366f1, #4f46e5) !important;
  color: #fff !important;
}
.staff-shell .btn-success { background: var(--color-success); border-color: var(--color-success); }
.staff-shell .btn-success:hover { background: #059669; border-color: #059669; }
.staff-shell .btn-danger { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
.staff-shell .btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.staff-shell .btn-warning { background: var(--color-warning); border-color: var(--color-warning); color: #fff; }
.staff-shell .btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }
.staff-shell .text-primary { color: var(--color-primary) !important; }
.staff-shell .card-header { color: var(--color-primary-ink); font-weight: 700; }
.staff-shell .app-card-title { color: var(--color-primary-ink); font-weight: 700; }
.staff-shell .form-label { font-weight: 600; }
/* 2026-10-10 (user grill) — while its bubble is open, the trigger (i chip
   OR absorbed title= host) carries an indigo ring + soft indigo fill so
   the bubble is never ambiguous on rows full of colour pills. */
.app-info-open {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .45);
  background-color: #eef2ff;
  border-radius: 6px;
  transition: background-color .15s ease;
}
.app-info-pop {
  position: absolute;          /* pinned by JS against the trigger */
  z-index: 1085;
  width: fit-content;
  min-width: 220px;
  max-width: min(380px, calc(100vw - 32px));
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-primary, #6366f1);   /* indigo line (user 2026-10-09) */
  border-radius: 16px 16px 16px 4px;   /* bubble tail bottom-left */
  box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
  padding: 12px 14px;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--color-text, #0F172A);
  animation: toastpop .25s cubic-bezier(.21, 1.02, .55, 1) both;
}
.app-info-pop .app-info-pop-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
  font-weight: 700;
}
.app-info-pop .app-info-pop-head::before {
  content: "i";
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  background: var(--color-primary, #6366f1);
}
.app-info-pop .btn-close { position: static; padding: 2px 2px 0 6px; font-size: .65rem; }
/* ============================================================ */

/* 2026-10-07 — invite popout card used after the employer saves a new
   employee: header line (name + role + tick), stacked WhatsApp / Telegram
   buttons (full-width), and the temp password on its own line so the
   popup fits the design instead of cramming one line of inline buttons
   into the standard narrow alert. */
.position-fixed .invite-popout {
  display: block;
  width: auto;
  min-width: 260px;
  max-width: min(400px, calc(100vw - 32px));
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border-soft, #e5e7eb);
  border-left: none;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
  padding: 12px 14px 14px;
  margin-bottom: 0;   /* deck gap handles separation */
  color: var(--color-text, #0F172A);
  font-size: .88rem;
  line-height: 1.45;
  animation: toastpop .3s cubic-bezier(.21, 1.02, .55, 1) both;
}
/* the deck's flex column uses a 14px gap — the invite card sits in the
   same stack, so no extra margin here. */
.position-fixed .invite-popout-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #1b5e20;
  margin-bottom: 10px;
}
/* green-tick chip consistent with the alert icon chips */
.position-fixed .invite-popout-header::before {
  content: "\2713";
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  background: #2f9e44;
}
.position-fixed .invite-popout-header i { display: none; }  /* replaced by chip */
.position-fixed .invite-popout-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.position-fixed .invite-popout-body .btn { font-weight: 500; }
.position-fixed .invite-popout-pw {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border-soft, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.position-fixed .invite-popout-pw code {
  background: var(--color-surface-2, #F1F5F9);
  border: 1px solid var(--color-border-soft, #e5e7eb);
  padding: 2px 8px;
  border-radius: var(--radius-sm, 6px);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: .92rem;
  color: var(--color-text, #0F172A);
  user-select: all;
}

/* =============== STAT CARDS (simple white, employer-dashboard style) =============== */
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  box-shadow: var(--shadow-xs);
}
.stat-card .label { font-size: .78rem; color: var(--color-text-muted); }
.stat-card .value { font-size: 1.6rem; font-weight: 700; color: var(--color-text); margin-top: 4px; }

/* =============== TABLE (modernized) =============== */
.app-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.app-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-text-muted);
  padding: var(--space-3);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border-soft);
}
.app-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border-soft);
  font-size: .9rem;
  color: var(--color-text-soft);
}
.app-table tbody tr:last-child td { border-bottom: none; }
.app-table tbody tr:hover td { background: var(--color-surface-2); }

/* =============== BUTTON ENHANCEMENTS =============== */
.btn-app {
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-weight: 600;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
}
.btn-app-primary { background: var(--color-primary); color: #fff; }
.btn-app-primary:hover { background: var(--color-primary-hover); color: #fff; }
.btn-app-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-app-outline:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-app-ghost { background: transparent; color: var(--color-text-muted); }
.btn-app-ghost:hover { background: var(--color-surface-2); color: var(--color-text); }
.btn-app-danger { background: var(--color-danger); color: #fff; }
.btn-app-danger:hover { background: #DC2626; color: #fff; }
.btn-app-success { background: var(--color-success); color: #fff; }

/* =============== STAFF PORTAL (mobile-first, matching aesthetic) =============== */
.staff-shell {
  /* 2026-10-07 (#2 responsive) — phone-first container now widens on
     bigger screens so the portal stops looking phone-narrow in a
     desktop browser. The staff layouts' Bootstrap col-md/col-lg grids
     get real room; phone layout is untouched (this change is desktop-
     only media-query work). */
  max-width: 480px;
  margin: 16px auto;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  /* 2026-10-10 (user: "always show the bottom menu bar on screen") —
     overflow must NOT be hidden: overflow: hidden makes .staff-shell a
     scroll container, so .staff-bottomnav's position: sticky; bottom: 0
     computed against the shell's never-scrolling box and the bottom nav
     scrolled away with the page. overflow: clip clips to the rounded
     corners identically but is NOT a scroll container, so the sticky
     bottom nav pins to the real viewport again. `hidden` above stays
     as a fallback for engines without clip support. */
  overflow: hidden;
  overflow: clip;
  min-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
}
@media (max-width: 520px) {
  .staff-shell { margin: 0; border-radius: 0; min-height: 100vh; box-shadow: none; }
}

/* 2026-10-07 (#2 responsive) — desktop widening ladder. Base stays the
   480px phone container; ≥768px mirrors the employer .app-shell margin,
   and ≥1200px steps up to an 1160px container so multi-column grids
   (col-md/col-lg in profile, claim, availability etc.) breathe. */
@media (min-width: 768px) {
  .staff-shell { max-width: 720px; margin: 16px auto; }
}
@media (min-width: 1200px) {
  .staff-shell { max-width: 1160px; margin: 16px auto; }
}
.staff-topbar {
  background: var(--color-surface);
  padding: var(--space-4);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--color-border-soft);
  gap: var(--space-2);
}
.staff-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.staff-brand-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-purple);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.staff-brand-text { font-weight: 700; font-size: .98rem; line-height: 1.1; min-width: 0; }
.staff-brand-text small {
  display: block;
  font-size: .68rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.staff-content {
  flex: 1 1 auto;
  padding: var(--space-4);
  background: var(--color-surface-alt);
  overflow-y: auto;
  /* 2026-09-21 (grill Q1=C) — bumped to 16px base to match universal
     mobile-app standard (WCAG minimum + Material Design 3 + iOS HIG
     converge at 16-17px). Headings scaled up proportionally for
     hierarchy. Small/.small nudged to .875rem (~14px) for readable
     but still-secondary labels. */
  font-size: 16px;
}
.staff-content h1 { font-size: 1.6rem; }
.staff-content h2 { font-size: 1.35rem; }
.staff-content h3 { font-size: 1.15rem; }
.staff-content small,
.staff-content .small { font-size: .875rem; }

.staff-bottomnav {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-soft);
  display: flex; justify-content: space-around;
  padding: 6px 4px;
  position: sticky; bottom: 0;
}
.staff-bottomnav-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 4px 6px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: .65rem;
  font-weight: 500;
  min-width: 50px;
  border-radius: var(--radius-md);
}
.staff-bottomnav-item i { font-size: 1.15rem; margin-bottom: 2px; }
.staff-bottomnav-item:hover { color: var(--color-text); }
.staff-bottomnav-item.active { color: var(--color-primary); }
.staff-bottomnav-item.active i { color: var(--color-primary); }

/* Mobile readability overrides (preserve 2026-09-05 staff-mobile tweaks) */
.staff-shell main, .staff-mobile main { font-size: 1rem; }
.staff-mobile main .form-control,
.staff-mobile main .form-select { font-size: 1rem; min-height: 44px; }
.staff-mobile main .btn { min-height: 42px; font-size: .95rem; }

/* =============== MISC =============== */
.bg-purple-ph { background: #F3E5F5 !important; }   /* keep PH tint */
.bg-purple-ph-text { color: #4A148C !important; }
.bg-teal-break { background: #E0F2F1 !important; }
.bg-teal-break-text { color: #00695C !important; }
.bg-ot-card { background: #FFF8E1 !important; }
.bg-ot-card-text { color: #E65100 !important; }

/* 2026-09-25 — sup arrange Tag/✕/Remove now use inline badge-style
   classes in the template (Bootstrap .badge + per-button styles), so
   the standalone .sup-row-btn block was removed. */

.text-muted { color: var(--color-text-muted) !important; }
.text-soft  { color: var(--color-text-soft) !important; }
.text-faint { color: var(--color-text-faint) !important; }

.late-highlight { color: var(--color-danger); font-weight: 600; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
}
.empty-state i { font-size: 2.5rem; opacity: .4; display: block; margin-bottom: var(--space-3); }
.empty-state .title { color: var(--color-text); font-weight: 600; margin-bottom: 4px; }

/* Page header (for templates without the topbar slot) */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-5); gap: var(--space-3); flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 1.5rem; color: #055160; font-weight: 700; }
.page-head h2 { margin: 0; font-size: 1.2rem; color: #055160; font-weight: 600; }
.page-head .actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* 2026-10-08 — standardised memo body preview across listing rows.
   Sized to read comfortably between the title (full) and the muted
   action column (.82rem); matches the memos_reads detail view. */
.memo-body-preview { font-size: .9rem; line-height: 1.4; }

/* Soft cards for legacy .card elements — preserve while we migrate */
.card-header { border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; }

/* =============== APP DRAWER (mobile side drawer, Q3=B overflow) ===============
   2026-09-21 (grill) — top-left brand icon opens this slide-in drawer
   holding the overflow tabs (the ones that don't fit in the 6-tab
   bottom nav). Closes on overlay click or Escape key. */
.app-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.app-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.app-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85%;
  background: var(--color-surface);
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform .25s ease;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.app-drawer.open { transform: translateX(0); }

.app-drawer-header {
  padding: var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--color-border-soft);
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-drawer-header .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app-drawer-header .brand-info { min-width: 0; }
.app-drawer-header .brand-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.2;
}
.app-drawer-header .brand-tag {
  font-size: .78rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

/* 2026-10-12 (user) — drawer identity card. Same logo + thick-bold
   name + outlet structure as the topbar .stb-* set. The drawer
   surface is var(--color-surface) (white) — same as the topbar —
   so the name + outlet colours match the topbar's (navy / grey)
   rather than the dark-navy palette I first shipped. The milky-
   indigo glyph fallback reads on white. */
.app-drawer-header .stb-logo-slot {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-drawer-header .stb-logo-img {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid rgba(255,255,255,.2);
  object-fit: contain;
  display: block;
}
.app-drawer-header .stb-logo-glyph {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: linear-gradient(135deg, #EEF0FE, #c7d2fe);
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}
.app-drawer-header .stb-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 2px;
  line-height: 1.1;
}
.app-drawer-header .stb-name {
  font-size: 16px;
  font-weight: 900;
  color: #0F2044;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.05;
}
.app-drawer-header .stb-outlet {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-drawer-body { padding: var(--space-3) 0; flex: 1 1 auto; }

.app-drawer-section-label {
  padding: var(--space-4) var(--space-4) var(--space-1);
  font-size: .72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.app-drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  color: var(--color-text-soft);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.app-drawer-item:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}
.app-drawer-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-ink);
  font-weight: 600;
  border-left-color: var(--color-primary);
}
.app-drawer-item i {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.app-drawer-item.active i { color: var(--color-primary); }
.app-drawer-item .nav-badge {
  margin-left: auto;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 0 7px;
  font-size: .68rem;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.app-drawer-item .nav-badge.warn { background: var(--color-warning); }

.app-drawer-foot {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border-soft);
  font-size: .82rem;
  color: var(--color-text-muted);
}

/* Make the top-bar brand button clickable on mobile (the hamburger trigger) */
.staff-topbar .staff-brand-toggle {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.staff-topbar .staff-brand-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: var(--radius-md);
}

/* ============================================================================
   Staff topbar — identity card (2026-10-12, user build)
   Replaces the old "Payroll / header_label" with: outlet's company logo
   (or bi-buildings fallback) + thick-bold staff name + outlet in grey.
   The whole left block stays the hamburger drawer trigger (clicking the
   logo+name opens the same .app-drawer as before).

   Lives in payroll-theme.css because that file already owns the host
   .staff-topbar block; rules are additive and scoped to .staff-topbar.stb
   so the existing kcek / non-new-look chrome keeps working.
   ========================================================================== */
.staff-topbar.stb {
  padding: 8px 12px 9px;
  gap: 8px;
}
.staff-topbar.stb .stb-toggle {
  gap: 4px;          /* 2026-10-12 (user) — name sits closer to the logo */
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
.staff-topbar.stb .stb-toggle:hover { background: #F8FAFC; }
.staff-topbar.stb .stb-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 10px;
}
.staff-topbar.stb .stb-logo-slot {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Outlet's actual company logo — Outlet.logo_filename (Phase 26) served
   via /uploads/letter_logos/<fname>. White tile + soft border so any
   brand colour reads on top, object-fit:contain keeps the aspect. */
.staff-topbar.stb .stb-logo-img {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid #e5e7eb;
  object-fit: contain;
  display: block;
}
/* Fallback when the outlet has no logo uploaded — soft indigo tile with
   the bi-buildings glyph. Guarantees no blank 38px square ever shows. */
.staff-topbar.stb .stb-logo-glyph {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #EEF0FE, #c7d2fe);
  color: #4f46e5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}
.staff-topbar.stb .stb-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 2px;     /* 2026-10-12 (user) — name closer to the logo */
  line-height: 1.1;
}
.staff-topbar.stb .stb-name {
  font-size: 16px;
  font-weight: 900;     /* "thick thick bold" per the user ask */
  color: #0F2044;
  letter-spacing: -.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.05;
}
.staff-topbar.stb .stb-outlet {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;       /* grey, per the user ask */
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The new-look skin's topbar already paints white + 1px border; nothing
   to override. The bell button keeps the existing .icon-btn styling. */

/* ============================================================
   2026-10-13 — employer-portal polish vocabulary
   Lifted from the page-scoped <style> blocks that lived in:
     - templates/schedule/grid.html (origin, 50+ lines)
     - templates/employer/employees/form.html
     - templates/employer/employees/list.html
     - templates/employer/assets.html
     - templates/employer/policy.html
   So ALL employer/manager templates that adopt these classes get the
   styles automatically. Side benefit: /employer/salary R1 (5fb52ce)
   uses these classes but has no page-scoped <style> block — was
   rendering with unstyled chips/forms on the live page until now.
   Namespaced .emp-chip-* / .emp-form-* so cannot collide with the
   staff portal's own .chip / .form-control classes.
   ============================================================ */
.emp-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; line-height: 1.5;
  margin-left: 4px; white-space: nowrap;
  vertical-align: baseline;
}
.emp-chip-amber        { background: #fef3c7; color: #92400e; }
.emp-chip-amber-solid  { background: #d97706; color: #fff; }
.emp-chip-red          { background: #fee2e2; color: #991b1b; }
.emp-chip-red-solid    { background: #b91c1c; color: #fff; }
.emp-chip-green        { background: #dcfce7; color: #166534; }
.emp-chip-blue         { background: #dbeafe; color: #1e40af; }
.emp-chip-grey         { background: #f1f5f9; color: #475569; }
.emp-form-input,
.emp-form-select {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13.5px;
  background: #fff;
  min-height: 36px;
  color: #0F2044;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.emp-form-input:focus,
.emp-form-select:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.emp-form-input::placeholder { color: #94a3b8; }
.emp-form-input { width: 100%; }
.emp-form-select { width: 100%; padding-right: 32px; }
.emp-form-label {
  font-size: 12px; font-weight: 600; color: #475569;
}
.sch-filters {
  display: flex; gap: 12px; align-items: end;
  flex-wrap: wrap; margin-bottom: 14px;
}
.sch-filters > div { min-width: 160px; }
.sch-filters .emp-form-select { min-width: 240px; }
.sch-filters .emp-form-input { min-width: 160px; }
.sch-filters .ms-auto { margin-left: auto; }
