/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content > div {
    flex: 1;
    min-width: 200px;
}

.add-record-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.add-record-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.add-record-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 主内容区 */
main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 统计概览 */
.overview {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.overview h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #3498db;
}

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

.stat-card h3 {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: bold;
}

/* 超时提醒区域 */
.overdue-section {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.overdue-section h2 {
    color: #e74c3c;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.overdue-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.overdue-category h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* 表格样式 */
.overdue-table, .stats-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.overdue-table th, .stats-table th {
    background-color: #3498db;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.overdue-table td, .stats-table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.overdue-table tr:hover, .stats-table tr:hover {
    background-color: #f8f9fa;
}

.overdue-table tr:last-child td, .stats-table tr:last-child td {
    border-bottom: none;
}

/* 统计部分 */
.stats-section {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stats-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* 标签页样式 */
.stats-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    color: #7f8c8d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover {
    color: #3498db;
}

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

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .overdue-container {
        grid-template-columns: 1fr;
    }
    
    .stats-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .overdue-table, .stats-table {
        font-size: 0.9rem;
    }
    
    .overdue-table th, .overdue-table td,
    .stats-table th, .stats-table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

/* 空状态样式 */
.empty-state {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* 强调样式 */
.highlight {
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* 超时天数颜色梯队 */
.overdue-green {
    background-color: #d4edda;
    color: #155724;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.overdue-yellow {
    background-color: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.overdue-red {
    background-color: #f8d7da;
    color: #721c24;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

/* 加载状态 */
.loading {
    color: #3498db;
    font-style: italic;
}