/* CSS Document */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 头部 */
header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: white;
    padding: 24px 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 24px;
}

header .stats strong {
    font-size: 28px;
    color: #ffd700;
}

/* 筛选栏 */
.filter-bar {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filter-bar form {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-group select,
.filter-group input {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.filter-group input {
    min-width: 280px;
}

.filter-group button,
.btn-reset {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-group button {
    background: #1a73e8;
    color: white;
}

.filter-group button:hover {
    background: #1557b0;
}

.btn-reset {
    background: #f0f0f0;
    color: #555;
    text-decoration: none;
}

.btn-reset:hover {
    background: #e0e0e0;
}

/* 公司组（相同电话分组） */
.company-group {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.company-header {
    background: #1a1a2e;
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.company-header:hover {
    background: #2a2a4e;
}

/* 客户卡片 */
.customer-card {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 20px;
    transition: background 0.15s;
}

.customer-card:hover {
    background: #f8f9fa;
}

.customer-card:last-child {
    border-bottom: none;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.card-header h3 {
    font-size: 17px;
    color: #1a1a2e;
}

.badge {
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.quality-a {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge.quality-b {
    background: #e3f2fd;
    color: #1565c0;
}

.badge.quality-c {
    background: #fff3e0;
    color: #e65100;
}

.badge.quality-d {
    background: #fce4ec;
    color: #c62828;
}

.badge.quality-e {
    background: #f3e5f5;
    color: #6a1b9a;
}

.badge.quality-f {
    background: #efebe9;
    color: #4e342e;
}

.badge.score {
    background: #fff8e1;
    color: #f57f17;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 6px 24px;
}

.info-item {
    padding: 4px 0;
    font-size: 14px;
    display: flex;
}

.info-item .label {
    color: #777;
    min-width: 80px;
    flex-shrink: 0;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item a {
    color: #1a73e8;
    text-decoration: none;
    word-break: break-all;
}

.info-item a:hover {
    text-decoration: underline;
}

/* 空状态 */
.empty-state {
    background: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: 12px;
    color: #999;
    font-size: 18px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pagination a {
    padding: 8px 20px;
    background: #1a73e8;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}

.pagination a:hover {
    background: #1557b0;
}

.pagination .page-info {
    color: #555;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .filter-bar form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    .filter-group input {
        min-width: auto;
        flex: 1;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
