/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Allow text selection on inputs and important text */
input, textarea, .info-row .value, .description, .note, .meta-info {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 102, 204, 0.15);
    border-bottom: 3px solid #0066cc;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-size: 28px;
    color: #0066cc;
    margin-bottom: 5px;
    font-weight: 700;
}

.logo p {
    color: #7f8c8d;
    font-size: 14px;
}

.btn-admin {
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    color: white;
    text-decoration: none;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Search Section */
.search-section {
    margin-bottom: 40px;
}

.search-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.08);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(0, 102, 204, 0.1);
    border-left: 4px solid #0066cc;
}

.search-card h2 {
    color: #0066cc;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

.description {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.form-group {
    width: 100%;
    max-width: 400px;
}

.form-group label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
    text-align: left;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.btn-search {
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

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

/* Messages */
.message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Results Section */
.results-section {
    margin-top: 40px;
}

.info-card, .stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.08);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid #0066cc;
}

.info-card h3, .stat-card h3 {
    color: #0066cc;
    font-size: 20px;
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
}

/* Student Info */
.student-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #0066cc;
}

.info-row .label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.info-row .value {
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: #0066cc;
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.2);
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #0066cc;
    margin-bottom: 8px;
}

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

/* Absent Days List */
.absent-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.absent-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 20px;
    border-left: 4px solid #dc3545;
    transition: transform 0.3s ease;
}

.absent-item:hover {
    transform: translateX(5px);
}

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

.absent-item .date {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.absent-item .status {
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(220, 53, 69, 0.1);
}

.absent-item .status.absent {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.absent-item .status.absent-reason {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.absent-item .periods {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 6px;
}

.absent-item .note {
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

/* Violation List */
.violation-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.violation-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 20px;
    border-left: 4px solid #e74c3c;
    transition: transform 0.3s ease;
}

.violation-item:hover {
    transform: translateX(5px);
}

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

.violation-item .date {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.violation-item .type {
    font-size: 14px;
    font-weight: 600;
    color: #e74c3c;
    padding: 4px 8px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 6px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-badge.status-resolved {
    background: rgba(40, 167, 69, 0.2);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-badge.status-closed {
    background: rgba(108, 117, 125, 0.2);
    color: #495057;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.violation-item .description {
    font-size: 13px;
    color: #495057;
    margin-bottom: 5px;
}

.violation-item .note {
    font-size: 13px;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 8px;
}

.violation-meta {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.meta-info {
    color: #6c757d;
    font-size: 11px;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #28a745;
    font-size: 18px;
    font-weight: 600;
}

/* Footer */
.footer {
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    color: #495057;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #dee2e6;
}

.footer p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px 0;
    }
    
    .logo h1 {
        font-size: 22px;
        margin-bottom: 3px;
    }
    
    .logo p {
        font-size: 13px;
    }
    
    .btn-admin {
        padding: 10px 20px;
        font-size: 13px;
        border-radius: 20px;
    }
    
    .main-content {
        padding: 20px 0;
    }
    
    .search-card {
        padding: 25px 15px;
        margin: 0 5px;
        border-radius: 15px;
    }
    
    .search-card h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .form-group input {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    .btn-search {
        padding: 12px 30px;
        font-size: 15px;
        border-radius: 8px;
        min-width: 120px;
    }
    
    .student-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 12px 15px;
    }
    
    .info-row .label {
        font-size: 12px;
        font-weight: 600;
    }
    
    .info-row .value {
        font-size: 14px;
        font-weight: 600;
        color: #2c3e50;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-item {
        padding: 15px;
        border-radius: 12px;
    }
    
    .stat-number {
        font-size: 22px;
        margin-bottom: 5px;
    }
    
    .stat-label {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .absent-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .violation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .absent-item, .violation-item {
        padding: 12px 15px;
        border-radius: 8px;
    }
    
    .absent-item .date, .violation-item .date {
        font-size: 15px;
    }
    
    .absent-item .status, .violation-item .type {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .absent-item .periods {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .status-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .meta-info {
        font-size: 10px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .main-content {
        padding: 15px 0;
    }
    
    .search-card {
        padding: 20px 12px;
        margin: 0 2px;
    }
    
    .search-card h2 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .description {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .form-group input {
        padding: 14px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
    }
    
    .btn-search {
        padding: 14px 25px;
        font-size: 14px;
        border-radius: 6px;
        min-width: 100px;
    }
    
    .info-card {
        padding: 15px 12px;
        margin-bottom: 20px;
        border-radius: 12px;
    }
    
    .info-card h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-item {
        padding: 12px;
        border-radius: 10px;
    }
    
    .stat-number {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 10px;
        line-height: 1.2;
    }
    
    .info-row {
        padding: 10px 12px;
        border-radius: 8px;
    }
    
    .info-row .label {
        font-size: 11px;
    }
    
    .info-row .value {
        font-size: 13px;
    }
    
    .absent-item, .violation-item {
        padding: 10px 12px;
        border-radius: 6px;
    }
    
    .absent-item .date, .violation-item .date {
        font-size: 14px;
    }
    
    .absent-item .status, .violation-item .type {
        font-size: 11px;
        padding: 2px 5px;
    }
    
    .absent-item .periods {
        font-size: 11px;
        padding: 2px 5px;
    }
    
    .status-badge {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .meta-info {
        font-size: 9px;
        line-height: 1.3;
    }
    
    .no-data {
        padding: 30px 15px;
        font-size: 16px;
    }
    
    .message {
        padding: 12px 15px;
        margin-bottom: 15px;
        border-radius: 6px;
        font-size: 14px;
    }
}

/* Landscape mode optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .header-content {
        flex-direction: row;
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .logo p {
        font-size: 12px;
    }
    
    .main-content {
        padding: 10px 0;
    }
    
    .search-card {
        padding: 15px 12px;
    }
    
    .search-card h2 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .description {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .stat-item {
        padding: 8px;
    }
    
    .stat-number {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 9px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn-search, .btn-admin {
        border: 0.5px solid rgba(255, 255, 255, 0.2);
    }
    
    .info-card, .search-card {
        border: 0.5px solid rgba(255, 255, 255, 0.1);
    }
}

/* Dark mode support - disabled to maintain light theme */

/* Tab Navigation */
.tab-navigation {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.tab-btn:hover {
    color: #0066cc;
    background-color: #f8f9ff;
}

.tab-btn.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
    background-color: #f8f9ff;
}

.tab-content {
    display: none;
}

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

/* Student Cards Grid */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.student-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.15);
}

.student-header {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.student-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.student-info {
    flex: 1;
    min-width: 0;
}

.student-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-code {
    margin: 0 0 3px 0;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.student-class {
    margin: 0;
    color: #888;
    font-size: 0.85rem;
}

.btn-detail {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-detail:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: scale(1.05);
}

.btn-detail:active {
    transform: scale(0.95);
}

/* Modal for Student Detail */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ffcc00;
}

.modal-body {
    padding: 20px;
}

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

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Modern Select Styles */
.modern-select-container {
    margin-bottom: 20px;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.select-wrapper select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    transform: translateY(-1px);
}

.select-wrapper select:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.1);
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.select-wrapper:hover .select-arrow {
    color: #0066cc;
}

.select-wrapper select:focus + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #0066cc;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9ff, #e3f2fd);
    border-radius: 10px;
    border: 1px solid #e3f2fd;
    color: #0066cc;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e3f2fd;
    border-top: 2px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Class Results Animation */
.class-results {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Student Card Hover Effects */
.student-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.student-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 102, 204, 0.2);
}

.student-card:active {
    transform: translateY(-2px) scale(1.01);
}

/* Search Container Styles */
.search-container {
    margin-bottom: 20px;
}

.search-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.search-tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.search-tab-btn:hover {
    color: #0066cc;
    background-color: #f8f9ff;
}

.search-tab-btn.active {
    color: #0066cc;
    border-bottom-color: #0066cc;
    background-color: #f8f9ff;
}

.search-mode {
    display: none;
}

.search-mode.active {
    display: block;
}

/* Search Input Container */
.search-input-container {
    position: relative;
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-container input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input-container input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    transform: translateY(-1px);
}

.search-input-container input:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.1);
}

/* Search Button */
.btn-search {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    white-space: nowrap;
    min-width: 120px;
}

.btn-search:hover {
    background: linear-gradient(135deg, #004499 0%, #003366 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-search:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 102, 204, 0.3);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestions.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:hover {
    background-color: #f8f9ff;
    color: #0066cc;
}

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

.suggestion-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    font-weight: 600;
    color: #333;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-code {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.suggestion-class {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

.suggestion-action {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.suggestion-action:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: scale(1.05);
}

.no-suggestions {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Mobile Responsive for New Features */
@media (max-width: 768px) {
    .tab-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .students-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .student-header {
        padding: 15px;
        gap: 12px;
    }
    
    .student-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .student-info h4 {
        font-size: 1rem;
    }
    
    .btn-detail {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Mobile Select Styles */
    .select-wrapper select {
        padding: 12px 45px 12px 15px;
        font-size: 0.9rem;
    }
    
    .select-arrow {
        right: 12px;
        font-size: 0.7rem;
    }
    
    .loading-indicator {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .spinner {
        width: 16px;
        height: 16px;
    }
    
    /* Mobile Search Styles */
    .search-tab-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .search-input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input-container input {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .btn-search {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: auto;
        width: 100%;
    }
    
    .suggestion-item {
        padding: 10px 15px;
    }
    
    .suggestion-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .suggestion-name {
        font-size: 0.9rem;
    }
    
    .suggestion-code {
        font-size: 0.8rem;
    }
    
    .suggestion-class {
        font-size: 0.75rem;
    }
    
    .suggestion-action {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
}

/* AI Comment System Styles */
.ai-comment-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 2px solid #0066cc;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.15);
    margin-bottom: 25px;
    overflow: hidden;
}

.ai-comment-card h3 {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 20px;
    margin: 0;
    font-size: 1.3em;
    text-align: center;
    border-radius: 13px 13px 0 0;
}

.ai-comment-content {
    padding: 25px;
}

.ai-overall-comment {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #0066cc;
    line-height: 1.7;
}

.ai-overall-comment strong {
    color: #0066cc;
    font-size: 1.1em;
}

.ai-recommendations {
    background: #fff8e1;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #ff9800;
}

.ai-recommendations h4 {
    color: #e65100;
    margin-bottom: 15px;
    font-size: 1.2em;
}

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

.recommendations-list li {
    background: white;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #ff9800;
    line-height: 1.6;
}

.recommendations-list li:last-child {
    margin-bottom: 0;
}

.ai-quick-summary {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #4caf50;
}

.quick-comment {
    font-size: 1.1em;
    line-height: 1.6;
    color: #2e7d32;
}

.quick-comment strong {
    color: #1b5e20;
}

/* AI Comment Level Indicators */
.ai-comment-card[data-level="excellent"] {
    border-color: #4caf50;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
}

.ai-comment-card[data-level="excellent"] h3 {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.ai-comment-card[data-level="good"] {
    border-color: #2196f3;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9ff 100%);
}

.ai-comment-card[data-level="good"] h3 {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.ai-comment-card[data-level="average"] {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%);
}

.ai-comment-card[data-level="average"] h3 {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.ai-comment-card[data-level="below_average"] {
    border-color: #ff5722;
    background: linear-gradient(135deg, #fce4ec 0%, #f3e5f5 100%);
}

.ai-comment-card[data-level="below_average"] h3 {
    background: linear-gradient(135deg, #ff5722 0%, #e91e63 100%);
}

.ai-comment-card[data-level="poor"] {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
}

.ai-comment-card[data-level="poor"] h3 {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

/* AI Progress Overview Styles */
.ai-progress-overview {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #17a2b8;
}

.ai-progress-overview h4 {
    color: #0c5460;
    margin-bottom: 15px;
    font-size: 18px;
}

.progress-summary {
    margin-bottom: 20px;
}

.overall-trend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: rgba(23, 162, 184, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(23, 162, 184, 0.2);
}

.trend-label {
    font-weight: 600;
    color: #0c5460;
    font-size: 15px;
}

.trend-value {
    font-size: 16px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.trend-improving {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #28a745;
}

.trend-stable {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border: 1px solid #17a2b8;
}

.trend-declining {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #dc3545;
}

.progress-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.progress-aspect {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.aspect-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 16px;
    color: #2c3e50;
}

.aspect-icon {
    font-size: 18px;
}

.aspect-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trend-indicator {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trend-direction {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 15px;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.trend-detail {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(248, 249, 250, 0.8);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    color: #2c3e50;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* AI Disclaimer Styles */
.ai-disclaimer {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.15);
}

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

.disclaimer-content strong {
    color: #e65100;
    font-size: 1.1em;
    display: block;
    margin-bottom: 8px;
}

.disclaimer-content p {
    color: #bf360c;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

/* Center Search Input */
.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.search-container .form-group {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.search-container .form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.search-input-container {
    position: relative;
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-container input {
    flex: 1;
    text-align: center;
}

/* Mobile AI Comment Styles */
@media (max-width: 768px) {
    .ai-progress-overview {
        padding: 15px;
        margin: 15px 0;
    }
    
    .ai-progress-overview h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .overall-trend {
        padding: 12px;
    }
    
    .trend-label {
        font-size: 14px;
    }
    
    .trend-value {
        font-size: 15px;
        min-width: 80px;
        padding: 4px 8px;
    }
    
    .progress-details {
        gap: 12px;
    }
    
    .progress-aspect {
        padding: 12px;
    }
    
    .aspect-header {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .aspect-icon {
        font-size: 16px;
    }
    
    .trend-direction {
        font-size: 13px;
        min-width: 70px;
        padding: 3px 8px;
    }
    
    .trend-detail {
        font-size: 13px;
    }
    
    .progress-stats {
        padding: 10px;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 13px;
        padding: 2px 6px;
    }
    .ai-comment-card h3 {
        padding: 15px;
        font-size: 1.1em;
    }
    
    .ai-comment-content {
        padding: 15px;
    }
    
    .ai-overall-comment {
        padding: 15px;
        font-size: 0.9em;
    }
    
    .ai-recommendations {
        padding: 15px;
    }
    
    .ai-disclaimer {
        padding: 12px;
        margin-top: 15px;
    }
    
    .disclaimer-content strong {
        font-size: 1em;
    }
    
    .disclaimer-content p {
        font-size: 0.9em;
    }
    
    .ai-recommendations h4 {
        font-size: 1.1em;
    }
    
    .recommendations-list li {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .ai-quick-summary {
        padding: 15px;
    }
    
    .quick-comment {
        font-size: 1em;
    }
    
    /* Mobile Search Input */
    .search-container .form-group {
        max-width: 100%;
    }
}