:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --ink: #17203a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #2453ff;
  --accent-ink: #ffffff;
  --ok: #0f8a4d;
  --ok-bg: #e5f6ec;
  --warn: #9a6700;
  --warn-bg: #fff3d6;
  --bad: #c22f2f;
  --bad-bg: #fdeaea;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* layout */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 230px;
  background: #101a35; color: #cbd5e1; padding: 20px 14px;
  display: flex; flex-direction: column; gap: 18px;
}
.brand { color: #fff; font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.brand-lg { font-size: 24px; justify-content: center; }
.brand-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  color: #cbd5e1; text-decoration: none; padding: 9px 12px; border-radius: 8px;
}
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { background: var(--accent); color: #fff; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; }
.user-name { color: #fff; font-weight: 600; }
.user-role { color: #94a3b8; font-size: 12px; margin-bottom: 8px; }
.content { margin-left: 230px; padding: 30px 36px; max-width: 1200px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 26px 0 10px; color: #33415f; }
.muted { color: var(--muted); }
a { color: var(--accent); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.card-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.card-value { font-size: 26px; font-weight: 700; margin-top: 4px; }
.card-value a { text-decoration: none; color: var(--ink); }
.confirm-card, .reveal-card { max-width: 640px; margin-top: 16px; }

/* tables */
table { width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 10px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.note { color: var(--muted); font-size: 12px; margin-top: 4px; max-width: 260px; }
.actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }

/* chips */
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-ok { color: var(--ok); background: var(--ok-bg); }
.chip-warning { color: var(--warn); background: var(--warn-bg); }
.chip-overdue { color: var(--bad); background: var(--bad-bg); }

/* buttons & forms */
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 8px; padding: 8px 14px; font-size: 14px; cursor: pointer;
  text-decoration: none; display: inline-block; }
.btn:hover { border-color: #c8d2e0; background: #f8fafc; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #1a41d6; }
.btn-ghost { background: transparent; }
.btn-small { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; margin-top: 6px; }
.filters { display: flex; gap: 12px; align-items: end; margin-top: 14px; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password] {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit;
  background: #fff; color: var(--ink); min-width: 0;
}
input:focus { outline: 2px solid rgba(36,83,255,.25); border-color: var(--accent); }

/* dispute widget */
.dispute summary { cursor: pointer; color: var(--accent); font-size: 13px; list-style: none; }
.dispute form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; width: 220px; }

/* login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: #101a35; }
.login-card { background: var(--panel); border-radius: 14px; padding: 34px 34px 24px;
  width: 360px; display: flex; flex-direction: column; align-items: center; }
.login-card form { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.login-card label { font-size: 13px; color: var(--muted); margin-top: 8px; }
.login-sub { color: var(--muted); margin: 4px 0 18px; }
.login-note { color: var(--muted); font-size: 12px; text-align: center; margin: 18px 0 0; }
.alert { background: var(--bad-bg); color: var(--bad); border-radius: 8px;
  padding: 8px 12px; width: 100%; font-size: 13px; }

/* reveal */
.reveal-row { display: flex; gap: 14px; align-items: baseline; margin: 8px 0; flex-wrap: wrap; }
.reveal-label { color: var(--muted); width: 90px; font-size: 13px; }
code.secret { font-size: 18px; background: #0f172a; color: #7dd3fc;
  padding: 8px 14px; border-radius: 8px; letter-spacing: .5px; user-select: all; }
.reveal-actions { display: flex; gap: 10px; margin-top: 14px; }

/* HR pages */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 14px 0; }
.panel summary, .h2-like { cursor: pointer; font-weight: 600; color: #33415f; font-size: 15px; }
.onboarding-form { align-items: end; }
.onboarding-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.jd-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.jd-form label.stack { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.jd-form textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font: inherit; background: #fff; color: var(--ink); }
.jd-list { margin: 6px 0 0 18px; padding: 0; font-size: 13px; }
.confirm-form { margin-top: 4px; }

/* MFA + face */
.mfa-card { width: 420px; }
.tabs { display: flex; gap: 6px; width: 100%; margin-bottom: 12px; }
.tab { flex: 1; border: 1px solid var(--line); background: #f8fafc; color: var(--muted);
  padding: 8px 0; border-radius: 8px; cursor: pointer; font-weight: 600; }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-panel { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.video-wrap { width: 100%; background: #0f172a; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; }
.video-wrap video { width: 100%; transform: scaleX(-1); }

/* Master roll */
.mr-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); margin-top: 10px; }
.mr-table { table-layout: fixed; }
.mr-table th { position: sticky; top: 0; }
.mr-name { min-width: 150px; text-align: left; }
.mr-day { min-width: 26px; width: 26px; text-align: center; font-size: 10px; padding: 6px 2px; }
.mr-cell { text-align: center; font-size: 10px; font-weight: 700; padding: 6px 2px; }
.mr-p { background: var(--ok-bg); color: var(--ok); }
.mr-late { background: #ffedd5; color: #c2410c; }
.mr-hd { background: #fef3c7; color: #92400e; }
.mr-lv { background: var(--warn-bg); color: var(--warn); }
.mr-ab { background: var(--bad-bg); color: var(--bad); }
.mr-off { background: #f1f5f9; color: #94a3b8; }
.mr-hol { background: #ede9fe; color: #7c3aed; }
.mr-na { color: #cbd5e1; }

/* Payslip */
.ps-sheet { background: #fff; border: 1px solid var(--line); border-radius: 12px;
  max-width: 860px; overflow: hidden; }
.ps-head { background: #101a35; color: #fff; padding: 18px 22px;
  display: flex; justify-content: space-between; align-items: center; }
.ps-brand { font-weight: 700; font-size: 16px; }
.ps-sub { color: #94a3b8; font-size: 12px; margin-top: 3px; }
.ps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 18px;
  padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ps-l { display: block; color: var(--muted); font-size: 11px; }
.ps-strip { display: grid; grid-template-columns: repeat(5, 1fr);
  background: #f8fafc; border-bottom: 1px solid var(--line); }
.ps-strip div { text-align: center; padding: 10px 4px; border-right: 1px solid var(--line); }
.ps-strip div:last-child { border-right: none; }
.ps-strip b { display: block; font-size: 17px; color: #17203a; }
.ps-strip span { font-size: 10px; color: var(--muted); }
.ps-cols { display: grid; grid-template-columns: 1fr 1fr; }
.ps-cols > div { padding: 14px 22px; }
.ps-cols > div:first-child { border-right: 1px solid var(--line); }
.ps-cols h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); margin-bottom: 8px; }
.ps-row { display: flex; justify-content: space-between; font-size: 13px;
  padding: 4px 0; border-bottom: 1px solid #eef2f7; }
.ps-total { font-weight: 700; border-top: 2px solid var(--line); margin-top: 4px; }
.ps-net { background: #101a35; color: #fff; padding: 14px 22px;
  display: flex; justify-content: space-between; align-items: center; }
.ps-net strong { font-size: 22px; }
@media print {
  .sidebar, .no-print, header { display: none !important; }
  .content { margin: 0; padding: 0; }
  .ps-sheet { border: none; }
}
