/* ===== Engineer List Page ===== */

/* ── 面包屑 + 筛选 + 排序 统一卡片 ── */
.engineer .eng-filter-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 14px rgba(15,23,42,.07);
    padding: 16px 22px 14px;
    margin-bottom: 20px;
}

/* 面包屑 */
.engineer .eng-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 14px;
}
.engineer .eng-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color .15s;
}
.engineer .eng-breadcrumb a:hover { color: #1d4ed8; }
.engineer .eng-breadcrumb .sep { color: #d1d5db; }
.engineer .eng-breadcrumb .current { color: #374151; font-weight: 500; }

/* 分隔线 */
.engineer .eng-filter-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0 0 12px;
}

/* 筛选行 */
.engineer .eng-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px dashed #f1f5f9;
}
.engineer .eng-filter-row:last-child { border-bottom: none; padding-bottom: 0; }

.engineer .eng-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
    padding-top: 4px;
    min-width: 60px;
    letter-spacing: .5px;
}

.engineer .eng-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.engineer .eng-opt {
    padding: 3px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
    font-size: 12px;
    line-height: 22px;
    cursor: pointer;
    transition: all .15s;
}
.engineer .eng-opt:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #eff6ff;
}
.engineer .eng-opt.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

/* ===== Engineer Card ===== */
.engineer-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(15,23,42,.07);
    margin-bottom: 16px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.engineer-card:hover {
    box-shadow: 0 6px 24px rgba(15,23,42,.11);
    transform: translateY(-2px);
}

/* ── 卡片头部 ── */
.engineer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    gap: 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* 左侧：头像 + 文字 */
.engineer-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.head-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #e5e7eb;
    background: #f3f4f6;
}
.head-icon .head-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.engineer-meta { min-width: 0; }

.engineer-meta .eng-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.engineer-meta .eng-stats {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 3px;
}
.engineer-meta .eng-stats b { font-weight: 600; color: #1d4ed8; }
.engineer-meta .eng-jointime {
    font-size: 11px;
    color: #9ca3af;
}

/* 右侧：角标 + 按钮 */
.engineer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

.engineer-actions .eng-btn {
    height: 30px;
    line-height: 28px;
    padding: 0 16px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid #1d4ed8;
    background: #fff;
    color: #1d4ed8;
    white-space: nowrap;
}
.engineer-actions .eng-btn:hover { background: #eff6ff; }
.engineer-actions .eng-btn--follow.on {
    background: #1d4ed8;
    color: #fff;
}
.engineer-actions .eng-btn--follow.on:hover { background: #1e40af; border-color: #1e40af; }
.engineer-actions .eng-btn--msg {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}
.engineer-actions .eng-btn--msg:hover { background: #1e40af; border-color: #1e40af; }

/* ── 优质工程师角标 ── */
.quality-engineer-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #e53e3e, #f56565);
    color: #fff;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: help;
    position: relative;
    box-shadow: 0 2px 6px rgba(229,62,62,.3);
    flex-shrink: 0;
}
.quality-engineer-badge:hover { background: linear-gradient(135deg, #c53030, #e53e3e); }
.quality-engineer-badge .qe-icon { width: 13px; height: 13px; }

.quality-engineer-badge .qe-tooltip {
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s, visibility .2s;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 200px;
    padding: 14px 16px;
    background: #fff;
    color: #333;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,.15);
    z-index: 9999;
    font-size: 13px;
    line-height: 1.8;
    text-align: left;
    white-space: normal;
}
.quality-engineer-badge:hover .qe-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.quality-engineer-badge .qe-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 14px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #fff;
}
.qe-tooltip .qe-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #222;
}
.qe-upgrade-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: #1d4ed8;
    color: #fff;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
}

/* ── 作品网格 ── */
.eng-projects {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 12px 14px 14px;
    gap: 10px;
}

.eng-proj-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    transition: transform .2s, box-shadow .2s;
}
.eng-proj-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(15,23,42,.1);
}

.eng-proj-img {
    position: relative;
    width: 100%;
    padding-bottom: 68%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #e5e7eb;
}
.eng-proj-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.eng-proj-item:hover .eng-proj-img img { transform: scale(1.07); }

.eng-proj-name {
    padding: 5px 8px 7px;
    font-size: 11px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.eng-no-project {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px 0;
    color: #9ca3af;
    font-size: 13px;
}

/* ── Load more ── */
.load-more { text-align: center; padding: 20px 0 10px; }
.load-more .more { color: #9ca3af; font-size: 13px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .eng-projects { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .engineer-header { flex-wrap: wrap; gap: 10px; }
    .engineer-actions { width: 100%; justify-content: flex-end; }
    .eng-projects { grid-template-columns: repeat(2, 1fr); }
    .engineer .eng-filter-label { min-width: 52px; }
}
