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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 220px;
    height: 100vh;
    background: linear-gradient(180deg, #1a2332 0%, #2c3e50 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h2 {
    font-size: 20px;
    color: #4fc3f7;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: block;
    padding: 12px 25px;
    color: #b0bec5;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-menu a:hover, .nav-menu a.active {
    background: rgba(79, 195, 247, 0.1);
    color: #4fc3f7;
    border-left-color: #4fc3f7;
}

.user-info {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.user-info p {
    margin-bottom: 5px;
    font-size: 14px;
}

.user-info .role {
    color: #4fc3f7;
    font-size: 12px;
}

.logout-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 20px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
}

/* 主内容区 */
.main-content {
    margin-left: 220px;
    padding: 30px;
    min-height: 100vh;
}

/* 提示框 */
.alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* 页面标题 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 24px;
    color: #2c3e50;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #7f8c8d;
    font-size: 14px;
}

.stat-card.urgent .stat-number { color: #e74c3c; }
.stat-card.warning .stat-number { color: #f39c12; }
.stat-card.success .stat-number { color: #27ae60; }

/* 表格 */
.data-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f8f9fa;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    font-size: 13px;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* 紧迫性标签 */
.urgency-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.urgency-紧急 { background: #fde8e8; color: #e74c3c; }
.urgency-高 { background: #fff3cd; color: #f39c12; }
.urgency-中 { background: #d1ecf1; color: #17a2b8; }
.urgency-普通 { background: #d4edda; color: #28a745; }
.urgency-低 { background: #e2e3e5; color: #6c757d; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #229954; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

/* 登录页 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 380px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.login-box .form-group input {
    padding: 12px;
}

.login-box .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-bar input, .search-bar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-bar input {
    flex: 1;
    min-width: 200px;
}

/* 详情页 */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
}

.detail-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-info-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.detail-info-item .label {
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 3px;
}

.detail-info-item .value {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
}

/* 标签页 */
.tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 25px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #7f8c8d;
    transition: all 0.3s;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

/* 跟进记录 */
.follow-up-item {
    padding: 15px;
    border-left: 3px solid #3498db;
    background: #f8f9fa;
    margin-bottom: 10px;
    border-radius: 0 4px 4px 0;
}

.follow-up-item .meta {
    color: #7f8c8d;
    font-size: 12px;
    margin-bottom: 5px;
}

.follow-up-item .content {
    color: #2c3e50;
    font-size: 14px;
}
