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

body {
    font-family: 'Sarabun', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
}

.logo-icon {
    font-size: 2.5em;
}

.logo h1 {
    color: #1a1a2e;
    font-size: 1.5em;
}

.logo p {
    color: #666;
    font-size: 0.9em;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #667eea;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    background: #f0f4ff;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card.pending { border-left: 4px solid #f39c12; }
.stat-card.approved { border-left: 4px solid #27ae60; }
.stat-card.rejected { border-left: 4px solid #e74c3c; }
.stat-card.total { border-left: 4px solid #667eea; }

.stat-icon {
    font-size: 2.5em;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2em;
    font-weight: 700;
    color: #1a1a2e;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

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

.tab:hover:not(.active) {
    background: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Panel */
.panel {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.panel-header h2 {
    color: #1a1a2e;
}

.panel-desc {
    color: #666;
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    background: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.filter-btn:hover:not(.active) {
    background: #e0e0e0;
}

/* Submissions List */
.submissions-list {
    max-height: 600px;
    overflow-y: auto;
}

.submission-card {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid #667eea;
}

.submission-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.submission-card.status-approved { border-left-color: #27ae60; }
.submission-card.status-pending { border-left-color: #f39c12; }
.submission-card.status-rejected { border-left-color: #e74c3c; }

.organizer-card {
    background: #f0fff4;
}

.submission-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.submission-main h4 {
    color: #1a1a2e;
    font-size: 1.1em;
}

.submission-info {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.submission-date {
    font-size: 0.85em;
    color: #999;
}

.submission-skills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.skill-mini {
    background: #e8f0ff;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
}

.skill-more {
    background: #ddd;
    color: #666;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.status-badge.approved { background: #d4edda; color: #155724; }
.status-badge.pending { background: #fff3cd; color: #856404; }
.status-badge.rejected { background: #f8d7da; color: #721c24; }
.status-badge.draft { background: #e2e3e5; color: #383d41; }

/* Transfer Section */
.transfer-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

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

.transfer-number {
    display: block;
    font-size: 3em;
    font-weight: 700;
    color: #667eea;
}

.transfer-label {
    color: #666;
}

.btn-transfer {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-transfer:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.4);
}

.transfer-log {
    margin-top: 25px;
    background: #1a1a2e;
    border-radius: 10px;
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.9em;
}

.log-success { color: #2ecc71; margin-bottom: 5px; }
.log-error { color: #e74c3c; margin-bottom: 5px; }
.log-complete { color: #f39c12; margin-top: 15px; font-weight: bold; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.detail-modal {
    max-width: 800px;
}

.reject-modal {
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.modal-header h3 {
    color: #1a1a2e;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: white;
}

/* Detail Sections */
.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    background: #f8f9ff;
    padding: 12px 15px;
    border-radius: 8px;
}

.detail-item.full {
    grid-column: 1 / -1;
}

.detail-item label {
    display: block;
    font-size: 0.8em;
    color: #666;
    margin-bottom: 5px;
}

.description-text {
    white-space: pre-wrap;
    line-height: 1.6;
    color: #333;
}

.evidence-link {
    color: #667eea;
    text-decoration: none;
    padding: 10px 15px;
    background: #f0f4ff;
    border-radius: 8px;
    display: inline-block;
}

.evidence-link:hover {
    background: #e0e8ff;
}

.skills-display {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: #e8f0ff;
    color: #667eea;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.no-skills {
    color: #999;
    font-style: italic;
}

.student-ids-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9em;
    max-height: 150px;
    overflow-y: auto;
}

/* Skills Editor */
.skills-editor {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 15px;
}

.skill-editor-list {
    max-height: 300px;
    overflow-y: auto;
}

.skill-editor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 5px;
    background: white;
    border-radius: 6px;
}

.skill-editor-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.skill-checkbox {
    width: 18px;
    height: 18px;
}

.skill-level-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.skill-level-select:disabled {
    background: #f5f5f5;
    color: #999;
}

/* Buttons */
.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #ddd;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

/* Reject Modal */
.reject-modal textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    resize: vertical;
    margin-top: 10px;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.loading-overlay.show {
    display: flex;
}

.loading-box {
    background: white;
    padding: 40px 60px;
    border-radius: 16px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

.loading-inline {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 4em;
    margin-bottom: 15px;
}

/* Organizers Management */
.btn-add-organizer {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-add-organizer:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.4);
}

.organizers-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.org-stat {
    text-align: center;
    padding: 15px 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.org-stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    color: #27ae60;
}

.org-stat-label {
    color: #666;
    font-size: 0.9em;
}

.organizers-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.organizer-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    flex-wrap: wrap;
}

.organizer-card:hover {
    background: #e8f5e9;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.org-avatar {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5em;
    font-weight: 700;
    flex-shrink: 0;
}

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

.org-name {
    font-weight: 600;
    font-size: 1.1em;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.org-email {
    color: #667eea;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.org-dept, .org-phone {
    color: #666;
    font-size: 0.85em;
}

.org-status {
    min-width: 120px;
}

.org-status .status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

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

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

.org-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.org-actions .btn-small {
    padding: 8px 16px;
    font-size: 0.85em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.org-actions .btn-reset {
    background: #e3f2fd;
    color: #1976d2;
}

.org-actions .btn-reset:hover {
    background: #bbdefb;
}

.org-actions .btn-delete {
    background: #ffebee;
    color: #c62828;
}

.org-actions .btn-delete:hover {
    background: #ffcdd2;
}

.form-note {
    background: #e3f2fd;
    color: #1565c0;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9em;
    margin-top: 15px;
}

.error-state {
    text-align: center;
    padding: 40px 20px;
    color: #c62828;
    background: #ffebee;
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        flex-direction: column;
        text-align: center;
    }

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

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .organizer-card {
        flex-direction: column;
        text-align: center;
    }
    
    .org-info {
        text-align: center;
    }
    
    .org-actions {
        justify-content: center;
        width: 100%;
    }
    
    .organizers-stats {
        justify-content: center;
    }
}

/* Export Tab Styles */
.export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.export-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
}

.export-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.export-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.export-card h4 {
    color: #333;
    margin-bottom: 10px;
}

.export-card p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.btn-export {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
}

.btn-export:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.export-all {
    text-align: center;
    padding: 20px;
    background: #e8f4fd;
    border-radius: 12px;
}

.btn-export-all {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s;
}

.btn-export-all:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.4);
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .export-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   STUDENT SEARCH STYLES
   ============================================ */
.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.btn-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Student Profile */
.student-profile {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    font-weight: 700;
    color: white;
}

.profile-info h3 {
    font-size: 1.5em;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.profile-info p {
    color: #666;
    margin: 3px 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.profile-stat {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-num {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #667eea;
}

.stat-lbl {
    font-size: 0.85em;
    color: #666;
}

/* Result Sections */
.result-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.result-section h4 {
    color: #1a1a2e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Competency Grid */
.competency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.comp-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.comp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comp-name {
    font-weight: 600;
    color: #333;
}

.comp-level {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

.comp-level.excellent {
    background: #d4edda;
    color: #155724;
}

.comp-level.good {
    background: #cce5ff;
    color: #004085;
}

.comp-level.developing {
    background: #fff3cd;
    color: #856404;
}

.comp-level.none {
    background: #f8f9fa;
    color: #999;
}

.comp-status {
    font-size: 0.85em;
}

.comp-status.excellent { color: #155724; }
.comp-status.good { color: #004085; }
.comp-status.developing { color: #856404; }
.comp-status.none { color: #999; }

/* Result Activities */
.result-activities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-activity {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.result-activity.approved { border-left-color: #27ae60; }
.result-activity.pending { border-left-color: #f39c12; }
.result-activity.rejected { border-left-color: #e74c3c; }

.act-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.act-name {
    font-weight: 600;
    color: #333;
}

.act-status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
}

.act-status.approved { background: #d4edda; color: #155724; }
.act-status.pending { background: #fff3cd; color: #856404; }
.act-status.rejected { background: #f8d7da; color: #721c24; }

.act-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 8px;
}

.act-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-mini {
    background: #e8f4fd;
    color: #1976d2;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

/* Not Found */
.not-found-box {
    text-align: center;
    padding: 40px;
    background: #fff3cd;
    border-radius: 12px;
}

.not-found-box .icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.not-found-box p {
    color: #856404;
    font-size: 1.1em;
}

.empty-msg {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .competency-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DATA REPAIR STYLES
   ============================================ */
.repair-section {
    margin-top: 30px;
    padding: 25px;
    background: #fff8e1;
    border-radius: 12px;
    border-left: 4px solid #f39c12;
}

.repair-section h3 {
    color: #e67e22;
    margin-bottom: 10px;
}

.repair-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-repair {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-repair:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

.btn-repair.warning {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.btn-repair.warning:hover {
    box-shadow: 0 5px 20px rgba(230, 126, 34, 0.4);
}

.btn-repair.secondary {
    background: #95a5a6;
}

.repair-result {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.repair-result h4 {
    color: #333;
    margin-bottom: 15px;
}

.scan-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.scan-good {
    color: #27ae60;
    font-weight: 600;
}

.scan-bad {
    color: #e74c3c;
    font-weight: 600;
}

.scan-list {
    max-height: 300px;
    overflow-y: auto;
}

.scan-list ul {
    list-style: none;
}

.scan-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 8px;
    border-radius: 6px;
}

.btn-mini {
    background: #667eea;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
}

.btn-mini:hover {
    background: #5a67d8;
}

.scan-success {
    color: #27ae60;
    font-weight: 600;
    text-align: center;
    padding: 20px;
}

.scan-error {
    color: #e74c3c;
    font-weight: 600;
}

.skills-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    margin: 15px 0;
    max-height: 400px;
    overflow-y: auto;
}

.skill-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
}

.skill-checkbox-item:hover {
    background: #e9ecef;
}

.skill-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.skill-checkbox-item span {
    flex: 1;
    font-size: 0.9em;
}

.repair-skill-level {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.85em;
}

.repair-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Skills Comparison Styles */
.skills-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 15px 0;
}

.skills-column {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

.skills-column h5 {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 0.95em;
}

.skills-column.student-skills {
    background: #fff8e1;
    border: 2px solid #ffc107;
}

.skills-column.student-skills h5 {
    color: #f57c00;
    border-color: #ffc107;
}

.skills-column.ai-skills {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.skills-column.ai-skills h5 {
    color: #2e7d32;
    border-color: #4caf50;
}

.skill-badge {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.skill-badge.student {
    background: white;
    border-left: 4px solid #f39c12;
}

.skill-badge.ai {
    background: white;
    border-left: 4px solid #27ae60;
}

.skill-badge .level {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-left: 8px;
}

.skill-badge .ai-reason {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed #ddd;
}

.no-skills {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 15px;
}

.activity-level-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .skills-comparison {
        grid-template-columns: 1fr;
    }
}

/* Reflection Display Styles */
.reflection-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reflection-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    border-left: 4px solid #4caf50;
}

.reflection-item label {
    display: block;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.reflection-item p {
    margin: 0;
    color: #333;
    line-height: 1.5;
}

/* AI Skills Display */
.ai-skills-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-skill-badge {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    padding: 12px 15px;
    border-left: 4px solid #4caf50;
}

.ai-skill-badge .skill-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ai-skill-badge .skill-code {
    font-weight: 700;
    color: #667eea;
    font-size: 1em;
}

.ai-skill-badge .skill-name {
    color: #333;
    font-size: 0.95em;
}

.ai-skill-badge .skill-level {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    margin-left: auto;
}

.ai-skill-badge .skill-reason {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #a5d6a7;
    font-size: 0.85em;
    color: #555;
}

/* Activity Management Styles */
.activity-manage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.activity-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: white;
}

.activity-stat-card.has-skills {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.activity-stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.activity-stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Activity Table */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9em;
}

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

.activity-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.activity-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.activity-table tbody tr:hover {
    background: #f8f9ff;
}

.activity-table tbody tr.no-skills-row {
    background: #fff5f5;
}

.activity-table tbody tr.no-skills-row:hover {
    background: #ffebee;
}

.activity-name-cell {
    font-weight: 500;
    color: #333;
}

.row-num {
    color: #999;
    font-size: 0.85em;
    margin-right: 5px;
}

.center {
    text-align: center;
}

.skills-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.skill-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.skill-more {
    color: #666;
    font-size: 0.75em;
    margin-left: 3px;
}

.skill-warning {
    background: #ffebee;
    color: #c62828;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-left: 3px;
}

.no-skill {
    color: #e74c3c;
    font-size: 0.85em;
}

.actions-cell {
    white-space: nowrap;
}

.btn-table-edit, .btn-table-delete {
    padding: 5px 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.btn-table-edit {
    background: #e3f2fd;
    margin-right: 3px;
}

.btn-table-edit:hover {
    background: #bbdefb;
}

.btn-table-delete {
    background: #ffebee;
}

.btn-table-delete:hover {
    background: #ffcdd2;
}

.empty-cell, .loading-cell {
    text-align: center;
    padding: 40px !important;
    color: #666;
}

@media (max-width: 768px) {
    .activity-table {
        font-size: 0.8em;
    }
    
    .activity-table th,
    .activity-table td {
        padding: 8px 5px;
    }
    
    .skill-badge {
        font-size: 0.7em;
        padding: 1px 4px;
    }
}

/* ============================================
   SKILLS SUMMARY DASHBOARD
   ============================================ */

.skills-filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

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

.skills-filter-group label {
    font-weight: 600;
    font-size: 0.85em;
    color: #555;
}

.skills-filter-group select,
.skills-filter-group input[type="text"] {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    font-family: inherit;
    min-width: 170px;
    transition: border-color 0.3s;
}

.skills-filter-group select:focus,
.skills-filter-group input[type="text"]:focus {
    border-color: #667eea;
    outline: none;
}

.skills-summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.skills-stat-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #d0d8f0;
}

.skills-stat-num {
    display: block;
    font-size: 2em;
    font-weight: 700;
    color: #1a1a2e;
}

.skills-stat-label {
    color: #666;
    font-size: 0.85em;
    margin-top: 4px;
}

.skills-chart-section {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.skills-chart-section h3 {
    color: #1a1a2e;
    margin-bottom: 15px;
    text-align: center;
}

.skills-chart-container {
    max-width: 500px;
    height: 400px;
    margin: 0 auto;
}

.skills-table-section,
.skills-students-section {
    margin-bottom: 30px;
}

.skills-table-section h3,
.skills-students-section h3 {
    color: #1a1a2e;
    margin-bottom: 15px;
}

.skills-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.skills-detail-table,
.skills-student-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.skills-detail-table th,
.skills-detail-table td,
.skills-student-table th,
.skills-student-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.skills-detail-table th,
.skills-student-table th {
    background: #f8f9ff;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 1;
}

.skills-detail-table tr:hover,
.skills-student-table tr:hover {
    background: #f0f4ff;
}

/* Status badges */
.skills-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.skills-status-badge.excellent {
    background: #d4edda;
    color: #155724;
}

.skills-status-badge.good {
    background: #cce5ff;
    color: #004085;
}

.skills-status-badge.developing {
    background: #fff3cd;
    color: #856404;
}

.skills-status-badge.none {
    background: #f0f0f0;
    color: #999;
}

/* Level badges */
.level-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.level-badge.level-0 { background: #f0f0f0; color: #999; }
.level-badge.level-1 { background: #fff3e0; color: #e65100; }
.level-badge.level-2 { background: #e8f5e9; color: #2e7d32; }
.level-badge.level-3 { background: #e3f2fd; color: #1565c0; }
.level-badge.level-4 { background: #f3e5f5; color: #7b1fa2; }

/* Mini chart button */
.btn-mini-chart {
    padding: 5px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-mini-chart:hover {
    background: #5a6fd6;
    transform: scale(1.05);
}

/* Modal chart container */
.modal-chart-container {
    max-width: 420px;
    height: 350px;
    margin: 0 auto 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .skills-filter-bar {
        flex-direction: column;
    }

    .skills-filter-group select,
    .skills-filter-group input[type="text"] {
        min-width: 100%;
    }

    .skills-chart-container {
        height: 300px;
    }

    .modal-chart-container {
        height: 250px;
    }

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

    .skills-detail-table,
    .skills-student-table {
        font-size: 0.8em;
    }

    .skills-detail-table th,
    .skills-detail-table td,
    .skills-student-table th,
    .skills-student-table td {
        padding: 8px 6px;
    }

    .skills-year-compare-table .num-cell {
        min-width: 36px;
        padding: 6px 2px;
        font-size: 0.75em;
    }

    .skills-year-compare-table th.sub-header {
        font-size: 0.65em;
        min-width: 36px;
    }
}

/* ============================================
   SKILLS YEAR COMPARISON TABLE
   ============================================ */

.skills-year-compare-table {
    min-width: 100%;
}

.skills-year-compare-table th.year-group-header {
    text-align: center;
    background: #f0f4ff;
    border-bottom: 2px solid #667eea;
    font-weight: 700;
    color: #333;
    padding: 10px 8px;
    white-space: nowrap;
}

.skills-year-compare-table th.overall-header {
    background: #e8f5e9;
    border-bottom-color: #27ae60;
}

.skills-year-compare-table th.year-1-header { background: #e3f2fd; border-bottom-color: #1976d2; }
.skills-year-compare-table th.year-2-header { background: #fff8e1; border-bottom-color: #f57c00; }
.skills-year-compare-table th.year-3-header { background: #fce4ec; border-bottom-color: #c62828; }
.skills-year-compare-table th.year-4-header { background: #f3e5f5; border-bottom-color: #7b1fa2; }

.skills-year-compare-table th.sub-header {
    text-align: center;
    font-size: 0.8em;
    font-weight: 600;
    color: #666;
    padding: 6px 4px;
    background: #f8f9ff;
    min-width: 48px;
}

.skills-year-compare-table .num-cell {
    text-align: center;
    font-size: 0.9em;
    padding: 8px 4px;
    min-width: 48px;
}

.skills-year-compare-table .num-cell.dim {
    color: #ccc;
}

.skills-year-compare-table .num-cell.level-high {
    background: rgba(39, 174, 96, 0.12);
    color: #155724;
}

.skills-year-compare-table .num-cell.level-mid {
    background: rgba(102, 126, 234, 0.12);
    color: #004085;
}

.skills-year-compare-table .num-cell.level-low {
    background: rgba(243, 156, 18, 0.12);
    color: #856404;
}

.skills-year-compare-table .num-cell.level-none {
    color: #999;
}

.skills-year-compare-table .sticky-col {
    position: sticky;
    left: 0;
    background: #f8f9ff;
    z-index: 2;
}

.skills-year-compare-table .sticky-col-2 {
    position: sticky;
    left: 100px;
    background: #f8f9ff;
    z-index: 2;
}
