        /* ===== CSS Reset ===== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* ===== 基礎設定 ===== */
        :root {
            /* 主色系 */
            --primary: #3498db;
            --primary-dark: #2980b9;
            --success: #27ae60;
            --warning: #f39c12;
            --danger: #e74c3c;
            --info: #2980b9;

            /* 平台色 */
            --scratch: #ff6900;
            --appinventor: #4caf50;

            /* 背景色 */
            --bg-main: #f5f7fa;
            --bg-card: #FFFFFF;

            /* 文字色 */
            --text-primary: #2c3e50;
            --text-secondary: #7f8c8d;
            --text-body: #495057;
            --text-muted: #6c757d;
            --text-light: #95a5a6;

            /* 邊框色 */
            --border-color: #e9ecef;
            --border-dark: #ced4da;

            /* 陰影 */
            --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
            --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
            --shadow-lg: 0 4px 12px rgba(0,0,0,0.12);
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "微軟正黑體", sans-serif;
            background: var(--bg-main);
            color: var(--text-body);
            line-height: 1.6;
            min-height: 100vh;
        }

        /* ===== 頂部導航列 ===== */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 60px;
            background: var(--text-primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            z-index: 1000;
            box-shadow: var(--shadow-sm);
        }

        .top-nav .brand {
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .top-nav .user-info {
            display: flex;
            align-items: center;
            gap: 16px;
            font-size: 14px;
        }

        .top-nav .logout-btn {
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(255,255,255,0.2);
            color: white;
            padding: 6px 12px;
            border-radius: 4px;
            cursor: pointer;
            transition: background 0.3s;
        }

        .top-nav .logout-btn:hover {
            background: rgba(255,255,255,0.2);
        }

        /* ===== 主選單列 ===== */
        .main-menu {
            position: fixed;
            top: 60px;
            left: 0;
            right: 0;
            height: 50px;
            background: white;
            display: flex;
            align-items: center;
            padding: 0 24px;
            gap: 8px;
            z-index: 999;
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        }

        .menu-item {
            padding: 8px 16px;
            color: #5a6c7d;
            font-size: 14px;
            font-weight: 500;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
            border: none;
            background: none;
        }

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

        .menu-item.active {
            background: #e8f4fd;
            color: var(--primary);
        }

        /* ===== 內容區域 ===== */
        .content {
            padding-top: 110px;
            padding-left: 24px;
            padding-right: 24px;
            padding-bottom: 40px;
            max-width: 1400px;
            margin: 0 auto;
            min-height: 100vh;
        }

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

        .page-title {
            font-size: 28px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

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

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

        /* ===== 按鈕 ===== */
        .btn {
            padding: 10px 20px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

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

        .btn-primary:hover {
            transform: scale(1.05);
            box-shadow: var(--shadow-md);
        }

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

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

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

        .btn-icon {
            width: 32px;
            height: 32px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #f1f3f5;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }

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

        /* ===== 統計卡片 ===== */
        .stat-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 24px;
        }

        .stat-card {
            background: white;
            padding: 24px;
            border-radius: 8px;
            box-shadow: var(--shadow-md);
            border-left: 4px solid var(--primary);
            cursor: pointer;
            transition: all 0.3s;
        }

        .stat-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        .stat-value {
            font-size: 36px;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 8px;
        }

        .stat-label {
            font-size: 16px;
            font-weight: 500;
            color: var(--text-primary);
        }

        .stat-sublabel {
            font-size: 13px;
            color: var(--text-light);
            margin-top: 4px;
        }

        /* ===== 區塊容器 ===== */
        .section {
            background: white;
            border-radius: 8px;
            padding: 24px;
            margin-bottom: 24px;
            box-shadow: var(--shadow-md);
        }

        .section-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid #ecf0f1;
        }

        /* ===== 表格 ===== */
        .table-container {
            overflow-x: auto;
        }

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

        thead {
            background: #f8f9fa;
        }

        th {
            padding: 12px;
            text-align: left;
            font-weight: 600;
            color: #5a6c7d;
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            border-bottom: 2px solid #e9ecef;
        }

        td {
            padding: 16px 12px;
            border-bottom: 1px solid #f1f3f5;
            font-size: 14px;
            color: var(--text-body);
        }

        tbody tr {
            cursor: pointer;
            transition: background 0.2s;
        }

        tbody tr:hover {
            background: #f8f9fa;
        }

        /* ===== 徽章 ===== */
        .badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .badge-scratch {
            background: var(--scratch);
            color: white;
        }

        .badge-appinventor {
            background: var(--appinventor);
            color: white;
        }

        /* ===== 狀態標籤 ===== */
        .status-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .status-active {
            background: #d4edda;
            color: #155724;
        }

        .status-pending {
            background: #fff3cd;
            color: #856404;
        }

        .status-completed {
            background: #cce5ff;
            color: #004085;
        }

        .status-archived {
            background: #e2e3e5;
            color: #383d41;
        }

        /* ===== 進度條 ===== */
        .progress-bar {
            width: 120px;
            height: 20px;
            background: #e9ecef;
            border-radius: 10px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--primary-dark));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 11px;
            font-weight: 600;
            transition: width 0.3s;
        }

        /* ===== 篩選列 ===== */
        .filter-bar {
            background: white;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 24px;
            box-shadow: var(--shadow-md);
        }

        .filter-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
            margin-bottom: 12px;
        }

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

        .filter-label {
            font-size: 14px;
            color: var(--text-body);
            font-weight: 500;
        }

        .filter-input,
        .filter-select {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--border-dark);
            border-radius: 4px;
            font-size: 14px;
        }

        .filter-input:focus,
        .filter-select:focus {
            outline: none;
            border-color: var(--primary);
        }

        /* ===== 分段標籤 (Chips) ===== */
        .chips {
            display: flex;
            gap: 12px;
            margin-bottom: 24px;
            flex-wrap: wrap;
        }

        .chip {
            padding: 8px 16px;
            background: #f1f3f5;
            border-radius: 20px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .chip:hover {
            background: #e9ecef;
        }

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

        .chip .count {
            font-weight: 600;
            margin-left: 4px;
        }

        /* ===== 分頁控制 ===== */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            margin-top: 24px;
        }

        .pagination button {
            padding: 8px 12px;
            border: 1px solid var(--border-dark);
            background: white;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .pagination button:hover:not(:disabled) {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .pagination button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .pagination .page-info {
            font-size: 14px;
            color: var(--text-muted);
        }

        /* ===== 模態框 ===== */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: white;
            border-radius: 8px;
            width: 90%;
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
        }

        .modal-header {
            padding: 24px;
            border-bottom: 1px solid #e9ecef;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

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

        .modal-close {
            background: none;
            border: none;
            font-size: 24px;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-body {
            padding: 24px;
        }

        .modal-footer {
            padding: 16px 24px;
            border-top: 1px solid #e9ecef;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        /* ===== 表單 ===== */
        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-size: 14px;
            color: var(--text-body);
            font-weight: 500;
        }

        .form-label .required {
            color: var(--danger);
        }

        .form-input,
        .form-select,
        .form-textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid var(--border-dark);
            border-radius: 4px;
            font-size: 14px;
        }

        .form-input:focus,
        .form-select:focus,
        .form-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        }

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

        .form-error {
            color: var(--danger);
            font-size: 12px;
            margin-top: 4px;
        }

        .form-input.error,
        .form-select.error,
        .form-textarea.error {
            border-color: var(--danger);
        }

        /* ===== 分頁導覽 (Tabs) ===== */
        .tabs {
            display: flex;
            gap: 8px;
            border-bottom: 2px solid #e9ecef;
            margin-bottom: 24px;
        }

        .tab {
            padding: 12px 20px;
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: all 0.3s;
        }

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

        .tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* ===== 組別卡片 ===== */
        .group-card {
            background: #f8f9fa;
            padding: 16px;
            border-radius: 8px;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .group-card:hover {
            background: #e9ecef;
        }

        .group-info {
            flex: 1;
        }

        .group-name {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

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

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

        /* ===== 評分項目列表 ===== */
        .score-items {
            margin-top: 16px;
        }

        .score-item {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr auto;
            gap: 12px;
            align-items: end;
            margin-bottom: 12px;
        }

        /* ===== 獎項設定 ===== */
        .award-settings {
            margin-top: 16px;
        }

        .award-item {
            display: grid;
            grid-template-columns: 2fr 1fr auto;
            gap: 12px;
            align-items: end;
            margin-bottom: 12px;
        }

        /* ===== 時程軸 ===== */
        .timeline {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 24px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .timeline-item {
            flex: 1;
            text-align: center;
            position: relative;
        }

        .timeline-item::after {
            content: '';
            position: absolute;
            top: 20px;
            right: -16px;
            width: 16px;
            height: 2px;
            background: #e9ecef;
        }

        .timeline-item:last-child::after {
            display: none;
        }

        .timeline-item.active .timeline-dot {
            background: var(--primary);
            color: white;
        }

        .timeline-dot {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: white;
            border: 2px solid #e9ecef;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 8px;
            font-weight: 600;
        }

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

        .timeline-date {
            font-size: 12px;
            color: var(--text-light);
            margin-top: 4px;
        }

        /* ===== 空狀態 ===== */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
        }

        .empty-state-icon {
            font-size: 64px;
            color: var(--text-light);
            margin-bottom: 16px;
        }

        .empty-state-text {
            font-size: 16px;
            color: var(--text-muted);
            margin-bottom: 24px;
        }

        /* ===== 下拉選單 ===== */
        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            right: 0;
            background: white;
            border-radius: 4px;
            box-shadow: var(--shadow-lg);
            min-width: 150px;
            display: none;
            z-index: 100;
        }

        .dropdown-menu.show {
            display: block;
        }

        .dropdown-item {
            padding: 10px 16px;
            cursor: pointer;
            font-size: 14px;
            color: var(--text-body);
            border: none;
            background: none;
            width: 100%;
            text-align: left;
        }

        .dropdown-item:hover {
            background: #f8f9fa;
        }

        /* ===== 返回按鈕 ===== */
        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: var(--primary);
            font-size: 14px;
            text-decoration: none;
            margin-bottom: 16px;
            cursor: pointer;
        }

        .back-link:hover {
            text-decoration: underline;
        }

        /* ===== 浮動操作按鈕 ===== */
        /* ===== 報表中心 ===== */
        .reports-container {
            display: flex;
            flex-direction: column;
            gap: 24px;
            margin-bottom: 32px;
        }

        .reports-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            justify-content: space-between;
            align-items: center;
        }

        .reports-tab-group {
            display: inline-flex;
            background: white;
            border-radius: 50px;
            padding: 4px;
            box-shadow: var(--shadow-sm);
            gap: 4px;
        }

        .reports-tab {
            border: none;
            background: transparent;
            padding: 10px 18px;
            border-radius: 40px;
            font-size: 14px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.3s;
            min-width: 100px;
        }

        .reports-tab.active {
            background: var(--primary);
            color: white;
            box-shadow: 0 4px 12px rgba(52, 152, 219, 0.25);
        }

        .reports-quick-export {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .report-section {
            display: none;
        }

        .report-section.active {
            display: block;
        }

        .report-filters {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 16px;
            align-items: end;
        }

        .filter-range {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .filter-range input {
            width: 100%;
        }

        .filter-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .filter-hint {
            margin-top: 12px;
            font-size: 12px;
            color: var(--text-muted);
        }

        .report-cards .stat-card {
            cursor: default;
        }

        .grid-2 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 24px;
        }

        .chart-card {
            background: white;
            border-radius: 12px;
            padding: 24px;
            box-shadow: var(--shadow-md);
            display: flex;
            flex-direction: column;
        }

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

        .chart-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .chart-wrapper {
            position: relative;
            flex: 1;
            min-height: 260px;
        }

        .chart-canvas {
            position: absolute;
            inset: 0;
            width: 100% !important;
            height: 100% !important;
        }

        .filter-checkbox-group {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
        }

        .filter-checkbox-group label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background: white;
            cursor: pointer;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
        }

        .filter-checkbox-group input[type="checkbox"] {
            accent-color: var(--primary);
        }

        .growth-list {
            list-style: none;
            display: grid;
            gap: 12px;
            margin-top: 8px;
        }

        .growth-list li {
            background: white;
            border-radius: 8px;
            padding: 12px 16px;
            box-shadow: var(--shadow-sm);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
        }

        .export-panel {
            background: white;
            border-radius: 12px;
            padding: 20px 24px;
            display: flex;
            gap: 16px;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            box-shadow: var(--shadow-md);
        }

        .export-label {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .export-select {
            padding: 8px 12px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background: white;
            font-size: 14px;
            min-width: 120px;
        }

        .export-hint {
            margin-top: 8px;
            font-size: 12px;
            color: var(--text-muted);
        }

        .quick-export-buttons {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        @media (max-width: 768px) {
            .reports-toolbar {
                flex-direction: column;
                align-items: stretch;
            }

            .reports-quick-export {
                justify-content: flex-start;
            }

            .filter-actions {
                justify-content: flex-start;
            }

            .export-panel {
                flex-direction: column;
                align-items: stretch;
            }
        }

        .fab {
            position: fixed;
            bottom: 32px;
            right: 32px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            border: none;
            font-size: 24px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
            transition: all 0.3s;
            z-index: 900;
            display: none;
        }

        .fab:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
        }

        /* ===== 載入動畫 ===== */
        .loading {
            text-align: center;
            padding: 40px;
            color: var(--text-muted);
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 16px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* ===== 響應式設計 ===== */
        @media (max-width: 768px) {
            .content {
                padding-left: 16px;
                padding-right: 16px;
            }

            .stat-cards {
                grid-template-columns: 1fr;
            }

            .page-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 16px;
            }

            .filter-row {
                grid-template-columns: 1fr;
            }

            .table-container {
                overflow-x: scroll;
            }

            .modal-content {
                width: 95%;
                max-height: 95vh;
            }

            .timeline {
                flex-direction: column;
            }

            .timeline-item::after {
                display: none;
            }
        }

        /* ===== 工具類 ===== */
        .hidden {
            display: none !important;
        }

        .text-center {
            text-align: center;
        }

        .text-right {
            text-align: right;
        }

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

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

        .flex {
            display: flex;
        }

        .items-center {
            align-items: center;
        }

        .justify-between {
            justify-content: space-between;
        }

        .gap-12 {
            gap: 12px;
        }

        /* ===== 表格操作按鈕樣式 ===== */
        .action-btn {
            padding: 6px 14px;
            border: none;
            border-radius: 4px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            margin: 0 3px;
        }

        .action-btn:hover {
            opacity: 0.85;
        }

        .action-btn:active {
            opacity: 1;
        }

        /* 主要操作按鈕（藍色） */
        .action-btn-primary {
            background: #3498db;
            color: white;
        }

        .action-btn-primary:hover {
            background: #2980b9;
            opacity: 1;
        }

        /* 資訊按鈕（淺藍色） */
        .action-btn-info {
            background: #5dade2;
            color: white;
        }

        .action-btn-info:hover {
            background: #3498db;
            opacity: 1;
        }

        /* 移除按鈕（藍色邊框樣式） */
        .action-btn-danger {
            background: transparent;
            color: #3498db;
            border: 1px solid #3498db;
        }

        .action-btn-danger:hover {
            background: #3498db;
            color: white;
            opacity: 1;
        }
