/* HR Manager Pro — design system
 * Brand: orange #f47d31 / charcoal #191c1d / canvas #f8f9fa
 * Inter (sans) + JetBrains Mono (data)
 */

/* ──────────────────────────────────────────── Tokens ─── */
:root {
  --surface:                 #f8f9fa;
  --surface-dim:             #d9dadb;
  --surface-bright:          #f8f9fa;
  --surface-container-lowest:#ffffff;
  --surface-container-low:   #f3f4f5;
  --surface-container:       #edeeef;
  --surface-container-high:  #e7e8e9;
  --surface-container-highest:#e1e3e4;
  --on-surface:              #191c1d;
  --on-surface-variant:      #574238;
  --inverse-surface:         #2e3132;
  --inverse-on-surface:      #f0f1f2;
  --outline:                 #8a7266;
  --outline-variant:         #dec1b3;
  --primary:                 #9c4400;
  --primary-active:          #f47d31;
  --primary-hover:           #db6c25;
  --on-primary:              #ffffff;
  --primary-container:       #f47d31;
  --primary-soft:            #ffe9d7;
  --on-primary-soft:         #5c2500;

  --secondary:               #5f5e5e;
  --tertiary:                #555f6d;
  --tertiary-soft:            #d9e3f4;

  --error:                   #ba1a1a;
  --error-container:         #ffdad6;
  --on-error-container:      #93000a;
  --warning:                 #b45309;
  --warning-soft:            #fef3c7;
  --success:                 #15803d;
  --success-soft:            #dcfce7;

  --sidebar-bg:              #191c1d;
  --sidebar-fg:              #c8c6c5;
  --sidebar-fg-active:       #ffffff;
  --sidebar-section:         #6b7176;

  --border:                  #e5e7eb;
  --border-strong:           #d1d5db;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.10);

  --radius-sm: 2px;
  --radius:    4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  --space-xs: 4px;
  --space-sm: 12px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;

  --sidebar-w: 248px;
  --header-h: 64px;
  --bottom-nav-h: 64px;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, 'Liberation Mono', monospace;
}

/* ──────────────────────────────────────────── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
input, select, textarea, button { font: inherit; color: inherit; }
::selection { background: var(--primary-soft); }

/* ──────────────────────────────────────────── Type ─── */
.text-display    { font-size: 36px; font-weight: 700; line-height: 44px; letter-spacing: -0.02em; }
.text-headline   { font-size: 24px; font-weight: 600; line-height: 32px; letter-spacing: -0.01em; }
.text-title      { font-size: 18px; font-weight: 600; line-height: 24px; }
.text-body       { font-size: 16px; font-weight: 400; line-height: 24px; }
.text-body-sm    { font-size: 14px; font-weight: 400; line-height: 20px; }
.text-label      { font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--on-surface-variant); }
.text-mono       { font-family: var(--font-mono); font-size: 13px; font-weight: 450; line-height: 18px; }
.text-muted      { color: var(--on-surface-variant); }
.text-strong     { font-weight: 600; }
.text-primary    { color: var(--primary-active); }
.text-error      { color: var(--error); }
.text-success    { color: var(--success); }
.text-warn       { color: var(--warning); }
.text-center     { text-align: center; }
.text-right      { text-align: right; }
.truncate        { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ──────────────────────────────────────────── Layout ─── */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.main-area { display: flex; flex-direction: column; min-width: 0; }
.app-header {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-md);
  display: flex; align-items: center; gap: var(--space-md);
  position: sticky; top: 0; z-index: 30;
}
.app-content { padding: var(--space-md) var(--space-md) var(--space-lg); flex: 1; }

/* Sidebar */
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  display: flex; flex-direction: column;
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  padding: var(--space-md) 0;
}
.sidebar__brand {
  padding: 0 var(--space-md) var(--space-md);
  display: flex; align-items: center; gap: 12px;
}
.sidebar__brand-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-active);
  color: #fff; font-weight: 700;
  display: grid; place-items: center;
  flex-shrink: 0; overflow: hidden;
}
.sidebar__brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.sidebar__brand-mark--logo { background: transparent; border-radius: 8px; overflow: visible; }
.sidebar__brand-mark--logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.sidebar__brand-name { color: #fff; font-weight: 700; font-size: 18px; line-height: 1.2; }
.sidebar__brand-sub  { font-size: 12px; color: var(--sidebar-section); }
.sidebar__cta { padding: 0 var(--space-md) var(--space-sm); }
.sidebar__nav { flex: 1; padding: var(--space-sm) var(--space-sm); display: flex; flex-direction: column; gap: 2px; }
.sidebar__section { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--sidebar-section); padding: 12px 12px 6px; text-transform: uppercase; }
.sidebar__link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--sidebar-fg);
  font-size: 14px; font-weight: 500;
  position: relative;
  transition: background .15s ease, color .15s ease;
}
.sidebar__link:hover { background: rgba(255,255,255,.04); color: #fff; }
.sidebar__link.is-active { background: rgba(255,255,255,.06); color: #fff; }
.sidebar__link.is-active::before {
  content: ''; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 3px;
  background: var(--primary-active); border-radius: 0 2px 2px 0;
}
.sidebar__link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar__footer { padding: var(--space-sm) var(--space-sm); display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255,255,255,.06); }

/* Top header bits */
.app-header__title { font-weight: 700; font-size: 18px; flex-shrink: 0; }
.app-header__search {
  flex: 1; max-width: 480px;
  background: var(--surface-container-low);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 8px 12px 8px 36px;
  font-size: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2374797d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
  outline: none;
}
.app-header__search:focus { background-color: #fff; border-color: var(--primary-active); }
.app-header__icons { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius);
  display: grid; place-items: center; color: var(--on-surface-variant);
  background: transparent; border: 0; position: relative;
}
.icon-btn:hover { background: var(--surface-container-low); color: var(--on-surface); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary-active); }
.app-header__divider { width: 1px; height: 24px; background: var(--border); }
.app-header__avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--surface-container); display: grid; place-items: center; font-weight: 700; color: var(--on-surface-variant); }
.app-header__avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ──────────────────────────────────────────── Page ─── */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-md); margin-bottom: var(--space-md); flex-wrap: wrap; }
.page-title { font-size: 32px; font-weight: 700; line-height: 40px; letter-spacing: -0.01em; margin: 0 0 4px; }
.page-subtitle { color: var(--on-surface-variant); font-size: 14px; margin: 0; }

/* ──────────────────────────────────────────── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; min-height: 40px;
  font-size: 14px; font-weight: 600;
  border-radius: var(--radius); border: 1px solid transparent;
  background: transparent; color: inherit;
  cursor: pointer; transition: background .15s ease, transform .05s ease, box-shadow .15s ease, color .15s ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--primary-active); outline-offset: 2px; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--primary-active); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); }
.btn--secondary { background: #fff; color: var(--on-surface); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--surface-container-low); }
.btn--ghost { background: transparent; color: var(--on-surface); }
.btn--ghost:hover { background: var(--surface-container-low); color: var(--primary-active); }
.btn--danger { background: var(--error); color: #fff; }
.btn--danger:hover { filter: brightness(.92); }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.btn--lg { padding: 12px 20px; min-height: 48px; font-size: 15px; }
.btn[disabled], .btn.is-disabled { opacity: .6; pointer-events: none; }

/* Sidebar primary CTA (orange) */
.sidebar__cta .btn--primary { width: 100%; }
.sidebar__cta-secondary {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.16);
}
.sidebar__cta-secondary:hover { background: rgba(255,255,255,.06); }

/* ──────────────────────────────────────────── Cards ─── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}
.card--flush { padding: 0; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: var(--space-sm); }
.card__title { font-size: 18px; font-weight: 600; margin: 0; }
.card__sub { font-size: 13px; color: var(--on-surface-variant); margin: 4px 0 0; }
.card__body { }

/* ──────────────────────────────────────────── Stat tiles ─── */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__label { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--on-surface); font-weight: 600; }
.stat__icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--on-surface-variant); }
.stat__value { font-size: 36px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; display: inline-flex; align-items: baseline; gap: 8px; }
.stat__delta { font-size: 13px; color: var(--primary-active); font-weight: 600; }
.stat__sub { font-size: 13px; color: var(--on-surface-variant); }

/* ──────────────────────────────────────────── Forms ─── */
.form-grid { display: grid; gap: var(--space-md); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) { .form-row, .form-row--3 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12px; font-weight: 600; color: var(--on-surface-variant); letter-spacing: 0.04em; text-transform: uppercase; }
.field__control,
.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-size: 14px; color: var(--on-surface);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
  min-height: 40px;
  font-family: inherit;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--primary-active); border-width: 2px; padding: 9px 11px;
}
textarea.input { min-height: 96px; resize: vertical; }
.field--error .input { border-color: var(--error); }
.field__hint { font-size: 12px; color: var(--on-surface-variant); }
.field__error { font-size: 12px; color: var(--error); font-weight: 500; }
.checkbox, .radio { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.checkbox input, .radio input { width: 16px; height: 16px; accent-color: var(--primary-active); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--on-surface-variant); border-bottom: 2px solid var(--on-surface-variant);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select-wrap select { appearance: none; padding-right: 32px; }

/* Filters bar */
.filters {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: var(--space-md);
  align-items: end;
  margin-bottom: var(--space-md);
}
@media (max-width: 960px) { .filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .filters { grid-template-columns: 1fr; } }
.tabs-pill {
  display: inline-flex; background: var(--surface-container-low); border-radius: var(--radius); padding: 3px; gap: 2px;
}
.tabs-pill__btn { padding: 6px 14px; border: 0; background: transparent; border-radius: 3px; font-size: 13px; font-weight: 500; color: var(--on-surface-variant); }
.tabs-pill__btn.is-active { background: #fff; color: var(--on-surface); box-shadow: var(--shadow-sm); }

/* ──────────────────────────────────────────── Tables ─── */
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--on-surface-variant);
  padding: 14px 20px; background: var(--surface-container-low);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
}
.table tbody td { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: var(--surface-container-low); cursor: pointer; }
.table--zebra tbody tr:nth-child(even) { background: var(--surface-container-low); }
.table__user { display: flex; align-items: center; gap: 12px; }
.table__user-meta { display: flex; flex-direction: column; }
.table__user-meta b { font-weight: 600; color: var(--on-surface); }
.table__user-meta small { font-size: 12px; color: var(--on-surface-variant); }
.table__date { font-family: var(--font-mono); font-size: 13px; color: var(--on-surface); }

/* Pagination */
.pagination { display: flex; gap: 6px; align-items: center; margin-top: var(--space-md); justify-content: flex-end; }
.pagination__info { color: var(--on-surface-variant); font-size: 13px; margin-right: auto; }
.pagination__btn { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); background: #fff; border-radius: var(--radius); font-size: 13px; font-weight: 500; color: var(--on-surface); }
.pagination__btn:hover { background: var(--surface-container-low); }
.pagination__btn.is-active { background: var(--surface-container); border-color: var(--border-strong); }
.pagination__btn[disabled] { opacity: .5; pointer-events: none; }

/* ──────────────────────────────────────────── Avatar ─── */
.avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--surface-container); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--on-surface-variant); flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 64px; height: 64px; font-size: 18px; }
.avatar--xl { width: 104px; height: 104px; font-size: 28px; }

/* ──────────────────────────────────────────── Status chips ─── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--surface-container);
  color: var(--on-surface);
}
.chip--active   { background: #dbeafe; color: #1e40af; }
.chip--onboard  { background: #ffe9d7; color: #9a3412; }
.chip--leave    { background: #fee2e2; color: #991b1b; }
.chip--remote   { background: #fdebd6; color: #b35314; }
.chip--terminated{ background: #e5e7eb; color: #374151; }
.chip--success  { background: var(--success-soft); color: var(--success); }
.chip--warning  { background: var(--warning-soft); color: var(--warning); }
.chip--error    { background: var(--error-container); color: var(--on-error-container); }
.chip--neutral  { background: var(--surface-container); color: var(--on-surface); }

/* ──────────────────────────────────────────── Banners / Alerts ─── */
.banner { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; font-size: 14px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: var(--space-sm); }
.banner--success { background: var(--success-soft); border-color: #bbf7d0; color: #14532d; }
.banner--error   { background: var(--error-container); border-color: #fecaca; color: var(--on-error-container); }
.banner--warn    { background: var(--warning-soft); border-color: #fde68a; color: #78350f; }
.banner--info    { background: #e0f2fe; border-color: #bae6fd; color: #075985; }

/* ──────────────────────────────────────────── Grids ─── */
.grid { display: grid; gap: var(--space-md); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-aux { grid-template-columns: 1fr 360px; align-items: start; gap: var(--space-md); }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: repeat(2,1fr); } .grid-aux { grid-template-columns: 1fr; } }
@media (max-width: 720px)  { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

/* ──────────────────────────────────────────── Activity feed ─── */
.feed { display: flex; flex-direction: column; }
.feed__item { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.feed__item:last-child { border-bottom: 0; }
.feed__icon { width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; background: var(--surface-container-low); color: var(--on-surface-variant); }
.feed__icon--orange { background: var(--primary-soft); color: var(--primary-active); }
.feed__icon--red    { background: var(--error-container); color: var(--on-error-container); }
.feed__icon--blue   { background: #dbeafe; color: #1e40af; }
.feed__title { font-size: 14px; }
.feed__time  { font-size: 12px; color: var(--on-surface-variant); margin-top: 2px; }

/* ──────────────────────────────────────────── Profile header (employee detail) ─── */
.profile-card { display: grid; grid-template-columns: 116px 1fr auto; gap: 20px; align-items: center; padding: 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.profile-card__name { font-size: 28px; font-weight: 700; line-height: 32px; display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-card__sub  { color: var(--on-surface-variant); font-size: 14px; margin-top: 4px; }
.profile-card__loc  { color: var(--on-surface-variant); font-size: 13px; margin-top: 2px; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 720px) { .profile-card { grid-template-columns: 80px 1fr; } .profile-card__name { font-size: 22px; line-height: 28px; } }

.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-top: var(--space-md); margin-bottom: var(--space-md); }
.tabs__btn { padding: 12px 0; background: transparent; border: 0; border-bottom: 2px solid transparent; font-weight: 500; font-size: 14px; color: var(--on-surface-variant); }
.tabs__btn.is-active { border-color: var(--primary-active); color: var(--primary-active); font-weight: 600; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.kv__item .kv__label { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--on-surface-variant); margin-bottom: 4px; }
.kv__item .kv__value { font-size: 14px; }
.kv__item .kv__value.mono { font-family: var(--font-mono); font-size: 13px; }
@media (max-width: 720px) { .kv { grid-template-columns: 1fr; } }

/* ──────────────────────────────────────────── Modal ─── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,15,15,.34); backdrop-filter: blur(8px); z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 560px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; }
.modal__head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal__title { margin: 0; font-size: 18px; font-weight: 600; }
.modal__body { padding: 24px; overflow: auto; }
.modal__foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ──────────────────────────────────────────── Mobile ─── */
.mobile-header, .mobile-bottom-nav, .mobile-fab { display: none; }
.sidebar__overlay { display: none; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.is-open { display: flex; position: fixed; inset: 0; z-index: 90; width: 280px; height: 100vh; box-shadow: var(--shadow-lg); }
  .sidebar__overlay { display: none; }
  .sidebar.is-open + .sidebar__overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 89; }

  .app-header { display: none; }
  .mobile-header {
    display: flex; align-items: center; gap: 12px;
    height: 64px; background: #fff; border-bottom: 1px solid var(--border);
    padding: 0 16px; position: sticky; top: 0; z-index: 30;
  }
  .mobile-header__title { font-weight: 700; font-size: 22px; flex: 1; }
  .mobile-menu-btn { width: 40px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; }

  .app-content { padding: 16px 16px calc(var(--bottom-nav-h) + 32px); }
  .page-title { font-size: 24px; line-height: 30px; }

  .filters { grid-template-columns: 1fr; }

  .grid-aux { grid-template-columns: 1fr; }

  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-h);
    background: #fff;
    border-top: 1px solid var(--border);
    z-index: 40;
  }
  .mobile-bottom-nav__btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 11px; color: var(--on-surface-variant); background: transparent; border: 0;
    text-decoration: none;
    position: relative;
  }
  .mobile-bottom-nav__btn svg { width: 22px; height: 22px; }
  .mobile-bottom-nav__btn.is-active { color: var(--primary-active); }
  .mobile-bottom-nav__btn.is-active::before {
    content: ''; position: absolute; top: -1px; left: 30%; right: 30%; height: 3px; background: var(--primary-active); border-radius: 0 0 4px 4px;
  }
  .mobile-bottom-nav__btn.is-active .mobile-bottom-nav__chip {
    background: var(--primary-soft); color: var(--primary-active);
  }
  .mobile-bottom-nav__chip {
    width: 36px; height: 28px; border-radius: 14px; display: grid; place-items: center;
  }

  .mobile-fab {
    display: grid; place-items: center;
    position: fixed; right: 20px; bottom: calc(var(--bottom-nav-h) + 16px);
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--primary-active); color: #fff; box-shadow: var(--shadow-lg);
    border: 0; z-index: 41;
  }
  .mobile-fab svg { width: 22px; height: 22px; }
}

/* ──────────────────────────────────────────── Auth pages ─── */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--surface); }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; max-width: 420px; width: 100%; box-shadow: var(--shadow-md); }
.auth-card__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-card__title { font-size: 22px; font-weight: 700; margin: 0; }
.auth-card__sub { color: var(--on-surface-variant); font-size: 14px; margin: 4px 0 24px; }

/* ──────────────────────────────────────────── Misc ─── */
.divider { height: 1px; background: var(--border); margin: var(--space-md) 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); } .gap-sm { gap: var(--space-sm); } .gap-md { gap: var(--space-md); }
.mt-sm { margin-top: var(--space-sm); } .mt-md { margin-top: var(--space-md); } .mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); } .mb-md { margin-bottom: var(--space-md); }
.hidden { display: none !important; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--primary-active); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-container-low), var(--surface-container), var(--surface-container-low)); background-size: 200% 100%; animation: skl 1.2s linear infinite; border-radius: var(--radius); }
@keyframes skl { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Login link */
.link { color: var(--primary-active); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* Document tile */
.doc-tile { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-container-low); align-items: center; }
.doc-tile__icon { width: 40px; height: 40px; border-radius: var(--radius); background: #dbeafe; color: #1e40af; display: grid; place-items: center; flex-shrink: 0; }
.doc-tile__meta { flex: 1; min-width: 0; }
.doc-tile__title { font-weight: 600; font-size: 14px; }
.doc-tile__sub   { font-size: 12px; color: var(--on-surface-variant); }

/* Bar chart (pure CSS) */
.bars { display: grid; grid-template-columns: 32px 1fr; align-items: end; gap: 12px; height: 280px; }
.bars__yaxis { display: flex; flex-direction: column-reverse; justify-content: space-between; font-size: 11px; color: var(--on-surface-variant); padding-bottom: 28px; }
.bars__plot { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 16px; height: 100%; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.bars__bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.bars__rect { width: 100%; max-width: 56px; background: var(--surface-container); border-radius: 2px 2px 0 0; }
.bars__rect.is-highlight { background: var(--primary-active); }
.bars__label { position: absolute; bottom: -22px; font-size: 11px; color: var(--on-surface-variant); letter-spacing: 0.05em; text-transform: uppercase; }
.bars__value-pill { position: absolute; top: -22px; background: var(--primary-soft); color: var(--primary-active); font-size: 11px; padding: 2px 6px; border-radius: var(--radius-sm); font-weight: 700; white-space: nowrap; }

/* Empty state */
.empty { padding: 48px 24px; text-align: center; color: var(--on-surface-variant); }
.empty__icon { font-size: 32px; margin-bottom: 8px; opacity: .4; }
.empty__title { font-size: 16px; font-weight: 600; color: var(--on-surface); margin: 0 0 6px; }
.empty__body  { font-size: 14px; }

/* Range / progress */
.progress { width: 100%; height: 8px; background: var(--surface-container); border-radius: var(--radius-full); overflow: hidden; }
.progress__bar { height: 100%; background: var(--primary-active); }

/* Sticky in card */
.card .table-wrap { border: 0; border-radius: 0; }

/* ────────────────────────────────────────────────────────────
   Additions for module 2-6 views
   ──────────────────────────────────────────────────────────── */

/* Page header actions */
.page-header__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Heading aliases */
.text-h2 { font-size: 24px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 8px; }
.text-h3 { font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0 0 6px; }
.text-h4 { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 0 0 4px; }
.text-caption { font-size: 12px; color: var(--on-surface-variant); line-height: 1.4; }
.text-warning { color: var(--warning); }
.mono { font-family: var(--font-mono); font-size: 12px; }
.link { color: var(--primary-active); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Spacing helpers */
.mb-lg { margin-bottom: 24px; }
.mb-md { margin-bottom: 16px; }
.mb-sm { margin-bottom: 8px; }
.mt-lg { margin-top: 24px; }
.mt-md { margin-top: 16px; }
.mt-sm { margin-top: 8px; }
.gap-md { gap: 16px; }
.gap-sm { gap: 8px; }

/* Layout grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* Stats grid (small KPI cards) */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-card__label { font-size: 12px; color: var(--on-surface-variant); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.stat-card__value { font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.stat__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* Cards: footer, form variant */
.card__foot {
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
  border-top: 1px solid var(--border);
  padding: 12px 16px; margin: 16px -16px -16px;
  background: var(--surface-container-low);
  border-radius: 0 0 var(--radius) var(--radius);
}
.form-card .card__body { padding: 16px; }
.form-card .card__head { padding: 16px 16px 0; margin-bottom: 8px; }

/* Filter card */
.filter-card { padding: 12px 16px; }
.filter-card .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }

/* CTA cards on dashboard */
.card-cta {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer; text-decoration: none; color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.card-cta:hover { border-color: var(--primary-active); background: var(--surface-container-low); }
.card-cta__icon { width: 36px; height: 36px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-active); display: grid; place-items: center; flex-shrink: 0; }
.card-cta__label { font-weight: 600; font-size: 14px; color: var(--on-surface); }
.card-cta--primary { background: var(--primary-active); color: #fff; border-color: var(--primary-active); }
.card-cta--primary .card-cta__icon { background: rgba(255,255,255,.18); color: #fff; }
.card-cta--primary .card-cta__label { color: #fff; }
.card-cta--secondary { }

/* Dashboard layouts */
.dashboard-desktop { display: block; }
.dashboard-mobile  { display: none; }
@media (max-width: 900px) {
  .dashboard-desktop { display: none; }
  .dashboard-mobile  { display: block; }
}

/* Show/hide on mobile */
.hide-on-mobile { }
.show-on-mobile { display: none; }
@media (max-width: 900px) {
  .hide-on-mobile { display: none !important; }
  .show-on-mobile { display: block; }
}

/* Lists */
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: 0; }

/* Empty state */
.empty-state { padding: 24px; text-align: center; color: var(--on-surface-variant); }
.empty__sub { font-size: 13px; color: var(--on-surface-variant); margin-top: 6px; }

/* Profile hero (employee detail) */
.profile-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px;
}
.profile-hero__avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-container); display: grid; place-items: center; font-weight: 700; font-size: 24px; color: var(--on-surface-variant); flex-shrink: 0; overflow: hidden; }
.profile-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero__meta { flex: 1; min-width: 0; }
.profile-hero__name { font-size: 22px; font-weight: 700; line-height: 1.2; margin: 0; }
.profile-hero__title { font-size: 14px; color: var(--on-surface-variant); margin: 2px 0 6px; }

/* Key-value list */
.kv--list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kv__item { display: flex; flex-direction: column; gap: 2px; }
.kv__item--wide { grid-column: 1 / -1; }
.kv__label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--on-surface-variant); }
.kv__value { font-size: 14px; color: var(--on-surface); }
@media (max-width: 600px) { .kv--list { grid-template-columns: 1fr; } }

/* Employee mobile cards */
.mobile-employee-list { display: flex; flex-direction: column; gap: 8px; }
.emp-card {
  display: flex; gap: 12px; padding: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); align-items: center;
  text-decoration: none; color: inherit;
}
.emp-card:hover { border-color: var(--primary-active); }
.emp-card__avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-container); display: grid; place-items: center; font-weight: 700; color: var(--on-surface-variant); flex-shrink: 0; overflow: hidden; }
.emp-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.emp-card__meta { flex: 1; min-width: 0; }
.emp-card__name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.emp-card__title { font-size: 12px; color: var(--on-surface-variant); margin-top: 2px; }
.employee-show { }

/* SSN toggle button */
.ssn-toggle { background: transparent; border: 0; color: var(--primary-active); font-size: 12px; cursor: pointer; padding: 0 4px; }
.ssn-toggle:hover { text-decoration: underline; }

/* Mobile search */
.mobile-search { position: relative; margin-bottom: 12px; }
.mobile-search__input {
  width: 100%; padding: 10px 14px 10px 40px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); font-size: 14px;
}
.mobile-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--on-surface-variant); }
.mobile-search__filter { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; padding: 4px; cursor: pointer; color: var(--on-surface-variant); }

/* Tab links (settings) */
.tab-link {
  display: inline-block; padding: 10px 14px; border-bottom: 2px solid transparent;
  font-size: 14px; font-weight: 500; color: var(--on-surface-variant); text-decoration: none;
}
.tab-link:hover { color: var(--on-surface); }
.tab-link.is-active { color: var(--primary-active); border-bottom-color: var(--primary-active); }

/* Tab buttons (sign pad) */
.tab-btn { background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 12px; cursor: pointer; }
.tab-btn.is-active { background: var(--primary-soft); border-color: var(--primary-active); color: var(--primary-active); }

/* Horizontal bar (workflows / performance) */
.hbar { display: grid; grid-template-columns: 120px 1fr 60px; align-items: center; gap: 8px; padding: 6px 0; }
.hbar__label { font-size: 13px; color: var(--on-surface); }
.hbar__track { background: var(--surface-container); border-radius: var(--radius-full); height: 8px; overflow: hidden; }
.hbar__fill  { height: 100%; background: var(--primary-active); border-radius: var(--radius-full); }
.hbar__value { font-size: 12px; font-weight: 600; color: var(--on-surface-variant); text-align: right; }

/* Tasks list */
.task-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.task-row:last-child { border-bottom: 0; }
.task-row__check { display: flex; align-items: center; }
.task-row__box { width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: 4px; display: grid; place-items: center; }
.task-row__box--done { background: var(--primary-active); border-color: var(--primary-active); color: #fff; }
.task-row__title { flex: 1; font-size: 14px; }
.task-row__title.is-done { text-decoration: line-through; color: var(--on-surface-variant); }
.task-row__meta { font-size: 12px; color: var(--on-surface-variant); }

/* Upcoming items */
.upcoming { display: flex; flex-direction: column; }
.upcoming__item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.upcoming__item:last-child { border-bottom: 0; }
.upcoming__name { font-size: 14px; font-weight: 600; }
.upcoming__sub { font-size: 12px; color: var(--on-surface-variant); margin-top: 2px; }
.upcoming__when { font-size: 12px; color: var(--on-surface-variant); white-space: nowrap; }
.upcoming__meta { display: flex; flex-direction: column; align-items: flex-end; }

/* Timeline (signature activity) */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline__item { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.timeline__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-active); margin-top: 7px; flex-shrink: 0; }
.timeline__content { flex: 1; min-width: 0; }

/* Signature pad layout */
.signature-tabs { display: flex; gap: 4px; }
.signer-row { padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius); margin-bottom: 8px; }

/* Auth shell (used by sign + login) */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--canvas); }
.auth-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.auth-card__brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
