:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #43aa8b;
    --light: #f8f9fa;
    --dark: #212529;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-light: #e9ecef;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gray-light);
    color: var(--dark);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    padding: 0.8rem 1rem;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-link i {
    margin-right: 6px;
}

/* 主要内容区域 */
.container {
    max-width: 1200px;
    padding: 2rem 1rem;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-header {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

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

/* 页脚样式 */
footer {
    background-color: var(--dark);
    color: var(--light);
    padding: 2rem 0;
    margin-top: 3rem;
}

footer small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 表格样式 */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

.table td, .table th {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid var(--gray-light);
}

/* 状态颜色 */
.status-present {
    color: var(--success);
    font-weight: 600;
}

.status-late {
    color: var(--warning);
    font-weight: 600;
}

.status-early {
    color: var(--info);
    font-weight: 600;
}

.status-both {
    color: #fd7e14;
    font-weight: 600;
}

.status-absent {
    color: var(--danger);
    font-weight: 600;
}

.status-vacation {
    color: var(--gray);
    font-weight: 600;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 5px solid rgba(67, 97, 238, 0.2);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* 按钮组样式 */
.btn-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-group button {
    margin: 0;
    visibility: visible !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.btn-group button i {
    margin-right: 5px;
}

/* 隐藏的文件输入 */
.btn-group input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 上传按钮特殊样式 */
.btn-upload {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-upload:hover {
    background-color: #218838;
    border-color: #1e7e34;
}