:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --accent-color: #e74c3c;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #e0e0e0;
    --header-bg: #3498db;
    --table-header-bg: #3498db;
    --tag-inactive-bg: #e9ecef;
    --tag-inactive-text: #495057;
    --tag-inactive-border: #ced4da;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Microsoft YaHei', sans-serif;
}

.container {
    max-width: 1400px;
    height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.system-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    flex-shrink: 0;
}

.page-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    min-height: 0; /* 重要：允许子元素滚动 */
}

.card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    background: linear-gradient(to right, #f8f9fa, #edf2f7);
    border-bottom: 1px solid #e9ecef;
    border-radius: 5px 5px 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.card-header .collapse-btn {
    color: #495057;
    cursor: pointer;
    font-size: 16px;
}

.filter-box {
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.filter-box:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.filter-box .card-header {
    padding: 0.4rem 0.6rem;
    background: linear-gradient(to right, #f8f9fa, #edf2f7);
    border-bottom: 1px solid #e9ecef;
    border-radius: 5px 5px 0 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.filter-box .card-body {
    padding: 0.5rem;
    background-color: #fcfcfd;
}

.filter-box.collapsed {
    margin-bottom: 5px;
}

.filter-content {
    max-height: 300px;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
}

.filter-content.collapsed {
    max-height: 0;
    overflow: hidden;
    padding: 0;
}

/* 紧凑型筛选内容区域 */
.filter-box .filter-content {
    max-height: 200px;
}

.main-card {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    margin-bottom: 0;
}

.table-container-wrapper {
    flex-grow: 1;
    overflow: auto;
    max-height: calc(100vh - 220px);
    min-height: 200px;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

.table thead {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table thead th {
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    background-color: #f8f9fa;
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
}

.table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background: linear-gradient(to bottom, #007bff, #0069d9);
    border-color: #0062cc;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #0069d9, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

.btn-secondary {
    background: linear-gradient(to bottom, #6c757d, #5a6268);
    border-color: #545b62;
}

.btn-secondary:hover {
    background: linear-gradient(to bottom, #5a6268, #4e555b);
    transform: translateY(-1px);
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.form-control-sm, .form-select-sm {
    height: calc(1.4em + 0.4rem + 2px);
    padding: 0.1rem 0.3rem;
    font-size: 0.75rem;
    border-radius: 2px;
}

.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.15);
}

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-size: 24px;
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-link {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    margin: 1px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    text-align: center;
    font-weight: 500;
    min-width: 60px;
}

.tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.tag-badge.active.tag--1 {
    background: linear-gradient(to bottom, #9b59b6, #8e44ad);
    color: white;
    border-color: #8e44ad;
    box-shadow: 0 1px 3px rgba(142, 68, 173, 0.3);
}

.tag-badge.active.tag-1289 {
    background: linear-gradient(to bottom, #95a5a6, #7f8c8d);
    color: white;
    border-color: #7f8c8d;
    box-shadow: 0 1px 3px rgba(127, 140, 141, 0.3);
}

.tag-badge.active.tag-1290 {
    background: linear-gradient(to bottom, #e74c3c, #c0392b);
    color: white;
    border-color: #c0392b;
    box-shadow: 0 1px 3px rgba(192, 57, 43, 0.3);
}

.tag-badge.active.tag-1291 {
    background: linear-gradient(to bottom, #e74c3c, #c0392b);
    color: white;
    border-color: #c0392b;
    box-shadow: 0 1px 3px rgba(192, 57, 43, 0.3);
}

.tag-badge.active.tag-1292 {
    background: linear-gradient(to bottom, #f39c12, #d35400);
    color: white;
    border-color: #d35400;
    box-shadow: 0 1px 3px rgba(211, 84, 0, 0.3);
}

.tag-badge.active.tag-1293 {
    background: linear-gradient(to bottom, #3498db, #2980b9);
    color: white;
    border-color: #2980b9;
    box-shadow: 0 1px 3px rgba(41, 128, 185, 0.3);
}

.tag-badge.active.tag-1294 {
    background: linear-gradient(to bottom, #2980b9, #1f618d);
    color: white;
    border-color: #1f618d;
    box-shadow: 0 1px 3px rgba(31, 97, 141, 0.3);
}

.tag-badge.active.tag-1295 {
    background: linear-gradient(to bottom, #3498db, #2980b9);
    color: white;
    border-color: #2980b9;
    box-shadow: 0 1px 3px rgba(41, 128, 185, 0.3);
}

.tag-badge.active.tag-1296 {
    background: linear-gradient(to bottom, #f39c12, #d35400);
    color: white;
    border-color: #d35400;
    box-shadow: 0 1px 3px rgba(211, 84, 0, 0.3);
}

.tag-badge.active.tag-1297 {
    background: linear-gradient(to bottom, #2ecc71, #27ae60);
    color: white;
    border-color: #27ae60;
    box-shadow: 0 1px 3px rgba(39, 174, 96, 0.3);
}

.select2-container--bootstrap-5 .select2-selection {
    padding: 0.375rem 0.75rem;
    height: auto;
    min-height: 38px;
}

.tag-dropdown .select2-container {
    width: 100% !important;
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__option--selected {
    background-color: var(--primary-color);
    color: white;
}

.customer-tag {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 3px;
    color: white;
    font-size: 12px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.7rem;
    color: #495057;
}

.badge {
    font-weight: normal;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
}

.btn-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.table td, .table th {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
}

#tagContainer {
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.table-header-actions {
    display: flex;
    justify-content: flex-end;
    padding: 10px 15px;
}

/* 添加返回首页链接的样式 */
.back-link {
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--primary-dark);
    transform: translateX(-3px);
}

.back-link i {
    margin-right: 5px;
}

.pagination {
    margin-bottom: 0;
}

/* 未跟进天数下拉菜单宽度控制 */
#wgjDaysRange {
    width: 100%; /* 改为100%以适应父容器宽度 */
    min-width: 100%; /* 确保最小宽度也是100% */
    max-width: 100%; /* 限制最大宽度 */
    position: relative; /* 添加相对定位 */
    z-index: 10; /* 添加z-index确保下拉菜单在上层 */
}

/* 确保下拉菜单不会被截断 */
.col-md-1 .form-select {
    width: 100%;
    min-width: 100%;
}

/* 修复筛选条件折叠功能 */
.filter-box .collapse-btn {
    color: #495057; /* 修改颜色，原来是白色看不见 */
    cursor: pointer;
    font-size: 16px;
}

/* 确保折叠状态正确应用 */
.filter-content.collapsed {
    max-height: 0 !important;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
}

.filter-box.collapsed {
    margin-bottom: 5px;
}

/* 调整折叠按钮的样式 */
#filterCollapseBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#filterCollapseBtn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 表格内容居中显示 */
.table th, .table td {
    text-align: center;
    vertical-align: middle;
} 