/* 主題變數 */
:root {
    /* 顏色 */
    --primary: #1976d2;
    --primary-light: #e3f2fd;
    --primary-dark: #000000;
    --danger: #ff0000;
    --text: #2c3e50;
    --text-secondary: #64748b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --success: #4CAF50;
    --warning: #FFC107;
    --warning-dark: #000000;
    --error: #F44336;   

    /* 活動類型顏色 */
    --class-promotion-color: #007AFF;
    --meet-greet-color: #34C759;
    --edu-expo-color: #FF9500;
    --special-lecture-color: #AF52DE;
    --mock-interview-color: #FF2D55;
    --project-review-color: #5856D6;
    --camp-course-color: #FF3B30;
    --school-festival-color: #FFCC00;
    --deep-visit-color: #5AC8FA;
    --club-guidance-color: #00C7BE;
    --international-color: #5856D6;
    --school-reception-color: #AC8E68;
    --other-color: #8E8E93;
    --committee-color: #007AFF;

    /* 圓角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* 陰影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* 動畫 */
    --transition: all 0.2s ease-in-out;

    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    --header-height: 60px;

    /* 活動類型顏色 */
    --activity-edu-expo-bg: #fff3e0;
    --activity-edu-expo-color: #f57c00;
    --activity-special-lecture-bg: #f3e5f5;
    --activity-special-lecture-color: #7b1fa2;
    --activity-mock-interview-bg: #e8eaf6;
    --activity-mock-interview-color: #3f51b5;
    --activity-project-review-bg: #e0f2f1;
    --activity-project-review-color: #00796b;
    --activity-camp-course-bg: #fce4ec;
    --activity-camp-course-color: #c2185b;
    --activity-school-festival-bg: #f1f8e9;
    --activity-school-festival-color: #558b2f;
    --activity-deep-visit-bg: #ede7f6;
    --activity-deep-visit-color: #512da8;
    --activity-club-guidance-bg: #e0f7fa;
    --activity-club-guidance-color: #0097a7;
    --activity-international-bg: #fff8e1;
    --activity-international-color: #ffa000;
    --activity-school-reception-bg: #fbe9e7;
    --activity-school-reception-color: #d84315;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
}


        /* 登入介面樣式 */
        .login-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            background: url('../images/loginCloud.png') center center no-repeat;
            background-size: cover;
            background-position: center;
            z-index: 1000;
        }

        .login-card {
            background: rgba(255, 255, 255, 0.95);
            padding: 40px;
            border-radius: var(--radius-lg);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 400px;
            text-align: center;
            margin-top: 0%;
            margin-right: 50%;
            backdrop-filter: blur(8px);
        }

/* 主要應用程式容器 */
#appContainer {
    width: 100%;
    min-height: 100vh;
    display: flex;
    position: relative;
}

/* 側邊欄 */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: white;
    border-right: 1px solid var(--border);
    position: fixed;
    left: 0;
    top: 0;
    transition: var(--transition);
    z-index: 1000;
    overflow-y: auto;
    /* 自定義滾動條樣式 */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--primary-light) transparent; /* Firefox */
}

/* Webkit瀏覽器的滾動條樣式 (Chrome, Safari, Edge等) */
.sidebar::-webkit-scrollbar {
    width: 4px; /* 滾動條寬度 */
}

.sidebar::-webkit-scrollbar-track {
    background: transparent; /* 滾動條軌道背景 */
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--primary-light); /* 使用主題淺色 */
    border-radius: 4px; /* 滾動條圓角 */
    border: none;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary); /* 懸停時使用主題色 */
}

/* 在手機版上調整滾動條樣式 */
@media (max-width: 768px) {
    .sidebar::-webkit-scrollbar {
        width: 3px; /* 在手機上更細 */
    }
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

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

.workspace-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toggle-sidebar {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.toggle-sidebar:hover {
    color: var(--primary);
}

/* 選單列表 */
.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.menu-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.menu-item span {
    white-space: nowrap;
    opacity: 1;
    transition: var(--transition);
}

.sidebar.collapsed .menu-item span {
    opacity: 0;
    width: 0;
    margin: 0;
}

.menu-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.menu-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* 主要內容區域 */
.main-content {
    flex: 1;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    background: var(--bg);
    width: calc(100% - var(--sidebar-width));
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* 內容區域 */
.content-area {
    padding: 24px;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.content-area::-webkit-scrollbar {
    width: 6px;
}

.content-area::-webkit-scrollbar-track {
    background: transparent;
}

.content-area::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 6px;
}

.content-area::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

/* 頂部導航欄 */
.top-nav {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    color: var(--text);
}

.user-email {
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-actions {
    display: flex;
    gap: 12px;
}

/* 按鈕樣式 */
.nav-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text);
}

.nav-btn:hover {
    background: var(--border);
}

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

.nav-btn.primary:hover {
    filter: brightness(1.1);
}

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

.nav-btn.danger:hover {
    background: var(--danger);
    color: black;
    filter: brightness(1.1);
}

/* 響應式設計 */
@media (max-width: 1200px) {
    /* 中等螢幕字體大小調整 */
    body {
        font-size: 15px;
    }

    .page-title {
        font-size: 1.5em;
    }

    .stat-item .stat-total {
        font-size: 1.7em;
    }

    .stat-item .stat-label {
        font-size: 0.75em;
    }

    .stat-item .stat-rate {
        font-size: 0.85em;
    }

    .stat-by-type span {
        font-size: 0.85em;
    }

    .entrance-item {
        font-size: 0.85em;
    }

    .student-name {
        font-size: 0.95em;
    }

    .student-info {
        font-size: 0.95em;
    }

    .dialog-title {
        font-size: 1.2em;
    }

    .form-group label {
        font-size: 0.95em;
    }

    .nav-btn {
        font-size: 0.75em;
        padding: 7px 14px;
    }
}

@media (max-width: 1024px) {
    /* 平板字體大小調整 */
    body {
        font-size: 14px;
    }

    .page-title {
        font-size: 1.4em;
    }

    .stat-item .stat-total {
        font-size: 1.6em;
    }

    .stat-item .stat-label {
        font-size: 0.85em;
    }

    .stat-item .stat-rate {
        font-size: 0.8em;
    }

    .stat-by-type span {
        font-size: 0.8em;
    }

    .entrance-item {
        font-size: 0.8em;
    }

    .student-name {
        font-size: 0.9em;
    }

    .student-info {
        font-size: 0.9em;
    }

    .dialog-title {
        font-size: 1.1em;
    }

    .form-group label {
        font-size: 0.9em;
    }

    .nav-btn {
        font-size: 0.9em;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        width: 85%;
        max-width: 300px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .sidebar.active {
        width: 85%;
        max-width: 300px;
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .menu-item {
        padding: 14px 16px;
    }
    
    .menu-item i {
        font-size: 18px;
    }
    
    .menu-item span {
        font-size: 16px;
    }
    
    .top-nav {
        padding: 0 16px;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--text);
        font-size: 24px;
        cursor: pointer;
    }
    
    @media (min-width: 769px) {
        .mobile-menu-toggle {
            display: none;
        }
        
        .sidebar-overlay {
            display: none !important;
        }
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 85%;
    }
    
    .workspace-title {
        font-size: 16px;
    }
    
    .menu-item {
        padding: 16px;
    }
}

/* 工具類 */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.hidden {
    display: none;
}

/* 設定頁面樣式 */
.settings-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.settings-item {
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.settings-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.settings-item-title {
    font-weight: 500;
    color: var(--text);
}

.settings-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.settings-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.settings-value button {
    border: none;
    background: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* 對話框樣式 */
.dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-height: 90vh;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.dialog form {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.dialog-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.dialog-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* 表單網格布局 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
}

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

.academic-year-select {
    padding: 6px 12px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.academic-year-select:hover {
    border-color: #999;
}

.academic-year-select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 3px rgba(0,0,0,0.2);
}

/* 頁面標題區域 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* 篩選器樣式 */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
}

/* 操作按鈕樣式 */
.action-btn {
    padding: 8px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 4px;
    transition: var(--transition);
}

.action-btn.edit {
    background: var(--primary-light);
    color: var(--primary);
}

.action-btn.delete {
    background: #ffebee;
    color: #d32f2f;
}

.action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.action-buttons {
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* 狀態標籤樣式 */
.status-tag {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.status-tag.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-tag.inactive {
    background: #f5f5f5;
    color: #616161;
}

/* 活動類型樣式 */
.type-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: var(--radius-md);
    font-size: 13px;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.type-stat-item:hover {
    transform: translateX(4px);
}

/* 活動類型顏色主題 */
.type-stat-item.class_promotion {
    background: linear-gradient(45deg, rgba(0, 122, 255, 0.1), white);
    border-color: var(--class-promotion-color);
}
.type-stat-item.class_promotion i { color: var(--class-promotion-color); }

.type-stat-item.meet_greet {
    background: linear-gradient(45deg, rgba(52, 199, 89, 0.1), white);
    border-color: var(--meet-greet-color);
}
.type-stat-item.meet_greet i { color: var(--meet-greet-color); }

.type-stat-item.edu_expo {
    background: linear-gradient(45deg, rgba(255, 149, 0, 0.1), white);
    border-color: var(--edu-expo-color);
}
.type-stat-item.edu_expo i { color: var(--edu-expo-color); }

.type-stat-item.special_lecture {
    background: linear-gradient(45deg, rgba(175, 82, 222, 0.1), white);
    border-color: var(--special-lecture-color);
}
.type-stat-item.special_lecture i { color: var(--special-lecture-color); }

.type-stat-item.mock_interview {
    background: linear-gradient(45deg, rgba(255, 45, 85, 0.1), white);
    border-color: var(--mock-interview-color);
}
.type-stat-item.mock_interview i { color: var(--mock-interview-color); }

.type-stat-item.project_review {
    background: linear-gradient(45deg, rgba(88, 86, 214, 0.1), white);
    border-color: var(--project-review-color);
}
.type-stat-item.project_review i { color: var(--project-review-color); }

.type-stat-item.camp_course {
    background: linear-gradient(45deg, rgba(255, 59, 48, 0.1), white);
    border-color: var(--camp-course-color);
}
.type-stat-item.camp_course i { color: var(--camp-course-color); }

.type-stat-item.school_festival {
    background: linear-gradient(45deg, rgba(255, 204, 0, 0.1), white);
    border-color: var(--school-festival-color);
}
.type-stat-item.school_festival i { color: var(--school-festival-color); }

/* 表格樣式 */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text);
}

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

/* 編輯器樣式 */
.ql-editor {
    font-size: 14px;
    line-height: 1.6;
}

/* 標籤樣式 */
.teacher-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--bg);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text);
}

.teacher-tag i {
    color: var(--primary);
    font-size: 10px;
}

/* 地址預覽 */
.address-preview {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 學年度選擇器 */
.academic-year-select {
    padding: 6px 12px;
    margin-right: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: white;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.academic-year-select:hover {
    border-color: var(--text-secondary);
}

.academic-year-select:focus {
    outline: none;
    border-color: var(--text);
    box-shadow: var(--shadow-sm);
}

/* 活動類型樣式 */
.activity-type {
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.activity-type.edu_expo {
    background: var(--activity-edu-expo-bg);
    color: var(--activity-edu-expo-color);
}

.activity-type.special_lecture {
    background: var(--activity-special-lecture-bg);
    color: var(--activity-special-lecture-color);
}

.activity-type.mock_interview {
    background: var(--activity-mock-interview-bg);
    color: var(--activity-mock-interview-color);
}

.activity-type.project_review {
    background: var(--activity-project-review-bg);
    color: var(--activity-project-review-color);
}

.activity-type.camp_course {
    background: var(--activity-camp-course-bg);
    color: var(--activity-camp-course-color);
}

.activity-type.school_festival {
    background: var(--activity-school-festival-bg);
    color: var(--activity-school-festival-color);
}

.activity-type.deep_visit {
    background: var(--activity-deep-visit-bg);
    color: var(--activity-deep-visit-color);
}

.activity-type.club_guidance {
    background: var(--activity-club-guidance-bg);
    color: var(--activity-club-guidance-color);
}

.activity-type.international {
    background: var(--activity-international-bg);
    color: var(--activity-international-color);
}

.activity-type.school_reception {
    background: var(--activity-school-reception-bg);
    color: var(--activity-school-reception-color);
}

/* 標籤容器樣式 */
.tab-container {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.tab input[type="radio"] {
    display: none;
}

.tab span {
    font-size: 14px;
    color: var(--text);
}

.tab:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.tab input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 500;
}

/* 固定容器 */
.sticky-container {
    position: sticky;
    top: var(--header-height);
    background: var(--bg);
    z-index: 10;
    padding: 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* 篩選內容 */
.filter-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-section {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 排序圖標 */
.sort-icon {
    margin-left: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* 必填標記 */
.required::after {
    content: "*";
    color: #f44336;
    margin-left: 4px;
}

/* 表單控制項 */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* 分頁容器 */
#paginationContainer {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

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

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

/* 資料表格樣式 */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}

.dataTables_wrapper {
    margin-top: 20px;
}

table.dataTable {
    width: 100% !important;
    border-collapse: collapse;
    background: white;
}

table.dataTable thead th {
    background: var(--bg);
    padding: 12px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text);
}

table.dataTable tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

table.dataTable tbody tr:hover {
    background: var(--primary-light);
}

/* 搜尋和篩選區域 */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
}

/* 設備狀態標籤 */
.equipment-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.equipment-status.normal {
    background: #e8f5e9;
    color: #2e7d32;
}

.equipment-status.maintenance {
    background: #fff3e0;
    color: #e65100;
}

.equipment-status.broken {
    background: #ffebee;
    color: #c62828;
}

/* 頁面標題區域 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* 操作按鈕樣式 */
.action-btn {
    padding: 8px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 4px;
    transition: var(--transition);
}

.action-btn.edit {
    background: var(--primary-light);
    color: var(--primary);
}

.action-btn.delete {
    background: #ffebee;
    color: #d32f2f;
}

.action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.action-buttons {
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* 側邊欄收合狀態下的滾動條樣式 */
.sidebar.collapsed::-webkit-scrollbar {
    width: 2px; /* 收合時更細的滾動條 */
}

.sidebar.collapsed {
    scrollbar-width: none; /* Firefox 隱藏滾動條 */
}

/* 子項目評分相關樣式 */
.sub-items-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
}

.sub-item-score {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sub-score-label {
    font-size: 0.8rem;
    color: #4b5563;
    font-weight: 500;
}