/* public/css/jobs/ai_matching.css - Giao diện hiện đại cho hệ thống AI Matching & Recommendation JobLink */

:root {
    --ai-gradient-primary: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    --ai-gradient-glow: linear-gradient(135deg, rgba(13, 148, 136, 0.15) 0%, rgba(2, 132, 199, 0.15) 100%);
    --ai-emerald: #059669;
    --ai-sky: #0284c7;
    --ai-amber: #d97706;
}

/* Thẻ Badge AI Match Score */
.ai-match-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.ai-match-badge.excellent {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ai-match-badge.high {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.ai-match-badge.medium {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.ai-match-badge.low {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Khối AI Recommendation Banner / Box */
.ai-recommend-container {
    background: linear-gradient(135deg, #f0fdfa 0%, #f0f9ff 100%);
    border: 1px solid #99f6e4;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(13, 148, 136, 0.05);
}

.ai-recommend-container::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(13,148,136,0.12) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ai-badge-header {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    color: #0f766e;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid #ccfbf1;
    margin-bottom: 0.4rem;
}

.ai-job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.65rem;
    margin-top: 0.65rem;
}

.ai-job-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.ai-job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.1);
    border-color: #0d9488;
}

/* Huy hiệu tương thích kiểu mác góc trên bên phải (như mác giảm giá sàn TMĐT) */
.ai-job-card .ai-match-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    z-index: 5;
    gap: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-job-card .ai-match-badge:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
    filter: brightness(1.03);
}

/* FLOATING HOVER CARD GIẢI THÍCH CHI TIẾT THÔNG SỐ ĐỘ TƯƠNG THÍCH AI */
.ai-score-hover-card {
    position: fixed;
    z-index: 999999;
    width: 360px;
    max-width: calc(100vw - 28px);
    background: #ffffff;
    border: 1.5px solid #99f6e4;
    border-radius: 12px;
    box-shadow: 0 16px 40px -4px rgba(15, 23, 42, 0.22), 0 6px 16px rgba(13, 148, 136, 0.12);
    padding: 0.85rem 0.95rem;
    font-size: 0.78rem;
    color: #0f172a;
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    font-family: inherit;
    line-height: 1.45;
    box-sizing: border-box;
}

.ai-score-hover-card.is-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.ai-job-card .ai-match-badge svg {
    width: 10px;
    height: 10px;
}

.ai-job-card .ai-match-badge .match-text-full {
    display: none;
}

.ai-job-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 52px; /* Chừa chỗ cho mác tương thích góc trên phải */
}

.ai-job-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.ai-job-titles {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ai-job-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-job-company {
    margin: 0.15rem 0 0 0;
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-job-card a,
.ai-job-location a,
.ai-job-company a,
.ai-job-title a {
    text-decoration: none !important;
    cursor: pointer !important;
}

.ai-job-card a:hover,
.ai-job-location a:hover,
.ai-job-company a:hover,
.ai-job-title a:hover {
    text-decoration: none !important;
    cursor: pointer !important;
}

.ai-job-title a:hover,
.ai-job-company a:hover {
    color: #0d9488 !important;
}

.ai-job-location a:hover {
    color: #0f172a !important;
}

/* Thanh Tiến Trình Tương Thích AI (Match Progress Bar) */
.ai-progress-wrap {
    margin: 0.4rem 0;
    background: #f1f5f9;
    border-radius: 9999px;
    height: 5px;
    overflow: hidden;
    position: relative;
}

.ai-progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.8s ease-in-out;
}

.ai-progress-bar.excellent { background: linear-gradient(90deg, #10b981, #059669); }
.ai-progress-bar.high { background: linear-gradient(90deg, #38bdf8, #0284c7); }
.ai-progress-bar.medium { background: linear-gradient(90deg, #fbbf24, #d97706); }

/* Khối Lý Do Đề Xuất (AI Reasons Tag) */
.ai-reasons-list {
    margin: 0.35rem 0 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ai-reason-item {
    font-size: 0.76rem;
    color: #334155;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    line-height: 1.35;
}

.ai-reason-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Khối Kỹ Năng Khớp Nối (Tags) */
.ai-skill-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ai-skill-tag.matched {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.ai-skill-tag.missing {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

/* Modal Phân Tích Độ Tương Thích AI */
.ai-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.ai-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    position: relative;
    animation: aiModalSlide 0.25s ease-out;
}

@keyframes aiModalSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.25rem 0;
}

@media (max-width: 900px) {
    .ai-breakdown-grid {
        grid-template-columns: 1fr;
    }
}

.ai-breakdown-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.ai-breakdown-card:hover {
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.08);
    border-color: #99f6e4;
}

.ai-breakdown-score {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f766e;
}

.ai-breakdown-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.2rem;
}

/* ========================================================================= */
/* SOURCING HUB SEGMENTED CONTROLS & CARDS (ENTERPRISE MONOCHROME STYLING)   */
/* ========================================================================= */

.sourcing-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sourcing-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sourcing-stat-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.sourcing-stat-card.active {
    background: #f0fdfa;
    border-color: #0d9488;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.12);
}

.sourcing-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    color: #475569;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.sourcing-stat-card.active .sourcing-stat-icon {
    background: #ccfbf1;
    color: #0f766e;
    border-color: #99f6e4;
}

.sourcing-stat-num {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.sourcing-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
    font-weight: 500;
}

.sourcing-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.sourcing-segmented-control {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    gap: 4px;
}

.sourcing-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sourcing-pill:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}

.sourcing-pill.active {
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.sourcing-pill.active svg {
    color: #0d9488;
}

.sourcing-pill .pill-counter {
    background: #e2e8f0;
    color: #475569;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.sourcing-pill.active .pill-counter {
    background: #0d9488;
    color: #ffffff;
}

.sourcing-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    position: relative;
}

.sourcing-card:hover {
    border-color: #0d9488;
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.08);
    transform: translateY(-2px);
}

.sourcing-card.featured {
    border-color: #99f6e4;
    background: #ffffff;
}

/* ========================================================================= */
/* CÁC THÀNH PHẦN MỚI CHO BẢNG ĐIỀU KHIỂN NGƯỜI LAO ĐỘNG (SEEKER DASHBOARD)  */
/* ========================================================================= */

/* 1. Dải 4 ô thống kê trên hàng ngang cùng lời chào */
.stat-pill-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    user-select: none;
    text-decoration: none !important;
}

.stat-pill-item:hover {
    border-color: #0d9488;
    background: #f0fdfa;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(13, 148, 136, 0.1);
}

.stat-pill-emoji {
    font-size: 0.95rem;
    line-height: 1;
}

.stat-pill-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
}

.stat-pill-val {
    font-size: 0.9rem;
    font-weight: 800;
    margin-left: 0.15rem;
}

/* 2. Khối 2 cột tỉ lệ 6:4 (Trúng tuyển & Hồ sơ gần đây) */
.dashboard-mid-grid {
    display: grid;
    grid-template-columns: 6fr 4fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    align-items: stretch;
}

@media (max-width: 992px) {
    .dashboard-mid-grid {
        grid-template-columns: 1fr !important;
    }
}

/* 3. Nút Lưu việc làm trên thẻ đề xuất AI */
.btn-seeker-save {
    transition: all 0.15s ease;
}

.btn-seeker-save.btn-outline {
    background: #475569 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}

.btn-seeker-save.btn-outline:hover {
    border-color: #334155 !important;
    color: #ffffff !important;
    background: #334155 !important;
}

.btn-seeker-save.btn-primary {
    background: #0d9488 !important;
    border-color: #0d9488 !important;
    color: #ffffff !important;
}

/* ========================================================================= */
/* 4. BỘ ĐIỀU CHỈNH HẠN MỨC % TƯƠNG THÍCH (AI THRESHOLD CONTROLLER)         */
/* ========================================================================= */
.threshold-box {
    background: #ffffff;
    border: 1px solid #ccfbf1;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.04);
    margin-bottom: 1.5rem;
}

.threshold-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.threshold-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.threshold-badge {
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25);
}

.threshold-controls-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.threshold-slider-wrapper {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.threshold-slider {
    flex: 1;
    height: 8px;
    border-radius: 6px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    accent-color: #0d9488;
    cursor: pointer;
}

.threshold-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0d9488;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: grab;
    transition: transform 0.1s ease;
}

.threshold-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
}

.threshold-presets {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.btn-threshold-preset {
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-threshold-preset:hover {
    border-color: #0d9488;
    color: #0d9488;
    background: #f0fdfa;
}

.btn-threshold-preset.active {
    background: #0d9488;
    border-color: #0d9488;
    color: #ffffff;
}

.threshold-summary-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.pill-qualified {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.pill-unqualified {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Khu vực danh sách chưa đạt */
.unqualified-section-card {
    background: #fffdfa;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.05);
}

.unqualified-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.unqualified-badge-warning {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Thẻ ứng viên chưa đạt */
.sourcing-card.unqualified-card {
    border-color: #fed7aa;
    background: #ffffff;
    opacity: 0.95;
    position: relative;
}

.sourcing-card.unqualified-card:hover {
    opacity: 1;
    border-color: #f97316;
}

/* ========================================================================= */
/* MODAL THIẾT LẬP CÀI ĐẶT ĐỘ TƯƠNG THÍCH & TIÊU CHÍ RIÊNG CỦA DOANH NGHIỆP  */
/* ========================================================================= */
@keyframes criteriaModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.criteria-item-row {
    transition: all 0.2s ease;
}

.criteria-item-row:hover {
    border-color: #0d9488 !important;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.08);
}

.criteria-item-row.is-inactive {
    opacity: 0.78;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.btn-delete-criterion {
    transition: all 0.18s ease;
}

.btn-delete-criterion:hover {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    transform: scale(1.06);
}

/* ========================================================================= */
/* NÚT BẤM & DIALOG ĐÁNH GIÁ ĐỘ TƯƠNG THÍCH AI (JOB DETAIL)                  */
/* ========================================================================= */
.btn-ai-compatibility {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 9999px !important;
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    border: none !important;
    background: var(--primary, #0d9488) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
    line-height: 1.2 !important;
    font-family: inherit !important;
    outline: none !important;
    text-decoration: none !important;
    letter-spacing: 0.3px !important;
}

.btn-ai-compatibility:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35) !important;
    background: var(--primary-hover, #0f766e) !important;
    color: #ffffff !important;
}

.btn-ai-compatibility:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 4px rgba(13, 148, 136, 0.2) !important;
}

/* THANH TÓM TẮT ĐỘ TƯƠNG THÍCH AI TRONG CHI TIẾT BÀI ĐĂNG (JOB DETAIL) */
.ai-match-quick-bar {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none;
}

.ai-match-quick-bar:hover {
    background: linear-gradient(135deg, #e6fffa 0%, #d1fae5 100%) !important;
    border-color: #5eead4 !important;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.15) !important;
    transform: translateY(-1px);
}

.ai-match-quick-bar:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.1) !important;
}

/* DIALOG / MODAL ĐÁNH GIÁ ĐỘ TƯƠNG THÍCH AI */
.ai-comp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100005;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    animation: aiModalFadeIn 0.2s ease-out;
}

@keyframes aiModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes aiModalScaleUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ai-comp-modal-container {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: aiModalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.ai-comp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 100%);
    gap: 1rem;
}

.ai-comp-modal-score {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.ai-comp-modal-close {
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 1.35rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ai-comp-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.08);
}

.ai-comp-modal-body {
    padding: 1.15rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.ai-comp-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Custom styling for AI Match Modal details */
.ai-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.ai-card-title {
    font-weight: 800;
    font-size: 0.9rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ai-card-badge {
    font-size: 0.82rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
}

.ai-card-progress {
    height: 5px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.45rem;
}

.ai-card-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.ai-card-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.77rem;
    color: #334155;
    line-height: 1.45;
}

.ai-detail-row {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
    align-items: baseline;
}

.ai-detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    min-width: 82px;
    flex-shrink: 0;
}

.ai-detail-value {
    color: #0f172a;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-detail-status {
    margin-top: 0.3rem;
    padding-top: 0.25rem;
    border-top: 1px dashed #e2e8f0;
    font-weight: 700;
    font-size: 0.76rem;
}

/* Bottom section: Skills and Advice */
.ai-bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.85rem;
}

@media (max-width: 768px) {
    .ai-bottom-section {
        grid-template-columns: 1fr;
    }
}

.ai-skills-panel {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ai-skills-label {
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ai-skills-label.matched {
    color: #0f766e;
}

.ai-skills-label.missing {
    color: #c2410c;
}

.ai-skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ai-advice-panel {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ai-advice-header {
    font-weight: 800;
    font-size: 0.85rem;
    color: #0f172a;
    margin-bottom: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-advice-header .ai-header-icon {
    color: #0d9488;
    display: inline-flex;
    align-items: center;
}

.ai-advice-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ai-advice-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    font-size: 0.81rem;
    color: #334155;
    line-height: 1.5;
    transition: all 0.15s ease;
}

.ai-advice-item:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.ai-advice-bullet {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    color: #0d9488;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.ai-advice-text {
    flex: 1;
    font-size: 0.81rem;
    color: #334155;
    line-height: 1.5;
}

/* Custom slim scrollbar for modal body */
.ai-comp-modal-body::-webkit-scrollbar {
    width: 6px;
}
.ai-comp-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 999px;
}
.ai-comp-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.ai-comp-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


