/* Admin Dashboard Styles */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --text: #334155;
    --border: #e2e8f0;
    --available-color: #10b981;
    --occupied-color: #ef4444;
    --maintenance-color: #f59e0b;
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e9ecf5 100%);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 0 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.sidebar-header i {
    font-size: 48px;
    color: #fff;
    margin-bottom: 10px;
}

.sidebar-header h2 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    gap: 15px;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-left: 4px solid #fff;
    padding-left: 21px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(239, 68, 68, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateX(5px);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.header-left h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
}

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

.date-time {
    text-align: right;
}

.current-date {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 2px;
}

.current-time {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--light);
    border-radius: 50px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-profile span {
    font-weight: 600;
    color: var(--dark);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 251, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.08), transparent);
    border-radius: 50%;
    animation: cardPulse 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cardPulse {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    50% { transform: translate(-20px, 20px) scale(1.15); opacity: 0.7; }
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.25), 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: iconShimmer 3s infinite;
}

@keyframes iconShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.3);
}

.stat-card.total .stat-icon {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary);
}

.stat-card.available .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.stat-card.occupied .stat-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-card.maintenance .stat-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.stat-info {
    position: relative;
    z-index: 1;
}

.stat-info h3 {
    font-size: 40px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    letter-spacing: -1px;
}

.stat-card:hover .stat-info h3 {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.stat-info p {
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Filters Section */
.filters-section {
    margin-bottom: 25px;
}

.filters-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(102, 126, 234, 0.05);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.filter-group label,
.search-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    font-size: 14px;
}

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

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Enhanced Form Group with Icon */
.form-group-icon {
    position: relative;
}

.form-group-icon .form-input {
    padding-left: 45px;
}

.form-group-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group-icon .form-input:focus ~ i {
    color: var(--secondary);
    transform: translateY(-50%) scale(1.1);
}

/* Floating Label Style */
.form-floating {
    position: relative;
    margin-bottom: 25px;
}

.form-floating input,
.form-floating textarea,
.form-floating select {
    width: 100%;
    padding: 18px 16px 8px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-floating label {
    position: absolute;
    left: 16px;
    top: 16px;
    font-size: 15px;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating textarea:focus ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label,
.form-floating select:focus ~ label,
.form-floating select:valid ~ label {
    top: 6px;
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
}

.form-floating input:focus,
.form-floating textarea:focus,
.form-floating select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.1);
}

/* Input Group */
.input-group {
    display: flex;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
}

.input-prepend,
.input-append {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid var(--primary);
}

.input-group .form-input {
    border-radius: 0;
    border-left: none;
    border-right: none;
    flex: 1;
}

.input-group .form-input:first-child {
    border-left: 2px solid var(--border);
    border-radius: 12px 0 0 12px;
}

.input-group .form-input:last-child {
    border-right: 2px solid var(--border);
    border-radius: 0 12px 12px 0;
}

/* Legend Section */
.legend-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(102, 126, 234, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.legend-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.legend-items {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

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

.legend-icon.available {
    background: var(--available-color);
    color: #fff;
}

.legend-icon.occupied {
    background: var(--occupied-color);
    color: #fff;
}

.legend-icon.maintenance {
    background: var(--maintenance-color);
    color: #fff;
}

.legend-item span {
    font-weight: 500;
    color: var(--text);
}

.legend-count {
    background: var(--light);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    color: var(--primary);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 20px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-indicator span {
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
}

/* Seat Map Section */
.seat-map-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: var(--light);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text);
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.view-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Seat Grid */
.seat-grid-container {
    overflow-x: auto;
    padding: 20px 0;
}

/* Lab Separator */
.lab-separator {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 30px 0 20px 0;
    width: 100%;
    grid-column: 1 / -1;
}

.lab-separator:first-child {
    margin-top: 0;
}

.lab-separator-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(102, 126, 234, 0.3) 20%, 
        rgba(102, 126, 234, 0.6) 50%, 
        rgba(102, 126, 234, 0.3) 80%, 
        transparent 100%);
    position: relative;
}

.lab-separator-line::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.lab-name {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.lab-name::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s;
}

.lab-name:hover::before {
    left: 100%;
}

.lab-name i {
    font-size: 18px;
}

.lab-seat-count {
    font-size: 13px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    font-weight: 500;
}

/* Lab Seats Container */
.lab-seats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px dashed rgba(102, 126, 234, 0.2);
    margin-bottom: 20px;
    width: 100%;
    grid-column: 1 / -1;
    justify-items: center;
}

.seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    max-width: 100%;
    justify-items: center;
}

/* Chair Graphic Styling */
.seat-item {
    position: relative;
    width: 90px;
    height: 110px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.seat-item:hover {
    transform: scale(1.18) translateY(-8px);
    filter: drop-shadow(0 12px 30px rgba(102, 126, 234, 0.4));
    z-index: 10;
}

.seat-item:hover .chair-graphic {
    transform: rotateY(10deg) rotateX(-5deg);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

.seat-item:hover .chair-back {
    transform: translateX(-50%) rotateX(-5deg) scale(1.05);
    box-shadow: inset 0 4px 15px rgba(0, 0, 0, 0.3), 
                inset 0 -2px 10px rgba(255, 255, 255, 0.2),
                0 8px 25px rgba(0, 0, 0, 0.25);
}

.seat-item:hover .chair-seat {
    transform: translateX(-50%) rotateX(8deg) scale(1.05);
    box-shadow: inset 0 -4px 12px rgba(0, 0, 0, 0.35), 
                inset 0 4px 15px rgba(255, 255, 255, 0.25),
                0 10px 30px rgba(0, 0, 0, 0.3);
}

.seat-item:hover .chair-leg {
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.35),
                inset 2px 0 5px rgba(255, 255, 255, 0.3);
}

.seat-item.hidden {
    display: none;
}

.seat-item.highlight {
    animation: highlight 1s ease-in-out;
}

@keyframes highlight {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(-5deg); }
    75% { transform: scale(1.2) rotate(5deg); }
}

.chair-graphic {
    position: relative;
    width: 75px;
    height: 85px;
    margin-bottom: 10px;
    transform-style: preserve-3d;
    perspective: 1200px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
}

/* Enhanced Chair Components with 3D Effects */
.chair-back {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotateX(-2deg);
    width: 58px;
    height: 40px;
    border-radius: 12px 12px 5px 5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.25), 
                inset 0 -2px 8px rgba(255, 255, 255, 0.15),
                0 6px 20px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, currentColor 0%, rgba(0, 0, 0, 0.15) 100%);
}

.chair-back::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chair-back::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 10px;
    right: 10px;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}

.chair-seat {
    position: absolute;
    top: 37px;
    left: 50%;
    transform: translateX(-50%) rotateX(5deg);
    width: 65px;
    height: 32px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 -3px 10px rgba(0, 0, 0, 0.3), 
                inset 0 3px 12px rgba(255, 255, 255, 0.2),
                0 8px 25px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(180deg, currentColor 0%, rgba(0, 0, 0, 0.2) 100%);
}

.chair-seat::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 12%;
    right: 12%;
    height: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chair-seat::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 15%;
    right: 15%;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    filter: blur(1px);
}

.chair-legs {
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 58px;
    height: 20px;
    display: flex;
    justify-content: space-between;
}

.chair-leg {
    width: 9px;
    height: 100%;
    border-radius: 4px 4px 5px 5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.3),
                inset 1px 0 4px rgba(255, 255, 255, 0.25);
    position: relative;
    background: linear-gradient(180deg, currentColor 0%, rgba(0, 0, 0, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.chair-leg::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 3px;
    height: 50%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.chair-leg::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
}

/* Seat Status Colors */
.seat-item.available .chair-back,
.seat-item.available .chair-seat,
.seat-item.available .chair-leg {
    background: var(--available-color);
}

.seat-item.occupied .chair-back,
.seat-item.occupied .chair-seat,
.seat-item.occupied .chair-leg {
    background: var(--occupied-color);
}

.seat-item.maintenance .chair-back,
.seat-item.maintenance .chair-seat,
.seat-item.maintenance .chair-leg {
    background: var(--maintenance-color);
}

/* Enhanced Seat Number Badge */
.seat-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 251, 255, 0.9));
    border: 2px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
    min-width: 50px;
}

.seat-item:hover .seat-number {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    border-color: transparent;
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    font-weight: 800;
}

/* Slot Duration Badge */
.slot-duration-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    z-index: 10;
    letter-spacing: 0.5px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Occupied Seat with Student Icon */
.seat-item.occupied .chair-seat::after {
    content: '\f007';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
}

/* Maintenance Icon */
.seat-item.maintenance .chair-seat::after {
    content: '\f0ad';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-refresh {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--dark);
}

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

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-refresh {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-refresh:hover {
    background: var(--primary);
    color: #fff;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--light);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--danger);
    color: #fff;
}

.modal-body {
    padding: 25px;
}

.seat-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

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

.seat-detail-item label {
    font-weight: 600;
    color: var(--text);
}

.status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.available {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-badge.occupied {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.status-badge.maintenance {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-select {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-select:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 25px;
    border-top: 1px solid var(--border);
}

/* Quick Stats Section */
.quick-stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stats-card-small {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.stats-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.stats-card-small h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.activity-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(102, 126, 234, 0.08);
    transform: translateX(5px);
}

.activity-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.activity-item div {
    display: flex;
    flex-direction: column;
}

.activity-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.activity-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

/* Peak Hours Styling */
.peak-hours {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.peak-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.peak-time {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    min-width: 140px;
}

.peak-bar {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.peak-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.peak-percentage {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    min-width: 40px;
    text-align: right;
}

/* List View Styles */
.seat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: grid;
    grid-template-columns: 100px 150px 1fr auto;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.list-item:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateX(8px);
}

.list-item-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.list-item-status {
    display: flex;
    justify-content: flex-start;
}

.list-item-info {
    font-size: 14px;
    color: var(--text);
}

.student-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.student-name i {
    color: var(--primary);
}

.empty-info {
    color: #94a3b8;
}

.list-item-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-small {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light);
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-icon-small:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Enhanced Animations */
@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

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

.stat-card {
    animation: fadeIn 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced Stat Cards with Gradient Borders */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.stat-card:hover::before {
    opacity: 0.05;
}

/* Glowing effect for live indicator */
.live-dot {
    box-shadow: 0 0 10px var(--success), 0 0 20px var(--success);
}

/* Enhanced filter buttons */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Enhanced legend icons */
.legend-icon {
    position: relative;
}

.legend-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: inherit;
    opacity: 0.3;
    filter: blur(8px);
    z-index: -1;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Bottom Navigation Bar - Circular Mobile App Style */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(102, 126, 234, 0.85);
    backdrop-filter: blur(40px) saturate(200%) brightness(1.2) contrast(1.1);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.2) contrast(1.1);
    padding: 8px;
    margin: 0;
    box-shadow: 
        0 8px 32px rgba(102, 126, 234, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.6),
        inset 0 -1px 1px rgba(0, 0, 0, 0.1);
    z-index: 999;
    justify-content: space-around;
    align-items: center;
    height: auto;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    gap: 4px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: 12px 10px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    flex: 1;
    position: relative;
    background: transparent;
    border: none;
    outline: none;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    min-width: 60px;
}

.bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    transform: translateY(-2px);
}

.bottom-nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 40px;
    height: 3px;
    background: #fff;
    border-radius: 0 0 3px 3px;
    transition: transform 0.3s ease;
}

.bottom-nav-item i {
    font-size: 26px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.bottom-nav-item span {
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

.bottom-nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(150%) brightness(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(150%) brightness(1.2);
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 1px rgba(0, 0, 0, 0.15),
        0 6px 24px rgba(255, 255, 255, 0.4),
        0 0 0 2px rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    transform: scale(1.05);
}

.bottom-nav-item.active::before {
    display: none;
}

.bottom-nav-item.active i {
    transform: scale(1.15);
    filter: drop-shadow(0 2px 12px rgba(255, 255, 255, 0.7));
}

.bottom-nav-item.active span {
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Ripple effect on tap */
.bottom-nav-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.bottom-nav-item:active::after {
    width: 100px;
    height: 100px;
}

/* Admin Profile Dropdown - App Icon Style */
.admin-dropdown {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 15px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    width: 110px;
    z-index: 1000;
    animation: slideUpBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.admin-dropdown.show {
    display: block;
}

.admin-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.05) 0%,
        rgba(118, 75, 162, 0.05) 100%
    );
    pointer-events: none;
}

.admin-dropdown-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px 8px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.admin-dropdown-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 100%
    );
    pointer-events: none;
}

.admin-dropdown-header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.admin-dropdown-header div {
    position: relative;
    z-index: 1;
    text-align: center;
}

.admin-dropdown-header h4 {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.admin-dropdown-header p {
    margin: 1px 0 0 0;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.admin-dropdown-menu {
    padding: 6px;
    position: relative;
    z-index: 1;
}

.dropdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    color: #334155;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 9px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
    margin-bottom: 4px;
    text-align: center;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: opacity 0.3s ease;
    border-radius: 18px;
    opacity: 0;
}

.dropdown-item:hover::before {
    opacity: 0.1;
}

.dropdown-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.15);
}

.dropdown-item span {
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.dropdown-item:hover i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.dropdown-item:active {
    transform: translateY(-2px) scale(1.02);
}

.dropdown-item.logout {
    color: #ef4444;
    margin-top: 4px;
}

.dropdown-item.logout::before {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.dropdown-item.logout i {
    color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.05);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

.dropdown-item.logout:hover i {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

@keyframes slideUpBounce {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 80px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 20px;
    }

    .header-left,
    .header-right {
        width: 100%;
        text-align: center;
    }

    .header-right {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* Hide sidebar and mobile toggle, show bottom nav */
    .sidebar {
        display: none;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    .sidebar-header {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .sidebar-header i {
        font-size: 32px;
        margin-bottom: 5px;
    }

    .sidebar-header h2 {
        font-size: 18px;
    }

    .sidebar-nav {
        padding: 10px 0;
        max-height: 50vh;
        overflow-y: auto;
    }

    .nav-item {
        padding: 12px 20px;
        font-size: 14px;
    }

    .nav-item i {
        font-size: 18px;
    }

    .sidebar-footer {
        padding: 15px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .logout-btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    /* Main Content Adjustments */
    .main-content {
        padding: 15px;
        padding-top: 15px;
        padding-bottom: 100px; /* Space for floating circular nav */
        margin-left: 0;
        margin-bottom: 0;
    }
    
    /* Ensure body has no extra space */
    body {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        overflow-x: hidden;
    }
    
    html {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Support for devices with notches/safe areas */
    .bottom-nav {
        bottom: max(15px, calc(15px + env(safe-area-inset-bottom)));
        margin-bottom: 0 !important;
    }
    
    /* Enhanced glassy effect for mobile */
    .bottom-nav::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.25) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(0, 0, 0, 0.1) 100%
        );
        pointer-events: none;
        z-index: -1;
    }
    
    /* Add shimmer effect */
    .bottom-nav::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%
        );
        animation: shimmer 3s infinite;
        pointer-events: none;
    }
    
    @keyframes shimmer {
        0% { left: -100%; }
        100% { left: 200%; }
    }

    .dashboard-header {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .header-left h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 13px;
    }

    .user-profile {
        font-size: 14px;
    }

    .user-profile img {
        width: 35px;
        height: 35px;
    }

    /* Stats Section */
    .stats-section {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .stat-info h3 {
        font-size: 24px;
    }

    .stat-info p {
        font-size: 12px;
    }

    /* Seat Grid */
    .seat-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 10px;
    }

    .seat-item {
        width: 70px;
        height: 90px;
    }

    .chair-graphic {
        width: 50px;
        height: 60px;
    }

    .seat-number {
        font-size: 11px;
    }

    /* List Items */
    .list-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }
    
    /* Filters */
    .filters-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Section Actions */
    .section-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .section-actions .btn {
        font-size: 13px;
        padding: 8px 15px;
    }

    /* Cards */
    .card {
        padding: 15px;
    }

    .card-header h2 {
        font-size: 18px;
    }

    /* Mobile Menu Overlay */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Payment Alerts Section */
.payment-alerts-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.alert-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.alert-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.alert-card.pending-payments {
    border-top: 4px solid #ef4444;
}

.alert-card.upcoming-dues {
    border-top: 4px solid #f59e0b;
}

.alert-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-card.pending-payments .alert-header h3 i {
    color: #ef4444;
}

.alert-card.upcoming-dues .alert-header h3 i {
    color: #f59e0b;
}

.alert-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

.alert-body {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.alert-body::-webkit-scrollbar {
    width: 6px;
}

.alert-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.alert-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.alert-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.empty-alert {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-alert i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-alert p {
    font-size: 14px;
    color: #64748b;
}

.alert-student-item {
    padding: 16px 25px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.alert-student-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.alert-student-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.alert-student-photo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #667eea;
}

.alert-student-details h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 3px;
}

.alert-student-id {
    font-size: 12px;
    color: #64748b;
}

.alert-payment-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.alert-payment-detail {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.alert-payment-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-payment-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.alert-payment-value.pending {
    color: #ef4444;
}

.alert-payment-value.due-soon {
    color: #f59e0b;
}

.alert-footer {
    padding: 15px 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.btn-link {
    background: none;
    border: none;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-link:hover {
    color: #764ba2;
    gap: 12px;
}

.btn-link i {
    transition: transform 0.3s ease;
}

.btn-link:hover i {
    transform: translateX(3px);
}

/* Responsive for Payment Alerts */
@media (max-width: 1024px) {
    .payment-alerts-section {
        grid-template-columns: 1fr;
    }
}

/* Check-in Indicator (Blinking Green Dot) */
.checkin-indicator {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8), 0 0 15px rgba(16, 185, 129, 0.5);
    animation: checkinPulse 2s ease-in-out infinite, checkinBlink 1s ease-in-out infinite;
    z-index: 100;
    border: 3px solid white;
}

/* Enhanced pulse animation with glow */
@keyframes checkinPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8), 0 0 15px rgba(16, 185, 129, 0.5);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0), 0 0 25px rgba(16, 185, 129, 0.8);
    }
}

/* Blink animation for the dot */
@keyframes checkinBlink {
    0%, 100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Add position relative to seat-item for absolute positioning of indicator */
.seat-item {
    position: relative;
    transition: all 0.3s ease;
}

/* Engaged chair (with checked-in student) - add glow effect */
.seat-item.engaged {
    animation: chairEngaged 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

@keyframes chairEngaged {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.4), 0 0 30px rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.6), 0 0 40px rgba(16, 185, 129, 0.3);
    }
}

/* Chair graphic enhancement for engaged seats */
.seat-item.engaged .chair-graphic {
    animation: chairFloat 3s ease-in-out infinite;
}

@keyframes chairFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Engaged chair back glow */
.seat-item.engaged .chair-back {
    background: linear-gradient(to right, rgba(239, 68, 68, 0.9), rgba(239, 68, 68, 0.7));
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}
