/* ===== CRM Lite 自定义样式 ===== */

:root {
    --primary-color: #0d6efd;
    --sidebar-width: 220px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width) !important;
    min-height: calc(100vh - 56px);
    border-right: 1px solid #e9ecef;
    position: sticky;
    top: 56px;
}

.sidebar-link {
    color: #495057;
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

.sidebar-link.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    font-weight: 500;
    border-right: 3px solid var(--primary-color);
}

/* ===== 主内容区 ===== */
.main-content {
    min-height: calc(100vh - 56px);
    width: 100%;
}

/* ===== 统计卡片 ===== */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ===== 登录页 ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 35px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.login-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

/* ===== 时间线（跟进记录） ===== */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background-color: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -20px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-content {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 0.9rem;
}

/* ===== 表格优化 ===== */
.table > :not(caption) > * > * {
    padding: 0.75rem 0.5rem;
}

.table thead th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

/* ===== 响应式 ===== */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        z-index: 1045;
        top: 0;
        min-height: 100vh;
    }
}

@media (max-width: 575.98px) {
    .login-card {
        padding: 30px 20px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
