.candidate-detail-modal .modal-content {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #f6f8fc;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .22);
}

.candidate-detail-modal .modal-header {
    padding: 1.25rem 1.75rem;
    border: 0;
    background: linear-gradient(135deg, #111827 0%, #312e81 100%);
    color: #fff;
}

.candidate-detail-modal .modal-body { padding: 0 1.5rem 1.5rem; }

.candidate-detail-modal .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e8edf5;
    background: #fff;
}

.candidate-profile-hero {
    position: relative;
    margin: 0 -1.5rem;
    padding: 2rem;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #0891b2 100%);
}

.candidate-profile-hero--success {
    background: linear-gradient(135deg, #064e3b 0%, #059669 58%, #0891b2 100%);
}

.candidate-profile-hero--danger {
    background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 58%, #be185d 100%);
}

.candidate-profile-hero::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    top: -140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
    pointer-events: none;
}

.candidate-profile-hero > .position-relative { z-index: 1; }

.candidate-detail-avatar {
    width: 94px;
    height: 94px;
    flex: 0 0 94px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 4px solid rgba(255, 255, 255, .32);
    border-radius: 24px;
    background: rgba(255, 255, 255, .15);
    box-shadow: 0 16px 35px rgba(15, 23, 42, .24);
}

.candidate-detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.candidate-detail-avatar-fallback { font-size: 1.75rem; font-weight: 800; }

.candidate-detail-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .35rem .75rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, .2);
    font-size: .74rem;
    font-weight: 650;
}

.candidate-detail-pill .badge {
    padding: 0;
    color: #fff !important;
    background: transparent !important;
}

.candidate-milestone-card {
    position: relative;
    z-index: 1;
    min-width: 235px;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 18px;
    background: rgba(15, 23, 42, .23);
    backdrop-filter: blur(10px);
}

.candidate-milestone-card span,
.candidate-milestone-card small {
    display: block;
    color: rgba(255, 255, 255, .74);
    font-size: .72rem;
}

.candidate-milestone-card strong {
    display: block;
    margin: .3rem 0;
    color: #fff;
    font-size: .9rem;
}

.candidate-detail-panel {
    padding: 1.35rem;
    border: 1px solid #e6ebf3;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(30, 41, 59, .05);
}

.candidate-section-heading {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.25rem;
}

.candidate-section-heading h4 { margin: 0 0 .15rem; font-size: 1rem; color: #172033; }
.candidate-section-heading p { margin: 0; color: #8992a5; font-size: .73rem; }

.candidate-section-icon,
.candidate-detail-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
}

.candidate-section-icon { width: 43px; height: 43px; font-size: 1.1rem; }
.candidate-detail-icon { width: 38px; height: 38px; }

.candidate-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.candidate-info-grid > div {
    min-width: 0;
    padding: .85rem 1rem;
    border-radius: 14px;
    background: #f7f9fc;
}

.candidate-info-grid small,
.candidate-detail-row small,
.candidate-score-card small {
    display: block;
    margin-bottom: .25rem;
    color: #8a94a6;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.candidate-info-grid strong,
.candidate-detail-row strong {
    display: block;
    color: #263044;
    font-size: .82rem;
}

.candidate-detail-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .75rem 0;
    border-bottom: 1px dashed #e2e7ef;
}

.candidate-detail-panel > .candidate-detail-row:last-child { border-bottom: 0; }

.candidate-letter {
    padding: 1.1rem;
    border-left: 3px solid #f59e0b;
    border-radius: 0 14px 14px 0;
    background: #fffbeb;
    color: #4b5563;
    line-height: 1.75;
    white-space: pre-line;
}

.candidate-decision-note {
    padding: 1.1rem;
    border-left: 3px solid #ef4444;
    border-radius: 0 14px 14px 0;
    background: #fef2f2;
    color: #7f1d1d;
    line-height: 1.7;
    white-space: pre-line;
}

.candidate-score-card {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 15px;
    background: linear-gradient(135deg, #eef2ff, #ecfeff);
}

.candidate-score-card strong {
    display: block;
    margin-bottom: .65rem;
    color: #312e81;
    font-size: 1.7rem;
}

.candidate-portal-state {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem;
    border-radius: 15px;
}

.candidate-portal-state--active { background: #ecfdf5; color: #065f46; }
.candidate-portal-state--pending { background: #fffbeb; color: #92400e; }

@media (max-width: 767.98px) {
    .candidate-detail-modal .modal-body { padding: 0 1rem 1rem; }
    .candidate-profile-hero { margin: 0 -1rem; padding: 1.4rem; }
    .candidate-milestone-card { width: 100%; min-width: 0; }
    .candidate-info-grid { grid-template-columns: 1fr; }
}
