/* ======================================================
   CHAM DIEM CV PAGE
====================================================== */

/* ---- Hero ---- */
.cv-hero {
    position: relative;
    padding: 80px 20px 60px;
    text-align: center;
    overflow: hidden;
    background: #0f0f1a;
}

.cv-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(46,59,142,0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(238,0,51,0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(0,191,165,0.15) 0%, transparent 50%);
    z-index: 0;
}

.cv-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cv-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.cv-hero-badge i { color: #00BFA5; }

.cv-hero-title {
    font-size: 46px;
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: linear-gradient(135deg, #00BFA5, #2196F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cv-hero-subtitle {
    font-size: 17px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 28px;
    line-height: 1.6;
}

.cv-criteria-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.criteria-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 100px;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.criteria-pill:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
}

.criteria-pill i { color: #00BFA5; font-size: 12px; }

/* ---- Page body ---- */
.cv-page-body {
    background: #f5f7fa;
    padding: 32px 0 60px;
}

.cv-page-body .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Login warning ---- */
.login-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 14px;
    color: #7d5a00;
    font-weight: 500;
    margin-bottom: 24px;
}

.login-warning a {
    color: #EE0033;
    font-weight: 700;
    text-decoration: underline;
}

/* ---- Layout ---- */
.cv-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

/* ---- Upload card ---- */
.cv-upload-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid #e8ecef;
}

.upload-header {
    text-align: center;
    margin-bottom: 24px;
}

.upload-icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2E3B8E, #4a5bc7);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: #fff;
}

.upload-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.upload-header p { font-size: 14px; color: #6c757d; }

/* ---- Dropzone ---- */
.dropzone {
    border: 2px dashed #d1d9e6;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
    position: relative;
}

.dropzone:hover, .dropzone.drag-over {
    border-color: #2E3B8E;
    background: #f0f3ff;
}

.dropzone-icon {
    font-size: 40px;
    color: #d1d9e6;
    margin-bottom: 12px;
    display: block;
    transition: color 0.2s;
}

.dropzone:hover .dropzone-icon { color: #2E3B8E; }

.dropzone-text {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
}

.dropzone-hint { font-size: 14px; color: #6c757d; margin-bottom: 10px; }

.dropzone-link {
    color: #2E3B8E;
    font-weight: 600;
    text-decoration: underline;
}

.dropzone-formats {
    font-size: 12px;
    color: #adb5bd;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ---- File preview ---- */
.file-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border: 1.5px solid #e8ecef;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.file-preview-icon { font-size: 28px; flex-shrink: 0; }

.file-preview-info { flex: 1; min-width: 0; }

.file-name {
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size { font-size: 12px; color: #6c757d; margin-top: 2px; }

.file-remove {
    border: none;
    background: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.file-remove:hover { color: #EE0033; background: #fff5f5; }

/* ---- Analyze button ---- */
.btn-analyze {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #EE0033, #cc0028);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(238,0,51,0.35);
}

.btn-analyze:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(238,0,51,0.45);
}

.btn-analyze:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ---- Analyzing animation ---- */
.cv-analyzing {
    background: #fff;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.analyzing-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.analyzing-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #2E3B8E;
    animation: spinRing 1.5s linear infinite;
}

.ring-2 {
    inset: 10px;
    border-top-color: #EE0033;
    animation-duration: 1.1s;
    animation-direction: reverse;
}

.ring-3 {
    inset: 20px;
    border-top-color: #00BFA5;
    animation-duration: 0.8s;
}

@keyframes spinRing { to { transform: rotate(360deg); } }

.analyzing-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #2E3B8E;
}

.cv-analyzing h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.cv-analyzing > p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 28px;
}

.analyzing-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #adb5bd;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1.5px solid #e8ecef;
    font-weight: 500;
    transition: all 0.4s;
}

.step-item.active {
    color: #2E3B8E;
    border-color: #2E3B8E;
    background: #f0f3ff;
    font-weight: 700;
}

/* ---- Result card ---- */
.cv-result-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid #e8ecef;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 32px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2E3B8E 100%);
    color: #fff;
}

.total-score-wrap {
    position: relative;
    flex-shrink: 0;
}

.score-ring {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 8;
}

.score-ring-fill {
    fill: none;
    stroke: #00BFA5;
    stroke-width: 8;
    stroke-linecap: round;
}

.total-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.total-score-num { font-size: 30px; font-weight: 900; line-height: 1; }
.total-score-max { font-size: 13px; opacity: 0.6; }

.result-header-info { flex: 1; }
.result-grade { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.result-file-name { font-size: 13px; opacity: 0.7; margin-bottom: 8px; }

.result-overall {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 16px;
}

.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-rescore, .btn-download-result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-rescore:hover, .btn-download-result:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

/* Criteria */
.criteria-section { padding: 28px 28px 16px; }

.section-title {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i { color: #2E3B8E; }

.criteria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.criteria-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e8ecef;
    animation: fadeInUp 0.4s ease both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.criteria-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 8px;
}

.criteria-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.3;
}

.criteria-card-score {
    font-size: 18px;
    font-weight: 900;
    flex-shrink: 0;
    line-height: 1;
}

.criteria-card-score span { font-size: 12px; color: #adb5bd; font-weight: 500; }

.criteria-progress-bg {
    height: 6px;
    background: #e8ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.criteria-progress-fill { height: 100%; border-radius: 3px; width: 0; }

.criteria-feedback { font-size: 12px; color: #6c757d; line-height: 1.5; }

/* S&W */
.sw-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid #e8ecef;
}

.strengths-card, .weaknesses-card { padding: 24px 28px; }
.strengths-card { border-right: 1px solid #e8ecef; }

.strengths-card h3 {
    color: #00875A;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.weaknesses-card h3 {
    color: #FF6B35;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sw-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }

.sw-list li {
    font-size: 13px;
    color: #2c3e50;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.strengths-card .sw-list li i { color: #00875A; margin-top: 2px; flex-shrink: 0; }
.weaknesses-card .sw-list li i { color: #FF6B35; margin-top: 2px; flex-shrink: 0; }

/* ---- Right sidebar ---- */
.cv-right { display: flex; flex-direction: column; gap: 16px; }

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    border: 1px solid #e8ecef;
}

.info-card-title {
    font-size: 13px;
    font-weight: 800;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.how-step { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.how-step:last-child { margin-bottom: 0; }

.how-step-num {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #2E3B8E, #4a5bc7);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.how-step-text { display: flex; flex-direction: column; gap: 2px; }
.how-step-text strong { font-size: 13px; color: #2c3e50; }
.how-step-text span { font-size: 12px; color: #6c757d; line-height: 1.4; }

.criteria-toggle-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font: inherit;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
    flex-shrink: 0;
}

.criteria-toggle-btn:hover {
    background: rgba(15, 23, 42, 0.04);
    color: #0f172a;
    transform: translateY(-1px);
}

.criteria-toggle-btn:active {
    transform: translateY(0);
}

.criteria-toggle-btn:focus-visible {
    outline: 2px solid rgba(46, 59, 142, 0.16);
    outline-offset: 2px;
}

.criteria-toggle-btn i {
    font-size: 10px;
    transition: transform 0.16s ease;
}

#criteriaInfoList {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
}

.criteria-collapsed {
    display: none !important;
}

.criteria-accordion-item {
    position: relative;
    border-bottom: 1px solid #edf2f7;
    transition: background-color 0.16s ease, border-color 0.16s ease;
    cursor: pointer;
    user-select: none;
}

.criteria-accordion-item:first-child {
    border-top: 1px solid #edf2f7;
}

.criteria-accordion-item:last-child {
    border-bottom: none;
}

.criteria-accordion-item:hover {
    background: rgba(46, 59, 142, 0.025);
}

.criteria-accordion-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 0;
}

.criteria-accordion-name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.criteria-accordion-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding-top: 2px;
}

.criteria-max-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.criteria-accordion-icon {
    color: #cbd5e1;
    font-size: 10px;
    transition: transform 0.16s ease, color 0.16s ease;
}

.criteria-accordion-item.open .criteria-accordion-icon {
    transform: rotate(90deg);
    color: #475569;
}

.criteria-accordion-body {
    display: none;
    padding: 0 0 16px;
}

.criteria-accordion-item.open .criteria-accordion-body {
    display: block;
}

.criteria-accordion-body .criteria-info-desc {
    font-size: 13px;
    color: #475569;
    line-height: 1.65;
    margin: 0 0 8px;
}

.criteria-accordion-body .criteria-info-max {
    font-size: 12px;
    color: #64748b;
}

.criteria-accordion-body .criteria-info-max strong {
    color: #334155;
    font-weight: 700;
}

.criteria-info-item { padding: 12px 0; border-bottom: 1px solid #f5f7fa; }
.criteria-info-item:last-child { border-bottom: none; }
.criteria-info-name { font-size: 13px; font-weight: 700; color: #2E3B8E; margin-bottom: 4px; }
.criteria-info-desc { font-size: 12px; color: #6c757d; line-height: 1.5; margin-bottom: 4px; }
.criteria-info-max { font-size: 12px; color: #adb5bd; }

.history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding: 0 7px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 700;
    border-radius: 100px;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s;
    margin-bottom: 6px;
    border: 1px solid #f0f0f0;
}

.history-item:hover { background: #f8f9fa; border-color: #2E3B8E; }

.history-item-left {
    min-width: 0;
    flex: 1;
}

.history-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 12px;
}

.history-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.history-item-date { font-size: 11px; color: #adb5bd; margin-top: 2px; }
.history-item-score { font-size: 14px; font-weight: 800; flex-shrink: 0; }

.history-delete-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
    flex-shrink: 0;
}

.history-delete-btn:hover {
    background: rgba(238, 0, 51, 0.07);
    color: #dc2626;
    transform: translateY(-1px);
}

.history-delete-btn:focus-visible {
    outline: 2px solid rgba(220, 38, 38, 0.18);
    outline-offset: 2px;
}

.history-delete-btn i {
    font-size: 12px;
}

/* ---- Toast ---- */
.cv-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a2e;
    color: #fff;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s;
    z-index: 9999;
    white-space: nowrap;
}

.cv-toast.cv-toast-error { background: #EE0033; }

.cv-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Responsive ---- */
/* Laptop & Tablet */
@media (max-width: 1024px) {
    .cv-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cv-right {
        order: -1;
    }

    .criteria-grid,
    .sw-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .cv-hero-title {
        font-size: 36px;
    }

    .result-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

/* Tablet Small */
@media (max-width: 768px) {
    .cv-hero-title {
        font-size: 28px;
    }

    .criteria-grid,
    .sw-section {
        grid-template-columns: 1fr;
    }

    .strengths-card {
        border-right: none;
        border-bottom: 1px solid #e8ecef;
    }

    .cv-score-circle {
        width: 120px;
        height: 120px;
    }

    .cv-score-value {
        font-size: 32px;
    }

    .match-jobs-card {
        margin-top: 16px;
    }

    .match-jobs-header {
        padding: 16px 20px;
    }

    .match-jobs-title {
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .cv-hero-title {
        font-size: 24px;
    }

    .cv-hero-subtitle {
        font-size: 14px;
    }

    .cv-section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .cv-section-title {
        font-size: 16px;
    }

    .criteria-item {
        padding: 12px;
    }

    .criteria-name {
        font-size: 13px;
    }

    .criteria-score {
        font-size: 14px;
    }

    .cv-score-circle {
        width: 100px;
        height: 100px;
    }

    .cv-score-value {
        font-size: 28px;
    }

    .strength-item {
        font-size: 13px;
        padding: 8px 0;
    }

    .match-jobs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .match-jobs-title {
        font-size: 14px;
    }

    .match-jobs-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .cv-hero-title {
        font-size: 20px;
    }

    .cv-section {
        padding: 12px;
    }

    .cv-section-title {
        font-size: 15px;
    }

    .cv-score-circle {
        width: 90px;
        height: 90px;
    }

    .cv-score-value {
        font-size: 24px;
    }
}

/* ===== MATCH JOBS SECTION ===== */
.match-jobs-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06); border: 1px solid #e8ecef;
    margin-top: 20px; animation: fadeInUp 0.5s ease;
}
.match-jobs-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; background: linear-gradient(135deg, #1a1a2e, #2E3B8E); color: #fff;
}
.match-jobs-title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.match-jobs-title i { color: #00BFA5; }
.match-jobs-badge {
    background: rgba(255,255,255,0.15); color: #fff; font-size: 12px;
    font-weight: 700; padding: 4px 12px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.2);
}
.match-jobs-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; padding: 32px; color: #6c757d; font-size: 14px; font-weight: 500;
}
.match-loading-ring {
    width: 24px; height: 24px; border: 3px solid #e8ecef; border-top-color: #2E3B8E;
    border-radius: 50%; animation: spinRing 0.9s linear infinite; flex-shrink: 0;
}
.match-jobs-list { padding: 12px 0; }
.match-job-item {
    display: flex; align-items: center; gap: 16px; padding: 14px 24px;
    border-bottom: 1px solid #f5f7fa; transition: background 0.15s;
}
.match-job-item:last-child { border-bottom: none; }
.match-job-item:hover { background: #fafbff; }
.match-score-ring {
    width: 52px; height: 52px; border-radius: 50%;
    background: conic-gradient(var(--score-color, #2196F3) 0%, #f0f0f0 0%);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; position: relative;
}
.match-score-ring::before {
    content: ''; position: absolute; inset: 5px; background: #fff; border-radius: 50%;
}
.match-score-ring span { position: relative; z-index: 1; font-size: 11px; font-weight: 800; color: #1a1a2e; }
.match-job-info { flex: 1; min-width: 0; }
.match-job-title {
    font-size: 14px; font-weight: 700; color: #1a1a2e; margin-bottom: 5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match-job-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #6c757d; margin-bottom: 6px; }
.match-job-meta span { display: flex; align-items: center; gap: 4px; }
.match-job-meta i { color: #adb5bd; font-size: 11px; }
.match-job-reason { font-size: 12px; color: #00875A; display: flex; align-items: flex-start; gap: 5px; line-height: 1.4; }
.match-job-reason i { font-size: 11px; margin-top: 1px; flex-shrink: 0; }
.match-job-link {
    width: 32px; height: 32px; background: #f0f3ff; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: #2E3B8E;
    font-size: 13px; text-decoration: none; flex-shrink: 0; transition: all 0.2s;
}
.match-job-link:hover { background: #2E3B8E; color: #fff; transform: translateX(2px); }
.match-empty { text-align: center; padding: 32px 20px; color: #adb5bd; }
.match-empty i { font-size: 32px; display: block; margin-bottom: 10px; }
.match-empty p { font-size: 14px; }
.match-jobs-actions {
    padding: 16px 24px; border-top: 1px solid #f0f0f0;
    display: flex; justify-content: center;
}
.btn-view-all-jobs {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px;
    background: linear-gradient(135deg, #2E3B8E, #4a5bc7); color: #fff; font-size: 14px;
    font-weight: 700; border: none; border-radius: 10px; cursor: pointer; font-family: inherit;
    transition: all 0.2s; box-shadow: 0 4px 14px rgba(46,59,142,0.35);
}
.btn-view-all-jobs:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(46,59,142,0.45); }

/* ---- Reload match button ---- */
.btn-reload-match {
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-reload-match:hover:not(:disabled) { background: rgba(255,255,255,0.25); }
.btn-reload-match:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- History toggle button ---- */
.history-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 0;
    margin-top: 6px;
    background: #f0f3ff;
    color: #2E3B8E;
    font-size: 13px;
    font-weight: 700;
    border: 1.5px solid #d6dcf5;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.history-toggle-btn:hover {
    background: #2E3B8E;
    color: #fff;
    border-color: #2E3B8E;
}

