/* ========================================
   勤迹 - 智能工时管理系统
   设计风格: Office商务风格 - 支持深色/浅色主题
   ======================================== */

/* ========== CSS变量定义 - 浅色主题（默认） ========== */
:root {
    /* 背景色 - 浅色商务风格 */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef2f7;
    
    /* 卡片效果 */
    --glass-bg: #ffffff;
    --glass-bg-hover: #fafbfc;
    --glass-border: #e1e5eb;
    --glass-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    
    /* 主题色 - 商务蓝色系 */
    --accent-blue: #0078d4;
    --accent-purple: #5c6bc0;
    --accent-pink: #e91e63;
    --accent-green: #107c10;
    --accent-orange: #ff8c00;
    --accent-red: #d13438;
    --accent-yellow: #f59e0b;
    
    /* 渐变色 - 更柔和的商务风格 */
    --gradient-blue: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    --gradient-purple: linear-gradient(135deg, #5c6bc0 0%, #7986cb 100%);
    --gradient-pink: linear-gradient(135deg, #e91e63 0%, #f06292 100%);
    --gradient-green: linear-gradient(135deg, #107c10 0%, #2e7d32 100%);
    --gradient-orange: linear-gradient(135deg, #ff8c00 0%, #ffa726 100%);
    
    /* 文字颜色 */
    --text-primary: #323130;
    --text-secondary: #605e5c;
    --text-muted: #8a8886;
    
    /* 其他 */
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --transition: all 0.2s ease;
}

/* ========== 深色主题 ========== */
:root[data-theme="dark"] {
    /* 背景色 - 深色风格 */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    
    /* 卡片效果 */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    
    /* 主题色 - 保持不变但稍微调亮 */
    --accent-blue: #4facfe;
    --accent-purple: #a855f7;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-yellow: #fbbf24;
    
    /* 文字颜色 */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

/* ========== 基础样式重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========== 简洁背景 ========== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-primary);
}

.bg-gradient {
    display: none;
}

.bg-particles {
    display: none;
}

.particle {
    display: none;
}

/* ========== 卡片效果 ========== */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ========== 登录页面样式 ========== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    padding: 40px;
}

.login-card:hover {
    transform: none;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-blue);
}

.login-header .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 2px;
}

/* 表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 18px;
    transition: var(--transition);
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 50px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    border-color: var(--accent-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.input-wrapper input:focus + .input-focus-border,
.input-wrapper input:focus ~ .input-focus-border {
    transform: scaleX(1);
}

.input-wrapper:has(input:focus) .input-icon {
    color: var(--accent-blue);
}

.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 0 0 var(--border-radius-sm) var(--border-radius-sm);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--accent-blue);
}

/* 复选框样式 */
.form-options {
    display: flex;
    align-items: center;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: var(--transition);
}

.checkbox-wrapper input:checked + .checkmark {
    background: var(--gradient-blue);
    border-color: var(--accent-blue);
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--gradient-blue);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 错误提示 */
.error-message {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--border-radius-sm);
    color: var(--accent-red);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* 登录页底部 */
.login-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* ========== 看板页面样式 ========== */
.dashboard-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    margin: 16px;
    border-radius: var(--border-radius);
}

.navbar:hover {
    transform: none;
}

/* 导航栏左侧区域 */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
}

.navbar-brand i {
    font-size: 24px;
    color: var(--accent-blue);
}

/* 导航栏分隔线 */
.navbar-divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

/* 日期选择器 - 新设计 */
.date-selector {
    display: flex;
    align-items: center;
    gap: 4px;
}

.date-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.date-nav-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border);
    color: var(--accent-blue);
}

.date-nav-btn:active {
    transform: scale(0.95);
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-width: 120px;
    justify-content: center;
}

.date-display:hover {
    border-color: var(--accent-blue);
    background: #f0f7ff;
}

.date-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.date-icon {
    font-size: 14px;
    color: var(--accent-blue);
}

/* 隐藏的下拉选择器 */
.date-select-hidden {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* 日期选择器弹出面板 */
.date-picker-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.date-picker-popup.active {
    opacity: 1;
    visibility: visible;
}

.date-picker-year {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.date-picker-year span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.date-picker-months {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.date-picker-month {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.date-picker-month:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.date-picker-month.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.btn-refresh {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 4px;
}

.btn-refresh:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border);
    color: var(--accent-blue);
}

.btn-refresh:hover i {
    transform: rotate(180deg);
}

.btn-refresh i {
    transition: transform 0.3s ease;
}

.btn-refresh.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 导航栏右侧区域 */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.user-info i {
    font-size: 20px;
}

.btn-logout {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--accent-red);
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #fef2f2;
    border-color: var(--accent-red);
}

/* 主内容区 */
.dashboard-main {
    flex: 1;
    padding: 0 32px 32px;
    position: relative;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    font-size: 48px;
    color: var(--accent-blue);
    margin-bottom: 16px;
}

.loading-spinner p {
    color: var(--text-secondary);
}

/* 统计卡片区域 */
.stats-section {
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.today-card::before {
    background: var(--gradient-orange);
}

.week-card::before {
    background: var(--gradient-purple);
}

.month-card::before {
    background: var(--gradient-green);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.today-card .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-orange);
}

.week-card .stat-icon {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

.month-card .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
}

.stat-value span:first-child {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value small {
    font-size: 14px;
    color: var(--text-muted);
}

.stat-detail {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-detail .divider {
    margin: 0 8px;
    opacity: 0.5;
}

.stat-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.stat-badge.working {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.stat-badge.rest {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

.stat-trend {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.stat-trend.up {
    color: var(--accent-green);
}

.stat-trend.down {
    color: var(--accent-red);
}

.stat-progress {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    width: 80px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-green);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* 图表区域 */
.charts-section {
    margin-bottom: 32px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    padding: 24px;
}

.chart-card:hover {
    transform: none;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header h3 i {
    color: var(--accent-blue);
}

.chart-legend {
    display: flex;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.workday {
    background: var(--accent-blue);
}

.legend-color.weekend {
    background: var(--accent-purple);
}

.chart-container {
    position: relative;
    height: 280px;
}

/* 记录表格区域 */
.records-section {
    margin-bottom: 32px;
}

.records-card {
    padding: 24px;
}

.records-card:hover {
    transform: none;
}

.records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.records-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.records-header h3 i {
    color: var(--accent-blue);
}

.filter-select {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--accent-blue);
}

.filter-select option {
    background: var(--bg-secondary);
}

.records-table-wrapper {
    overflow-x: auto;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
}

.records-table th,
.records-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.records-table th {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.records-table tbody tr {
    transition: var(--transition);
}

.records-table tbody tr:hover {
    background: #f8fafc;
}

.records-table td {
    font-size: 14px;
}

.records-table .overtime-value {
    color: var(--accent-green);
    font-weight: 600;
}

.records-table .overtime-value.zero {
    color: var(--text-muted);
    font-weight: normal;
}

.records-table .shift-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.records-table .shift-badge.workday {
    background: rgba(79, 172, 254, 0.15);
    color: var(--accent-blue);
}

.records-table .shift-badge.weekend {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

.records-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.records-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 底部 */
.dashboard-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ========== 设置按钮 ========== */
.btn-settings {
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--accent-purple);
    cursor: pointer;
    transition: var(--transition);
}

.btn-settings:hover {
    background: #f5f3ff;
    border-color: var(--accent-purple);
}

/* ========== 弹窗样式 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    width: 90%;
    max-width: 480px;
    padding: 0;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content:hover {
    transform: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--accent-purple);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent-red);
}

.modal-body {
    padding: 24px;
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.setting-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-input input {
    flex: 1;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

.setting-input input:focus {
    border-color: var(--accent-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.setting-unit {
    color: var(--text-secondary);
    font-size: 14px;
}

.setting-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
}

.btn-cancel {
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: #f5f5f5;
    color: var(--text-primary);
}

.btn-save {
    padding: 10px 20px;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-save:hover {
    background: #106ebe;
    box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

/* ========== 打卡记录样式 ========== */
.punch-records {
    display: grid;
    grid-template-columns: repeat(6, auto);
    gap: 4px;
    max-width: 200px;
}

.punch-time {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 4px;
    font-size: 11px;
    color: var(--accent-blue);
    font-family: 'Consolas', 'Monaco', monospace;
    white-space: nowrap;
}

.punch-time:nth-child(odd) {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .navbar {
        margin: 8px;
        padding: 12px 16px;
    }
    
    .navbar-brand span {
        display: none;
    }
    
    .dashboard-main {
        padding: 0 16px 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value span:first-child {
        font-size: 28px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .records-table th,
    .records-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========== 选中文本样式 ========== */
::selection {
    background: rgba(0, 120, 212, 0.2);
    color: var(--text-primary);
}

/* ========== 深色主题特定样式 ========== */
:root[data-theme="dark"] body {
    background: var(--bg-primary);
}

:root[data-theme="dark"] .bg-animation {
    background: var(--bg-primary);
}

:root[data-theme="dark"] .glass-card {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

:root[data-theme="dark"] .input-wrapper input {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

:root[data-theme="dark"] .input-wrapper input:focus {
    background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .records-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .date-select,
:root[data-theme="dark"] .filter-select {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

:root[data-theme="dark"] .date-select:hover,
:root[data-theme="dark"] .date-select:focus,
:root[data-theme="dark"] .filter-select:hover,
:root[data-theme="dark"] .filter-select:focus {
    background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .btn-refresh,
:root[data-theme="dark"] .btn-logout,
:root[data-theme="dark"] .btn-settings {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .btn-refresh:hover {
    background: rgba(79, 172, 254, 0.15);
}

:root[data-theme="dark"] .btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
}

:root[data-theme="dark"] .btn-settings:hover {
    background: rgba(168, 85, 247, 0.15);
}

:root[data-theme="dark"] .loading-overlay {
    background: rgba(15, 15, 35, 0.9);
}

:root[data-theme="dark"] .progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .setting-input input {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .setting-input input:focus {
    background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .btn-cancel {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

:root[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========== 异常提醒横幅 ========== */
.anomaly-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 0 16px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: var(--border-radius);
    color: #92400e;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anomaly-icon {
    font-size: 20px;
    color: #f59e0b;
}

.anomaly-text {
    flex: 1;
    font-size: 14px;
}

.anomaly-count {
    font-weight: 700;
    color: #dc2626;
}

.anomaly-action {
    padding: 6px 16px;
    background: #f59e0b;
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.anomaly-action:hover {
    background: #d97706;
}

.anomaly-close {
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: var(--transition);
}

.anomaly-close:hover {
    opacity: 1;
}

/* 深色主题下的异常横幅 */
:root[data-theme="dark"] .anomaly-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}

:root[data-theme="dark"] .anomaly-icon {
    color: #fbbf24;
}

:root[data-theme="dark"] .anomaly-count {
    color: #f87171;
}

:root[data-theme="dark"] .anomaly-close {
    color: #fbbf24;
}

/* 表格行异常高亮 */
.records-table tbody tr.anomaly-row {
    background: rgba(239, 68, 68, 0.08);
}

.records-table tbody tr.anomaly-row:hover {
    background: rgba(239, 68, 68, 0.12);
}

:root[data-theme="dark"] .records-table tbody tr.anomaly-row {
    background: rgba(239, 68, 68, 0.15);
}

:root[data-theme="dark"] .records-table tbody tr.anomaly-row:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* 异常标签 */
.anomaly-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 4px;
    font-size: 11px;
    color: #dc2626;
    margin-left: 8px;
}

.anomaly-tag i {
    font-size: 10px;
}

:root[data-theme="dark"] .anomaly-tag {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

/* ========== 用户下拉菜单 ========== */
.user-dropdown {
    position: relative;
}

.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.user-dropdown-trigger:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-blue);
}

.user-dropdown-trigger i:first-child {
    font-size: 20px;
    color: var(--accent-blue);
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.user-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--glass-bg-hover);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.dropdown-item span {
    flex: 1;
    font-size: 14px;
}

.dropdown-item.danger {
    color: var(--accent-red);
}

.dropdown-item.danger i {
    color: var(--accent-red);
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}

/* 深色主题下的下拉菜单 */
:root[data-theme="dark"] .user-dropdown-menu {
    background: var(--bg-secondary);
    border-color: var(--glass-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .user-dropdown-trigger {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .user-dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 主题切换开关 */
.theme-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.theme-switch input {
    display: none;
}

.theme-switch label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.theme-switch label::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-switch input:checked + label {
    background: var(--accent-blue);
}

.theme-switch input:checked + label::after {
    left: 22px;
}

/* 主题切换动画 */
body,
.glass-card,
.navbar,
.stat-card,
.chart-card,
.records-card,
.modal-content {
    transition: background-color 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease,
                box-shadow 0.3s ease;
}

/* 异常行高亮动画 */
@keyframes highlightPulse {
    0%, 100% {
        background: rgba(239, 68, 68, 0.08);
    }
    50% {
        background: rgba(239, 68, 68, 0.2);
    }
}

@keyframes highlightPulseDark {
    0%, 100% {
        background: rgba(239, 68, 68, 0.15);
    }
    50% {
        background: rgba(239, 68, 68, 0.3);
    }
}

:root[data-theme="dark"] .records-table tbody tr.anomaly-row {
    animation-name: highlightPulseDark;
}

/* 文本辅助样式 */
.text-muted {
    color: var(--text-muted);
}

/* ========== AI 助手卡片样式 ========== */
.ai-card {
    grid-column: span 1;
}

.ai-card::before {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.ai-card .stat-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.ai-content {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    min-height: 60px;
}

.ai-loading {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-response {
    color: var(--text-primary);
}

.ai-error {
    color: var(--accent-red);
}

.ai-cache-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.ai-refresh {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    padding: 6px 10px;
    cursor: pointer;
    transition: var(--transition);
}

.ai-refresh:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.ai-refresh.loading i {
    animation: spin 1s linear infinite;
}

:root[data-theme="dark"] .ai-card .stat-icon {
    background: rgba(99, 102, 241, 0.25);
    color: #818cf8;
}

/* ========== 深色主题下的日期选择器 ========== */
:root[data-theme="dark"] .date-display {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .date-display:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
}

:root[data-theme="dark"] .date-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .date-picker-popup {
    background: var(--bg-secondary);
}

:root[data-theme="dark"] .date-picker-month:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== 移动端导航栏布局修复 ========== */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .navbar-left {
        flex: 1;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .navbar-divider {
        display: none;
    }
    
    .date-selector {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .ai-card {
        grid-column: span 1;
    }
    
    .ai-content {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .date-select {
        min-width: 60px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .btn-refresh {
        padding: 6px 10px;
    }
}

/* ========== 错误提示Toast样式 ========== */
.error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.error-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.error-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--accent-red);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 400px;
}

.error-toast-content i:first-child {
    color: var(--accent-red);
    font-size: 20px;
}

.error-toast-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
}

.error-toast-retry {
    padding: 6px 12px;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.error-toast-retry:hover {
    background: #106ebe;
}

.error-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.error-toast-close:hover {
    color: var(--accent-red);
}

:root[data-theme="dark"] .error-toast-content {
    background: var(--bg-secondary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

@media (max-width: 480px) {
    .error-toast {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .error-toast-content {
        max-width: none;
    }
}

/* ========== 个人信息弹窗样式 ========== */
.profile-modal {
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
}

.profile-modal .modal-body {
    padding: 0;
    max-height: calc(90vh - 70px);
    overflow-y: auto;
}

/* 加载状态 */
.profile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.profile-loading i {
    font-size: 36px;
    color: var(--accent-blue);
    margin-bottom: 16px;
}

/* 错误状态 */
.profile-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.profile-error i {
    font-size: 48px;
    color: var(--accent-red);
    margin-bottom: 16px;
}

.profile-error p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.btn-retry {
    padding: 10px 24px;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--border-radius-sm);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-retry:hover {
    background: #106ebe;
}

/* 个人信息头部 */
.profile-header-section {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #106ebe 100%);
    color: white;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar i {
    font-size: 48px;
    color: white;
}

.profile-basic {
    flex: 1;
}

.profile-basic h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-title {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.profile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.profile-badge.secondary {
    background: rgba(16, 185, 129, 0.8);
}

/* 信息分组 */
.profile-sections {
    padding: 24px;
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.profile-section h4 i {
    color: var(--accent-blue);
    font-size: 14px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-item label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.profile-item span {
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}

/* 深色主题适配 */
:root[data-theme="dark"] .profile-header-section {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

:root[data-theme="dark"] .profile-badge.secondary {
    background: rgba(16, 185, 129, 0.9);
}

/* 响应式设计 */
@media (max-width: 600px) {
    .profile-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .profile-header-section {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }
    
    .profile-basic h2 {
        font-size: 20px;
    }
    
    .profile-badges {
        justify-content: center;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-sections {
        padding: 16px;
    }
}

/* ========== 薪资查询弹窗样式 ========== */
.salary-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
}

.salary-modal .modal-header h3 i {
    color: var(--accent-green);
}

.salary-modal .modal-body {
    padding: 0;
    max-height: calc(90vh - 70px);
    overflow-y: auto;
}

/* 月份选择器 */
.salary-month-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--glass-border);
}

.salary-nav-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.salary-nav-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.salary-month-select {
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    min-width: 140px;
    text-align: center;
}

.salary-month-select:hover,
.salary-month-select:focus {
    border-color: var(--accent-green);
}

.salary-month-select option {
    background: var(--bg-secondary);
}

/* 加载状态 */
.salary-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.salary-loading i {
    font-size: 36px;
    color: var(--accent-green);
    margin-bottom: 16px;
}

/* 错误状态 */
.salary-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.salary-error i {
    font-size: 48px;
    color: var(--accent-red);
    margin-bottom: 16px;
}

.salary-error p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* 无数据状态 */
.salary-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.salary-empty i {
    font-size: 48px;
    opacity: 0.5;
    margin-bottom: 16px;
}

/* 薪资总览 */
.salary-summary {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #2e7d32 100%);
}

.salary-summary-item {
    flex: 1;
    text-align: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
}

.salary-summary-item .salary-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.salary-summary-item .salary-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.salary-summary-item.actual .salary-value {
    color: #fef08a;
}

/* 薪资明细 */
.salary-sections {
    padding: 24px;
}

.salary-section {
    margin-bottom: 24px;
}

.salary-section:last-child {
    margin-bottom: 0;
}

.salary-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.salary-section h4 i {
    font-size: 14px;
}

.salary-section.income h4 {
    color: var(--accent-green);
}

.salary-section.income h4 i {
    color: var(--accent-green);
}

.salary-section.deduction h4 {
    color: var(--accent-red);
}

.salary-section.deduction h4 i {
    color: var(--accent-red);
}

.salary-section.info h4 i {
    color: var(--accent-blue);
}

.salary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.salary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.salary-item label {
    font-size: 13px;
    color: var(--text-secondary);
}

.salary-item span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.salary-section.income .salary-item span {
    color: var(--accent-green);
}

.salary-section.deduction .salary-item span {
    color: var(--accent-red);
}

/* 更新信息 */
.salary-update-info {
    display: flex;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--glass-border);
    font-size: 12px;
    color: var(--text-muted);
}

/* 深色主题适配 */
:root[data-theme="dark"] .salary-month-selector {
    background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .salary-month-select {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .salary-summary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

:root[data-theme="dark"] .salary-item {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .salary-update-info {
    background: rgba(255, 255, 255, 0.03);
}

/* 响应式设计 */
@media (max-width: 600px) {
    .salary-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .salary-summary {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .salary-summary-item .salary-value {
        font-size: 24px;
    }
    
    .salary-grid {
        grid-template-columns: 1fr;
    }
    
    .salary-sections {
        padding: 16px;
    }
    
    .salary-update-info {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

/* ========== 假期余额卡片样式 ========== */
.holiday-card {
    cursor: default;
    padding-right: 60px;
}

.holiday-card::before {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.holiday-card .stat-icon {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.holiday-card .stat-content {
    width: 100%;
}

.holiday-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.holiday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.holiday-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.holiday-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-blue);
}

.holiday-detail-btn {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}

.holiday-detail-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

/* 深色主题适配 */
:root[data-theme="dark"] .holiday-card .stat-icon {
    background: rgba(6, 182, 212, 0.25);
    color: #22d3ee;
}

:root[data-theme="dark"] .holiday-item {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .holiday-value {
    color: #22d3ee;
}

/* ========== 假期详情弹窗样式 ========== */
.holiday-modal {
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
}

.holiday-modal .modal-header h3 i {
    color: #06b6d4;
}

.holiday-modal .modal-body {
    padding: 0;
    max-height: calc(90vh - 70px);
    overflow-y: auto;
}

/* 加载状态 */
.holiday-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.holiday-loading i {
    font-size: 36px;
    color: #06b6d4;
    margin-bottom: 16px;
}

/* 错误状态 */
.holiday-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.holiday-error i {
    font-size: 48px;
    color: var(--accent-red);
    margin-bottom: 16px;
}

.holiday-error p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* 假期总览 */
.holiday-overview {
    padding: 24px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.holiday-overview-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
}

.holiday-overview-item i {
    font-size: 32px;
    color: white;
}

.holiday-overview-info {
    flex: 1;
}

.holiday-overview-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

.holiday-overview-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

/* 假期明细列表 */
.holiday-detail-list {
    padding: 24px;
}

.holiday-detail-item {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.holiday-detail-item:last-child {
    margin-bottom: 0;
}

.holiday-detail-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.holiday-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.holiday-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.holiday-detail-icon.annual {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.holiday-detail-icon.compensatory {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.holiday-detail-icon.deferred {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.holiday-detail-icon.parental {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.holiday-detail-icon.welfare {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.holiday-detail-title {
    flex: 1;
}

.holiday-detail-title h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.holiday-detail-unit {
    font-size: 12px;
    color: var(--text-muted);
}

.holiday-detail-rest {
    text-align: right;
}

.holiday-rest-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-blue);
}

/* 假期进度条 */
.holiday-detail-progress {
    margin-top: 8px;
}

.holiday-progress-bar {
    height: 8px;
    background: var(--glass-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.holiday-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 4px;
    transition: width 0.5s ease, background 0.3s ease;
}

.holiday-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* 提示信息 */
.holiday-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--glass-border);
    font-size: 12px;
    color: var(--text-muted);
}

.holiday-tips i {
    color: var(--accent-blue);
}

/* 深色主题适配 */
:root[data-theme="dark"] .holiday-overview {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

:root[data-theme="dark"] .holiday-detail-item {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .holiday-detail-item:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:root[data-theme="dark"] .holiday-progress-bar {
    background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .holiday-tips {
    background: rgba(255, 255, 255, 0.03);
}

:root[data-theme="dark"] .holiday-rest-value {
    color: #22d3ee;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .holiday-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .holiday-summary {
        grid-template-columns: 1fr;
    }
    
    .holiday-overview-value {
        font-size: 24px;
    }
    
    .holiday-detail-list {
        padding: 16px;
    }
    
    .holiday-detail-item {
        padding: 12px;
    }
    
    .holiday-detail-header {
        flex-wrap: wrap;
    }
    
    .holiday-detail-rest {
        width: 100%;
        text-align: left;
        margin-top: 8px;
    }
}
