/* =============================================
   CV & JD Matchmaker — Stylesheet
   ============================================= */

.matchmaker-wrapper {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: 'Segoe UI', sans-serif;
}

.matchmaker-header h2 {
    font-weight: 700;
    color: #1a2a4a;
}

/* Two-panel row */
.panels-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .panels-row { grid-template-columns: 1fr; }
}

/* Individual panel */
.panel {
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a2a4a;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* Tab toggle (Paste / Upload) */
.tab-toggle {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    border: 1px solid #c9d4e0;
    background: #f4f7fb;
    color: #555;
    border-radius: 6px;
    padding: .3rem .9rem;
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s;
}

.tab-btn.active,
.tab-btn:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* JD textarea */
.jd-textarea {
    resize: vertical;
    font-size: .875rem;
    border-radius: 8px;
    border: 1px solid #d0d9e4;
    padding: .75rem;
    width: 100%;
}

/* Upload zones */
.upload-zone {
    border: 2px dashed #b0bec5;
    border-radius: 10px;
    padding: 2rem 1rem;
    text-align: center;
    color: #607d8b;
    background: #f9fbfc;
    transition: border-color .2s, background .2s;
    cursor: default;
}

.upload-zone.drag-over {
    border-color: #0d6efd;
    background: #e8f0fe;
}

.selected-file {
    margin-top: .5rem;
    font-size: .85rem;
    color: #198754;
    font-weight: 500;
}

/* CV file list */
.cv-file-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    max-height: 180px;
    overflow-y: auto;
}

.cv-file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .35rem .5rem;
    border-radius: 6px;
    font-size: .85rem;
    color: #333;
    background: #f0f4f8;
    margin-bottom: .35rem;
    gap: .5rem;
}

.file-size {
    color: #999;
    font-size: .78rem;
    white-space: nowrap;
}

/* Match button */
.match-btn-row {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1rem;
}

.btn-match {
    background: linear-gradient(135deg, #1a6dff, #0043c4);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: .75rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: .03em;
    box-shadow: 0 4px 18px rgba(13,110,253,.35);
    transition: transform .15s, box-shadow .15s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.btn-match:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(13,110,253,.45);
    background: linear-gradient(135deg, #3a80ff, #1a56d4);
}

.btn-match:disabled {
    opacity: .75;
    cursor: not-allowed;
}

/* Results */
.results-section {
    margin-top: 2.5rem;
}

.results-title {
    font-weight: 700;
    color: #1a2a4a;
    margin-bottom: 1.25rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.result-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    border-left: 5px solid #ccc;
}

.result-card.high  { border-left-color: #198754; }
.result-card.medium { border-left-color: #ffc107; }
.result-card.low   { border-left-color: #dc3545; }

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
    gap: .5rem;
}

.cv-name {
    font-size: .9rem;
    font-weight: 600;
    color: #1a2a4a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.score-badge {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.score-badge span { font-size: 1rem; font-weight: 600; }

.score-high   { color: #198754; }
.score-medium { color: #e0a800; }
.score-low    { color: #dc3545; }

/* Progress bar */
.score-bar-wrap {
    background: #e9ecef;
    border-radius: 50px;
    height: 8px;
    margin-bottom: .9rem;
    overflow: hidden;
}

.score-bar {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, #0d6efd, #198754);
    transition: width .6s ease;
}

.result-card.medium .score-bar { background: linear-gradient(90deg, #fd7e14, #ffc107); }
.result-card.low    .score-bar { background: linear-gradient(90deg, #dc3545, #fd7e14); }

.result-summary {
    font-size: .85rem;
    color: #555;
    margin-bottom: .75rem;
    line-height: 1.5;
}

.skills-row {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.skills-group strong {
    font-size: .8rem;
    display: block;
    margin-bottom: .3rem;
    color: #333;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.tag {
    font-size: .75rem;
    padding: .2rem .55rem;
    border-radius: 50px;
    font-weight: 500;
}

.tag-match   { background: #d1fae5; color: #065f46; }
.tag-missing { background: #fee2e2; color: #991b1b; }
