/* LeftLion Staff HR portal: tokens + components (maps 1:1 to a Tailwind theme) */
.ll{
  --bg:#F6F5F2; --surface:#FFFFFF; --surface-2:#EFEDE8; --line:#DEDBD4; --line-strong:#A8A49B;
  --text:#18181B; --text-2:#54545B; --primary:#18181B; --on-primary:#FFFFFF;
  --brand:#FFD12E; --on-brand:#18181B; --focus:#1D4ED8; --link:#1D4ED8;
  --danger:#B42318; --on-danger:#FFFFFF;
  --pending-bg:#FFF1CC; --pending-fg:#7A4A00;
  --approved-bg:#DDF2E4; --approved-fg:#17603A;
  --declined-bg:#FBE2DF; --declined-fg:#A3231F;
  --cancelled-bg:#ECEAE6; --cancelled-fg:#54545B;
  --annual:#2F5BD3; --annual-bg:#E4EBFD; --annual-fg:#1E3F9E;
  --closure:#6B6862; --closure-bg:#ECEAE6;
  --ooo:#7A55C2; --ooo-bg:#EEE8F9; --ooo-fg:#4B2F86;
  --bank:#B45309;
  --today:#18181B;
  container-type:inline-size; background:var(--bg); color:var(--text);
  font-family:Inter,system-ui,sans-serif; font-size:16px; line-height:1.5; min-height:100%;
  -webkit-font-smoothing:antialiased;
}
.ll[data-theme=dark]{
  --bg:#111113; --surface:#1B1B1F; --surface-2:#26262C; --line:#34343B; --line-strong:#6A6A73;
  --text:#F2F1ED; --text-2:#B0AFB5; --primary:#F2F1ED; --on-primary:#111113;
  --focus:#8AB4FF; --link:#9DBDFF; --danger:#FF8F87; --on-danger:#2A0906;
  --pending-bg:#3A2E0F; --pending-fg:#FFD47E;
  --approved-bg:#123021; --approved-fg:#86DCA8;
  --declined-bg:#3D1715; --declined-fg:#FFA39C;
  --cancelled-bg:#2A2A30; --cancelled-fg:#BAB9BF;
  --annual:#6E93FF; --annual-bg:#1A2650; --annual-fg:#B4C8FF;
  --closure:#A9A6A0; --closure-bg:#2A2A30;
  --ooo:#AE8CF5; --ooo-bg:#2B2148; --ooo-fg:#D3C2FF;
  --bank:#F5A35B; --today:#F2F1ED;
}
.ll *,.ll *::before,.ll *::after{box-sizing:border-box}
.ll a{color:var(--link)}
.ll :focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:8px}
.ll h1,.ll h2,.ll h3,.ll h4,.ll p,.ll ul,.ll ol,.ll dl,.ll dd,.ll figure{margin:0}
.ll ul,.ll ol{padding:0;list-style:none}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* type scale */
.t-display{font-family:Archivo,Inter,sans-serif;font-weight:800;font-size:40px;line-height:44px;letter-spacing:-.02em}
.t-h1{font-family:Archivo,Inter,sans-serif;font-weight:800;font-size:26px;line-height:32px;letter-spacing:-.01em}
.t-h2{font-family:Archivo,Inter,sans-serif;font-weight:700;font-size:20px;line-height:26px}
.t-h3{font-weight:600;font-size:17px;line-height:24px}
.t-body{font-size:16px;line-height:24px}
.t-small{font-size:14px;line-height:20px}
.t-label{font-size:13px;line-height:16px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--text-2)}
.t-num{font-family:Archivo,Inter,sans-serif;font-weight:800;font-variant-numeric:tabular-nums}
.muted{color:var(--text-2)}
.strong{font-weight:600}
@container (min-width:900px){.t-h1{font-size:32px;line-height:38px}.t-display{font-size:48px;line-height:52px}}

/* layout */
.row{display:flex;align-items:center;gap:12px}
.row-wrap{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.between{justify-content:space-between}
.stack{display:flex;flex-direction:column;gap:16px}
.stack-sm{display:flex;flex-direction:column;gap:8px}
.stack-lg{display:flex;flex-direction:column;gap:24px}
.grow{flex:1 1 auto;min-width:0}
.grid-2,.grid-3,.layout{display:grid;gap:16px;grid-template-columns:minmax(0,1fr)}
@container (min-width:640px){.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container (min-width:900px){.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.layout{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:24px;align-items:start}}
.divider{height:1px;background:var(--line);border:0;margin:0}

/* app shell */
.topbar{display:flex;align-items:center;gap:12px;padding:8px 16px;min-height:60px;background:var(--surface);border-bottom:1px solid var(--line)}
.wordmark{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:var(--text)}
.wordmark b{font-family:Archivo,Inter,sans-serif;font-weight:800;font-size:21px;letter-spacing:-.03em}
.wordmark span{background:var(--brand);color:var(--on-brand);font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:2px 6px;border-radius:4px}
.topnav{display:none;gap:4px;margin-left:16px}
.topnav a{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border-radius:8px;color:var(--text-2);text-decoration:none;font-weight:500;font-size:15px}
.topnav a[aria-current=page]{color:var(--text);background:var(--surface-2);font-weight:600}
.tabbar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:var(--surface);border-top:1px solid var(--line);position:sticky;bottom:0}
.tabbar a{position:relative;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;font-weight:500;color:var(--text-2);text-decoration:none}
.tabbar a svg{width:22px;height:22px}
.tabbar a[aria-current=page]{color:var(--text);font-weight:700}
.tabbar a[aria-current=page]::before{content:"";position:absolute;top:0;left:22%;right:22%;height:3px;border-radius:0 0 3px 3px;background:var(--text)}
.tabbar .dot{position:absolute;top:8px;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--brand);color:var(--on-brand);font-size:11px;font-weight:800;line-height:18px;text-align:center}
.main{padding:20px 16px 32px;max-width:1160px;margin:0 auto;display:flex;flex-direction:column;gap:20px}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px}
@container (min-width:900px){.topnav{display:flex}.tabbar{display:none}.main{padding:32px 32px 48px;gap:28px}.topbar{padding:8px 32px}}

/* surfaces */
.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px}
.card-pad-lg{padding:20px}
@container (min-width:900px){.card{padding:20px}}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;background:var(--surface-2);font-size:14px;line-height:20px}
.note svg{flex:none;width:18px;height:18px;margin-top:1px}
.note-brand{background:color-mix(in srgb,var(--brand) 28%,var(--surface))}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 18px;border-radius:10px;border:1px solid transparent;font:600 16px/1.1 Inter,system-ui,sans-serif;text-decoration:none;cursor:pointer;white-space:nowrap}
.btn svg{width:18px;height:18px;flex:none}
.btn-primary{background:var(--primary);color:var(--on-primary)}
.btn-brand{background:var(--brand);color:var(--on-brand);border-color:#18181B}
.btn-secondary{background:var(--surface);color:var(--text);border-color:var(--line-strong)}
.btn-ghost{background:transparent;color:var(--text)}
.btn-danger{background:var(--danger);color:var(--on-danger)}
.btn-block{width:100%}
.btn-lg{min-height:52px;font-size:17px;padding:0 22px}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--text);cursor:pointer}
.icon-btn svg{width:20px;height:20px}
.link-btn{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-weight:600;color:var(--text);text-decoration:underline;text-underline-offset:3px}

/* forms */
.field{display:flex;flex-direction:column;gap:6px}
.label{font-weight:600;font-size:15px;line-height:20px}
.hint{font-size:14px;line-height:20px;color:var(--text-2)}
.input,.select{width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--text);font:16px/1.4 Inter,system-ui,sans-serif}
.input:focus,.select:focus{border-color:var(--text)}
.field-error .input{border-color:var(--danger);border-width:2px}
.error-msg{display:flex;gap:6px;align-items:center;font-size:14px;font-weight:600;color:var(--danger)}
.error-msg svg{width:16px;height:16px}
.check{display:flex;gap:12px;align-items:flex-start;min-height:44px;padding:10px 0;font-size:15px}
.check input{width:22px;height:22px;margin:0;accent-color:var(--primary);flex:none}
.switch{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px}
.switch input{appearance:none;width:48px;height:28px;border-radius:14px;background:var(--line-strong);position:relative;flex:none;margin:0;cursor:pointer}
.switch input::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:left .15s}
.switch input:checked{background:var(--primary)}
.switch input:checked::after{left:23px;background:var(--on-primary)}

/* half-day toggle: radios */
.seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);overflow:hidden}
.seg label{position:relative;display:flex;min-height:44px;cursor:pointer}
.seg label+label{border-left:1px solid var(--line)}
.seg input{position:absolute;opacity:0;width:1px;height:1px}
.seg span{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;font-size:14px;font-weight:600;color:var(--text-2);padding:0 6px;text-align:center}
.seg input:checked+span{background:var(--primary);color:var(--on-primary)}
.seg input:focus-visible+span{outline:3px solid var(--focus);outline-offset:-3px}
.seg span svg{width:14px;height:14px}

/* date range */
.daterange{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;text-align:center}
.month .dow{font-size:12px;font-weight:600;color:var(--text-2);padding:4px 0}
.month .day{position:relative;min-height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px;font-variant-numeric:tabular-nums;border-radius:8px;color:var(--text)}
.month .day.out{color:var(--text-2);opacity:.45}
.month .day.nw{color:var(--text-2);background:var(--surface-2)}
.month .day.inrange{background:var(--annual-bg);color:var(--annual-fg);font-weight:600;border-radius:0}
.month .day.free{background:repeating-linear-gradient(135deg,var(--surface-2) 0 4px,var(--surface) 4px 8px);color:var(--text-2)}
.month .day.edge{background:var(--annual);color:#fff;font-weight:700;border-radius:8px}
.month .day.half{background:linear-gradient(90deg,var(--annual) 50%,var(--annual-bg) 50%);color:#fff;font-weight:700;border-radius:8px}
.month .day.closure{background:repeating-linear-gradient(135deg,var(--closure-bg) 0 4px,var(--surface) 4px 8px);color:var(--text-2)}
.month .day.today{box-shadow:inset 0 0 0 2px var(--today)}
.month .day i{position:absolute;bottom:3px;width:5px;height:5px;border-radius:50%;background:var(--ooo)}
.month .day .flag{position:absolute;top:3px;right:4px;width:8px;height:8px;color:var(--bank)}

/* status badges: colour + icon + word */
.badge{display:inline-flex;align-items:center;gap:6px;padding:0 10px 0 8px;min-height:26px;border-radius:999px;font-size:13px;font-weight:700;line-height:1;white-space:nowrap}
.badge svg{width:14px;height:14px;flex:none}
.b-pending{background:var(--pending-bg);color:var(--pending-fg)}
.b-approved{background:var(--approved-bg);color:var(--approved-fg)}
.b-declined{background:var(--declined-bg);color:var(--declined-fg)}
.b-cancelled{background:var(--cancelled-bg);color:var(--cancelled-fg)}
.b-cancelled .txt{text-decoration:line-through}

/* leave-type chips */
.chip{display:inline-flex;align-items:center;gap:8px;min-height:28px;padding:0 10px;border-radius:8px;font-size:14px;font-weight:600;white-space:nowrap}
.chip .sw{width:12px;height:12px;border-radius:3px;flex:none}
.chip svg{width:14px;height:14px;flex:none}
.c-annual{background:var(--annual-bg);color:var(--annual-fg)} .c-annual .sw{background:var(--annual)}
.c-closure{background:var(--closure-bg);color:var(--text)} .c-closure .sw{background:repeating-linear-gradient(135deg,var(--closure) 0 2px,transparent 2px 4px);border:1px solid var(--closure)}
.c-ooo{background:var(--ooo-bg);color:var(--ooo-fg)} .c-ooo .sw{background:var(--ooo)}
.c-bank{background:transparent;color:var(--text);border:1px dashed var(--line-strong)} .c-bank svg{color:var(--bank)}
.c-private{background:var(--surface-2);color:var(--text)}

/* balance + progress */
.balance-num{font-family:Archivo,Inter,sans-serif;font-weight:800;font-size:52px;line-height:52px;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.balance-of{font-size:16px;color:var(--text-2);font-weight:500}
.kv{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.kv div{background:var(--surface-2);border-radius:10px;padding:10px}
.kv dt{font-size:13px;color:var(--text-2);line-height:16px}
.kv dd{font-family:Archivo,Inter,sans-serif;font-weight:800;font-size:20px;line-height:26px;font-variant-numeric:tabular-nums}
.progress{position:relative;height:14px;border-radius:999px;background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line)}
.progress .seg-booked,.progress .seg-closure,.progress .seg-pending{position:absolute;top:0;bottom:0}
.progress .seg-booked{left:0;background:var(--annual);border-radius:999px 0 0 999px}
.progress .seg-closure{background:repeating-linear-gradient(135deg,var(--closure) 0 3px,var(--closure-bg) 3px 6px)}
.progress .seg-pending{background:repeating-linear-gradient(90deg,var(--pending-fg) 0 4px,transparent 4px 7px);opacity:.55}
.progress .target{position:absolute;top:-6px;bottom:-6px;width:3px;margin-left:-1px;border-radius:2px;background:var(--text)}
.progress-legend{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--text-2);margin-top:8px}
.pace-msg{display:flex;gap:8px;align-items:flex-start;font-size:15px;line-height:22px}
.pace-msg svg{flex:none;width:20px;height:20px;margin-top:1px}

/* avatars */
.av{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;font-weight:700;font-size:15px;flex:none;letter-spacing:-.01em}
.av-sm{width:32px;height:32px;font-size:13px}
.av-lg{width:64px;height:64px;font-size:22px}
.av-1{background:#FFE18A;color:#3D2E00}.av-2{background:#CCDCFF;color:#1B3A8A}.av-3{background:#C9ECD6;color:#14532D}
.av-4{background:#F7D0E1;color:#7A1F4A}.av-5{background:#E1D6FA;color:#40287A}.av-6{background:#FFD5BF;color:#7A3410}
.avstack{display:flex}.avstack .av{box-shadow:0 0 0 2px var(--surface)}.avstack .av+.av{margin-left:-8px}

/* lists + tables */
.list>li{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.list>li:first-child{border-top:0;padding-top:0}
.list>li:last-child{padding-bottom:0}
.scroll-x{overflow-x:auto;-webkit-overflow-scrolling:touch}
.tbl{width:100%;border-collapse:collapse;font-size:15px}
.tbl th{text-align:left;font-size:13px;font-weight:600;color:var(--text-2);padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
.tbl td{padding:12px;border-bottom:1px solid var(--line);vertical-align:top}
.tbl td.num,.tbl th.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tbl tr:last-child td{border-bottom:0}
.tabs{display:flex;gap:4px;padding:4px;background:var(--surface-2);border-radius:12px}
.tabs a{flex:1;display:flex;align-items:center;justify-content:center;min-height:44px;border-radius:9px;font-weight:600;font-size:15px;color:var(--text-2);text-decoration:none}
.tabs a[aria-current=page]{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.08)}

/* team calendar */
.calwrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.cal{border-collapse:separate;border-spacing:0;font-size:12px}
.cal th,.cal td{padding:0}
.cal .who{position:sticky;left:0;z-index:1;background:var(--surface);border-right:1px solid var(--line);min-width:112px;padding:6px 10px;text-align:left;font-weight:600;font-size:14px}
.cal thead th{height:52px;border-bottom:1px solid var(--line);font-weight:600;color:var(--text-2);vertical-align:middle}
.cal thead .dh{min-width:36px;width:36px;text-align:center;line-height:14px;position:relative}
.cal thead .dh b{display:block;font-size:14px;color:var(--text)}
.cal thead .dh.today b{display:inline-block;background:var(--today);color:var(--bg);border-radius:6px;padding:1px 4px}
.cal thead .dh .flag{position:absolute;top:3px;left:50%;margin-left:6px;width:10px;height:10px;color:var(--bank)}
.cal td.c{height:50px;border-bottom:1px solid var(--line);border-left:1px solid var(--line);padding:4px 2px;vertical-align:middle}
.cal td.we{background:var(--surface-2)}
.cal td.nw{background:repeating-linear-gradient(135deg,var(--surface-2) 0 3px,var(--surface) 3px 7px)}
.cal td.bh{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bank) 55%,transparent)}
.cal tr:last-child td.c{border-bottom:0}
.blk{display:flex;align-items:center;justify-content:center;height:32px;border-radius:6px;font-size:11px;font-weight:800;letter-spacing:.02em}
.blk svg{width:13px;height:13px}
.blk.annual{background:var(--annual);color:#fff}
.ll[data-theme=dark] .blk.annual{color:#0B1433}
.blk.pending{background:var(--pending-bg);color:var(--pending-fg);border:2px dashed var(--pending-fg)}
.blk.closure{background:repeating-linear-gradient(135deg,var(--closure-bg) 0 4px,var(--surface) 4px 8px);color:var(--text);border:1px solid var(--closure)}
.blk.ooo{background:var(--ooo);color:#fff}
.ll[data-theme=dark] .blk.ooo{color:#1A0F33}
.blk.am{width:55%;margin-right:auto}
.blk.pm{width:55%;margin-left:auto}
.legend{display:flex;flex-wrap:wrap;gap:8px 16px;font-size:14px}
.legend span{display:inline-flex;align-items:center;gap:8px}
.legend .k{width:22px;height:16px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center}

/* empty, toast, dialog */
.empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:28px 16px;border:1px dashed var(--line-strong);border-radius:14px}
.empty .ic{width:48px;height:48px;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center}
.empty .ic svg{width:24px;height:24px}
.toast{display:flex;gap:12px;align-items:flex-start;padding:12px 12px 12px 16px;border-radius:12px;background:var(--primary);color:var(--on-primary);box-shadow:0 8px 24px rgba(0,0,0,.18);max-width:440px}
.toast .ti{flex:none;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#86DCA8;color:#0E2A1A}
.toast .ti.err{background:#FFA39C;color:#3D0A07}
.toast .ti svg{width:14px;height:14px}
.toast .icon-btn{color:inherit;margin:-8px -4px -8px 0}
.scrim{background:rgba(17,17,19,.55);border-radius:14px;padding:24px 16px;display:flex;align-items:center;justify-content:center}
.dialog{background:var(--surface);color:var(--text);border-radius:16px;padding:20px;width:100%;max-width:440px;display:flex;flex-direction:column;gap:16px;box-shadow:0 16px 40px rgba(0,0,0,.25)}
.dialog-actions{display:flex;flex-direction:column-reverse;gap:8px}
@container (min-width:480px){.dialog-actions{flex-direction:row;justify-content:flex-end}}
.sticky-foot{position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line);padding:12px 16px;display:flex;flex-direction:column;gap:8px}
