/* ============================================
   PREMIUM KANDIDATEN-DETAILANSICHT
   Finders & Company CI
   ============================================ */

/* Main Container */
.candidate-detail-container {
    padding: 0;
    max-width: 100%;
    padding-bottom: 80px; /* Space for floating buttons */
}

/* Header Section with Gradient */
.candidate-header {
    background: linear-gradient(135deg, var(--fc-primary) 0%, var(--fc-primary-light) 50%, var(--fc-accent) 100%);
    border-radius: 16px;
    padding: 32px;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.candidate-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255,255,255,0.05);
    transform: rotate(15deg);
    pointer-events: none;
}

.candidate-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.candidate-avatar-large {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 700;
    border: 4px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.candidate-avatar-large:hover .avatar-camera-overlay {
    opacity: 1 !important;
}

.candidate-header-info {
    flex: 1;
}

.candidate-header-info h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.candidate-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    opacity: 0.9;
    font-size: 14px;
}

.candidate-header-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.candidate-header-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.candidate-header-actions button {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-header-primary {
    background: white;
    color: var(--fc-primary);
}

.btn-header-primary:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.btn-header-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3) !important;
}

.btn-header-secondary:hover {
    background: rgba(255,255,255,0.3);
}

/* Status Badge in Header */
.status-badge-large {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Stats Row */
.quick-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.quick-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.quick-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.quick-stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.quick-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--fc-primary);
}

.quick-stat-value.rating {
    color: #fbbf24;
}

/* Fit Score Circle */
.fit-score-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.fit-score-circle {
    position: relative;
    width: 80px;
    height: 80px;
}

.fit-score-circle svg {
    transform: rotate(-90deg);
    width: 80px;
    height: 80px;
}

.fit-score-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.fit-score-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}

.fit-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
}

.fit-score-excellent { stroke: #10b981; }
.fit-score-good { stroke: #3b82f6; }
.fit-score-average { stroke: #f59e0b; }
.fit-score-poor { stroke: #ef4444; }

.fit-score-text.excellent { color: #10b981; }
.fit-score-text.good { color: #3b82f6; }
.fit-score-text.average { color: #f59e0b; }
.fit-score-text.poor { color: #ef4444; }

/* Main Grid Layout */
.candidate-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* Section Cards */
.detail-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.detail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.detail-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fc-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section-title i {
    color: var(--fc-accent);
}

/* Skills Tags */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    transform: scale(1.05);
}

.skill-tag.technical {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.skill-tag.soft {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.skill-tag.certification {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.skill-tag.language {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    border: 1px solid #a5b4fc;
}

/* Experience Timeline */
.experience-timeline {
    position: relative;
    padding-left: 30px;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--fc-primary) 0%, var(--fc-accent) 100%);
    border-radius: 2px;
}

.experience-item {
    position: relative;
    padding: 20px;
    margin-bottom: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.experience-item:hover {
    background: #f3f4f6;
    border-left-color: var(--fc-accent);
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 24px;
    width: 14px;
    height: 14px;
    background: var(--fc-primary);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.experience-item:first-child::before {
    background: var(--fc-accent);
    width: 18px;
    height: 18px;
    left: -28px;
    top: 22px;
}

.experience-company {
    font-size: 16px;
    font-weight: 700;
    color: var(--fc-primary);
    margin-bottom: 4px;
}

.experience-title {
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 8px;
}

.experience-period {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.experience-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}

/* Education Cards */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.education-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #bae6fd;
    transition: all 0.3s ease;
}

.education-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.education-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--fc-primary);
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.education-degree {
    font-size: 16px;
    font-weight: 700;
    color: var(--fc-primary);
    margin-bottom: 4px;
}

.education-field {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 4px;
}

.education-institution {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.education-period {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Interests Section */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.interest-tag {
    padding: 8px 14px;
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
    border: 1px solid #e879f9;
    border-radius: 25px;
    font-size: 13px;
    color: #86198f;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.interest-tag:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #fae8ff 0%, #f5d0fe 100%);
}

.interest-tag i {
    font-size: 16px;
}

/* AI Insights Section */
.ai-insights-card {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 16px;
    padding: 24px;
}

.ai-insights-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ai-badge {
    background: linear-gradient(135deg, var(--fc-primary) 0%, var(--fc-accent) 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-summary {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
}

.ai-strengths {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.ai-strength-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ai-strength-item i {
    color: #10b981;
    font-size: 16px;
}

/* Documents Section */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.document-item:hover {
    background: #f3f4f6;
    border-color: var(--fc-primary);
}

.document-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 22px;
    flex-shrink: 0;
}

.document-icon.cv {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.document-info {
    flex: 1;
}

.document-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--fc-primary);
    margin-bottom: 4px;
}

.document-meta {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    gap: 12px;
}

.document-status {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.document-status.completed {
    background: #dcfce7;
    color: #16a34a;
}

.document-status.analyzing {
    background: #fef3c7;
    color: #d97706;
}

.document-status.failed {
    background: #fee2e2;
    color: #dc2626;
}

/* Activity Timeline Improved */
.activity-timeline {
    position: relative;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: #fafafa;
    margin: 0 -16px;
    padding: 16px;
    border-radius: 8px;
}

.activity-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon-wrapper.cv_upload {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.activity-icon-wrapper.contact_email {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.activity-icon-wrapper.contact_phone {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
}

.activity-icon-wrapper.created {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.activity-icon-wrapper.tag_added {
    background: linear-gradient(135deg, #fae8ff 0%, #f5d0fe 100%);
    color: #a855f7;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fc-primary);
    margin-bottom: 4px;
}

.activity-description {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.activity-meta {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sidebar Card Styling */
.sidebar-section {
    margin-bottom: 24px;
}

/* Contact Info Card */
.contact-info-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.contact-info-item:hover {
    background: #f3f4f6;
}

.contact-info-icon {
    width: 40px;
    height: 40px;
    background: var(--fc-primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.contact-info-content {
    flex: 1;
    min-width: 0;
}

.contact-info-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.contact-info-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--fc-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-info-value a {
    color: var(--fc-primary);
    text-decoration: none;
}

.contact-info-value a:hover {
    color: var(--fc-accent);
    text-decoration: underline;
}

/* No Data State */
.no-data-state {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.no-data-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-data-state p {
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Tablet + Small Laptop (< 1280px): Sidebar goes below */
@media (max-width: 1280px) {
    .candidate-detail-grid {
        grid-template-columns: 1fr;
    }

    /* Sidebar items render in a 2-col grid when stacked */
    .candidate-detail-grid > div:last-child {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .candidate-detail-grid > div:last-child > .sidebar-section {
        margin-bottom: 0;
    }
}

/* Tablet Portrait (< 1024px) */
@media (max-width: 1024px) {
    .candidate-header {
        padding: 24px;
        border-radius: 12px;
    }

    .candidate-header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .candidate-header-info h1 {
        font-size: 24px;
        max-width: 100% !important;
    }

    .candidate-header-meta {
        justify-content: center;
    }

    .candidate-header-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .candidate-header-actions button {
        padding: 10px 16px;
        font-size: 13px;
    }

    .quick-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .ai-strengths {
        grid-template-columns: 1fr;
    }
}

/* Small Tablet / Large Phone (< 768px) */
@media (max-width: 768px) {
    .candidate-detail-container {
        padding: 0;
    }

    .candidate-header {
        padding: 20px 16px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .candidate-avatar-large {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }

    .candidate-header-info h1 {
        font-size: 20px;
    }

    .candidate-header-meta {
        gap: 8px;
        font-size: 12px;
    }

    /* Compact action buttons: icon-only on mobile with tooltip */
    .candidate-header-actions {
        gap: 6px;
    }

    .candidate-header-actions button {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 8px;
    }

    /* Hide button text on small screens, show only icons */
    .candidate-header-actions button span.btn-label {
        display: none;
    }

    .quick-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 16px;
    }

    .quick-stat-card {
        padding: 14px;
        border-radius: 10px;
    }

    .quick-stat-value {
        font-size: 20px;
    }

    /* Sidebar section stacks single column on phone */
    .candidate-detail-grid > div:last-child {
        grid-template-columns: 1fr;
    }

    .detail-section {
        padding: 18px 14px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .detail-section-header {
        margin-bottom: 14px;
        padding-bottom: 12px;
    }

    .detail-section-title {
        font-size: 16px;
    }

    .experience-timeline {
        padding-left: 24px;
    }

    .experience-item {
        padding: 14px;
    }

    .contact-info-item {
        padding: 10px;
    }

    .languages-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .language-item {
        padding: 10px 12px;
        gap: 8px;
    }

    .language-flag {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .language-name {
        font-size: 13px;
    }

    .skills-container {
        gap: 6px;
    }

    .skill-tag {
        padding: 6px 10px;
        font-size: 12px;
        max-width: 200px;
    }

    .interest-tag {
        padding: 8px 12px;
        font-size: 12px;
        max-width: 100%;
    }

    /* Fit score adjustments */
    .fit-score-circle {
        width: 60px;
        height: 60px;
    }

    .fit-score-circle svg {
        width: 60px;
        height: 60px;
    }

    .fit-score-text {
        font-size: 16px;
    }
}

/* Extra small phones (< 480px) */
@media (max-width: 480px) {
    .candidate-header {
        padding: 16px 12px;
    }

    .candidate-avatar-large {
        width: 56px;
        height: 56px;
        font-size: 24px;
        border-width: 3px;
    }

    .candidate-header-info h1 {
        font-size: 18px;
    }

    .candidate-header-meta {
        flex-direction: column;
        gap: 6px;
    }

    /* 2x2 grid of icon buttons */
    .candidate-header-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
        gap: 6px;
        width: 100%;
    }

    .candidate-header-actions button {
        padding: 10px;
        justify-content: center;
        font-size: 12px;
    }

    .quick-stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .quick-stat-card {
        padding: 12px;
    }

    .quick-stat-label {
        font-size: 10px;
    }

    .quick-stat-value {
        font-size: 18px;
    }

    .detail-section {
        padding: 14px 12px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .detail-section-title {
        font-size: 14px;
    }

    .experience-company {
        font-size: 14px;
    }

    .experience-title {
        font-size: 13px;
    }

    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }

    .document-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .document-name {
        max-width: 100%;
    }

    .activity-item {
        gap: 10px;
        padding: 12px 0;
    }

    .activity-icon-wrapper {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .contact-info-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .contact-info-value {
        font-size: 13px;
    }
}

/* ============================================
   LANGUAGES SECTION
   ============================================ */

.languages-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 8px 0;
}

.language-item {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
    border: 2px solid var(--fc-primary);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 97, 1, 0.1);
    min-width: 0;
    overflow: hidden;
}

.language-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 97, 1, 0.2);
}

.language-flag {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fc-primary);
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.language-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--fc-secondary);
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ============================================
   TEXT OVERFLOW & UX FIXES
   ============================================ */

/* Truncate single line */
.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Clamp multi-line text */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-clamp-6 {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fix overflow on all card content */
.detail-section {
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.skill-tag {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.interest-tag {
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.experience-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-summary {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.document-name {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-title {
    max-width: 100%;
}

.activity-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ============================================
   EDITABLE FIELDS SECTION - Redesigned Cards
   ============================================ */

.editable-fields-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.editable-field-row {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 16px;
    background: transparent;
    border: 1px solid transparent;
}

.editable-field-row:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.editable-field-row:hover .editable-field-icon {
    opacity: 1;
}

.editable-field-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
    flex-shrink: 0;
    padding-top: 2px;
}

.editable-field-value {
    flex: 1;
    font-size: 14px;
    color: var(--fc-primary);
    font-weight: 500;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-width: 0;
}

.editable-field-icon {
    color: var(--fc-accent);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
    padding-top: 3px;
}

/* Section edit button */
.section-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: var(--fc-accent);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.section-edit-btn:hover {
    background: #fff7ed;
    border-color: var(--fc-accent);
    transform: translateY(-1px);
}

/* Mobile: editable fields stack vertically */
@media (max-width: 640px) {
    .editable-field-row {
        flex-direction: column;
        gap: 4px;
        padding: 12px 14px;
        background: #f9fafb;
        border: 1px solid #f3f4f6;
        border-radius: 10px;
        margin-bottom: 6px;
    }

    .editable-field-row:hover {
        background: #f3f4f6;
        border-color: var(--fc-accent);
    }

    .editable-field-label {
        min-width: auto;
        font-size: 10px;
    }

    .editable-field-value {
        font-size: 14px;
        white-space: normal;
        word-wrap: break-word;
    }

    .editable-field-icon {
        opacity: 0.5;
        position: absolute;
        right: 12px;
        top: 12px;
    }

    .editable-field-row {
        position: relative;
    }

    .editable-fields-grid {
        gap: 4px;
    }
}

/* ============================================
   LIGHTHOUSE BUTTON
   ============================================ */

.btn-header-lighthouse-active {
    background: rgba(251, 191, 36, 0.3) !important;
    color: #fbbf24 !important;
    border: 2px solid #fbbf24 !important;
}

.btn-header-lighthouse-active:hover {
    background: rgba(251, 191, 36, 0.5) !important;
}

/* Linked customer contact state in the Finders profile header */
.btn-header-customer-contact-active {
    background: rgba(34, 197, 94, 0.24) !important;
    color: #dcfce7 !important;
    border: 2px solid #4ade80 !important;
}

.btn-header-customer-contact-active:hover {
    background: rgba(34, 197, 94, 0.36) !important;
}

.customer-contact-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: #dcfce7;
    color: #15803d;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

/* ============================================
   CANDIDATE LIST - Lighthouse indicator
   ============================================ */

.lighthouse-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #f59e0b;
    font-size: 12px;
    font-weight: 600;
}

/* Print Styles */
@media print {
    .candidate-header-actions,
    .btn-header-primary,
    .btn-header-secondary,
    .btn-header-customer-contact-active,
    .section-edit-btn,
    .editable-field-icon {
        display: none !important;
    }
    
    .detail-section {
        break-inside: avoid;
    }

    .candidate-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Button label responsive helper */
.btn-label {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .btn-label {
        display: none;
    }
}
