/* Copy from the original CSS with Node.js adaptations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Slim header for session manager */
.slim-header {
    background: white;
    border-bottom: 1px solid #e1e5e9;
    padding: 8px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border-radius: 0;
    min-height: 48px;
}

.header-left, .header-center, .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left {
    flex: 1;
}

.app-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-center {
    flex: 0 0 auto;
}

.header-right {
    flex: 1;
    justify-content: flex-end;
    text-align: right;
}

.app-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.version-badge {
    font-size: 11px;
    font-weight: 400;
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.company-name {
    color: #666;
    font-size: 12px;
    font-style: italic;
    cursor: help;
    transition: color 0.2s;
}

.company-name:hover {
    color: #2c3e50;
}

/* Menu Bar Styles */
.menu-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    margin: 0;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.menu-bar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.menu-item {
    position: relative;
}

.menu-link {
    display: block;
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.menu-link:hover,
.menu-item:hover > .menu-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    min-width: 180px;
    z-index: 1000;
    display: none;
    animation: fadeIn 0.15s ease-out;
}

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

.menu-item:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: #2c3e50;
}

.menu-divider {
    height: 1px;
    background-color: #e1e5e9;
    margin: 4px 0;
}

/* Menu brand and info sections */
.menu-brand {
    cursor: default;
}

.menu-brand-content {
    display: block;
    padding: 8px 16px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.menu-brand .app-title {
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.menu-brand .version-badge {
    font-size: 10px;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* Menu spacer to push items to the right */
.menu-spacer {
    flex: 1;
}

/* Menu info section */
.menu-info {
    cursor: default;
}

.menu-info-content {
    display: block;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    white-space: nowrap;
}

.menu-info .company-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    font-style: italic;
    cursor: help;
}

.menu-info .company-name:hover {
    color: white;
}

.menu-info .user-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
}

.menu-divider-vertical {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.5);
}

/* Menu logout button */
.menu-logout {
    background-color: rgba(220, 53, 69, 0.8) !important;
    border-radius: 4px;
    margin: 4px 8px;
    transition: all 0.2s ease;
}

.menu-logout:hover {
    background-color: rgba(220, 53, 69, 1) !important;
    color: white !important;
}

/* Menu checkmarks */
.menu-checkmark {
    display: none;
    margin-right: 8px;
    color: #28a745;
    font-weight: bold;
    font-size: 12px;
}

.menu-checkmark.visible {
    display: inline;
}

/* Menu Bar Dark Theme Styles */
.theme-dark .menu-bar {
    background: #2d2d30;
    border-bottom: 1px solid #3c3c3c;
}

.theme-dark .menu-bar-list {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

.theme-dark .dropdown-menu {
    background: #2d2d30;
    border: 1px solid #52525b;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.theme-dark .dropdown-menu a {
    color: #e4e4e7;
}

.theme-dark .dropdown-menu a:hover {
    background-color: #3c3c3c;
    color: #ffffff;
}

.theme-dark .menu-divider {
    background-color: #52525b;
}

.theme-dark .menu-checkmark {
    color: #22c55e;
}

.user-name {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
}

.status-info {
    color: #666;
    font-size: 12px;
}

.btn-sm {
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 20px;
}

.btn-logout.btn-sm {
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    margin-left: 8px;
}

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

.slim-header .btn-sm:not(.btn-logout) {
    background-color: #6c757d;
    color: white;
}

.slim-header .btn-sm:not(.btn-logout):hover {
    background-color: #5a6268;
}

/* Responsive slim header */
@media (max-width: 768px) {
    .slim-header {
        padding: 6px 12px;
        flex-wrap: wrap;
        gap: 8px;
        min-height: auto;
    }
    
    .header-left, .header-center, .header-right {
        gap: 8px;
    }
    
    .header-center {
        order: 3;
        flex: 1 1 100%;
        justify-content: center;
        margin-top: 4px;
    }
    
    .app-title {
        font-size: 14px;
    }
    
    .company-name, .user-name {
        font-size: 12px;
    }
    
    .status-info {
        font-size: 11px;
    }
    
    .btn-sm {
        padding: 1px 4px;
        font-size: 12px;
        min-height: 18px;
    }
}

h1 {
    color: #2c3e50;
}

.settings-panel {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.welcome-text {
    color: #2c3e50;
    font-size: 16px;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

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

.main-content {
    display: grid;
    gap: 20px;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Layout system */
/* Layout1: Two columns - Students and Grid */
.main-content[data-layout="layout1"] {
    grid-template-columns: 1fr 2fr;  /* Students narrow, Grid wide */
}

/* Layout2: Three columns - Available Students, Grid, Finished Students */
.main-content[data-layout="layout2"] {
    grid-template-columns: 1fr 3fr 1fr;  /* Students narrow, Grid wide, Finished Students narrow */
}

/* Default fallback for Layout1 */
.main-content:not([data-layout="layout2"]) {
    grid-template-columns: 1fr 2fr;  /* Default to Layout1 proportions */
}

/* Panel styling */
.students-panel, .grid-panel, .finished-students {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Keep backward compatibility */
.left-panel, .right-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.student-input {
    margin-bottom: 30px;
}

.student-input h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 10px;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 2px 4px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496, #10707f);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.student-search {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.student-search h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* Roster header with last import info */
.roster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.roster-header h2 {
    margin-bottom: 0;
}

.last-import-info {
    font-size: 11px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.students-list {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-top: 10px;
    background-color: white;
    min-height: 0;
}

.student-item {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    min-height: 40px;
    position: relative;
}

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

.student-item:hover {
    background-color: #f8f9fa;
}

.student-item.active-session {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.student-item.session-today {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    opacity: 0.7;
    cursor: not-allowed;
}

.student-status {
    font-size: 11px;
    color: #666;
}

.student-status.active {
    color: #2196f3;
    font-weight: bold;
}

.student-status.finished {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff9800;
    font-weight: 600;
    background-color: rgba(255, 152, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* Subject badges */
.student-subject-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.student-subject-badge.subject-1 {
    background-color: #4caf50;
    color: white;
}

.student-subject-badge.subject-2 {
    background-color: #00bcd4;
    color: white;
}

/* Dark theme subject badges */
.theme-dark .student-subject-badge.subject-1 {
    background-color: #16a34a;
    color: white;
}

.theme-dark .student-subject-badge.subject-2 {
    background-color: #0891b2;
    color: white;
}

/* Dark theme admin messages bar */
.theme-dark .admin-messages-bar {
    background: linear-gradient(135deg, #4f46e5, #6b21a8);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.theme-dark .admin-messages-bar .admin-message {
    background: #2d2d30;
    border-left-width: 5px;
}

.theme-dark .admin-messages-bar .message-header {
    background: linear-gradient(to right, rgba(79, 70, 229, 0.1), rgba(107, 33, 168, 0.05));
    border-bottom-color: rgba(79, 70, 229, 0.3);
}

.theme-dark .admin-messages-bar .message-content {
    color: #e4e4e7;
}

.theme-dark .admin-messages-bar .message-title {
    color: #e4e4e7;
}

.theme-dark .admin-messages-bar .message-priority {
    background: #3c3c3c;
    color: #a1a1aa;
}

.theme-dark .admin-messages-bar .message-close {
    color: #a1a1aa;
}

.theme-dark .admin-messages-bar .message-close:hover {
    background: #3c3c3c;
    color: #e4e4e7;
}

.theme-dark .admin-messages-bar .message-actions {
    background: linear-gradient(to right, rgba(79, 70, 229, 0.08), rgba(107, 33, 168, 0.03));
    border-top-color: rgba(79, 70, 229, 0.3);
}

.student-group-header {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.student-group-header h4 {
    margin: 0;
    font-size: 13px;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.session-item {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-item.green {
    border-left: 4px solid #27ae60;
    background-color: #f8fff8;
}

.session-item.orange {
    border-left: 4px solid #f39c12;
    background-color: #fffaf0;
}

.session-item.red {
    border-left: 4px solid #e74c3c;
    background-color: #fff5f5;
}

.session-grid-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.session-grid-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    flex-shrink: 0;
}

.session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 8px;
    align-content: stretch;
    grid-auto-rows: minmax(80px, 1fr);
}

/* Custom scrollbar styling */
.session-grid::-webkit-scrollbar {
    width: 8px;
}

.session-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.session-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.session-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.grid-seat {
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    min-height: 60px;
}

.grid-seat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.grid-seat.occupied {
    cursor: pointer;
}

.grid-seat.green {
    background-color: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.grid-seat.orange {
    background-color: #fff3cd;
    border-color: #f39c12;
    color: #856404;
}

.grid-seat.red {
    background-color: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

.seat-number {
    display: none;
}

.student-name {
    font-size: clamp(12px, calc(12px + (100vh - 600px) * 0.008), 16px);
    text-align: center;
    margin-bottom: 3px;
    line-height: 1.2;
}

.remaining-time {
    font-size: clamp(11px, calc(11px + (100vh - 600px) * 0.008), 15px);
    font-weight: bold;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7));
    backdrop-filter: blur(8px);
    animation: modalBackdropFadeIn 0.4s ease-out;
}

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

.modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    margin: 8% auto;
    padding: 0;
    border: none;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 75vh;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-40px) rotateX(15deg);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

/* Modal Header Styling */
.modal-content h2 {
    margin: 0;
    padding: 24px 30px 16px;
    font-size: 22px;
    font-weight: 600;
    color: #1a202c;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

/* Modal Body Content */
.modal-content > div:not(.modal-content h2),
.modal-content > form {
    padding: 0 30px 24px;
    overflow-y: auto;
    max-height: calc(75vh - 100px);
}

/* Specific modal content styling */
.confirmation-message,
.delete-all-warning,
.import-info,
.reports-options {
    margin: 16px 0;
    padding: 0;
    background: none;
    border: none;
}

.confirmation-message p,
.delete-all-warning p,
.import-info p {
    margin: 0;
    line-height: 1.5;
}

.delete-all-warning strong {
    color: #e74c3c;
    font-weight: 600;
}

.import-info pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    margin: 12px 0 0 0;
}

/* Button Containers */
.confirmation-actions,
.delete-all-actions,
.import-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 16px 0 0;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Enhanced Button Styling */
.modal-content .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
}

.modal-content .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.modal-content .btn-primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}

.modal-content .btn-secondary {
    background: linear-gradient(135deg, #a0aec0, #718096);
}

.modal-content .btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

/* Settings Modal Specific Styles */
.modal-content:has(#settingsForm) {
    max-width: 600px;
    max-height: 90vh;
    margin: 2% auto;
}

.settings-group {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-group h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    border-bottom: 2px solid #cbd5e0;
}

.settings-group .form-group {
    margin-bottom: 12px;
}

.settings-group .form-group:last-child {
    margin-bottom: 0;
}

/* Enhanced form styling for settings */
.settings-group .form-group label {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
    color: #4a5568;
}

.settings-group .form-group input,
.settings-group .form-group select {
    padding: 8px 12px;
    font-size: 13px;
    height: 36px;
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.settings-group .form-group input:focus,
.settings-group .form-group select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    outline: none;
}

.settings-group .form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    accent-color: #4299e1;
}

/* Save button always visible at bottom */
#settingsForm > button[type="submit"] {
    position: sticky;
    bottom: 0;
    margin-top: 20px;
    width: 100%;
    z-index: 10;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border: none;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    height: 48px;
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
    transition: all 0.2s ease;
}

#settingsForm > button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(66, 153, 225, 0.4);
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #718096;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    z-index: 100;
}

.close:hover,
.close:focus {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
    transform: rotate(90deg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    font-size: 14px;
    background-color: #f9f9f9;
    cursor: pointer;
}

.file-input:hover {
    border-color: #3498db;
    background-color: #f0f8ff;
}


.import-results {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

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

.import-results.error {
    background-color: #f8d7da;
    border-color: #f1b0b7;
    color: #721c24;
}

#errorList {
    margin-top: 10px;
    padding-left: 20px;
}

#errorList li {
    margin-bottom: 5px;
    font-size: 12px;
}

/* Delete All Students Modal Styles */
.delete-all-warning {
    margin: 20px 0;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    color: #856404;
}

.delete-all-warning strong {
    color: #d63031;
}

.delete-all-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    justify-content: center;
}

.delete-all-results {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.delete-all-results.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}
.delete-all-results.error {
    background-color: #f8d7da;
    border-color: #f1b0b7;
    color: #721c24;
}

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

.reports-options {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.report-option {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.report-option h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.report-option p {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.report-option select {
    margin-bottom: 15px;
}

/* QR Code Features */
.qr-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.qr-button:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.student-item {
    position: relative;
}

.qr-display-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

.qr-code-display {
    margin: 20px 0;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-data {
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    letter-spacing: 1px;
}

.qr-actions {
    margin-top: 15px;
}

.qr-canvas {
    display: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px 0;
}

.qr-loading {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* QR Scanner video mirror effect */
#qrVideo {
    transform: scaleX(-1);
}

/* Mobile responsive - layout switching */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto;
    }

    /* Layout2 mobile ordering */
    .main-content[data-layout="layout2"] .available-students {
        order: 1;
    }

    .main-content[data-layout="layout2"] .grid-panel {
        order: 2;
    }

    .main-content[data-layout="layout2"] .finished-students {
        order: 3;
    }

    /* Layout1 mobile ordering */
    .main-content[data-layout="layout1"] .students-panel {
        order: 1;
    }

    .main-content[data-layout="layout1"] .grid-panel {
        order: 2;
    }
    
    .settings-panel {
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
    }
    
    header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    /* Mobile Modal Styles */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 5% auto;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .modal-content h2 {
        padding: 20px 24px 12px;
        font-size: 18px;
    }
    
    .modal-content > div:not(.modal-content h2),
    .modal-content > form {
        padding: 0 24px 20px;
    }
    
    .confirmation-actions,
    .delete-all-actions,
    .import-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-content .btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .close {
        top: 12px;
        right: 16px;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
    
    /* Mobile Settings Modal */
    .modal-content:has(#settingsForm) {
        width: 95%;
        max-height: 90vh;
        margin: 2% auto;
    }
    
    .settings-group {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .settings-group h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    #settingsForm > button[type="submit"] {
        padding: 14px;
        height: 52px;
        font-size: 16px;
    }
}

/* Toast Notification Styles */
.toast-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 350px;
    word-wrap: break-word;
}

.toast-notification.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.toast-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-left: 4px solid #25855a;
}

.toast-notification.toast-error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    border-left: 4px solid #c53030;
}

.toast-notification.toast-info {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border-left: 4px solid #2c5aa0;
}

/* Mobile Toast */
@media (max-width: 768px) {
    .toast-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        top: 70px;
    }
}

/* Dark Theme Styles */
.theme-dark {
    background-color: #1a1a1a;
    color: #e4e4e7;
}

.theme-dark .container {
    background-color: #1a1a1a;
}

/* Header - Dark Theme */
.theme-dark .slim-header {
    background: #2d2d30;
    border-bottom: 1px solid #3c3c3c;
    box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1);
}

.theme-dark .app-title {
    color: #e4e4e7;
}

.theme-dark .version-badge {
    background: #2563eb;
    color: #e4e4e7;
}

.theme-dark .company-name {
    color: #a1a1aa;
}

.theme-dark .company-name:hover {
    color: #e4e4e7;
}

.theme-dark .user-name {
    color: #e4e4e7;
}

.theme-dark .status-info {
    color: #a1a1aa;
}

.theme-dark .slim-header .btn-sm:not(.btn-logout) {
    background-color: #52525b;
    color: #e4e4e7;
}

.theme-dark .slim-header .btn-sm:not(.btn-logout):hover {
    background-color: #71717a;
}

/* Panels - Dark Theme */
.theme-dark .students-panel,
.theme-dark .grid-panel,
.theme-dark .finished-students,
.theme-dark .left-panel,
.theme-dark .right-panel {
    background: #2d2d30;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-dark .student-search h2,
.theme-dark .session-grid-container h2 {
    color: #e4e4e7;
}

/* Form Elements - Dark Theme */
.theme-dark .form-input {
    background-color: #3c3c3c;
    border-color: #52525b;
    color: #e4e4e7;
}

.theme-dark .form-input:focus {
    border-color: #60a5fa;
    background-color: #404040;
}

/* Students List - Dark Theme */
.theme-dark .students-list {
    border-color: #52525b;
    background-color: #2d2d30;
}

.theme-dark .last-import-info {
    color: #a1a1aa;
    background: #3c3c3c;
    border-color: #52525b;
}

.theme-dark .student-item {
    border-bottom-color: #3c3c3c;
    color: #e4e4e7;
}

.theme-dark .student-item:hover {
    background-color: #3c3c3c;
}

.theme-dark .student-item.active-session {
    background-color: #1e3a8a;
    border-left-color: #3b82f6;
}

.theme-dark .student-item.session-today {
    background-color: #374151 !important;
    border-left: 4px solid #f59e0b !important;
    opacity: 1 !important;
}

.theme-dark .student-item.session-today:hover {
    background-color: #4b5563 !important;
}

.theme-dark .student-item.session-today .student-name {
    color: #d1d5db !important;
}

.theme-dark .student-item.session-today .student-status {
    color: #fbbf24 !important;
}

/* Finished students - Light theme (default) */
.student-item.finished-student {
    background-color: #f3f4f6;
    border-left: 4px solid #9ca3af;
    opacity: 0.7;
}

.finished-student .student-name {
    color: #6b7280;
}

/* Finished students - Dark theme */
.theme-dark .student-item.finished-student {
    background-color: #1f2937 !important;
    border-left: 4px solid #f59e0b !important;
    opacity: 1 !important;
}

.theme-dark .student-item.finished-student:hover {
    background-color: #374151 !important;
}

.theme-dark .finished-student .student-name {
    color: #d1d5db !important;
}

.theme-dark .finished-student .student-status.finished {
    color: #fbbf24 !important;
    background-color: rgba(251, 191, 36, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.theme-dark .student-status {
    color: #a1a1aa;
}

.theme-dark .student-status.active {
    color: #60a5fa;
}

.theme-dark .student-status.finished {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #fbbf24;
    font-weight: 600;
    background-color: rgba(251, 191, 36, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.theme-dark .student-group-header {
    background-color: #3c3c3c;
    border-bottom-color: #52525b;
}

.theme-dark .student-group-header h4 {
    color: #d1d5db;
}

.theme-dark .no-results {
    color: #a1a1aa;
}

/* Session Grid - Dark Theme */
.theme-dark .grid-seat {
    background-color: #3c3c3c;
    border-color: #52525b;
    color: #e4e4e7;
}

.theme-dark .grid-seat:hover {
    background-color: #404040;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
}

.theme-dark .grid-seat.green {
    background-color: #166534;
    border-color: #22c55e;
    color: #bbf7d0;
}

.theme-dark .grid-seat.orange {
    background-color: #9a3412;
    border-color: #f97316;
    color: #fed7aa;
}

.theme-dark .grid-seat.red {
    background-color: #991b1b;
    border-color: #ef4444;
    color: #fecaca;
}

/* Session Items - Dark Theme */
.theme-dark .session-item {
    background-color: #3c3c3c;
    border-color: #52525b;
    color: #e4e4e7;
}

.theme-dark .session-item.green {
    background-color: #14532d;
    border-left-color: #22c55e;
}

.theme-dark .session-item.orange {
    background-color: #9a3412;
    border-left-color: #f97316;
}

.theme-dark .session-item.red {
    background-color: #991b1b;
    border-left-color: #ef4444;
}

/* Buttons - Dark Theme */
.theme-dark .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.4);
}

.theme-dark .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.5);
}

.theme-dark .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.4);
}

.theme-dark .btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.5);
}

.theme-dark .btn-info {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(8, 145, 178, 0.4);
}

.theme-dark .btn-info:hover {
    background: linear-gradient(135deg, #0e7490, #155e75);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(8, 145, 178, 0.5);
}

.theme-dark .btn-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(22, 163, 74, 0.4);
}

.theme-dark .btn-success:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 163, 74, 0.5);
}

.theme-dark .btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.4);
}

.theme-dark .btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.5);
}

/* Modals - Dark Theme */
.theme-dark .modal {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8));
}

.theme-dark .modal-content {
    background: linear-gradient(145deg, #2d2d30, #1f1f23);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 10px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.theme-dark .modal-content h2 {
    color: #e4e4e7;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom-color: #3c3c3c;
}

.theme-dark .close {
    color: #a1a1aa;
}

.theme-dark .close:hover,
.theme-dark .close:focus {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Settings Modal - Dark Theme */
.theme-dark .settings-group {
    background: linear-gradient(135deg, #3c3c3c, #404040);
    border-color: #52525b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.theme-dark .settings-group h3 {
    color: #e4e4e7;
    border-bottom-color: #52525b;
}

.theme-dark .settings-group .form-group label {
    color: #d1d5db;
}

.theme-dark .settings-group .form-group input,
.theme-dark .settings-group .form-group select {
    background: #404040;
    border-color: #52525b;
    color: #e4e4e7;
}

.theme-dark .settings-group .form-group input:focus,
.theme-dark .settings-group .form-group select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.theme-dark .settings-group .form-group input[type="checkbox"] {
    accent-color: #60a5fa;
}

.theme-dark #settingsForm > button[type="submit"] {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.theme-dark #settingsForm > button[type="submit"]:hover {
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

/* Form Groups - Dark Theme */
.theme-dark .form-group label {
    color: #d1d5db;
}

.theme-dark .form-group input {
    background-color: #3c3c3c;
    border-color: #52525b;
    color: #e4e4e7;
}

.theme-dark .form-group input:focus {
    border-color: #60a5fa;
}

/* File Input - Dark Theme */
.theme-dark .file-input {
    background-color: #3c3c3c;
    border-color: #52525b;
    color: #e4e4e7;
}

.theme-dark .file-input:hover {
    border-color: #60a5fa;
    background-color: #404040;
}

/* Information Boxes - Dark Theme */
.theme-dark .import-info,
.theme-dark .confirmation-message,
.theme-dark .delete-all-warning {
    background: none;
    border: none;
}

.theme-dark .delete-all-warning strong {
    color: #ef4444;
    font-weight: 600;
}

.theme-dark .import-info pre {
    background-color: #404040;
    border-color: #52525b;
    color: #e4e4e7;
}

/* Import/Delete Results - Dark Theme */
.theme-dark .import-results.success,
.theme-dark .delete-all-results.success {
    background-color: #14532d;
    border-color: #16a34a;
    color: #bbf7d0;
}

.theme-dark .import-results.error,
.theme-dark .delete-all-results.error {
    background-color: #991b1b;
    border-color: #ef4444;
    color: #fecaca;
}

.theme-dark .import-info pre {
    background-color: #404040;
    color: #e4e4e7;
}

/* Reports - Dark Theme */
.theme-dark .reports-options {
    color: #e4e4e7;
}

.theme-dark .report-option {
    background-color: #3c3c3c;
    border-color: #52525b;
}

.theme-dark .report-option h3 {
    color: #e4e4e7;
}

.theme-dark .report-option p {
    color: #a1a1aa;
}

/* Enhanced Button Styling for Dark Theme */
.theme-dark .modal-content .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.theme-dark .modal-content .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.theme-dark .modal-content .btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Inactive Students Table */
.inactive-students-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.inactive-students-table thead {
    background-color: #f5f5f5;
}

.inactive-students-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #ddd;
    color: #333;
    font-weight: 600;
}

.inactive-students-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    color: #666;
}

.inactive-students-table tbody tr {
    background: white;
}

.inactive-students-table tbody tr:hover {
    background-color: #f8f9fa;
}

.inactive-students-info {
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #666;
}

.inactive-students-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Dark Theme - Inactive Students Table */
.theme-dark .inactive-students-table {
    background: linear-gradient(145deg, #2d2d30, #1f1f23);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.theme-dark .inactive-students-table thead {
    background-color: rgba(60, 60, 60, 0.6) !important;
}

.theme-dark .inactive-students-table th {
    border-bottom-color: #52525b !important;
    color: #e4e4e7 !important;
    background: transparent !important;
    padding: 12px !important;
}

.theme-dark .inactive-students-table td {
    border-bottom-color: #3c3c3c;
    color: #d1d5db !important;
}

.theme-dark .inactive-students-table tbody tr {
    background: transparent !important;
}

.theme-dark .inactive-students-table tbody tr:hover {
    background-color: rgba(60, 60, 60, 0.5) !important;
}

.theme-dark .inactive-students-info {
    background: #3c3c3c;
    color: #a1a1aa;
}

.theme-dark .inactive-students-list {
    border-color: #52525b;
}

/* Toast Notifications - Dark Theme */
.theme-dark .toast-notification.toast-success {
    background: linear-gradient(135deg, #16a34a, #15803d);
    border-left-color: #22c55e;
}

.theme-dark .toast-notification.toast-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-left-color: #ef4444;
}

.theme-dark .toast-notification.toast-info {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-left-color: #3b82f6;
}

/* QR Scanner Styles */
.qr-scanner-modal {
    max-width: 800px;
    margin: 2% auto;
}

.qr-scanner-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.camera-container {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    width: 50%;
}

#qrVideo {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #000;
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-left: -100px;
    border: 3px solid #007bff;
    border-radius: 12px;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.3);
    animation: scannerPulse 2s infinite;
}

@keyframes scannerPulse {
    0%, 100% {
        border-color: #007bff;
        box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.3);
    }
    50% {
        border-color: #0056b3;
        box-shadow: 0 0 0 6px rgba(0, 123, 255, 0.5);
    }
}

.scanner-controls {
    margin-bottom: 20px;
}

.scanner-controls button {
    margin: 0 10px;
}

.scanner-status {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-weight: 500;
}

.scanner-result {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.scanner-result h3 {
    color: #155724;
    margin-bottom: 15px;
}

#scannedStudentInfo {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: left;
}

.scanner-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.scanner-actions button {
    min-width: 120px;
}

.student-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 50%;
}

.student-result-panel h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
}

.student-info-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
}

.student-info-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.student-info-card p {
    margin: 5px 0;
    color: #6c757d;
}

/* Dark theme QR scanner styles */
.theme-dark .scanner-status {
    background-color: #3c3c3c;
    color: #e4e4e7;
}

.theme-dark .scanner-result {
    background-color: #2d5a3d;
    border-color: #4a7c5a;
}

.theme-dark .scanner-result h3 {
    color: #a7f3d0;
}

.theme-dark #scannedStudentInfo {
    background-color: #52525b;
    color: #e4e4e7;
}

.theme-dark #qrVideo {
    border-color: #52525b;
}

/* Dark theme for student result panel */
.theme-dark .student-result-panel h3 {
    color: #e4e4e7;
}

.theme-dark .student-info-card {
    background: #3c3c3c;
    border-color: #52525b;
}

.theme-dark .student-info-card h4 {
    color: #e4e4e7;
}

.theme-dark .student-info-card p {
    color: #a1a1aa;
}

/* Responsive QR scanner */
@media (max-width: 768px) {
    .qr-scanner-modal {
        margin: 5px;
        width: calc(100% - 10px);
    }

    .qr-scanner-container {
        flex-direction: column;
        gap: 15px;
    }

    #qrVideo {
        width: 250px;
        height: 250px;
    }

    .scanner-frame {
        width: 150px;
        height: 150px;
        margin-top: -75px;
        margin-left: -75px;
    }

    .scanner-actions {
        flex-direction: column;
        align-items: center;
    }

    .scanner-actions button {
        width: 100%;
        max-width: 200px;
    }
}

/* QR Confirmation Buttons */
.qr-confirmation-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.qr-confirmation-buttons .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.qr-confirmation-buttons .btn-primary {
    background-color: #007bff;
    color: white;
}

.qr-confirmation-buttons .btn-primary:hover {
    background-color: #0056b3;
}

.qr-confirmation-buttons .btn-danger {
    background-color: #dc3545;
    color: white;
}

.qr-confirmation-buttons .btn-danger:hover {
    background-color: #c82333;
}

.qr-confirmation-buttons .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.qr-confirmation-buttons .btn-secondary:hover {
    background-color: #5a6268;
}

.qr-confirmation-buttons .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Keyboard Shortcuts Modal Styles */
.shortcuts-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.shortcuts-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.shortcuts-section h3 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 5px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 4px 0;
}

.shortcut-item kbd {
    background: #e9ecef;
    border: 1px solid #adb5bd;
    border-radius: 3px;
    color: #495057;
    font-family: monospace;
    font-size: 12px;
    padding: 2px 6px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.shortcut-item span {
    margin-left: 10px;
    color: #6c757d;
    font-size: 14px;
}

/* About Modal Styles */
.about-content {
    margin: 20px 0;
}

.about-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.about-section h3 {
    margin: 0 0 10px 0;
    color: #007bff;
    font-size: 16px;
    font-weight: 600;
}

.about-section p {
    margin: 8px 0;
    color: #6c757d;
    line-height: 1.5;
}

.about-section ul {
    margin: 10px 0;
    padding-left: 20px;
    color: #6c757d;
}

.about-section li {
    margin: 5px 0;
    line-height: 1.4;
}

/* Dark theme styles for shortcuts and about modals */
.theme-dark .shortcuts-section,
.theme-dark .about-section {
    background: #3c3c3c;
    border-color: #52525b;
}

.theme-dark .shortcuts-section h3 {
    color: #e4e4e7;
    border-bottom-color: #52525b;
}

.theme-dark .about-section h3 {
    color: #60a5fa;
}

.theme-dark .shortcut-item kbd {
    background: #52525b;
    border-color: #71717a;
    color: #e4e4e7;
}

.theme-dark .shortcut-item span,
.theme-dark .about-section p,
.theme-dark .about-section ul,
.theme-dark .about-section li {
    color: #a1a1aa;
}

.theme-dark .about-section {
    border-left-color: #60a5fa;
}

/* ========== ADMINISTRATIVE MESSAGES BANNER ========== */

.messages-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: white;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease-out;
}

.messages-banner.warning {
    background: linear-gradient(135deg, #ff9500, #ffcc02);
}

.messages-banner.maintenance {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.messages-banner.urgent {
    background: linear-gradient(135deg, #dc3545, #c82333);
    animation: urgent-pulse 2s infinite;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes urgent-pulse {
    0%, 100% {
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    }
    50% {
        box-shadow: 0 -4px 20px rgba(220, 53, 69, 0.4);
    }
}

.banner-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-scroll {
    flex: 1;
    overflow: hidden;
    margin-right: 20px;
}

.banner-message {
    white-space: nowrap;
    animation: scroll-text 15s linear infinite;
    font-weight: 500;
}

@keyframes scroll-text {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.banner-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.banner-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.btn-acknowledge {
    background: rgba(76, 175, 80, 0.8);
    border-color: rgba(76, 175, 80, 0.9);
}

.btn-acknowledge:hover {
    background: rgba(76, 175, 80, 1);
    border-color: #4caf50;
}

.btn-veto {
    background: rgba(244, 67, 54, 0.8);
    border-color: rgba(244, 67, 54, 0.9);
}

.btn-veto:hover {
    background: rgba(244, 67, 54, 1);
    border-color: #f44336;
}

.btn-propose {
    background: rgba(255, 193, 7, 0.8);
    border-color: rgba(255, 193, 7, 0.9);
    color: #333;
}

.btn-propose:hover {
    background: rgba(255, 193, 7, 1);
    border-color: #ffc107;
    color: #333;
}

.btn-dismiss {
    background: rgba(108, 117, 125, 0.8);
    border-color: rgba(108, 117, 125, 0.9);
}

.btn-dismiss:hover {
    background: rgba(108, 117, 125, 1);
    border-color: #6c757d;
}

/* Propose Time Modal Styles */
.propose-time-form {
    padding: 20px 0;
}

.propose-time-form .form-group {
    margin-bottom: 15px;
}

.propose-time-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.propose-time-form .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.propose-time-form textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Dark theme styles for messages banner */
.theme-dark .messages-banner {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.theme-dark .messages-banner.warning {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.theme-dark .messages-banner.maintenance {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.theme-dark .messages-banner.urgent {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.theme-dark .banner-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e4e4e7;
}

.theme-dark .banner-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.theme-dark .propose-time-form label {
    color: #e4e4e7;
}

.theme-dark .propose-time-form .form-input {
    background: #3c3c3c;
    border-color: #52525b;
    color: #e4e4e7;
}

.theme-dark .propose-time-form .form-input:focus {
    border-color: #60a5fa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .banner-content {
        padding: 10px 15px;
    }

    .banner-scroll {
        margin-right: 15px;
    }

    .banner-message {
        font-size: 14px;
    }

    .banner-actions {
        gap: 6px;
    }

    .banner-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .banner-btn i {
        display: none;
    }
}

/* Admin Panel Specific Styles */
.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: #f5f5f5;
    width: 100%;
    max-width: none;
}

/* Remove container padding for admin layout to achieve full width */
.container:has(.admin-content) {
    padding: 0 !important;
}

/* Fallback for browsers that don't support :has() */
body.admin-layout .container {
    padding: 0 !important;
}

.admin-content h1 {
    margin-bottom: 2rem;
}

/* Ensure admin pages don't get the container padding */
.admin-content .container {
    padding: 0;
    max-width: none;
    width: 100%;
}

/* Admin content adjustments for better spacing */
.admin-content > div {
    background: #f5f5f5;
    width: 100%;
    max-width: none;
}

/* Admin tables and forms styling */
.admin-content table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.admin-content .btn {
    margin: 2px;
}

/* Admin table containers */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 800px;
}

/* Admin content wrapper for full width */
.admin-content .admin-header,
.admin-content .admin-content-wrapper {
    width: 100%;
    padding: 0 2rem;
}

/* Remove max-width constraints on admin pages */
.admin-content div[style*="max-width"] {
    max-width: none !important;
    width: 100% !important;
}

/* Admin Messages Bar - Enhanced Administrator Style */
.admin-messages-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin: 0 20px 20px 20px;
    padding: 2px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    animation: subtle-glow 3s ease-in-out infinite alternate;
    position: relative;
}

@keyframes subtle-glow {
    from { box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25); }
    to { box-shadow: 0 4px 24px rgba(118, 75, 162, 0.35); }
}

.admin-messages-bar .admin-message {
    border-left: 5px solid;
    background: white;
    margin: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: none;
    position: relative;
}

.admin-message {
    border-left: 4px solid #007bff;
    background: white;
    margin: 8px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-message.message-info {
    border-left-color: #17a2b8;
}
.admin-message.message-warning {
    border-left-color: #ffc107;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.05), white);
}
.admin-message.message-maintenance {
    border-left-color: #007bff;
}
.admin-message.message-urgent {
    border-left-color: #dc3545;
    background: linear-gradient(to right, rgba(220, 53, 69, 0.05), white);
    animation: urgent-pulse 2s ease-in-out infinite;
}

@keyframes urgent-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.003); }
}

.admin-message.priority-5 {
    box-shadow: 0 2px 12px rgba(220, 53, 69, 0.35);
}
.admin-message.priority-4 {
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.admin-messages-bar .message-header {
    background: linear-gradient(to right, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.03));
}

.message-type {
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-info .message-type {
    background: linear-gradient(135deg, #17a2b8, #148a94);
}
.message-warning .message-type {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #333;
}
.message-maintenance .message-type {
    background: linear-gradient(135deg, #007bff, #0056b3);
}
.message-urgent .message-type {
    background: linear-gradient(135deg, #dc3545, #c82333);
    animation: type-flash 1.5s ease-in-out infinite;
}

@keyframes type-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.message-title {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.message-priority {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
}

.message-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    line-height: 1;
}

.message-close:hover {
    background: #dee2e6;
    color: #333;
}

.message-content {
    padding: 16px;
    color: #333;
    line-height: 1.5;
}

.message-actions {
    padding: 12px 16px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    display: flex;
    gap: 8px;
}

.admin-messages-bar .message-actions {
    background: linear-gradient(to right, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.02));
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.message-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.message-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.acknowledge-btn {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.acknowledge-btn::before {
    content: '✓';
    margin-right: 4px;
}

.acknowledge-btn:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.4);
}

.veto-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    font-weight: 600;
}

.veto-btn::before {
    content: '✗';
    margin-right: 4px;
}

.veto-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4);
}

.propose-btn {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #333;
    border: none;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
    font-weight: 600;
}

.propose-btn::before {
    content: '⏰';
    margin-right: 4px;
}

.propose-btn:hover {
    background: linear-gradient(135deg, #ffb300, #ffa000);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 193, 7, 0.4);
}