/**
 * 排假系统 - 响应式统一样式
 * 自动适配移动端和桌面端
 */

:root {
    /* 核心色板 */
    --primary: #10b981;
    --primary-light: #d1fae5;
    --primary-dark: #059669;
    
    /* 中性色 - 亮色模式 */
    --bg-main: #fafaf9;
    --bg-card: #ffffff;
    --bg-secondary: #f5f5f4;
    --bg-tertiary: #e7e5e4;
    --bg-sidebar: #1c1917;
    --bg-input: #ffffff;
    --bg-hover: rgba(0,0,0,0.05);
    
    /* 文字色 - 亮色模式 */
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-tertiary: #a8a29e;
    --text-inverse: #ffffff;
    --text-input: #1c1917;
    
    /* 功能色 */
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --success: #10b981;
    --success-light: #d1fae5;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* 边框与阴影 - 亮色模式 */
    --border: #e7e5e4;
    --border-input: #e7e5e4;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 移动端安全区域 */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --nav-height: 64px;
    --tab-bar-height: 56px;
    
    /* 桌面端布局 */
    --sidebar-width: 260px;
    --header-height: 64px;

    /* 兼容 style.css 旧变量映射 */
    --primary-color: var(--primary);
    --primary-dark-color: var(--primary-dark);
    --light-bg: var(--bg-main);
    --card-shadow: var(--shadow-sm);
    --card-shadow-hover: var(--shadow-md);
    --border-radius: var(--radius-sm);
    --border-radius-lg: var(--radius-md);
}

/* 深色模式变量覆盖 */
[data-theme="dark"] {
    /* 中性色 - 深色模式 */
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-secondary: #334155;
    --bg-tertiary: #475569;
    --bg-sidebar: #0f172a; /* 侧边栏在深色模式下也可以稍微变深或保持一致 */
    --bg-input: #1e293b;
    --bg-hover: rgba(255,255,255,0.05);
    
    /* 文字色 - 深色模式 */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff; /* 保持白色 */
    --text-input: #f1f5f9;
    
    /* 功能色微调 - 避免在深色背景上太刺眼 */
    --danger: #f87171;
    --danger-light: rgba(239, 68, 68, 0.2);
    --warning: #fbbf24;
    --warning-light: rgba(245, 158, 11, 0.2);
    --success: #34d399;
    --success-light: rgba(16, 185, 129, 0.2);
    --info: #60a5fa;
    --info-light: rgba(59, 130, 246, 0.2);

    /* 主色调微调 - 深色模式 */
    --primary-light: rgba(16, 185, 129, 0.15);
    --primary-dark: #34d399;

    /* 边框与阴影 - 深色模式 */
    --border: #334155;
    --border-input: #475569;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
    
    /* FullCalendar 特定覆盖 */
    --fc-page-bg-color: var(--bg-card);
    --fc-neutral-bg-color: var(--bg-secondary);
    --fc-list-event-hover-bg-color: var(--bg-secondary);
    --fc-today-bg-color: rgba(255, 255, 255, 0.05) !important;
    color-scheme: dark;
}

html {
    color-scheme: light;
}

[data-theme="light"] {
    color-scheme: light;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   通用组件样式
   ======================================== */

/* 卡片 */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent; /* 防止深色模式下边缘模糊 */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .card {
    border-color: var(--border);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.card-body {
    padding: 20px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-inverse);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-inverse);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* 徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: #b45309; }
[data-theme="dark"] .badge-warning { color: #fbbf24; }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-secondary { background: var(--bg-tertiary); color: var(--text-secondary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-purple { background: #ede9fe; color: #7c3aed; }
[data-theme="dark"] .badge-purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }

/* 头像 */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-secondary);
}

.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text-input);
    caret-color: var(--text-input);
    transition: border-color 0.2s, background-color 0.2s;
}

.form-input::placeholder,
.form-select::placeholder,
.form-control::placeholder {
    color: var(--text-tertiary);
    opacity: 1;
}

.form-input:focus,
.form-select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* 列表 */
.list-group {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.list-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    transition: background 0.2s;
    color: var(--text-primary);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--bg-hover);
}

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.list-item-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* 提示框 */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.alert i {
    font-size: 18px;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-text {
    font-size: 13px;
}

.alert-warning { background: var(--warning-light); }
.alert-warning i { color: var(--warning); }
.alert-warning .alert-title { color: #92400e; }
.alert-warning .alert-text { color: #b45309; }
[data-theme="dark"] .alert-warning .alert-title { color: #fbbf24; }
[data-theme="dark"] .alert-warning .alert-text { color: #fcd34d; }

.alert-danger { background: var(--danger-light); }
.alert-danger i { color: var(--danger); }
.alert-danger .alert-title { color: #991b1b; }
.alert-danger .alert-text { color: #b91c1c; }
[data-theme="dark"] .alert-danger .alert-title { color: #f87171; }
[data-theme="dark"] .alert-danger .alert-text { color: #fca5a5; }

.alert-info { background: var(--info-light); }
.alert-info i { color: var(--info); }

.alert-success { background: var(--success-light); }
.alert-success i { color: var(--success); }

/* 统计卡片 */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}
[data-theme="dark"] .stat-card {
    border-color: var(--border);
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card-icon.green { background: var(--success-light); color: var(--success); }
.stat-card-icon.blue { background: var(--info-light); color: var(--info); }
.stat-card-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-card-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-card-icon.purple { background: #f3e8ff; color: #9333ea; }
[data-theme="dark"] .stat-card-icon.purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }

.stat-card-info { flex: 1; }
.stat-card-label { font-size: 13px; color: var(--text-tertiary); }
.stat-card-value { font-size: 24px; font-weight: 700; margin-top: 4px; color: var(--text-primary); }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-tertiary); }
.font-bold { font-weight: 600; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-2 { margin-bottom: 8px; }
.p-4 { padding: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }


/* ========================================
   桌面端布局 (>= 992px)
   ======================================== */
@media (min-width: 992px) {
    /* 整体布局 */
    .app-layout {
        display: flex;
        min-height: 100vh;
    }

    /* 侧边栏 */
    .sidebar {
        width: var(--sidebar-width);
        background: var(--bg-sidebar);
        color: var(--text-inverse);
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        z-index: 100;
    }

    .sidebar-header {
        padding: 24px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .sidebar-logo {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 20px;
        font-weight: 700;
    }

    .sidebar-logo i {
        color: var(--primary);
        font-size: 24px;
    }

    .sidebar-nav {
        flex: 1;
        padding: 16px 12px;
        overflow-y: auto;
    }

    .nav-section {
        margin-bottom: 24px;
    }

    .nav-section-title {
        font-size: 11px;
        font-weight: 600;
        color: rgba(255,255,255,0.4);
        text-transform: uppercase;
        letter-spacing: 1px;
        padding: 0 12px;
        margin-bottom: 8px;
    }

    .nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-radius: var(--radius-md);
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.2s;
        margin-bottom: 4px;
    }

    .nav-item:hover {
        background: rgba(255,255,255,0.1);
        color: var(--text-inverse);
    }

    .nav-item.active {
        background: var(--primary);
        color: var(--text-inverse);
    }

    .nav-item i {
        width: 20px;
        text-align: center;
        font-size: 16px;
    }

    .nav-item .nav-badge {
        margin-left: auto;
        background: rgba(255,255,255,0.2);
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 11px;
    }

    .sidebar-footer {
        padding: 16px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .user-info {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: var(--radius-md);
        background: rgba(255,255,255,0.05);
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 16px;
    }

    .user-details { flex: 1; }
    .user-name { font-size: 14px; font-weight: 600; }
    .user-role { font-size: 12px; color: rgba(255,255,255,0.5); }
    .user-menu { color: rgba(255,255,255,0.5); cursor: pointer; }

    /* 主内容区 */
    .main-content {
        flex: 1;
        margin-left: var(--sidebar-width);
        min-height: 100vh;
    }

    /* 顶部导航栏 */
    .top-header {
        height: var(--header-height);
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 32px;
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .page-title-section {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .page-title {
        font-size: 20px;
        font-weight: 600;
        margin: 0;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .header-search {
        display: flex;
        align-items: center;
        gap: 10px;
        background: var(--bg-secondary);
        padding: 10px 16px;
        border-radius: var(--radius-md);
        width: 280px;
    }

    .header-search i { color: var(--text-tertiary); }

    .header-search input {
        flex: 1;
        border: none;
        background: none;
        font-size: 14px;
        outline: none;
    }

    .header-icon-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        background: var(--bg-secondary);
        color: var(--text-secondary);
        font-size: 16px;
        cursor: pointer;
        position: relative;
        transition: all 0.2s;
    }

    .header-icon-btn:hover { background: var(--bg-tertiary); }

    .header-icon-btn .notification-dot {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 8px;
        height: 8px;
        background: var(--danger);
        border-radius: 50%;
    }

    /* 内容区域 */
    .content-area {
        padding: 32px;
    }

    /* 统计网格 */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 24px;
    }

    /* 网格布局 */
    .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
    .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

    /* 隐藏移动端元素 */
    .mobile-only { display: none !important; }
    .tab-bar { display: none !important; }
    .status-bar { display: none !important; }
}

/* ========================================
   移动端布局 (< 992px)
   ======================================== */
@media (max-width: 991.98px) {
    /* 隐藏桌面端元素 */
    .desktop-only { display: none !important; }
    .sidebar { display: none !important; }
    .top-header { display: none !important; }

    /* 移动端主内容 */
    .main-content {
        margin-left: 0;
    }

    .content-area {
        padding: 16px;
        padding-bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 20px);
    }

    /* 移动端导航栏 */
    .mobile-header {
        background: var(--bg-main);
        padding: 12px 16px;
        padding-top: calc(12px + var(--safe-top));
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .mobile-header .dropdown-menu {
        position: fixed;
        top: auto;
        right: 16px;
        margin-top: 8px;
        z-index: 10001;
    }

    .mobile-header-title {
        font-size: 17px;
        font-weight: 600;
    }

    .mobile-header-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: var(--bg-secondary);
        color: var(--text-secondary);
        font-size: 16px;
        cursor: pointer;
    }

    /* 底部 Tab Bar */
    .tab-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(var(--tab-bar-height) + var(--safe-bottom));
        background: rgba(250, 250, 249, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 0.5px solid var(--border);
        display: flex;
        justify-content: space-around;
        align-items: flex-start;
        padding-top: 8px;
        padding-bottom: var(--safe-bottom);
        z-index: 100;
    }

    .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        color: var(--text-tertiary);
        text-decoration: none;
        font-size: 10px;
        min-width: 64px;
        transition: color 0.2s;
    }

    .tab-item i {
        font-size: 22px;
        margin-bottom: 2px;
    }

    .tab-item.active {
        color: var(--primary);
    }

    /* 移动端统计网格 */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 16px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    /* 移动端网格 */
    .grid-2, .grid-3, .grid-4 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* 移动端卡片 */
    .card {
        border-radius: var(--radius-md);
    }

    .card-body {
        padding: 16px;
    }

    /* 移动端表格 */
    .table th, .table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* 移动端按钮 */
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 16px;
        width: 100%;
    }
}

/* ========================================
   登录页面样式
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
}
[data-theme="dark"] .login-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* 桌面端登录 */
@media (min-width: 992px) {
    .login-container {
        display: flex;
        width: 900px;
        min-height: 560px;
        background: var(--bg-card);
        border-radius: var(--radius-xl);
        box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
        overflow: hidden;
    }

    .login-banner {
        width: 400px;
        background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
        padding: 48px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        color: white;
    }

    .login-banner-icon {
        width: 72px;
        height: 72px;
        background: rgba(255,255,255,0.2);
        border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        margin-bottom: 32px;
    }

    .login-banner h1 {
        font-size: 32px;
        font-weight: 700;
        margin-bottom: 16px;
    }

    .login-banner p {
        font-size: 16px;
        opacity: 0.9;
        line-height: 1.6;
        margin-bottom: 32px;
    }

    .login-banner-features {
        list-style: none;
    }

    .login-banner-features li {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 14px;
        margin-bottom: 12px;
        opacity: 0.9;
    }

    .login-form-section {
        flex: 1;
        padding: 48px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .login-form-header h2 {
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .login-form-header p {
        color: var(--text-tertiary);
        font-size: 14px;
        margin-bottom: 24px;
    }
}

/* 移动端登录 */
@media (max-width: 991.98px) {
    .login-container {
        width: 100%;
        padding: 24px;
        padding-top: 60px;
    }

    .login-banner {
        display: none;
    }

    .login-logo {
        text-align: center;
        margin-bottom: 40px;
    }

    .login-logo-icon {
        width: 80px;
        height: 80px;
        background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 16px;
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    }

    .login-logo-icon i {
        font-size: 36px;
        color: white;
    }

    .login-logo h1 {
        font-size: 28px;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 4px;
    }

    .login-logo p {
        color: var(--text-tertiary);
        font-size: 15px;
    }

    .login-form-section {
        width: 100%;
    }

    .login-form-header {
        display: none;
    }
}

/* 登录表单通用样式 */
.login-form .form-group {
    margin-bottom: 16px;
}

.login-form .input-with-icon {
    position: relative;
}

.login-form .input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

.login-form .input-with-icon input,
.login-form .input-with-icon select {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: border-color 0.2s;
    background: var(--bg-card);
    color: var(--text-input);
    caret-color: var(--text-input);
}

.login-form .input-with-icon input:focus,
.login-form .input-with-icon select:focus {
    outline: none;
    border-color: var(--primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.login-btn:hover {
    background: var(--primary-dark);
}

.forgot-password-link {
    margin-top: 14px;
    text-align: right;
}

.forgot-password-link a,
.password-reset-actions a {
    color: var(--primary, #059669);
    text-decoration: none;
    font-size: 14px;
}

.forgot-password-link a:hover,
.password-reset-actions a:hover {
    text-decoration: underline;
}

.password-reset-container .site-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.password-reset-step[hidden] {
    display: none !important;
}

.password-reset-page #resetMessage[hidden] {
    display: none !important;
}

.password-reset-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 22px;
}

.password-reset-complete {
    text-align: center;
    color: var(--text-primary);
}

.password-reset-complete > i {
    color: #10b981;
    font-size: 56px;
    margin-bottom: 14px;
}

.password-reset-login-link {
    display: flex;
    margin-top: 20px;
    text-decoration: none;
}

.password-reset-resend {
    width: 100%;
    margin-top: 12px;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: var(--primary, #059669);
    cursor: pointer;
}

.password-reset-resend:disabled {
    color: var(--text-tertiary, #9ca3af);
    cursor: not-allowed;
}

.password-reset-page .theme-toggle-fixed {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.2);
}

.portal-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.portal-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.portal-link:hover {
    color: var(--primary);
}

/* 角色切换标签 */
.role-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
}

.role-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.role-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}


/* ========================================
   欢迎卡片样式
   ======================================== */
.welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    border-radius: var(--radius-xl);
    padding: 24px;
    color: white;
    margin-bottom: 24px;
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.welcome-avatar {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.welcome-info h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.welcome-info p {
    opacity: 0.85;
    font-size: 14px;
    margin: 0;
}

.welcome-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.welcome-stat {
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.welcome-stat-value {
    font-size: 24px;
    font-weight: 700;
}

.welcome-stat-label {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

@media (min-width: 992px) {
    .welcome-card {
        padding: 32px;
    }
    
    .welcome-header {
        margin-bottom: 0;
    }
    
    .welcome-card-desktop {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .welcome-stats {
        display: none;
    }
    
    .welcome-date {
        text-align: right;
    }
    
    .welcome-date-label {
        font-size: 14px;
        opacity: 0.8;
    }
    
    .welcome-date-value {
        font-size: 24px;
        font-weight: 700;
    }
}

@media (max-width: 991.98px) {
    .welcome-card {
        border-radius: var(--radius-lg);
    }
    
    .welcome-date {
        display: none;
    }
}

/* ========================================
   快捷操作样式
   ======================================== */
.quick-actions {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 992px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 991.98px) {
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-action {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

.quick-action:active {
    transform: scale(0.98);
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 22px;
}

.quick-action-icon.green {
    background: var(--primary-light);
    color: var(--primary);
}

.quick-action-icon.blue {
    background: var(--info-light);
    color: var(--info);
}

.quick-action-icon.orange {
    background: var(--warning-light);
    color: var(--warning);
}

.quick-action-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.quick-action-title {
    font-size: 15px;
    font-weight: 600;
}

.quick-action-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* ========================================
   日历样式
   ======================================== */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: var(--bg-secondary);
}

.calendar-day.today {
    background: var(--text-primary);
    color: white;
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
}

.calendar-day.has-leave {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.calendar-day.blocked {
    background: var(--danger-light);
    color: var(--danger);
    cursor: not-allowed;
}

.calendar-day.disabled {
    color: var(--text-tertiary);
    cursor: not-allowed;
}

@media (min-width: 992px) {
    .calendar-day {
        min-height: 60px;
    }
    
    .calendar-day .day-info {
        font-size: 10px;
        margin-top: 4px;
        color: var(--text-tertiary);
    }
}

/* ========================================
   假期列表样式
   ======================================== */
.leave-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.leave-date {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
}

.leave-date-day {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.leave-date-month {
    font-size: 11px;
    color: var(--text-tertiary);
}

.leave-info {
    flex: 1;
}

.leave-title {
    font-size: 15px;
    font-weight: 500;
}

.leave-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ========================================
   通知提醒样式
   ======================================== */
.notice-card {
    background: var(--warning-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.notice-card i {
    color: var(--warning);
    font-size: 18px;
    margin-top: 2px;
}

.notice-content {
    flex: 1;
}

.notice-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 2px;
}

.notice-text {
    font-size: 13px;
    color: #b45309;
}

/* ========================================
   Section 标题样式
   ======================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 0 4px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
}

.section-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
}

.section-link:hover {
    text-decoration: underline;
}

/* ========================================
   开关样式
   ======================================== */
.toggle {
    width: 48px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle.active {
    background: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle.active::after {
    transform: translateX(20px);
}

/* ========================================
   进度条样式
   ======================================== */
.progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

/* ========================================
   弹窗样式
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 992px) {
    .modal-content {
        background: var(--bg-card);
        border-radius: var(--radius-xl);
        padding: 32px;
        width: 100%;
        max-width: 500px;
        max-height: 80vh;
        overflow-y: auto;
        transform: scale(0.9);
        transition: transform 0.3s;
    }
    
    .modal-overlay.show .modal-content {
        transform: scale(1);
    }
}

@media (max-width: 991.98px) {
    .modal-overlay {
        align-items: flex-end;
    }
    
    .modal-content {
        background: var(--bg-card);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        padding: 24px;
        padding-bottom: calc(24px + var(--safe-bottom));
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        transform: translateY(100%);
        transition: transform 0.3s;
    }
    
    .modal-overlay.show .modal-content {
        transform: translateY(0);
    }
    
    .modal-handle {
        width: 36px;
        height: 5px;
        background: var(--bg-tertiary);
        border-radius: 3px;
        margin: 0 auto 20px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
}

/* 当 modal-close 同时是按钮时，保持按钮样式 */
.btn.modal-close {
    width: auto;
    height: auto;
    border-radius: var(--radius-md);
}

/* ========================================
   搜索框样式
   ======================================== */
.search-bar {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.search-bar i {
    color: var(--text-tertiary);
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    font-size: 15px;
    outline: none;
}

/* ========================================
   下拉菜单样式
   ======================================== */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 9999;
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.dropdown-item i {
    width: 16px;
    color: var(--text-tertiary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ========================================
   加载动画
   ======================================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.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: 9999;
}

[data-theme="dark"] .loading-overlay {
    background: rgba(15, 23, 42, 0.8);
}

/* ========================================
   打印样式
   ======================================== */
@media print {
    .sidebar,
    .tab-bar,
    .top-header,
    .mobile-header,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-area {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border);
    }
}


/* ========================================
   日历事件样式 (适配深色模式)
   ======================================== */
.fc-event {
    border: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: transform 0.2s, opacity 0.2s;
}

.fc-event:hover {
    transform: scale(1.02);
    opacity: 0.9;
    z-index: 5;
}

/* 自己的普通假期 */
.evt-own-leave {
    background-color: var(--success) !important;
    color: #fff !important;
}

/* 自己的候补值班 */
.evt-own-backup {
    background-color: var(--warning) !important;
    color: #fff !important; /* 保持白色文字以保证对比度 */
}

/* 自己的强制休假 */
.evt-own-mandatory {
    background-color: #9333ea !important;
    color: #fff !important;
}

/* 自己的固定周休 */
.evt-own-weekly {
    background-color: #0ea5e9 !important;
    color: #fff !important;
}

/* 自己的历史周休 */
.evt-own-history {
    background-color: #64748b !important;
    color: #fff !important;
}

/* 他人的候补值班 */
.evt-other-backup {
    background-color: #fd7e14 !important;
    color: #fff !important;
}

/* 他人的历史周休 */
.evt-other-history {
    background-color: #94a3b8 !important;
    color: #fff !important;
}

/* 他人的固定周休 */
.evt-other-weekly {
    background-color: #38bdf8 !important;
    color: #fff !important;
}

/* 他人的普通假期 */
.evt-other-leave {
    background-color: var(--info) !important;
    color: #fff !important;
}

/* 节假日背景 */
.fc-holiday {
    background-color: var(--danger-light) !important;
    border: none !important;
}

/* 禁用日期背景 */
.fc-blocked-date {
    background-color: var(--danger-light) !important;
}
[data-theme="dark"] .fc-blocked-date {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* 日历日期文字颜色适配 */
.fc-daygrid-day-number {
    color: var(--text-primary);
    text-decoration: none !important;
}

.fc-col-header-cell-cushion {
    color: var(--text-secondary);
    text-decoration: none !important;
}

/* FullCalendar 按钮适配 */
.fc-button-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.fc-button-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.fc-button-primary:disabled {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--bg-tertiary) !important;
    color: var(--text-tertiary) !important;
}

/* ========================================
   日历事件样式 (适配深色模式)
   ======================================== */
.fc-event {
    border: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: transform 0.2s, opacity 0.2s;
}

.fc-event:hover {
    transform: scale(1.02);
    opacity: 0.9;
    z-index: 5;
}

/* 自己的普通假期 */
.evt-own-leave {
    background-color: var(--success) !important;
    color: #fff !important;
}

/* 自己的候补值班 */
.evt-own-backup {
    background-color: var(--warning) !important;
    color: #fff !important; /* 保持白色文字以保证对比度 */
}

/* 自己的强制休假 */
.evt-own-mandatory {
    background-color: #9333ea !important;
    color: #fff !important;
}

/* 自己的固定周休 */
.evt-own-weekly {
    background-color: #0ea5e9 !important;
    color: #fff !important;
}

/* 自己的历史周休 */
.evt-own-history {
    background-color: #64748b !important;
    color: #fff !important;
}

/* 他人的候补值班 */
.evt-other-backup {
    background-color: #fd7e14 !important;
    color: #fff !important;
}

/* 他人的历史周休 */
.evt-other-history {
    background-color: #94a3b8 !important;
    color: #fff !important;
}

/* 他人的固定周休 */
.evt-other-weekly {
    background-color: #38bdf8 !important;
    color: #fff !important;
}

/* 他人的普通假期 */
.evt-other-leave {
    background-color: var(--info) !important;
    color: #fff !important;
}

/* 节假日背景 */
.fc-holiday {
    background-color: var(--danger-light) !important;
    border: none !important;
}

/* 禁用日期背景 */
.fc-blocked-date {
    background-color: var(--danger-light) !important;
}
[data-theme="dark"] .fc-blocked-date {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

/* 日历日期文字颜色适配 */
.fc-daygrid-day-number {
    color: var(--text-primary);
    text-decoration: none !important;
}

.fc-col-header-cell-cushion {
    color: var(--text-secondary);
    text-decoration: none !important;
}

/* FullCalendar 按钮适配 */
.fc-button-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.fc-button-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.fc-button-primary:disabled {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--bg-tertiary) !important;
    color: var(--text-tertiary) !important;
}

/* ========================================
   模板卡片样式 (系统升级/代班通知)
   ======================================== */
.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.template-card.active {
    border-color: var(--primary);
    background: var(--primary-light);
}
[data-theme="dark"] .template-card.active {
    background: rgba(16, 185, 129, 0.1);
}

.template-preview-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 12px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* 简单的模板卡片 (小图标样式) */
.template-card-simple {
    display: flex;
    align-items: center;
    gap: 16px;
}

.template-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
[data-theme="dark"] .template-card-icon {
    background: rgba(16, 185, 129, 0.2);
}

.template-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.template-card-file {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* ========================================
   小组卡片样式
   ======================================== */
.group-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    transition: all 0.2s;
}
[data-theme="dark"] .group-card {
    border-color: var(--border);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.group-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.member-count {
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

.group-config {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.config-item {
    display: flex;
    flex-direction: column;
}

.config-item label {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.config-item .value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.group-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========================================
   Editor.md 编辑器深色模式适配
   ======================================== */
[data-theme="dark"] .editormd {
    border-color: var(--border) !important;
}

[data-theme="dark"] .editormd-toolbar {
    background: var(--bg-secondary) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .editormd-menu > li > a {
    border-color: transparent !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .editormd-menu > li > a:hover,
[data-theme="dark"] .editormd-menu > li > a.active {
    background: var(--bg-tertiary) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .editormd-menu > li.divider {
    border-right-color: var(--border) !important;
}

[data-theme="dark"] .CodeMirror {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .CodeMirror-gutters {
    background: var(--bg-secondary) !important;
    border-right-color: var(--border) !important;
}

[data-theme="dark"] .CodeMirror-linenumber {
    color: var(--text-tertiary) !important;
}

[data-theme="dark"] .CodeMirror-cursor {
    border-left-color: var(--text-primary) !important;
}

[data-theme="dark"] .editormd-preview {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .editormd-preview-container,
[data-theme="dark"] .markdown-body {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .editormd-preview-close-btn {
    color: var(--text-secondary) !important;
}

/* ========================================
   移动端底部 Tab Bar 深色适配
   ======================================== */
[data-theme="dark"] .tab-bar {
    background: rgba(30, 41, 59, 0.95); /* bg-card with opacity */
    border-top-color: var(--border);
}

/* ========================================
   Primary Light 背景色修复 (用于功能说明等)
   ======================================== */
[data-theme="dark"] [style*="background: var(--primary-light)"] {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .notice-card {
    background: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ========================================
   邮件日志详情样式适配
   ======================================== */
[data-theme="dark"] .email-body-preview {
    background: var(--bg-secondary) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .detail-label {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .detail-value {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .detail-row {
    border-bottom-color: var(--border) !important;
}

/* ========================================
   班级切换器样式
   ======================================== */
.class-switcher {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.class-switcher-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.class-switcher-select {
    position: relative;
}

.class-switcher-select select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-sm);
    color: var(--text-inverse);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.class-switcher-select select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.15);
}

.class-switcher-select select option {
    background: var(--bg-sidebar);
    color: var(--text-inverse);
}

/* 深色模式下的 option 背景色调整 */
[data-theme="dark"] .class-switcher-select select option {
    background: #1e293b;
    color: #f1f5f9;
}

.class-switcher-select i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    pointer-events: none;
}

/* 移动端班级切换器 */
.mobile-class-switcher {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-class-switcher select {
    padding: 8px 28px 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    max-width: 200px;
}

.mobile-class-switcher select:focus {
    outline: none;
    border-color: var(--primary);
}

.mobile-class-switcher i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 10px;
    pointer-events: none;
}

.mobile-class-name {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 页面副标题 */
.page-subtitle {
    font-size: 14px;
    color: var(--text-tertiary);
    font-weight: 400;
    padding-left: 16px;
    border-left: 1px solid var(--border);
}

/* Toast 提示样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-container > * {
    pointer-events: auto;
}

.toast {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    border: 1px solid transparent;
}

[data-theme="dark"] .toast {
    border-color: var(--border);
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast i {
    font-size: 18px;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .toast-container {
        top: auto;
        bottom: calc(var(--tab-bar-height) + var(--safe-bottom) + 20px);
        left: 16px;
        right: 16px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}


/* ========================================
   页面加载动画
   ======================================== */
.page-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .page-loading-overlay {
    background: rgba(15, 23, 42, 0.95);
}

.page-loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-cube-container {
    perspective: 200px;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.loading-cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 1.5s ease-in-out infinite;
}

.loading-cube-face {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    border-radius: 8px;
    opacity: 0.9;
}

.loading-cube-face:nth-child(1) { transform: translateZ(30px); }
.loading-cube-face:nth-child(2) { transform: rotateY(180deg) translateZ(30px); }
.loading-cube-face:nth-child(3) { transform: rotateY(90deg) translateZ(30px); }
.loading-cube-face:nth-child(4) { transform: rotateY(-90deg) translateZ(30px); }
.loading-cube-face:nth-child(5) { transform: rotateX(90deg) translateZ(30px); }
.loading-cube-face:nth-child(6) { transform: rotateX(-90deg) translateZ(30px); }

@keyframes cubeRotate {
    0%, 100% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(0deg);
    }
    50% {
        transform: rotateX(90deg) rotateY(90deg);
    }
    75% {
        transform: rotateX(180deg) rotateY(90deg);
    }
}

/* 弹性方块加载动画 */
.loading-bounce-container {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.loading-bounce-dot {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    border-radius: 4px;
    animation: bounceDot 0.6s ease-in-out infinite;
}

.loading-bounce-dot:nth-child(1) { animation-delay: 0s; }
.loading-bounce-dot:nth-child(2) { animation-delay: 0.1s; }
.loading-bounce-dot:nth-child(3) { animation-delay: 0.2s; }

@keyframes bounceDot {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.2);
    }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ========================================
   日历优化样式
   ======================================== */
/* FullCalendar 自定义样式 */
.fc {
    font-family: inherit;
}

.fc .fc-toolbar-title {
    font-size: 18px !important;
    font-weight: 600;
}

.fc .fc-button {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.fc .fc-button:hover {
    background: var(--bg-tertiary) !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.fc .fc-daygrid-day {
    cursor: pointer;
    transition: background 0.2s;
}

.fc .fc-daygrid-day:hover {
    background: var(--bg-secondary);
}

.fc .fc-daygrid-day-number {
    font-size: 14px;
    font-weight: 500;
    padding: 8px;
}

.fc .fc-day-today {
    background: var(--primary-light) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    color: var(--primary-dark);
    font-weight: 700;
}

/* 禁止日期背景样式优化 */
.fc .fc-bg-event {
    opacity: 0.15 !important;
}

/* 事件样式优化 */
.fc .fc-event {
    border-radius: 4px !important;
    font-size: 11px !important;
    padding: 2px 4px !important;
    border: none !important;
    margin: 1px 2px !important;
}

.fc .fc-daygrid-event-dot {
    display: none;
}

/* 连续假期样式 - 多日事件 */
.fc .fc-event-main {
    padding: 2px 6px;
}

.fc .fc-h-event {
    border-radius: 4px !important;
}

.fc .fc-h-event .fc-event-main-frame {
    display: flex;
    align-items: center;
}

/* 多日事件横条样式 */
.fc .fc-daygrid-event {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc .fc-daygrid-block-event {
    border-radius: 4px !important;
    margin: 1px 2px !important;
}

.fc .fc-daygrid-block-event .fc-event-main {
    padding: 3px 6px;
}

.fc .fc-event-title {
    font-weight: 500;
}

/* 移动端日历优化 */
@media (max-width: 991.98px) {
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 12px;
    }
    
    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    
    .fc .fc-toolbar-title {
        font-size: 16px !important;
    }
    
    .fc .fc-button {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .fc .fc-daygrid-day-number {
        font-size: 13px;
        padding: 4px;
    }
    
    .fc .fc-event {
        font-size: 10px !important;
        padding: 1px 3px !important;
    }
    
    .fc .fc-col-header-cell-cushion {
        font-size: 12px;
        padding: 8px 4px;
    }
    
    /* 隐藏周视图按钮 */
    .fc .fc-dayGridWeek-button {
        display: none;
    }
    
    /* 移动端日历高度 */
    .fc .fc-daygrid-body {
        min-height: 350px;
    }
    
    .fc .fc-daygrid-day-frame {
        min-height: 50px;
    }
}

/* 禁止日期标记优化 - 避免文字重叠 */
.fc-blocked-date {
    position: relative;
}

.fc-blocked-date::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

/* 下拉菜单激活状态 */
.dropdown-item.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* 下拉分隔线 */
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ========================================
   移动端日历页面优化
   ======================================== */
@media (max-width: 991.98px) {
    /* 日历页面特殊布局 */
    .calendar-page .content-area {
        padding: 12px;
    }
    
    .calendar-page .grid-2 {
        display: block;
    }
    
    /* 移动端假期统计卡片 */
    .mobile-leave-stats {
        display: flex;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .mobile-leave-stat {
        flex: 1;
        background: var(--bg-card);
        border-radius: var(--radius-md);
        padding: 12px;
        text-align: center;
        box-shadow: var(--shadow-sm);
    }
    
    .mobile-leave-stat-value {
        font-size: 20px;
        font-weight: 700;
        color: var(--primary);
    }
    
    .mobile-leave-stat-label {
        font-size: 11px;
        color: var(--text-tertiary);
        margin-top: 2px;
    }
    
    /* 移动端视图切换按钮 */
    .mobile-view-tabs {
        display: flex;
        background: var(--bg-secondary);
        border-radius: var(--radius-md);
        padding: 4px;
        margin-bottom: 12px;
    }
    
    .mobile-view-tab {
        flex: 1;
        padding: 10px 8px;
        text-align: center;
        border-radius: var(--radius-sm);
        font-size: 13px;
        font-weight: 500;
        color: var(--text-secondary);
        background: transparent;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-view-tab.active {
        background: var(--bg-card);
        color: var(--primary);
        box-shadow: var(--shadow-sm);
    }
    
    .mobile-view-tab i {
        margin-right: 4px;
    }
    
    /* 移动端图例 */
    .mobile-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
        background: var(--bg-card);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
    }
    
    .mobile-legend-item {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: var(--text-secondary);
    }
    
    .mobile-legend-dot {
        width: 12px;
        height: 12px;
        border-radius: 3px;
    }
    
    .mobile-legend-dot.mine { background: #28a745; }
    .mobile-legend-dot.backup { background: #ffc107; }
    .mobile-legend-dot.others { background: #17a2b8; }
    .mobile-legend-dot.blocked { background: #dc3545; }
}


/* ========================================
   移动端滚动修复
   ======================================== */
@media (max-width: 991.98px) {
    /* 确保移动端可以正常滚动 */
    html, body {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 日历页面容器滚动 */
    .mobile-only {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* FullCalendar 触摸滚动支持 */
    .fc {
        touch-action: pan-y;
    }
    
    .fc-scroller {
        overflow: visible !important;
    }
    
    .fc-daygrid-body {
        touch-action: pan-y;
    }
}


/* ========================================
   节假日样式
   ======================================== */
.fc-holiday-cell {
    background: rgba(239, 68, 68, 0.08) !important;
}

.fc-holiday-cell .fc-daygrid-day-number {
    color: #dc3545 !important;
}

.fc-holiday-label {
    position: absolute;
    bottom: 2px;
    left: 2px;
    font-size: 9px;
    color: #dc3545;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 4px);
    line-height: 1.2;
    pointer-events: none;
}

@media (min-width: 992px) {
    .fc-holiday-label {
        font-size: 10px;
        bottom: 4px;
        left: 4px;
    }
}

/* 移动端图例节假日颜色 */
.mobile-legend-dot.holiday {
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid #dc3545;
}


/* ========================================
   日期选择弹窗样式
   ======================================== */
.date-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.date-selection-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 320px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.date-selection-header {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.date-selection-list {
    max-height: 300px;
    overflow-y: auto;
}

.date-selection-item {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.date-selection-item:last-child {
    border-bottom: none;
}

.date-selection-item:hover {
    background: var(--bg-secondary);
}

.date-selection-item:active {
    background: var(--primary-light);
}

.date-selection-cancel {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: var(--bg-secondary);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s;
}

.date-selection-cancel:hover {
    background: var(--bg-tertiary);
}


/* ========================================
   邮件发送加载动画
   ======================================== */
.email-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.email-loading-overlay.show {
    display: flex;
}

.email-loading-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    position: relative;
}

.email-loading-icon i {
    font-size: 48px;
    color: var(--primary);
    animation: emailPulse 1.5s ease-in-out infinite;
}

@keyframes emailPulse {
    0%, 100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) translateY(-8px);
        opacity: 0.9;
    }
}

.email-loading-text {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.email-loading-subtext {
    color: var(--text-tertiary);
    font-size: 13px;
    margin-top: 8px;
}

/* ========================================
   修复：移除弹窗中列表项链接的下划线
   ======================================== */
.modal-content .list-group .list-item,
.modal-content .list-group a.list-item {
    text-decoration: none;
    color: inherit;
}

.modal-content .list-group .list-item:hover,
.modal-content .list-group a.list-item:hover {
    text-decoration: none;
}

.modal-content .list-group .list-item *,
.modal-content .list-group a.list-item * {
    text-decoration: none;
}

/* 确保所有 list-item 链接无下划线 */
a.list-item,
.list-item a {
    text-decoration: none;
    color: inherit;
}

a.list-item:hover,
.list-item a:hover {
    text-decoration: none;
    color: inherit;
}


/* ========================================
   假期详情列表样式
   Leave Detail List Styles
   ======================================== */
.leave-detail-section {
    border-bottom: 1px solid var(--border);
}

.leave-detail-section:last-child {
    border-bottom: none;
}

.leave-detail-section-header {
    padding: 12px 16px;
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
}

.leave-detail-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
}

.leave-detail-items {
    max-height: 400px;
    overflow-y: auto;
}

.leave-detail-items.past-items {
    max-height: 300px;
    background: var(--bg-secondary);
}

.leave-detail-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
    gap: 12px;
}

.leave-detail-item:last-child {
    border-bottom: none;
}

.leave-detail-item:hover {
    background-color: var(--primary-light);
}

.leave-detail-item.past {
    opacity: 0.7;
    background: var(--bg-secondary);
}

.leave-detail-item.past:hover {
    opacity: 0.9;
}

.leave-detail-date {
    flex: 0 0 70px;
    width: 70px;
    min-width: 70px;
    text-align: center;
    padding: 8px 4px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e0f2fe 100%);
    border-radius: var(--radius-sm);
}

.leave-detail-date-main {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.leave-detail-date-weekday {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.leave-detail-date-diff {
    font-size: 10px;
    color: var(--text-tertiary);
    margin-top: 4px;
    padding: 2px 6px;
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
    display: inline-block;
}

.leave-detail-date-diff.today {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.leave-detail-date-diff.tomorrow {
    background: var(--success-light);
    color: var(--success);
    font-weight: 500;
}

.leave-detail-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.leave-detail-user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.leave-detail-own-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

.leave-detail-username {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.leave-detail-group {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.leave-detail-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.leave-detail-tag {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

.leave-detail-tag.normal {
    background: var(--info-light);
    color: var(--info);
}

.leave-detail-tag.backup {
    background: var(--warning-light);
    color: #b45309;
}

.leave-detail-tag.mandatory {
    background: rgba(147, 51, 234, 0.15);
    color: #9333ea;
}

.leave-detail-backup-info {
    font-size: 12px;
    color: #b45309;
    font-weight: 500;
    background: var(--warning-light);
    padding: 2px 8px;
    border-radius: 4px;
}

.leave-detail-mandatory-name {
    font-size: 12px;
    color: #9333ea;
    background: rgba(147, 51, 234, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* 移动端适配 */
@media (max-width: 991px) {
    .leave-detail-items {
        max-height: 350px;
    }
    
    .leave-detail-items.past-items {
        max-height: 250px;
    }
    
    .leave-detail-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .leave-detail-date {
        flex: 0 0 60px;
        width: 60px;
        min-width: 60px;
        padding: 6px 4px;
    }
    
    .leave-detail-date-main {
        font-size: 13px;
    }
    
    .leave-detail-username {
        font-size: 13px;
    }
    
    .leave-detail-tag {
        padding: 2px 8px;
        font-size: 10px;
    }
}
