/* ===================================
   ACCESSIBILITY STYLES
   =================================== */

/* Skip Navigation Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Global button border radius */
button {
    border-radius: 8px;
}

/* Focus Indicators for All Interactive Elements */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus,
[role="button"]:focus,
[role="tab"]:focus {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* High Contrast Focus for Keyboard Navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(74, 144, 226, 0.2);
}

/* Admin Menu Items as Buttons */
.admin-menu-item {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}

/* ===================================
   END ACCESSIBILITY STYLES
   =================================== */

/* Compact mode (true CSS, no scaling) */
body.compact-mode {
    font-size: 0.85em;
}

/* NEVER apply compact mode when login is active */
body.login-active.compact-mode {
    font-size: 1rem !important;
}

/* Login screen should NEVER be in compact mode - backup safety net */
body.compact-mode #login-screen,
body.compact-mode #login-screen *,
body.compact-mode #login-screen .login-container,
body.compact-mode #login-screen .login-header,
body.compact-mode #login-screen .login-form {
    font-size: 1rem !important;
    padding: revert !important;
}
body.compact-mode .dashboard-main {
    padding: 8px !important;
    padding-top: 80px !important; /* Account for fixed header in compact mode */
}
body.compact-mode .student-card,
body.compact-mode .session-main,
body.compact-mode .queue-main {
    padding: 8px !important;
}
/* Explicitly exclude login-container from compact mode padding */
body.compact-mode #login-screen .login-container {
    padding: 40px 20px !important;
}
body.compact-mode .stat-card,
body.compact-mode .nav-btn,
body.compact-mode .form-group input:not(.login-form input),
body.compact-mode .form-group select:not(.login-form select),
body.compact-mode .modal-content:not(:has(.student-info-modal)),
body.compact-mode .personalization-modal-content {
    font-size: 0.95em !important;
    padding: 6px 10px !important;
}
/* Ensure login form inputs keep their original styling */
body.compact-mode .login-form input {
    padding: 15px 20px !important;
    font-size: 1.1rem !important;
}
body.compact-mode .header-title,
body.compact-mode h1:not(#login-screen h1),
body.compact-mode h2:not(#login-screen h2),
body.compact-mode h3:not(#login-screen h3) {
    font-size: 1.1em !important;
}
/* Ensure login screen logo keeps its original size */
body.compact-mode #login-screen .uvu-login-logo {
    max-width: 180px !important;
}
body.compact-mode .stat-number,
body.compact-mode .student-name-display,
body.compact-mode .student-id-box {
    font-size: 0.95em !important;
}
body.compact-mode .nav-btn,
body.compact-mode .modal-btn {
    min-height: 28px !important;
    font-size: 0.95em !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
}
/* Ensure login button keeps its original styling */
body.compact-mode .login-form .login-btn {
    padding: 18px !important;
    font-size: 1.2rem !important;
    min-height: auto !important;
}
body.compact-mode .form-group:not(.login-form .form-group) input,
body.compact-mode .form-group:not(.login-form .form-group) select {
    padding: 6px 10px !important;
    font-size: 0.95em !important;
}
/* Ensure login form groups keep their original styling */
body.compact-mode .login-form .form-group label {
    font-size: 1rem !important;
    margin-bottom: 8px !important;
}
body.compact-mode .student-avatar-photo img,
body.compact-mode .student-photo,
body.compact-mode .avatar-placeholder {
    width: 36px !important;
    height: 36px !important;
}
body.compact-mode .student-card {
    min-width: 0 !important;
    max-width: 260px !important;
}
body.compact-mode .queue-controls button,
body.compact-mode .action-btn,
body.compact-mode .tab-btn {
    font-size: 0.95em !important;
    padding: 4px 8px !important;
    min-height: 24px !important;
    border-radius: 8px !important;
}
body.compact-mode .form-group label,
body.compact-mode label {
    font-size: 0.95em !important;
}
body.compact-mode .dashboard-grid,
body.compact-mode .stats-panel {
    gap: 8px !important;
}
body.compact-mode .modal-option {
    margin-bottom: 8px !important;
}

/* Compact mode: Session screen specific layout */
body.compact-mode .session-screen .student-card {
    display: grid !important;
    grid-template-columns: auto 1fr 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 10px !important;
    max-width: none !important;
    padding: 12px !important;
}

/* Use display: contents to flatten student-avatar children into the grid */
body.compact-mode .session-screen .student-avatar {
    display: contents !important;
}

/* Photo positioned in column 1, row 1 */
body.compact-mode .session-screen .student-avatar-photo {
    grid-column: 1;
    grid-row: 1;
    width: 140px !important;
    height: 140px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

body.compact-mode .session-screen .student-photo,
body.compact-mode .session-screen .avatar-placeholder {
    width: 140px !important;
    height: 140px !important;
    border-radius: 8px;
}

/* Name positioned in column 1, row 2, directly below photo */
body.compact-mode .session-screen .student-name-display {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    max-width: 140px;
    text-align: center;
    margin-top: 8px;
    padding: 0;
}

/* UV ID box positioned in column 2, row 1 */
body.compact-mode .session-screen .student-avatar .student-id-box,
body.compact-mode .session-screen .student-id-box {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    padding: 10px 15px !important;
    margin: 0 !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    text-align: center !important;
    color: #666 !important;
    align-self: start !important;
    display: block !important;
    line-height: 1.5 !important;
}

/* Make the ID number larger than the label */
body.compact-mode .session-screen .student-avatar .student-id-box br + *,
body.compact-mode .session-screen .student-id-box br + * {
    font-size: 1.1rem !important;
}

/* Visit Type box - positioned in column 3, row 1, aligned to the right */
body.compact-mode .session-screen .visit-info-box {
    grid-column: 3 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    margin-left: auto !important;
    align-self: start !important;
    justify-self: end !important;
    padding: 10px 15px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    text-align: center !important;
}

/* Program and status in row 2, columns 2-3 */
body.compact-mode .session-screen .student-card .student-info {
    grid-column: 2 / 4 !important;
    grid-row: 2 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.compact-mode .session-screen .student-info h2 {
    display: none !important;
}

body.compact-mode .session-screen .student-program,
body.compact-mode .session-screen .student-status {
    font-size: 0.85rem !important;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    margin: 0 !important;
}

/* End session button in row 3, spans columns 2-3 */
body.compact-mode .session-screen .session-actions {
    grid-column: 2 / 4 !important;
    grid-row: 3 !important;
    margin-top: 0;
}

body.compact-mode .session-screen .end-session-btn {
    width: 100%;
    padding: 12px 20px !important;
    font-size: 1rem !important;
}

body.compact-mode .session-screen .session-timer {
    padding: 10px !important;
}

body.compact-mode .session-screen .timer-display {
    font-size: 1.6rem !important;
}

body.compact-mode .session-screen .visit-reason {
    gap: 10px !important;
}

body.compact-mode .session-screen .student-selected-reason,
body.compact-mode .session-screen .advisor-selected-reasons {
    padding: 10px !important;
}

/* In compact mode, reorder layout to move stats below queue list */
body.compact-mode .dashboard-main {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "nav"
        "content"
        "stats";
}
/* Dashboard grid contains nav and stats, but we'll extract them */
body.compact-mode .dashboard-grid {
    display: contents; /* Makes children behave as if they're direct children of dashboard-main */
}
/* Nav panel in first row */
body.compact-mode .nav-panel {
    grid-area: nav;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
/* Function content in second row (queue list) */
body.compact-mode .function-content {
    grid-area: content;
}
/* Stats panel in third row (below queue list) */
body.compact-mode .stats-panel {
    grid-area: stats;
}
/* In compact mode, move Check Queue and Sessions buttons to queue controls */
body.compact-mode .nav-panel {
    display: none; /* Hide the original nav panel position */
}
body.compact-mode .queue-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
/* Container for nav buttons moved to queue controls */
.compact-nav-buttons {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
/* In compact mode, add padding to align with student cards */
body.compact-mode .compact-nav-buttons {
    padding-right: 5px; /* Match the student-item margin-right */
}
/* Style the nav buttons when in compact mode queue controls */
body.compact-mode .compact-nav-buttons .nav-btn {
    padding: 4px 8px !important;
    font-size: 0.95em !important;
    min-height: 24px !important;
    display: inline-block !important; /* Force visibility */
    border-radius: 8px !important;
}
/* Override any rules that might hide secondary buttons in compact nav */
body.compact-mode .compact-nav-buttons .nav-btn.secondary {
    display: inline-block !important;
}
/* Personalization Modal Styles */
.personalization-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.25);
    z-index: 2000;
}
.personalization-modal-content {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    min-width: 320px;
    max-width: 95vw;
    padding: 0;
    animation: modalIn 0.18s cubic-bezier(.4,1.4,.6,1) 1;
}
.personalization-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px 10px 24px;
    border-bottom: 1px solid #eee;
}
.personalization-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #185C33;
}
.close-modal-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 0 0 2px 0;
    transition: color 0.2s;
}
.close-modal-btn:hover {
    color: #c41e3a;
}
.personalization-modal-body {
    padding: 24px 24px 18px 24px;
    max-height: 70vh;
    overflow-y: auto;
}
.modal-option {
    margin-bottom: 18px;
}
@keyframes modalIn {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    width: 100%;
    overflow-x: hidden;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Login Screen Styles */
.login-screen {
    background: white !important; /* Force white background */
    min-height: 100vh;
}

.login-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.uvu-login-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 10px;
}

.uvu-logo p {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.2;
    color: #185C33;
    margin-bottom: 20px;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1e5631;
    box-shadow: 0 0 0 3px rgba(30, 86, 49, 0.1);
}

.login-btn {
    width: 100%;
    background: #185C33; /* Changed from linear-gradient to solid UVU green */
    color: white;
    border: none;
    padding: 18px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 92, 51, 0.4);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

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

.error-message {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e84 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
}

/* Dashboard Styles */
.dashboard-screen {
    background: white;
    display: flex;
    flex-direction: column;
}

.dashboard-main {
    flex: 1;
    padding: 30px;
    padding-top: 90px; /* Account for fixed header height (~70px header + 20px gap) */
    max-width: 100%;
}

.dashboard-header {
    background: #185C33; /* Pantone 7483 - UVU Green */
    padding: 12px 30px; /* Reduced from 20px to 12px vertical padding */
    border-bottom: 2px solid #124023;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 5px; /* Small gap for Safari toolbar color detection */
    left: 0;
    right: 0;
    z-index: 100;
}

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

.hamburger-menu-left {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
}

.hamburger-menu-left:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    display: block;
    transition: all 0.3s ease;
}

.hamburger-menu-left:hover .hamburger-line {
    background: #ddd;
}

.uvu-header-logo {
    height: 40px;
    width: auto;
}

.header-title {
    font-size: 1.3rem; /* Reduced from 1.5rem to 1.3rem */
    font-weight: 700;
    color: white;
}

/* Environment indicator badge (dev/test server) */
.env-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    vertical-align: middle;
}

.env-badge.dev {
    background: #ff6b35;
    color: white;
}

.env-badge.test {
    background: #ffc107;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.advisor-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.advisor-name {
    font-weight: 700;
    color: white; /* Changed from #333 to white */
    font-size: 1rem;
}

.advisor-id {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9); /* Changed from #666 to semi-transparent white */
    font-size: 0.9rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2); /* Semi-transparent white background */
    color: white;
    border: 2px solid white; /* White border */
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem; /* Added explicit font size */
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3); /* Lighter on hover */
    transform: translateY(-1px);
}

.hamburger-menu {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.menu-dot {
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    display: block;
    transition: all 0.3s ease;
}

.hamburger-menu:hover .menu-dot {
    background: #ddd;
}

/* Menu dropdown (for later) */
.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
}

.menu-dropdown.active {
    display: block;
}

.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #e9ecef;
}

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

.menu-item:hover {
    background: #f0f7f4;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    margin-bottom: 30px;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    text-align: center;
}

.stat-card label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e5631;
}

.nav-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

/* Two-column nav panel layout */
.nav-panel.nav-panel-two-col {
    flex-direction: row;
    gap: 15px;
    min-width: 400px;
}

.nav-panel-two-col .nav-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.nav-btn {
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.nav-btn.primary {
    background: #185C33;
    color: white;
}

/* Hide Notes button - more specific selector, but not in compact mode nav */
.nav-btn.secondary.notes-btn:not(.compact-nav-buttons .nav-btn),
.nav-btn[onclick*="Notes"]:not(.compact-nav-buttons .nav-btn) {
    display: none !important;
}

.nav-btn.secondary {
    background: white;
    color: #333;
    border: 2px solid #e9ecef;
}

.nav-btn.secondary.active {
    background: #185C33;
    color: white;
    border-color: #185C33;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-btn.primary:hover {
    background: #124023;
    box-shadow: 0 4px 12px rgba(24, 92, 51, 0.3);
}

.nav-btn.secondary:hover {
    border-color: #185C33;
}

/* Survey/Report Student Barrier button in nav panel - blue to stand out */
.nav-btn.survey-nav-btn {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
    font-size: 0.85rem;
    line-height: 1.3;
    padding: 10px 15px;
}

.nav-btn.survey-nav-btn:hover {
    background: #0052a3;
    border-color: #0052a3;
}

/* Function content area in dashboard */
.function-content {
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 0;
    max-width: 100%;
}

/* Queue Content Styles */
.queue-content {
    padding: 20px;
}

.queue-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px; /* Increased from 20px to 30px */
    margin-top: 15px; /* Add top margin to push controls down */
    flex-wrap: wrap;
    align-items: center; /* Align items vertically */
}

/* Sessions Content Styles */
.sessions-content {
    padding: 20px;
}

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

.sessions-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.sessions-nav-buttons {
    display: flex;
    gap: 8px;
}

/* Style sessions nav buttons like compact nav buttons */
.sessions-nav-buttons .nav-btn {
    padding: 4px 8px !important;
    font-size: 0.95em !important;
    min-height: 24px !important;
    display: inline-block !important;
}

.tab-btn {
    background: white;
    border: 2px solid #e9ecef;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #185C33; /* Solid green, matching other buttons */
    color: white;
    border-color: #185C33;
}

.tab-btn:hover {
    border-color: #185C33;
}

.add-btn {
    padding: 12px 24px;
    background: white;
    color: #333;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    border-color: #185C33;
    transform: translateY(-2px);
}

/* Student List */
.student-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 100%;
    padding: 0;
    position: relative;
    z-index: 1;
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px; /* Reduced from 20px to 12px vertical, 15px horizontal */
    background: white;
    border-radius: 12px;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    margin: 0 5px;
}

.student-item:first-child {
    margin-top: 5px;
}

.student-item:last-child {
    margin-bottom: 5px;
}

.student-item:hover {
    border-color: #1e5631;
    box-shadow: 0 4px 8px rgba(30, 86, 49, 0.2);
    transform: translateY(-2px);
}

.student-item.selected {
    border-color: #1e5631;
    background: #f0f7f4;
}

/* Long wait alert styling - visual indicator for students waiting too long */
.student-item.long-wait-alert {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    animation: pulse-alert 2s ease-in-out infinite;
}

.student-item.long-wait-alert:hover {
    border-color: #c82333;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

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

/* Wait time indicator badge */
.wait-time-indicator {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
    vertical-align: middle;
}

.student-info {
    display: flex;
    align-items: center;
    gap: 15px; /* Reduced from 20px to 15px */
    flex: 1;
    padding-left: 10px;
}

.student-number {
    width: 45px; /* Reduced from 50px to 45px */
    height: 45px; /* Reduced from 50px to 45px */
    background: #1e5631;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem; /* Reduced from 1.2rem to 1.1rem */
    flex-shrink: 0;
}

.student-details {
    flex: 1;
    background: #c4d6c1;
    padding: 10px 12px; /* Reduced from 15px to 10px 12px */
    border-radius: 12px;
    margin-right: 15px;
}

.student-details h3 {
    margin: 0;
    padding: 0;
    font-size: 1rem; /* Reduced from 1.1rem to 1rem */
    color: #333;
    font-weight: 700;
}

.student-details p {
    margin: 3px 0 0 0; /* Reduced from 5px to 3px */
    padding: 0;
    color: #666;
    font-size: 0.85rem; /* Reduced from 0.9rem to 0.85rem */
}

.student-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px; /* Reduced from 5px to 3px */
    padding-right: 15px; /* Reduced from 20px to 15px */
    padding-left: 10px;
    min-width: 150px; /* Fixed width to keep all queue items the same length */
    flex-shrink: 0;
}

.student-time {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem; /* Added font size */
}

.student-advisor {
    color: #666;
    font-size: 0.85rem; /* Reduced from 0.9rem to 0.85rem */
}

/* Student ID box styling */
.student-id-box {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    text-align: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    width: 195px;
    margin: 8px auto 0;
    box-sizing: border-box;
}

/* Queue Screen Styles */
.queue-screen {
    background: white;
    display: flex;
    flex-direction: column;
}

.queue-main {
    flex: 1;
    padding: 20px;
    max-width: 100%;
}

.queue-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 2px solid #e9ecef;
}

.queue-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.queue-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.queue-time {
    color: #666;
    font-weight: 600;
}

.action-btn {
    background: #185C33;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.action-btn:not(:disabled):hover {
    background: #124023;
    transform: translateY(-1px);
}

/* Session Screen Styles */
.session-screen {
    background: #f2f0eb; /* UVU Warm background color */
    display: flex;
    flex-direction: column;
}

/* Remove the old session-header styles */
.session-header {
    display: none;
}

.session-main {
    flex: 1;
    padding: 30px;
    overflow-x: hidden;
    max-width: 100%;
    background: #f2f0eb; /* UVU Warm background color */
}

/* New layout structure */
.session-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    align-items: start;
}

.session-left-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.session-timer {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
}

.session-timer label {
    display: block;
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1rem;
}

.timer-display {
    font-size: 2rem;
    font-weight: 700;
    color: #1e5631;
}

/* Remove old session-info styles */
.session-info {
    display: none;
}

/* Update student details and card */
.student-details {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.student-card {
    padding: 30px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    gap: 30px;
    align-items: start;
    max-width: 100%;
    position: relative;
    min-height: 400px; /* Ensure card has enough height */
}

.student-avatar {
    position: relative;
    width: 150px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.student-avatar-photo {
    width: 150px;
    height: 150px;
    position: relative;
}

.student-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #1e5631;
    display: block;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e5631 0%, #2d7a3d 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: bold;
}

.avatar-placeholder::before {
    content: attr(data-initials);
}

.student-name-display {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e5631;
    text-align: center;
    word-wrap: break-word;
    max-width: 150px;
}

.student-avatar .student-id-display {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    text-align: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.student-card .student-info {
    padding-left: 20px;
    grid-column: 2;
    grid-row: 1;
}

.student-info h2 {
    display: none;
}

.student-program,
.student-status {
    font-size: 1rem;
    color: #666;
    margin: 8px 0;
}

/* Session action buttons in lower right */
.session-actions {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    align-items: flex-end;
    padding-left: 20px;
}

/* Remove all margins from buttons inside session-actions - let gap handle spacing */
.session-actions button {
    margin: 0 !important;
}

.end-session-btn {
    background: #dc3545; /* Changed from #185C33 to red */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem; /* Increased from default to 1.1rem */
    transition: all 0.3s ease;
}

.end-session-btn:hover {
    background: #c82333; /* Changed from #124023 to darker red */
    transform: translateY(-1px);
}

.notes-btn {
    display: none; /* Hide the notes button */
}

.student-self-service-btn {
    /* Match the height of the End Session button */
    margin-left: 0; /* Override the margin-left from choose-reason-btn */
    padding: 12px 24px !important; /* Match End Session button padding */
    font-size: 0.9rem !important; /* Match End Session button font size */
}

.survey-btn {
    margin-left: 0;
    padding: 12px 24px !important;
    font-size: 0.9rem !important;
    background: #0066cc !important; /* Blue color to distinguish from green */
}

.survey-btn:hover {
    background: #0052a3 !important;
}

/* Reason Boxes Styles */
.visit-reason {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Student Selected Reason Section */
.student-selected-reason {
    padding: 15px;
    background: #f0f7f4;
    border-radius: 8px;
    border: 2px solid #1e5631;
}

.student-selected-reason label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #1e5631;
    margin-bottom: 10px;
}

.original-reason-text {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* Advisor Selected Reasons Section */
.advisor-selected-reasons {
    padding: 15px;
    background: #f0f7f4;
    border-radius: 8px;
    border: 2px solid #1e5631;
}

.reason-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-top: 5px;
}

.advisor-selected-reasons label {
    font-size: 1rem;
    font-weight: 700;
    color: #1e5631;
}

.choose-reason-btn {
    background: #185C33;
    color: white;
    border: none;
    padding: 8px 12px; /* Reduced horizontal padding from 16px to 12px */
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem; /* Reduced from 0.9rem to 0.85rem */
    transition: all 0.3s ease;
    margin-left: 10px;
    white-space: nowrap; /* Prevent text from wrapping */
}

.choose-reason-btn:hover {
    background: #124023;
    transform: translateY(-1px);
}

.selected-reasons-display {
    margin-top: 10px;
}

.reason-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reason-list li {
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #d4e5d9;
    color: #333;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.reason-list li.no-reasons-yet {
    color: #999;
    font-style: italic;
    border-style: dashed;
}

.reason-text {
    flex: 1;
}

.remove-reason-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.remove-reason-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Reason Modal Styles */
.reason-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.reason-modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.reason-modal-content h3 {
    background: #185C33; /* Changed from linear-gradient to solid UVU green */
    color: white;
    margin: 0 0 25px 0;
    padding: 20px 30px;
    border-radius: 16px 16px 0 0;
    font-size: 1.3rem;
    text-align: center;
}

.reason-selector-box {
    margin-bottom: 25px;
}

.reason-selector-box label {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

#reason-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    margin-bottom: 10px;
    min-height: 200px;
}

#reason-select option {
    padding: 8px;
    cursor: pointer;
}

#reason-select option:checked {
    background: linear-gradient(135deg, #185C33 0%, #00Ba40 100%);
    color: white;
}

.select-hint {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-top: 10px;
}

.reason-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.remain-in-session-btn,
.continue-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.continue-btn {
    background: #185C33; /* Changed to match primary button color */
    color: white;
}

.continue-btn:hover {
    background: #124023; /* Darker green on hover */
}

/* Center Selection Modal */
.reason-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.reason-modal-header {
    background: #185C33;
    color: white;
    margin: 0 0 25px 0;
    padding: 20px 30px;
    border-radius: 16px 16px 0 0;
}

.reason-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    text-align: center;
}

.reason-modal-body {
    padding: 0 30px 30px 30px;
}

.center-selection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.center-option {
    padding: 16px 20px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.center-option:hover {
    border-color: #185C33;
    background: #f0f7f3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.center-option-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #185C33;
}

.center-option-area {
    font-size: 0.9rem;
    color: #666;
}

/* Hide the old UV ID display on the right */
.student-card > .student-id-display {
    display: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    justify-content: center;
}

.modal-content:has(.student-info-modal) {
    padding: 0 !important;
    border-radius: 12px;
    overflow: hidden;
}

.student-info-modal {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.student-info-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: #185C33;
    border-radius: 12px 12px 0 0;
}

.student-info-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
    text-align: center;
}

.student-info-modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.student-info-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-student-card {
    display: flex;
    gap: 25px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.modal-student-photo {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.student-photo-modal {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #1e5631;
    display: block;
}

.avatar-placeholder-modal {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e5631 0%, #2d7a3d 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
}

.avatar-placeholder-modal::before {
    content: attr(data-initials);
}

.modal-student-card .info-grid {
    flex: 1;
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
}

.info-item label {
    font-weight: 700;
    color: #333;
}

.info-item span {
    color: #666;
}

.info-item .advisor-select {
    padding: 8px 12px;
    border: 2px solid #185C33;
    border-radius: 6px;
    background-color: white;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 300px;
}

.info-item .advisor-select:hover {
    border-color: #0f3d21;
    background-color: #f8f9fa;
}

.info-item .advisor-select:focus {
    outline: none;
    border-color: #185C33;
    box-shadow: 0 0 0 3px rgba(24, 92, 51, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

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

.close-btn {
    background: #6c757d;
    color: white;
}

.close-btn:hover {
    background: #545b62;
}

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

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

.select-btn {
    background: #185C33;
    color: white;
}

.select-btn:hover {
    background: #124023;
}

.save-advisor-btn {
    background: #28a745;
    color: white;
    animation: fadeIn 0.3s ease;
}

.save-advisor-btn:hover {
    background: #218838;
    transform: scale(1.02);
}

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

/* Add to Queue Modal Styles */
.add-to-queue-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.add-to-queue-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.add-to-queue-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: #185C33; /* UVU green background */
    border-radius: 12px 12px 0 0;
}

.add-to-queue-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white; /* White text */
}

.add-to-queue-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
}

.add-to-queue-footer {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-btn.cancel-btn {
    background: #e0e0e0;
    color: #333;
}

.modal-btn.cancel-btn:hover {
    background: #d0d0d0;
}

.modal-btn.submit-btn {
    background: #4CAF50;
    color: white;
}

.modal-btn.submit-btn:hover {
    background: #45a049;
}

.modal-btn.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 239px;
    overflow-y: auto;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

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

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    color: #2c3e50;
}

.search-result-item p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.search-loading,
.search-no-results {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Selected Student Preview */
.selected-student-preview {
    margin-top: 1rem;
    margin-bottom: 1.5rem; /* Add bottom margin for spacing before next field */
    padding: 1rem;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    background: #f8fff9;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-photo {
    position: relative;
    width: 60px;
    height: 60px;
}

.preview-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.preview-placeholder::before {
    content: attr(data-initials);
}

.preview-details h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.preview-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

/* Responsive for Add to Queue Modal */
@media (max-width: 768px) {
    .add-queue-modal {
        width: 95%;
        padding: 25px;
    }

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

    .preview-photo {
        width: 100px;
        height: 100px;
    }

    /* Scale down add to queue modal on scaled pages */
    .add-to-queue-content {
        width: 95%;
        max-width: 450px;
        max-height: 90vh;
        transform: scale(0.9);
    }

    .add-to-queue-header {
        padding: 1.2rem;
    }

    .add-to-queue-header h2 {
        font-size: 1.3rem;
    }

    .add-to-queue-body {
        padding: 1.2rem;
    }

    .form-group {
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 600px) {
    .add-to-queue-content {
        width: 98%;
        max-width: none;
        max-height: 95vh;
        transform: scale(0.85);
    }

    .add-to-queue-header h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .add-to-queue-content {
        transform: scale(0.75);
        transform-origin: center center;
    }

    .add-to-queue-header {
        padding: 1rem;
    }

    .add-to-queue-body {
        padding: 1rem;
    }
}

@media (max-width: 390px) {
    .add-to-queue-content {
        transform: scale(0.65);
    }
}

@media (max-width: 360px) {
    .add-to-queue-content {
        transform: scale(0.6);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .session-layout {
        grid-template-columns: 350px 1fr;
        gap: 25px;
    }
    
    .student-card {
        padding: 30px;
        gap: 25px;
    }
    
    .student-avatar {
        width: 120px;
    }
    
    .student-avatar-photo {
        width: 120px;
        height: 120px;
    }
    
    .student-name-display {
        font-size: 1.1rem;
        max-width: 120px;
    }
}

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .nav-panel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
        min-width: unset;
    }

    /* Reset two-column layout for responsive */
    .nav-panel.nav-panel-two-col {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        min-width: unset;
        width: 100%;
    }

    .nav-panel-two-col .nav-col {
        display: contents;
    }

    .nav-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .session-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .session-left-column {
        order: 2;
    }
    
    .student-details {
        order: 1;
    }
    
    .student-card {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    
    .session-actions {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-content: center;
        padding-left: 0;
    }
    
    .session-main {
        padding: 20px;
    }
    
    .student-avatar {
        width: 100%;
        max-width: 150px;
        margin: 0 auto;
    }
    
    .student-avatar-photo {
        width: 150px;
        height: 150px;
    }
    
    .student-name-display {
        max-width: 150px;
    }
    
    .student-card .student-info {
        width: 100%;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .nav-panel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
        min-width: unset;
    }
    
    .session-header {
        padding: 15px;
    }
    
    .end-session-btn,
    .notes-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .student-card {
        padding: 20px;
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .student-avatar {
        grid-column: 1;
        grid-row: 1;
        margin: 0 auto;
        width: 100%;
        max-width: 120px;
    }
    
    .student-avatar-photo {
        width: 120px;
        height: 120px;
    }
    
    .student-name-display {
        font-size: 1rem;
        max-width: 120px;
    }
    
    .student-id-display {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    
    .student-card .student-info {
        grid-column: 1;
        grid-row: 2;
        padding-left: 0;
    }
    
    .session-actions {
        grid-column: 1;
        grid-row: 3;
        flex-direction: column;
        width: 100%;
    }
    
    .end-session-btn,
    .notes-btn {
        width: 100%;
    }
    
    .student-program,
    .student-status {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .nav-panel {
        grid-template-columns: 1fr;
    }
    
    .session-main {
        padding: 15px;
    }
    
    .student-card {
        padding: 15px;
    }
    
    .student-avatar {
        max-width: 100px;
    }
    
    .student-avatar-photo {
        width: 100px;
        height: 100px;
    }
    
    .student-name-display {
        font-size: 0.95rem;
        max-width: 100px;
    }
    
    .student-id-display {
        font-size: 0.85rem;
        padding: 5px 8px;
    }
    
    .student-program,
    .student-status {
        font-size: 0.85rem;
    }
    
    .modal-student-card {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }
}

/* Responsive updates for header */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 10px 20px; /* Reduced from 15px to 10px */
    }
    
    .header-left {
        gap: 10px;
    }
    
    .uvu-header-logo {
        height: 45px; /* Reduced from 55px to 45px */
        width: auto; /* Keep proportional */
    }
    
    .header-title {
        font-size: 1.1rem; /* Reduced from 1.2rem to 1.1rem */
    }
    
    .header-right {
        gap: 10px;
    }
    
    .advisor-info {
        display: none;
    }
    
    .logout-btn {
        padding: 8px 16px;
        font-size: 0.95rem; /* Increased from 0.9rem to 0.95rem */
    }
}

@media (max-width: 576px) {
    .header-title {
        display: none; /* Hide "Advisor Portal" text on very small screens */
    }
}

/* Responsive scaling: Different approach for desktop vs mobile devices */
/* Desktop browsers: Scale down to fit layout (works great at 719px) */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden; /* Prevent horizontal scrolling on body */
        width: 100%;
        height: 100%;
    }

    body {
        min-width: 0; /* Remove min-width constraint */
    }

    /* Desktop device scaling - keep as-is */
    body.is-desktop-device .app-container {
        transform-origin: top left;
        transform: scale(0.7); /* Scale to 70% for tablets */
        width: 142.86%; /* Compensate for scale */
        height: 142.86%;
        overflow-x: hidden;
    }

    /* Mobile device scaling - more generous for usability */
    body.is-mobile-device .app-container {
        transform-origin: top left;
        transform: scale(0.85); /* Less aggressive scaling for mobile */
        width: 117.65%; /* Compensate for scale */
        height: 117.65%;
        overflow-x: hidden;
    }

    /* Session screen: override the scaling */
    .session-screen {
        transform: none !important;
    }

    .session-screen .app-container {
        transform: none !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Login screen: NO SCALING at any width */
    .login-screen,
    .login-screen .login-container,
    .login-screen .login-header,
    .login-screen .login-form {
        transform: none !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    /* Desktop device scaling */
    body.is-desktop-device .app-container {
        transform: scale(0.55); /* Scale to 55% */
        width: 181.82%;
        height: 181.82%;
    }

    /* Mobile device scaling - more usable */
    body.is-mobile-device .app-container {
        transform: scale(0.75); /* More generous for mobile */
        width: 133.33%;
        height: 133.33%;
    }

    .session-screen .app-container {
        transform: none !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Login screen: NO SCALING at any width */
    .login-screen,
    .login-screen .login-container,
    .login-screen .login-header,
    .login-screen .login-form {
        transform: none !important;
        width: 100% !important;
    }
}

@media (max-width: 600px) {
    /* Desktop device scaling */
    body.is-desktop-device .app-container {
        transform: scale(0.45); /* Scale to 45% */
        width: 222.22%;
        height: 222.22%;
    }

    /* Mobile device scaling - maintain readability */
    body.is-mobile-device .app-container {
        transform: scale(0.68); /* Larger for mobile readability */
        width: 147.06%;
        height: 147.06%;
    }

    .session-screen .app-container {
        transform: none !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Login screen: NO SCALING at any width */
    .login-screen,
    .login-screen .login-container,
    .login-screen .login-header,
    .login-screen .login-form {
        transform: none !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* Desktop device scaling */
    body.is-desktop-device .app-container {
        transform: scale(0.38); /* Scale to 38% */
        width: 263.16%;
        height: 263.16%;
    }

    /* Mobile device scaling - optimized for phone screens */
    body.is-mobile-device .app-container {
        transform: scale(0.62); /* Good balance for iPhone-sized screens */
        width: 161.29%;
        height: 161.29%;
    }

    .session-screen .app-container {
        transform: none !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Login screen: NO SCALING at any width */
    .login-screen,
    .login-screen .login-container,
    .login-screen .login-header,
    .login-screen .login-form {
        transform: none !important;
        width: 100% !important;
    }
}

@media (max-width: 390px) {
    /* Desktop device scaling */
    body.is-desktop-device .app-container {
        transform: scale(0.30); /* Scale to 30% */
        width: 333.33%;
        height: 333.33%;
    }

    /* Mobile device scaling - for standard iPhone screens */
    body.is-mobile-device .app-container {
        transform: scale(0.58); /* Optimized for iPhone 12/13/14 (390px wide) */
        width: 172.41%;
        height: 172.41%;
    }

    .session-screen .app-container {
        transform: none !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Login screen: NO SCALING at any width */
    .login-screen,
    .login-screen .login-container,
    .login-screen .login-header,
    .login-screen .login-form {
        transform: none !important;
        width: 100% !important;
    }
}

@media (max-width: 360px) {
    /* Desktop device scaling */
    body.is-desktop-device .app-container {
        transform: scale(0.27); /* Scale to 27% */
        width: 370.37%;
        height: 370.37%;
    }

    /* Mobile device scaling - for smaller phones */
    body.is-mobile-device .app-container {
        transform: scale(0.55); /* Smaller phones still need readable text */
        width: 181.82%;
        height: 181.82%;
    }

    .session-screen .app-container {
        transform: none !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Login screen: NO SCALING at any width */
    .login-screen,
    .login-screen .login-container,
    .login-screen .login-header,
    .login-screen .login-form {
        transform: none !important;
        width: 100% !important;
    }
}

/* Login screen responsive fixes for small viewports */
@media (max-width: 768px) {
    /* Only apply overflow constraints when ONLY login screen is present (no app-content loaded) */
    .app-container:not(:has(#app-content *)) {
        height: 100vh !important;
        max-height: 100vh !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .login-screen.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
        min-height: 0 !important;
        z-index: 9999 !important;
    }

    .login-container {
        min-height: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        justify-content: center !important;
        padding: 15px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .login-header {
        margin-bottom: 15px !important;
    }

    .uvu-logo {
        margin-bottom: 10px !important;
    }

    .uvu-login-logo {
        max-width: 120px !important;
        margin-bottom: 3px !important;
    }

    .uvu-logo p {
        font-size: 0.8rem !important;
        margin-bottom: 8px !important;
    }

    .login-form {
        padding: 20px !important;
    }

    .form-group {
        margin-bottom: 15px !important;
    }
}

@media (max-width: 480px) {
    .app-container:not(:has(#app-content *)) {
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
    }

    .login-screen.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
        z-index: 9999 !important;
    }

    .login-container {
        padding: 10px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        box-sizing: border-box !important;
    }

    .login-header {
        margin-bottom: 10px !important;
    }

    .uvu-logo {
        margin-bottom: 8px !important;
    }

    .uvu-login-logo {
        max-width: 100px !important;
        margin-bottom: 2px !important;
    }

    .uvu-logo p {
        font-size: 0.7rem !important;
        margin-bottom: 5px !important;
    }

    .login-form {
        padding: 15px !important;
    }

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

    .form-group label {
        font-size: 0.85rem !important;
        margin-bottom: 4px !important;
    }

    .form-group input {
        padding: 10px 12px !important;
        font-size: 0.95rem !important;
    }

    .login-btn {
        padding: 12px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 390px) {
    .app-container:not(:has(#app-content *)) {
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
    }

    .login-screen.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
        z-index: 9999 !important;
    }

    .login-container {
        padding: 8px !important;
        height: 100vh !important;
        max-height: 100vh !important;
        box-sizing: border-box !important;
    }

    .uvu-logo {
        margin-bottom: 5px !important;
    }

    .uvu-login-logo {
        max-width: 80px !important;
        margin-bottom: 2px !important;
    }

    .uvu-logo p {
        font-size: 0.65rem !important;
        margin-bottom: 3px !important;
    }

    .login-header {
        margin-bottom: 8px !important;
    }

    .login-form {
        padding: 12px !important;
    }

    .form-group {
        margin-bottom: 10px !important;
    }

    .form-group label {
        font-size: 0.8rem !important;
        margin-bottom: 3px !important;
    }

    .form-group input {
        padding: 8px 10px !important;
        font-size: 0.9rem !important;
    }

    .login-btn {
        padding: 10px !important;
        font-size: 0.95rem !important;
    }
}

/* Session screen responsive scaling for very small screens */
@media (max-width: 768px) {
    .session-layout {
        transform: scale(1);
        transform-origin: top center;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .session-left-column {
        order: 2;
        gap: 12px;
    }

    .student-details {
        order: 1;
    }

    .session-main {
        padding: 12px !important;
    }

    /* Compact horizontal card layout */
    .student-card {
        display: grid !important;
        grid-template-columns: 130px 1fr !important;
        grid-template-rows: auto auto auto auto !important;
        gap: 15px !important;
        min-height: auto !important;
        padding: 15px !important;
        align-items: start !important;
    }

    /* Photo column - spans all rows on the left */
    .student-avatar {
        grid-column: 1;
        grid-row: 1 / -1;
        width: 130px;
        flex-shrink: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .student-avatar-photo {
        width: 130px;
        height: 130px;
    }

    .student-name-display {
        font-size: 1rem;
        max-width: 130px;
        font-weight: 700;
    }

    .student-avatar .student-id-display {
        font-size: 0.9rem;
        padding: 8px 10px;
        width: 100%;
    }

    /* Right column - student info stacked vertically */
    .student-card .student-info {
        grid-column: 2;
        grid-row: 1;
        padding-left: 0 !important;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .student-info h2 {
        display: none !important; /* Hide duplicate name */
    }

    .student-program,
    .student-status {
        font-size: 0.9rem !important;
        margin: 0 !important;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 6px;
    }

    /* Visit type box in row 2 */
    .visit-info-box,
    .student-card .student-info > div[style*="background"] {
        grid-column: 2;
        grid-row: 2;
        margin: 0 !important;
        width: 100%;
    }

    /* Session actions in row 3 */
    .session-actions {
        grid-column: 2;
        grid-row: 3;
        display: flex;
        justify-content: flex-start;
        padding-left: 0 !important;
        margin-top: 0;
    }

    .end-session-btn {
        width: 100%;
        max-width: none;
        padding: 12px 20px !important;
        font-size: 1rem !important;
    }

    /* Timer and reason boxes */
    .session-timer {
        padding: 12px !important;
    }

    .timer-display {
        font-size: 1.8rem !important;
    }

    .visit-reason {
        gap: 12px !important;
    }

    .student-selected-reason,
    .advisor-selected-reasons {
        padding: 12px !important;
    }
}

@media (max-width: 600px) {
    .session-layout {
        transform: scale(0.95);
        gap: 12px !important;
    }

    .student-card {
        padding: 12px !important;
        gap: 10px !important;
    }

    .student-avatar,
    .student-avatar-photo {
        width: 100px;
        height: 100px;
    }

    .student-name-display {
        font-size: 0.9rem;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .session-layout {
        transform: scale(0.88);
    }

    .session-main {
        padding: 10px !important;
    }

    .student-card {
        padding: 10px !important;
        gap: 8px !important;
    }

    .student-avatar,
    .student-avatar-photo {
        width: 90px;
        height: 90px;
    }

    .student-name-display {
        font-size: 0.85rem;
        max-width: 90px;
    }

    .student-info h2 {
        font-size: 0.95rem !important;
    }

    .student-program,
    .student-status {
        font-size: 0.8rem !important;
    }

    .timer-display {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 390px) {
    .session-layout {
        transform: scale(0.82);
    }

    .session-left-column {
        gap: 10px;
    }

    .student-avatar,
    .student-avatar-photo {
        width: 85px;
        height: 85px;
    }

    .student-name-display {
        max-width: 85px;
    }
}

@media (max-width: 360px) {
    .session-layout {
        transform: scale(0.78);
    }

    .student-card {
        gap: 6px !important;
        padding: 8px !important;
    }

    .student-avatar,
    .student-avatar-photo {
        width: 80px;
        height: 80px;
    }

    .student-name-display {
        font-size: 0.8rem;
        max-width: 80px;
    }

    .session-main {
        padding: 8px !important;
    }
}

/* End Session Modal Styles */
.end-session-modal {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.end-session-modal h2 {
    color: #185C33;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.end-session-modal p {
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0.5rem 0;
    max-width: 100%;
}

.end-session-modal p:nth-child(3) {
    white-space: nowrap;
}

/* Student ID box styling */
.student-id-box {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    text-align: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    width: 195px;
    margin: 8px auto 0;
    box-sizing: border-box;
}

/* Visit info boxes to match UV ID styling */
.visit-info-box {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid;
    margin-top: 8px;
    width: 195px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.visit-info-box[style*="background: #e3f2fd"] {
    background: #e3f2fd !important;
    border-color: #4A90E2 !important;
    color: #1976D2;
}

.visit-info-box[style*="background: #fff3cd"] {
    background: #fff3cd !important;
    border-color: #ffc107 !important;
    color: #856404;
}

.visit-info-box label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: inherit;
    margin-bottom: 4px;
}

.visit-info-box span {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
}

/* ============================================
   ADMIN SIDEBAR MENU
   ============================================ */

/* Sidebar container */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.admin-sidebar.open {
    left: 0;
}

/* Sidebar header */
.admin-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #185C33;
    color: white;
    border-bottom: 2px solid #124022;
}

.admin-sidebar-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-sidebar-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.3s ease;
}

.close-sidebar-btn:hover {
    color: #ddd;
    transform: rotate(90deg);
}

/* Sidebar navigation */
.admin-sidebar-nav {
    padding: 12px 0;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.admin-menu-item:hover {
    background: #f0f7f4;
    border-left-color: #185C33;
    color: #185C33;
}

.admin-menu-item:active {
    background: #e3f2ed;
}

.menu-icon {
    font-size: 1.5rem;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.menu-label {
    font-size: 1rem;
    font-weight: 600;
}

/* Sidebar overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    display: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 280px;
        left: -280px;
    }

    .admin-menu-item {
        padding: 14px 20px;
    }

    .menu-label {
        font-size: 0.95rem;
    }
}

/* ===================================
   SESSIONS PANEL STYLES
   =================================== */

.sessions-content {
    padding: 20px;
}

.sessions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.sessions-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.sessions-filters {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.sessions-filters input {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sessions-filters input:focus {
    outline: none;
    border-color: #275d38;
    box-shadow: 0 0 0 2px rgba(39, 93, 56, 0.15);
}

.sessions-filters input::placeholder {
    color: #999;
}

.sessions-nav-buttons {
    display: flex;
    gap: 8px;
}

/* Hide when empty to not affect layout */
.sessions-nav-buttons:empty {
    display: none;
}

.sessions-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.sessions-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.sessions-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

.no-sessions-message {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

.no-sessions-message p {
    margin: 0;
    font-size: 1.1rem;
}

.sessions-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.sessions-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sessions-table thead {
    background: #f5f5f5;
}

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

.sessions-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.sessions-table tbody tr:hover {
    background: #f8f9fa;
}

.sessions-table .student-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sessions-table .student-name {
    font-weight: 600;
    color: #333;
}

.sessions-table .student-id {
    font-size: 0.85rem;
    color: #666;
}

.sessions-table .advisor-cell {
    color: #555;
}

.sessions-table .time-cell {
    font-family: monospace;
    font-size: 0.95rem;
    color: #444;
}

.sessions-table .actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-end-session {
    padding: 6px 12px;
    background: #4a7c4e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-end-session:hover {
    background: #3d6b40;
}

.btn-delete-session {
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

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

.sessions-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 10px;
}

.btn-refresh-sessions {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-refresh-sessions:hover {
    background: #5a6268;
}

/* Sessions error message */
.sessions-content .error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
}

.sessions-loading.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

/* Responsive sessions table */
@media (max-width: 768px) {
    .sessions-table th,
    .sessions-table td {
        padding: 10px 12px;
    }

    .sessions-table .actions-cell {
        flex-direction: column;
        gap: 6px;
    }

    .btn-end-session,
    .btn-delete-session {
        width: 100%;
    }
}

/* ===================================
   WHO'S IN PANEL STYLES
   =================================== */

.whosin-content {
    padding: 20px;
}

.whosin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.whosin-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.whosin-filters {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.whosin-filters input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.whosin-filters input[type="text"]:focus {
    outline: none;
    border-color: #275d38;
    box-shadow: 0 0 0 2px rgba(39, 93, 56, 0.15);
}

.whosin-filters input[type="text"]::placeholder {
    color: #999;
}

.whosin-today-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.95rem;
    color: #555;
    user-select: none;
}

.whosin-today-filter input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #275d38;
}

.whosin-today-filter span {
    font-weight: 500;
}

.whosin-nav-buttons {
    display: flex;
    gap: 8px;
}

/* Hide when empty to not affect layout */
.whosin-nav-buttons:empty {
    display: none;
}

/* Style whosin nav buttons like compact nav buttons */
.whosin-nav-buttons .nav-btn {
    padding: 4px 8px !important;
    font-size: 0.95em !important;
    min-height: 24px !important;
    display: inline-block !important;
}

.whosin-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

.no-whosin-message {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

.no-whosin-message p {
    margin: 0;
    font-size: 1.1rem;
}

.whosin-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.whosin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.whosin-table thead {
    background: #f5f5f5;
}

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

.whosin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.whosin-table tbody tr:hover {
    background: #f8f9fa;
}

.whosin-table .advisor-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.whosin-table .advisor-name {
    font-weight: 600;
    color: #333;
}

.whosin-table .advisor-id {
    font-size: 0.85rem;
    color: #666;
}

.whosin-table .area-cell {
    color: #555;
}

.whosin-table .time-cell {
    font-family: monospace;
    font-size: 0.95rem;
    color: #444;
}

.whosin-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.whosin-count {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.btn-refresh-whosin {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-refresh-whosin:hover {
    background: #5a6268;
}

/* Force logout button in Who's In table */
.btn-force-logout {
    padding: 4px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-force-logout:hover {
    background: #c82333;
}

/* Who's In error message */
.whosin-content .error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
}

.whosin-loading.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

/* Responsive Who's In table */
@media (max-width: 768px) {
    .whosin-table th,
    .whosin-table td {
        padding: 10px 12px;
    }
}

/* ===================================
   HELP SYSTEM STYLES
   =================================== */

/* Help Icon Button */
.help-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 15px;
}

.help-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.help-icon-btn:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* Help Modal Overlay */
.help-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.help-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Help Modal */
.help-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

/* Help Modal Header */
.help-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: linear-gradient(135deg, #275d38 0%, #1a472a 100%);
    color: #fff;
}

.help-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-modal-header h2::before {
    content: "❓";
    font-size: 1.3rem;
}

.help-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.help-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Help Modal Content */
.help-modal-content {
    padding: 25px;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
}

.help-section {
    margin-bottom: 25px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    color: #275d38;
    font-size: 1.1rem;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section ul {
    margin: 0;
    padding-left: 20px;
}

.help-section li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #444;
}

.help-section li strong {
    color: #275d38;
}

.help-tip {
    background: #fff8e6;
    border-left: 4px solid #ffd700;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.help-tip::before {
    content: "💡 Tip: ";
    font-weight: 600;
    color: #b38f00;
}

.help-note {
    background: #e8f4fd;
    border-left: 4px solid #4A90E2;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
}

.help-note::before {
    content: "ℹ️ Note: ";
    font-weight: 600;
    color: #2c6faa;
}

/* Help Modal Footer */
.help-modal-footer {
    padding: 15px 25px;
    background: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.help-modal-footer a {
    color: #275d38;
    text-decoration: none;
    font-weight: 500;
}

.help-modal-footer a:hover {
    text-decoration: underline;
}

.help-manual-link {
    display: inline-block;
    padding: 4px 10px;
    background: #185C33;
    color: #ffffff !important;
    border-radius: 4px;
    font-weight: 600;
}

.help-manual-link:hover {
    background: #0f4424;
    text-decoration: none !important;
}

.help-footer-sep {
    margin: 0 8px;
    color: #aaa;
}

/* Keyboard shortcut styling */
.kbd {
    display: inline-block;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.85em;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}