/* ═══════════════════════════════════════════════════════════════
   DESIGN SYSTEM — TOKENS
   All design values flow from these tokens. Change here = change everywhere.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Brand & accent ──────────────────────────────────────── */
  --brand-50:  #F0F4FA;
  --brand-100: #D9E2F2;
  --brand-200: #B3C5E5;
  --brand-500: #334E7C;
  --brand-700: #1E3A6F;
  --brand-900: #0F172A;
  --brand-950: #060A18;

  --accent-50:  #F0F9FF;
  --accent-100: #E0F2FE;
  --accent-500: #0284C7;
  --accent-600: #0369A1;
  --accent-700: #075985;

  /* ── Semantic status ─────────────────────────────────────── */
  --success-50:  #ECFDF5;
  --success-500: #10B981;
  --success-700: #047857;
  --warning-50:  #FFFBEB;
  --warning-500: #F59E0B;
  --warning-700: #B45309;
  --danger-50:   #FEF2F2;
  --danger-500:  #EF4444;
  --danger-700:  #B91C1C;
  --info-50:     #EFF6FF;
  --info-500:    #3B82F6;
  --info-700:    #1D4ED8;

  /* ── Surface & text (LIGHT THEME) ─────────────────────────── */
  --bg:        #F8FAFC;
  --surface:   #FFFFFF;
  --surface-2: #F1F5F9;
  --surface-3: #E2E8F0;
  --border:    #E5E7EB;
  --border-2:  #F1F5F9;
  --text-1:    #0F172A;
  --text-2:    #475569;
  --text-3:    #94A3B8;
  --text-4:    #CBD5E1;

  --sidebar-bg:     #0F172A;
  --sidebar-bg-2:   #1E293B;
  --sidebar-text:   #CBD5E1;
  --sidebar-text-2: #64748B;
  --sidebar-active: #FFFFFF;
  --sidebar-border: rgba(255,255,255,0.06);

  /* ── Typography ──────────────────────────────────────────── */
  --font-ui:     'Plus Jakarta Sans', 'Noto Sans Lao', -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', ui-monospace, monospace;

  --fs-2xs: 11px;
  --fs-xs:  12px;
  --fs-sm:  13px;
  --fs-md:  14px;
  --fs-base:15px;
  --fs-lg:  17px;
  --fs-xl:  20px;
  --fs-2xl: 24px;
  --fs-3xl: 30px;
  --fs-4xl: 38px;

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-heavy:    800;

  --lh-tight:   1.2;
  --lh-snug:    1.35;
  --lh-normal:  1.5;
  --lh-relaxed: 1.65;

  /* ── Spacing scale ───────────────────────────────────────── */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10:40px;
  --sp-12:48px;
  --sp-16:64px;

  /* ── Radius ──────────────────────────────────────────────── */
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  10px;
  --r-xl:  14px;
  --r-2xl: 18px;
  --r-full: 999px;

  /* ── Shadows (refined, layered) ──────────────────────────── */
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.07), 0 2px 4px -2px rgba(15,23,42,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,0.08), 0 4px 6px -4px rgba(15,23,42,0.06);
  --shadow-xl: 0 20px 25px -5px rgba(15,23,42,0.10), 0 8px 10px -6px rgba(15,23,42,0.07);
  --shadow-focus: 0 0 0 3px rgba(2,132,199,0.18);

  /* ── Layout ──────────────────────────────────────────────── */
  --sidebar-w:    264px;
  --topbar-h:     64px;
  --content-max:  1440px;

  /* ── Motion ──────────────────────────────────────────────── */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-base: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:  150ms;
  --dur-base:  220ms;
  --dur-slow:  320ms;
}

/* ── DARK THEME OVERRIDES ──────────────────────────────────── */
[data-theme="dark"] {
  --bg:        #0B1220;
  --surface:   #111827;
  --surface-2: #1F2937;
  --surface-3: #374151;
  --border:    #1F2937;
  --border-2:  #111827;
  --text-1:    #F1F5F9;
  --text-2:    #94A3B8;
  --text-3:    #64748B;
  --text-4:    #475569;

  --sidebar-bg:     #060A18;
  --sidebar-bg-2:   #0F172A;
  --sidebar-text:   #94A3B8;
  --sidebar-text-2: #475569;
  --sidebar-active: #FFFFFF;
  --sidebar-border: rgba(255,255,255,0.04);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.30), 0 1px 2px rgba(0,0,0,0.20);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.30), 0 2px 4px -2px rgba(0,0,0,0.20);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.35), 0 4px 6px -4px rgba(0,0,0,0.20);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.40), 0 8px 10px -6px rgba(0,0,0,0.25);
}

/* ═══════════════════════════════════════════════════════════════
   BASE & RESET
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  transition: background var(--dur-base) var(--ease-base), color var(--dur-base) var(--ease-base);
}

button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent-100); color: var(--accent-700); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: var(--r-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* Lucide icons baseline */
[data-lucide], svg.lucide { width: 18px; height: 18px; stroke-width: 1.75; flex-shrink: 0; }

/* Tabular numbers for data */
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 38px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-base);
  user-select: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn svg { width: 16px; height: 16px; }

/* Variants */
.btn-primary {
  background: var(--brand-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-700); }

.btn-accent {
  background: var(--accent-500);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover:not(:disabled) { background: var(--accent-600); }

.btn-secondary {
  background: var(--surface);
  color: var(--text-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text-1); }

.btn-danger {
  background: var(--danger-500);
  color: #fff;
}
.btn-danger:hover:not(:disabled) { background: var(--danger-700); }

.btn-success {
  background: var(--success-500);
  color: #fff;
}
.btn-success:hover:not(:disabled) { background: var(--success-700); }

.btn-sm { height: 30px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 46px; padding: 0 var(--sp-6); font-size: var(--fs-base); }
.btn-lg svg { width: 18px; height: 18px; }

.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }
.btn-icon.btn-lg { width: 46px; }

.btn-block { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — INPUTS
   ═══════════════════════════════════════════════════════════════ */

.field { margin-bottom: var(--sp-4); }
.field-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.02em;
}
/* Make the `*` (required marker) at end of field labels red & bold */
.field-label::after {
  content: '';
}
.field .field-label {
  position: relative;
}
/* Catch labels that contain trailing " *" and color the star — handled via JS-friendly span;
   pure-CSS approach: target the label text node itself isn't possible, so we color any standalone " *" via :has() where supported */
@supports selector(:has(*)) {
  .field-label:has(+ .input:required),
  .field-label:has(+ .select:required),
  .field-label:has(+ .textarea:required) {
    color: var(--text-2);
  }
}
/* Manual highlight: when JS adds .field-required class to label */
.field-label.field-required::after {
  content: ' *';
  color: var(--danger-600, #dc2626);
  font-weight: 700;
}
.field-hint {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: var(--sp-1);
}
/* Shake animation for invalid form fields */
@keyframes field-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
.input[style*="rgba(239, 68, 68"],
.select[style*="rgba(239, 68, 68"],
.textarea[style*="rgba(239, 68, 68"] {
  animation: field-shake 0.35s ease;
}

/* ═══ "Unseen" row highlight — for candidates not yet reviewed by current user ═══ */
@keyframes unseen-pulse-dot {
  0%, 100% { transform: scale(1);   opacity: 1;   box-shadow: 0 0 0 0   rgba(2, 132, 199, 0.55); }
  50%      { transform: scale(1.15); opacity: 0.85; box-shadow: 0 0 0 6px rgba(2, 132, 199, 0); }
}
@keyframes unseen-row-fade {
  from { background-color: rgba(2, 132, 199, 0.16); }
  to   { background-color: rgba(2, 132, 199, 0.06); }
}
tr.row-unseen {
  background-color: rgba(2, 132, 199, 0.06) !important;
  box-shadow: inset 4px 0 0 #0284c7;
  animation: unseen-row-fade 1.4s ease-out;
  font-weight: var(--fw-semibold);
}
tr.row-unseen td:first-child {
  position: relative;
}
tr.row-unseen .cell-user-name {
  font-weight: var(--fw-bold);
  color: var(--text-1);
}
.unseen-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #0284c7;
  margin-right: 6px;
  vertical-align: middle;
  animation: unseen-pulse-dot 1.8s ease-in-out infinite;
}
.badge-unseen {
  background: #0284c7;
  color: white;
  font-size: var(--fs-2xs);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: var(--fw-bold);
  margin-left: 4px;
  letter-spacing: 0.04em;
}

/* ═══ Phase 8.5 — Bulk Actions floating bar ═══ */
@keyframes bulk-bar-rise {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.bulk-action-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 950;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 480px;
  max-width: calc(100vw - 32px);
  animation: bulk-bar-rise 0.22s cubic-bezier(.2,.9,.3,1);
}
.bulk-action-bar .bulk-counter {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px var(--sp-3);
  background: var(--accent-50);
  color: var(--accent-700);
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
}
.bulk-action-bar .bulk-counter i {
  width: 14px; height: 14px;
}
.bulk-action-bar .bulk-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}
.bulk-action-bar .btn { white-space: nowrap; }
.bulk-checkbox {
  width: 16px; height: 16px;
  accent-color: var(--accent-500);
  cursor: pointer;
  vertical-align: middle;
}
th.bulk-th, td.bulk-td {
  width: 36px;
  padding-left: var(--sp-3) !important;
  padding-right: 0 !important;
  text-align: center;
}
tr.row-selected {
  background-color: rgba(2, 132, 199, 0.10) !important;
  box-shadow: inset 4px 0 0 var(--accent-600) !important;
}
@media (max-width: 640px) {
  .bulk-action-bar {
    min-width: 0;
    width: calc(100vw - 24px);
    bottom: 12px;
    padding: var(--sp-2) var(--sp-3);
    gap: var(--sp-2);
    flex-wrap: wrap;
    justify-content: center;
  }
  .bulk-action-bar .bulk-divider { display: none; }
}

.input, .select, .textarea {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text-1);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-500);
  box-shadow: var(--shadow-focus);
}
.textarea { height: auto; padding: var(--sp-3); min-height: 90px; line-height: var(--lh-normal); resize: vertical; }

.input-with-icon { position: relative; }
.input-with-icon .input { padding-left: 38px; }
.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.input-with-icon .input-icon svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════
   COMPONENTS — CARD, BADGE, AVATAR
   ═══════════════════════════════════════════════════════════════ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
}
.card-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.card-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.card-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: 2px;
}
.card-body { padding: var(--sp-6); }
.card-footer { padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.badge svg { width: 11px; height: 11px; }
.badge-success { background: var(--success-50); color: var(--success-700); border-color: rgba(16,185,129,0.20); }
.badge-warning { background: var(--warning-50); color: var(--warning-700); border-color: rgba(245,158,11,0.20); }
.badge-danger  { background: var(--danger-50);  color: var(--danger-700);  border-color: rgba(239,68,68,0.20); }
.badge-info    { background: var(--info-50);    color: var(--info-700);    border-color: rgba(59,130,246,0.20); }
.badge-neutral { background: var(--surface-2);  color: var(--text-2);      border-color: var(--border); }

[data-theme="dark"] .badge-success { background: rgba(16,185,129,0.12); color: #34D399; }
[data-theme="dark"] .badge-warning { background: rgba(245,158,11,0.12); color: #FBBF24; }
[data-theme="dark"] .badge-danger  { background: rgba(239,68,68,0.12);  color: #F87171; }
[data-theme="dark"] .badge-info    { background: rgba(59,130,246,0.12); color: #60A5FA; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar-sm { width: 28px; height: 28px; font-size: var(--fs-xs); }
.avatar-lg { width: 48px; height: 48px; font-size: var(--fs-md); }
.avatar-xl { width: 64px; height: 64px; font-size: var(--fs-lg); }

/* ═══════════════════════════════════════════════════════════════
   VIEW SWITCHING (login / app)
   ═══════════════════════════════════════════════════════════════ */
.view { display: none; }
.view.active { display: block; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN VIEW
   ═══════════════════════════════════════════════════════════════ */

#loginView.active { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
@media (max-width: 960px) { #loginView.active { grid-template-columns: 1fr; } }

.login-hero {
  position: relative;
  background: linear-gradient(135deg, var(--brand-950) 0%, var(--brand-900) 40%, var(--brand-700) 100%);
  color: #fff;
  padding: var(--sp-12) var(--sp-10);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
@media (max-width: 960px) { .login-hero { display: none; } }

/* Decorative grid pattern + soft glow */
.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 800px 600px at 80% 20%, rgba(2,132,199,0.20), transparent 60%),
    radial-gradient(ellipse 600px 400px at 20% 80%, rgba(59,130,246,0.10), transparent 60%),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
}
.login-hero > * { position: relative; z-index: 1; }

.login-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}
.login-brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
}
.login-brand-mark svg { width: 22px; height: 22px; }
.login-brand small { display: block; font-size: var(--fs-xs); font-weight: var(--fw-regular); opacity: 0.6; letter-spacing: 0.04em; margin-top: 2px; }

.login-hero-content { max-width: 460px; }
.login-eyebrow {
  display: inline-block;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-5);
}
.login-headline {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}
.login-headline span { background: linear-gradient(90deg, #fff, #93C5FD); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-sub {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: rgba(255,255,255,0.70);
  margin-bottom: var(--sp-8);
}

.login-features { display: grid; gap: var(--sp-3); }
.login-feat {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.85);
}
.login-feat-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  color: var(--accent-500);
}

.login-footer-mini {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.4);
  display: flex;
  justify-content: space-between;
}

/* Right side — form */
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-6);
  background: var(--surface);
  position: relative;
}
.login-utils {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  display: flex;
  gap: var(--sp-2);
}
.login-card {
  width: 100%;
  max-width: 380px;
}
.login-card h2 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}
.login-card p.lead {
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-bottom: var(--sp-8);
}
.login-error {
  display: none;
  align-items: flex-start;
  gap: var(--sp-2);
  background: var(--danger-50);
  border: 1px solid rgba(239,68,68,0.20);
  color: var(--danger-700);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  margin-bottom: var(--sp-3);
}
.login-error.show { display: flex; }
.login-error svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

.login-demo {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px dashed var(--border);
}
.login-demo-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  margin-bottom: var(--sp-3);
  text-align: center;
  letter-spacing: 0.01em;
}
.login-demo-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.login-demo-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-fast);
  width: 100%;
  text-align: left;
}
.login-demo-btn:hover {
  background: var(--surface-2);
  border-color: var(--accent-500);
  transform: translateX(2px);
}
.login-demo-btn:hover .login-demo-arrow {
  color: var(--accent-700);
  transform: translateX(2px);
}
.login-demo-info { flex: 1; min-width: 0; }
.login-demo-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.login-demo-role {
  font-size: var(--fs-2xs);
  color: var(--text-3);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}
.login-demo-arrow {
  width: 16px; height: 16px;
  color: var(--text-3);
  transition: all var(--dur-fast);
  flex-shrink: 0;
}
.role-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--r-sm);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-ui);
}
.role-pill.role-admin { background: #FEE2E2; color: #B91C1C; }
.role-pill.role-sup   { background: #FEF3C7; color: #B45309; }
.role-pill.role-emp   { background: #DBEAFE; color: #1E40AF; }
[data-theme="dark"] .role-pill.role-admin { background: rgba(239,68,68,0.15); color:#F87171; }
[data-theme="dark"] .role-pill.role-sup   { background: rgba(245,158,11,0.15); color:#FBBF24; }
[data-theme="dark"] .role-pill.role-emp   { background: rgba(59,130,246,0.15); color:#60A5FA; }

/* ═══ Phase 8.6 — Public careers entry on login screen (H + I discoverability) ═══ */
.login-public-entry { margin-top: var(--sp-5); }
.login-public-divider {
  display: flex; align-items: center; text-align: center;
  font-size: var(--fs-2xs); color: var(--text-3); letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-3);
}
.login-public-divider::before,
.login-public-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.login-public-divider span { padding: 0 var(--sp-3); }
.login-public-link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(135deg, rgba(2,132,199,0.04), rgba(56,189,248,0.04));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: all var(--dur-fast);
  margin-bottom: var(--sp-2);
}
.login-public-link:hover {
  background: linear-gradient(135deg, rgba(2,132,199,0.10), rgba(56,189,248,0.10));
  border-color: var(--accent-500);
  transform: translateX(2px);
}
.login-public-link:hover .login-public-arrow {
  color: var(--accent-700);
  transform: translate(2px, -2px);
}
.login-public-link.secondary {
  background: var(--surface);
}
.login-public-link.secondary:hover {
  background: var(--surface-2);
}
.login-public-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--accent-50);
  color: var(--accent-700);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.login-public-link.secondary .login-public-icon {
  background: var(--surface-2);
  color: var(--text-2);
}
.login-public-icon i { width: 18px; height: 18px; }
.login-public-info { flex: 1; min-width: 0; }
.login-public-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.login-public-sub {
  font-size: var(--fs-2xs);
  color: var(--text-3);
  margin-top: 2px;
}
.login-public-arrow {
  width: 16px; height: 16px;
  color: var(--text-3);
  transition: all var(--dur-fast);
  flex-shrink: 0;
}
[data-theme="dark"] .login-public-link {
  background: linear-gradient(135deg, rgba(14,165,233,0.06), rgba(56,189,248,0.06));
}
[data-theme="dark"] .login-public-icon { background: rgba(14,165,233,0.12); color:#7DD3FC; }

/* ═══ Phase 8.7 — Mobile Optimization (J) ═══
   Focused improvements for smartphone use (most KGS field staff access via mobile):
   - 44px minimum touch targets (Apple HIG / Material guidance)
   - Full-bleed modals on small phones
   - iOS safe-area insets for fixed UI
   - Disable :hover effects on touch devices to remove sticky states
   - Prevent iOS zoom on input focus (font-size ≥ 16px)
   - Larger tap zones on table action buttons and icon buttons */

/* Prevent iOS auto-zoom on input focus by ensuring base font-size ≥ 16px on mobile */
@media (max-width: 640px) {
  .input, .select, .textarea, input[type="text"], input[type="email"],
  input[type="password"], input[type="number"], input[type="tel"],
  input[type="date"], input[type="search"], input[type="url"], textarea, select {
    font-size: 16px !important;
  }
}

/* Touch-target minimum on phones — buttons reachable with thumbs */
@media (max-width: 768px) {
  .btn, .btn-sm, .icon-btn,
  .sb-nav-item, .topbar-menu, .modal-close,
  .login-demo-btn, .login-public-link,
  .pub-nav-link, .pub-lang-toggle {
    min-height: 44px;
  }
  .btn-sm { min-height: 38px; padding: 6px 10px; }
  /* Table action buttons get larger tap zone via padding */
  .table td .btn-sm, .table td .btn-ghost.btn-sm {
    min-width: 38px;
    padding: 8px;
  }
  /* Icon button always 44px square */
  .icon-btn {
    min-width: 44px;
  }
  /* Topbar menu (hamburger) needs comfortable touch */
  .topbar-menu {
    min-width: 44px;
    min-height: 44px;
  }
}

/* iOS safe-area insets for fixed/sticky UI */
@supports (padding: env(safe-area-inset-bottom)) {
  .bulk-action-bar {
    bottom: max(24px, env(safe-area-inset-bottom));
  }
  .submit-fab, .fab-container, .ai-fab {
    bottom: max(20px, env(safe-area-inset-bottom));
  }
  /* Apply safe-area to content padding-bottom so last item isn't cut off */
  @media (max-width: 1023px) {
    .content { padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom)); }
  }
}

/* Disable hover effects on touch devices (hover stays sticky on mobile after tap) */
@media (hover: none) {
  .btn:hover,
  .login-demo-btn:hover,
  .login-public-link:hover,
  .sb-nav-item:hover,
  .pub-nav-link:hover,
  tr:hover {
    transform: none !important;
    background-color: inherit;
  }
  /* Use :active state instead for tactile feedback on tap */
  .btn:active, .icon-btn:active, .login-demo-btn:active, .login-public-link:active {
    opacity: 0.7;
    transition: opacity 0.1s;
  }
}

/* Full-bleed modals on small phones — better use of vertical space */
@media (max-width: 640px) {
  .modal-backdrop {
    padding: 0;
    align-items: stretch;
  }
  .modal-dialog,
  .modal-dialog.large {
    border-radius: 0;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport height — accounts for mobile browser UI */
    display: flex;
    flex-direction: column;
    margin: 0;
  }
  .modal-header {
    padding: var(--sp-3) var(--sp-4);
    padding-top: max(var(--sp-3), env(safe-area-inset-top));
    position: sticky; top: 0;
    background: var(--surface);
    z-index: 5;
  }
  .modal-body {
    flex: 1;
    max-height: none;
    padding: var(--sp-4);
  }
  .modal-footer {
    padding: var(--sp-3) var(--sp-4);
    padding-bottom: max(var(--sp-3), env(safe-area-inset-bottom));
    position: sticky; bottom: 0;
    z-index: 5;
    /* Stack buttons vertically on phone for thumb reach */
    flex-direction: column-reverse;
    gap: var(--sp-2);
  }
  .modal-footer .btn { width: 100%; justify-content: center; }
}

/* Card/section spacing tighter on mobile */
@media (max-width: 640px) {
  .card { border-radius: var(--r-md); }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }
  .page-header .page-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
  }
  .page-header .page-actions .btn { flex: 1; min-width: 0; justify-content: center; }
  /* Compact table cells on phone */
  .table th, .table td {
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-xs);
  }
  .table .badge { font-size: var(--fs-2xs); padding: 2px 6px; }
  /* Avatar slightly smaller on phone */
  .avatar.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
}

/* Make sidebar overlay tap area more obvious */
@media (max-width: 1023px) {
  .overlay { background: rgba(15,23,42,0.55); }
  .sidebar { width: 280px; box-shadow: 4px 0 24px rgba(0,0,0,0.20); }
}


/* ═══════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════ */

#appView.active { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
@media (max-width: 1023px) { #appView.active { grid-template-columns: 1fr; } }

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  left: 0;
  height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  z-index: 100;
}
@media (max-width: 1023px) {
  .sidebar { position: fixed; transform: translateX(-100%); transition: transform var(--dur-base) var(--ease-out); }
  .sidebar.open { transform: translateX(0); }
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0 var(--sp-5);
  height: var(--topbar-h);
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sb-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent-500), var(--brand-500));
  border-radius: var(--r-md);
  color: #fff;
}
.sb-brand-mark svg { width: 18px; height: 18px; }
.sb-brand-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: #fff;
  letter-spacing: -0.01em;
}
.sb-brand-sub {
  font-size: var(--fs-2xs);
  color: var(--sidebar-text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}

.sb-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-3) var(--sp-3);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); }

.sb-section-label {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--sidebar-text-2);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: var(--sp-4) var(--sp-3) var(--sp-2);
}
.sb-section-label:first-child { padding-top: var(--sp-2); }

.sb-nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
  position: relative;
}
.sb-nav-item:hover { background: rgba(255,255,255,0.04); color: #fff; }
.sb-nav-item.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.sb-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent-500);
}
.sb-nav-item svg { width: 17px; height: 17px; stroke-width: 1.75; opacity: 0.9; }
.sb-nav-item.active svg { color: var(--accent-500); opacity: 1; }
.sb-nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent-500);
  color: #fff;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  padding: 1px 6px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
}

.sb-footer {
  padding: var(--sp-3);
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sb-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.sb-user:hover { background: rgba(255,255,255,0.05); }
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-role { font-size: var(--fs-2xs); color: var(--sidebar-text-2); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── TOPBAR ────────────────────────────────────────────── */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: var(--topbar-h);
  padding: 0 var(--sp-6);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
@media (max-width: 640px) { .topbar { padding: 0 var(--sp-4); } }

.topbar-menu {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text-2);
}
@media (max-width: 1023px) { .topbar-menu { display: flex; } }

.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title small { font-size: var(--fs-xs); color: var(--text-3); }

.topbar-actions { display: flex; align-items: center; gap: var(--sp-2); }

.topbar-search {
  position: relative;
  width: 280px;
}
@media (max-width: 768px) { .topbar-search { display: none; } }
.topbar-search .input {
  height: 36px;
  padding-left: 36px;
  background: var(--surface-2);
  border-color: transparent;
  font-size: var(--fs-xs);
}
.topbar-search .input-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3);
}
.topbar-search .input-icon svg { width: 14px; height: 14px; }
.topbar-search kbd {
  position: absolute;
  right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-3);
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-2);
  transition: all var(--dur-fast);
  position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text-1); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger-500);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

.lang-pill {
  height: 38px;
  padding: 0 var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lang-pill:hover { background: var(--surface-2); color: var(--text-1); }
.lang-pill svg { width: 14px; height: 14px; }

/* ── CONTENT ────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: var(--sp-6) var(--sp-6) var(--sp-12);
  max-width: var(--content-max);
  width: 100%;
}
@media (max-width: 640px) { .content { padding: var(--sp-4); } }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.page-title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}
.page-sub {
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-top: 4px;
}
.page-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — KPI GRID
   ═══════════════════════════════════════════════════════════════ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
@media (max-width: 1280px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .kpi-grid { grid-template-columns: 1fr; } }

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--dur-base), transform var(--dur-base);
}
.kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-4); }
.kpi-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-icon.success { background: var(--success-50); color: var(--success-700); }
.kpi-icon.warning { background: var(--warning-50); color: var(--warning-700); }
.kpi-icon.danger  { background: var(--danger-50);  color: var(--danger-700); }
.kpi-icon.info    { background: var(--info-50);    color: var(--info-700); }
.kpi-icon.accent  { background: var(--accent-50);  color: var(--accent-700); }

[data-theme="dark"] .kpi-icon.success { background: rgba(16,185,129,0.10); color: #34D399; }
[data-theme="dark"] .kpi-icon.warning { background: rgba(245,158,11,0.10); color: #FBBF24; }
[data-theme="dark"] .kpi-icon.danger  { background: rgba(239,68,68,0.10);  color: #F87171; }
[data-theme="dark"] .kpi-icon.info    { background: rgba(59,130,246,0.10); color: #60A5FA; }
[data-theme="dark"] .kpi-icon.accent  { background: rgba(2,132,199,0.10);  color: #38BDF8; }

.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: 2px 6px;
  border-radius: var(--r-sm);
}
.kpi-delta.up { background: var(--success-50); color: var(--success-700); }
.kpi-delta.down { background: var(--danger-50); color: var(--danger-700); }
.kpi-delta svg { width: 11px; height: 11px; }
[data-theme="dark"] .kpi-delta.up { background: rgba(16,185,129,0.12); }
[data-theme="dark"] .kpi-delta.down { background: rgba(239,68,68,0.12); }

.kpi-value {
  font-family: var(--font-mono);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
  color: var(--text-1);
}
.kpi-label {
  font-size: var(--fs-xs);
  color: var(--text-2);
  margin-top: var(--sp-1);
  letter-spacing: 0.02em;
}
.kpi-foot {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-2);
  font-size: var(--fs-xs);
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
}

/* Mini sparkline bar */
.spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  margin-top: var(--sp-3);
}
.spark span {
  flex: 1;
  background: linear-gradient(to top, var(--accent-500), var(--accent-100));
  border-radius: 2px;
  opacity: 0.85;
  transition: opacity var(--dur-fast);
}
.kpi:hover .spark span { opacity: 1; }
[data-theme="dark"] .spark span { background: linear-gradient(to top, var(--accent-500), rgba(2,132,199,0.30)); }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — TWO-COL LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
@media (max-width: 1024px) { .dash-grid { grid-template-columns: 1fr; } }

/* Recent activity list */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border-2);
  transition: background var(--dur-fast);
}
.activity-item:last-child { border-bottom: 0; }
.activity-item:hover { background: var(--surface-2); }
.activity-content { flex: 1; min-width: 0; }
.activity-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-1); line-height: var(--lh-snug); }
.activity-desc  { font-size: var(--fs-xs); color: var(--text-2); margin-top: 2px; line-height: var(--lh-snug); }
.activity-time  { font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Quick actions grid */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  padding: var(--sp-4);
}
.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--dur-fast);
  text-align: left;
}
.quick-btn:hover { border-color: var(--accent-500); background: var(--accent-50); }
[data-theme="dark"] .quick-btn:hover { background: rgba(2,132,199,0.08); }
.quick-btn svg { width: 18px; height: 18px; color: var(--accent-600); }
.quick-btn span { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-1); line-height: var(--lh-snug); }

/* ═══════════════════════════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════════════════════════ */

.table-wrap {
  border-top: 1px solid var(--border-2);
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.table th, .table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  vertical-align: middle;
}
.table th {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  border-bottom: 1px solid var(--border-2);
  color: var(--text-1);
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-fast); }
.table tbody tr:hover { background: var(--surface-2); }

.cell-user {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.cell-user-info { line-height: 1.3; }
.cell-user-name { font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.cell-user-meta { font-size: var(--fs-xs); color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════ */
.toasts {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--text-1);
  min-width: 280px;
  max-width: 400px;
  pointer-events: auto;
  animation: toastIn var(--dur-base) var(--ease-out);
}
.toast.success { border-left: 3px solid var(--success-500); }
.toast.danger  { border-left: 3px solid var(--danger-500); }
.toast.info    { border-left: 3px solid var(--info-500); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.success svg { color: var(--success-500); }
.toast.danger svg  { color: var(--danger-500); }
.toast.info svg    { color: var(--info-500); }

@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.40);
  backdrop-filter: blur(2px);
  z-index: 90;
}
.overlay.show { display: block; }

/* Page transition */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: pageIn var(--dur-base) var(--ease-out); }

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.text-muted { color: var(--text-2); }
.text-mute  { color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════
   PHASE 2 — CHECK-IN PAGE
   ═══════════════════════════════════════════════════════════════ */

.checkin-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
@media (max-width: 1024px) { .checkin-grid { grid-template-columns: 1fr; } }

/* ── Clock card (hero) ─────────────────────────────────── */
.clock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative gradient corner */
.clock-card::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(2,132,199,0.08), transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .clock-card::before {
  background: radial-gradient(circle, rgba(2,132,199,0.12), transparent 70%);
}

.clock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  position: relative;
  z-index: 1;
}

.clock-status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px var(--sp-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
}
.clock-status .dot-live {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success-500);
  animation: pulse-dot 2s infinite;
}
.clock-status.idle .dot-live { background: var(--text-3); animation: none; }
.clock-status.active .dot-live { background: var(--success-500); }
.clock-status.done  .dot-live { background: var(--info-500); animation: none; }

@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.5; transform: scale(1.3); }
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}
.clock-time .sec { color: var(--text-3); font-size: 0.7em; }
@media (max-width: 540px) { .clock-time { font-size: 44px; } }

.clock-date {
  font-size: var(--fs-sm);
  color: var(--text-2);
  margin-top: var(--sp-2);
  position: relative;
  z-index: 1;
}

/* Today summary row */
.today-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
  padding: var(--sp-4);
  background: var(--surface-2);
  border-radius: var(--r-md);
  position: relative;
  z-index: 1;
}
.today-summary > div { text-align: center; }
.today-summary .lbl {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.today-summary .val {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.today-summary .val.empty { color: var(--text-3); font-weight: var(--fw-regular); }

/* Action button — big & decisive */
.action-btn-big {
  width: 100%;
  height: 64px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  letter-spacing: 0.02em;
  color: #fff;
  transition: all var(--dur-base);
  position: relative;
  z-index: 1;
}
.action-btn-big.checkin {
  background: linear-gradient(135deg, var(--accent-600), var(--accent-500));
  box-shadow: 0 8px 20px -4px rgba(2,132,199,0.40);
}
.action-btn-big.checkout {
  background: linear-gradient(135deg, var(--danger-700), var(--danger-500));
  box-shadow: 0 8px 20px -4px rgba(239,68,68,0.35);
}
.action-btn-big.done {
  background: var(--success-50);
  color: var(--success-700);
  border: 1px solid rgba(16,185,129,0.30);
  cursor: default;
  box-shadow: none;
}
.action-btn-big:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.05); }
.action-btn-big:disabled { opacity: 0.5; cursor: not-allowed; }
.action-btn-big svg { width: 22px; height: 22px; }
[data-theme="dark"] .action-btn-big.done { background: rgba(16,185,129,0.10); color: #34D399; }

/* ── GPS map card ─────────────────────────────────────── */
.map-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.map-viewport {
  position: relative;
  aspect-ratio: 16 / 11;
  background:
    linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 40%, #93C5FD 100%);
  overflow: hidden;
}
[data-theme="dark"] .map-viewport {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 40%, #1E293B 100%);
}

/* Map grid pattern (suggests roads) */
.map-viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px),
    radial-gradient(circle at 60% 40%, rgba(255,255,255,0.25), transparent 40%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
}
[data-theme="dark"] .map-viewport::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    radial-gradient(circle at 60% 40%, rgba(2,132,199,0.10), transparent 40%);
}

/* Curving "roads" via SVG overlay */
.map-roads {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.35;
  pointer-events: none;
}
[data-theme="dark"] .map-roads { opacity: 0.20; }

/* Site marker (the target) */
.map-site {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  background: var(--accent-600);
  color: #fff;
  border-radius: 50% 50% 50% 0;
  transform-origin: center;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(2,132,199,0.35);
  transform: translate(-50%, -90%) rotate(-45deg);
  z-index: 3;
}
.map-site svg {
  width: 14px; height: 14px;
  transform: rotate(45deg);
}

/* Radius circle */
.map-radius {
  position: absolute;
  left: 50%; top: 50%;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 2px dashed rgba(2,132,199,0.50);
  background: rgba(2,132,199,0.08);
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: pulse-radius 3s ease-out infinite;
}
@keyframes pulse-radius {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.3; }
}

/* My location dot */
.map-me {
  position: absolute;
  left: 56%; top: 54%;
  width: 16px; height: 16px;
  background: #1D4ED8;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(29,78,216,0.20), 0 2px 6px rgba(0,0,0,0.20);
  z-index: 4;
  transform: translate(-50%, -50%);
}
.map-me::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid #1D4ED8;
  opacity: 0;
  animation: me-ping 2s infinite;
}
@keyframes me-ping {
  0%   { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2);   opacity: 0; }
}

/* Map info chips */
.map-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.94);
  color: var(--text-1);
  padding: 5px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(4px);
  z-index: 5;
}
.map-chip.tl { top: 12px; left: 12px; }
.map-chip.tr { top: 12px; right: 12px; }
.map-chip svg { width: 11px; height: 11px; }
[data-theme="dark"] .map-chip { background: rgba(15,23,42,0.92); color: var(--text-1); }

/* GPS state below map */
.gps-info {
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.gps-info-state {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--success-50);
  color: var(--success-700);
  flex-shrink: 0;
}
.gps-info-state.error { background: var(--danger-50); color: var(--danger-700); }
.gps-info-state.warn  { background: var(--warning-50); color: var(--warning-700); }
[data-theme="dark"] .gps-info-state { background: rgba(16,185,129,0.12); color: #34D399; }
[data-theme="dark"] .gps-info-state.error { background: rgba(239,68,68,0.12); color: #F87171; }
[data-theme="dark"] .gps-info-state.warn  { background: rgba(245,158,11,0.12); color: #FBBF24; }

.gps-info-state svg { width: 18px; height: 18px; }
.gps-info-text { flex: 1; min-width: 0; }
.gps-info-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-1); }
.gps-info-sub { font-size: var(--fs-xs); color: var(--text-2); margin-top: 2px; }

/* Loading skeleton for map */
.map-loading {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  z-index: 10;
}
.map-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Site picker ─────────────────────────────────────── */
.site-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-3);
}
.site-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-fast);
  position: relative;
}
.site-card:hover { border-color: var(--accent-500); }
.site-card.active {
  border-color: var(--accent-500);
  background: var(--accent-50);
}
[data-theme="dark"] .site-card.active { background: rgba(2,132,199,0.08); }

.site-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: all var(--dur-fast);
}
.site-card.active .site-radio {
  border-color: var(--accent-500);
}
.site-card.active .site-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent-500);
}
.site-info { flex: 1; min-width: 0; }
.site-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
}
.site-meta {
  font-size: var(--fs-xs);
  color: var(--text-2);
  margin-top: 2px;
}
.site-dist {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  background: var(--surface-2);
  border-radius: var(--r-full);
  color: var(--text-2);
}
.site-card.in-zone .site-dist { background: var(--success-50); color: var(--success-700); }
[data-theme="dark"] .site-card.in-zone .site-dist { background: rgba(16,185,129,0.12); color: #34D399; }

/* ── Shift card ─────────────────────────────────────── */
.shift-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-3);
}
@media (max-width: 540px) { .shift-row { grid-template-columns: 1fr 1fr; } }
.shift-item {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.shift-item .lbl {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.shift-item .val {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-1);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.shift-item .val.text { font-family: var(--font-ui); }

/* ── 7-day mini calendar ─────────────────────────────── */
.cal-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-2);
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--r-md);
  border: 1px solid var(--border-2);
  background: var(--surface);
  transition: transform var(--dur-fast);
}
.cal-day:hover { transform: translateY(-1px); border-color: var(--border); }
.cal-day.today {
  border: 2px solid var(--accent-500);
  background: var(--accent-50);
}
[data-theme="dark"] .cal-day.today { background: rgba(2,132,199,0.10); }

.cal-day .dow {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cal-day .dn {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text-1);
  margin: 2px 0 6px;
  font-variant-numeric: tabular-nums;
}
.cal-day.today .dn { color: var(--accent-700); }
[data-theme="dark"] .cal-day.today .dn { color: #38BDF8; }

.cal-day .ind {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-4);
}
.cal-day.s-present .ind { background: var(--success-500); }
.cal-day.s-late    .ind { background: var(--warning-500); }
.cal-day.s-absent  .ind { background: var(--danger-500); }
.cal-day.s-leave   .ind { background: var(--info-500); }
.cal-day.s-off     .ind { background: var(--text-4); }

.cal-day .htime {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 2 — ATTENDANCE RECORDS
   ═══════════════════════════════════════════════════════════════ */

/* Filter bar */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-3);
  align-items: flex-end;
  padding: var(--sp-4);
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
}
.filter-bar .field { margin-bottom: 0; }
.filter-bar .field-actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}

/* Compact form controls in filters */
.filter-bar .input,
.filter-bar .select { height: 36px; font-size: var(--fs-xs); }

/* Stats strip above table */
.att-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.att-stat {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.att-stat-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.att-stat-content { flex: 1; min-width: 0; }
.att-stat-val {
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.att-stat-lbl {
  font-size: var(--fs-xs);
  color: var(--text-2);
  margin-top: 2px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border-2);
  font-size: var(--fs-xs);
  color: var(--text-2);
  flex-wrap: wrap;
}
.pagination-pages { display: flex; gap: 2px; }
.pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  background: transparent;
  color: var(--text-2);
  transition: all var(--dur-fast);
  font-variant-numeric: tabular-nums;
}
.pg-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text-1); }
.pg-btn.active {
  background: var(--brand-900);
  color: #fff;
}
.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════
   PHASE 2 — MY ATTENDANCE (PROGRESS / QUOTA)
   ═══════════════════════════════════════════════════════════════ */

.quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-3);
}
.quota-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  position: relative;
  overflow: hidden;
}
.quota-card-top { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.quota-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.quota-icon svg { width: 16px; height: 16px; }
.quota-icon.sick     { background: var(--danger-50);  color: var(--danger-700); }
.quota-icon.annual   { background: var(--success-50); color: var(--success-700); }
.quota-icon.personal { background: var(--info-50);    color: var(--info-700); }
.quota-icon.maternity{ background: var(--warning-50); color: var(--warning-700); }

[data-theme="dark"] .quota-icon.sick     { background: rgba(239,68,68,0.12);  color: #F87171; }
[data-theme="dark"] .quota-icon.annual   { background: rgba(16,185,129,0.12); color: #34D399; }
[data-theme="dark"] .quota-icon.personal { background: rgba(59,130,246,0.12); color: #60A5FA; }
[data-theme="dark"] .quota-icon.maternity{ background: rgba(245,158,11,0.12); color: #FBBF24; }

.quota-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.quota-sub  { font-size: var(--fs-xs); color: var(--text-3); }

.quota-num {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: var(--sp-2);
}
.quota-num .left {
  font-family: var(--font-mono);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.quota-num .total {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--success-500);
  transition: width var(--dur-slow) var(--ease-out);
  border-radius: var(--r-full);
}
.progress-fill.warn { background: var(--warning-500); }
.progress-fill.danger { background: var(--danger-500); }

.quota-foot {
  display: flex;
  justify-content: space-between;
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-2);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--sp-12) var(--sp-6);
}
.empty-state-icon {
  width: 56px; height: 56px;
  margin: 0 auto var(--sp-3);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
}
.empty-state-icon svg { width: 24px; height: 24px; }
.empty-state h3 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  margin-bottom: 4px;
}
.empty-state p {
  font-size: var(--fs-sm);
  color: var(--text-2);
}

/* Status indicators (small) */
.stat-bullet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: var(--text-2);
}
.stat-bullet .b {
  width: 8px; height: 8px; border-radius: 50%;
}
.b.present { background: var(--success-500); }
.b.late    { background: var(--warning-500); }
.b.absent  { background: var(--danger-500); }
.b.leave   { background: var(--info-500); }

/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — MODAL SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  padding: var(--sp-6) var(--sp-4);
  overflow-y: auto;
  animation: backdropFade var(--dur-base) var(--ease-out);
}
.modal-backdrop.show { display: flex; }

@keyframes backdropFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-dialog {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  margin: auto;
  animation: modalIn var(--dur-base) var(--ease-out);
  overflow: hidden;
}
.modal-dialog.large { max-width: 720px; }

@keyframes modalIn {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border-2);
}
.modal-header-content { flex: 1; min-width: 0; }
.modal-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.modal-subtitle {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-top: 3px;
}
.modal-close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  color: var(--text-3);
  background: transparent;
  margin-left: var(--sp-2);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.modal-close:hover { background: var(--surface-2); color: var(--text-1); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body {
  padding: var(--sp-5) var(--sp-6);
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border-2);
  background: var(--surface-2);
}

/* Form grid (inside modal) */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
}
.form-grid.cols-3 { grid-template-columns: 2fr 1fr 1fr; }
.form-grid .field { margin-bottom: 0; }
.form-grid .col-span-2 { grid-column: span 2; }
@media (max-width: 540px) {
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .form-grid .col-span-2 { grid-column: span 1; }
}

/* Info banner inside modal */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  margin-bottom: var(--sp-4);
  border: 1px solid transparent;
}
.info-banner svg { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; }
.info-banner b { font-weight: var(--fw-semibold); }
.info-banner.success { background: var(--success-50); color: var(--success-700); border-color: rgba(16,185,129,0.20); }
.info-banner.warning { background: var(--warning-50); color: var(--warning-700); border-color: rgba(245,158,11,0.20); }
.info-banner.danger  { background: var(--danger-50);  color: var(--danger-700);  border-color: rgba(239,68,68,0.20); }
.info-banner.info    { background: var(--info-50);    color: var(--info-700);    border-color: rgba(59,130,246,0.20); }

[data-theme="dark"] .info-banner.success { background: rgba(16,185,129,0.10); color: #34D399; border-color: rgba(16,185,129,0.20); }
[data-theme="dark"] .info-banner.warning { background: rgba(245,158,11,0.10); color: #FBBF24; border-color: rgba(245,158,11,0.20); }
[data-theme="dark"] .info-banner.danger  { background: rgba(239,68,68,0.10);  color: #F87171; border-color: rgba(239,68,68,0.20); }
[data-theme="dark"] .info-banner.info    { background: rgba(59,130,246,0.10); color: #60A5FA; border-color: rgba(59,130,246,0.20); }

/* Live stat row inside banner */
.banner-stats {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.banner-stats > div { font-size: var(--fs-xs); }
.banner-stats b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — TABS (Filter pills)
   ═══════════════════════════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  width: fit-content;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  background: transparent;
  transition: all var(--dur-fast);
}
.tab:hover { color: var(--text-1); }
.tab.active {
  background: var(--surface);
  color: var(--text-1);
  box-shadow: var(--shadow-xs);
}
.tab .tab-count {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  padding: 1px 5px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.tab.active .tab-count { background: var(--brand-900); color: #fff; }
[data-theme="dark"] .tab.active .tab-count { background: var(--accent-500); }

/* ═══════════════════════════════════════════════════════════════
   PHASE 3 — REQUEST CARDS (Leave/OT history rows)
   ═══════════════════════════════════════════════════════════════ */
.req-list {
  display: flex;
  flex-direction: column;
}
.req-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border-2);
  transition: background var(--dur-fast);
}
.req-item:last-child { border-bottom: 0; }
.req-item:hover { background: var(--surface-2); }

.req-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.req-icon svg { width: 18px; height: 18px; }

.req-icon.sick      { background: var(--danger-50);  color: var(--danger-700); }
.req-icon.annual    { background: var(--success-50); color: var(--success-700); }
.req-icon.personal  { background: var(--info-50);    color: var(--info-700); }
.req-icon.maternity { background: var(--warning-50); color: var(--warning-700); }
.req-icon.ot        { background: var(--warning-50); color: var(--warning-700); }

[data-theme="dark"] .req-icon.sick      { background: rgba(239,68,68,0.12);  color: #F87171; }
[data-theme="dark"] .req-icon.annual    { background: rgba(16,185,129,0.12); color: #34D399; }
[data-theme="dark"] .req-icon.personal  { background: rgba(59,130,246,0.12); color: #60A5FA; }
[data-theme="dark"] .req-icon.maternity { background: rgba(245,158,11,0.12); color: #FBBF24; }
[data-theme="dark"] .req-icon.ot        { background: rgba(245,158,11,0.12); color: #FBBF24; }

.req-content { flex: 1; min-width: 0; }
.req-line-1 {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.req-type {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
}
.req-meta {
  font-size: var(--fs-xs);
  color: var(--text-2);
  line-height: var(--lh-snug);
}
.req-meta b { color: var(--text-1); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.req-actions { display: flex; gap: var(--sp-2); flex-shrink: 0; }

/* Approval workflow visualization */
.approval-flow {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-2xs);
  margin-top: 4px;
}
.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-3);
  border: 1px solid var(--border-2);
}
.flow-step.done { background: var(--success-50); color: var(--success-700); border-color: rgba(16,185,129,0.20); }
.flow-step.active { background: var(--warning-50); color: var(--warning-700); border-color: rgba(245,158,11,0.20); }
.flow-step.rejected { background: var(--danger-50); color: var(--danger-700); border-color: rgba(239,68,68,0.20); }
.flow-step svg { width: 9px; height: 9px; }
.flow-arrow {
  color: var(--text-4);
  font-size: 10px;
  margin: 0 1px;
}
[data-theme="dark"] .flow-step.done { background: rgba(16,185,129,0.12); color: #34D399; }
[data-theme="dark"] .flow-step.active { background: rgba(245,158,11,0.12); color: #FBBF24; }
[data-theme="dark"] .flow-step.rejected { background: rgba(239,68,68,0.12); color: #F87171; }

/* Big "Submit Request" button */
.submit-fab {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: 40px;
  padding: 0 var(--sp-5);
  background: var(--brand-900);
  color: #fff;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-fast);
}
.submit-fab:hover { background: var(--brand-700); transform: translateY(-1px); }
.submit-fab svg { width: 16px; height: 16px; }

/* Hero strip for request pages */
.req-hero {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: var(--sp-5) var(--sp-6);
  margin-bottom: var(--sp-4);
  position: relative;
  overflow: hidden;
}
.req-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(2,132,199,0.30), transparent 60%);
  pointer-events: none;
}
.req-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.req-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  position: relative;
  z-index: 1;
}
@media (max-width: 540px) {
  .req-hero-stats { grid-template-columns: 1fr; }
}
.req-hero-stat {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  backdrop-filter: blur(4px);
}
.req-hero-stat-lbl {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.req-hero-stat-val {
  font-family: var(--font-mono);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.req-hero-stat-sub {
  font-size: var(--fs-2xs);
  opacity: 0.5;
  margin-top: 2px;
}

/* Hero specific tone variants */
.req-hero.ot {
  background: linear-gradient(135deg, #B45309 0%, #D97706 60%, #F59E0B 100%);
}
.req-hero.ot::before {
  background: radial-gradient(circle, rgba(254,243,199,0.20), transparent 60%);
}

/* Pay preview chip */
.pay-preview {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.pay-preview .amt {
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.pay-preview .cur {
  font-size: var(--fs-xs);
  color: var(--text-3);
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 4 — APPROVALS (checkbox, bulk bar, detail modal sections)
   ═══════════════════════════════════════════════════════════════ */

/* Custom checkbox */
.checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--dur-fast);
  flex-shrink: 0;
  position: relative;
}
.checkbox:hover { border-color: var(--accent-500); }
.checkbox.checked {
  background: var(--accent-500);
  border-color: var(--accent-500);
}
.checkbox.checked::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.checkbox.indeterminate {
  background: var(--accent-500);
  border-color: var(--accent-500);
}
.checkbox.indeterminate::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

/* Request row in approval — extends .req-item with checkbox + actions */
.apv-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border-2);
  transition: background var(--dur-fast);
  cursor: pointer;
}
.apv-row:last-child { border-bottom: 0; }
.apv-row:hover { background: var(--surface-2); }
.apv-row.selected { background: var(--accent-50); }
[data-theme="dark"] .apv-row.selected { background: rgba(2,132,199,0.08); }

.apv-row .req-icon { width: 40px; height: 40px; }
.apv-row .req-icon svg { width: 16px; height: 16px; }

.apv-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.apv-actions .btn { height: 32px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }
.apv-actions .btn-icon { width: 32px; padding: 0; }

.btn-approve {
  background: var(--success-500);
  color: #fff;
  border: 1px solid var(--success-700);
}
.btn-approve:hover:not(:disabled) { background: var(--success-700); }
.btn-reject {
  background: var(--surface);
  color: var(--danger-700);
  border: 1px solid var(--border);
}
.btn-reject:hover:not(:disabled) {
  background: var(--danger-50);
  border-color: var(--danger-500);
}
[data-theme="dark"] .btn-reject:hover:not(:disabled) {
  background: rgba(239,68,68,0.10);
  border-color: var(--danger-500);
}

/* Bulk action bar (floating bottom) */
.bulk-bar {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: var(--brand-900);
  color: #fff;
  border-radius: var(--r-full);
  box-shadow: 0 16px 40px rgba(15,23,42,0.30), 0 4px 12px rgba(15,23,42,0.15);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.bulk-bar.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.bulk-bar-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.bulk-bar-count .num {
  background: var(--accent-500);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
}
.bulk-bar-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.15); }
.bulk-bar-actions { display: flex; gap: var(--sp-2); }
.bulk-bar-actions .btn { height: 30px; font-size: var(--fs-xs); }

/* Detail modal — info rows */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-5);
}
@media (max-width: 540px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-item .lbl {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.detail-item .val {
  font-size: var(--fs-sm);
  color: var(--text-1);
  font-weight: var(--fw-semibold);
}
.detail-item .val.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.detail-section {
  padding-top: var(--sp-4);
  margin-top: var(--sp-4);
  border-top: 1px solid var(--border-2);
}
.detail-section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.detail-section-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-3);
}

/* Employee header in detail modal */
.detail-employee {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-5);
}
.detail-employee .avatar { width: 48px; height: 48px; font-size: var(--fs-md); }
.detail-employee-info { flex: 1; min-width: 0; }
.detail-employee-name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.detail-employee-meta { font-size: var(--fs-xs); color: var(--text-2); margin-top: 2px; }

/* Reason box */
.detail-reason {
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  border-left: 3px solid var(--accent-500);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--text-1);
  line-height: var(--lh-relaxed);
  font-style: italic;
}

/* Stats grid for approval hero */
.apv-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (max-width: 768px) { .apv-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .apv-stats { grid-template-columns: 1fr; } }

/* Adjustment-specific styling */
.adj-diff {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}
.adj-diff .old {
  color: var(--text-3);
  text-decoration: line-through;
}
.adj-diff .new {
  color: var(--success-700);
}
.adj-diff svg { width: 11px; height: 11px; color: var(--text-4); }

/* ═══════════════════════════════════════════════════════════════
   PHASE 3.5 — OT MODES (3 tabs) + BREAKDOWN CARD
   ═══════════════════════════════════════════════════════════════ */

/* Mode-tab pills (larger than status tabs, for mode switching) */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
@media (max-width: 720px) { .mode-tabs { grid-template-columns: 1fr; } }

.mode-tab {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-fast);
  text-align: left;
}
.mode-tab:hover { border-color: var(--accent-500); transform: translateY(-1px); }
.mode-tab.active {
  border-color: var(--accent-500);
  background: var(--accent-50);
}
[data-theme="dark"] .mode-tab.active { background: rgba(2,132,199,0.08); }

.mode-tab-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border-radius: var(--r-md);
  color: var(--text-2);
  flex-shrink: 0;
}
.mode-tab-icon svg { width: 18px; height: 18px; }
.mode-tab.active .mode-tab-icon {
  background: var(--accent-500);
  color: #fff;
}

.mode-tab-content { flex: 1; min-width: 0; }
.mode-tab-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  margin-bottom: 2px;
}
.mode-tab-desc {
  font-size: var(--fs-xs);
  color: var(--text-2);
  line-height: var(--lh-snug);
}

/* OT calculation breakdown card */
.breakdown-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.breakdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border-2);
}
.breakdown-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.breakdown-title svg { width: 14px; height: 14px; color: var(--accent-600); }

.daytype-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.daytype-pill svg { width: 10px; height: 10px; }
.daytype-pill.normal  { background: var(--info-50);    color: var(--info-700); }
.daytype-pill.weekend { background: var(--warning-50); color: var(--warning-700); }
.daytype-pill.holiday { background: var(--danger-50);  color: var(--danger-700); }
[data-theme="dark"] .daytype-pill.normal  { background: rgba(59,130,246,0.12); color: #60A5FA; }
[data-theme="dark"] .daytype-pill.weekend { background: rgba(245,158,11,0.12); color: #FBBF24; }
[data-theme="dark"] .daytype-pill.holiday { background: rgba(239,68,68,0.12);  color: #F87171; }

.breakdown-rows { display: flex; flex-direction: column; gap: var(--sp-2); }
.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-sm);
}
.breakdown-row.muted { color: var(--text-3); font-size: var(--fs-xs); }
.breakdown-row b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  color: var(--text-1);
}
.breakdown-row .mult {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  background: var(--accent-50);
  color: var(--accent-700);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}
[data-theme="dark"] .breakdown-row .mult { background: rgba(2,132,199,0.15); color: #38BDF8; }

.breakdown-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.breakdown-total .label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
}
.breakdown-total .amt {
  font-family: var(--font-mono);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--success-700);
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .breakdown-total .amt { color: #34D399; }
.breakdown-total .cur {
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-left: 4px;
}

/* Upload dropzone for Mode 3 */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-10) var(--sp-6);
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--r-xl);
  text-align: center;
  transition: all var(--dur-fast);
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-500);
  background: var(--accent-50);
}
[data-theme="dark"] .dropzone:hover, [data-theme="dark"] .dropzone.dragover { background: rgba(2,132,199,0.08); }
.dropzone-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--accent-50);
  color: var(--accent-700);
  border-radius: 50%;
}
.dropzone-icon svg { width: 24px; height: 24px; }
.dropzone-title { font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--text-1); }
.dropzone-sub   { font-size: var(--fs-sm);   color: var(--text-2); max-width: 380px; line-height: var(--lh-relaxed); }
.dropzone input[type="file"] { display: none; }

/* Auto-detected OT chip */
.auto-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-700));
  color: #fff;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auto-chip svg { width: 10px; height: 10px; }

/* ═══════════════════════════════════════════════════════════════
   PHASE 5 — EMPLOYEES, DIRECTORY, PROFILE, ORG CHART, CONTRACTS
   ═══════════════════════════════════════════════════════════════ */

/* ── Avatar color variants (deterministic from name) ── */
.avatar.c1 { background: linear-gradient(135deg, #3B82F6, #1E40AF); }
.avatar.c2 { background: linear-gradient(135deg, #10B981, #047857); }
.avatar.c3 { background: linear-gradient(135deg, #F59E0B, #B45309); }
.avatar.c4 { background: linear-gradient(135deg, #EC4899, #9D174D); }
.avatar.c5 { background: linear-gradient(135deg, #8B5CF6, #5B21B6); }
.avatar.c6 { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.avatar.c7 { background: linear-gradient(135deg, #EF4444, #B91C1C); }
.avatar.c8 { background: linear-gradient(135deg, #06B6D4, #0E7490); }

/* ── Employee table view ─────────────────────────────── */
.emp-table-toolbar {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
  padding: var(--sp-4);
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
}
.emp-search {
  flex: 1;
  min-width: 220px;
  position: relative;
}
.emp-search .input { padding-left: 36px; }
.emp-search .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.emp-search .input-icon svg { width: 16px; height: 16px; }

.view-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.view-toggle-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: all var(--dur-fast);
}
.view-toggle-btn.active { background: var(--brand-900); color: #fff; }
.view-toggle-btn svg { width: 16px; height: 16px; }

/* ── Directory grid ──────────────────────────────────── */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}
.dir-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-base);
  position: relative;
  overflow: hidden;
}
.dir-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: linear-gradient(135deg, var(--brand-50), var(--accent-50));
  z-index: 0;
}
[data-theme="dark"] .dir-card::before {
  background: linear-gradient(135deg, rgba(2,132,199,0.10), rgba(59,130,246,0.05));
}
.dir-card:hover {
  border-color: var(--accent-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.dir-card > * { position: relative; z-index: 1; }
.dir-card-avatar {
  margin: 0 auto var(--sp-3);
  width: 72px;
  height: 72px;
  border: 4px solid var(--surface);
  font-size: var(--fs-xl);
  box-shadow: var(--shadow-sm);
}
.dir-card-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text-1);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.dir-card-position {
  font-size: var(--fs-xs);
  color: var(--text-2);
  margin-bottom: 2px;
}
.dir-card-dept {
  display: inline-block;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.dir-card-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-2);
}
.dir-card-action {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border-radius: var(--r-md);
  color: var(--text-2);
  transition: all var(--dur-fast);
}
.dir-card-action:hover { background: var(--accent-500); color: #fff; }
.dir-card-action svg { width: 14px; height: 14px; }

/* ── Profile page ────────────────────────────────────── */
.profile-cover {
  position: relative;
  height: 180px;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background:
    linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 50%, var(--accent-700) 100%);
  overflow: hidden;
  margin-bottom: 0;
}
.profile-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 80% 20%, rgba(2,132,199,0.25), transparent 60%),
    radial-gradient(ellipse 400px 200px at 20% 80%, rgba(59,130,246,0.15), transparent 60%),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

.profile-head {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  padding: 0 var(--sp-6) var(--sp-5);
  margin-bottom: var(--sp-4);
  position: relative;
}
.profile-head-flex {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-4);
  margin-top: -56px;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.profile-avatar {
  width: 120px;
  height: 120px;
  border: 5px solid var(--surface);
  font-size: var(--fs-3xl);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}
.profile-id {
  flex: 1;
  min-width: 0;
  padding-bottom: var(--sp-2);
}
.profile-name {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 4px;
}
.profile-position {
  font-size: var(--fs-base);
  color: var(--text-2);
  margin-bottom: 8px;
}
.profile-meta {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.profile-meta .item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.profile-meta svg { width: 13px; height: 13px; }

.profile-actions {
  display: flex;
  gap: var(--sp-2);
  align-self: flex-end;
  padding-bottom: var(--sp-2);
  flex-wrap: wrap;
}

/* Profile tabs */
.profile-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all var(--dur-fast);
}
.profile-tab:hover { color: var(--text-1); }
.profile-tab.active {
  color: var(--accent-700);
  border-bottom-color: var(--accent-500);
  font-weight: var(--fw-semibold);
}
[data-theme="dark"] .profile-tab.active { color: #38BDF8; }
.profile-tab svg { width: 14px; height: 14px; }

/* Profile info rows (key-value pairs) */
.info-row {
  display: flex;
  align-items: center;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-2);
}
.info-row:last-child { border-bottom: 0; }
.info-row .lbl {
  width: 200px;
  flex-shrink: 0;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.info-row .val {
  flex: 1;
  font-size: var(--fs-sm);
  color: var(--text-1);
  font-weight: var(--fw-medium);
}
.info-row .val.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
@media (max-width: 540px) {
  .info-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .info-row .lbl { width: auto; }
}

/* Section card title bar for profile sections */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.section-card h3 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-card h3 svg { width: 16px; height: 16px; color: var(--accent-600); }

/* ── Org Chart ───────────────────────────────────────── */
.org-wrap {
  overflow-x: auto;
  padding: var(--sp-6) var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  scrollbar-width: thin;
}
.org-tree, .org-tree ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.org-tree {
  flex-direction: column;
  align-items: center;
}
.org-tree ul {
  padding-top: 32px;
  justify-content: center;
  gap: var(--sp-4);
}
.org-tree li {
  position: relative;
  padding: 0 var(--sp-2);
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* Down line from parent to children group */
.org-tree li::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 50%;
  width: 2px;
  height: 16px;
  background: var(--border);
}
/* Top-level node has no incoming line */
.org-tree > .org-node:first-child::before { display: none; }
.org-tree li:only-child::before { left: 50%; }
/* Horizontal line connecting siblings */
.org-tree li::after {
  content: '';
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}
.org-tree li:first-child::after { left: 50%; }
.org-tree li:last-child::after { right: 50%; }
.org-tree li:only-child::after { display: none; }

.org-node {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  min-width: 200px;
  cursor: pointer;
  transition: all var(--dur-fast);
  text-align: left;
}
.org-node:hover {
  border-color: var(--accent-500);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.org-node-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.org-node-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  white-space: nowrap;
}
.org-node-role {
  font-size: var(--fs-2xs);
  color: var(--text-3);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.org-node-count {
  margin-left: auto;
  padding: 1px 6px;
  background: var(--accent-50);
  color: var(--accent-700);
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  font-family: var(--font-mono);
}
[data-theme="dark"] .org-node-count { background: rgba(2,132,199,0.12); color: #38BDF8; }

/* Tenure pill */
.tenure-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--success-50);
  color: var(--success-700);
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
}
.tenure-pill svg { width: 11px; height: 11px; }
[data-theme="dark"] .tenure-pill { background: rgba(16,185,129,0.12); color: #34D399; }

/* Two-column layout for profile content */
.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 1024px) { .profile-grid { grid-template-columns: 1fr; } }

/* Contract status pill */
.contract-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
}
.contract-pill.active   { background: var(--success-50); color: var(--success-700); }
.contract-pill.expiring { background: var(--warning-50); color: var(--warning-700); }
.contract-pill.expired  { background: var(--danger-50);  color: var(--danger-700); }
[data-theme="dark"] .contract-pill.active   { background: rgba(16,185,129,0.12); color: #34D399; }
[data-theme="dark"] .contract-pill.expiring { background: rgba(245,158,11,0.12); color: #FBBF24; }
[data-theme="dark"] .contract-pill.expired  { background: rgba(239,68,68,0.12);  color: #F87171; }

/* ═══════════════════════════════════════════════════════════════
   PHASE 6 — PAYROLL
   ═══════════════════════════════════════════════════════════════ */
.payslip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  max-width: 720px;
  margin: 0 auto;
}
.payslip-hero {
  background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
  color: #fff;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.payslip-hero-net {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  line-height: 1;
}
.payslip-hero-net small {
  font-size: 14px;
  opacity: 0.7;
  margin-left: 6px;
}
.payslip-hero-lbl {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-bottom: 6px;
}

.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: var(--fs-sm);
}
.pay-row:last-child { border-bottom: 0; }
.pay-row.total {
  font-weight: var(--fw-bold);
  border-top: 2px solid var(--border);
  border-bottom: 0;
  margin-top: 4px;
  padding-top: 12px;
}
.pay-row.minus .pay-amt { color: var(--danger-700); }
.pay-row.minus .pay-amt::before { content: '−'; margin-right: 2px; }
.pay-row.plus .pay-amt { color: var(--success-700); }
.pay-row.plus .pay-amt::before { content: '+'; margin-right: 2px; }
[data-theme="dark"] .pay-row.minus .pay-amt { color: #F87171; }
[data-theme="dark"] .pay-row.plus  .pay-amt { color: #34D399; }
.pay-amt {
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
}

.pay-section-title {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin: var(--sp-4) 0 var(--sp-2);
}

/* Payroll status pill */
.pr-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--r-full);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pr-status.draft      { background: var(--warning-50); color: var(--warning-700); }
.pr-status.calculated { background: var(--info-50);    color: var(--info-700); }
.pr-status.approved   { background: var(--accent-50);  color: var(--accent-700); }
.pr-status.paid       { background: var(--success-50); color: var(--success-700); }
[data-theme="dark"] .pr-status.draft      { background: rgba(245,158,11,0.12); color: #FBBF24; }
[data-theme="dark"] .pr-status.calculated { background: rgba(59,130,246,0.12); color: #60A5FA; }
[data-theme="dark"] .pr-status.approved   { background: rgba(2,132,199,0.12);  color: #38BDF8; }
[data-theme="dark"] .pr-status.paid       { background: rgba(16,185,129,0.12); color: #34D399; }

/* Money cell helper */
.money {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
}
.money-big {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
}

/* PIT bracket visualizer */
.pit-brackets {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pit-bracket-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: var(--sp-3);
  align-items: center;
  padding: 8px var(--sp-3);
  background: var(--surface-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
}
.pit-bracket-row.applied { background: var(--accent-50); border: 1px solid var(--accent-500); }
[data-theme="dark"] .pit-bracket-row.applied { background: rgba(2,132,199,0.10); border-color: rgba(2,132,199,0.4); }
.pit-bracket-row .rate-pill {
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  background: var(--surface);
  padding: 1px 6px;
  border-radius: var(--r-sm);
  min-width: 40px;
  text-align: center;
}
.pit-bracket-row.applied .rate-pill { background: var(--accent-500); color: #fff; }
.pit-bracket-row .range {
  color: var(--text-2);
  font-family: var(--font-mono);
}

/* ═══ Phase 7 — KPI Score Circle ═══ */
.score-circle {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
}
.score-circle svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.score-circle .track { fill: none; stroke: var(--surface-2); stroke-width: 14; }
.score-circle .fill  { fill: none; stroke: url(#scoreGrad); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.score-circle-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.score-circle-num {
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: var(--fw-bold);
  color: var(--text-1);
  letter-spacing: -0.02em;
  line-height: 1;
}
.score-circle-lbl {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

.kpi-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: var(--sp-3);
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
}
.kpi-row-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--surface);
  color: var(--accent-700);
}
.kpi-row-icon svg { width: 18px; height: 18px; }
.kpi-row-body { min-width: 0; }
.kpi-row-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-1);
  margin-bottom: 6px;
}
.kpi-row-bar {
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.kpi-row-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-500), var(--accent-700));
  transition: width 0.5s ease;
}
.kpi-row-bar-fill.exceeded { background: linear-gradient(90deg, var(--success-500), var(--success-700)); }
.kpi-row-bar-fill.at_risk  { background: linear-gradient(90deg, var(--warning-500), var(--warning-700)); }
.kpi-row-bar-fill.below    { background: linear-gradient(90deg, var(--danger-500), var(--danger-700)); }
.kpi-row-stats {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
  text-align: right;
  white-space: nowrap;
}
.kpi-row-stats b { color: var(--text-1); font-size: var(--fs-sm); }
.kpi-row-weight {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
}

.eval-rating-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--warning-500);
}
.eval-rating-stars svg { width: 14px; height: 14px; }

/* ═══ Phase 6.3 — Payroll Run Wizard Stepper ═══ */
.wiz-stepper {
  display: flex;
  align-items: center;
  margin-bottom: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
  gap: 0;
  overflow-x: auto;
}
.wiz-step {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all var(--dur-fast);
  border-radius: var(--r-md);
  white-space: nowrap;
  font-family: var(--font-ui);
}
.wiz-step:hover { background: var(--surface-2); }
.wiz-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--text-3);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.wiz-step.done .wiz-step-num { background: var(--success-500); color: white; }
.wiz-step.active .wiz-step-num { background: var(--accent-500); color: white; box-shadow: 0 0 0 4px rgba(2,132,199,0.18); }
.wiz-step-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-3);
}
.wiz-step.active .wiz-step-label { color: var(--text-1); }
.wiz-step.done .wiz-step-label { color: var(--success-700); }
.wiz-step-line {
  height: 2px;
  flex: 1;
  background: var(--border);
  min-width: 16px;
  transition: background var(--dur-fast);
}
.wiz-step-line.done { background: var(--success-500); }
.wiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

/* ═══ Phase 15 — Command Palette ═══ */
.cmd-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: cmd-in 0.15s ease;
}
.cmd-overlay.active { display: flex; }
@keyframes cmd-in { from { opacity:0; transform:translateY(-10px) } to { opacity:1; transform:translateY(0) } }
.cmd-panel {
  width: 100%;
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
}
.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.cmd-input-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: var(--fs-base);
  color: var(--text-1);
  font-family: inherit;
}
.cmd-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.cmd-section-label {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 18px 4px;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.cmd-item.active, .cmd-item:hover {
  background: var(--surface-2);
  color: var(--text-1);
}
.cmd-item-icon {
  width: 28px; height: 28px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--accent-700);
  flex-shrink: 0;
}
.cmd-item.active .cmd-item-icon { background: var(--accent-100); }
.cmd-item-icon svg { width: 14px; height: 14px; }
.cmd-item-label { flex: 1; min-width: 0; }
.cmd-item-meta { font-size: var(--fs-2xs); color: var(--text-3); }
.cmd-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: var(--fs-sm);
}
.cmd-footer {
  padding: 8px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: var(--fs-2xs);
  color: var(--text-3);
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}
.cmd-footer kbd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: var(--font-mono);
}

/* ═══ Phase 15 — Notifications Dropdown ═══ */
.notif-panel {
  position: fixed;
  top: 64px;
  right: 20px;
  width: 360px;
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  z-index: 9000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.notif-panel.active { display: flex; }
.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.notif-header h3 {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--text-1);
}
.notif-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item:last-child { border-bottom: 0; }
.notif-icon-wrap {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.notif-icon-wrap.warn { background: rgba(245,158,11,0.12); color: var(--warning-700); }
.notif-icon-wrap.info { background: rgba(14,165,233,0.12); color: var(--accent-700); }
.notif-icon-wrap.success { background: rgba(34,197,94,0.12); color: var(--success-700); }
.notif-icon-wrap.danger { background: rgba(239,68,68,0.12); color: var(--danger-700); }
.notif-text {
  flex: 1; min-width: 0;
  font-size: var(--fs-sm);
  color: var(--text-1);
}
.notif-text-meta {
  font-size: var(--fs-2xs);
  color: var(--text-3);
  margin-top: 3px;
}
.notif-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
  font-size: var(--fs-sm);
}

/* ═══ Phase 15 — AI Assistant ═══ */
.ai-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-700));
  color: white;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(2,132,199,0.35);
  z-index: 8000;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease;
}
.ai-fab:hover { transform: scale(1.08); }
.ai-fab svg { width: 24px; height: 24px; }
.ai-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
  z-index: 8500;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.ai-panel.active { display: flex; }
.ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent-700), var(--accent-500));
  color: white;
}
.ai-header-info { flex: 1; }
.ai-header-title { font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.ai-header-sub { font-size: var(--fs-2xs); opacity: 0.85; }
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-msg { display: flex; gap: 8px; }
.ai-msg.user { flex-direction: row-reverse; }
.ai-msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}
.ai-msg.bot .ai-msg-bubble { background: var(--surface-2); color: var(--text-1); border-bottom-left-radius: 4px; }
.ai-msg.user .ai-msg-bubble { background: var(--accent-700); color: white; border-bottom-right-radius: 4px; }
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-suggest-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: var(--fs-xs);
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.ai-suggest-btn:hover { background: var(--accent-50); border-color: var(--accent-500); color: var(--accent-700); }
.ai-input-wrap {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.ai-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  outline: 0;
  font-size: var(--fs-sm);
  color: var(--text-1);
  background: var(--surface);
  font-family: inherit;
}
.ai-input-wrap input:focus { border-color: var(--accent-500); }
.ai-send-btn {
  background: var(--accent-700);
  color: white;
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ai-send-btn svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════
   PHASE 8.6 — PUBLIC PORTAL (H + I)
   careers.kgs.la-style landing page + status lookup.
   No login required. Premium clean layout, fully responsive.
   ═══════════════════════════════════════════════════════════════ */
#publicView {
  display: none;
  background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 240px);
  min-height: 100vh;
  overflow-y: auto;
}
#publicView.active {
  display: block;
}
.pub-topbar {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.pub-topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.pub-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
}
.pub-brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284C7, #0EA5E9);
  display: grid; place-items: center;
  color: white;
  box-shadow: 0 4px 12px rgba(2,132,199,0.25);
}
.pub-brand-mark i { width: 20px; height: 20px; }
.pub-brand-text { line-height: 1.15; }
.pub-brand-title { font-size: 15px; font-weight: 800; color: #0F172A; letter-spacing: -0.01em; }
.pub-brand-sub { font-size: 11px; color: #64748B; }
.pub-nav { display: flex; gap: var(--sp-2); margin-left: auto; align-items: center; }
.pub-nav-link {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
  background: transparent;
  border: 0;
  font-family: inherit;
}
.pub-nav-link:hover { background: var(--surface-2); color: #0F172A; }
.pub-nav-link.primary {
  background: #0F172A;
  color: white;
}
.pub-nav-link.primary:hover { background: #1E293B; }
.pub-lang-toggle {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  color: #475569;
}

.pub-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px var(--sp-5) 48px;
  text-align: center;
}
.pub-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0284C7;
  font-weight: 700;
  padding: 6px 14px;
  background: #E0F2FE;
  border-radius: 999px;
  margin-bottom: 20px;
}
.pub-headline {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0F172A;
  margin: 0 0 20px;
}
.pub-headline em {
  font-style: normal;
  background: linear-gradient(135deg, #0284C7, #0EA5E9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pub-subhead {
  font-size: 16px;
  color: #475569;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}
.pub-trust {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748B;
}
.pub-trust span { display: flex; align-items: center; gap: 6px; }
.pub-trust b { color: #0F172A; font-weight: 700; }

.pub-jobs-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--sp-5) 64px;
}
.pub-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.pub-section-title {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.01em;
  margin: 0;
}
.pub-section-sub { color: #64748B; font-size: 14px; margin-top: 4px; }
.pub-job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}
.pub-job-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(.2,.9,.3,1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pub-job-card:hover {
  transform: translateY(-2px);
  border-color: #0EA5E9;
  box-shadow: 0 12px 28px -8px rgba(2,132,199,0.18), 0 4px 12px rgba(0,0,0,0.04);
}
.pub-job-card-id {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: #94A3B8;
  letter-spacing: 0.05em;
}
.pub-job-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.pub-job-card-title-sub { font-size: 13px; color: #64748B; margin-top: 3px; }
.pub-job-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #475569;
}
.pub-job-card-meta span { display: flex; align-items: center; gap: 5px; }
.pub-job-card-meta i { width: 13px; height: 13px; color: #94A3B8; }
.pub-job-card-salary {
  font-size: 14px;
  font-weight: 700;
  color: #0F766E;
  font-family: var(--font-mono, monospace);
  padding: 6px 10px;
  background: #F0FDF4;
  border-radius: 6px;
  align-self: flex-start;
}
.pub-job-card-cta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pub-job-card-cta-text {
  font-size: 13px;
  font-weight: 600;
  color: #0284C7;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pub-job-card-cta-text i { width: 14px; height: 14px; transition: transform 0.2s; }
.pub-job-card:hover .pub-job-card-cta-text i { transform: translateX(3px); }
.pub-job-card-posted { font-size: 11px; color: #94A3B8; }

.pub-empty {
  text-align: center;
  padding: 64px 20px;
  background: white;
  border: 1px dashed var(--border);
  border-radius: 14px;
}
.pub-empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: #F1F5F9;
  border-radius: 50%;
  display: grid; place-items: center;
}
.pub-empty-icon i { width: 24px; height: 24px; color: #94A3B8; }

/* JD detail page */
.pub-jd {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px var(--sp-5) 64px;
}
.pub-jd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #0284C7;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 20px;
  font-family: inherit;
  font-weight: 500;
}
.pub-jd-back:hover { text-decoration: underline; }
.pub-jd-header {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
}
.pub-jd-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.01em;
  margin: 8px 0 4px;
  line-height: 1.2;
}
.pub-jd-header h2 {
  font-size: 16px;
  font-weight: 500;
  color: #64748B;
  margin: 0 0 18px;
}
.pub-jd-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 18px;
}
.pub-jd-meta-grid > div { font-size: 13px; }
.pub-jd-meta-grid > div span { color: #94A3B8; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 4px; }
.pub-jd-meta-grid > div b { color: #0F172A; font-weight: 600; }
.pub-jd-apply-btn {
  background: #0284C7;
  color: white;
  border: 0;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
}
.pub-jd-apply-btn:hover { background: #0369A1; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(2,132,199,0.3); }
.pub-jd-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 18px;
}
.pub-jd-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.pub-jd-section ul { padding-left: 20px; margin: 0; color: #334155; line-height: 1.8; font-size: 14px; }
.pub-jd-section p { color: #334155; line-height: 1.7; font-size: 14px; margin: 0; }

/* Status lookup */
.pub-status-card {
  max-width: 540px;
  margin: 48px auto 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}
.pub-status-card h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.pub-status-card p { color: #64748B; font-size: 13px; margin: 0 0 20px; line-height: 1.6; }
.pub-status-field { margin-bottom: 14px; }
.pub-status-field label { display: block; font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.pub-status-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-mono, monospace);
  color: #0F172A;
  background: white;
  box-sizing: border-box;
}
.pub-status-field input:focus { outline: 0; border-color: #0EA5E9; box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }
.pub-status-submit {
  width: 100%;
  background: #0F172A;
  color: white;
  border: 0;
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  font-family: inherit;
}
.pub-status-submit:hover { background: #1E293B; }

.pub-status-result {
  max-width: 720px;
  margin: 48px auto 0;
}
.pub-status-stages {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 28px 0 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  margin-top: 20px;
}
.pub-stage-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
  font-size: 12px;
  color: #64748B;
}
.pub-stage-step .pub-stage-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  z-index: 2;
  position: relative;
  color: #94A3B8;
}
.pub-stage-step .pub-stage-dot i { width: 14px; height: 14px; }
.pub-stage-step.done .pub-stage-dot { background: #16A34A; border-color: #16A34A; color: white; }
.pub-stage-step.current .pub-stage-dot { background: #0284C7; border-color: #0284C7; color: white; box-shadow: 0 0 0 5px rgba(2,132,199,0.18); }
.pub-stage-step.rejected .pub-stage-dot { background: #DC2626; border-color: #DC2626; color: white; }
.pub-stage-step.current { color: #0284C7; font-weight: 700; }
.pub-stage-step.done { color: #15803D; font-weight: 600; }
.pub-stage-step.rejected { color: #B91C1C; font-weight: 700; }
.pub-stage-connector {
  position: absolute;
  top: calc(32px + 16px);
  left: calc(50% + 16px);
  right: calc(-50% + 16px);
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.pub-stage-connector.done { background: #16A34A; }
.pub-stage-step:last-child .pub-stage-connector { display: none; }

.pub-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 36px var(--sp-5);
  margin-top: 64px;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}
.pub-footer b { color: white; font-weight: 700; }

@media (max-width: 640px) {
  .pub-topbar-inner { padding: var(--sp-2) var(--sp-3); flex-wrap: wrap; }
  .pub-nav-link { font-size: 12px; padding: 6px 10px; }
  .pub-hero { padding: 40px var(--sp-3) 32px; }
  .pub-trust { gap: 16px; font-size: 11px; }
  .pub-jobs-section { padding: 0 var(--sp-3) 40px; }
  .pub-job-grid { grid-template-columns: 1fr; }
  .pub-jd { padding: 24px var(--sp-3) 40px; }
  .pub-jd-header, .pub-jd-section, .pub-status-card { padding: 20px; }
  .pub-status-stages { padding: 20px 14px; }
  .pub-stage-step { font-size: 10px; }
  .pub-stage-step .pub-stage-dot { width: 28px; height: 28px; }
}

/* Dark mode public portal */
:root[data-theme="dark"] #publicView { background: linear-gradient(180deg, #0B1220 0%, #020617 320px); }
:root[data-theme="dark"] .pub-topbar { background: rgba(11,18,32,0.85); border-bottom-color: #1E293B; }
:root[data-theme="dark"] .pub-brand-title { color: #F8FAFC; }
:root[data-theme="dark"] .pub-eyebrow { background: rgba(2,132,199,0.18); }
:root[data-theme="dark"] .pub-headline { color: #F8FAFC; }
:root[data-theme="dark"] .pub-subhead, :root[data-theme="dark"] .pub-section-sub { color: #94A3B8; }
:root[data-theme="dark"] .pub-section-title { color: #F8FAFC; }
:root[data-theme="dark"] .pub-job-card, :root[data-theme="dark"] .pub-jd-header, :root[data-theme="dark"] .pub-jd-section, :root[data-theme="dark"] .pub-status-card, :root[data-theme="dark"] .pub-status-stages, :root[data-theme="dark"] .pub-empty { background: #0F172A; border-color: #1E293B; }
:root[data-theme="dark"] .pub-job-card-title, :root[data-theme="dark"] .pub-jd-header h1, :root[data-theme="dark"] .pub-jd-section h3, :root[data-theme="dark"] .pub-status-card h2 { color: #F8FAFC; }
:root[data-theme="dark"] .pub-jd-section p, :root[data-theme="dark"] .pub-jd-section ul { color: #CBD5E1; }
:root[data-theme="dark"] .pub-status-field input { background: #0B1220; color: #F8FAFC; border-color: #1E293B; }
:root[data-theme="dark"] .pub-job-card-salary { background: rgba(16,185,129,0.12); color: #6EE7B7; }
