:root {
            --primary: #1a73e8;
            --primary-dark: #1557b0;
            --primary-light: #e8f0fe;
            --accent: #ff6d00;
            --accent-light: #fff3e0;
            --danger: #d93025;
            --danger-light: #fce8e6;
            --success: #1e8e3e;
            --success-light: #e6f4ea;
            --warning: #f9ab00;
            --warning-light: #fef7e0;
            --bg: #f8f9fa;
            --card-bg: #ffffff;
            --text: #202124;
            --text-secondary: #5f6368;
            --border: #e0e0e0;
            --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
            --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
            --radius: 12px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #1565c0 100%);
            color: white;
            padding: 0;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }

        .header-inner {
            max-width: 1200px;
            margin: 0 auto;
            padding: 16px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .header h1 {
            font-size: 20px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .header-badge {
            background: rgba(255,255,255,0.2);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
        }

        /* Navigation Tabs */
        .nav-tabs {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 24px;
            display: flex;
            flex-wrap: nowrap;
            gap: 0;
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
            scrollbar-color: rgba(255,255,255,0.45) rgba(255,255,255,0.12);
            scrollbar-width: thin;
        }

        .nav-tabs::-webkit-scrollbar {
            height: 6px;
        }

        .nav-tabs::-webkit-scrollbar-track {
            background: rgba(255,255,255,0.12);
        }

        .nav-tabs::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.45);
            border-radius: 999px;
        }

        .nav-tab {
            flex: 0 0 auto;
            padding: 12px 20px;
            color: rgba(255,255,255,0.7);
            cursor: pointer;
            white-space: nowrap;
            font-size: 14px;
            font-weight: 500;
            border-bottom: 3px solid transparent;
            transition: all 0.2s;
            user-select: none;
        }

        .nav-tab:hover {
            color: white;
            background: rgba(255,255,255,0.1);
        }

        .nav-tab.active {
            color: white;
            border-bottom-color: var(--accent);
        }

        /* Main Content */
        .main {
            max-width: 1200px;
            margin: 0 auto;
            padding: 24px;
        }

        .section {
            display: none;
        }

        .section.active {
            display: block;
        }

        /* Section Title */
        .section-header {
            margin-bottom: 24px;
        }

        .section-header h2 {
            font-size: 24px;
            font-weight: 700;
            color: var(--text);
            margin-bottom: 4px;
        }

        .section-header p {
            color: var(--text-secondary);
            font-size: 14px;
        }

        #section-exam > .section-header {
            max-width: 860px;
            margin-left: auto;
            margin-right: auto;
        }

        #section-records > .section-header {
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
        }

        #section-doclib > .section-header {
            max-width: 960px;
            margin-left: auto;
            margin-right: auto;
        }

        /* Cards */
        .card {
            background: var(--card-bg);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            margin-bottom: 20px;
            overflow: hidden;
            transition: box-shadow 0.2s;
        }

        .card:hover {
            box-shadow: var(--shadow-hover);
        }

        .card-header {
            padding: 16px 20px;
            font-weight: 600;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid var(--border);
        }

        .card-header .icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
        }

        .card-body {
            padding: 20px;
        }

        /* Feature Grid */
        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 16px;
        }

        .feature-item {
            background: var(--primary-light);
            border-radius: 10px;
            padding: 20px;
            text-align: center;
        }

        .feature-item .icon {
            font-size: 36px;
            margin-bottom: 12px;
        }

        .feature-item h3 {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .feature-item p {
            font-size: 13px;
            color: var(--text-secondary);
        }

        /* Product Structure */
        .structure-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 12px;
        }

        .structure-item {
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 14px;
            font-size: 13px;
            transition: all 0.2s;
        }

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

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

        .structure-item .desc {
            color: var(--text-secondary);
            font-size: 12px;
        }

        /* Safety Section */
        .safety-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 16px;
        }

        .safety-item {
            display: flex;
            gap: 12px;
            padding: 16px;
            border-radius: 10px;
            border: 1px solid var(--border);
        }

        .safety-item.warning {
            background: var(--warning-light);
            border-color: var(--warning);
        }

        .safety-item.danger {
            background: var(--danger-light);
            border-color: var(--danger);
        }

        .safety-item.success {
            background: var(--success-light);
            border-color: var(--success);
        }

        .safety-icon {
            font-size: 28px;
            flex-shrink: 0;
        }

        .safety-text h4 {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 4px;
        }

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

        /* Error Code Table */
        .error-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        .error-table th {
            background: var(--primary);
            color: white;
            padding: 10px 14px;
            text-align: left;
            font-weight: 600;
            position: sticky;
            top: 0;
        }

        .error-table td {
            padding: 10px 14px;
            border-bottom: 1px solid var(--border);
            vertical-align: top;
        }

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

        .error-code {
            display: inline-block;
            background: var(--danger);
            color: white;
            padding: 2px 10px;
            border-radius: 4px;
            font-weight: 700;
            font-size: 13px;
            font-family: 'Courier New', monospace;
        }

        .error-fault {
            display: inline-block;
            background: var(--warning-light);
            color: var(--text);
            padding: 2px 8px;
            border-radius: 4px;
            font-weight: 500;
            font-size: 12px;
        }

        /* Fault Card */
        .fault-card {
            border-left: 4px solid var(--danger);
            margin-bottom: 16px;
        }

        .fault-card .card-header {
            background: var(--danger-light);
            color: var(--danger);
        }

        .fault-section {
            margin-bottom: 12px;
        }

        .fault-section h4 {
            font-size: 13px;
            font-weight: 700;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .fault-section h4 .label {
            display: inline-block;
            padding: 1px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 600;
        }

        .fault-section.phenomenon h4 .label { background: var(--danger-light); color: var(--danger); }
        .fault-section.cause h4 .label { background: var(--warning-light); color: #e65100; }
        .fault-section.solution h4 .label { background: var(--success-light); color: var(--success); }

        .fault-section ul {
            padding-left: 20px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .fault-section ul li {
            margin-bottom: 4px;
        }

        .fault-note {
            background: var(--warning-light);
            border: 1px solid var(--warning);
            border-radius: 6px;
            padding: 10px 14px;
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 10px;
        }

        .fault-note::before {
            content: "⚠️ ";
        }

        /* FAQ */
        .faq-item {
            margin-bottom: 12px;
        }

        .faq-question {
            background: var(--bg);
            padding: 14px 16px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.2s;
        }

        .faq-question:hover {
            background: var(--primary-light);
        }

        .faq-question .arrow {
            transition: transform 0.2s;
        }

        .faq-question.open .arrow {
            transform: rotate(180deg);
        }

        .faq-answer {
            padding: 14px 16px;
            font-size: 13px;
            color: var(--text-secondary);
            border-left: 3px solid var(--primary);
            margin-left: 8px;
            display: none;
        }

        .faq-answer.open {
            display: block;
        }

        /* Maintenance */
        .maintenance-timeline {
            position: relative;
            padding-left: 30px;
        }

        .maintenance-timeline::before {
            content: '';
            position: absolute;
            left: 10px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--primary);
        }

        .timeline-item {
            position: relative;
            margin-bottom: 24px;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: -24px;
            top: 6px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--primary);
            border: 2px solid white;
            box-shadow: 0 0 0 2px var(--primary);
        }

        .timeline-item h4 {
            font-size: 15px;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 8px;
        }

        .timeline-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 10px;
        }

        .timeline-task {
            background: var(--bg);
            border-radius: 8px;
            padding: 12px;
            font-size: 13px;
            display: flex;
            align-items: flex-start;
            gap: 8px;
        }

        .timeline-task .check {
            color: var(--success);
            flex-shrink: 0;
        }

        /* Cleaning Frequency Table */
        .freq-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        .freq-table th {
            background: var(--primary);
            color: white;
            padding: 10px 14px;
            text-align: left;
            font-weight: 600;
        }

        .freq-table td {
            padding: 10px 14px;
            border-bottom: 1px solid var(--border);
        }

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

        .freq-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
        }

        .freq-badge.daily { background: #e8f5e9; color: #2e7d32; }
        .freq-badge.weekly { background: #e3f2fd; color: #1565c0; }
        .freq-badge.monthly { background: #fff3e0; color: #e65100; }
        .freq-badge.periodic { background: #fce4ec; color: #c62828; }
        .freq-badge.auto { background: #f3e5f5; color: #6a1b9a; }
        .freq-badge.cups { background: #e0f2f1; color: #00695c; }

        /* Step Cards */
        .step-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .step-item {
            display: flex;
            gap: 16px;
            padding: 16px;
            background: var(--bg);
            border-radius: 10px;
            border: 1px solid var(--border);
        }

        .step-num {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 14px;
            flex-shrink: 0;
        }

        .step-content h4 {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .step-content p {
            font-size: 13px;
            color: var(--text-secondary);
        }

        /* Cleaning Method Cards */
        .method-cards {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

        .method-card {
            border-radius: var(--radius);
            border: 2px solid var(--border);
            overflow: hidden;
            cursor: pointer;
            transition: all 0.2s;
        }

        .method-card:hover {
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: var(--shadow-hover);
        }

        .method-card.active {
            border-color: var(--primary);
        }

        .method-header {
            padding: 16px 20px;
            font-weight: 600;
            font-size: 15px;
            text-align: center;
        }

        .method-card:nth-child(1) .method-header {
            background: var(--primary);
            color: white;
        }

        .method-card:nth-child(2) .method-header {
            background: #ff6d00;
            color: white;
        }

        .method-body {
            padding: 16px 20px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .method-detail {
            display: none;
        }

        .method-detail.active {
            display: block;
        }

        /* Tools Grid */
        .tools-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 12px;
        }

        .tool-item {
            background: var(--bg);
            border-radius: 10px;
            padding: 16px;
            text-align: center;
        }

        .tool-item .icon {
            font-size: 32px;
            margin-bottom: 8px;
        }

        .tool-item h4 {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .tool-item p {
            font-size: 11px;
            color: var(--text-secondary);
        }

        /* Troubleshooting Steps */
        .ts-steps {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .ts-step {
            flex: 1;
            min-width: 180px;
            background: var(--primary-light);
            border-radius: 10px;
            padding: 16px;
            text-align: center;
            position: relative;
        }

        .ts-step:not(:last-child)::after {
            content: '→';
            position: absolute;
            right: -10px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--primary);
            font-size: 18px;
            font-weight: 700;
        }

        .ts-step .num {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
            margin-bottom: 8px;
        }

        .ts-step h4 {
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 4px;
        }

        .ts-step p {
            font-size: 11px;
            color: var(--text-secondary);
        }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            border: none;
            transition: all 0.2s;
        }

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

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

        /* Footer */
        .footer {
            text-align: center;
            padding: 24px;
            color: var(--text-secondary);
            font-size: 12px;
            border-top: 1px solid var(--border);
            margin-top: 40px;
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: #ccc;
            border-radius: 3px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #999;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .method-cards {
                grid-template-columns: 1fr;
            }

            .header h1 {
                font-size: 16px;
            }

            .nav-tab {
                padding: 10px 14px;
                font-size: 13px;
            }

            .ts-steps {
                flex-direction: column;
            }

            .ts-step:not(:last-child)::after {
                display: none;
            }
        }

        /* Search */
        .search-box {
            position: relative;
            max-width: 400px;
        }

        .search-box input {
            width: 100%;
            padding: 8px 14px 8px 36px;
            border: none;
            border-radius: 20px;
            font-size: 14px;
            outline: none;
            background: rgba(255,255,255,0.15);
            color: white;
            transition: background 0.2s;
        }

        .search-box input::placeholder {
            color: rgba(255,255,255,0.5);
        }

        .search-box input:focus {
            background: rgba(255,255,255,0.25);
        }

        .search-box .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: rgba(255,255,255,0.5);
        }

        /* Highlight search */
        .highlight {
            background: #ffeb3b;
            padding: 1px 2px;
            border-radius: 2px;
        }

        /* Quick Access */
        .quick-access {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .quick-btn {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            border: 1px solid var(--border);
            background: white;
            color: var(--text);
            transition: all 0.2s;
        }

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

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

        /* Record Form */
        .record-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }

        .record-table th, .record-table td {
            padding: 8px;
            border: 1px solid var(--border);
            text-align: center;
        }

        .record-table th {
            background: var(--primary-light);
            font-weight: 600;
            color: var(--primary);
        }

        .record-table .check-cell {
            width: 20px;
            height: 20px;
            border: 1px solid var(--border);
            border-radius: 3px;
            cursor: pointer;
            margin: 0 auto;
        }

        /* Edit bar in nav */
        .edit-bar {
            display: flex;
            gap: 6px;
            align-items: center;
            margin-left: auto;
        }

        .edit-bar button {
            padding: 6px 14px;
            border-radius: 6px;
            border: 1px solid rgba(255,255,255,0.3);
            background: rgba(255,255,255,0.12);
            color: white;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 4px;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .edit-bar button:hover {
            background: rgba(255,255,255,0.25);
        }

        .edit-bar button.btn-save {
            background: var(--success);
            border-color: var(--success);
        }

        .edit-bar button.btn-download {
            background: var(--accent);
            border-color: var(--accent);
        }

        .edit-bar button.btn-reset {
            background: #757575;
            border-color: #757575;
        }

        .edit-bar .edit-status {
            color: rgba(255,255,255,0.7);
            font-size: 11px;
            padding: 0 8px;
        }

        .edit-bar .edit-status.has-changes {
            color: #ffab40;
            font-weight: 600;
        }

        /* Editable states */
        body.edit-mode .section-header h2,
        body.edit-mode .section-header p,
        body.edit-mode .card-header,
        body.edit-mode .card-body p,
        body.edit-mode .card-body li,
        body.edit-mode .feature-item h3,
        body.edit-mode .feature-item p,
        body.edit-mode .structure-item .name,
        body.edit-mode .structure-item .desc,
        body.edit-mode .safety-text h4,
        body.edit-mode .safety-text p,
        body.edit-mode .faq-question,
        body.edit-mode .faq-answer,
        body.edit-mode .timeline-item h4,
        body.edit-mode .timeline-task,
        body.edit-mode .step-content h4,
        body.edit-mode .step-content p,
        body.edit-mode .tool-item h4,
        body.edit-mode .tool-item p,
        body.edit-mode .ts-step h4,
        body.edit-mode .ts-step p,
        body.edit-mode .fault-section h4,
        body.edit-mode .fault-section li,
        body.edit-mode .fault-note,
        body.edit-mode .method-header,
        body.edit-mode .method-body,
        body.edit-mode .record-table th,
        body.edit-mode .error-table td,
        body.edit-mode .freq-table td,
        body.edit-mode .footer p {
            outline: 2px dashed transparent;
            outline-offset: 2px;
            transition: outline-color 0.2s, background 0.2s;
            cursor: text;
            min-height: 1em;
        }

        body.edit-mode [contenteditable="true"]:hover {
            outline-color: var(--primary);
            background: rgba(26,115,232,0.04);
        }

        body.edit-mode [contenteditable="true"]:focus {
            outline-color: var(--accent);
            background: #fffde7;
            border-radius: 4px;
        }

        /* Toast */
        .toast {
            position: fixed;
            top: 80px;
            left: 50%;
            transform: translateX(-50%) translateY(-20px);
            background: #323232;
            color: white;
            padding: 10px 24px;
            border-radius: 8px;
            font-size: 14px;
            z-index: 2000;
            opacity: 0;
            transition: all 0.3s ease;
            pointer-events: none;
        }

        .toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        /* Modal */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 3000;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
        }

        .modal-overlay.show {
            opacity: 1;
            pointer-events: auto;
        }

        .modal {
            background: white;
            border-radius: 16px;
            padding: 28px;
            max-width: 420px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            transform: scale(0.9);
            transition: transform 0.2s;
        }

        .modal-overlay.show .modal {
            transform: scale(1);
        }

        .modal h3 {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 12px;
        }

        .modal p {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 20px;
            line-height: 1.6;
        }

        .modal-btns {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
        }

        .modal-btns button {
            padding: 8px 20px;
            border-radius: 8px;
            border: none;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .modal-btns .btn-cancel {
            background: var(--bg);
            color: var(--text);
        }

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

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

        /* ===== Exam Module ===== */
        .exam-wrapper {
            max-width: 860px;
            margin: 0 auto;
        }

        .exam-start-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px;
            padding: 48px;
            text-align: center;
            color: white;
            margin-bottom: 24px;
        }

        .exam-start-card h3 {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 12px;
        }

        .exam-start-card p {
            font-size: 15px;
            opacity: 0.9;
            margin-bottom: 8px;
        }

        .exam-meta {
            display: flex;
            justify-content: center;
            gap: 32px;
            margin: 28px 0;
            flex-wrap: wrap;
        }

        .exam-meta-item {
            background: rgba(255,255,255,0.15);
            border-radius: 12px;
            padding: 12px 24px;
            text-align: center;
        }

        .exam-meta-item .num {
            font-size: 28px;
            font-weight: 700;
            display: block;
        }

        .exam-meta-item .label {
            font-size: 12px;
            opacity: 0.8;
        }

        .exam-name-input-wrap {
            display: flex;
            gap: 12px;
            max-width: 400px;
            margin: 0 auto 20px;
        }

        .exam-name-input-wrap input {
            flex: 1;
            padding: 12px 16px;
            border-radius: 10px;
            border: 2px solid rgba(255,255,255,0.3);
            background: rgba(255,255,255,0.15);
            color: white;
            font-size: 15px;
            outline: none;
        }

        .exam-name-input-wrap input::placeholder {
            color: rgba(255,255,255,0.6);
        }

        .exam-name-input-wrap input:focus {
            border-color: rgba(255,255,255,0.7);
            background: rgba(255,255,255,0.2);
        }

        .btn-start-exam {
            background: white;
            color: #764ba2;
            border: none;
            padding: 14px 40px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-start-exam:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        }

        .exam-best-score {
            display: inline-block;
            margin-top: 16px;
            background: rgba(255,255,255,0.2);
            border-radius: 8px;
            padding: 6px 18px;
            font-size: 13px;
        }

        /* Quiz in progress */
        .quiz-container {
            display: none;
        }

        .quiz-container.active {
            display: block;
        }

        .quiz-progress-bar-wrap {
            background: #e0e0e0;
            border-radius: 99px;
            height: 8px;
            margin-bottom: 6px;
        }

        .quiz-progress-bar {
            background: linear-gradient(90deg, #667eea, #764ba2);
            height: 100%;
            border-radius: 99px;
            transition: width 0.4s ease;
        }

        .quiz-progress-text {
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 20px;
            text-align: right;
        }

        .quiz-question-card {
            background: white;
            border-radius: 16px;
            padding: 28px;
            margin-bottom: 16px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
            border: 2px solid transparent;
            transition: border-color 0.2s;
        }

        .quiz-question-card.answered-correct {
            border-color: var(--success);
        }

        .quiz-question-card.answered-wrong {
            border-color: var(--danger);
        }

        .quiz-q-header {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            margin-bottom: 16px;
        }

        .quiz-q-num {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
            flex-shrink: 0;
        }

        .quiz-q-score {
            background: #fff3e0;
            color: #e65100;
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            flex-shrink: 0;
            margin-top: 6px;
        }

        .quiz-q-text {
            font-size: 15px;
            font-weight: 600;
            color: var(--text);
            line-height: 1.6;
            flex: 1;
        }

        .quiz-options {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .quiz-option {
            padding: 12px 16px;
            border-radius: 10px;
            border: 2px solid var(--border);
            cursor: pointer;
            font-size: 14px;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            gap: 10px;
            background: white;
        }

        .quiz-option:hover:not(.disabled) {
            border-color: #667eea;
            background: #f3f4fd;
        }

        .quiz-option.selected {
            border-color: #667eea;
            background: #f3f4fd;
        }

        .quiz-option.correct {
            border-color: var(--success);
            background: #e8f5e9;
            color: #2e7d32;
        }

        .quiz-option.wrong {
            border-color: var(--danger);
            background: #ffebee;
            color: #c62828;
        }

        .quiz-option.disabled {
            cursor: default;
        }

        .option-letter {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #eeeeee;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 700;
            flex-shrink: 0;
        }

        .quiz-option.selected .option-letter,
        .quiz-option.correct .option-letter {
            background: var(--success);
            color: white;
        }

        .quiz-option.wrong .option-letter {
            background: var(--danger);
            color: white;
        }

        .quiz-explain {
            margin-top: 12px;
            padding: 10px 14px;
            background: #fff8e1;
            border-left: 3px solid #ffc107;
            border-radius: 0 8px 8px 0;
            font-size: 13px;
            color: #6d4c00;
            display: none;
        }

        .quiz-explain.show {
            display: block;
        }

        .quiz-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 24px;
            flex-wrap: wrap;
            gap: 12px;
        }

        .btn-submit-exam {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 14px 36px;
            border-radius: 12px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-submit-exam:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(118,75,162,0.4);
        }

        .btn-submit-exam:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .quiz-answered-count {
            font-size: 13px;
            color: var(--text-secondary);
        }

        /* Result card */
        .exam-result-card {
            background: white;
            border-radius: 20px;
            padding: 40px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            margin-bottom: 24px;
            display: none;
        }

        .exam-result-card.show {
            display: block;
        }

        .result-score-circle {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            margin: 0 auto 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            font-weight: 800;
        }

        .result-score-circle.pass {
            background: linear-gradient(135deg, #56ab2f, #a8e063);
            color: white;
        }

        .result-score-circle.fail {
            background: linear-gradient(135deg, #f093fb, #f5576c);
            color: white;
        }

        .result-score-circle .score-label {
            font-size: 13px;
            font-weight: 500;
            opacity: 0.9;
        }

        .result-info {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .result-detail {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 24px;
        }

        .result-best-badge {
            display: inline-block;
            background: #fff3cd;
            border: 1px solid #ffc107;
            color: #856404;
            padding: 4px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 24px;
        }

        .result-btns {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .result-btns button {
            padding: 12px 28px;
            border-radius: 10px;
            border: none;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-retry {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .btn-review {
            background: var(--bg);
            color: var(--text);
            border: 1px solid var(--border) !important;
        }

        .btn-view-records {
            background: #fff3e0;
            color: #e65100;
        }

        /* ===== Records Module ===== */
        .records-wrapper {
            max-width: 900px;
            margin: 0 auto;
        }

        .records-header-card {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            border-radius: 20px;
            padding: 32px;
            color: white;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
        }

        .records-header-card h3 {
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 6px;
        }

        .records-header-card p {
            font-size: 13px;
            opacity: 0.85;
        }

        .records-stats {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }

        .records-stat-item {
            background: rgba(255,255,255,0.2);
            border-radius: 12px;
            padding: 12px 20px;
            text-align: center;
            min-width: 80px;
        }

        .records-stat-item .stat-num {
            font-size: 24px;
            font-weight: 800;
            display: block;
        }

        .records-stat-item .stat-label {
            font-size: 11px;
            opacity: 0.85;
        }

        .records-filter-bar {
            display: flex;
            gap: 10px;
            margin-bottom: 16px;
            flex-wrap: wrap;
            align-items: center;
        }

        .records-filter-bar input {
            flex: 1;
            min-width: 150px;
            padding: 9px 14px;
            border-radius: 8px;
            border: 1px solid var(--border);
            font-size: 13px;
            outline: none;
        }

        .records-filter-bar input:focus {
            border-color: var(--primary);
        }

        .records-filter-bar select {
            padding: 9px 14px;
            border-radius: 8px;
            border: 1px solid var(--border);
            font-size: 13px;
            background: white;
            cursor: pointer;
            outline: none;
        }

        .btn-clear-records {
            padding: 9px 16px;
            border-radius: 8px;
            border: 1px solid #ffcdd2;
            background: #fff5f5;
            color: var(--danger);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .btn-clear-records:hover {
            background: #ffebee;
        }

        .records-table-wrap {
            background: white;
            border-radius: 16px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.06);
            overflow: hidden;
        }

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

        .records-table th {
            background: #f5f5f5;
            padding: 12px 16px;
            text-align: left;
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 600;
            border-bottom: 1px solid var(--border);
        }

        .records-table th:nth-child(3),
        .records-table td:nth-child(3) {
            text-align: center;
        }

        .records-table td {
            padding: 13px 16px;
            font-size: 14px;
            border-bottom: 1px solid #f0f0f0;
        }

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

        .records-table tr:hover td {
            background: #fafafa;
        }

        .score-badge {
            display: inline-block;
            padding: 3px 12px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 700;
        }

        .score-badge.excellent {
            background: #e8f5e9;
            color: #2e7d32;
        }

        .score-badge.good {
            background: #e3f2fd;
            color: #1565c0;
        }

        .score-badge.pass {
            background: #fff3e0;
            color: #e65100;
        }

        .score-badge.fail {
            background: #ffebee;
            color: #c62828;
        }

        .best-mark {
            display: inline-block;
            background: #fff3cd;
            color: #856404;
            font-size: 10px;
            padding: 1px 6px;
            border-radius: 4px;
            margin-left: 6px;
            font-weight: 600;
        }

        .records-empty {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-secondary);
        }

        .records-empty .empty-icon {
            font-size: 48px;
            margin-bottom: 12px;
        }

        .rank-num {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            font-weight: 700;
        }

        .rank-num.gold { background: #ffd700; color: #7b5800; }
        .rank-num.silver { background: #c0c0c0; color: #444; }
        .rank-num.bronze { background: #cd7f32; color: white; }
        .rank-num.normal { background: #eeeeee; color: #666; }

        .records-pagination {
            display: flex;
            justify-content: center;
            gap: 6px;
            padding: 16px;
            border-top: 1px solid var(--border);
        }

        .records-pagination button {
            padding: 6px 12px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: white;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.15s;
        }

        .records-pagination button:hover,
        .records-pagination button.current {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .records-pagination button:disabled {
            opacity: 0.4;
            cursor: default;
            background: white;
            color: inherit;
        }

        /* ===== 资料库 ===== */
        .docs-wrapper {
            max-width: 960px;
            margin: 0 auto;
        }

        .docs-header-card {
            background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
            border-radius: 20px;
            padding: 28px 32px;
            color: white;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
        }

        .docs-header-card h3 {
            font-size: 22px;
            font-weight: 700;
            margin-bottom: 4px;
        }

        .docs-header-card p {
            font-size: 13px;
            opacity: 0.9;
        }

        .docs-stats {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }

        .docs-stat-item {
            background: rgba(255,255,255,0.2);
            border-radius: 12px;
            padding: 10px 18px;
            text-align: center;
            min-width: 70px;
        }

        .docs-stat-item .stat-num {
            font-size: 22px;
            font-weight: 800;
            display: block;
        }

        .docs-stat-item .stat-label {
            font-size: 11px;
            opacity: 0.85;
        }

        .docs-toolbar {
            display: flex;
            gap: 10px;
            margin-bottom: 16px;
            flex-wrap: wrap;
            align-items: center;
        }

        .docs-search {
            flex: 1;
            min-width: 200px;
            padding: 9px 14px;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 14px;
            outline: none;
            transition: border-color 0.2s;
        }

        .docs-search:focus { border-color: #11998e; }

        .docs-filter-select {
            padding: 9px 12px;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 13px;
            outline: none;
            background: white;
            cursor: pointer;
        }

        .btn-upload {
            background: linear-gradient(135deg, #11998e, #38ef7d);
            color: white;
            border: none;
            padding: 9px 18px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.1s;
            white-space: nowrap;
        }

        .btn-upload:hover { opacity: 0.88; transform: translateY(-1px); }

        .docs-drop-zone {
            border: 2px dashed #38ef7d;
            border-radius: 14px;
            padding: 16px 24px;
            text-align: center;
            background: #f0fdf9;
            margin-bottom: 20px;
            cursor: pointer;
            transition: background 0.2s, border-color 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            flex-wrap: wrap;
        }

        .docs-drop-zone.drag-over {
            background: #d0faf0;
            border-color: #11998e;
        }

        .docs-drop-zone .drop-icon { font-size: 26px; margin-bottom: 0; }
        .docs-drop-zone p { color: #11998e; font-size: 14px; font-weight: 500; margin: 0; }
        .docs-drop-zone small { color: var(--text-secondary); font-size: 12px; }

        .docs-table-wrap {
            background: white;
            border-radius: 14px;
            border: 1px solid var(--border);
            overflow: hidden;
            box-shadow: var(--shadow);
        }

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

        .docs-table th {
            background: #f5f5f5;
            padding: 12px 14px;
            text-align: left;
            font-weight: 600;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            user-select: none;
            white-space: nowrap;
        }

        .docs-table th:hover { background: #ececec; }
        .docs-table th .sort-arrow { margin-left: 4px; opacity: 0.5; }

        .docs-table td {
            padding: 12px 14px;
            border-bottom: 1px solid #f0f0f0;
            vertical-align: middle;
        }

        .docs-table tr:last-child td { border-bottom: none; }
        .docs-table tr:hover td { background: #f8fdf9; }

        .doc-type-badge {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
        }

        .doc-type-badge.doc  { background: #e3f2fd; color: #1565c0; }
        .doc-type-badge.pdf  { background: #fce8e6; color: #c62828; }
        .doc-type-badge.ppt  { background: #fff3e0; color: #e65100; }
        .doc-type-badge.img  { background: #f3e5f5; color: #6a1b9a; }
        .doc-type-badge.video{ background: #fce4ec; color: #880e4f; }
        .doc-type-badge.xls  { background: #e8f5e9; color: #2e7d32; }
        .doc-type-badge.other{ background: #f5f5f5; color: #616161; }

        .doc-name-cell {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .doc-icon { font-size: 20px; flex-shrink: 0; }

        .docs-action-btn {
            border: none;
            padding: 5px 10px;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
            transition: opacity 0.2s;
            margin-right: 4px;
        }

        .docs-action-btn:hover { opacity: 0.75; }
        .docs-action-btn.btn-dl  { background: #e3f2fd; color: #1565c0; }
        .docs-action-btn.btn-del { background: #fce8e6; color: #c62828; }
        .docs-action-btn.btn-preview { background: #f3e5f5; color: #6a1b9a; }

        .docs-empty {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-secondary);
        }

        .docs-empty .empty-icon { font-size: 52px; margin-bottom: 12px; }
        .docs-empty p { font-size: 15px; }
        .docs-empty small { font-size: 12px; }

        .docs-pager {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 6px;
            padding: 14px 16px;
            background: #fafafa;
            border-top: 1px solid var(--border);
            font-size: 13px;
            color: var(--text-secondary);
        }

        .docs-pager button {
            border: 1px solid var(--border);
            background: white;
            padding: 4px 10px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
        }

        .docs-pager button:hover:not(:disabled) { background: #11998e; color: white; border-color: #11998e; }
        .docs-pager button:disabled { opacity: 0.4; cursor: default; }

        .upload-progress-bar {
            width: 100%;
            height: 4px;
            background: #e0e0e0;
            border-radius: 2px;
            margin-top: 6px;
            overflow: hidden;
            display: none;
        }

        .upload-progress-bar .bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #11998e, #38ef7d);
            border-radius: 2px;
            transition: width 0.3s;
            width: 0%;
        }
    
