/* ══════════════════════════════════════════════════════════════════════════
   LEATT LEAVE — design system
   Athletic / technical. Bold red, grotesk type, mono data labels.
   Theming is driven by CSS vars set on #root (overridden by Tweaks).
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --accent-h: 27;
  --accent: oklch(0.575 0.215 var(--accent-h));
  --accent-press: oklch(0.50 0.205 var(--accent-h));
  --accent-soft: oklch(0.575 0.215 var(--accent-h) / 0.14);
  --accent-line: oklch(0.575 0.215 var(--accent-h) / 0.45);
  --on-accent: #fff;

  --radius: 14px;
  --radius-sm: 9px;
  --gap: 22px;

  --ff-sans: "Archivo", system-ui, sans-serif;
  --ff-mono: "Space Mono", ui-monospace, monospace;

  --shadow: 0 1px 2px rgba(0,0,0,0.18), 0 12px 30px -16px rgba(0,0,0,0.45);

  --sidebar-w: 252px;
}

/* ── DARK (Race) ── */
[data-theme="dark"] {
  --bg: #0d0e11;
  --bg-grad: radial-gradient(1200px 700px at 88% -12%, oklch(0.575 0.215 var(--accent-h) / 0.10), transparent 60%);
  --surface: #15171b;
  --surface-2: #1c1f25;
  --surface-3: #23272e;
  --line: rgba(255,255,255,0.085);
  --line-strong: rgba(255,255,255,0.16);
  --text: #ededeb;
  --text-dim: #9b9ea5;
  --text-faint: #686c73;
  --on-chip: #ededeb;
  scrollbar-color: #2a2e35 transparent;
}

/* ── LIGHT (Track) ── */
[data-theme="light"] {
  --bg: #efedea;
  --bg-grad: radial-gradient(1200px 700px at 88% -12%, oklch(0.575 0.215 var(--accent-h) / 0.08), transparent 60%);
  --surface: #ffffff;
  --surface-2: #f7f5f2;
  --surface-3: #efece7;
  --line: rgba(20,18,16,0.10);
  --line-strong: rgba(20,18,16,0.20);
  --text: #16171a;
  --text-dim: #5d6066;
  --text-faint: #92959b;
  --on-chip: #16171a;
  scrollbar-color: #cfccc7 transparent;
}

/* ── PIT (red-forward dark) ── */
[data-theme="pit"] {
  --bg: #120a0b;
  --bg-grad: radial-gradient(1200px 760px at 85% -16%, oklch(0.575 0.215 var(--accent-h) / 0.22), transparent 58%);
  --surface: #1c1213;
  --surface-2: #241718;
  --surface-3: #2e1c1e;
  --line: oklch(0.575 0.215 var(--accent-h) / 0.18);
  --line-strong: oklch(0.575 0.215 var(--accent-h) / 0.34);
  --text: #f3eae9;
  --text-dim: #b69a99;
  --text-faint: #7c5f5f;
  --on-chip: #f3eae9;
  scrollbar-color: #3a2426 transparent;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--ff-sans);
  background: #0d0e11;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { min-height: 100vh; }
/* theme tokens live on the wrapper (carries data-theme) so they cascade to
   the app AND the modal/toast that sit outside .app */
.themeroot { min-height: 100vh; background: var(--bg); color: var(--text); }
::selection { background: var(--accent); color: var(--on-accent); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

.mono { font-family: var(--ff-mono); }
.up   { text-transform: uppercase; letter-spacing: 0.08em; }

/* ── App shell ─────────────────────────────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  background: var(--bg);
  background-image: var(--bg-grad);
}
.app[data-layout="top"] { grid-template-columns: 1fr; }

/* Sidebar */
.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  backdrop-filter: blur(8px);
  padding: 22px 16px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 22px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  box-shadow: 0 6px 18px -8px var(--accent);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.35), transparent 45%);
}
.brand-mark span {
  font-family: var(--ff-sans); font-weight: 900; color: var(--on-accent);
  font-size: 20px; transform: skewX(-9deg); z-index: 1; line-height: 1;
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; line-height: 1; }
.brand-sub { font-size: 19.2px; font-weight: 700; letter-spacing: 0.05em; color: var(--text); margin-top: 4px; text-align: center; display: inline-block; position: relative; padding-bottom: 5px; }
.brand-sub::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; border-radius: 3px; background: var(--accent); }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.nav-label { font-size: 15px; letter-spacing: 0.16em; color: var(--text); font-weight: 800; display: inline-block; position: relative; margin: 14px 12px 0; padding: 0 0 4px; }
.nav-label::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; border-radius: 3px; background: var(--accent); }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text-dim); font-weight: 600; font-size: 14px;
  text-align: left; width: 100%;
  text-decoration: none;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item:focus { text-decoration: none; }
.nav-item.active { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px -12px var(--accent); }
.nav-item.active .nav-ico { opacity: 1; }
.nav-ico { width: 18px; height: 18px; opacity: .7; flex: none; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}
.nav-item.active .nav-badge { background: rgba(255,255,255,0.25); }

.sidebar-foot { margin-top: auto; padding-top: 16px; }
.user-card {
  display: flex; align-items: center; gap: 11px;
  padding: 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface);
}
.avatar {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  background: var(--surface-3); color: var(--text);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  border: 1px solid var(--line-strong);
}
.avatar.accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }

/* Topbar layout variant */
.topnav {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 26px;
  padding: 0 30px; height: 64px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 78%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.topnav .nav { flex-direction: row; gap: 4px; margin: 0; }
.topnav .nav-item { width: auto; padding: 8px 14px; }
.topnav .nav-label, .topnav .sidebar-foot { display: none; }

/* ── Main ──────────────────────────────────────────────────────────────── */
.main { min-width: 0; padding: 22px 38px 64px; position: relative; }
.app[data-density="compact"] .main { padding: 22px 28px 52px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.eyebrow { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase; }
h1.title { font-family: var(--ff-mono); text-transform: uppercase; font-size: clamp(18px, 2.2vw, 27px); font-weight: 700; letter-spacing: 0.04em; margin: 7px 0 0; line-height: 1.15; padding-bottom: 8px; position: relative; }
h1.title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; border-radius: 3px; background: var(--accent); }
.page-sub { color: var(--text-dim); margin: 9px 0 0; font-size: 15px; max-width: 56ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 11px; font-weight: 700; font-size: 14px;
  border: 1px solid var(--line-strong); color: var(--text); background: var(--surface);
  transition: transform .08s, background .14s, border-color .14s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 10px 26px -14px var(--accent); }
.btn-primary:hover { background: var(--accent-press); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }

/* Cards & grids */
.grid { display: grid; gap: var(--gap); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.app[data-density="compact"] .card { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.card-eyebrow { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint); }

/* Balance cards */
.balance-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px){ .balance-grid { grid-template-columns: repeat(2, 1fr) !important; } }
.bal {
  position: relative;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: inset 4px 0 0 var(--accent), var(--shadow);
}
.bal-top { display: flex; align-items: center; justify-content: space-between; }
.bal-tag { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--text-faint); }
.bal-type { font-weight: 700; font-size: 15px; margin-top: 14px; }
.bal-num { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.bal-num small { font-size: 15px; font-weight: 600; color: var(--text-dim); margin-left: 4px; letter-spacing: 0; }
.bal-meter { height: 6px; border-radius: 99px; background: var(--surface-3); margin-top: 16px; overflow: hidden; }
.bal-meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.bal-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-top: 9px; }

/* Lists / rows (renamed from .row to avoid Bootstrap collision) */
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 4px; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }
.row-main { min-width: 0; flex: 1; }
.row-title { font-weight: 600; font-size: 14px; }
.row-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.row-meta { font-family: var(--ff-mono); font-size: 12px; color: var(--text-faint); text-align: right; white-space: nowrap; }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; font-family: var(--ff-mono); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.pill.approved { color: oklch(0.72 0.16 150); background: oklch(0.72 0.16 150 / 0.12); }
.pill.pending  { color: oklch(0.78 0.14 75);  background: oklch(0.78 0.14 75 / 0.13); }
.pill.rejected { color: oklch(0.66 0.20 25);   background: oklch(0.66 0.20 25 / 0.13); }

/* type chip */
.tchip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.tdot { width: 9px; height: 9px; border-radius: 3px; background: var(--accent); flex: none; }

/* Team avatars list */
.team-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.team-row:last-child { border-bottom: none; }
.dot-status { width: 8px; height: 8px; border-radius: 99px; flex: none; }
.dot-status.in { background: oklch(0.72 0.16 150); }
.dot-status.out { background: var(--accent); }

/* Calendar */
.cal { width: 100%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--text-faint); text-align: center; padding-bottom: 6px; text-transform: uppercase; }
.cal-cell {
  aspect-ratio: 1 / 0.92; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); padding: 7px 8px; position: relative;
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.cal-cell.muted { opacity: 0.4; }
.cal-cell.today { border-color: var(--accent-line); box-shadow: inset 0 0 0 1px var(--accent-line); }
.cal-cell.weekend { background: color-mix(in oklab, var(--surface-2) 60%, var(--bg)); }
.cal-num { font-family: var(--ff-mono); font-size: 12px; color: var(--text-dim); }
.cal-cell.today .cal-num { color: var(--accent); font-weight: 700; }
.cal-ev { font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.muted-ev { background: var(--surface-3); color: var(--text-dim); }
.cal-ev.holiday { background: oklch(0.78 0.14 75 / 0.16); color: oklch(0.78 0.14 75); }

/* Stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.stat { background: var(--surface); padding: 11px 20px; }
.stat-num { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-lab { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-top: 2px; }

/* Modal */
.scrim { position: fixed; inset: 0; background: rgba(6,6,8,0.6); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; z-index: 60; animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7); overflow: hidden; animation: pop .18s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 22px 24px; display: grid; gap: 18px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); }
.x-btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--text-dim); }
.x-btn:hover { background: var(--surface-2); color: var(--text); }

.field { display: grid; gap: 8px; }
.field > label { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--text-dim); text-transform: uppercase; font-family: var(--ff-mono); }
.input, .select, .textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 11px 13px; color: var(--text); font-size: 14px; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 78px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* type selector chips in modal */
.type-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.type-opt { padding: 9px 13px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); font-weight: 700; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; transition: .12s; }
.type-opt:hover { border-color: var(--line-strong); }
.type-opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.type-opt .tdot { background: currentColor; }

.calc-line { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 15px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.calc-line b { font-size: 22px; font-weight: 800; color: var(--accent); }

/* empty state */
.empty { text-align: center; color: var(--text-dim); padding: 40px 10px; }
.empty .mono { color: var(--text-faint); font-size: 12px; }

/* toast */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 11px; font-weight: 700; font-size: 13.5px; box-shadow: 0 16px 40px -16px rgba(0,0,0,0.6); display: flex; align-items: center; gap: 10px; animation: pop .2s; }
.toast .tdotok { width: 8px; height: 8px; border-radius: 99px; background: var(--accent); }

/* segmented filter */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 7px 13px; border-radius: 7px; font-size: 13px; font-weight: 700; color: var(--text-dim); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* approvals card */
.appr { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.appr + .appr { margin-top: 12px; }
.appr-actions { display: flex; gap: 8px; margin-left: auto; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-strong); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.ok:hover { background: oklch(0.72 0.16 150 / 0.15); border-color: oklch(0.72 0.16 150 / 0.5); color: oklch(0.72 0.16 150); }
.icon-btn.no:hover { background: oklch(0.66 0.20 25 / 0.15); border-color: oklch(0.66 0.20 25 / 0.5); color: oklch(0.66 0.20 25); }

/* progress ring wrap on dashboard hero */
.hero { grid-template-columns: 1.3fr 1fr; align-items: stretch; }
@media (max-width: 980px){ .hero { grid-template-columns: 1fr; } }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: block; box-shadow: inset 0 3px 0 var(--accent), var(--shadow); }
.hero-num { font-size: clamp(48px, 6vw, 68px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-top: 16px; font-variant-numeric: tabular-nums; }
.hero-num small { font-size: 15px; font-weight: 600; color: var(--text-dim); margin-left: 10px; letter-spacing: 0; }
.hero-foot { margin-top: 24px; }
.hero-next { font-size: 14.5px; font-weight: 600; color: var(--text-dim); }
.hero-stats { display: flex; gap: 28px; margin-top: 16px; }
.hero-stat-n { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero-stat-l { font-size: 10px; letter-spacing: 0.14em; color: var(--text-faint); text-transform: uppercase; margin-top: 3px; }

/* responsive collapse of sidebar */
@media (max-width: 820px){
  .app { grid-template-columns: 1fr; }

  /* sidebar -> off-canvas drawer */
  .sidebar:not(.topnav){
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 284px; max-width: 86vw;
    height: 100vh; height: 100dvh;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.2,.9,.3,1);
    z-index: 1100; overflow-y: auto;
    background: var(--surface); backdrop-filter: none;
    box-shadow: 0 0 60px rgba(0,0,0,.45);
  }
  body.nav-open .sidebar:not(.topnav){ transform: translateX(0); }
  body.nav-open { overflow: hidden; }

  .nav-scrim{
    display: block !important; position: fixed; inset: 0; z-index: 1090;
    background: rgba(10,8,6,.5); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .26s ease;
  }
  body.nav-open .nav-scrim{ opacity: 1; pointer-events: auto; }

  /* sticky top bar with hamburger + logo + log off */
  .mobile-bar{
    display: flex !important; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 50;
    margin: -14px -16px 14px; padding: 10px 14px;
    background: color-mix(in oklab, var(--surface) 90%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .logoff-float{ display: none !important; }

  .main{ padding: 14px 16px 48px; }
  .page-head{ margin-bottom: 16px; }

  /* reflow the employee leave flow to a single column */
  .hero{ grid-template-columns: 1fr; }
  .balance-grid{ grid-template-columns: repeat(2,1fr) !important; }
  .field-row{ grid-template-columns: 1fr; }
  .type-opt{ flex: 1 1 calc(50% - 8px); justify-content: center; }
  .form-actions .btn{ flex: 1; justify-content: center; }
}

/* two-col main layout */
.two-col { grid-template-columns: 1fr 340px; align-items: start; }
@media (max-width: 1180px){ .two-col { grid-template-columns: 1fr; } }


/* ════════════════════════════════════════════════════════════════════════
   Bootstrap compatibility bridge
   Pages still using Bootstrap markup (settings, user-mgmt, audit, modals)
   inherit theme tokens so they blend with the design system.
   ════════════════════════════════════════════════════════════════════════ */

/* Card header/body/footer (Bootstrap) inside our themed .card */
.card-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  color: var(--text);
  font-weight: 700;
}
.card-header h5 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.card-body { padding: 20px; }
.card-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 14px 20px;
}

/* Tables */
.table { color: var(--text); --bs-table-bg: transparent; margin: 0; }
.table > thead th,
.table .table-light,
.table .table-light > * {
  background: var(--surface-2) !important;
  color: var(--text-dim) !important;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 700; border-color: var(--line) !important;
}
.table > :not(caption) > * > * {
  border-bottom-color: var(--line);
  color: var(--text);
}
.table-hover > tbody > tr:hover > * { background: var(--surface-2); color: var(--text); }

/* Form controls */
.form-control, .form-select {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  background: var(--surface-2);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  color: var(--text);
}
.form-control::placeholder { color: var(--text-faint); }
.form-label { color: var(--text-dim); font-weight: 600; font-size: 13px; }
.form-text { color: var(--text-faint); }
.input-group-text {
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
}

/* Bootstrap buttons → theme */
.btn-outline-secondary {
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
}
.btn-outline-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-outline-primary {
  color: var(--text); border: 1px solid var(--line-strong); background: var(--surface);
  border-radius: var(--radius-sm);
}
.btn-outline-primary:hover { background: var(--surface-2); color: var(--text); }
.btn-success { background: oklch(0.62 0.15 150); border-color: transparent; color: #fff; }
.btn-danger { background: var(--accent); border-color: transparent; color: #fff; }
.btn-secondary { background: var(--surface-3); border-color: var(--line-strong); color: var(--text); }

/* Badges */
.badge.bg-secondary { background: var(--surface-3) !important; color: var(--text-dim) !important; font-weight: 600; }
.badge.bg-success { background: oklch(0.72 0.16 150 / 0.15) !important; color: oklch(0.5 0.16 150) !important; }
.badge.bg-info { background: var(--accent-soft) !important; color: var(--accent) !important; }

/* Bootstrap modals → theme */
.modal-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
}
.modal-header { border-bottom: 1px solid var(--line); padding: 18px 22px; }
.modal-title { font-weight: 700; }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--line); padding: 14px 22px; background: var(--surface-2); }
.btn-close { filter: none; }

/* small dot used in legacy pages */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: middle; }

/* progress bars (leave_request legacy) */
.progress { background: var(--surface-3); border-radius: 99px; }

/* Bootstrap grid spacing helpers already provided by Bootstrap CSS (still loaded) */

/* Public holidays block in sidebar */
.holidays-block { margin-top: 24px; }
/* PUBLIC HOLIDAYS heading — full-width underline like the other side labels. */
.holidays-block .nav-label {
  display: block;
  margin: 0 12px; padding: 0 0 4px;
}
.holidays-block .nav-label::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.holiday-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.holiday-item {
  display: flex; align-items: baseline; gap: 9px;
  padding: 6px 12px; border-radius: 8px;
}
.holiday-item:hover { background: var(--surface-2); }
.holiday-date {
  font-size: 11px; font-weight: 700; color: var(--accent);
  flex: none; min-width: 44px;
}
.holiday-name {
  font-size: 12px; color: var(--text-dim); line-height: 1.25;
}

/* Floating Log off cluster — top-right, vertically centred against the heading.
   Holds an optional left slot (e.g. admin year selector), then the Log off. */
.logoff-float {
  position: absolute;
  top: 28px;
  right: 38px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ── Mobile nav (employee leave flow) ─────────────────────────────────────
   Desktop is untouched; below 820px (see media query) the sidebar becomes an
   off-canvas drawer opened from this sticky bar. These are hidden by default. */
.mobile-bar { display: none; }
.nav-scrim { display: none; }
.hamburger {
  font-size: 26px; line-height: 1; color: var(--text);
  padding: 4px 8px; border-radius: 9px;
  display: inline-flex; align-items: center;
}
.hamburger:hover { background: var(--surface-2); }
.mobile-brand { margin-right: auto; display: inline-flex; align-items: center; text-decoration: none; }
.mobile-brand img { height: 30px; width: auto; }
.form-actions { display: flex; gap: 10px; }

/* Fully-rounded pill inputs for the "add new" rows in settings tables */
.input-pill { border-radius: 999px !important; }

/* ── Leatt themed confirm dialog ─────────────────────────────────────────── */
.leatt-confirm-backdrop {
  position: fixed; inset: 0; z-index: 1080;
  background: rgba(20, 18, 16, 0.45);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; transition: opacity .16s ease;
}
/* display:grid above would override the hidden attribute, leaving an invisible
   click-blocking overlay — force hidden to win. */
.leatt-confirm-backdrop[hidden] { display: none !important; }
.leatt-confirm-backdrop.open { opacity: 1; }
.leatt-confirm {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  transform: translateY(10px) scale(.97);
  transition: transform .16s cubic-bezier(.2, .9, .3, 1.2);
}
.leatt-confirm-backdrop.open .leatt-confirm { transform: none; }
.leatt-confirm__body { display: flex; gap: 14px; align-items: flex-start; padding: 22px 24px 18px; }
.leatt-confirm__icon { color: var(--accent); font-size: 26px; line-height: 1; }
.leatt-confirm__title { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.leatt-confirm__msg { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin-top: 5px; }
.leatt-confirm__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 24px;
  background: var(--surface-2); border-top: 1px solid var(--line);
}

/* Small red archive button on each user row (A ›) */
.btn-archive {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  font-weight: 800; font-size: 12px; line-height: 1; padding: 6px 8px;
  display: inline-flex; align-items: center; gap: 1px; cursor: pointer;
}
.btn-archive:hover { background: #b80510; color: #fff; }
.btn-archive .bi { font-size: 10px; }

/* Little red bin — permanent delete (Archived Users page).
   Vertical metrics match .btn-sm so it lines up with the Restore button. */
.btn-bin {
  background: transparent; color: var(--accent);
  border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 8px 11px; line-height: 1.5; cursor: pointer;
  display: inline-flex; align-items: center; font-size: 13px;
  margin-left: 6px; vertical-align: middle;
}
.btn-bin:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Neutral key button — opens the change-password popup (User management) */
.btn-key {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 8px 11px; line-height: 1.5; cursor: pointer;
  display: inline-flex; align-items: center; font-size: 13px;
  margin-right: 6px; vertical-align: middle;
}
.btn-key:hover { background: var(--surface-2); color: var(--text); }

/* Request-leave nav CTA: red text when NOT active; active state handled by .nav-item.active */
.nav-item-cta { color: var(--accent) !important; font-weight: 700 !important; }
.nav-item-cta .nav-ico { color: var(--accent); opacity: 1 !important; }

/* ── Leatt themed toast popups ───────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: none;
}
.leatt-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  min-width: 300px; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(15,23,42,0.16), 0 4px 12px rgba(15,23,42,0.08);
  padding: 14px 16px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform .28s cubic-bezier(.2,.9,.3,1.2), opacity .28s ease;
}
.leatt-toast--in { transform: translateX(0); opacity: 1; }
.leatt-toast--out { transform: translateX(120%); opacity: 0; }

.leatt-toast__icon {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; font-size: 1.05rem;
  background: var(--accent-soft); color: var(--accent);
}
.leatt-toast__msg {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35;
}
.leatt-toast__close {
  flex: none; border: none; background: none; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--text-faint);
  padding: 0 2px; transition: color .12s;
}
.leatt-toast__close:hover { color: var(--text); }

/* category accents */
.leatt-toast--success { border-left-color: oklch(0.72 0.16 150); }
.leatt-toast--success .leatt-toast__icon { background: oklch(0.72 0.16 150 / 0.14); color: oklch(0.5 0.16 150); }
.leatt-toast--warning { border-left-color: oklch(0.78 0.14 75); }
.leatt-toast--warning .leatt-toast__icon { background: oklch(0.78 0.14 75 / 0.16); color: oklch(0.55 0.14 75); }
.leatt-toast--danger  { border-left-color: var(--accent); }
.leatt-toast--info    { border-left-color: var(--accent); }

@media (max-width: 600px) {
  .toast-stack { left: 14px; right: 14px; bottom: 14px; }
  .leatt-toast { min-width: 0; max-width: none; }
}
