body {
    background-color: #f5f6f8;
    font-size: 14px;
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: 1px;
}

.card {
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
    border: 1px solid #e9eaee;
}

.stat-card .value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .label {
    color: #6b7280;
    font-size: .85rem;
}

.table thead th {
    white-space: nowrap;
    background: #fafbfc;
}

.table td {
    vertical-align: middle;
}

.cell-ellipsis {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline {
    list-style: none;
    padding-left: 0;
}

.timeline-item {
    position: relative;
    padding: 0 0 1rem 1.5rem;
    border-left: 2px solid #e5e7eb;
}

.timeline-item:last-child {
    border-left-color: transparent;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0d6efd;
}

.timeline-meta {
    color: #6b7280;
    font-size: .82rem;
}

.filter-bar .form-select,
.filter-bar .form-control {
    min-width: 130px;
}

/* ---- 客户列表：搜索筛选区固定，仅表格滚动 ---- */
body.page-fixed {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.page-fixed .navbar {
    flex: 0 0 auto;
}

body.page-fixed main.container-fluid {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.page-fixed main .alert {
    flex: 0 0 auto;
}

body.page-fixed footer {
    flex: 0 0 auto;
    padding: .25rem 0;
}

.list-top-zone {
    flex: 0 0 auto;
}

.list-table-zone {
    flex: 1 1 auto;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.list-table-zone .table-responsive {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.list-table-zone thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

.list-bottom-zone {
    flex: 0 0 auto;
}

/* 窄屏（导航栏折叠、筛选区变高）恢复常规滚动，避免挤压表格 */
@media (max-width: 991.98px) {
    body.page-fixed {
        height: auto;
        display: block;
        overflow: visible;
    }

    body.page-fixed main.container-fluid {
        display: block;
        overflow: visible;
    }

    .list-table-zone {
        display: block;
        overflow: visible;
    }

    .list-table-zone .table-responsive {
        height: auto;
        max-height: none;
        overflow-x: auto;
    }
}
