/* Octa Hub — design system from "HMS Portal Design Improvement" handoff */
* { box-sizing: border-box; margin: 0; }
:root {
  --ink: #201C1D; --ink2: #4A463F; --muted: #8A847A; --muted2: #948E84; --muted3: #B0AAA0;
  --teal: #35696A; --teal-deep: #2E4A47; --gold: #E3B72B; --gold-text: #B0871A; --gold-text2: #A98A1C;
  --bg: #FBFAF6; --card: #FFFFFF; --fill: #F4F2EC; --fill2: #F7F6F1; --zebra: #FAF9F5;
  --line: #ECE9E2; --hairline: #F1EFE8; --dash: #EEEBE3;
  --pos-fg: #2C7A4E; --pos-bg: #E6F2EA; --neg-fg: #B23B3B; --neg-bg: #FBECEA;
  --unpaid-fg: #9B2C2C; --unpaid-bg: #F7DDDA; --warn-fg: #A98A1C; --warn-bg: #FBF3D6;
  --cat-casual: #0D9488; --cat-medical: #2563EB; --cat-annual: #7C3AED; --cat-wfh: #6E93E0;
  --disp: 'Space Grotesk', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --teal-glow: 0 8px 18px -8px rgba(53,105,106,.7);
  --gold-glow: 0 8px 20px -8px rgba(227,183,43,.7);
}
body { font-family: var(--body); background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--teal); }
.disp { font-family: var(--disp); }
.muted { color: var(--muted); }
.mono, .num { font-variant-numeric: tabular-nums; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); position: relative; overflow: hidden; }
.login-wrap::before { content: ""; position: absolute; width: 640px; height: 640px; border-radius: 22%; transform: rotate(22deg);
  border: 1.5px solid var(--line); top: -240px; right: -180px; }
.login-wrap::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 22%; transform: rotate(22deg);
  border: 1.5px solid #E7E2D4; bottom: -170px; left: -130px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 42px; width: 396px;
  box-shadow: 0 40px 90px -30px rgba(32,28,29,.45); position: relative; z-index: 2; }
.brandmark { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.brandmark img { width: 46px; height: 46px; }
.brandmark h1 { font-family: var(--disp); font-size: 21px; color: var(--ink); }
.brandmark small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; font-family: var(--body); }
.login-card .tagline { color: var(--teal); font-size: 12px; margin: -2px 0 20px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Shell ---------- */
.shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 238px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 24px 16px; overflow-y: auto; }
.sb-logo { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.sb-logo img { width: 36px; height: 36px; display: block; }
.sb-logo .t { font-family: var(--disp); font-weight: 700; font-size: 17px; color: var(--ink); line-height: 1.05; }
.sb-logo .e { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--teal); margin-top: 2px; }
.nav-sec { font-size: 10.5px; font-weight: 700; letter-spacing: .15em; color: var(--muted3); padding: 14px 12px 8px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 11px 13px; margin-bottom: 3px; border-radius: 11px;
  color: #5C574F; text-decoration: none; font-weight: 500; font-size: 14px; cursor: pointer; }
.nav-item svg { width: 17px; height: 17px; color: #A79F95; flex-shrink: 0; }
.nav-item:hover { background: var(--fill2); }
.nav-item.active { background: var(--teal); color: #fff; font-weight: 600; box-shadow: var(--teal-glow); }
.nav-item.active svg { color: #fff; }
.sb-user { margin-top: auto; padding: 13px; border-radius: 14px; background: var(--fill); display: flex; align-items: center; gap: 11px; cursor: pointer; }
.sb-user .chip-av { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--gold);
  font-family: var(--disp); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.sb-user .n { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .s { font-size: 11px; color: #9A948B; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 66px; flex-shrink: 0; background: var(--bg); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 28px; }
.topbar .title { font-family: var(--disp); font-weight: 700; font-size: 20px; color: var(--ink); white-space: nowrap; }
.tb-search { display: flex; align-items: center; gap: 9px; margin-left: 8px; width: 280px; height: 38px; background: #fff;
  border: 1px solid var(--line); border-radius: 11px; padding: 0 13px; }
.tb-search svg { width: 15px; height: 15px; color: var(--muted3); flex-shrink: 0; }
.tb-search input { border: none; outline: none; box-shadow: none; padding: 0; font-size: 13.5px; background: none; width: 100%; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-av { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--gold);
  font-family: var(--disp); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 13px; cursor: pointer; }
.grid-btn { width: 38px; height: 38px; padding: 0; border-radius: 10px; background: var(--fill2); border: 1px solid var(--line); color: var(--teal);
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.grid-btn:hover { background: var(--teal); color: #fff; border-color: var(--teal); box-shadow: var(--teal-glow); }
.grid-btn svg { width: 18px; height: 18px; }
.mini-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.mini-row:last-child { border-bottom: none; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Mascot (shared: sign-in + home) ---------- */
@keyframes m-blink { 0%,90%,100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes m-wave { 0%,100% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-8deg); } 60% { transform: rotate(14deg); } 80% { transform: rotate(0); } }
@keyframes m-float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(3deg); } }
@keyframes m-bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@keyframes m-floatplus { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.mascot { position: relative; flex-shrink: 0; }
.mascot-float { animation: m-float 4s ease-in-out infinite; }
.mascot-bob { animation: m-bob 3.2s ease-in-out infinite; }
.mascot .m-eye { position: absolute; border-radius: 4px; background: #F6F5F1; animation: m-blink 4s infinite; }
.mascot .m-smile { position: absolute; border: 2.5px solid var(--gold); border-top: none; }
.mascot .m-wave { position: absolute; transform-origin: 70% 90%; animation: m-wave 2.4s ease-in-out infinite; }
.oct-bg { position: absolute; }

/* ---------- Sign in (split layout) ---------- */
.signin-wrap { height: 100vh; width: 100%; display: flex; overflow: hidden; background: var(--bg); }
.signin-brand { flex: 1.1; position: relative; background: var(--ink); display: flex; flex-direction: column; justify-content: center; padding: 60px; overflow: hidden; }
.signin-brand .oct-bg-tr { width: 440px; height: 440px; right: -80px; top: -90px; opacity: .10; }
.signin-brand .oct-bg-bl { width: 300px; height: 300px; left: -60px; bottom: -70px; opacity: .08; }
.signin-brand .mascot { margin-bottom: 34px; }
.signin-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: var(--gold); margin-bottom: 14px; position: relative; }
.signin-h1 { margin: 0; font-family: var(--disp); font-weight: 700; font-size: 40px; color: #F6F5F1; line-height: 1.15; max-width: 480px; position: relative; }
.signin-sub { margin: 16px 0 0; font-size: 15px; color: #C9C4B9; max-width: 420px; line-height: 1.6; position: relative; }
.signin-tag { margin-top: 36px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; color: #7A9E9C; position: relative; }
.signin-form-col { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.signin-form { width: 100%; max-width: 380px; }
.signin-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.signin-logo img { width: 40px; height: 40px; }
.signin-logo .t { font-family: var(--disp); font-weight: 700; font-size: 19px; color: var(--ink); }
.signin-logo .s { font-size: 12px; color: var(--muted); }
.signin-lab { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink2); margin-bottom: 7px; }
.signin-input { width: 100%; height: 46px; border: 1.5px solid #E0DCD3; border-radius: 12px; padding: 0 15px; font-size: 14.5px; margin-bottom: 16px; background: #fff; }
.signin-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(53,105,106,.14); }
.signin-btn { width: 100%; height: 48px; margin-top: 10px; background: var(--gold); border: none; border-radius: 12px; color: var(--ink); font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 10px 24px -10px rgba(227,183,43,.65); }
.signin-btn:hover { background: #d3a922; }
.signin-help { margin: 22px 0 0; font-size: 12.5px; color: var(--muted3); text-align: center; }
@media (max-width: 820px) { .signin-brand { display: none; } }

/* ---------- Home / Hub launcher ---------- */
.hub-hero { position: relative; background: var(--ink); border-radius: 22px; padding: 34px 40px; margin-bottom: 30px; overflow: hidden; display: flex; align-items: center; gap: 28px; }
.hub-hero .oct-bg { width: 240px; height: 240px; }
.hub-greet { margin: 0; font-family: var(--disp); font-weight: 700; font-size: 32px; color: #F6F5F1; letter-spacing: -.01em; }
.hub-sub { margin: 10px 0 0; font-size: 14.5px; color: #C9C4B9; max-width: 480px; line-height: 1.5; }
.hub-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--muted2); margin-bottom: 14px; }
.hub-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.hub-app { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 20px 22px; transition: transform .15s, box-shadow .15s, border-color .15s; cursor: pointer; }
.hub-app:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(32,28,29,.25); border-color: #DCD6C9; }
.hub-app .ic { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.hub-app .ic svg { width: 22px; height: 22px; }
.hub-app .n { font-family: var(--disp); font-weight: 700; font-size: 15.5px; color: var(--ink); }
.hub-app .d { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.hub-app.soon { background: var(--fill2); border: 1.5px dashed #DCD6C9; cursor: default; }
.hub-app.soon:hover { transform: none; box-shadow: none; border-color: #DCD6C9; }
.hub-app.soon .ic { background: #EFECE4; color: var(--muted3); font-weight: 700; animation: m-floatplus 3.6s ease-in-out infinite; }
.hub-app.soon .n { color: var(--muted); }

.content { flex: 1; min-height: 0; overflow-y: auto; padding: 26px 30px 44px; }
.page-sub { color: var(--muted); margin-bottom: 20px; font-size: 13px; max-width: 860px; }

/* ---------- Buttons ---------- */
button { font-family: var(--body); cursor: pointer; border: none; border-radius: 11px; padding: 0 18px; height: 40px; font-weight: 600; font-size: 14px; }
.btn { background: var(--teal); color: #fff; box-shadow: var(--teal-glow); }
.btn:hover { background: #2d5b5c; }
.btn-gold { background: var(--gold); color: var(--ink); font-weight: 700; box-shadow: var(--gold-glow); }
.btn-gold:hover { background: #d3a922; }
.btn-ghost { background: #fff; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-outline { background: #fff; color: var(--ink2); border: 1px solid var(--line); }
.btn-danger { background: #fff; color: var(--neg-fg); border: 1px solid #EAD3D0; }
.btn-danger-solid { background: var(--neg-fg); color: #fff; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.icon-btn { background: var(--fill); border: none; width: 30px; height: 30px; padding: 0; border-radius: 8px; color: #7d766c; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #ebe7dc; color: var(--ink); }
.icon-btn.danger:hover { background: var(--neg-bg); color: var(--neg-fg); }
.icon-btn svg { width: 14px; height: 14px; }
.import-dashed { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; background: none;
  border: 1.5px dashed var(--teal); color: var(--teal); border-radius: 11px; font-weight: 600; font-size: 13.5px; }
.import-dashed:hover { background: #eef4f4; }
.import-dashed svg { width: 15px; height: 15px; }

/* ---------- Forms ---------- */
input, select, textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; width: 100%; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(53,105,106,.13); }
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink2); margin: 11px 0 5px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; height: 40px; }
.err { color: var(--neg-fg); font-size: 13px; margin-top: 8px; }
.ok { color: var(--pos-fg); font-size: 13px; margin-top: 8px; }
.warnbox { background: var(--warn-bg); border: 1px solid #F0DFA5; color: var(--warn-fg); border-radius: 12px; padding: 11px 15px; margin: 10px 0; font-size: 13px; }
.infobox { background: #EEF4F4; border: 1px solid #CFE0E0; color: var(--teal-deep); border-radius: 12px; padding: 11px 15px; margin: 10px 0; font-size: 13px; }

/* ---------- Cards, stat strips ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 18px; }
.card h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 13px; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.card h3 svg { width: 16px; height: 16px; color: var(--teal); }
.strip { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 18px; }
.strip .cell { flex: 1; padding: 16px 20px; border-right: 1px solid var(--hairline); }
.strip .cell:last-child { border-right: none; }
.strip .cl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.strip .cl svg { width: 14px; height: 14px; }
.strip .cv { font-family: var(--disp); font-weight: 700; font-size: 24px; color: var(--ink); }
.strip .cv small { font-size: 13px; color: var(--muted); font-weight: 500; font-family: var(--body); }
.strip .cv.bad { color: var(--neg-fg); }
.strip .cv.gold { color: var(--gold-text); }

/* ---------- Pills & chips ---------- */
.pillbar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #fff;
  border: 1px solid var(--line); color: #5C574F; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; }
.pill span.ct { color: var(--muted3); }
.pill.on { background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 600; }
.pill.on span.ct { color: #cfe0e0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.green { background: var(--pos-bg); color: var(--pos-fg); }
.chip.red { background: var(--neg-bg); color: var(--neg-fg); }
.chip.deepred { background: var(--unpaid-bg); color: var(--unpaid-fg); }
.chip.gold { background: var(--warn-bg); color: var(--warn-fg); }
.chip.teal { background: #E4EEEE; color: var(--teal); }
.chip.blue { background: #E4ECFB; color: var(--cat-medical); }
.chip.violet { background: #EEE7FB; color: var(--cat-annual); }
.chip.gray { background: var(--fill); color: var(--ink2); }

/* ---------- Segmented toggle ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; height: 40px; }
.seg button { border: none; background: none; padding: 0 17px; height: 100%; font-size: 13px; font-weight: 600; color: var(--muted); border-radius: 0; box-shadow: none; }
.seg button.on { background: var(--ink); color: #fff; }
.seg .badge { background: var(--gold); color: var(--ink); border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-left: 6px; font-weight: 700; }
.seg button.on .badge { }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; background: #fff; }
.tbl-wrap { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: auto; margin-bottom: 18px; }
th { text-align: center; padding: 12px 14px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted2); border-bottom: 1px solid var(--line); background: var(--zebra); position: sticky; top: 0; white-space: nowrap; z-index: 2; }
th.left { text-align: left; }
td { padding: 11px 14px; white-space: nowrap; font-size: 13px; color: var(--ink2); border-bottom: none; }
tbody tr:nth-child(even) td { background: var(--zebra); }
tbody tr:hover td { background: #F5F3EB; }
td.num { text-align: right; }
td.ctr { text-align: center; }
td b { color: var(--ink); }
.emp-cell { display: flex; align-items: center; gap: 11px; }
.emp-cell > span:last-child { font-weight: 600; color: var(--ink); }
.emp-av { width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.overdue { color: var(--neg-fg); font-weight: 700; }
.gold-num { color: var(--gold-text); font-weight: 700; }
.row-click { cursor: pointer; }
tr.selected td { background: #FBF6E7 !important; }
tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--teal); cursor: pointer; }

/* mini balance bar in tables */
.mini-bal { display: inline-flex; align-items: center; gap: 8px; }
.mini-bal .track { width: 64px; height: 6px; background: var(--hairline); border-radius: 4px; overflow: hidden; }
.mini-bal .fill { height: 100%; background: var(--teal); border-radius: 4px; }

/* ---------- KPI cards (leave requests) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 13px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; gap: 13px; align-items: center; }
.kpi .bubble { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.kpi .bubble svg { width: 18px; height: 18px; }
.kpi .v { font-family: var(--disp); font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.kpi .l { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.kpi.warn .v { color: var(--neg-fg); }
.bub-teal { background: #E4EEEE; color: var(--teal); }
.bub-gold { background: var(--warn-bg); color: var(--gold-text); }
.bub-green { background: var(--pos-bg); color: var(--pos-fg); }
.bub-red { background: var(--neg-bg); color: var(--neg-fg); }
.bub-blue { background: #E4ECFB; color: var(--cat-medical); }
.bub-ink { background: var(--fill); color: var(--ink); }

/* ---------- Charts ---------- */
.charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; flex-shrink: 0; }
.donut::after { content: ""; position: absolute; inset: 22px; background: #fff; border-radius: 50%; }
.donut .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.donut .center b { font-family: var(--disp); font-size: 23px; color: var(--ink); }
.donut .center span { font-size: 10.5px; color: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--ink2); }
.legend .li { display: flex; align-items: center; gap: 8px; }
.legend .li b { margin-left: auto; font-family: var(--disp); color: var(--ink); }
.ldot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.hbar-row { display: grid; grid-template-columns: 110px 1fr 46px; gap: 10px; align-items: center; margin: 9px 0; font-size: 12.5px; }
.hbar-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink2); }
.hbar-row .track { height: 9px; background: var(--hairline); border-radius: 6px; overflow: hidden; }
.hbar-row .fill { height: 100%; border-radius: 6px; background: var(--teal); }
.hbar-row .vl { text-align: right; font-family: var(--disp); font-weight: 700; font-size: 12.5px; color: var(--ink); }
.stacked { display: flex; height: 14px; border-radius: 8px; overflow: hidden; margin: 14px 0 12px; }

/* ---------- Attendance heatmap & month grid ---------- */
.matrix { border-collapse: collapse; }
.matrix th { position: static; font-size: 9.5px; padding: 4px 2px; background: none; border: none; }
.matrix td { padding: 2.5px; border: none; background: none !important; }
.matrix .m-name { white-space: nowrap; padding-right: 12px; font-size: 12.5px; text-align: left; }
.m-dot { width: 18px; height: 18px; border-radius: 5px; display: block; cursor: pointer; }
.m-dot:hover { outline: 2px solid var(--ink); }
.st-present { background: #4FA574; } .st-absent { background: #E8837D; } .st-unpaid { background: #9B2C2C; }
.st-leave { background: #6E93E0; } .st-wfh { background: #2F8F86; } .st-weekend { background: #E9EAEC; }
.st-holiday { background: #C9B6E8; } .st-none { background: #F1EFE8; }
.legend-h { display: flex; gap: 15px; flex-wrap: wrap; margin: 12px 2px 0; font-size: 12px; color: var(--muted); align-items: center; }
.legend-h .m-dot { width: 13px; height: 13px; cursor: default; display: inline-block; vertical-align: -2px; margin-right: 6px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal-grid .dow { text-align: center; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted2); padding: 4px 0; font-weight: 700; }
.cal-cell { border: 1px solid var(--line); border-radius: 12px; min-height: 80px; padding: 8px 10px; background: #fff; font-size: 11.5px; }
.cal-cell.off { background: var(--fill2); border-color: var(--hairline); }
.cal-cell .dn { font-family: var(--disp); font-weight: 700; font-size: 12.5px; margin-bottom: 5px; color: var(--ink2); }
.cal-cell .times { color: var(--muted); font-size: 10.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.cal-cell.clickable { cursor: pointer; }
.cal-cell.clickable:hover { border-color: var(--teal); }

/* ---------- Bulk bar ---------- */
.bulk-bar { position: sticky; bottom: 14px; display: flex; gap: 12px; align-items: center; background: var(--ink); color: #fff;
  border-radius: 13px; padding: 10px 18px; box-shadow: 0 18px 40px -12px rgba(32,28,29,.55); margin-top: 6px; font-size: 13px; }
.bulk-bar b { color: var(--gold); }
.bulk-bar button { height: 32px; padding: 0 13px; font-size: 12.5px; }

/* ---------- Roster drawer ---------- */
.split { display: flex; gap: 20px; align-items: flex-start; }
.split .grow { flex: 1; min-width: 0; }
.drawer { width: 352px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; position: sticky; top: 0; }
.drawer .eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted2); display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.drawer .close { cursor: pointer; font-size: 17px; color: var(--muted); background: none; border: none; height: auto; padding: 4px; }
.drawer .dr-head { display: flex; gap: 13px; align-items: center; margin-bottom: 14px; }
.dr-av { width: 60px; height: 60px; border-radius: 16px; color: #fff; font-family: var(--disp); font-weight: 700; font-size: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 14px 0; }
.dr-tile { background: var(--fill2); border-radius: 11px; padding: 10px 12px; }
.dr-tile .k { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.dr-tile .v { font-size: 13px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.gold-panel { background: var(--warn-bg); border: 1px solid #F0DFA5; border-radius: 13px; padding: 13px 15px; margin: 14px 0; }
.gold-panel .gp-t { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--gold-text2); margin-bottom: 9px; }
.gold-panel .gp-row { display: flex; gap: 6px; }
.gold-panel .gp-cell { flex: 1; text-align: center; }
.gold-panel .gp-v { font-family: var(--disp); font-weight: 700; font-size: 18px; color: var(--ink); }
.gold-panel .gp-l { font-size: 10.5px; color: var(--gold-text2); }

/* ---------- Profile ---------- */
.hero { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.hero .h-av { width: 72px; height: 72px; border-radius: 20px; color: #fff; font-family: var(--disp); font-weight: 700; font-size: 25px; display: flex; align-items: center; justify-content: center; }
.hero h2 { font-family: var(--disp); font-size: 28px; font-weight: 700; color: var(--ink); }
.hero .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.hero .actions { margin-left: auto; display: flex; gap: 10px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.profile-grid .card { margin-bottom: 0; }
.pf { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--dash); font-size: 13px; }
.pf:last-of-type { border-bottom: none; }
.pf span { color: var(--muted); }
.pf b { font-weight: 600; text-align: right; color: var(--ink); }
.salary-big { font-family: var(--disp); font-weight: 700; font-size: 30px; color: var(--ink); }
.hist-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--dash); font-size: 13px; }
.hist-row:last-child { border-bottom: none; }
.hist-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.hist-row .hr-main { flex: 1; min-width: 0; }
.hist-row .hr-sub { font-size: 11px; color: var(--muted); }
.hist-row .amt { font-family: var(--disp); font-weight: 700; color: var(--ink); }
.delta { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 12px; background: var(--pos-bg); color: var(--pos-fg); }
.file-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 12px; margin-bottom: 8px; font-size: 13px; background: var(--fill2); }
.file-tag { font-size: 9.5px; font-weight: 700; padding: 4px 7px; border-radius: 7px; background: var(--neg-bg); color: var(--neg-fg); letter-spacing: .05em; }
.sub-h { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin: 15px 0 9px; display: flex; align-items: center; gap: 10px; color: var(--muted2); font-weight: 700; }
.sub-h button { margin-left: auto; }

/* ---------- Leave review dialog ---------- */
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 13px 0; }
.timeline { margin: 13px 0; }
.tl-row { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; font-size: 13px; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-top: 1px; }
.tl-done { background: var(--pos-bg); color: var(--pos-fg); }
.tl-now { background: var(--warn-bg); color: var(--gold-text); box-shadow: 0 0 0 3px #F6ECC8; }
.tl-wait { background: var(--fill); color: var(--muted3); }
.tl-rej { background: var(--neg-bg); color: var(--neg-fg); }
.balbar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.balbar .track { flex: 1; height: 8px; background: var(--hairline); border-radius: 5px; overflow: hidden; display: flex; }

/* ---------- Leave balances ---------- */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.meter .m-l { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; color: var(--ink2); }
.meter .m-l b { color: var(--ink); }
.meter .track { height: 9px; background: var(--hairline); border-radius: 6px; overflow: hidden; }
.meter .fill { height: 100%; border-radius: 6px; }
.bal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 14px; }
.bal-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 17px; }
.bal-card.near { border-color: #E9D48A; background: #FFFDF4; }
.ring { width: 54px; height: 54px; border-radius: 50%; position: relative; flex-shrink: 0; }
.ring::after { content: ""; position: absolute; inset: 6px; background: #fff; border-radius: 50%; }
.bal-card.near .ring::after { background: #FFFDF4; }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1; font-family: var(--disp); font-size: 13px; color: var(--ink); }
.bal-head { display: flex; gap: 12px; align-items: center; margin-bottom: 13px; }
.near-badge { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; background: var(--warn-bg); color: var(--gold-text); padding: 2px 7px; border-radius: 9px; }
.bal-row { display: grid; grid-template-columns: 52px 1fr 40px; gap: 10px; align-items: center; margin: 7px 0; font-size: 12px; color: var(--ink2); }
.bal-bar { background: var(--hairline); border-radius: 5px; height: 8px; overflow: hidden; }
.bal-bar-fill { height: 100%; border-radius: 5px; min-width: 2px; }
.bal-nums { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 11.5px; }

/* ---------- App launcher ---------- */
.launcher-bg { position: fixed; inset: 0; background: rgba(32,28,29,.42); z-index: 45; }
.launcher { position: absolute; top: 62px; right: 70px; background: #fff; border-radius: 18px; width: 430px; max-width: 92vw;
  box-shadow: 0 40px 90px -30px rgba(32,28,29,.45); padding: 20px; border: 1px solid var(--line); }
.launcher h4 { font-size: 10.5px; letter-spacing: .14em; color: var(--muted2); text-transform: uppercase; margin-bottom: 12px; font-weight: 700; }
.launcher .apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app-tile { border: 1px solid var(--line); border-radius: 14px; padding: 18px 10px; text-align: center; cursor: pointer; background: #fff; }
.app-tile:hover { border-color: var(--teal); }
.app-tile.active { border-color: var(--teal); background: #EEF4F4; }
.app-tile .ic { width: 46px; height: 46px; margin: 0 auto 9px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.app-tile .ic svg { width: 20px; height: 20px; }
.app-tile b { display: block; font-size: 13.5px; font-family: var(--disp); }
.app-tile span { color: var(--muted); font-size: 11px; }

/* ---------- Home ---------- */
.home-hero { border-radius: 20px; padding: 30px 32px; margin-bottom: 24px; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.home-hero::after { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 22%; transform: rotate(22deg);
  border: 1.5px solid rgba(227,183,43,.25); top: -110px; right: 46px; }
.home-hero h2 { font-family: var(--disp); font-size: 24px; margin-bottom: 6px; }
.home-hero p { color: #B9B3A9; font-size: 13px; max-width: 540px; }
.home-apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.home-app { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; cursor: pointer; }
.home-app:hover { border-color: var(--teal); }
.home-app .ic { width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 13px; }
.home-app .ic svg { width: 21px; height: 21px; }
.home-app b { font-size: 15px; display: block; margin-bottom: 3px; font-family: var(--disp); }
.home-app span { color: var(--muted); font-size: 12.5px; }

/* ---------- User menu, modal, toast ---------- */
.user-menu { position: absolute; right: 24px; top: 62px; background: #fff; color: var(--ink); border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px rgba(32,28,29,.45); padding: 8px 0; width: 230px; z-index: 40; }
.user-menu .um-head { padding: 11px 16px; border-bottom: 1px solid var(--line); }
.user-menu .um-head b { display: block; }
.user-menu .um-head span { color: var(--muted); font-size: 12px; }
.user-menu a { display: block; padding: 9px 16px; cursor: pointer; text-decoration: none; color: var(--ink); font-size: 13.5px; }
.user-menu a:hover { background: var(--fill2); }
.modal-bg { position: fixed; inset: 0; background: rgba(32,28,29,.42); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 18px; padding: 26px; width: 500px; max-width: 94vw; max-height: 90vh; overflow: auto; }
.modal h3 { font-family: var(--disp); margin-bottom: 6px; font-size: 17px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 24px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  box-shadow: 0 18px 44px -10px rgba(32,28,29,.6); z-index: 90; transition: all .3s; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.progress-wrap { background: var(--hairline); border-radius: 6px; height: 7px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 6px; background: var(--teal); }
