/* ============================================================
   BIT Payroll — prototype styles
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --ink: #1b2437;
  --muted: #64708a;
  --line: #e3e8f0;
  --primary: #002952;
  --primary-dark: #00203f;
  --primary-soft: #e7eef6;
  --sidebar: #001a33;
  --sidebar-ink: #aeb8d0;
  --ok: #0e8a5f;
  --ok-soft: #e0f5ec;
  --warn: #a36a00;
  --warn-soft: #fdf1d8;
  --err: #c0392b;
  --err-soft: #fdeae7;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 28, 48, .07), 0 4px 16px rgba(20, 28, 48, .05);
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
code { background: var(--primary-soft); padding: 1px 6px; border-radius: 5px; font-size: 12px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, #0a5aa8, #002952); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
}
.brand-logo.big { width: 52px; height: 52px; font-size: 26px; border-radius: 13px; margin: 0 auto 12px; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; }
.brand-sub { font-size: 10.5px; opacity: .75; }
nav { padding: 10px 8px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; color: var(--sidebar-ink);
  padding: 9px 12px; border-radius: 8px; margin-bottom: 2px; font-weight: 500;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-icon { width: 20px; text-align: center; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 8px; }
.user-chip { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.user-name { color: #fff; font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; opacity: .75; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; background: var(--primary-soft); color: var(--primary); }
.main { flex: 1; padding: 24px 28px 60px; min-width: 0; }

/* ---------- page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 750; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-sub { color: var(--muted); margin-top: 3px; max-width: 720px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.h-badge { background: var(--primary-soft); color: var(--primary); font-size: 12px; padding: 2px 9px; border-radius: 20px; font-weight: 700; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; border: 1px solid var(--line); }
.cards .card { margin-bottom: 0; }
.card-title { font-weight: 700; font-size: 14.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stat-value { font-size: 26px; font-weight: 800; margin: 6px 0 2px; }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat-attn { border-color: #f0c36d; background: #fffdf5; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-13 { grid-template-columns: 1fr 1.6fr; }
@media (max-width: 1100px) { .grid-2, .cards-4 { grid-template-columns: 1fr; } }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); background: #f8fafd; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl-tight th, .tbl-tight td { padding: 7px 8px; }
.row-link { cursor: pointer; }
.row-link:hover { background: #f6f8fd; }
.row-total td { background: #f8fafd; border-top: 2px solid var(--line); }
.ta-r { text-align: right !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt { margin-top: 12px; }
.emp-cell { display: flex; gap: 10px; align-items: center; }
.th-src { font-size: 9px; background: var(--primary-soft); color: var(--primary); border-radius: 4px; padding: 1px 4px; vertical-align: middle; }

/* ---------- badges / buttons ---------- */
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err); }
.badge-mute { background: #eef1f6; color: var(--muted); }
.badge-hrms { background: #e8f4fd; color: #1470a8; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; cursor: pointer;
  border-radius: 8px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; font-family: inherit;
  background: transparent; color: var(--ink); transition: .12s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--primary-soft); color: var(--primary); }
.btn-secondary:hover { background: #dbe4fa; }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { background: #f4f6fb; }
.btn-danger-ghost { border-color: #f2c6c0; color: var(--err); background: var(--surface); }
.btn-danger-ghost:hover { background: var(--err-soft); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: default; }
.sel, .sel-block {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-family: inherit;
  font-size: 13.5px; background: var(--surface); color: var(--ink);
}
.sel-block { width: 100%; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.form-grid input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; color: var(--ink); }
.form-grid input:focus, .sel:focus, .sel-block:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.span-2 { grid-column: span 2; }
.inp-num { width: 84px; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; font-size: 13px; font-family: inherit; }
.inp-num:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.form-err { color: var(--err); font-size: 12.5px; min-height: 18px; margin: 4px 0; }

/* ---------- misc ---------- */
.callout {
  background: #fffbe9; border: 1px solid #f0dfa0; border-radius: var(--radius); padding: 13px 16px;
  margin-bottom: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.callout .btn { margin-left: auto; }
.empty { color: var(--muted); padding: 26px 10px; text-align: center; }
.loading { color: var(--muted); padding: 30px; text-align: center; font-weight: 600; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.kv-grid > div { display: flex; flex-direction: column; }
.kv-grid span { font-size: 11.5px; color: var(--muted); }
.conn-status { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.check-list { list-style: none; }
.check-list li { padding: 6px 0 6px 24px; position: relative; border-bottom: 1px dashed var(--line); }
.check-list li:last-child { border-bottom: none; }
.check-list li::before { content: '✓'; color: var(--ok); font-weight: 800; position: absolute; left: 4px; }
.run-actions { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- structure preview ---------- */
.struct { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 1100px) { .struct { grid-template-columns: 1fr; } }
.struct-row { display: flex; justify-content: space-between; padding: 6px 4px; border-bottom: 1px dashed var(--line); }
.struct-row.head { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line); }
.struct-row.total { border-top: 2px solid var(--ink); border-bottom: none; font-size: 15px; padding-top: 9px; }

/* ---------- toolbar / search / pagination ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.search {
  flex: 1; min-width: 220px; max-width: 420px; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 13.5px; font-family: inherit; color: var(--ink); background: #fbfcfe;
}
.search:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); background: #fff; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.pg-btns { display: flex; gap: 4px; }
.pg-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 7px;
  min-width: 30px; padding: 5px 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.pg-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-btn:disabled { opacity: .45; cursor: default; }

/* ---------- report tabs & panels ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 0; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); border-bottom: none; background: #eef1f7; color: var(--muted);
  border-radius: 10px 10px 0 0; padding: 10px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--primary); box-shadow: 0 -2px 0 var(--primary) inset; }
.report-card { border-top-left-radius: 0; margin-top: 0; }
.report-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  border-radius: 10px; padding: 16px 20px; color: #fff; margin-bottom: 16px;
}
.rh-epf  { background: linear-gradient(120deg, #002952, #0a5aa8); }
.rh-esi  { background: linear-gradient(120deg, #0d6e50, #12a578); }
.rh-pt   { background: linear-gradient(120deg, #7a4a10, #c98a1e); }
.rh-bank { background: linear-gradient(120deg, #46246e, #7c4df0); }
.rh-title { font-weight: 800; font-size: 16px; }
.rh-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.rh-total { text-align: right; background: rgba(255,255,255,.14); border-radius: 8px; padding: 8px 16px; }
.rh-total span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; opacity: .85; }
.rh-total strong { font-size: 22px; }
.report-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .report-grid { grid-template-columns: 1fr; } }
.rp-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.rp-row em { color: var(--muted); font-size: 11.5px; }
.rp-row.rp-total { border-top: 2px solid var(--ink); border-bottom: none; font-size: 15px; font-weight: 700; padding-top: 10px; }
.rp-table { overflow-x: auto; }
.kpi-epf  { border-left: 4px solid #0a5aa8; }
.kpi-esi  { border-left: 4px solid #12a578; }
.kpi-pt   { border-left: 4px solid #c98a1e; }
.kpi-bank { border-left: 4px solid #7c4df0; }

/* ---------- attendance / LOP ---------- */
.att-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
@media (max-width: 1100px) { .att-grid { grid-template-columns: repeat(4, 1fr); } }
.att-grid > div { background: #f6f8fd; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; text-align: center; }
.att-grid span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.att-grid strong { font-size: 18px; }
.att-grid .att-lop, .att-lop { background: var(--err-soft) !important; border-color: #f2c6c0 !important; }
.att-lop strong { color: var(--err); }
.inp-lop { border-color: #e0a8a0; background: #fff7f6; }
.lop-flag { color: var(--err); font-weight: 800; margin-left: 4px; cursor: help; }

/* ---------- toast ---------- */
#toast-container { position: fixed; bottom: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--sidebar); color: #fff; border-radius: 8px; padding: 11px 16px; font-size: 13.5px;
  box-shadow: 0 6px 24px rgba(0,0,0,.25); opacity: 0; transform: translateY(8px); transition: .25s; max-width: 380px;
}
.toast.show { opacity: 1; transform: none; }
.toast-warn { background: #7a5200; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(1000px 600px at 20% 0%, #0d3e6b 0%, #001a33 55%, #000a18 100%);
}
.login-card { background: var(--surface); border-radius: 16px; padding: 34px 34px 26px; width: 430px; max-width: 100%; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand h1 { font-size: 22px; margin-bottom: 6px; }
.login-brand p { color: var(--muted); font-size: 12.5px; }
.login-card form label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.login-card form input { width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; }
.login-card form input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.demo-creds { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 14px; }
.demo-title { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.cred-row {
  display: block; width: 100%; text-align: left; background: #f6f8fd; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font-size: 12.5px; color: var(--muted); cursor: pointer; margin-bottom: 6px; font-family: inherit;
}
.cred-row:hover { border-color: var(--primary); color: var(--ink); }
.cred-row strong { color: var(--ink); display: inline-block; min-width: 130px; }

/* ---------- payslip ---------- */
.slip-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.slip {
  background: #fff; border: 1px solid var(--line); border-radius: 6px; max-width: 860px; margin: 0 auto;
  padding: 34px 38px; box-shadow: var(--shadow); color: #16202f;
}
.slip-head { display: flex; gap: 16px; align-items: center; border-bottom: 3px solid var(--sidebar); padding-bottom: 14px; }
.slip-logo {
  width: 54px; height: 54px; border-radius: 10px; background: linear-gradient(135deg, #0a5aa8, #002952);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; flex-shrink: 0;
}
.slip-co h2 { font-size: 18px; }
.slip-co div { font-size: 12px; color: var(--muted); }
.slip-title { text-align: center; font-weight: 800; font-size: 15px; letter-spacing: .6px; text-transform: uppercase; margin: 16px 0; }
.slip-emp { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 14px; background: #f6f8fd; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.slip-emp > div { display: flex; flex-direction: column; }
.slip-emp span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.slip-emp strong { font-size: 12.5px; }
.slip-tbl { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.slip-tbl th, .slip-tbl td { border: 1px solid #d6dce8; padding: 7px 10px; font-size: 13px; text-align: left; }
.slip-tbl thead th { background: var(--sidebar); color: #fff; font-size: 12px; }
.slip-tbl tfoot th { background: #f0f3f9; }
.slip-ledger td:first-child { width: 34%; }
.slip-ledger td.ta-r { width: 18%; font-variant-numeric: tabular-nums; }
.slip-note { color: var(--muted); font-size: 11.5px !important; font-style: italic; }
.slip-ledger .l-bold td { font-weight: 700; }
.slip-ledger .l-total td { font-weight: 700; background: #f0f3f9; }
.slip-ledger .l-net td { font-weight: 800; font-size: 14.5px; background: var(--sidebar); color: #fff; }
.slip-ledger .l-net td.slip-note { color: #aeb8d0; }
.slip-net { display: flex; align-items: baseline; gap: 18px; border: 2px solid var(--sidebar); border-radius: 8px; padding: 10px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.slip-net > div:first-child { display: flex; gap: 14px; align-items: baseline; }
.slip-net span { font-weight: 700; }
.slip-net strong { font-size: 22px; }
.slip-words { color: var(--muted); font-size: 12.5px; font-style: italic; }
.slip-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; }
.slip-meta-col { border: 1px dashed #c9d2e2; border-radius: 8px; padding: 10px 14px; }
.slip-meta-title { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 800; margin-bottom: 6px; }
.slip-meta-col > div:not(.slip-meta-title) { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.slip-foot { text-align: center; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- print ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .no-print, #toast-container { display: none !important; }
  .main { padding: 0; }
  .slip { border: none; box-shadow: none; max-width: 100%; padding: 10px 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------- admin nav / 2FA / security ---------- */
.nav-sect {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--sidebar-ink);
  opacity: .6; font-weight: 800; padding: 14px 12px 4px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 10px;
}
.otp-demo {
  background: #fffbe9; border: 1px dashed #e3c96a; border-radius: 10px; text-align: center;
  padding: 12px; margin-bottom: 18px;
}
.otp-demo span { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--warn); font-weight: 800; }
.otp-code { font-size: 30px; font-weight: 800; letter-spacing: 10px; margin-top: 4px; color: var(--ink); }
.otp-input { text-align: center; font-size: 24px !important; letter-spacing: 12px; font-weight: 700; }
.otp-links { display: flex; justify-content: space-between; margin-top: 14px; }
.sec-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; cursor: pointer; }
.sec-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); cursor: pointer; }

/* ---------- TOTP enrollment ---------- */
.login-card-wide { width: 560px; }
.enroll-grid { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: start; }
@media (max-width: 620px) { .enroll-grid { grid-template-columns: 1fr; justify-items: center; } }
.qr-box {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px;
  text-align: center; box-shadow: var(--shadow);
}
.qr-box img { display: block; border-radius: 6px; }
.qr-fallback { display: none; padding: 20px 6px; }
.qr-box.qr-failed img { display: none; }
.qr-box.qr-failed .qr-fallback { display: block; }
.totp-key-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 800; margin-bottom: 5px; }
.totp-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; font-weight: 700;
  letter-spacing: 1px; background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 8px; padding: 9px 12px; margin-bottom: 6px; word-break: break-all; user-select: all;
}

/* ---------- replica payslip (matches the accounts team's actual format) ---------- */
.rslip {
  --navy: #002952;
  background: #fff; max-width: 820px; margin: 0 auto; padding: 28px 30px;
  border: 1px solid var(--line); box-shadow: var(--shadow); color: #111;
  font-family: 'Calibri', -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 13.5px;
}
.rslip table { width: 100%; border-collapse: collapse; }
.rs-head { display: flex; align-items: center; background: var(--navy, #002952); }
.rs-head { background: #002952; }
.rs-logo {
  width: 74px; height: 62px; background: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 26px; color: #002952; flex-shrink: 0; border: 4px solid #002952;
}
.rs-co { flex: 1; color: #fff; font-weight: 800; font-size: 17px; text-align: center; padding: 18px 10px; letter-spacing: .3px; }
.rs-addr { background: #f0f0f0; color: #002952; font-weight: 800; text-align: center; font-size: 12.5px; padding: 12px 8px; border: 1px solid #ddd; border-top: none; }
.rs-bar { background: #002952; color: #fff; font-weight: 800; text-align: center; font-size: 15px; letter-spacing: .5px; padding: 9px; margin-top: 14px; }
.rs-info { margin-top: 16px; }
.rs-info td { border: 1px solid #444; padding: 8px 10px; vertical-align: top; }
.rs-info .rs-k { font-weight: 800; width: 17%; }
.rs-info .rs-v { width: 33%; }
.rs-info .rs-empty { border: none; }
.rs-ap { margin-top: 18px; }
.rs-ap th { background: #002952; color: #fff; font-weight: 800; padding: 7px; font-size: 13px; border: 1px solid #002952; }
.rs-ap td { border: 1px solid #444; padding: 10px; }
.rs-ap .rs-k { font-weight: 800; width: 28%; }
.rs-ed { margin-top: 18px; }
.rs-ed thead th { background: #002952; color: #fff; font-weight: 800; padding: 7px 10px; font-size: 13px; border: 1px solid #002952; }
.rs-ed td { border: 1px solid #444; padding: 7px 10px; }
.rs-ed td:nth-child(2), .rs-ed td:nth-child(4) { width: 20%; }
.rs-ded-total td { background: #f0f0f0; }
.rs-net {
  display: flex; justify-content: space-between; align-items: center; background: #002952; color: #fff;
  font-weight: 800; padding: 9px 14px; margin-top: 16px; font-size: 15px;
}
.rs-note { font-size: 11.5px; color: #555; margin-top: 8px; font-style: italic; }
.rs-foot { text-align: center; color: #888; font-weight: 700; font-size: 12.5px; border: 1px solid #ddd; padding: 9px; margin-top: 16px; }
.ta-c { text-align: center !important; }
@media print {
  .rslip { border: none; box-shadow: none; max-width: 100%; padding: 0; }
  .rs-head, .rs-bar, .rs-ap th, .rs-ed thead th, .rs-net { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ---------- bank payment letter ---------- */
.bank-letter {
  background: #fff; max-width: 860px; margin: 0 auto; padding: 36px 44px;
  border: 1px solid var(--line); box-shadow: var(--shadow); color: #111;
  font-family: 'Calibri', -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 13.5px; line-height: 1.7;
}
.bl-co { font-weight: 800; font-size: 16px; }
.bl-title { font-weight: 700; margin-bottom: 2px; }
.bl-date { margin-bottom: 14px; }
.bl-addr { font-weight: 700; margin-bottom: 14px; }
.bl-inline {
  border: none; border-bottom: 1px dashed #999; font-family: inherit; font-size: inherit;
  font-weight: 700; padding: 0 2px; background: #fffbe9; width: auto;
}
.bl-inline:focus { outline: none; background: #fff3c4; }
.bl-tbl { width: 100%; border-collapse: collapse; margin: 14px 0 26px; }
.bl-tbl th, .bl-tbl td { border: 1px solid #444; padding: 5px 9px; font-size: 12.5px; text-align: center; }
.bl-tbl th { background: #f0f0f0; font-weight: 800; }
.bl-tbl .ta-l { text-align: left; }
.bl-tbl .ta-r { text-align: right; }
.bl-tbl tfoot td { background: #f0f0f0; }
.bl-sign { margin-top: 30px; }
.bl-sig-space { height: 56px; }
.cfg-sect {
  font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  font-weight: 800; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 6px;
}
@media print {
  .bank-letter { border: none; box-shadow: none; max-width: 100%; padding: 0; }
  .bl-inline { background: transparent; border-bottom: none; }
}

/* ---------- brand logo & navy theme details ---------- */
.brand { display: block; padding: 14px 14px 12px; }
.brand-card {
  background: #fff; border-radius: 10px; padding: 10px 12px;
  display: flex; align-items: center; justify-content: center;
}
.brand-card img { width: 100%; max-height: 54px; object-fit: contain; display: block; }
.brand .brand-sub { text-align: center; margin-top: 8px; font-size: 10px; opacity: .75; }
.login-logo { display: block; margin: 0 auto 12px; width: 220px; max-width: 80%; }
.rs-logo { width: 132px; height: 62px; padding: 6px 8px; }
.rs-logo img { width: 100%; height: 100%; object-fit: contain; }
/* active nav needs a lighter navy to stand out against the brand sidebar */
.nav-item.active { background: #0a5aa8; }
.login-brand h1 { display: none; }

/* ---------- PII masking ---------- */
.pii-btn { padding: 0 6px; font-size: 11px; vertical-align: middle; margin-left: 2px; }
.kv-grid strong[id^="pii-"] { letter-spacing: .5px; }

/* ---------- QA verification ---------- */
.qa-bad td { background: var(--err-soft); }

/* ---------- workflow stepper ---------- */
.stepper {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px; margin-bottom: 18px; flex-wrap: wrap;
}
.step { display: flex; align-items: center; gap: 9px; min-width: 0; }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #eef1f6; color: var(--muted); font-weight: 800; font-size: 13px;
  border: 2px solid var(--line);
}
.step.done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.active .step-dot { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.step-label { font-weight: 700; font-size: 12.5px; }
.step.done .step-label { color: var(--ok); }
.step.active .step-label { color: var(--warn); }
.step-sub { font-size: 10.5px; color: var(--muted); }
.step-line { flex: 1; height: 2px; background: var(--line); min-width: 18px; }

/* ---------- QA attendance report lists ---------- */
.qa-list { list-style: none; margin: 0; }
.qa-list li { padding: 5px 0 5px 4px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.qa-list li:last-child { border-bottom: none; }
