/* 休假系统通用样式 - 沉稳商务蓝色设计系统 */
/* Design System: 休假系统权限检查工具 */
/* Style: Data-Dense Dashboard + Corporate Blue */

/* Google Fonts - Poppins + Open Sans */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* CSS 变量 - 沉稳商务蓝色设计系统 */
:root {
    /* 主色调 - Trust Blue */
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --primary-bg: rgba(37, 99, 235, 0.08);
    
    /* 辅助色 - 商务灰蓝 */
    --secondary: #475569;
    --secondary-light: #64748B;
    --accent: #0EA5E9;
    --accent-light: #38BDF8;
    
    /* 背景色 - 简洁明亮 */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1E293B;
    --bg-hover: #F1F5F9;
    --bg-border: #E2E8F0;
    
    /* 文字色 - 高对比度 */
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;
    
    /* 功能色 - 商务风格 */
    --success: #059669;
    --success-dark: #047857;
    --success-bg: #D1FAE5;
    --warning: #D97706;
    --warning-bg: #FEF3C7;
    --danger: #DC2626;
    --danger-dark: #B91C1C;
    --danger-bg: #FEE2E2;
    --info: #0284C7;
    --info-bg: #E0F2FE;
    
    /* CTA 强调色 - 橙色对比 */
    --cta: #F97316;
    --cta-dark: #EA580C;
    
    /* 字体 */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* 阴影 - 柔和专业 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* 圆角 - 商务简洁 */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    min-height: 100vh;
    padding: 24px;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */

/* 容器 */
.container {
    max-width: 1440px;
    margin: 0 auto;
}

/* 头部 - 商务风格 */
.header {
    background: var(--bg-card);
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--bg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.header .user-info {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

/* 导航 */
.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    background: var(--bg-hover);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--bg-border);
}

.nav a:hover {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* 内容区块 */
.section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--bg-border);
}

.section h2 {
    color: var(--text-primary);
    font-size: 18px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-border);
    font-family: var(--font-heading);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section h2.no-border {
    border-bottom: none;
    padding-bottom: 0;
}

/* ============================================
   CARDS - 商务简洁风格
   ============================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--bg-border);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* 统计卡片 */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--bg-border);
    border-left: 4px solid var(--primary);
}

.stat-card.success {
    border-left-color: var(--success);
}

.stat-card.warning {
    border-left-color: var(--warning);
}

.stat-card.danger {
    border-left-color: var(--danger);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   BENTO GRID
   ============================================ */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.bento-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.bento-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.bento-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.bento-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--bg-border);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.bento-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.bento-item-large {
    grid-column: span 2;
}

/* ============================================
   FORMS
   ============================================ */

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--bg-border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-card);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   BUTTONS - 商务风格
   ============================================ */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
}

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-cta {
    background: var(--cta);
    color: white;
}

.btn-cta:hover {
    background: var(--cta-dark);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* ============================================
   TABLES - 数据密集型
   ============================================ */

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-border);
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--bg-border);
}

th {
    background: var(--bg-hover);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
}

tr:hover {
    background: var(--bg-hover);
}

tr:last-child td {
    border-bottom: none;
}

/* ============================================
   MESSAGES & BADGES
   ============================================ */

.flash-message {
    background: var(--success);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.flash-message.error {
    background: var(--danger);
}

.flash-message.warning {
    background: var(--warning);
}

.flash-message.info {
    background: var(--info);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-admin {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-user {
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ============================================
   MODALS
   ============================================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--bg-border);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-border);
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: var(--bg-hover);
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ============================================
   CALENDAR - 商务风格
   ============================================ */

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.calendar-header h2 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    font-family: var(--font-heading);
}

.calendar-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 700;
    padding: 14px 8px;
    background: var(--bg-hover);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
}

.calendar-day {
    min-height: 100px;
    padding: 12px 8px;
    border: 1px solid var(--bg-border);
    border-radius: var(--radius);
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.calendar-day.empty {
    background: var(--bg-hover);
    border: none;
    cursor: default;
}

.calendar-day.empty:hover {
    box-shadow: none;
}

.calendar-day.has-leave {
    background: var(--success-bg);
    border-color: var(--success);
}

.calendar-day.has-conflict {
    background: var(--danger-bg) !important;
    border-color: var(--danger) !important;
}

.day-number {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.day-info {
    font-size: 11px;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
}

.leave-names {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.leave-name {
    background: rgba(255, 255, 255, 0.8);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-secondary);
}

.conflict-badge {
    background: var(--danger);
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
    font-size: 10px;
    margin-top: 6px;
    font-weight: 600;
}

.legend {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--bg-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
}

.legend-color.leave {
    background: var(--success-bg);
    border: 2px solid var(--success);
}

.legend-color.conflict {
    background: var(--danger-bg);
    border: 2px solid var(--danger);
}

/* ============================================
   COMPONENTS
   ============================================ */

/* 系统列表 */
.system-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.system-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--bg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.system-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.system-info {
    flex: 1;
    min-width: 200px;
}

.system-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-family: var(--font-heading);
}

.system-remark {
    font-size: 13px;
    color: var(--text-muted);
}

.system-actions {
    display: flex;
    gap: 8px;
}

/* 系统标签 */
.systems-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.system-tag {
    background: var(--primary-bg);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.no-systems {
    color: var(--text-muted);
    font-size: 13px;
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--bg-border);
}

.checkbox-item:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-item.checked {
    background: var(--primary-bg);
    border-color: var(--primary);
}

/* 全选按钮 */
.select-all-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg-border);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
    font-size: 15px;
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
}

/* 字符计数 */
.char-count {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 6px;
}

/* 内联表单 */
.inline-form {
    display: inline;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons .btn,
.action-buttons .btn-small,
.action-buttons a.btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
    border-radius: var(--radius);
}

/* 导入区域 */
.import-section {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.import-section form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.file-input-wrapper {
    position: relative;
    display: inline-flex;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

/* 信息卡片 */
.info-card {
    background: var(--bg-main);
    padding: 15px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
}

.info-card h3 {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 14px;
    margin-bottom: 12px;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.info-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
}

.status-badge.ok {
    background: var(--success);
    color: white;
}

.status-badge.conflict {
    background: var(--danger);
    color: white;
}

/* ============================================
   MOBILE CARDS
   ============================================ */

.mobile-cards {
    display: none;
}

.user-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--bg-border);
    box-shadow: var(--shadow-sm);
}

.user-card:last-child {
    margin-bottom: 0;
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-border);
}

.user-card-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.user-card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.user-card-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-card-info-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.user-card-info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.user-card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.user-card-buttons .btn {
    padding: 12px;
    font-size: 13px;
}

.user-card-buttons .btn-success {
    grid-column: span 2;
}

/* ============================================
   DESKTOP TABLE
   ============================================ */

.desktop-table {
    display: block;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 16px;
    }
    
    .header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .nav {
        justify-content: center;
    }
    
    .nav a {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .section {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .section h2 {
        font-size: 16px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .bento-grid-2,
    .bento-grid-3,
    .bento-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .bento-item-large {
        grid-column: span 1;
    }
    
    .form-row {
        gap: 16px;
    }
    
    .form-group {
        min-width: 100%;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
    }
    
    .btn-small {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .import-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .import-section form {
        flex-direction: column;
    }
    
    .import-section .btn,
    .import-section form .btn,
    .import-section a.btn {
        width: 100%;
        justify-content: center;
    }
    
    .file-input-wrapper {
        width: 100%;
    }
    
    .file-input-wrapper .btn {
        width: 100%;
    }
    
    th, td {
        padding: 12px 14px;
        font-size: 12px;
    }
    
    th {
        font-size: 11px;
    }
    
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day-header {
        padding: 10px 4px;
        font-size: 10px;
    }
    
    .calendar-day {
        min-height: 70px;
        padding: 8px 4px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .day-info {
        font-size: 9px;
    }
    
    .legend {
        gap: 16px;
        margin-top: 16px;
        padding-top: 16px;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    /* 移动端隐藏表格，显示卡片 */
    .desktop-table {
        display: none;
    }
    
    .mobile-cards {
        display: block;
    }
    
    .system-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }
    
    .system-actions {
        width: 100%;
    }
    
    .system-actions .btn {
        flex: 1;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .checkbox-item {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 480px) {
    .header h1 {
        font-size: 18px;
    }
    
    .nav a {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .section {
        padding: 16px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 6px 3px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .leave-name {
        font-size: 8px;
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
