:root {
  --ink: #123b75;
  --heading: #203f83;
  --accent: #4d7cff;
  --line: #c7d7ec;
  --panel: rgba(255, 255, 255, .88);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html.portal-login-locked { overflow: hidden; }
body.portal-locked > :not(#portalLoginView) { display: none; }
body.portal-locked { overflow: hidden; }
body.portal-session-ready #portalLoginView { display: none; }

.location-prompt { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 22px; background: rgba(11, 42, 78, .42); backdrop-filter: blur(4px); }
.location-prompt[hidden] { display: none; }
.location-prompt-card { width: min(100%, 420px); padding: 28px; border: 1px solid #b7d4ef; border-radius: 16px; color: #173b69; background: #fff; box-shadow: 0 18px 48px rgba(10, 45, 86, .28); text-align: center; }
.location-prompt-icon { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 12px; border-radius: 50%; color: #fff; background: #287ec0; font-size: 24px; font-weight: 800; line-height: 1; }
.location-prompt-card h2 { margin: 0; color: #1f4fa3; font-size: 22px; }
.location-prompt-card p { margin: 8px 0 20px; color: #54729b; font-size: 13px; }
.location-prompt-card label { display: block; margin-bottom: 6px; color: #234d85; font-size: 12px; font-weight: 700; text-align: left; }
.location-prompt-card select { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid #aac9e7; border-radius: 8px; color: #173b69; background: #fff; font: inherit; }
.location-prompt-card button { width: 100%; min-height: 42px; margin-top: 14px; border: 0; border-radius: 8px; color: #fff; background: #287ec0; font-weight: 700; cursor: pointer; }
.location-prompt-card button:hover { background: #1769aa; }

.portal-login-view { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; min-width: 320px; padding: 24px; background: linear-gradient(125deg, #103b73, #2c78bd 48%, #9dd4f2); font-family: "Segoe UI", Arial, sans-serif; }
.portal-login-view::before, .portal-login-view::after { content: ''; position: absolute; pointer-events: none; border-radius: 50%; background: rgba(255,255,255,.12); }
.portal-login-view::before { width: 48vw; height: 48vw; top: -24vw; left: -12vw; }
.portal-login-view::after { width: 42vw; height: 42vw; right: -16vw; bottom: -18vw; }
.portal-login-card { position: relative; z-index: 1; width: min(100%, 560px); padding: 34px; border: 1px solid rgba(255,255,255,.38); border-radius: 20px; color: #173b69; background: rgba(255,255,255,.94); box-shadow: 0 20px 55px rgba(13,54,105,.24); }
.portal-login-logo { display: block; width: 150px; max-width: 100%; margin: 0 auto 20px; }
.portal-login-card h1 { margin: 0; color: #1f4fa3; font-size: 30px; text-align: center; }
.portal-login-card h1 em { color: #4d7cff; font-style: normal; }
.portal-login-card > p { margin: 8px 0 24px; color: #54729b; text-align: center; }
.portal-login-card label { display: block; margin: 14px 0 6px; color: #234d85; font-size: 13px; font-weight: 600; }
.portal-login-card input, .portal-login-card select { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid #bfd4ee; border-radius: 9px; color: #173b69; background: #fff; font: inherit; outline: 0; }
.portal-login-card input:focus, .portal-login-card select:focus { border-color: #4d7cff; box-shadow: 0 0 0 3px rgba(77,124,255,.14); }
.portal-login-submit { width: 100%; min-height: 44px; margin-top: 22px; border: 0; border-radius: 8px; color: #fff; background: #397ef4; font-weight: 700; cursor: pointer; }
.portal-login-submit:hover { background: #1f62dd; }
.portal-reset-password { display: block; margin: 13px auto 0; border: 0; color: #3970ba; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
#portalLoginMessage { min-height: 18px; margin: 14px 0 0; color: #b33e4b; font-size: 12px; text-align: center; }
.admin-logout-link { display: inline-block; margin-top: 5px; color: #1f4fa3; font-size: 12px; text-decoration: underline; cursor: pointer; }

html, body { min-width: 320px; min-height: 100%; margin: 0; }

body {
  position: relative;
  isolation: isolate;
  padding-top: 0;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(125deg, #103b73, #2c78bd 48%, #9dd4f2);
  background-attachment: fixed;
}

body::before, body::after { content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; background: rgba(255, 255, 255, .12); }
body::before { width: 48vw; height: 48vw; top: -24vw; left: -12vw; }
body::after { width: 42vw; height: 42vw; right: -16vw; bottom: -18vw; }

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 18px;
  min-height: 176px;
  padding: 18px 18px 16px 24px;
  border-bottom: 1px solid rgba(129, 176, 220, .42);
  background: rgba(203, 230, 253, .62);
  box-shadow: 0 4px 12px rgba(62, 109, 170, .08);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand img { display: block; width: 170px; max-width: 100%; height: auto; }

.intro {
  min-width: 0;
  padding: 12px 18px 10px;
  border: 1px solid rgba(143, 196, 243, .72);
  border-radius: 15px;
  background: rgba(201, 228, 255, .48);
}

.intro h1 {
  margin: 0 0 6px;
  color: #1f4fa3;
  font: 900 24px/1.08 "Arial Black", Arial, sans-serif;
  letter-spacing: .2px;
}

.intro h1 span { color: var(--accent); }
.intro p { margin: 0; }
.intro .notice { color: #14589b; font-size: 12px; font-style: italic; }
.intro .credit { margin-top: 5px; color: var(--accent); font-size: 15px; }

.header-actions { display: grid; gap: 9px; }
.header-actions button, .header-actions select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(77, 124, 255, .28);
  border-radius: 11px;
  color: var(--ink);
  font: 600 13px "Segoe UI", Arial, sans-serif;
}
.header-actions button { cursor: pointer; }
.logout { background: rgba(255, 255, 255, .82); }
.resources { background: #d8eeff; }
.resources-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 14px 14px 0 0;
  background: rgba(90, 134, 180, .12);
}
.resources-overlay[hidden] { display: none; }
.resources-modal {
  width: min(420px, calc(100vw - 36px));
  margin-top: 6px;
  border: 1px solid rgba(136, 179, 219, .95);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 45px rgba(10, 55, 98, .18);
  backdrop-filter: blur(12px);
}
.resources-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  color: var(--heading);
}
.resources-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
.resources-close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(77, 124, 255, .2);
  border-radius: 8px;
  color: #2c5e9d;
  background: #edf6ff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.resources-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 12px;
}
.resources-option {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(146, 194, 233, .8);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(214, 235, 255, .58);
  font: 600 13px "Segoe UI", Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}
.resources-option:hover { border-color: rgba(77, 124, 255, .32); background: rgba(206, 229, 255, .88); }
.header-actions select { padding: 0 12px; background: rgba(255, 255, 255, .88); text-align: center; text-align-last: center; }
.header-actions button:hover { color: var(--accent); background: #f8fafd; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  max-width: 1800px;
  min-height: 0;
  margin: 0 auto;
  padding: 55px 60px 22px;
}

.panel {
  min-height: 0;
  padding: 24px 30px;
  border: 1px solid rgba(218, 229, 241, .9);
  border-radius: 21px;
  background: var(--panel);
  box-shadow: 0 7px 18px rgba(47, 89, 142, .08);
}

.panel-title { position: relative; display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.panel-title svg, .field-label svg { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; }
.panel-title svg { width: 24px; height: 24px; stroke-width: 2; }
.panel-title h2 { margin: 0; color: var(--heading); font-size: 21px; font-weight: 500; }
.history-view-toggle { order: 2; min-width: 82px; min-height: 32px; margin-left: auto; padding: 0 10px; border: 1px solid #9ab9da; border-radius: 7px; color: #174e86; background: #eef7ff; font: 600 12px "Segoe UI", Arial, sans-serif; cursor: pointer; }
.history-view-toggle:hover { color: #fff; border-color: #397ef4; background: #397ef4; }
.history-maximize-tip { position: absolute; top: 0; right: 0; z-index: 12; max-width: 230px; padding: 9px 12px; border: 1px solid #8db6dc; border-radius: 8px; color: #174e86; background: #fff; box-shadow: 0 7px 18px rgba(32, 75, 126, .2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.history-maximize-tip::before { content: ''; position: absolute; right: 30px; bottom: -6px; width: 10px; height: 10px; border-right: 1px solid #8db6dc; border-bottom: 1px solid #8db6dc; background: #fff; transform: rotate(45deg); }
.history-maximize-tip.is-hidden { display: none; }

.candidate-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 30px; }
.candidate-panel .panel-title { grid-column: 1 / -1; }
.assessment-level-panel { padding-bottom: 8px; }
.assessment-level-panel { order: 2; }
.assessment-selection-fields { display: grid; grid-template-columns: minmax(180px, 0.7fr) minmax(0, 2fr) minmax(0, 2fr); column-gap: 30px; align-items: end; }
.assessment-name-field, .assessment-email-field { min-width: 0; }
.level-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 30px; }
.level-fields .field { min-height: 86px; }
.level-paste-field { resize: vertical; padding-top: 12px; }
.retake-field { border-color: #d8b4b4; background: #fffafa; }
.retake-label { color: #8a3d3d; }
.run-message { margin: 8px 0 0; color: #31557f; font-size: 14px; text-align: right; }
.run-message.run-success { color: #218a45; font-weight: 600; }
.level-actions { display: flex; justify-content: flex-end; padding-top: 2px; }
.run-button { min-width: 92px; min-height: 40px; border: 1px solid #2b6cf6; border-radius: 8px; color: #fff; background: #397ef4; box-shadow: 0 4px 9px rgba(50, 112, 232, .2); font: 600 13px "Segoe UI", Arial, sans-serif; cursor: pointer; }
.run-button:hover { background: #1f62dd; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; padding-top: 3px; }
.submit-message { flex-basis: 100%; }
.submit-button, .export-button, .select-all-button, .delete-button, .view-button { border: 1px solid transparent; border-radius: 8px; font: 600 13px "Segoe UI", Arial, sans-serif; cursor: pointer; }
.submit-button { min-width: 118px; min-height: 42px; border-color: #2b6cf6; color: #fff; background: #397ef4; box-shadow: 0 4px 9px rgba(50, 112, 232, .2); }
.submit-button:hover { background: #1f62dd; }
.form-field { min-width: 0; }
.searchable-select-container { position: relative; }
.searchable-select-input { padding-right: 42px; cursor: text; }
.searchable-select-clear { position: absolute; top: 35px; right: 10px; z-index: 2; width: 26px; height: 26px; padding: 0; border: 0; color: #4774b0; background: transparent; font-size: 20px; font-weight: 700; line-height: 22px; cursor: pointer; }
.searchable-select-clear:hover { color: #1f4fa3; }
.searchable-select-options { position: absolute; z-index: 5; top: 70px; right: 0; left: 0; max-height: 220px; overflow-y: auto; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 10px 22px rgba(32, 63, 131, .16); }
.searchable-select-option { display: block; width: 100%; padding: 9px 11px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; font: 14px "Segoe UI", Arial, sans-serif; text-align: left; cursor: pointer; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.searchable-select-option:hover { color: var(--heading); background: #edf5ff; }

.field-label { display: flex; align-items: center; gap: 7px; margin: 0 0 6px 3px; color: var(--heading); font-size: 13px; font-weight: 600; }
.field-label svg { width: 17px; height: 17px; stroke-width: 2; }
.field { display: block; width: 100%; min-height: 48px; margin: 0 0 16px; padding: 0 14px; border: 2px solid var(--line); border-radius: 11px; outline: 0; color: #23426d; background: rgba(255, 255, 255, .86); font: 14px "Segoe UI", Arial, sans-serif; }
.field::placeholder { color: #b6b8bb; }
.field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77, 124, 255, .12); }
.select-field { appearance: auto; }

.history-panel { order: 1; overflow: hidden; }
.history-panel > .panel-title { padding-top: 40px; }
.assessment-return-link { display: none; }
.assessment-threshold-link { display: none; }
body.assessment-only .history-panel > .panel-title { flex-wrap: wrap; }
body.assessment-only .assessment-return-link,
body.assessment-only .assessment-threshold-link { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 10px; border: 1px solid #9ab9da; border-radius: 7px; color: #174e86; background: #eef7ff; font: 600 12px "Segoe UI", Arial, sans-serif; text-decoration: none; white-space: nowrap; }
body.assessment-only .assessment-return-link { order: 1; margin-left: auto; }
body.assessment-only .assessment-threshold-link { order: 2; }
body.assessment-only .assessment-return-link:hover,
body.assessment-only .assessment-threshold-link:hover { color: #fff; border-color: #397ef4; background: #397ef4; }
body.assessment-only .history-view-toggle { margin-left: 0; }
body.assessment-only .history-maximize-tip { display: none; }
.history-panel.is-maximized { position: fixed; inset: 12px; z-index: 100; display: flex; flex-direction: column; max-width: none; min-height: 0; margin: 0; padding: 24px 30px; overflow: hidden; }
.history-panel.is-maximized .table-frame { flex: 1 1 auto; max-height: none; min-height: 0; }
body.endorsement-maximized { overflow: hidden; }
body.endorsement-maximized .topbar { display: none; }
body.endorsement-maximized .layout > :not(.history-panel) { display: none; }
body.assessment-only .topbar,
body.assessment-only .candidate-panel { display: none; }
body.assessment-only .layout { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
body.assessment-only .assessment-level-panel { order: 1; }
body.assessment-only .history-panel { order: 2; }
body:not(.assessment-only) .assessment-level-panel { display: none; }
.history-filters { display: grid; grid-template-columns: 1.1fr 1.1fr 1.1fr 1.1fr auto 1fr; gap: 16px; align-items: center; margin-bottom: 14px; }
.history-filter, .date-range input { min-width: 0; height: 36px; padding: 0 11px; border: 1px solid #c9d9ed; border-radius: 8px; outline: 0; color: #23426d; background: rgba(255,255,255,.9); font: 12px "Segoe UI", Arial, sans-serif; }
.history-filter:focus, .date-range input:focus { border-color: var(--accent); }
.history-date-label { color: var(--heading); font-size: 12px; font-weight: 600; white-space: nowrap; }
.history-scroll-top { position: relative; z-index: 3; flex: 0 0 18px; height: 18px; margin: 2px 0 8px; overflow-x: auto; overflow-y: hidden; border: 1px solid #c8d8ea; border-radius: 8px; background: rgba(255,255,255,.9); }
.history-scroll-top-inner { height: 1px; }
.table-frame { position: relative; z-index: 1; max-height: 700px; overflow: auto; border: 1px solid #c8d8ea; border-radius: 8px; background: rgba(255,255,255,.46); }
.history-table { width: 1500px; min-width: 100%; border-collapse: separate; border-spacing: 0; color: #1f3554; font-size: 11px; }
.history-table th, .history-table td { height: 44px; padding: 6px 9px; border-right: 1px solid #c8d8ea; border-bottom: 1px solid #c8d8ea; text-align: left; white-space: nowrap; }
.history-table th { position: sticky; top: 0; z-index: 1; color: #123567; background: #d9ebfc; font-size: 11px; font-weight: 700; text-align: center; }
.history-table thead .column-letter-row th { z-index: 100; background: #cfe8ff; }
.history-table thead tr:not(.column-letter-row) th { z-index: 99; background: #cfe8ff; }
.history-table thead .column-letter-row th { top: 0; height: 24px; padding: 3px 4px; color: #184d7a; background: #cfe8ff; font-size: 10px; line-height: 1; }
.history-table thead tr:not(.column-letter-row) th { top: 24px; }
.history-table th:first-child, .history-table td:first-child { width: 40px; min-width: 40px; max-width: 40px; background: #d9ebfc; }
.history-table th:nth-child(2), .history-table td:nth-child(2) { width: 32px; min-width: 32px; max-width: 32px; background: #d9ebfc; }
.history-table th:nth-child(3), .history-table td:nth-child(3) { width: 260px; min-width: 260px; max-width: 260px; background: #fff; }
.history-table th:nth-child(4), .history-table td:nth-child(4) { width: 135px; min-width: 135px; max-width: 135px; background: #fff; }
.history-table th:nth-child(5), .history-table td:nth-child(5) { width: 105px; min-width: 105px; max-width: 105px; background: #fff; }
.history-table th:nth-child(6), .history-table td:nth-child(6) { width: 120px; min-width: 120px; max-width: 120px; background: #fff; }
.history-table th:nth-child(7), .history-table td:nth-child(7) { width: 220px; min-width: 220px; max-width: 220px; background: #fff; }
.history-table th:nth-child(8), .history-table td:nth-child(8) { width: 220px; min-width: 220px; max-width: 220px; background: #fff; }
.history-table thead .column-letter-row th:first-child, .history-table thead .column-letter-row th:nth-child(2), .history-table thead .column-letter-row th:nth-child(3), .history-table thead .column-letter-row th:nth-child(4), .history-table thead .column-letter-row th:nth-child(5), .history-table thead .column-letter-row th:nth-child(6), .history-table thead .column-letter-row th:nth-child(8) { top: 0; z-index: 7; color: #184d7a; background: #cfe8ff; }
.history-table thead .column-letter-row th:nth-child(7) { top: 0; z-index: 7; color: #184d7a; background: #cfe8ff; }
.history-table thead tr:not(.column-letter-row) th:first-child, .history-table thead tr:not(.column-letter-row) th:nth-child(2), .history-table thead tr:not(.column-letter-row) th:nth-child(3), .history-table thead tr:not(.column-letter-row) th:nth-child(4), .history-table thead tr:not(.column-letter-row) th:nth-child(5), .history-table thead tr:not(.column-letter-row) th:nth-child(6), .history-table thead tr:not(.column-letter-row) th:nth-child(8) { top: 24px; z-index: 6; color: #123567; background: #d9ebfc; }
.history-table thead tr:not(.column-letter-row) th:nth-child(7) { top: 24px; z-index: 6; color: #123567; background: #cfe8ff; }
.history-table td:first-child, .history-table td:nth-child(2), .history-table td:nth-child(3) { text-align: center; }
.history-table td:first-child { cursor: pointer; }
.history-table td:first-child input[type="checkbox"] { position: relative; z-index: 0; width: 15px; height: 15px; margin: 0; cursor: pointer; pointer-events: auto; }
.history-table td:nth-child(4), .history-table th:nth-child(4) { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.history-table td:nth-child(7), .history-table th:nth-child(7),
.history-table td:nth-child(8), .history-table th:nth-child(8) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.history-table td:focus,
.history-table td:focus-visible,
.history-table tbody tr:focus-within td:focus,
.history-table tbody tr:focus-within td:focus-visible {
  outline: none;
  box-shadow: none;
}
.history-table tr:last-child td { border-bottom: 0; }
.history-table th:last-child, .history-table td:last-child { border-right: 0; }
.history-table tbody tr:hover { background: #f3f8ff; }
.history-table tbody tr.history-row-selected td { background: #d9ebfc !important; }
.history-table tbody tr.history-row-selected td.assessment-remarks-cell { background: #fff !important; }
.history-table tbody tr.history-row-selected td.workday-status-cell[data-status] { background: #fff !important; }
.history-table tbody td[data-admin-label] { background: #fff !important; }
.history-table th:nth-child(n+15):nth-child(-n+16) { color: #fff; background: #126782; }
.history-table th:nth-child(n+17):nth-child(-n+27) { color: #fff; background: #084b2a; }
.history-table th:nth-child(n+28):nth-child(-n+43) { color: #fff; background: #7a2e0b; }
.history-table th:nth-child(n+44) { color: #fff; background: #75206f; }
.history-table thead .column-letter-row th:nth-child(n+44) { color: #fff !important; background: #75206f !important; }
.history-table thead tr:not(.column-letter-row) th:nth-child(n+44) { color: #fff !important; background: #75206f !important; }
.history-table th:nth-child(14), .history-table th:nth-child(15), .history-table th:nth-child(16) { color: #123567 !important; background: #d9ebfc !important; }
.history-table thead .column-letter-row th:nth-child(14), .history-table thead .column-letter-row th:nth-child(15), .history-table thead .column-letter-row th:nth-child(16) { color: #fff !important; background: #126782 !important; }
.history-table th:nth-child(17), .history-table th:nth-child(18) { color: #fff !important; background: #126782 !important; }
.history-table th:nth-child(28), .history-table th:nth-child(29) { color: #fff !important; background: #084b2a !important; }
.history-table thead .column-letter-row th:nth-child(-n+13), .history-table thead tr:not(.column-letter-row) th:nth-child(-n+13) { color: #fff !important; background: #1769aa !important; }
.history-table thead .column-letter-row th:nth-child(-n+16), .history-table thead tr:not(.column-letter-row) th:nth-child(-n+16) { color: #fff !important; background: #1769aa !important; }
.history-table thead tr:nth-child(2) th:nth-child(-n+16) { color: #184d7a !important; background: #cfe8ff !important; }
.history-table th:nth-child(14), .history-table td:nth-child(14) { width: 120px !important; min-width: 120px !important; max-width: 120px !important; }
.history-table th:nth-child(15), .history-table td:nth-child(15) { width: 280px !important; min-width: 280px !important; max-width: 280px !important; }
.history-table th:nth-child(14), .history-table td:nth-child(14) { width: 150px !important; min-width: 150px !important; max-width: 150px !important; }
.history-table th:nth-child(15), .history-table td:nth-child(15) { width: 280px !important; min-width: 280px !important; max-width: 280px !important; }
.history-table th:nth-child(15), .history-table td:nth-child(15) { width: 220px; min-width: 220px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.history-table th:nth-child(16), .history-table td:nth-child(16) { width: 180px; min-width: 180px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.history-table td:nth-child(n+15) { background: #fff; }
.history-table th:nth-child(n+15), .history-table td:nth-child(n+15) { width: 82px; min-width: 82px; max-width: 82px; }
.history-table th:nth-child(n+15) { height: 48px; padding: 5px 4px; white-space: normal; line-height: 1.15; overflow-wrap: anywhere; }
.history-table td:nth-child(n+15) { padding: 6px 4px; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.history-table th:nth-child(16), .history-table td:nth-child(16) { width: 180px !important; min-width: 180px !important; max-width: 180px !important; overflow: hidden; text-overflow: ellipsis; }
.view-button { min-width: 64px; min-height: 30px; border-color: #396fff; color: #1444a4; background: #edf4ff; }
.view-button:hover { color: #fff; background: #397ef4; }
.date-seat-input { width: 115px; min-height: 28px; padding: 0 5px; border: 1px solid #b9cde5; border-radius: 5px; outline: 0; color: #23426d; background: #fff; font: 11px "Segoe UI", Arial, sans-serif; text-align: center; }
.date-seat-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(77, 124, 255, .12); }
.date-seat-input.seat-entry { border-color: #d7a900; background: #fff2a8; }
.history-table td.manual-score-cell { cursor: text; background: #fbfdff !important; }
.history-table td.manual-score-cell:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff !important; }
.candidate-id-table-input { width: 92px; min-height: 28px; padding: 0 5px; border: 1px solid #b9cde5; border-radius: 5px; outline: 0; color: #23426d; background: #fff; font: 11px "Segoe UI", Arial, sans-serif; text-align: center; }
.candidate-id-table-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(77, 124, 255, .12); }
.assessment-remarks-input { width: 260px; min-width: 260px; min-height: 32px; height: 32px; resize: vertical; padding: 5px; border: 1px solid #b9cde5; border-radius: 5px; outline: 0; color: #23426d; background: #fff; font: 11px "Segoe UI", Arial, sans-serif; }
.assessment-remarks-input:read-only { cursor: default; background: #f4f8fc; }
.assessment-remarks-cell { white-space: normal !important; overflow-wrap: anywhere; background: #fff !important; }
.remarks-badge { display: inline-block; min-width: 150px; padding: 5px 8px; border-radius: 4px; text-align: center; font-style: italic; }
.assessment-remarks-cell.remarks-passed .remarks-badge { color: #2f6f42; background: #e1f1e4; }
.assessment-remarks-cell.remarks-pending .remarks-badge { color: #846b28; background: #fff4d6; }
.assessment-remarks-cell.remarks-failed .remarks-badge { color: #9a4c55; background: #f8e1e3; }
.admin-status-badge { display: inline-block; min-width: 58px; padding: 5px 8px; border-radius: 4px; text-align: center; }
.admin-status-passed { color: #2f6f42; background: #e1f1e4; }
.admin-status-failed { color: #9a4c55; background: #f8e1e3; }
.manual-status-select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 28px; padding: 0 3px; border: 1px solid transparent; border-radius: 4px; color: #23426d; background: transparent; font: 11px "Segoe UI", Arial, sans-serif; text-align: center; cursor: pointer; }
.manual-status-select:focus { border-color: var(--accent); outline: 0; background: #fff; box-shadow: 0 0 0 2px rgba(77, 124, 255, .12); }
.assessment-remarks-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(77, 124, 255, .12); }
.workday-status-cell { min-width: 180px; padding: 4px !important; }
.history-table td.workday-status-cell { width: 190px; min-width: 190px; max-width: 190px; }
.workday-status-select { box-sizing: border-box; width: 100%; min-width: 176px; min-height: 30px; padding: 0 4px; border: 1px solid #b9cde5; border-radius: 4px; color: #23426d; background: #fff; font: 11px "Segoe UI", Arial, sans-serif; }
.history-account-select, .history-subprocess-select { box-sizing: border-box; display: block; width: 100%; min-width: 0; min-height: 30px; margin: 0; padding: 0 4px; border: 1px solid #b9cde5; border-radius: 4px; color: #23426d; background: #fff; font: 11px "Segoe UI", Arial, sans-serif; }
.workday-status-cell[data-status] { background: #fff !important; }
.workday-status-cell[data-status="hiring manager"] .workday-status-select { background: #cfeeff; }
.workday-status-cell[data-status="assessment stage"] .workday-status-select { background: #c6efce; }
.workday-status-cell[data-status="declined"] .workday-status-select { background: #f4cccc; }
.workday-status-cell[data-status="review stage"] .workday-status-select { background: #fff2cc; }
.workday-status-cell[data-status="recruiter stage"] .workday-status-select { background: #e8dcf5; }
.workday-status-cell[data-status="offer stage"], .workday-status-cell[data-status="internal assessment"], .workday-status-cell[data-status="fitment/offer"], .workday-status-cell[data-status="eit movement issue"] { background: #d9d2e9; }
.mode-badge { display: inline-block; min-width: 72px; padding: 5px 8px; border-radius: 4px; text-align: center; }
.mode-onsite { background: #e4f3df; }
.mode-virtual { background: #f1e2f4; }
.mode-remote { background: #e0effa; }
.history-table td:nth-child(9) { text-align: center; }
.history-footer { display: flex; justify-content: flex-start; gap: 18px; align-items: center; padding-top: 14px; }
.date-range, .history-actions { display: flex; align-items: center; gap: 8px; }
.history-pagination { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--heading); font-size: 12px; }
.history-pagination button { min-height: 30px; padding: 0 12px; border: 1px solid #b8cfe8; border-radius: 6px; color: #20589f; background: #eef6ff; cursor: pointer; font: 600 12px "Segoe UI", Arial, sans-serif; }
.history-pagination button:disabled { opacity: .5; cursor: not-allowed; }
.history-actions { order: -1; }
.date-range label { color: var(--heading); font-size: 12px; font-weight: 600; }
.date-range input { width: 135px; }
.export-button { min-height: 38px; padding: 0 14px; border-color: #5c99ef; color: #20589f; background: #dceeff; }
.select-all-button { min-height: 30px; padding: 0 13px; color: #fff; background: #438cf0; }
.delete-button { min-height: 30px; padding: 0 16px; border-color: #ff9da9; color: #d85b69; background: #fff7f8; }
.delete-button:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 1050px) {
  .topbar { grid-template-columns: 160px minmax(0, 1fr) 140px; min-height: 245px; gap: 16px; padding-left: 28px; }
  .brand img { width: 150px; }
  .intro h1 { font-size: 26px; }
  .layout { padding: 35px 28px 22px; gap: 18px; }
  .panel { padding: 26px 24px; }
  .panel-title h2 { font-size: 20px; }
}

@media (max-width: 760px) {
  body { padding-top: 0; }
  .topbar { position: relative; grid-template-columns: 1fr; min-height: 0; padding: 22px; gap: 16px; }
  .brand img { width: 150px; margin: auto; }
  .intro h1 { font-size: clamp(22px, 6vw, 28px); }
  .intro .notice { font-size: 12px; }
  .intro .credit { font-size: 16px; }
  .header-actions { grid-template-columns: 1fr 1fr; }
  .header-actions select { grid-column: 1 / -1; }
  .layout { grid-template-columns: 1fr; padding: 24px 16px; }
  .panel { min-height: 360px; }
  .candidate-panel { grid-template-columns: 1fr; }
  .candidate-panel .panel-title { grid-column: auto; }
  .level-fields { grid-template-columns: 1fr; }
  .assessment-selection-fields { grid-template-columns: 1fr; }
  .history-filters { grid-template-columns: 1fr 1fr; }
  .history-date-label { display: none; }
  .history-footer { align-items: stretch; flex-direction: column; }
  .date-range { flex-wrap: wrap; }
}
