:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #14213d;
    --muted: #667085;
    --line: #e5eaf1;
    --primary: #2251cc;
    --primary-dark: #173b99;
    --success: #147d56;
    --danger: #c7353f;
    --warning: #a16207;
    --sidebar: #101b36;
    --sidebar-muted: #aeb9d4;
    --shadow: 0 8px 30px rgba(31, 45, 72, .07);
    --radius: 14px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; background: var(--sidebar); color: white; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 24px; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; overflow: hidden; flex: 0 0 auto; border-radius: 12px; color: white; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(145deg, #4f7cff, #2251cc); box-shadow: 0 8px 20px rgba(52, 93, 220, .35); }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-mark-icon { padding: 6px; }
.brand-mark-logo { display: flex; align-items: center; justify-content: center; width: 190px; height: 68px; padding: 8px 12px; line-height: 0; border-radius: 16px; background: rgba(255,255,255,.97); box-shadow: 0 10px 28px rgba(0,0,0,.22); }
.brand-mark-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; object-position: center; }
.brand strong { display: block; font-size: 16px; }
.brand small, .user-chip small { display: block; color: var(--sidebar-muted); font-size: 11px; margin-top: 1px; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--sidebar-muted); font-weight: 600; transition: .2s ease; }
.nav-link span { display: grid; place-items: center; width: 22px; font-size: 16px; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.09); }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 8px; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #e9efff; color: var(--primary); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.avatar-large { width: 64px; height: 64px; font-size: 20px; }
.main-content { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { min-height: 92px; display: flex; align-items: center; gap: 18px; justify-content: space-between; padding: 20px 32px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.topbar p { margin: 2px 0 0; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions form { margin: 0; }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }
.page-content { width: 100%; max-width: 1520px; margin: 0 auto; padding: 28px 32px 44px; }
.footer { margin-top: auto; padding: 18px 32px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card, .stack > * + * { margin-top: 18px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-header h2, .card h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.card h3 { margin: 22px 0 8px; font-size: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats-grid.four { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.stat-card { min-height: 112px; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transition: .2s ease; }
a.stat-card:hover { transform: translateY(-2px); border-color: #cbd7f3; }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #eef3ff; color: var(--primary); font-size: 20px; font-weight: 800; }
.stat-card small { display: block; color: var(--muted); margin-bottom: 3px; }
.stat-card strong { display: block; font-size: 28px; line-height: 1; letter-spacing: -.04em; }
.stat-card .text-value { font-size: 18px; line-height: 1.25; }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 12px; text-align: left; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
td small { display: block; color: var(--muted); margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 34px !important; }
.person-cell { display: inline-flex; align-items: center; gap: 10px; }
.person-cell strong { display: block; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-link { color: var(--primary); font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border-radius: 9px; border: 1px solid transparent; font-weight: 700; white-space: nowrap; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { color: var(--text); background: white; border-color: var(--line); }
.btn-success { color: white; background: var(--success); }
.btn-danger { color: white; background: var(--danger); }
.btn-quiet { color: var(--sidebar-muted); background: transparent; border-color: rgba(255,255,255,.16); }
.btn-block { width: 100%; }
.btn-small { min-height: 30px; padding: 5px 9px; font-size: 12px; border-radius: 7px; }
.btn-large { min-height: 46px; padding: 11px 18px; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border-radius: 999px; background: #eef2f7; color: #475467; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-active, .badge-approved, .badge-paid, .badge-finalised, .badge-resolved, .badge-closed { color: #067647; background: #ecfdf3; }
.badge-pending, .badge-reported, .badge-draft, .badge-warning, .badge-moderate, .badge-submitted { color: #9a6700; background: #fffaeb; }
.badge-rejected, .badge-terminated, .badge-critical { color: #b42318; background: #fef3f2; }
.badge-inactive, .badge-open { color: #475467; background: #f2f4f7; }
.badge-investigating, .badge-action_required, .badge-high { color: #b54708; background: #fff4ed; }
.badge-low { color: #175cd3; background: #eff8ff; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.alert-success { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.alert-danger { color: #b42318; border-color: #fecdca; background: #fef3f2; }
.alert-warning { color: #854a0e; border-color: #fedf89; background: #fffaeb; }
.alert-info { color: #175cd3; border-color: #b2ddff; background: #eff8ff; }
.form-card { max-width: 980px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
label { display: grid; gap: 7px; color: #344054; font-weight: 700; font-size: 13px; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--text); background: white; border: 1px solid #d7dde7; border-radius: 9px; outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #7f9ff4; box-shadow: 0 0 0 3px rgba(34,81,204,.11); }
input[type="checkbox"] { width: 17px; min-height: 17px; }
.checkbox { display: flex; align-items: center; gap: 9px; align-self: end; min-height: 42px; }
.span-all { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.filter-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.filter-bar select { width: auto; min-width: 150px; }
.search-field { position: relative; flex: 1; display: block; }
.search-field span { position: absolute; left: 12px; top: 10px; color: var(--muted); }
.search-field input { padding-left: 34px; }
.input-group { display: grid; grid-template-columns: 92px 1fr; }
.input-group select { border-radius: 9px 0 0 9px; border-right: 0; }
.input-group input { border-radius: 0 9px 9px 0; }
.profile-hero, .incident-banner { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.profile-hero h2, .incident-banner h2 { margin: 0; font-size: 20px; }
.profile-hero p, .incident-banner p { margin: 3px 0 0; color: var(--muted); }
.profile-hero > .badge { margin-left: auto; }
.badge-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-left: auto; }
.details-grid { display: grid; grid-template-columns: 145px 1fr; gap: 11px 18px; margin: 18px 0 0; }
.details-grid dt { color: var(--muted); }
.details-grid dd { margin: 0; font-weight: 700; }
.balance-grid { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); gap: 14px; }
.balance-grid.compact { margin-bottom: 18px; }
.balance-card { position: relative; overflow: hidden; padding: 18px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.balance-card::before { content: ""; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent, var(--primary)); }
.balance-card small, .balance-card span { display: block; color: var(--muted); }
.balance-card strong { display: block; margin: 6px 0 1px; font-size: 28px; }
.balance-card p { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.clock-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; background: linear-gradient(135deg, #ffffff, #f2f6ff); }
.clock-card h2 { margin: 3px 0; font-size: 24px; }
.clock-card p { margin: 0; color: var(--muted); }
.clock-form { display: grid; grid-template-columns: 120px minmax(200px, 1fr) auto; align-items: end; gap: 10px; }
.decision-form { display: grid; grid-template-columns: minmax(110px, 1fr) auto auto; gap: 5px; min-width: 285px; }
.decision-form input { min-height: 30px; padding: 5px 8px; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pre-line { white-space: pre-line; }
.login-page { background: #0e1730; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: 1.25fr .75fr; }
.login-showcase { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 38px 52px 56px; color: white; background: radial-gradient(circle at 15% 15%, rgba(73,115,255,.5), transparent 34%), radial-gradient(circle at 85% 75%, rgba(32,197,144,.22), transparent 28%), #101b36; }
.login-showcase::after { content: ""; position: absolute; width: 560px; height: 560px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; right: -260px; bottom: -220px; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 150px rgba(255,255,255,.018); }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: 18px; }
.showcase-copy { position: relative; z-index: 1; max-width: 720px; }
.showcase-copy .eyebrow { color: #9db3ff; }
.showcase-copy h1 { max-width: 680px; margin: 16px 0; font-size: clamp(38px, 5vw, 66px); line-height: 1.03; letter-spacing: -.055em; }
.showcase-copy p { max-width: 620px; margin: 0; color: #c7d1e9; font-size: 17px; }
.feature-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; color: #e7ecf8; font-weight: 700; }
.login-panel { display: grid; place-items: center; padding: 32px; background: #f7f9fc; }
.login-card { width: min(440px, 100%); padding: 34px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 70px rgba(23, 38, 70, .13); }
.login-card h2 { margin: 7px 0 0; font-size: 30px; letter-spacing: -.04em; }
.login-card .muted { margin: 3px 0 25px; color: var(--muted); }
.login-card label { margin-top: 15px; }
.login-card button { margin-top: 22px; }
.login-help { display: block; margin-top: 16px; color: var(--muted); text-align: center; }
@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .form-grid.four { grid-template-columns: repeat(2, 1fr); }
    .balance-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: -270px; transition: left .2s ease; }
    .sidebar.open { left: 0; }
    .menu-button { display: block; }
    .topbar { padding: 16px 20px; }
    .page-content { padding: 20px; }
    .two-column, .form-grid.three { grid-template-columns: 1fr; }
    .login-layout { grid-template-columns: 1fr; }
    .login-showcase { display: none; }
}
@media (max-width: 680px) {
    .topbar { align-items: flex-start; flex-wrap: wrap; }
    .topbar-actions { width: 100%; flex-wrap: wrap; }
    .stats-grid, .stats-grid.four, .balance-grid, .form-grid.two, .form-grid.four { grid-template-columns: 1fr; }
    .filter-bar, .clock-card { align-items: stretch; flex-direction: column; }
    .clock-form { grid-template-columns: 1fr; }
    .profile-hero, .incident-banner { align-items: flex-start; flex-wrap: wrap; }
    .profile-hero > .badge, .badge-row { margin-left: 0; }
    .details-grid { grid-template-columns: 1fr; gap: 3px; }
    .details-grid dd { margin-bottom: 8px; }
}
.brand-switcher select { min-width: 180px; min-height: 38px; font-weight: 700; background: var(--surface-2); }
.current-brand { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-weight: 700; }
.current-brand > span { width: 10px; height: 10px; border-radius: 50%; }
.brand-swatch { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: white; background: var(--brand-colour, var(--primary)); font-size: 12px; font-weight: 900; }
input[type="color"] { padding: 5px; }
/* Recruitment and onboarding */
.quick-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.quick-links .card{display:flex;align-items:center;gap:14px;padding:18px}.quick-links .card>span{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#eef3ff;color:var(--primary);font-size:20px;font-weight:900}.quick-links strong,.quick-links small{display:block}.quick-links small{margin-top:3px;color:var(--muted)}.stack-list{display:grid}.stack-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-bottom:1px solid var(--line)}.stack-item:last-child{border-bottom:0}.progress-compact{display:grid;gap:5px;min-width:90px;text-align:right;color:var(--muted);font-size:12px}.progress-compact i,.progress-bar i{display:block;overflow:hidden;height:7px;border-radius:999px;background:#edf0f5}.progress-compact i b,.progress-bar i b{display:block;height:100%;border-radius:inherit;background:var(--primary)}.table-actions{display:flex;flex-wrap:wrap;gap:5px}.wide-form{max-width:1120px}.form-section{padding-bottom:22px;margin-bottom:22px;border-bottom:1px solid var(--line)}.form-section:last-of-type{border-bottom:0}.form-section h2{margin:0 0 16px}.muted,.empty-state{color:var(--muted)}.rating{color:#f59e0b;letter-spacing:1px;font-weight:900}.candidate-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.candidate-header h2{margin:2px 0;font-size:25px}.candidate-header p{margin:0;color:var(--muted)}.avatar-large{width:54px;height:54px;font-size:20px}.recruitment-detail-grid{grid-template-columns:minmax(0,1.55fr) minmax(300px,.65fr)}.content-stack{display:grid;align-content:start;gap:18px}.sticky-card{position:sticky;top:18px}.recruitment-review-sidebar{min-width:0;align-self:start}.recruitment-review-sidebar>.card{position:relative;z-index:auto}.application-management-card{position:static}.answer-list{display:grid;gap:14px}.answer-list article{padding:15px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}.answer-list article p{margin:7px 0 0}.timeline{position:relative;display:grid;gap:16px}.timeline-item{display:grid;grid-template-columns:14px 1fr;gap:12px}.timeline-item>i{width:10px;height:10px;margin-top:5px;border-radius:50%;background:var(--primary)}.timeline-item strong,.timeline-item small{display:block}.timeline-item p{margin:5px 0}.record-card{padding:15px;margin-top:12px;border:1px solid var(--line);border-radius:11px;background:#fbfcfe}.record-card-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.record-card>p{margin:7px 0;color:var(--muted)}.compact-form{margin-top:12px}.compact-form input,.compact-form select,.compact-form textarea{min-height:34px;padding:6px 8px}.inline-create{margin-top:14px;padding:13px;border:1px dashed #c7cfdb;border-radius:10px}.inline-create summary{cursor:pointer;color:var(--primary);font-weight:800}.inline-create form{margin-top:15px}.onboarding-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.onboarding-card{display:block}.onboarding-card h3{margin:18px 0 5px}.onboarding-card p{margin:0 0 18px;color:var(--muted)}.progress-bar{display:grid;gap:7px;margin:15px 0}.progress-bar span{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.progress-bar.large i{height:10px}.onboarding-hero{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;background:linear-gradient(135deg,#fff,#f3f6ff)}.onboarding-hero h2{margin:2px 0}.onboarding-hero p{margin:0;color:var(--muted)}.progress-ring{display:grid;place-items:center;width:88px;height:88px;border-radius:50%;background:#edf3ff;border:8px solid #d7e2ff}.progress-ring strong{font-size:20px}.progress-ring small{color:var(--muted)}.onboarding-layout{grid-template-columns:minmax(0,1.5fr) minmax(280px,.6fr)}.task-list{display:grid;gap:10px}.task-item{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:12px;align-items:start;padding:14px;border:1px solid var(--line);border-radius:11px}.task-item.status-completed,.task-item.status-waived{background:#f1fbf5}.task-check{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#eef2f7;font-weight:900}.status-completed .task-check,.status-waived .task-check{background:#d1fadf;color:#067647}.task-copy>p{margin:5px 0;color:var(--muted)}.task-copy>small{color:var(--muted)}.task-editor{display:none}.task-item:focus-within .task-editor,.task-item:hover .task-editor{display:grid}hr{border:0;border-top:1px solid var(--line);margin:18px 0}
@media(max-width:1100px){.quick-links,.onboarding-grid{grid-template-columns:repeat(2,1fr)}.recruitment-detail-grid,.onboarding-layout{grid-template-columns:1fr}.sticky-card{position:static}}
@media(max-width:680px){.quick-links,.onboarding-grid{grid-template-columns:1fr}.candidate-header,.onboarding-hero{align-items:flex-start;flex-direction:column}.stack-item{align-items:flex-start;flex-direction:column}.task-item{grid-template-columns:30px 1fr}.task-item>button{grid-column:2}.task-editor{display:grid}}
