:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #e67e22;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
}

body {
    background-color: #f5f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    padding-top: 20px;
}

.header-container {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    border: none;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
}

.stats-card {
    text-align: center;
    padding: 20px 10px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.stats-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.stats-card .number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stats-card .label {
    font-size: 0.95rem;
    color: #6c757d;
}

.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.table thead {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
}

.table th {
    font-weight: 500;
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.admin-section {
    display: none;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin-top: 20px;
}

.btn-admin {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 500;
}

.btn-admin:hover {
    background: linear-gradient(135deg, #2980b9, var(--primary-color));
    color: white;
}

.form-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.department-tabs .nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 5px 5px 0 0;
    border: 1px solid #dee2e6;
    margin-right: 5px;
}

.department-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.highlight {
    background-color: #fffde7 !important;
}

.fine-warning {
    color: var(--danger-color);
    font-weight: bold;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 12px;
    color: #6c757d;
}

.search-box input {
    padding-left: 40px;
    border-radius: 30px;
}

footer {
    background: var(--secondary-color);
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    border-radius: 10px;
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    color: #6c757d;
}

.chart-container {
    height: 300px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.employee-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 10px;
    display: none;
    position: absolute;
    width: 100%;
    background: white;
    z-index: 10;
}

.employee-item {
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.employee-item:hover {
    background-color: #f0f8ff;
}

.employee-item:last-child {
    border-bottom: none;
}

.badge-primary {
    background-color: #3498db;
}

.badge-success {
    background-color: #27ae60;
}

.badge-warning {
    background-color: #e67e22;
}

.badge-info {
    background-color: #17a2b8;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    max-width: 350px;
}

.connection-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 8px 15px;
    border-radius: 20px;
    z-index: 100;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.connection-online {
    background-color: #d4edda;
    color: #155724;
}

.connection-offline {
    background-color: #f8d7da;
    color: #721c24;
}

.download-processing {
    position: relative;
}

.download-processing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    border-radius: 30px;
}

.download-processing .spinner-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

/* 添加下拉框搜索样式 */
select[size] {
    overflow-y: auto;
    height: auto;
}

/* 规则分页样式 */
#rules-pagination .page-item.active .page-link {
    background-color: #3498db;
    border-color: #3498db;
}

#rules-pagination .page-link {
    color: #3498db;
}

#rules-pagination .page-link:hover {
    color: #2c3e50;
}

/* 添加下拉列表的最大高度和滚动条 */
#rule-content-list {
    max-height: 300px;
    overflow-y: auto;
}

#record-content-list {
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.history-record {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.history-record:last-child {
    border-bottom: none;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.employee-info {
    font-size: 18px;
    font-weight: bold;
}

#lock-date-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: none;
}