/* =====================================================================
   匹配中心样式 kpi-match.css
   【修改记录】2026-09-17 新增需求5：匹配中心独立列表页样式
     - 基于 test_match.html 的设计版本 D-2（列表行+大圆环融合版）
     - 结构：项目卡片 → 满足横幅(可选) + 项目头部(封面/标题/圆环) + 岗位行列表
     - 岗位行 7 列：岗位名 | 匹配X人 | 已报名Y人 | 进度条 | N人最低 | 我状态 | 报名按钮
     - 三色状态：ok(绿)/warn(橙)/lack(红)，基于匹配人数 vs 最低需求
   ===================================================================== */

/* 页面背景 */
body.match-page {
    margin: 0;
    background: linear-gradient(180deg, #fafcfb 0%, #eef4ec 100%);
    color: #17372a;
    min-height: 100vh;
}

.match-main {
    padding: 32px 0 60px;
}

/* 页面标题 */
.page-head {
    padding: 0 0 14px;
}
.page-head h1 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #17372a;
}
.page-head .sub {
    font-size: 12px;
    color: #7a8a7e;
}

/* 图例说明 */
.legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #7a8a7e;
    padding: 8px 14px;
    background: #fff;
    border: 1px dashed #cdd8cd;
    border-radius: 10px;
    margin-bottom: 22px;
}
.legend .swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: -2px;
}
.legend .swatch.ok   { background: linear-gradient(90deg, #5fb273, #2d8a59); }
.legend .swatch.warn { background: linear-gradient(90deg, #ffb74d, #c79a18); }
.legend .swatch.lack { background: linear-gradient(90deg, #e57373, #c62828); }

/* 项目卡片 */
.project-card {
    background: #fff;
    border: 1px solid #e3ece4;
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(31, 71, 43, .06);
    padding: 0 20px 14px;
    margin-bottom: 22px;
    overflow: hidden;
}

/* 满足条件横幅 - 贴卡片顶部 */
.project-banner {
    background: linear-gradient(90deg, #1a6a3f, #2d8a59);
    color: #fff;
    border-radius: 0 0 8px 8px;
    margin: 0 -20px 14px;
    padding: 7px 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.project-banner .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.project-banner .dot::after {
    content: ""; width: 4px; height: 6px;
    border-right: 2px solid #1a6a3f;
    border-bottom: 2px solid #1a6a3f;
    transform: rotate(45deg) translate(-1px, -1px);
}

/* 项目头部：封面 + 标题信息 + 大圆环 */
.project-head {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 4px 0 14px;
}
.project-cover {
    width: 100px; height: 62px; border-radius: 8px; overflow: hidden;
    background: linear-gradient(135deg, #7ec38e, #4a9962);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 700;
}
.project-cover img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.project-info h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    display: flex; align-items: center; gap: 10px;
    color: #17372a;
}
.project-info .badge-status {
    display: inline-block;
    padding: 2px 10px;
    background: #fff7e0;
    color: #c79a18;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.project-info .desc {
    margin: 0;
    font-size: 12px;
    color: #68796d;
}

/* 项目大圆环 */
.project-ring {
    width: 80px; height: 80px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.project-ring svg { width: 80px; height: 80px; }
.project-ring .ring-text {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1.1;
}
.project-ring .ring-text b { display: block; font-size: 19px; font-weight: 700; }
.project-ring .ring-text span { font-size: 9px; color: #7a8a7e; }
.project-ring.ok b   { color: #2d8a59; }
.project-ring.warn b { color: #e07a1c; }
.project-ring.lack b { color: #c62828; }

/* 岗位列表 */
.work-list { display: flex; flex-direction: column; gap: 6px; }

/* 岗位行 - 7 列网格 */
.work-row {
    display: grid;
    grid-template-columns: 88px 78px 78px 1fr 78px 90px 116px;
    gap: 12px;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid #e3ece4;
    border-radius: 6px;
    background: #f8fbf8;
    font-size: 12px;
}
.work-row.is-warn { background: #fdf5e8; border-color: #f0d9a8; }
.work-row.is-lack { background: #fdecec; border-color: #f0c5c5; }

.work-name { font-weight: 700; color: #17372a; }
.work-match { color: #7a8a7e; }
.work-match.warn { color: #9a7518; }
.work-match.lack { color: #9a3a3a; }

/* 已报名人数 */
.work-signed { color: #17372a; font-weight: 600; }
.work-signed.zero { color: #9a3a3a; }

/* 进度条（已报名/最低需求） */
.work-progress { display: flex; align-items: center; gap: 8px; }
.work-progress .bar {
    flex: 1;
    height: 6px;
    background: #e3ece4;
    border-radius: 999px;
    overflow: hidden;
}
.work-progress .fill {
    height: 100%;
    background: linear-gradient(90deg, #5fb273, #2d8a59);
    border-radius: 999px;
}
.work-progress .fill.warn { background: linear-gradient(90deg, #ffb74d, #c79a18); }
.work-progress .fill.lack { background: linear-gradient(90deg, #e57373, #c62828); }

.work-need { font-weight: 700; }
.work-need.ok   { color: #2d8a59; }
.work-need.warn { color: #9a7518; }
.work-need.lack { color: #9a3a3a; }

/* 我的状态胶囊 */
.me-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}
.me-badge.joined {
    background: #e6f4ea; color: #2d8a59; border: 1px solid #9ad3a8;
}
.me-badge.joined::before { content: "✓ "; }
.me-badge.not-joined {
    background: #f1f3f1; color: #7a8a7e; border: 1px solid #cdd8cd;
}

/* 报名按钮 */
.btn-apply {
    display: inline-block;
    padding: 5px 14px;
    background: linear-gradient(180deg, #ff9d4d, #e07a1c);
    color: #fff !important;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 2px 6px rgba(224, 122, 28, .35);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(224, 122, 28, .45);
}

/* 已参与岗位最后一格占位 */
.joined-none {
    text-align: center;
    color: #cdd8cd;
    font-size: 14px;
}

/* 空状态提示 */
.empty-hint {
    text-align: center;
    color: #9ab59f;
    padding: 40px 20px;
    font-size: 13px;
}

/* ============ 移动端适配（仅微调，不改变 PC 布局）============ */
@media (max-width: 800px) {
    .match-main { padding: 20px 12px 40px; }
    .project-head {
        grid-template-columns: 72px 1fr;
        gap: 10px;
    }
    .project-ring { display: none; }
    .project-cover { width: 72px; height: 48px; }

    /* 移动端岗位行改为卡片堆叠（7 列在窄屏无法展示） */
    .work-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px 10px;
    }
    .work-row .work-name { grid-column: 1 / -1; font-size: 14px; }
    .work-row .work-progress { grid-column: 1 / -1; }
    .work-row .btn-apply,
    .work-row .me-badge,
    .work-row .joined-none {
        grid-column: 1 / -1;
        width: 100%;
    }
}
