/* 
   STYLE.CSS - THIẾT KẾ GIAO DIỆN ĐỚN GIẢN
   
   Thiết kế tối giản, dễ hiểu, tập trung vào chức năng
   Không có màu mè, hiệu ứng phức tạp
*/

/* === RESET VÀ CƠ BẢN === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #ffffff;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === HEADER - ĐƠN GIẢN === */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 18px;
    font-weight: normal;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
}

.role-badge {
    background-color: #34495e;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    padding: 6px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
}

.btn-logout:hover {
    background-color: #c0392b;
}

/* === NAVIGATION MENU - ĐƠN GIẢN === */
.nav-menu {
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 0;
}

.menu-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.menu-list li a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #555;
    border-right: 1px solid #ddd;
}

.menu-list li a:hover,
.menu-list li a.active {
    background-color: #e9ecef;
    color: #333;
}

/* === MAIN CONTENT - ĐƠN GIẢN === */
.main-content {
    min-height: 70vh;
    padding: 20px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: normal;
}

.page-header p {
    color: #666;
    font-size: 14px;
}

/* === ALERTS - ĐƠN GIẢN === */
.alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 3px;
    border: 1px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-success code {
    background-color: #c3e6cb;
    color: #155724;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.alert-success small {
    display: block;
    margin-top: 5px;
    font-style: italic;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* === CARDS - ĐƠN GIẢN === */
.stat-card, .feature-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    margin-bottom: 15px;
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon, .feature-icon {
    font-size: 20px;
}

.stat-info h4, .feature-card h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: normal;
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

.feature-card {
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.feature-card p {
    color: #666;
    margin-top: 5px;
    font-size: 12px;
}

/* === SECTIONS - ĐƠN GIẢN === */
.welcome-section, .statistics-section, .features-section,
.term-selection, .student-search, .evaluation-form,
.search-section, .results-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 20px;
    margin-bottom: 20px;
}

.welcome-section h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: normal;
}

.user-details p {
    margin-bottom: 5px;
    font-size: 13px;
}

/* === FORMS - ĐƠN GIẢN === */
.search-form, .term-form, .scores-form {
    margin-top: 10px;
}

.search-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.search-field, .form-group {
    flex: 1;
    min-width: 150px;
}

.search-field label, .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    color: #333;
    font-size: 13px;
}

.search-field input, .search-field select,
.form-group input, .form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.search-field input:focus, .search-field select:focus,
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #2c3e50;
}

.search-buttons {
    display: flex;
    gap: 5px;
}

/* === BUTTONS - ĐƠN GIẢN === */
.btn-search, .btn-reset, .btn-save, .btn-cancel, 
.btn-view, .btn-select, .btn-login {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    display: inline-block;
    background-color: white;
    color: #333;
}

.btn-search, .btn-save, .btn-login {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.btn-search:hover, .btn-save:hover, .btn-login:hover {
    background-color: #34495e;
}

.btn-reset, .btn-cancel {
    background-color: #95a5a6;
    color: white;
    border-color: #95a5a6;
}

.btn-reset:hover, .btn-cancel:hover {
    background-color: #7f8c8d;
}

.btn-view, .btn-select {
    background-color: #27ae60;
    color: white;
    border-color: #27ae60;
    font-size: 12px;
    padding: 5px 10px;
}

.btn-view:hover, .btn-select:hover {
    background-color: #2ecc71;
}

/* === ADMIN PANEL SMALL BUTTONS === */
.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-edit:hover {
    background-color: #e67e22;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

.btn-reset-password {
    background-color: #f39c12;
    color: white;
}

.btn-reset-password:hover {
    background-color: #d68910;
}

.btn-login {
    width: 100%;
    font-size: 14px;
    margin-top: 10px;
}

/* === TABLES - ĐƠN GIẢN === */
.table-container {
    overflow-x: auto;
    margin-top: 15px;
}

.students-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
}

.students-table th,
.students-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-size: 13px;
}

.students-table th {
    background-color: #f8f9fa;
    font-weight: normal;
    color: #333;
}

.students-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.student-code {
    font-family: monospace;
    font-weight: bold;
    color: #2c3e50;
}

.class-tag {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
}

/* === SEARCH RESULTS - ĐƠN GIẢN === */
.search-results {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.results-header p {
    margin-bottom: 5px;
    font-size: 13px;
}

.search-info {
    font-size: 12px;
}

.students-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.student-item.selected {
    border-color: #2c3e50;
    background-color: #ecf0f1;
}

.student-info {
    flex: 1;
    font-size: 13px;
}

.student-info strong {
    color: #2c3e50;
    font-family: monospace;
}

/* === EVALUATION FORM - ĐƠN GIẢN === */
.student-info-box {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 3px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.student-info-box h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: normal;
}

.student-info-box p {
    margin-bottom: 5px;
    font-size: 13px;
}

.criteria-list {
    margin-top: 20px;
}

.criteria-group {
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-bottom: 15px;
}

.criteria-title {
    background-color: #34495e;
    color: white;
    padding: 10px 15px;
    margin: 0;
    font-size: 14px;
    font-weight: normal;
}

.max-point {
    font-weight: normal;
    font-size: 12px;
}

.criteria-item {
    padding: 15px;
    border-bottom: 1px solid #f8f9fa;
}

.criteria-item:last-child {
    border-bottom: none;
}

.criteria-name {
    font-weight: normal;
    margin-bottom: 10px;
    color: #333;
    font-size: 13px;
}

.score-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 10px;
    align-items: start;
}

.score-field input,
.note-field textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.score-field label,
.note-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.note-field textarea {
    resize: vertical;
    height: 50px;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.form-actions .btn-save,
.form-actions .btn-cancel {
    margin: 0 5px;
    min-width: 100px;
}

/* === LOGIN PAGE - ĐƠN GIẢN === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.login-box {
    background: white;
    padding: 30px;
    border-radius: 3px;
    border: 1px solid #ddd;
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 5px;
    font-size: 18px;
    font-weight: normal;
}

.login-box h3 {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-weight: normal;
    font-size: 14px;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 8px 12px;
    border-radius: 3px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 13px;
    border: 1px solid #f5c6cb;
}

.test-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.test-info h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: normal;
}

.test-info p {
    margin-bottom: 5px;
    font-size: 12px;
}

/* === STATUS BADGES & MISC - ĐƠN GIẢN === */
.status-badge {
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: normal;
}

.status-upcoming { background-color: #fff3cd; color: #856404; }
.status-open { background-color: #d4edda; color: #155724; }
.status-closed { background-color: #f8d7da; color: #721c24; }

.filter-tag {
    background-color: #2c3e50;
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 11px;
    margin-right: 5px;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 13px;
}

.current-term-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 3px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

.current-term-info p {
    margin-bottom: 5px;
    font-size: 13px;
}

/* === FOOTER - ĐƠN GIẢN === */
.footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    font-size: 12px;
}

/* === RESPONSIVE - ĐƠN GIẢN === */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .menu-list {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-buttons {
        justify-content: center;
    }
    
    .score-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .student-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .stats-grid, .features-grid {
        grid-template-columns: 1fr;
    }
    
    .login-box {
        margin: 15px;
        padding: 20px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .page-header h2 {
        font-size: 20px;
    }
}

/* === CSS CHO FORM ĐÁNH GIÁ SINH VIÊN === */

/* Score Summary - Hiển thị tổng điểm */
.score-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.total-score-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.total-score-display .label {
    font-weight: bold;
    font-size: 16px;
}

.total-score-display .score {
    font-size: 28px;
    font-weight: bold;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    min-width: 60px;
}

.score.excellent { color: #27ae60; }
.score.good { color: #f39c12; }
.score.average { color: #e67e22; }
.score.poor { color: #e74c3c; }

.total-score-display .max-score {
    font-size: 14px;
    opacity: 0.9;
}

/* Criteria Groups */
.criteria-group {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.criteria-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.criteria-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
}

.group-score {
    font-weight: bold;
    color: #667eea;
}

/* Criteria Items */
.criteria-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    min-width: 0; /* Quan trọng để tránh overflow */
    overflow: visible; /* Đảm bảo nội dung hiển thị đầy đủ */
}

.criteria-item:last-child {
    border-bottom: none;
}

.criteria-info {
    margin-bottom: 15px;
}

.criteria-info label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.criteria-info .max-point {
    display: inline-block;
    background: #e8f4fd;
    color: #2980b9;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
    margin-left: 10px;
}

/* Input Groups */
.input-group {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px;
    align-items: start;
    min-width: 0; /* Quan trọng cho grid */
    overflow: visible !important; /* Đảm bảo không bị cắt */
}

/* Force layout để tránh conflicts - Enhanced */
.criteria-item .input-group .score-input {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    white-space: nowrap !important;
    min-width: 120px !important;
    width: auto !important;
    overflow: visible !important;
}

.criteria-item .input-group .score-input .score-field {
    flex-shrink: 0 !important;
    width: 80px !important;
    min-width: 70px !important;
    max-width: 80px !important;
    font-size: 14px !important;
    padding: 6px 8px !important;
}

.criteria-item .input-group .score-input .input-suffix {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    color: #666 !important;
}

.score-input {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    min-width: 0; /* Để flexbox hoạt động tốt */
    flex-wrap: nowrap !important; /* Không cho phép wrap */
    white-space: nowrap !important; /* Không cho phép xuống dòng */
}

.score-field {
    width: 100px;
    min-width: 80px !important; /* Đảm bảo không quá nhỏ */
    max-width: 120px; /* Đảm bảo không quá to */
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    font-weight: bold;
    box-sizing: border-box;
    flex-shrink: 0 !important; /* Không cho phép thu nhỏ */
}

.input-suffix {
    color: #666;
    font-weight: 500;
    font-size: 14px;
    flex-shrink: 0 !important; /* Không cho phép thu nhỏ */
    white-space: nowrap !important;
}

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

.input-suffix {
    color: #666;
    font-size: 14px;
}

.note-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

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

.note-field::placeholder {
    color: #999;
    font-style: italic;
}

/* Form Actions */
.form-actions {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary, .btn-neutral {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-primary:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

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

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-neutral {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

.btn-neutral:hover {
    background: #d5dbdb;
}

.form-note {
    text-align: center;
    color: #666;
    background: #e8f4fd;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.form-note p {
    margin: 0;
    font-size: 13px;
}

/* Student Info Card */
.student-info-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.student-info-card p {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.student-info-card p:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.student-info-card strong {
    display: inline-block;
    width: 120px;
    color: #2c3e50;
}

/* Term Selection */
.term-form select {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.term-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Responsive cho form đánh giá */

/* Responsive cho tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .input-group {
        grid-template-columns: 180px 1fr;
        gap: 12px;
    }
    
    .score-field {
        width: 90px;
        font-size: 15px;
    }
    
    .criteria-item {
        padding: 18px 15px;
    }
}

@media (max-width: 768px) {
    .total-score-display {
        flex-direction: column;
        gap: 5px;
    }
    
    .criteria-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .input-group {
        grid-template-columns: 1fr;
        gap: 10px;
        overflow: visible;
    }
    
    .score-input {
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: nowrap !important; /* Không cho phép wrap trên mobile */
    }
    
    .score-field {
        width: 80px !important;
        min-width: 70px !important;
        font-size: 14px;
        padding: 6px 8px;
        flex-shrink: 0 !important;
    }
    
    .input-suffix {
        font-size: 13px;
        flex-shrink: 0 !important;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary, .btn-neutral {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Responsive cho điện thoại nhỏ */
@media (max-width: 480px) {
    .criteria-info label {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .max-point {
        font-size: 12px;
    }
    
    .score-input {
        flex-wrap: nowrap !important; /* Quan trọng: không wrap */
        gap: 6px;
        justify-content: flex-start;
    }
    
    .score-field {
        width: 70px !important;
        min-width: 60px !important;
        font-size: 14px;
        padding: 8px 6px;
        flex-shrink: 0 !important;
    }
    
    .input-suffix {
        font-size: 12px;
        flex-shrink: 0 !important;
    }
    
    .note-field {
        min-height: 60px;
        font-size: 14px;
    }
    
    .file-upload-section {
        padding: 10px;
    }
    
    .criteria-item {
        padding: 15px 10px;
    }
}

/* ================================================
   EVALUATIONS PAGE STYLES (Trang xem kết quả)
   ================================================ */

/* Filter Section */
.filter-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.filter-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.1em;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

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

.filter-row .form-group:last-child {
    flex: 0 0 auto;
}

.btn-search {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-search:hover {
    background: #0056b3;
}

/* Evaluations List */
.evaluations-list h3 {
    color: #495057;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.evaluation-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.evaluation-table th,
.evaluation-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.evaluation-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.evaluation-table tbody tr:hover {
    background-color: #f8f9fa !important;
}

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

/* Status badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-draft {
    background: #ffeaa7;
    color: #d63031;
}

.status-submitted {
    background: #74b9ff;
    color: #0984e3;
}

.status-approved {
    background: #00b894;
    color: white;
}

/* Action buttons */
.btn-view {
    background: #17a2b8;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.3s;
}

.btn-view:hover {
    background: #138496;
    text-decoration: none;
    color: white;
}

/* No evaluations message */
.no-evaluations {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.no-evaluations h3 {
    color: #6c757d;
    margin-bottom: 15px;
}

.no-evaluations p {
    color: #6c757d;
    margin-bottom: 20px;
}

.btn-primary {
    background: #007bff;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background: #0056b3;
    text-decoration: none;
    color: white;
}

/* Back link */
.back-link {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

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

/* Evaluation Detail */
.evaluation-detail {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.evaluation-detail .page-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.evaluation-detail .page-header h2 {
    color: #495057;
    margin-bottom: 10px;
}

.evaluation-detail .page-header p {
    color: #6c757d;
    margin: 0;
    font-size: 16px;
}

/* Score Comparison */
.score-comparison {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}

.score-box {
    flex: 1;
    max-width: 200px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.score-box.self {
    border-color: #007bff;
    background: #e3f2fd;
}

.score-box.lecturer {
    border-color: #00b894;
    background: #e8f5e8;
}

.score-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.score-box.self .score-number {
    color: #007bff;
}

.score-box.lecturer .score-number {
    color: #00b894;
}

.score-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Criteria Detail */
.criteria-detail {
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.criteria-header {
    background: #f8f9fa;
    padding: 15px 20px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.criteria-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
}

.criteria-item:last-child {
    border-bottom: none;
}

.item-name {
    font-weight: 500;
    color: #495057;
    margin-bottom: 10px;
}

.item-scores {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.score-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #007bff;
}

.score-max {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

.item-note {
    flex: 1;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    min-width: 200px;
}

.item-evidence {
    margin-top: 8px;
    padding: 8px 12px;
    background: #e8f5e8;
    border-radius: 4px;
    font-size: 14px;
}

.item-evidence .evidence-label {
    font-weight: 500;
    color: #28a745;
    margin-right: 8px;
}

.item-evidence .evidence-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.item-evidence .evidence-link:hover {
    text-decoration: underline;
}

/* Responsive Design for Evaluations */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-row .form-group {
        min-width: 100%;
    }
    
    .evaluation-table {
        font-size: 14px;
    }
    
    .evaluation-table th,
    .evaluation-table td {
        padding: 8px;
    }
    
    .score-comparison {
        flex-direction: column;
        gap: 15px;
    }
    
    .score-box {
        max-width: 100%;
    }
    
    .item-scores {
        flex-direction: column;
        gap: 10px;
    }
    
    .score-item,
    .item-note {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .evaluation-detail {
        padding: 15px;
    }
    
    .evaluation-table {
        font-size: 12px;
    }
    
    .evaluation-table th,
    .evaluation-table td {
        padding: 6px 4px;
    }
    
    .btn-view {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* ================================================
   LECTURER EVALUATION PAGE STYLES
   ================================================ */

/* Lecturer evaluation form */
.lecturer-evaluation-form {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lecturer-evaluation-form .criteria-group {
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.lecturer-evaluation-form .criteria-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lecturer-evaluation-form .criteria-header h4 {
    margin: 0;
    color: #495057;
    font-size: 16px;
}

.lecturer-evaluation-form .criteria-item {
    padding: 20px;
    border-bottom: 1px solid #f1f3f4;
}

.lecturer-evaluation-form .criteria-item:last-child {
    border-bottom: none;
}

.criteria-info {
    margin-bottom: 15px;
}

.criteria-info label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 14px;
}

.score-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.score-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    background: #f8f9fa;
}

.score-input-group label {
    font-weight: 500;
    color: #495057;
    min-width: 120px;
    margin: 0;
    font-size: 13px;
}

.score-readonly {
    background: #e9ecef;
    border: 1px solid #ced4da;
    color: #6c757d;
    font-weight: bold;
    text-align: center;
    width: 80px;
    padding: 8px;
    border-radius: 4px;
}

.score-input {
    border: 1px solid #ced4da;
    padding: 8px 12px;
    border-radius: 4px;
    width: 80px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.score-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.score-input.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.score-input.error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.note-section {
    margin-top: 15px;
}

.note-section label {
    display: block;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.note-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
}

.note-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.note-textarea::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Action buttons for lecturer evaluation */
.lecturer-evaluation-form .form-actions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
}

.btn-evaluate {
    background: #28a745;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.3s;
}

.btn-evaluate:hover {
    background: #218838;
    text-decoration: none;
    color: white;
}

/* Status badges for evaluation states */
.status-submitted {
    background: #fff3cd;
    color: #856404;
}

.status-evaluated {
    background: #d1ecf1;
    color: #0c5460;
}

/* Responsive design for lecturer evaluation */
@media (max-width: 768px) {
    .score-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .score-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .score-input-group label {
        min-width: auto;
        text-align: center;
    }
    
    .score-readonly,
    .score-input {
        width: 100%;
        max-width: 120px;
        margin: 0 auto;
    }
    
    .lecturer-evaluation-form {
        padding: 15px;
    }
}

/* =========================
   EVIDENCE STYLES - Minh chứng
   ========================= */

.evidence-section {
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9em;
}

.evidence-file, .evidence-url {
    margin-bottom: 8px;
}

.evidence-file:last-child, .evidence-url:last-child {
    margin-bottom: 0;
}

/* Upload file styles */
.upload-file {
    position: relative;
    display: inline-block;
}

.file-input {
    opacity: 0;
    position: absolute;
    z-index: -1;
}

.file-label {
    display: inline-block;
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.3s;
}

.file-label:hover {
    background: #0056b3;
}

.file-label i {
    margin-right: 5px;
}

/* Current file display */
.current-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    font-size: 0.85em;
}

.current-file i {
    color: #1976d2;
}

.file-link {
    color: #1976d2;
    text-decoration: none;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.btn-delete-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 3px 6px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.3s;
}

.btn-delete-file:hover {
    background: #c82333;
}

/* URL input styles */
.url-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.85em;
    box-sizing: border-box;
}

.url-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.url-preview {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 8px;
    background: #e8f5e8;
    color: #155724;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.8em;
    border: 1px solid #c3e6cb;
}

.url-preview:hover {
    background: #d4edda;
    text-decoration: none;
}

.url-preview i {
    margin-right: 4px;
}

/* Responsive adjustments for evidence */
@media (max-width: 768px) {
    .evidence-section {
        padding: 8px;
        font-size: 0.85em;
    }
    
    .file-label {
        padding: 5px 10px;
        font-size: 0.8em;
    }
    
    .current-file {
        padding: 5px 8px;
        font-size: 0.8em;
    }
    
    .url-input {
        padding: 5px 8px;
        font-size: 0.8em;
    }
}

/* Loading states */
.file-label .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Error states */
.evidence-section.error {
    border-color: #dc3545;
    background: #f8d7da;
}

.evidence-section.success {
    border-color: #28a745;
    background: #d4edda;
}

/* =========================
   RANKING STYLES - Xếp hạng
   ========================= */

.ranking-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 8px;
}

.ranking-excellent { background: #d4edda; color: #155724; }
.ranking-good { background: #d1ecf1; color: #0c5460; }
.ranking-average { background: #fff3cd; color: #856404; }
.ranking-poor { background: #f8d7da; color: #721c24; }

.ranking-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.ranking-stats h4 {
    margin-bottom: 10px;
    color: #495057;
}

.ranking-list {
    list-style: none;
    padding: 0;
}

.ranking-list li {
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ranking-list li:last-child {
    border-bottom: none;
}

.ranking-position {
    font-weight: bold;
    margin-right: 10px;
}

.ranking-position.top-3 {
    color: #28a745;
}

.ranking-score {
    font-weight: 600;
}

/* =========================
   SIMPLE FILE UPLOAD STYLES
   ========================= */

.file-upload-section {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.upload-area {
    text-align: center;
    padding: 15px;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.file-input {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.upload-btn:hover {
    background: #0056b3;
}

.upload-area small {
    display: block;
    margin-top: 8px;
    color: #6c757d;
    font-size: 12px;
}

.current-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    background: #e8f5e8;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
}

.file-name {
    flex: 1;
    font-size: 14px;
    color: #155724;
}

.view-file {
    padding: 4px 8px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

.view-file:hover {
    background: #218838;
    text-decoration: none;
    color: white;
}

.delete-file {
    padding: 4px 8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.delete-file:hover {
    background: #c82333;
}

/* Responsive cho file upload */
@media (max-width: 768px) {
    .file-upload-section {
        padding: 8px;
    }
    
    .upload-area {
        padding: 12px;
    }
    
    .upload-btn {
        width: 100%;
        padding: 10px;
    }
    
    .current-file {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .file-name {
        text-align: center;
    }
}

/* === EVIDENCE FILES - HIỂN THỊ MINH CHỨNG === */

/* Evidence Section */
.evidence-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.evidence-file, .evidence-url {
    margin-bottom: 15px;
}

/* Evidence Display for Lecturer View */
.evidence-display {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.evidence-display .file-name {
    font-weight: 500;
    color: #495057;
}

.evidence-display .view-evidence {
    color: #007bff;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid #007bff;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.evidence-display .view-evidence:hover {
    background-color: #007bff;
    color: white;
}

/* Image Preview */
.image-preview {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: white;
    border: 2px solid #e9ecef;
    transition: transform 0.2s ease;
}

.image-preview:hover {
    transform: scale(1.02);
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.evidence-thumbnail {
    width: 200px;
    height: 150px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview:hover .image-overlay {
    opacity: 1;
}

.image-name {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-actions {
    display: flex;
    gap: 5px;
}

.btn-view, .btn-download, .btn-delete-file {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.btn-view:hover {
    background: rgba(0,123,255,0.8);
}

.btn-download:hover {
    background: rgba(40,167,69,0.8);
}

.btn-delete-file:hover {
    background: rgba(220,53,69,0.8);
}

/* File Display (Non-Images) */
.file-display {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    gap: 12px;
}

.file-icon {
    font-size: 24px;
    min-width: 40px;
    text-align: center;
}

.file-info {
    flex: 1;
}

.file-link {
    display: block;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 4px;
}

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

.file-type {
    font-size: 11px;
    color: #6c757d;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Upload File */
.upload-file {
    text-align: center;
    padding: 20px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.upload-file:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.file-label:hover {
    background: #0056b3;
}

.file-hint {
    display: block;
    margin-top: 8px;
    color: #6c757d;
    font-size: 12px;
}

/* Evidence URL */
.evidence-url {
    display: flex;
    align-items: center;
    gap: 10px;
}

.url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.url-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.url-preview {
    padding: 6px 12px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.url-preview:hover {
    background: #218838;
    color: white;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.image-modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
}

.image-modal img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.image-modal-close:hover {
    color: #ccc;
}

.image-modal-title {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .evidence-thumbnail {
        width: 150px;
        height: 112px;
    }
    
    .file-display {
        flex-direction: column;
        text-align: center;
    }
    
    .image-actions {
        justify-content: center;
    }
}