@keyframes drawerSlideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

#candidate-drawer-container h1, #candidate-drawer-container h2,
#candidate-drawer-container h3, #candidate-drawer-container h4,
#candidate-drawer-container span, #candidate-drawer-container p,
#candidate-drawer-container label, #candidate-drawer-container button {
    font-family: 'Mulish', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#view-tasks input[type="text"],
#view-tasks input[type="number"],
#view-tasks textarea {
    position: relative;
    z-index: 1;
    background-color: var(--tpt-surface-sunken, #1e1e1e) !important;
    background-clip: padding-box;
    isolation: isolate;
}

.action-hub-btn {
    padding: 9px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.action-hub-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.profile-tab-toggle {
    background: transparent;
    border: none;
    padding: 16px 4px;
    margin-right: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-text-subtle);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.profile-tab-toggle:hover {
    color: var(--tpt-text-strong);
}
.profile-tab-toggle.active {
    color: var(--tpt-accent) !important;
    border-bottom: 2px solid var(--tpt-accent) !important;
}

.pipeline-sub-toggle {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 6px 6px 0 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: -1px;
}
.pipeline-sub-toggle:hover {
    color: var(--tpt-text);
}
.pipeline-sub-toggle.active {
    color: var(--tpt-accent) !important;
    background-color: rgba(255, 138, 58, 0.15) !important;
    border-bottom: 2px solid var(--tpt-accent) !important;
}

.meta-label-txt {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tpt-text-subtle);
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}
.meta-value-txt {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tpt-text);
}

.entity-add-btn {
    background: transparent;
    border: 1px dashed var(--tpt-border-strong);
    color: var(--tpt-text-strong);
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.entity-add-btn:hover {
    background: var(--tpt-surface-sunken);
    border-color: var(--tpt-text-faint);
}

.entity-action-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}
.entity-icon-btn {
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.82rem;
    transition: all 0.15s ease;
}
.entity-icon-btn.edit-btn { color: var(--tpt-text-muted); }
.entity-icon-btn.edit-btn:hover { background: var(--tpt-surface-muted); color: var(--tpt-text); }
.entity-icon-btn.delete-btn { color: var(--tpt-critical); }
.entity-icon-btn.delete-btn:hover { background: var(--tpt-critical-tint); color: var(--tpt-critical); }

.ts-wrapper.tom-select-custom {
    position: relative;
}

.ts-wrapper.tom-select-custom .ts-control {
    padding: 8px 36px 8px 12px !important;
    border: 1px solid var(--tpt-border-strong) !important;
    border-radius: 8px !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--tpt-text) !important;
    background: var(--tpt-surface) !important;
    min-height: 38px;
    display: flex;
    align-items: center;
    cursor: pointer !important;
    box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05) !important;
}

.ts-wrapper.tom-select-custom .ts-control input {
    cursor: pointer !important;
}

.ts-wrapper.tom-select-custom.focus .ts-control,
.ts-wrapper.tom-select-custom.dropdown-active .ts-control {
    border-color: var(--tpt-accent) !important;
    box-shadow: 0 0 0 3px rgba(255, 108, 8, 0.15) !important;
}

.ts-wrapper.tom-select-custom .ts-control input[readonly] {
    cursor: pointer !important;
    caret-color: transparent !important;
}

.ts-wrapper.tom-select-custom .ts-control::after {
    content: " ";
    display: block;
    position: absolute;
    top: 50%;
    right: 14px;
    width: 6px;
    height: 6px;
    margin-top: -4px;
    border-style: solid;
    border-width: 1.5px 1.5px 0 0;
    border-color: var(--tpt-border-strong);
    transform: rotate(135deg);
    transition: transform 0.2s ease;
}

.ts-wrapper.tom-select-custom.dropdown-active .ts-control::after {
    transform: rotate(-45deg);
    margin-top: -1px;
}

.ts-dropdown.tom-select-custom-dropdown {
    position: absolute !important;
    z-index: 99999 !important;
    background: var(--tpt-surface) !important;
    border: 1px solid var(--tpt-border) !important;
    border-radius: 8px !important;
    box-shadow: 0px 4px 16px rgba(16, 24, 40, 0.08) !important;
    margin-top: 4px !important;
    padding: 4px !important;
}

.ts-dropdown.tom-select-custom-dropdown .ts-dropdown-content {
    max-height: 200px;
    overflow-y: auto;
}

.ts-dropdown.tom-select-custom-dropdown .option {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: var(--tpt-text-strong) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

.ts-dropdown.tom-select-custom-dropdown .option.active,
.ts-dropdown.tom-select-custom-dropdown .option:hover {
    background-color: var(--tpt-accent-tint) !important;
    color: var(--tpt-accent) !important;
}

.ts-dropdown.tom-select-custom-dropdown .option.selected {
    display: none !important;
}

.profile-view-pane, .pipeline-sub-pane { display: none; }
.profile-view-pane.active, .pipeline-sub-pane.active { display: block; }

.task-queue-card:hover { border-color: var(--tpt-accent) !important; background-color: var(--tpt-surface-sunken) !important; }
.task-queue-card.active-selection {
    border-color: var(--tpt-accent) !important;
    background-color: rgba(255, 138, 58, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(255, 108, 8, 0.15);
}

[data-candidate-drawer-target="previewModal"] {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media print {
    body.modal-open, [data-candidate-drawer-target="previewModal"] {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Secure document viewer: a scrolling column of rendered page images. */
.secure-doc-viewer {
    flex: 1;
    overflow: auto;
    background: #525659;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Two-up: pages flow side by side and wrap, for wide and multi-monitor use. */
.secure-doc-viewer.two-up {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
}

.secure-doc-page {
    max-width: 100%;
    height: auto;
    background: var(--tpt-surface);
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.35);
}

.secure-doc-viewer.two-up .secure-doc-page {
    max-width: calc(50% - 8px);
}

.secure-doc-status {
    color: var(--tpt-text-faint);
    font-size: 0.85rem;
    text-align: center;
    margin: 40px 0;
}

/* Deterrent, not a control: the real protection is that the browser only ever
   holds page images, never the document. */
@media print {
    .secure-doc-viewer,
    .secure-doc-page {
        display: none !important;
        visibility: hidden !important;
    }
}

/* ---------------------------------------------------------------------------
   Message body editor
   The drafted emails are HTML — a call-to-action button, paragraph spacing, a
   fallback link. A textarea can only hold text, so the drawer used to flatten
   the body for display and then send the flattened copy. This is a rendered,
   editable surface instead: what the recruiter sees is what the client gets.
   --------------------------------------------------------------------------- */
.email-body-editor {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.email-body-editor:focus {
    outline: none;
    border-color: var(--tpt-accent);
    box-shadow: 0 0 0 3px rgba(255, 108, 8, 0.12);
}

/* The stored bodies open and close every line with <p>, which at the browser's
   default 1em margins leaves the pane looking double-spaced. */
.email-body-editor p    { margin: 0 0 10px 0; }
.email-body-editor p:last-child { margin-bottom: 0; }
.email-body-editor a    { color: var(--tpt-accent); }
/* The call-to-action carries its colours inline so they survive into the email
   client; this only stops it being underlined twice over. */
.email-body-editor a[style*="background"] { text-decoration: none; }

/* ---------------------------------------------------------------------------
   Send Email button states
   Sending takes about a second against SES, and that second is silent unless
   the button says otherwise.
   --------------------------------------------------------------------------- */
@keyframes sendSpinnerSpin {
    to { transform: rotate(360deg); }
}

@keyframes sendSentPop {
    0%   { transform: scale(0.94); }
    60%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.send-email-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 7px;
    vertical-align: -1px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: sendSpinnerSpin 0.6s linear infinite;
}

.send-email-btn--sending {
    opacity: 0.75;
    cursor: wait;
}

.send-email-btn--sent {
    background-color: #067647 !important;
    border-color: var(--tpt-good-line) !important;
    color: #FFFFFF !important;
    animation: sendSentPop 0.28s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .send-email-spinner { animation-duration: 0s; }
    .send-email-btn--sent { animation: none; }
}

.confirm-wrap { position: relative; display: inline-block; }

.confirm-wrap.is-locked button {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.confirm-wrap.is-locked::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    white-space: normal;
    text-align: left;
    line-height: 1.4;
    background: #000;
    color: #fff;
    border: 1px solid var(--tpt-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 20;
}

.confirm-wrap.is-locked:hover::after { opacity: 1; }

/* Hover states for cards and the send button, which used to be set from
   onmouseover. The resting values are inline styles, hence !important. */
.applied-role-card:hover { border-color: var(--tpt-info-line) !important; box-shadow: 0px 2px 8px rgba(16, 24, 40, 0.06) !important; }
.match-card--qualified:hover { border-color: var(--tpt-good) !important; box-shadow: 0px 2px 8px rgba(6, 118, 71, 0.12) !important; }
.match-card--low:hover { opacity: 1 !important; border-color: var(--tpt-critical) !important; }
.send-email-btn:hover { background-color: #FF6C08 !important; color: var(--tpt-surface) !important; }

/* ---------------------------------------------------------------------------
   Candidate page (admin/candidates/show)
   Scoped under #candidate-drawer-overlay and each dialog's id so these outrank shared and hover rules; display: stays inline, where the JavaScript reads and writes it.
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   Candidate page: shared by several tabs and dialogs
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-lead-icon {
    color: var(--tpt-text-subtle);
    margin-right: 4px;
}

#candidate-drawer-overlay .cand-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-meta-icon {
    color: var(--tpt-text-faint);
    margin-right: 4px;
}

#candidate-drawer-overlay .cand-empty-icon {
    color: var(--tpt-border-strong);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

#candidate-drawer-overlay .cand-section-stack {
    flex-direction: column;
    gap: 16px;
}

#candidate-drawer-overlay .cand-strong-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-card-head {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--tpt-surface-muted);
    padding-bottom: 12px;
}

#candidate-drawer-overlay .cand-panel {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0px 4px 12px rgba(16, 24, 40, 0.03);
}

#candidate-drawer-overlay .cand-item-title {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-inline-group {
    align-items: center;
    gap: 8px;
}

#candidate-drawer-overlay .cand-add-form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--tpt-text-strong);
    margin-bottom: 6px;
}

#candidate-drawer-overlay select.cand-add-form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--tpt-surface);
}

#candidate-drawer-overlay .cand-add-form-row {
    margin-bottom: 24px;
}

#candidate-drawer-overlay .cand-add-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 6px;
    font-size: 0.85rem;
}

#candidate-drawer-overlay .cand-add-form-actions {
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--tpt-border);
    padding-top: 16px;
}

#candidate-drawer-overlay .cand-add-form-cancel {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border-strong);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-add-form-save {
    background: var(--tpt-accent);
    color: #FFF;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-entry-edit {
    background: none;
    border: none;
    color: var(--tpt-text-muted);
    padding: 4px;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-entry-delete {
    background: none;
    border: none;
    padding: 4px;
    color: var(--tpt-critical);
    cursor: pointer;
}

#candidate-drawer-overlay .cand-entries-empty {
    text-align: center;
    color: var(--tpt-text-subtle);
    font-size: 0.85rem;
}

#candidate-drawer-overlay .cand-action-form {
    margin: 0;
}

#candidate-drawer-overlay .cand-doc-text {
    min-width: 0;
}

#candidate-drawer-overlay .cand-meta-text {
    font-size: 0.72rem;
    color: var(--tpt-text-subtle);
}

#candidate-drawer-overlay .cand-doc-list {
    flex-direction: column;
    gap: 8px;
}

#candidate-drawer-overlay .cand-small-text {
    margin: 0;
    font-size: 0.8rem;
}

#candidate-drawer-overlay .cand-pane-head {
    border-bottom: 1px solid var(--tpt-surface-muted);
    padding-bottom: 14px;
    margin-bottom: 20px;
}

#candidate-drawer-overlay .cand-field-label,
#countersign-modal .cand-field-label {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--tpt-text-strong);
    margin-bottom: 6px;
}

#candidate-drawer-overlay .cand-field-block,
#demote-reason-modal .cand-field-block {
    margin-bottom: 16px;
}

#candidate-drawer-overlay .cand-field-group,
#demote-reason-modal .cand-field-group,
#countersign-modal .cand-field-group {
    margin-bottom: 20px;
}

#candidate-drawer-overlay .cand-dialog-alert-icon,
#demote-reason-modal .cand-dialog-alert-icon {
    color: var(--tpt-critical);
    font-size: 1.1rem;
}

#demote-reason-modal .cand-dialog-actions {
    gap: 12px;
    justify-content: flex-end;
}

#demote-reason-modal .cand-dialog-head,
#countersign-modal .cand-dialog-head {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

/* ---------------------------------------------------------------------------
   Candidate page: the drawer frame (show.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-drawer {
    width: 90%;
    max-width: 1320px;
    min-width: 768px;
    height: calc(100vh - 48px);
    background: var(--tpt-drawer-ground);
    border-radius: 16px;
    box-shadow: 0px 24px 48px -12px rgba(16, 24, 40, 0.15);
    flex-direction: column;
    overflow: hidden;
    animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#candidate-drawer-overlay .cand-drawer-bar {
    background: var(--tpt-surface);
    padding: 16px 24px;
    border-bottom: 1px solid var(--tpt-border);
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-drawer-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-drawer-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--tpt-text-subtle);
    cursor: pointer;
    padding: 4px;
    align-items: center;
    justify-content: center;
}

#candidate-drawer-overlay .cand-erased-banner {
    background: var(--tpt-warn-tint);
    border-bottom: 1px solid var(--tpt-warn-line);
    padding: 14px 24px;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-erased-icon {
    color: var(--tpt-warn);
    font-size: 1rem;
    margin-top: 2px;
}

#candidate-drawer-overlay .cand-erased-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-warn);
}

#candidate-drawer-overlay .cand-erased-text {
    font-size: 0.8rem;
    color: var(--tpt-warn);
    margin-top: 2px;
}

#candidate-drawer-overlay .cand-drawer-body {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* ---------------------------------------------------------------------------
   Candidate page: header (show/_hero.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-hero {
    background: var(--tpt-surface);
    padding: 24px;
    border-bottom: 1px solid var(--tpt-border);
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-hero-identity {
    align-items: center;
    gap: 16px;
}

#candidate-drawer-overlay .cand-hero-avatar {
    background: var(--tpt-surface-muted);
    color: var(--tpt-text-muted);
    font-weight: 700;
    font-size: 22px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-hero-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--tpt-text);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

#candidate-drawer-overlay .cand-hero-title {
    font-size: 0.88rem;
    color: var(--tpt-text-muted);
    font-weight: 600;
    margin: 0;
}

#candidate-drawer-overlay .cand-hero-meta {
    font-size: 0.72rem;
    color: var(--tpt-text-muted);
    font-weight: 600;
    margin-top: 6px;
    align-items: center;
    gap: 6px;
}

#candidate-drawer-overlay .cand-hero-meta-icon {
    color: var(--tpt-text-subtle);
}

#candidate-drawer-overlay .cand-hero-actions {
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#candidate-drawer-overlay .cand-hero-step-back {
    background: var(--tpt-surface);
    color: var(--tpt-text-strong);
    border: 1px solid var(--tpt-border-strong);
}

#candidate-drawer-overlay .cand-hero-edit {
    background: var(--tpt-surface);
    color: var(--tpt-text-strong);
    border: 1px solid var(--tpt-border-strong);
    text-decoration: none;
}

#candidate-drawer-overlay .cand-hero-view-cv {
    background: var(--tpt-accent);
    color: #FFF;
    border: none;
}

#candidate-drawer-overlay .cand-hero-no-cv {
    background: #667085;
    color: #FFF;
    border: none;
    opacity: 0.6;
}

/* ---------------------------------------------------------------------------
   Candidate page: tab bar (show/_tab_bar.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-tab-bar {
    background: var(--tpt-surface);
    border-bottom: 1px solid var(--tpt-border);
    padding: 0 24px;
    gap: 4px;
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}

/* ---------------------------------------------------------------------------
   Candidate page: Overview tab (show/_overview.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-overview {
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

#candidate-drawer-overlay .cand-overview-stage-card {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0px 4px 12px rgba(16, 24, 40, 0.02);
}

#candidate-drawer-overlay .cand-overview-stage-heading {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tpt-text-strong);
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

#candidate-drawer-overlay .cand-stage-track {
    width: 100%;
    gap: 6px;
    text-align: center;
}

#candidate-drawer-overlay .cand-stage-step {
    flex: 1;
    padding-bottom: 8px;
    min-width: 0;
}

#candidate-drawer-overlay .cand-stage-name {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#candidate-drawer-overlay .cand-overview-matches-card {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0px 4px 12px rgba(16, 24, 40, 0.02);
    flex-direction: column;
}

#candidate-drawer-overlay .cand-overview-matches-head {
    border-bottom: 1px solid var(--tpt-surface-muted);
    padding-bottom: 12px;
    margin-bottom: 16px;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-overview-card-heading {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tpt-text-strong);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#candidate-drawer-overlay .cand-overview-match-count {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

#candidate-drawer-overlay .cand-overview-match-list {
    height: 120px;
    overflow-y: auto;
    padding-right: 4px;
    box-sizing: border-box;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
}

#candidate-drawer-overlay .cand-overview-match {
    border: 1px solid var(--tpt-border);
    border-radius: 10px;
    padding: 16px;
    background: var(--tpt-surface-sunken);
    flex-shrink: 0;
    box-sizing: border-box;
}

#candidate-drawer-overlay .cand-overview-match-head {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

#candidate-drawer-overlay .cand-overview-match-client {
    font-size: 0.8rem;
    color: var(--tpt-text-muted);
    font-weight: 500;
}

#candidate-drawer-overlay .cand-overview-match-client-name {
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-overview-match-score {
    background: var(--tpt-good-tint);
    border: 1px solid var(--tpt-good-line);
    border-radius: 6px;
    padding: 4px 8px;
    text-align: center;
}

#candidate-drawer-overlay .cand-overview-match-score-text {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tpt-good);
}

#candidate-drawer-overlay .cand-overview-match-facts {
    width: 100%;
    gap: 16px;
    border-top: 1px dashed var(--tpt-border);
    padding-top: 12px;
}

#candidate-drawer-overlay .cand-overview-match-fact {
    flex: 1;
    min-width: 0;
}

#candidate-drawer-overlay .cand-overview-fact-label {
    font-size: 0.68rem;
    color: var(--tpt-text-subtle);
    font-weight: 600;
    text-transform: uppercase;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

#candidate-drawer-overlay .cand-overview-fact-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--tpt-text-strong);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

#candidate-drawer-overlay .cand-overview-fill-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--tpt-critical);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

#candidate-drawer-overlay .cand-overview-fill-date-icon {
    margin-right: 4px;
}

#candidate-drawer-overlay .cand-overview-no-matches {
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--tpt-border);
    border-radius: 10px;
    background: var(--tpt-surface-sunken);
}

#candidate-drawer-overlay .cand-overview-no-matches-text {
    text-align: center;
    color: var(--tpt-text-subtle);
    font-size: 0.85rem;
    margin: 0;
    font-style: italic;
}

#candidate-drawer-overlay .cand-overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
    align-items: start;
}

#candidate-drawer-overlay .cand-overview-card {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0px 4px 12px rgba(16, 24, 40, 0.02);
    min-height: 220px;
    box-sizing: border-box;
}

#candidate-drawer-overlay .cand-overview-card-head {
    border-bottom: 1px solid var(--tpt-surface-muted);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

#candidate-drawer-overlay .cand-overview-pool-label {
    font-size: 0.68rem;
    color: var(--tpt-text-subtle);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 2px;
}

#candidate-drawer-overlay .cand-overview-employer {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-text-strong);
}

#candidate-drawer-overlay .cand-overview-details-heading {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tpt-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#candidate-drawer-overlay .cand-overview-edit {
    background: none;
    border: none;
    color: var(--tpt-accent);
    font-size: 0.78rem;
    font-weight: 700;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
}

#candidate-drawer-overlay .cand-overview-contact-list {
    flex-direction: column;
    gap: 14px;
    font-size: 0.85rem;
}

#candidate-drawer-overlay .cand-overview-contact-label {
    font-size: 0.65rem;
    color: var(--tpt-text-faint);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2px;
}

#candidate-drawer-overlay .cand-overview-contact-line {
    align-items: center;
    gap: 8px;
    color: var(--tpt-text-strong);
}

#candidate-drawer-overlay .cand-overview-phone-icon {
    color: var(--tpt-text-subtle);
    width: 14px;
}

#candidate-drawer-overlay .cand-overview-contact-value {
    font-weight: 600;
}

#candidate-drawer-overlay .cand-overview-email-icon {
    color: var(--tpt-text-subtle);
    width: 14px;
    word-break: break-all;
}

#candidate-drawer-overlay .cand-overview-links-label {
    font-size: 0.65rem;
    color: var(--tpt-text-faint);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

#candidate-drawer-overlay .cand-overview-links {
    align-items: center;
    gap: 6px;
}

#candidate-drawer-overlay .cand-overview-linkedin {
    color: #0077B5;
    font-size: 1.2rem;
    text-decoration: none;
}

#candidate-drawer-overlay .cand-overview-no-links {
    font-size: 0.78rem;
    color: var(--tpt-text-faint);
    font-style: italic;
}

/* ---------------------------------------------------------------------------
   Candidate page: Roles tab (show/_roles.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-roles-subtabs {
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--tpt-border);
}

#candidate-drawer-overlay .cand-roles-applied-list {
    flex-direction: column;
    gap: 12px;
}

#candidate-drawer-overlay .cand-roles-applied-link {
    text-decoration: none;
}

#candidate-drawer-overlay .cand-roles-applied-card {
    background: var(--tpt-surface-sunken);
    border: 1px solid var(--tpt-border);
    border-radius: 8px;
    padding: 16px;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease-in-out;
}

#candidate-drawer-overlay .cand-roles-applied-date {
    font-size: 0.78rem;
    color: var(--tpt-text-subtle);
}

#candidate-drawer-overlay .cand-roles-applied-date-value {
    font-weight: 600;
    color: var(--tpt-text-strong);
}

#candidate-drawer-overlay .cand-roles-applied-stage {
    background: var(--tpt-info-tint);
    color: var(--tpt-info);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

#candidate-drawer-overlay .cand-roles-empty {
    text-align: center;
    color: var(--tpt-text-subtle);
    font-size: 0.85rem;
    margin: 20px 0;
    font-style: italic;
}

#candidate-drawer-overlay .cand-roles-match-group {
    flex-direction: column;
    gap: 10px;
}

#candidate-drawer-overlay .cand-roles-qualified-heading {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--tpt-good);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

#candidate-drawer-overlay .cand-roles-qualified-card {
    background: var(--tpt-good-tint);
    border: 1px solid var(--tpt-good-line);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

#candidate-drawer-overlay .cand-roles-match-head {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

#candidate-drawer-overlay .cand-roles-qualified-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--tpt-good);
}

#candidate-drawer-overlay .cand-roles-ongoing-chip {
    background: var(--tpt-info-tint);
    border: 1px solid var(--tpt-info-line);
    color: var(--tpt-info);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    align-items: center;
    gap: 4px;
}

#candidate-drawer-overlay .cand-roles-ongoing-icon {
    font-size: 0.65rem;
}

#candidate-drawer-overlay .cand-roles-industry {
    font-size: 0.75rem;
    color: var(--tpt-text-muted);
    margin-top: 2px;
}

#candidate-drawer-overlay .cand-roles-industry-name {
    color: var(--tpt-text-strong);
}

#candidate-drawer-overlay .cand-roles-qualified-breakdown-btn {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-good-line);
    color: var(--tpt-good);
    font-size: 0.73rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    gap: 4px;
}

#candidate-drawer-overlay .cand-roles-qualified-score {
    background: var(--tpt-good-tint);
    color: var(--tpt-good);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

#candidate-drawer-overlay .cand-roles-qualified-breakdown {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--tpt-good-line);
}

#candidate-drawer-overlay .cand-roles-divider {
    border: 0;
    border-top: 1px dashed var(--tpt-border);
    margin: 8px 0;
    width: 100%;
}

#candidate-drawer-overlay .cand-roles-low-heading {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--tpt-critical);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

#candidate-drawer-overlay .cand-roles-low-card {
    background: var(--tpt-critical-tint);
    border: 1px solid var(--tpt-critical-line);
    border-radius: 8px;
    padding: 14px;
    opacity: 0.95;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

#candidate-drawer-overlay .cand-roles-low-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--tpt-critical);
}

#candidate-drawer-overlay .cand-roles-low-note {
    font-size: 0.75rem;
    color: var(--tpt-text-subtle);
    margin-top: 2px;
}

#candidate-drawer-overlay .cand-roles-low-breakdown-btn {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-critical-line);
    color: var(--tpt-critical);
    font-size: 0.73rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    gap: 4px;
}

#candidate-drawer-overlay .cand-roles-low-score {
    background: var(--tpt-critical-tint);
    color: var(--tpt-critical);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

#candidate-drawer-overlay .cand-roles-low-breakdown {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--tpt-critical-line);
}

/* ---------------------------------------------------------------------------
   Candidate page: match score breakdown (_score_breakdown.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-score-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

#candidate-drawer-overlay .cand-score-part {
    background: var(--tpt-surface);
    padding: 6px 10px;
    border-radius: 6px;
}

#candidate-drawer-overlay .cand-score-part-label {
    font-size: 0.7rem;
}

#candidate-drawer-overlay .cand-score-part-value {
    font-size: 0.82rem;
}

/* ---------------------------------------------------------------------------
   Candidate page: Experience tab (show/_experience.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-exp-panel {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border);
    border-radius: 12px;
    padding: 24px;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0px 4px 12px rgba(16, 24, 40, 0.03);
}

#candidate-drawer-overlay .cand-exp-head {
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--tpt-surface-muted);
    padding-bottom: 12px;
}

#candidate-drawer-overlay .cand-exp-form {
    background: var(--tpt-surface-sunken);
    border: 1px solid var(--tpt-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 12px;
}

#candidate-drawer-overlay .cand-exp-form-pair {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

#candidate-drawer-overlay select.cand-exp-skills-select {
    width: 100%;
    min-height: 40px;
}

#candidate-drawer-overlay .cand-exp-list {
    flex-direction: column;
    gap: 24px;
}

#candidate-drawer-overlay .cand-exp-entry-body {
    width: 100%;
}

#candidate-drawer-overlay .cand-exp-entry-title {
    margin: 0 0 2px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tpt-text);
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

#candidate-drawer-overlay .cand-exp-entry-employer {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tpt-text-muted);
}

#candidate-drawer-overlay .cand-exp-entry-dates {
    font-size: 0.78rem;
    color: var(--tpt-text-subtle);
    margin-bottom: 8px;
}

#candidate-drawer-overlay .cand-exp-dates-note {
    color: var(--tpt-text-faint);
}

#candidate-drawer-overlay .cand-exp-skills {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

#candidate-drawer-overlay .cand-exp-skill {
    background: var(--tpt-surface-muted);
    border: 1px solid var(--tpt-neutral-line);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--tpt-text-strong);
    font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Candidate page: Qualifications tab (show/_qualifications.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-qual-head {
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--tpt-surface-muted);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

#candidate-drawer-overlay .cand-qual-form {
    background: var(--tpt-surface-sunken);
    border: 1px solid var(--tpt-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

#candidate-drawer-overlay .cand-qual-form-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

#candidate-drawer-overlay .cand-qual-list {
    flex-direction: column;
    gap: 20px;
}

#candidate-drawer-overlay .cand-qual-entry {
    justify-content: space-between;
    align-items: flex-start;
}

#candidate-drawer-overlay .cand-qual-entry-main {
    gap: 12px;
    align-items: flex-start;
}

#candidate-drawer-overlay .cand-qual-entry-icon {
    background: var(--tpt-accent-tint);
    color: var(--tpt-accent);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-qual-entry-title {
    margin: 0 0 2px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-qual-entry-detail {
    margin: 0;
    font-size: 0.82rem;
    color: var(--tpt-text-muted);
}

/* ---------------------------------------------------------------------------
   Candidate page: Documents tab (show/_documents.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-docs-columns {
    gap: 24px;
    width: 100%;
    align-items: flex-start;
}

#candidate-drawer-overlay .cand-docs-card {
    flex: 1;
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0px 4px 12px rgba(16, 24, 40, 0.03);
}

#candidate-drawer-overlay .cand-docs-upload {
    background: var(--tpt-surface-muted);
    border: 1px solid var(--tpt-border-strong);
    color: var(--tpt-text-muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

#candidate-drawer-overlay .cand-docs-file {
    border: 1px solid var(--tpt-border);
    border-radius: 8px;
    padding: 12px;
    align-items: center;
    justify-content: space-between;
    background: var(--tpt-surface);
}

#candidate-drawer-overlay .cand-docs-file-info {
    align-items: center;
    gap: 10px;
    min-width: 0;
}

#candidate-drawer-overlay .cand-docs-cv-icon {
    color: var(--tpt-critical);
    font-size: 1.5rem;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-docs-file-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tpt-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#candidate-drawer-overlay .cand-docs-file-actions {
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-docs-view {
    font-size: 0.95rem;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-docs-remove {
    font-size: 0.95rem;
    background: none;
    border: none;
    color: var(--tpt-critical);
    cursor: pointer;
}

#candidate-drawer-overlay .cand-docs-empty {
    text-align: center;
    color: var(--tpt-text-subtle);
    font-size: 0.8rem;
    padding: 20px 0;
    margin: 0;
}

#candidate-drawer-overlay .cand-docs-file-icon {
    color: var(--tpt-text-muted);
    font-size: 1.35rem;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-docs-check {
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Candidate page: Tasks tab (show/_tasks.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-tasks-head {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tpt-border);
}

#candidate-drawer-overlay .cand-tasks-heading {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--tpt-text-muted);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#candidate-drawer-overlay .cand-tasks-role-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tpt-text-subtle);
    text-transform: uppercase;
}

#candidate-drawer-overlay .cand-tasks-role-link {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    align-items: center;
    gap: 6px;
}

#candidate-drawer-overlay .cand-tasks-role-link-icon {
    font-size: 0.62rem;
}

#candidate-drawer-overlay .cand-tasks-role-select-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tpt-text-muted);
    text-transform: uppercase;
    margin: 0;
}

#candidate-drawer-overlay .cand-tasks-role-select {
    min-width: 240px;
}

#candidate-drawer-overlay .cand-tasks-coworkers {
    margin: -6px 0 14px 0;
    font-size: 0.75rem;
    color: var(--tpt-text-subtle);
}

#candidate-drawer-overlay .cand-tasks-layout {
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: start;
}

#candidate-drawer-overlay .cand-tasks-rail {
    position: sticky;
    top: 0;
    height: calc(100vh - 280px);
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    overflow-y: auto;
    box-sizing: border-box;
    background: var(--tpt-surface-sunken);
    border: 1px solid var(--tpt-border);
    border-radius: 12px;
    padding: 12px;
}

#candidate-drawer-overlay .cand-tasks-steps {
    flex-direction: column;
    gap: 10px;
    padding: 6px;
    box-sizing: border-box;
}

#candidate-drawer-overlay .cand-tasks-none {
    background: var(--tpt-surface);
    border: 1px dashed var(--tpt-border);
    border-radius: 10px;
    padding: 24px 12px;
    text-align: center;
}

#candidate-drawer-overlay .cand-tasks-none-badge {
    width: 36px;
    height: 36px;
    background: var(--tpt-surface-muted);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
}

#candidate-drawer-overlay .cand-tasks-none-icon {
    font-size: 1rem;
    color: #7F56D9;
}

#candidate-drawer-overlay .cand-tasks-section-title {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-tasks-none-text {
    margin: 0;
    font-size: 0.72rem;
    color: var(--tpt-text-subtle);
    line-height: 1.3;
}

#candidate-drawer-overlay .cand-tasks-step {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

#candidate-drawer-overlay .cand-tasks-step-card {
    border-radius: 8px;
    padding: 10px 12px;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

#candidate-drawer-overlay .cand-tasks-step-text {
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

#candidate-drawer-overlay .cand-tasks-step-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

#candidate-drawer-overlay .cand-tasks-step-tick {
    width: 9px;
    height: 9px;
    fill: #FFFFFF;
}

#candidate-drawer-overlay .cand-tasks-pipeline {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border);
    border-radius: 10px;
    padding: 14px;
    box-sizing: border-box;
    box-shadow: 0px 1px 3px rgba(16, 24, 40, 0.04);
}

#candidate-drawer-overlay .cand-tasks-rejected {
    padding: 10px;
    background: var(--tpt-critical-tint);
    border: 1px solid var(--tpt-critical-line);
    border-radius: 8px;
    text-align: center;
    margin-top: 6px;
}

#candidate-drawer-overlay .cand-tasks-rejected-title {
    color: var(--tpt-critical);
    font-weight: 700;
    font-size: 0.82rem;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

#candidate-drawer-overlay .cand-tasks-rejected-note {
    font-size: 0.7rem;
    color: var(--tpt-critical);
    margin: 4px 0 0 0;
    line-height: 1.2;
}

#candidate-drawer-overlay .cand-tasks-extra-round {
    width: 100%;
    background: var(--tpt-surface);
    color: var(--tpt-accent);
    border: 1px solid var(--tpt-accent);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 9px 0;
    border-radius: 8px;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-followup-form {
    margin: 6px 0 0 0;
}

#candidate-drawer-overlay .cand-tasks-selected-btn {
    width: 100%;
    background: #22C55E;
    color: #FFFFFF;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 9px 0;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
}

#candidate-drawer-overlay .cand-tasks-pass-btn {
    width: 100%;
    color: #FFFFFF;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 9px 0;
    border-radius: 8px;
}

#candidate-drawer-overlay .cand-tasks-reject-btn {
    width: 100%;
    margin-top: 6px;
    background: var(--tpt-critical-tint);
    color: var(--tpt-critical);
    border: 1px solid var(--tpt-critical-line);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#candidate-drawer-overlay .cand-tasks-promote-btn {
    width: 100%;
    color: #FFFFFF;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 9px 0;
    border-radius: 8px;
    box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
}

#candidate-drawer-overlay .cand-tasks-not-for-role {
    width: 100%;
    background: var(--tpt-surface);
    color: var(--tpt-text-muted);
    border: 1px solid var(--tpt-border-strong);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-demote-btn {
    width: 100%;
    margin-top: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#candidate-drawer-overlay .cand-tasks-workspace {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0px 4px 12px rgba(16, 24, 40, 0.02);
    box-sizing: border-box;
    min-height: calc(100vh - 280px);
}

#candidate-drawer-overlay .cand-tasks-title-row {
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

#candidate-drawer-overlay .cand-tasks-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tpt-text);
    margin: 0;
}

#candidate-drawer-overlay .cand-tasks-awaiting-chip {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tpt-warn);
    background: var(--tpt-warn-tint);
    border: 1px solid var(--tpt-warn-line);
    border-radius: 5px;
    padding: 3px 9px;
    white-space: nowrap;
}

#candidate-drawer-overlay .cand-tasks-offer {
    border: 1px solid var(--tpt-info-line);
    background: var(--tpt-info-tint);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

#candidate-drawer-overlay .cand-tasks-offer-head {
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

#candidate-drawer-overlay .cand-tasks-offer-kind {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--tpt-info);
}

#candidate-drawer-overlay .cand-tasks-offer-confidential {
    font-size: 0.68rem;
    color: var(--tpt-text-subtle);
}

#candidate-drawer-overlay .cand-tasks-offer-benefits {
    font-size: 0.8rem;
    color: var(--tpt-text-strong);
    margin: 0 0 4px 0;
    line-height: 1.5;
}

#candidate-drawer-overlay .cand-tasks-offer-notes {
    font-size: 0.78rem;
    color: var(--tpt-text-subtle);
    margin: 0;
    font-style: italic;
    line-height: 1.5;
}

#candidate-drawer-overlay .cand-tasks-offer-agreed {
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--tpt-info-line);
    font-size: 0.8rem;
    color: var(--tpt-text-strong);
}

#candidate-drawer-overlay .cand-tasks-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

#candidate-drawer-overlay .cand-tasks-docs-summary {
    font-size: 0.78rem;
    color: var(--tpt-text-subtle);
    margin: 0 0 16px 0;
}

#candidate-drawer-overlay .cand-tasks-doc-row {
    border-radius: 8px;
    padding: 12px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#candidate-drawer-overlay .cand-tasks-doc-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-tasks-doc-file {
    font-size: 0.72rem;
    color: var(--tpt-text-subtle);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#candidate-drawer-overlay .cand-tasks-doc-actions {
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

#candidate-drawer-overlay .cand-tasks-doc-view {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border-strong);
    color: var(--tpt-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-doc-verify {
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

#candidate-drawer-overlay .cand-tasks-doc-waiting {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tpt-warn);
    background: var(--tpt-warn-tint);
    border: 1px solid var(--tpt-warn-line);
    padding: 5px 10px;
    border-radius: 6px;
}

#candidate-drawer-overlay .cand-tasks-docs-footnote {
    font-size: 0.75rem;
    color: var(--tpt-text-subtle);
    margin: 14px 0 0 0;
}

#candidate-drawer-overlay .cand-tasks-call-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--tpt-text);
    margin-bottom: 3px;
}

#candidate-drawer-overlay .cand-tasks-call-text {
    font-size: 0.81rem;
    color: var(--tpt-text-muted);
    margin: 0;
    line-height: 1.5;
}

#candidate-drawer-overlay .cand-tasks-outcome-label {
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--tpt-text-strong);
    margin-bottom: 8px;
}

#candidate-drawer-overlay .cand-tasks-outcomes {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

#candidate-drawer-overlay .cand-tasks-outcome {
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--tpt-border);
    border-radius: 9px;
    padding: 11px 13px;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-outcome-radio {
    margin-top: 2px;
    width: 15px;
    height: 15px;
    accent-color: var(--tpt-accent);
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-outcome-text {
    font-size: 0.82rem;
    color: var(--tpt-text-muted);
}

#candidate-drawer-overlay .cand-tasks-outcome-name {
    color: var(--tpt-text);
    font-weight: 800;
}

#candidate-drawer-overlay .cand-tasks-outcome-hint {
    color: var(--tpt-text-subtle);
    font-size: 0.78rem;
    margin-top: 1px;
}

#candidate-drawer-overlay .cand-tasks-field-pair {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

#candidate-drawer-overlay .cand-tasks-amount-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--tpt-text);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

#candidate-drawer-overlay .cand-tasks-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--tpt-text);
}

#candidate-drawer-overlay .cand-tasks-label-aside {
    font-weight: 400;
    color: var(--tpt-text-subtle);
}

#candidate-drawer-overlay .cand-tasks-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--tpt-text);
    line-height: 1.45;
}

/* The placement fields sit above the workspace lock's overlay. */
#candidate-drawer-overlay .cand-tasks-field-raised {
    background: var(--tpt-surface);
    position: relative;
    z-index: 1;
}

#candidate-drawer-overlay .cand-tasks-terms-actions {
    justify-content: flex-end;
    margin-bottom: 4px;
}

#candidate-drawer-overlay .cand-tasks-save-outcome {
    background: var(--tpt-surface);
    color: var(--tpt-accent);
    border: 1px solid var(--tpt-accent);
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-divider {
    height: 1px;
    background: var(--tpt-surface-muted);
    margin: 18px 0;
}

#candidate-drawer-overlay .cand-tasks-placement-actions {
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

#candidate-drawer-overlay .cand-tasks-offer-declined {
    background: var(--tpt-surface);
    color: var(--tpt-text-subtle);
    border: 1px solid var(--tpt-border);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-check-in {
    background: var(--tpt-surface);
    color: var(--tpt-accent);
    border: 1px solid var(--tpt-accent);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-confirm-placement {
    background: #12B76A;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-form-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-text);
    margin: 0 0 16px 0;
}

#candidate-drawer-overlay .cand-tasks-interview-pair {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

#candidate-drawer-overlay .cand-tasks-readonly-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--tpt-text);
    background: var(--tpt-surface-sunken);
}

#candidate-drawer-overlay .cand-tasks-surface-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--tpt-text);
    background: var(--tpt-surface);
}

#candidate-drawer-overlay .cand-tasks-interview-change {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--tpt-surface-sunken);
    border: 1px solid var(--tpt-border);
    border-radius: 8px;
}

#candidate-drawer-overlay .cand-tasks-interview-change-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--tpt-text-subtle);
    margin-bottom: 10px;
}

#candidate-drawer-overlay .cand-tasks-reschedule-input {
    padding: 8px 10px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.82rem;
}

#candidate-drawer-overlay .cand-tasks-interview-btn {
    padding: 8px 14px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    background: var(--tpt-surface);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-reschedule-note {
    font-size: 0.72rem;
    color: var(--tpt-text-faint);
}

#candidate-drawer-overlay .cand-tasks-interview-actions {
    gap: 8px;
    flex-wrap: wrap;
}

#candidate-drawer-overlay .cand-tasks-cancel-interview {
    padding: 8px 14px;
    border: 1px solid var(--tpt-critical-line);
    border-radius: 8px;
    background: var(--tpt-surface);
    color: var(--tpt-critical);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-interview-status {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--tpt-surface-sunken);
    border: 1px solid var(--tpt-border);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--tpt-text-subtle);
}

#candidate-drawer-overlay .cand-tasks-meet {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--tpt-accent-tint);
    border: 1px solid var(--tpt-accent-line);
    border-radius: 8px;
}

#candidate-drawer-overlay .cand-tasks-meet-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--tpt-accent-deep);
    margin-bottom: 4px;
}

#candidate-drawer-overlay .cand-tasks-meet-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tpt-accent-deep);
}

#candidate-drawer-overlay .cand-tasks-method-row {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

#candidate-drawer-overlay .cand-tasks-notes-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--tpt-text);
    line-height: 1.4;
}

#candidate-drawer-overlay .cand-tasks-brief-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--tpt-accent-line);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--tpt-text);
    line-height: 1.4;
}

#candidate-drawer-overlay .candidate_task_documents_section {
    margin-bottom: 28px;
}

#candidate-drawer-overlay .cand-tasks-doc-picker {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tpt-surface-muted);
}

#candidate-drawer-overlay .cand-tasks-doc-picker-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-text);
    margin: 0 0 12px 0;
}

#candidate-drawer-overlay .cand-tasks-doc-choices {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 16px;
    margin-bottom: 14px;
}

#candidate-drawer-overlay .cand-tasks-doc-choice {
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--tpt-text-strong);
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-doc-checkbox {
    width: 15px;
    height: 15px;
    accent-color: var(--tpt-accent);
    cursor: pointer;
}

#candidate-drawer-overlay .cand-tasks-recipient {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--tpt-text-muted);
    background: var(--tpt-surface-sunken);
}

#candidate-drawer-overlay .cand-tasks-email-body {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--tpt-text);
    line-height: 1.5;
    min-height: 190px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--tpt-surface);
}

#candidate-drawer-overlay .cand-tasks-actions {
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--tpt-surface-muted);
    padding-top: 18px;
}

#candidate-drawer-overlay .cand-tasks-email-status {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tpt-good);
}

#candidate-drawer-overlay .cand-tasks-send {
    background-color: var(--tpt-surface);
    color: var(--tpt-accent);
    border: 1px solid var(--tpt-accent);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

#candidate-drawer-overlay .cand-tasks-save {
    color: #FFF;
    border: none;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 9px 18px;
    border-radius: 6px;
}

#candidate-drawer-overlay .cand-tasks-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--tpt-text-subtle);
}

#candidate-drawer-overlay .cand-tasks-empty-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--tpt-border-strong);
}

#candidate-drawer-overlay .cand-tasks-empty-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
}

#candidate-drawer-overlay .cand-tasks-empty-text {
    margin: 4px 0 0 0;
    font-size: 0.78rem;
}

/* ---------------------------------------------------------------------------
   Candidate page: Activity tab (show/_activity.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-activity-entry {
    gap: 16px;
    position: relative;
}

#candidate-drawer-overlay .cand-activity-track {
    flex-direction: column;
    align-items: center;
    width: 12px;
}

#candidate-drawer-overlay .cand-activity-dot {
    background: var(--tpt-accent);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid #FFF;
    box-shadow: 0 0 0 1px #FF6C08;
    flex-shrink: 0;
    margin-top: 5px;
}

#candidate-drawer-overlay .cand-activity-body {
    padding-bottom: 24px;
}

#candidate-drawer-overlay .cand-activity-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--tpt-text);
    line-height: 1.3;
}

#candidate-drawer-overlay .cand-activity-time {
    font-size: 0.75rem;
    color: var(--tpt-text-subtle);
    margin-top: 4px;
}

#candidate-drawer-overlay .cand-activity-actor {
    font-size: 0.75rem;
    color: var(--tpt-text-subtle);
    margin-left: 6px;
}

#candidate-drawer-overlay .cand-activity-empty {
    text-align: center;
    color: var(--tpt-text-subtle);
    font-size: 0.85rem;
    padding: 16px 0;
}

/* ---------------------------------------------------------------------------
   Candidate page: document viewer (show/_document_viewer.html.erb)
   --------------------------------------------------------------------------- */

#candidate-drawer-overlay .cand-viewer {
    background: var(--tpt-surface);
    width: 90%;
    max-width: 900px;
    height: 85vh;
    border-radius: 12px;
    flex-direction: column;
    box-shadow: 0 20px 24px -4px rgba(16, 24, 40, 0.1);
    overflow: hidden;
}

#candidate-drawer-overlay .cand-viewer-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--tpt-border);
    align-items: center;
    justify-content: space-between;
    background: var(--tpt-surface-sunken);
    z-index: 10;
}

#candidate-drawer-overlay .cand-viewer-title-group {
    align-items: center;
    gap: 10px;
}

#candidate-drawer-overlay .cand-viewer-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--tpt-text-subtle);
    cursor: pointer;
    padding: 4px;
}

#candidate-drawer-overlay .cand-viewer-foot {
    padding: 10px 20px;
    border-top: 1px solid var(--tpt-border);
    background: var(--tpt-surface-sunken);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#candidate-drawer-overlay .cand-viewer-audit {
    color: var(--tpt-text-subtle);
    font-size: 0.72rem;
    font-weight: 600;
}

#candidate-drawer-overlay .cand-viewer-audit-icon {
    margin-right: 6px;
    color: var(--tpt-good);
}

#candidate-drawer-overlay .cand-viewer-controls {
    align-items: center;
    gap: 14px;
}

#candidate-drawer-overlay .cand-viewer-page-label {
    font-size: 0.78rem;
    color: var(--tpt-text-muted);
}

#candidate-drawer-overlay .cand-viewer-layout-toggle {
    cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Candidate page: reject dialog (show/_reject_dialog.html.erb)
   --------------------------------------------------------------------------- */

#demote-reason-modal .cand-reject-box {
    background: var(--tpt-surface);
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    padding: 24px;
    box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.1);
    box-sizing: border-box;
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal .cand-reject-badge {
    width: 40px;
    height: 40px;
    background: var(--tpt-critical-tint);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

#demote-reason-modal .cand-reject-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--tpt-text-subtle);
    cursor: pointer;
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal .cand-reject-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--tpt-text);
    margin: 0 0 6px 0;
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal .cand-reject-intro {
    font-size: 0.82rem;
    color: var(--tpt-text-subtle);
    margin: 0 0 16px 0;
    line-height: 1.4;
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal .cand-reject-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tpt-text-strong);
    margin-bottom: 6px;
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal select.cand-reject-reason {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--tpt-text);
    background: var(--tpt-surface);
    height: 42px;
    cursor: pointer;
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal .cand-reject-pool-option {
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--tpt-text-strong);
    cursor: pointer;
    user-select: none;
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal .cand-reject-checkbox-wrap {
    position: relative;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

#demote-reason-modal .cand-reject-checkbox {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
    z-index: 2;
}

#demote-reason-modal .cand-reject-checkbox-box {
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: var(--tpt-accent);
    border-radius: 4px;
    transition: all 0.15s ease;
}

#demote-reason-modal .cand-reject-pool-text {
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal .cand-reject-cancel {
    padding: 10px 16px;
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border-strong);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--tpt-text-strong);
    cursor: pointer;
    font-family: 'Mulish', sans-serif;
}

#demote-reason-modal .cand-reject-confirm {
    padding: 10px 16px;
    background: #D92D20;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    color: #FFFFFF;
    cursor: pointer;
    font-family: 'Mulish', sans-serif;
}

/* ---------------------------------------------------------------------------
   Candidate page: second review dialog (show/_countersign_dialog.html.erb)
   --------------------------------------------------------------------------- */

#countersign-modal .cand-second-box {
    background: var(--tpt-surface);
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    padding: 24px;
    box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.1);
    box-sizing: border-box;
}

#countersign-modal .cand-second-badge {
    width: 40px;
    height: 40px;
    background: var(--tpt-accent-tint);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

#countersign-modal .cand-second-icon {
    color: var(--tpt-accent);
    font-size: 1.05rem;
}

#countersign-modal .cand-second-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--tpt-text-subtle);
    cursor: pointer;
}

#countersign-modal .cand-second-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--tpt-text);
    margin: 0 0 6px 0;
}

#countersign-modal .cand-second-intro {
    font-size: 0.82rem;
    color: var(--tpt-text-subtle);
    margin: 0 0 18px 0;
    line-height: 1.5;
}

#countersign-modal .cand-second-reviewer {
    margin-bottom: 18px;
}

#countersign-modal .cand-second-reason {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid var(--tpt-accent-line);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--tpt-text);
    line-height: 1.5;
    resize: vertical;
}

#countersign-modal .cand-second-actions {
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--tpt-surface-muted);
    padding-top: 18px;
}

#countersign-modal .cand-second-cancel {
    background: var(--tpt-surface);
    border: 1px solid var(--tpt-border-strong);
    color: var(--tpt-text-strong);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

#countersign-modal .cand-second-submit {
    background: var(--tpt-border-strong);
    border: none;
    color: #FFFFFF;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: not-allowed;
}

/* ---------------------------------------------------------------------------
   New candidate form (admin/candidates/_form)
   Scoped under #multi-step-form so these outrank admin/candidate_form.css, which the page loads last; display: stays inline.
   --------------------------------------------------------------------------- */

#multi-step-form .cand-form-errors {
    background: var(--tpt-critical-tint);
    border: 1px solid var(--tpt-critical-line);
    color: var(--tpt-critical);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#multi-step-form .cand-form-errors-title {
    margin-top: 0;
    font-weight: 600;
}

#multi-step-form .cand-form-errors-list {
    margin-bottom: 0;
    padding-left: 20px;
}

#multi-step-form .cand-form-required {
    color: var(--tpt-critical);
}

#multi-step-form .cand-form-cv-proposals {
    border: 1px solid var(--tpt-accent-line);
    background: var(--tpt-accent-tint);
    border-radius: 8px;
    padding: 14px 18px;
    margin: 0 0 18px;
}

#multi-step-form .cand-form-cv-title {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: var(--tpt-accent-deep);
}

#multi-step-form .cand-form-cv-question {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: var(--tpt-text-strong);
}

#multi-step-form .cand-form-cv-options {
    flex-direction: column;
    gap: 8px;
}

#multi-step-form .cand-form-cv-current {
    font-size: 0.9rem;
    color: var(--tpt-text-strong);
    margin-top: 4px;
}

#multi-step-form .cand-form-cv-change {
    all: unset;
    color: #FF6C08;
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    margin-left: 6px;
}

#multi-step-form .cand-form-dates {
    gap: 15px;
    width: 100%;
}

#multi-step-form .cand-form-date {
    width: 50%;
}

#multi-step-form .cand-form-skills-block {
    margin-top: 15px;
}

#multi-step-form .cand-form-skill-tags {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

#multi-step-form .cand-form-cv-received {
    font-size: 0.85rem;
    color: var(--tpt-good);
    margin: 8px 0 0;
}

#multi-step-form .cand-form-uploads-row {
    margin-top: 25px;
}

/* ── "Awaiting ... response" pane ────────────────────────────────────────────
   Stands in for the workspace while somebody outside the business owes a reply.
   Tokens only, so light and dark follow tokens.css. */
#candidate-drawer-overlay .cand-waiting-pane {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100vh - 330px);
    padding: 24px;
    box-sizing: border-box;
}
#candidate-drawer-overlay .cand-waiting-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tpt-warn);
    background: var(--tpt-warn-tint);
    border: 1px solid var(--tpt-warn-line);
}
#candidate-drawer-overlay .cand-waiting-icon svg {
    width: 28px;
    height: 28px;
}
#candidate-drawer-overlay .cand-waiting-title {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tpt-text);
}
#candidate-drawer-overlay .cand-waiting-text {
    max-width: 420px;
    margin: 0 0 14px 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--tpt-text-subtle);
}
#candidate-drawer-overlay .cand-waiting-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--tpt-accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}
