:root {
  --candidate-office-bg: #0d1930;
  --candidate-office-panel: #111f39;
  --candidate-office-panel-2: #162743;
  --candidate-office-line: rgba(164, 189, 225, 0.24);
  --candidate-office-muted: #aebed6;
  --candidate-office-text: #f4f7fb;
  --candidate-office-accent: #75a7ff;
  --candidate-office-success: #42cf88;
  --candidate-office-warning: #f6bd52;
  --candidate-office-danger: #ff7583;
}
#modal:has([data-candidate-office-slot="1"]) .modal-b { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }
#modal:has([data-candidate-office-dialog]) { width:min(1100px,calc(100vw - 24px)) !important; min-width:0 !important; max-width:calc(100vw - 24px) !important; }
/* Keep the established eight-column Evidence table usable on narrow screens.
   The QR audit card remains responsive while the legacy table scrolls inside
   its own card instead of being clipped by the modal. */
#modal:has([data-candidate-office-slot="1"]) .scrollable-evidence { max-width:100%; overflow:auto !important; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table { min-width:980px; table-layout:fixed; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th,
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td { padding:8px 12px; vertical-align:top; white-space:nowrap; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th:first-child,
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td:first-child { padding-left:14px; width:150px; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th:nth-child(2),
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td:nth-child(2) { width:115px; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th:nth-child(3),
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td:nth-child(3) { width:85px; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th:nth-child(4),
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td:nth-child(4) { width:60px; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th:nth-child(5),
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td:nth-child(5) { width:125px; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th:nth-child(6),
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td:nth-child(6) { width:72px; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th:nth-child(7),
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td:nth-child(7) { width:110px; }
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table th:last-child,
#modal:has([data-candidate-office-slot="1"]) .ts-evidence-table td:last-child { width:260px; padding-right:14px; white-space:normal; }
.candidate-office-slot { min-width: 0; }
.candidate-office-card {
  color: var(--candidate-office-text);
  background: linear-gradient(145deg, rgba(17,31,57,.98), rgba(12,24,45,.98));
  border: 1px solid var(--candidate-office-line);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(1, 8, 21, .18);
  margin-top: 10px;
  overflow: hidden;
}
.candidate-office-card__header { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:16px 18px; border-bottom:1px solid var(--candidate-office-line); }
.candidate-office-card__header h3 { margin:2px 0 0; font-size:16px; line-height:1.25; }
.candidate-office-card__eyebrow, .candidate-office-dialog__eyebrow { color:var(--candidate-office-muted); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.candidate-office-section { padding:15px 18px; border-bottom:1px solid var(--candidate-office-line); }
.candidate-office-section h4 { margin:0 0 10px; font-size:14px; }
.candidate-office-section__heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.candidate-office-section__heading h4 { margin:0; }
.candidate-office-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; margin:0 0 12px; }
.candidate-office-facts div { min-width:0; background:rgba(255,255,255,.035); border-radius:8px; padding:8px 10px; }
.candidate-office-facts dt { color:var(--candidate-office-muted); font-size:10px; font-weight:700; letter-spacing:.035em; text-transform:uppercase; }
.candidate-office-facts dd { margin:3px 0 0; font-size:12px; overflow-wrap:anywhere; }
.candidate-office-actions { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.candidate-office-actions .btn:disabled { opacity:.46; cursor:not-allowed; filter:saturate(.45); }
.candidate-office-action-wrap { display:inline-flex; flex-direction:column; gap:4px; align-items:flex-start; max-width:300px; }
.candidate-office-action-wrap small { color:var(--candidate-office-muted); font-size:11px; line-height:1.3; }
.candidate-office-evidence-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 14px; margin:0 0 10px; border:1px solid var(--candidate-office-line); border-radius:10px; background:rgba(255,255,255,.035); }
.candidate-office-evidence-row > div:first-child { display:flex; flex-direction:column; gap:3px; min-width:0; }
.candidate-office-evidence-row span, .candidate-office-evidence-row small { color:var(--candidate-office-muted); }
.candidate-office-evidence-row__actions { display:flex; gap:8px; flex:0 0 auto; }
.candidate-office-overview-badges { display:inline-flex; flex-wrap:wrap; gap:6px; align-items:center; }
.candidate-office-overview-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:100%; }
.candidate-office-overview-details:has(> .candidate-office-overview-group:only-child) { grid-template-columns:minmax(0,1fr); }
.candidate-office-overview-group { min-width:0; padding:10px 11px; background:rgba(255,255,255,.035); border:1px solid var(--candidate-office-line); border-radius:9px; }
.candidate-office-overview-group > strong { display:block; margin-bottom:8px; font-size:12px; }
.candidate-office-overview-group .candidate-office-facts { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:0; }
.candidate-office-overview-group .candidate-office-history-row { align-items:flex-start; flex-direction:column; }
.candidate-office-issues { margin:7px 0 0; padding-left:18px; }
.candidate-office-issues li + li { margin-top:6px; }
.candidate-office-inline-unavailable { color:var(--candidate-office-muted); font-size:11px; }
.candidate-office-badge { display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:3px 9px; border-radius:999px; border:1px solid rgba(255,255,255,.16); font-size:11px; font-weight:750; line-height:1.3; white-space:normal; overflow-wrap:anywhere; }
.candidate-office-badge--success { color:#b9f7d7; background:rgba(31,161,98,.18); border-color:rgba(66,207,136,.46); }
.candidate-office-badge--danger { color:#ffd2d7; background:rgba(200,49,70,.20); border-color:rgba(255,117,131,.5); }
.candidate-office-badge--warning { color:#ffe7b6; background:rgba(189,126,14,.20); border-color:rgba(246,189,82,.48); }
.candidate-office-badge--info { color:#d5e4ff; background:rgba(62,112,203,.20); border-color:rgba(117,167,255,.48); }
.candidate-office-badge--neutral { color:#d9e2ef; background:rgba(141,160,188,.13); border-color:rgba(174,190,214,.3); }
.candidate-office-summary-status { display:-webkit-box; box-sizing:border-box; width:100%; max-width:100%; padding-left:6px; padding-right:6px; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; text-overflow:ellipsis; font-size:10.5px; }
th[data-col-key="candidate_submission"], td[data-col-key="candidate_submission"] { width:166px; min-width:158px; max-width:186px; }
td[data-col-key="candidate_submission"] { padding-left:6px; padding-right:6px; vertical-align:middle; }
td[data-col-key="candidate_submission"] .candidate-office-slot { display:block; max-width:100%; }
.candidate-office-diagnostics { display:flex; gap:7px; flex-wrap:wrap; padding:11px 18px 0; }
.candidate-office-history-row { display:flex; align-items:center; justify-content:space-between; gap:14px; background:rgba(255,255,255,.035); border-radius:9px; padding:10px; }
.candidate-office-history-row + .candidate-office-history-row { margin-top:8px; }
.candidate-office-history-row strong, .candidate-office-history-row span { display:block; }
.candidate-office-history-row span { color:var(--candidate-office-muted); font-size:11px; margin-top:3px; }
.candidate-office-inline-note { color:var(--candidate-office-muted); font-size:11px; margin:-3px 0 9px; overflow-wrap:anywhere; }
.candidate-office-empty { color:var(--candidate-office-muted); font-size:12px; }
.candidate-office-card__footer { color:var(--candidate-office-muted); font-size:10px; padding:9px 18px; text-align:right; }
.candidate-office-card--loading { display:flex; align-items:center; gap:10px; padding:16px 18px; color:var(--candidate-office-muted); }
.candidate-office-skeleton { width:18px; height:18px; border-radius:50%; border:2px solid rgba(117,167,255,.25); border-top-color:var(--candidate-office-accent); animation:candidate-office-spin .9s linear infinite; }
.candidate-office-card--unavailable { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; }
.candidate-office-card--unavailable p { margin:4px 0 0; color:var(--candidate-office-muted); font-size:12px; }
.candidate-office-summary-reminders { border:1px solid var(--candidate-office-line); background:#132641; color:var(--candidate-office-text); padding:4px 9px; border-radius:8px; cursor:pointer; }
.candidate-office-summary-reminders:disabled { opacity:.45; cursor:not-allowed; }

.candidate-office-modal-panel { color:var(--candidate-office-text); padding:0 !important; overflow:hidden; border-color:rgba(151,181,224,.35) !important; background:linear-gradient(155deg,#12223e,#0c192f) !important; }
.candidate-office-modal-heading { display:grid; grid-template-columns:auto 1fr; align-items:start; gap:12px; padding:16px 18px; border-bottom:1px solid var(--candidate-office-line); }
.candidate-office-modal-heading__title { margin:0; font-size:16px; font-weight:750; line-height:1.3; letter-spacing:-.01em; }
.candidate-office-dialog__icon { display:grid; place-items:center; width:30px; height:30px; color:#dbe8ff; background:rgba(69,116,201,.28); border:1px solid rgba(117,167,255,.45); border-radius:50%; font-weight:800; }
.candidate-office-tone--danger .candidate-office-dialog__icon { color:#ffd2d7; background:rgba(200,49,70,.22); border-color:rgba(255,117,131,.5); }
.candidate-office-tone--success .candidate-office-dialog__icon { color:#b9f7d7; background:rgba(31,161,98,.2); border-color:rgba(66,207,136,.45); }
.candidate-office-dialog__body { min-height:0; padding:16px 18px 18px; overflow-wrap:anywhere; }
.candidate-office-dialog__body p { margin:0; color:#dde6f4; font-size:14px; line-height:1.55; }
.candidate-office-dialog__body p + p { margin-top:12px; }
.candidate-office-dialog__footer { display:flex; justify-content:flex-end; gap:9px; padding:13px 18px; background:rgba(7,17,34,.98); border-top:1px solid var(--candidate-office-line); }
.candidate-office-dialog__error { margin-top:12px; padding:10px 12px; color:#ffd8dd; background:rgba(187,43,62,.2); border:1px solid rgba(255,117,131,.42); border-radius:8px; font-size:12px; }
.candidate-office-dialog__status { min-height:16px; margin-top:8px; color:var(--candidate-office-muted); font-size:11px; }
.candidate-office-field { margin:16px 0 0; padding:0; border:0; }
.candidate-office-field > label, .candidate-office-field legend, .candidate-office-field-grid label { display:flex; flex-direction:column; gap:6px; color:#e9eff8; font-size:12px; font-weight:700; }
.candidate-office-field input, .candidate-office-field select, .candidate-office-field textarea, .candidate-office-field-grid input, .candidate-office-field-grid select, .candidate-office-field-grid textarea { box-sizing:border-box; width:100%; color:#f5f7fb; background:#0a172b; border:1px solid rgba(164,189,225,.34); border-radius:8px; padding:9px 10px; font:inherit; font-weight:400; }
.candidate-office-field input:focus, .candidate-office-field select:focus, .candidate-office-field textarea:focus, .candidate-office-field-grid input:focus, .candidate-office-field-grid select:focus, .candidate-office-field-grid textarea:focus { outline:2px solid rgba(117,167,255,.75); outline-offset:1px; border-color:transparent; }
.candidate-office-field__help, .candidate-office-note span { color:var(--candidate-office-muted); font-size:10px; font-weight:400; }
.candidate-office-radio { display:flex !important; flex-direction:row !important; align-items:flex-start; gap:8px !important; margin-top:8px; font-weight:500 !important; }
.candidate-office-radio input { width:auto; margin-top:2px; }
.candidate-office-note { margin-top:12px; }
.candidate-office-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.candidate-office-field-grid label:has(textarea), .candidate-office-field-grid label:has(input[type="file"]) { grid-column:1/-1; }
.candidate-office-dialog-facts, .candidate-office-dialog-counts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:16px 0 0; }
.candidate-office-dialog-facts div, .candidate-office-dialog-counts div { padding:9px 10px; background:rgba(255,255,255,.04); border-radius:8px; }
.candidate-office-dialog-facts dt, .candidate-office-dialog-counts dt { color:var(--candidate-office-muted); font-size:10px; }
.candidate-office-dialog-facts dd, .candidate-office-dialog-counts dd { margin:3px 0 0; font-size:12px; font-weight:700; }
.candidate-office-neutral-context { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.candidate-office-neutral-context span { padding:3px 8px; color:var(--candidate-office-muted); background:rgba(255,255,255,.05); border-radius:999px; font-size:11px; }
.candidate-office-result-summary { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; padding:10px; background:rgba(255,255,255,.04); border-radius:9px; }
.candidate-office-result-list { margin-top:12px; max-height:300px; overflow:auto; }
.candidate-office-result-list div { display:flex; justify-content:space-between; gap:12px; padding:8px 4px; border-bottom:1px solid var(--candidate-office-line); font-size:11px; }
.candidate-reminder-workspace { color:var(--candidate-office-text); min-width:0; }
#modal:has(#candidateManagerReminderWorkspace) { width:min(900px,calc(100vw - 24px)) !important; min-width:0 !important; max-width:calc(100vw - 24px) !important; }
#modal:has(#candidateManagerReminderWorkspace) .modal-b { min-height:0; overflow:auto; }
.candidate-reminder-workspace__intro { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:14px; }
.candidate-reminder-workspace__intro p { max-width:680px; margin:0; color:#dbe5f3; line-height:1.5; }
.candidate-reminder-workspace__selection { flex:0 0 auto; padding:7px 10px; color:var(--candidate-office-muted); background:rgba(255,255,255,.045); border:1px solid var(--candidate-office-line); border-radius:8px; font-size:12px; white-space:nowrap; }
.candidate-reminder-workspace__toolbar { display:grid; grid-template-columns:auto minmax(220px,420px) 1fr; align-items:center; gap:10px; margin:0 0 12px; }
.candidate-reminder-workspace__toolbar label { color:#dfe8f6; font-size:12px; font-weight:650; }
.candidate-reminder-workspace__toolbar input[type="search"] { width:100%; min-height:38px; padding:8px 11px; color:var(--candidate-office-text); background:#09172d; border:1px solid var(--candidate-office-line); border-radius:8px; outline:none; }
.candidate-reminder-workspace__toolbar input[type="search"]:focus { border-color:#7ba7ff; box-shadow:0 0 0 3px rgba(123,167,255,.16); }
.candidate-reminder-workspace__matches { justify-self:end; color:var(--candidate-office-muted); font-size:12px; }
.candidate-reminder-workspace__loading,
.candidate-reminder-workspace__empty,
.candidate-reminder-workspace__error { padding:18px; border:1px solid var(--candidate-office-line); border-radius:10px; background:rgba(255,255,255,.035); }
.candidate-reminder-workspace__error { display:flex; align-items:center; justify-content:space-between; gap:14px; color:#ffd8dd; border-color:rgba(255,117,131,.42); background:rgba(187,43,62,.18); }
.candidate-reminder-workspace__error .btn { flex:0 0 auto; }
.candidate-reminder-table-wrap { max-width:100%; max-height:min(34vh,340px); overflow:auto; border:1px solid var(--candidate-office-line); border-radius:10px; background:rgba(8,20,39,.52); }
.candidate-reminder-table { width:100%; min-width:620px; border-collapse:separate; border-spacing:0; table-layout:fixed; }
.candidate-reminder-table th,
.candidate-reminder-table td { padding:11px 12px; text-align:left; vertical-align:middle; border-bottom:1px solid var(--candidate-office-line); overflow-wrap:anywhere; }
.candidate-reminder-table th { position:sticky; top:0; z-index:2; color:#dfe8f6; background:#12213b; font-size:12px; }
.candidate-reminder-sort { display:inline-flex; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:0; color:inherit; font:inherit; font-weight:700; text-align:left; background:transparent; border:0; cursor:pointer; }
.candidate-reminder-sort:hover,
.candidate-reminder-sort:focus-visible { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.candidate-reminder-sort span { color:#9fb4d2; font-size:10px; }
.candidate-reminder-table tbody tr:last-child td { border-bottom:0; }
.candidate-reminder-table tbody tr:hover td { background:rgba(117,167,255,.06); }
.candidate-reminder-table__select { width:48px; text-align:center !important; }
.candidate-reminder-table th.candidate-reminder-table__select { left:0; z-index:3; }
.candidate-reminder-table td.candidate-reminder-table__select { position:sticky; left:0; z-index:1; background:#0d1b32; }
.candidate-reminder-table input[type="checkbox"] { width:16px; height:16px; margin:0; accent-color:#694cff; }
.candidate-reminder-pagination { display:flex; align-items:center; justify-content:center; gap:14px; margin-top:13px; }
.candidate-reminder-pagination span { min-width:88px; color:var(--candidate-office-muted); text-align:center; font-size:12px; }
.candidate-reminder-workspace__actions { display:flex; justify-content:flex-end; gap:9px; margin-top:18px; }
.candidate-reminder-result { padding:18px; border:1px solid var(--candidate-office-line); border-radius:12px; background:rgba(255,255,255,.035); }
.candidate-reminder-result h3 { margin:0 0 13px; font-size:17px; }
.candidate-reminder-result p { margin:14px 0 0; color:var(--candidate-office-muted); }
.candidate-reminder-result__counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.candidate-reminder-result__counts span { padding:12px; border-radius:8px; background:rgba(255,255,255,.045); }
.candidate-reminder-result__counts strong { display:block; margin-bottom:3px; font-size:18px; }
.candidate-reminder-result--ok { border-color:rgba(66,207,136,.45); }
.candidate-reminder-result--warn { border-color:rgba(246,189,82,.5); }
.candidate-reminder-result--fail { border-color:rgba(255,117,131,.5); }
@keyframes candidate-office-spin { to { transform:rotate(360deg); } }
@media (max-width:560px) {
  #modal.bulk-process-workbench:has([data-candidate-office-slot="1"]) { width:calc(100vw - 24px) !important; min-width:0 !important; max-width:calc(100vw - 24px) !important; }
  #modal.bulk-process-workbench:has([data-candidate-office-slot="1"]) #bulkProcessWorkbenchGrid { grid-template-columns:1fr !important; min-height:0 !important; }
  #modal.bulk-process-workbench:has([data-candidate-office-slot="1"]) #bulkProcessWorkbenchDivider { display:none !important; }
  #modal.bulk-process-workbench:has([data-candidate-office-slot="1"]) #bulkProcessLeftPane { width:100%; height:auto !important; max-height:280px !important; }
  #modal.bulk-process-workbench:has([data-candidate-office-slot="1"]) #bulkProcessWorkbenchContent { display:grid !important; grid-template-columns:1fr !important; max-height:none !important; }
  #modal.bulk-process-workbench:has([data-candidate-office-slot="1"]) #bulkProcessRightPane { grid-row:1; max-height:none !important; }
  #modal.bulk-process-workbench:has([data-candidate-office-slot="1"]) #bulkProcessMainPreviewPane { grid-row:2; max-height:none !important; }
  .candidate-office-modal-heading, .candidate-office-dialog__body { padding-left:14px; padding-right:14px; }
  .candidate-office-dialog__footer { flex-direction:column; padding:12px 15px; }
  .candidate-office-dialog__footer .btn { width:100%; }
  .candidate-office-facts, .candidate-office-dialog-facts, .candidate-office-dialog-counts, .candidate-office-field-grid { grid-template-columns:1fr; }
  .candidate-office-overview-details, .candidate-office-overview-group .candidate-office-facts { grid-template-columns:1fr; }
  .candidate-office-card__header, .candidate-office-card--unavailable, .candidate-office-history-row { align-items:flex-start; flex-direction:column; }
  .candidate-office-evidence-row { align-items:flex-start; flex-direction:column; }
  .candidate-office-evidence-row__actions { width:100%; }
  .candidate-office-evidence-row__actions .btn { flex:1; }
  .candidate-reminder-workspace__intro { flex-direction:column; gap:10px; }
  .candidate-reminder-workspace__selection { align-self:stretch; text-align:center; }
  .candidate-reminder-workspace__toolbar { grid-template-columns:1fr; gap:6px; }
  .candidate-reminder-workspace__matches { justify-self:start; }
  .candidate-reminder-table { min-width:520px; table-layout:fixed; }
  .candidate-reminder-table th,
  .candidate-reminder-table td { padding:9px 8px; overflow-wrap:normal; word-break:normal; font-size:11px; }
  .candidate-reminder-table__select { width:40px; }
  .candidate-reminder-table th:nth-child(2),
  .candidate-reminder-table td:nth-child(2) { width:210px; }
  .candidate-reminder-pagination { justify-content:space-between; gap:8px; }
  .candidate-reminder-workspace__actions { flex-direction:column-reverse; }
  .candidate-reminder-workspace__actions .btn { width:100%; }
  .candidate-reminder-result__counts { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) { .candidate-office-skeleton { animation:none; } }
