* { box-sizing: border-box; }
:root {
    color-scheme: light;
    --bg: #f5f6fa;
    --ink: #162236;
    --muted: #566479;
    --line: #e0e5ee;
    --surface: #fff;
    --accent: #5843bc;
    --accent-hover: #44319d;
    --sidebar: #171b32;
    --radius: 16px;
    font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
}
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #9179f0; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.055em; line-height: 1.07; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; font-size: .72rem; font-weight: 800; letter-spacing: .14em; color: var(--accent); margin-bottom: 8px; }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); color: #fff; padding: 27px 16px 17px; min-height: 100vh; display: flex; flex-direction: column; gap: 29px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-size: 1.25rem; font-weight: 800; letter-spacing: -.035em; padding-inline: 7px; }
.brand-icon { background: #7156dc; color: #fff; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; font-size: 1.25rem; }
.nav-title { color: #a8b0ca; font-weight: 750; letter-spacing: .13em; font-size: .66rem; padding: 0 10px; margin: 18px 0 6px; }
.nav-link, .add-role > summary { color: #dce1f3; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px; margin: 3px 0; min-height: 40px; }
.nav-link[aria-current], .nav-link:hover, .add-role > summary:hover { background: #333057; color: #fff; text-decoration: none; }
.nav-link > span:first-child { min-width: 12px; text-align: center; }
.role-dot { min-width: 7px !important; width: 7px; height: 7px; background: #b3a0ff; border-radius: 50%; }
.role-name { flex: 1; overflow-wrap: anywhere; }
.role-nav small { color: #c7c9e7; }
.add-role > summary { color: #c6b8ff; }
.add-role form { padding: 10px; }
.account { margin-top: auto; border-top: 1px solid #3b405b; padding-top: 14px; display: grid; grid-template-columns: 33px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .82rem; }
.account small, .candidate-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account small { color: #bac2dc; }
.avatar { width: 35px; height: 35px; flex: none; display: grid; place-items: center; background: #ede8ff; color: #4a36a7; border-radius: 11px; font-weight: 750; }
.account .avatar { width: 32px; height: 32px; }
.logout { color: #e3dcff; border: 0; background: transparent; padding: 7px 2px; font-size: .75rem; }
.logout:hover { text-decoration: underline; }
.main { padding: clamp(20px, 4vw, 54px); width: 100%; max-width: 1720px; margin-inline: auto; }
.top { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 24px; }
.top .muted { margin-top: 9px; }
.button, .primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: 9px; font-weight: 700; border: 1px solid transparent; min-height: 40px; white-space: nowrap; }
.button:hover { text-decoration: none; }
.primary { background: var(--accent); color: white; box-shadow: 0 4px 10px #4938a322; }
.primary:hover { background: var(--accent-hover); }
.secondary { color: var(--ink); background: #fff; border-color: #d7ddec; }
.secondary:hover { background: #f2efff; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 15px 18px; display: grid; grid-template-columns: 10px 1fr; gap: 5px 8px; align-items: center; font-weight: 650; color: var(--muted); }
.metric strong { grid-column: 1/-1; color: var(--ink); font-size: 2.1rem; font-variant-numeric: tabular-nums; line-height: 1.25; }
.metric-dot { width: 8px; height: 8px; border-radius: 50%; background: #765cde; }
.hold .metric-dot { background: #c58c18; }
.shortlisted .metric-dot { background: #2f986a; }
.rejected .metric-dot { background: #ca586a; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; box-shadow: 0 5px 18px #25275408; }
.panel-head { padding: 19px 20px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.panel-head p { margin-top: 3px; }
.count { font-size: .79rem; color: var(--muted); padding: 4px 9px; border-radius: 20px; border: 1px solid var(--line); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { text-align: left; padding: 12px 20px; border-top: 1px solid var(--line); }
thead { background: #f9f9fc; color: var(--muted); font-size: .79rem; }
.role-table { color: var(--ink); }
.pill { display: inline-block; border-radius: 20px; padding: 4px 9px; min-width: 29px; text-align: center; font-size: .77rem; line-height: 1.3; font-weight: 750; white-space: nowrap; }
.pill.total { color: #4a36a7; background: #eee9ff; }
.pill.hold { color: #754600; background: #fff3d7; }
.pill.shortlisted { color: #126041; background: #e1f7eb; }
.pill.rejected { color: #a0253e; background: #fce8ec; }
.empty { text-align: center; color: var(--muted); border-top: 1px dashed var(--line); padding: 40px 15px; }
.empty strong { color: var(--ink); }
.empty p { margin-top: 6px; }
label { display: grid; gap: 5px; font-size: .83rem; font-weight: 700; min-width: 0; }
input, select { width: 100%; min-width: 0; min-height: 41px; background: #fff; border: 1px solid #ccd4e3; color: var(--ink); border-radius: 8px; padding: 7px 9px; }
input[type=file]::file-selector-button { border: 0; border-radius: 5px; padding: 5px 8px; margin-right: 8px; background: #eee9ff; color: #42318f; font: inherit; cursor: pointer; }
.stack { display: grid; gap: 13px; }
.stack > button { justify-self: start; }
.upload { margin-bottom: 22px; scroll-margin: 20px; }
.upload > summary { padding: 15px 20px; font-weight: 750; }
.upload summary small { color: var(--muted); font-weight: 500; margin-left: 7px; }
.upload-form, #batch-results { padding: 0 20px 19px; }
.upload-form { display: grid; gap: 13px; justify-items: start; }
.upload-fields, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; width: 100%; }
.upload-form details { width: 100%; background: #f8f8fc; padding: 9px 12px; border-radius: 8px; }
.upload-form details p { margin: 7px 0; }
.upload-help, #batch-results { font-size: .87rem; }
#batch-list a, .notice a { margin-left: 8px; font-weight: 700; }
#batch-list li { overflow-wrap: anywhere; margin-bottom: 5px; }
.notice { border-radius: 9px; padding: 11px 13px; margin-bottom: 15px; background: #e4f7ed; color: #154f38; overflow-wrap: anywhere; }
.notice.error { background: #ffe9ed; color: #8c1933; }
.bank-layout { display: grid; gap: 16px; align-items: start; }
.bank-layout.with-viewer { grid-template-columns: minmax(265px, .9fr) minmax(290px, 1.1fr); }
.filter { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(105px, 1fr) auto; align-items: end; gap: 7px; padding: 0 16px 16px; }
.candidate-list { margin: 0; padding: 0; list-style: none; }
.candidate-list li { border-top: 1px solid var(--line); }
.candidate-row { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 12px 15px; color: var(--ink); }
.candidate-row:hover, .candidate-row.selected { text-decoration: none; background: #f6f3ff; }
.candidate-list li:last-child .candidate-row { border-radius: 0 0 var(--radius) var(--radius); }
.candidate-name { min-width: 0; overflow-wrap: anywhere; }
.candidate-name small { color: var(--muted); }
.profile { background: #faf9ff; padding: 15px; border-top: 1px solid var(--line); scroll-margin: 14px; }
.profile-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; margin-bottom: 12px; overflow-wrap: anywhere; }
.profile-head a { white-space: nowrap; }
.profile-head p { font-size: .79rem; }
.pagination { display: flex; gap: 13px; justify-content: center; padding: 13px; border-top: 1px solid var(--line); }
.viewer { position: sticky; top: 12px; scroll-margin: 12px; }
.viewer h2 { overflow-wrap: anywhere; font-size: 1rem; }
.viewer .eyebrow { margin-bottom: 2px; }
.viewer-controls { border-top: 1px solid var(--line); display: flex; justify-content: center; gap: 12px; align-items: center; padding: 6px; }
.viewer-controls button { min-height: 32px; padding: 3px 12px; }
.preview { background: #e8eaf1; padding: 12px; border-radius: 0 0 var(--radius) var(--radius); max-height: 76vh; overflow: auto; }
.preview img { width: 100%; display: block; height: auto; background: white; box-shadow: 0 2px 8px #23263e25; }
.skip { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); z-index: 1; background: #fff; padding: 8px; }
.skip:focus { transform: none; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at top left, #e9e1ff, transparent 60%), var(--bg); }
.auth { width: min(100%, 455px); background: #fff; padding: clamp(22px, 6vw, 44px); border-radius: 22px; border: 1px solid var(--line); box-shadow: 0 18px 60px #2c20571c; }
.auth-brand { padding: 0; margin-bottom: 24px; }
.auth h1 { margin-bottom: 7px; }
.auth form, .auth .notice { margin-top: 17px; }
.auth .primary { justify-self: stretch; }
@media (max-width: 1130px) {
    .workspace { grid-template-columns: 192px minmax(0, 1fr); }
    .main { padding: 24px; }
    .account { grid-template-columns: 32px minmax(0, 1fr); }
    .account form { grid-column: 2; }
}
@media (max-width: 850px) {
    .bank-layout.with-viewer { grid-template-columns: 1fr; }
    .viewer { position: static; }
    .preview { max-height: none; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .workspace { display: block; }
    .sidebar { min-height: 0; padding: 12px; gap: 8px; }
    .sidebar nav { display: flex; align-items: start; flex-wrap: wrap; gap: 4px; }
    .nav-title { display: none; }
    .account { grid-template-columns: 32px minmax(0, 1fr) auto; }
    .account form { grid-column: auto; }
    .main { padding: 17px 12px; }
    .top { align-items: flex-start; flex-direction: column; }
    .upload-fields { grid-template-columns: 1fr; }
    .metric { padding: 11px; }
    th, td { padding: 10px 12px; }
}

