/* ================================================
   ADMIN DASHBOARD - Premium Modern Design
   ================================================ */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #0f172a;
    --text: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --available-color: #10b981;
    --occupied-color: #ef4444;
    --maintenance-color: #f59e0b;
    --sidebar-width: 280px;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: #f1f5f9;
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 0% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ================================================
   SIDEBAR - Modern Glassmorphism
   ================================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gradient-dark);
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 40%);
    pointer-events: none;
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-header i {
    font-size: 52px;
    color: #fff;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    animation: iconGlow 3s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.5)); }
}

.sidebar-header h2 {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

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

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 28px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    gap: 14px;
    margin: 4px 12px;
    border-radius: 12px;
    position: relative;
}

.nav-item i {
    font-size: 20px;
    width: 24px;
    transition: transform 0.3s ease;
}

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

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, #06b6d4, #8b5cf6);
    border-radius: 0 4px 4px 0;
}

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

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

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

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

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

/* Dashboard Header - Enhanced Design */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 28px 32px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.dashboard-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

.header-logo-container {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    overflow: hidden;
}

.dashboard-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    border-radius: 12px;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.header-title-container {
    flex: 1;
}

.header-left h1 {
    font-size: 1.8rem;
    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, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(99, 102, 241, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, currentColor 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.03;
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

@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: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.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.1) rotate(5deg);
}

.stat-card.total .stat-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    color: var(--primary);
}

.stat-card.total:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.stat-card.available .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: var(--success);
}

.stat-card.available:hover {
    border-color: rgba(16, 185, 129, 0.2);
}

.stat-card.occupied .stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    color: var(--danger);
}

.stat-card.occupied:hover {
    border-color: rgba(239, 68, 68, 0.2);
}

.stat-card.maintenance .stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    color: var(--warning);
}

.stat-card.maintenance:hover {
    border-color: rgba(245, 158, 11, 0.2);
}

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

.stat-info h3 {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    letter-spacing: -1px;
    line-height: 1.2;
}

.stat-card.total .stat-info h3 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.available .stat-info h3 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.occupied .stat-info h3 {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.maintenance .stat-info h3 {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.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 - Enhanced Design */
.seat-map-section {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.seat-map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.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, #10b981 0%, #059669 100%);
    color: #10b981;
}

.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, #10b981 0%, #059669 100%);
    color: #10b981;
}

.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, #10b981 0%, #059669 100%);
    color: #10b981;
    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 - Base styles (can be overridden by inline styles) */
.seat-item.available .chair-back,
.seat-item.available .chair-seat,
.seat-item.available .chair-leg {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #10b981;
}

.seat-item.occupied .chair-back,
.seat-item.occupied .chair-seat,
.seat-item.occupied .chair-leg {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ef4444;
}

.seat-item.maintenance .chair-back,
.seat-item.maintenance .chair-seat,
.seat-item.maintenance .chair-leg {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #64748b;
}

/* Fully booked seat - red color */
.seat-item.fully-booked .chair-back,
.seat-item.fully-booked .chair-seat,
.seat-item.fully-booked .chair-leg {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ef4444;
}

/* Partially occupied seat - orange/yellow color (will be overridden by inline gradient in JS) */
.seat-item.partially_occupied .chair-back,
.seat-item.partially_occupied .chair-seat,
.seat-item.partially_occupied .chair-leg {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #f59e0b;
}

/* Fully booked chair - entire chair red */
.seat-item.chair-fully-red .chair-back,
.seat-item.chair-fully-red .chair-seat,
.seat-item.chair-fully-red .chair-leg {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.3), 
                inset 0 -2px 8px rgba(255, 255, 255, 0.1),
                0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Partially booked chair - divided red/green effect (handled by inline styles in JS) */
.seat-item.chair-partial-red .chair-back,
.seat-item.chair-partial-red .chair-seat,
.seat-item.chair-partial-red .chair-leg {
    position: relative;
}

/* Circular hours badge */
.seat-hours-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 20;
    border: 2px solid white;
    pointer-events: none;
}

/* 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;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Due Date Notifications */
.due-date-notifications {
    position: relative;
    margin-right: 15px;
}

.due-student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f8fafc;
    border-left: 3px solid #e2e8f0;
}

.due-student-item.overdue {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.due-student-item.upcoming {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.due-student-info {
    flex: 1;
}

.due-student-info strong {
    display: block;
    color: #1e293b;
    margin-bottom: 4px;
}

.due-days {
    font-size: 12px;
    color: #64748b;
}

.btn-whatsapp-small {
    background: #25d366;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-whatsapp-small:hover {
    background: #20ba5a;
    transform: scale(1.05);
}

.due-alert-section {
    margin-bottom: 15px;
}

.due-alert-section h4 {
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Timing Badge - More Visible */
.timing-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timing-badge i {
    font-size: 9px;
}

.timing-badge .timing-text {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.timing-badge:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

/* When seat is occupied, make timing badge more prominent */
.seat-item.occupied .timing-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.seat-item.occupied .timing-badge:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.5);
}
    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: 9999;
        padding: 20px;
        filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    /* Ensure overlay doesn't interfere with content clicks */
    touch-action: none;
    z-index: 9998;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.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;
    z-index: 10000 !important;
    pointer-events: auto !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    isolation: isolate;
    transform: translateZ(0); /* Force hardware acceleration and new stacking context */
}

.modal-content input,
.modal-content select,
.modal-content textarea,
.modal-content button {
    pointer-events: auto !important;
    opacity: 1 !important;
    cursor: text !important;
    position: relative;
    z-index: 2003 !important;
}

.modal-content select {
    cursor: pointer !important;
}

.modal-content button {
    cursor: pointer !important;
}

/* Ensure form elements are always interactive */
.modal-content * {
    pointer-events: auto !important;
}

/* Exception: overlay should still close modal on click */
.modal-overlay {
    pointer-events: auto;
}

@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 */
/* ================================================
   MOBILE BOTTOM NAVIGATION - App Style
   ================================================ */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 8px 10px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    z-index: 999;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 64px;
    position: relative;
}

.bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

.bottom-nav-item:hover {
    color: var(--primary);
}

.bottom-nav-item:hover i {
    transform: scale(1.1);
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--gradient);
    border-radius: 0 0 3px 3px;
}

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

/* Center FAB button style for main action */
.bottom-nav-item.fab {
    background: var(--gradient);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-top: -28px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    padding: 0;
    min-width: auto;
}

.bottom-nav-item.fab i {
    font-size: 24px;
    margin: 0;
}

.bottom-nav-item.fab span {
    display: none;
}

.bottom-nav-item.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

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

/* Admin Profile Dropdown */
.admin-dropdown {
    display: none;
    position: fixed;
    bottom: 70px;
    right: 10px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    width: 280px;
    z-index: 1000;
    animation: slideUpFade 0.3s ease;
}

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

.admin-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #e9ecf5 100%);
    border-radius: 16px 16px 0 0;
}

.admin-dropdown-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #667eea;
}

.admin-dropdown-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.admin-dropdown-header p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.admin-dropdown-menu {
    padding: 10px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-item i {
    width: 20px;
    font-size: 16px;
    color: var(--primary);
}

.dropdown-item:hover {
    background: #f8fafc;
    transform: translateX(5px);
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout i {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: #fef2f2;
}

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

/* 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 {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }

    .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: 16px;
        padding-top: 16px;
        padding-bottom: 90px;
        margin-left: 0;
    }
    
    .dashboard-header {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 16px;
    }
    
    .header-left h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }

    .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;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.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;
    cursor: pointer;
}

.alert-student-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.btn-reminder {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.btn-reminder:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transform: translateY(-1px);
}

.btn-reminder i {
    font-size: 14px;
}

.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) */
/* Time Slot Tags and Availability Indicators */
.time-slot-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 3px;
}

.seat-bookings-container {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 10;
    max-width: 80px;
}

.seat-availability-tag {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
    z-index: 10;
}

.seat-available-tag {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
    z-index: 10;
}

.seat-fully-booked-tag {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    z-index: 10;
}

.seat-item.fully-booked {
    opacity: 0.6;
    cursor: not-allowed;
}

.seat-item.fully-booked:hover {
    transform: none;
}

.seat-item.partially_occupied {
    border: 2px solid #f59e0b;
}

.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);
}

/* ================================================
   ADDITIONAL MOBILE IMPROVEMENTS
   ================================================ */
@media (max-width: 480px) {
    /* Extra small screens */
    .main-content {
        padding: 12px;
        padding-bottom: 100px;
    }
    
    .dashboard-header {
        padding: 14px;
        margin-bottom: 14px;
    }
    
    .dashboard-header::before {
        height: 3px;
    }
    
    .header-left h1 {
        font-size: 1.2rem;
    }
    
    .header-right {
        display: none;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px;
        border-radius: 14px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        border-radius: 12px;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .stat-info p {
        font-size: 0.7rem;
    }
    
    /* Bottom nav extra small */
    .bottom-nav {
        padding: 6px 8px;
    }
    
    .bottom-nav-item {
        min-width: 54px;
        padding: 6px 8px;
    }
    
    .bottom-nav-item i {
        font-size: 20px;
    }
    
    .bottom-nav-item span {
        font-size: 9px;
    }
    
    /* Cards */
    .card {
        border-radius: 14px;
        padding: 14px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    /* Tables */
    .table-responsive {
        border-radius: 12px;
    }
    
    /* Filter buttons */
    .filter-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
    
    .main-content {
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }
}

/* Hide scrollbar but allow scrolling */
.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Touch improvements */
@media (hover: none) and (pointer: coarse) {
    .bottom-nav-item:active {
        transform: scale(0.95);
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .stat-card:active {
        transform: scale(0.98);
    }
    
    .nav-item:active {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* ================================================
   OVERDUE CHECKOUT NOTIFICATIONS
   ================================================ */
.overdue-notifications {
    position: relative;
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.notification-badge {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transition: all 0.3s ease;
}

.notification-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.notification-badge i {
    color: white;
    font-size: 20px;
}

.notification-badge span {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    color: #ef4444;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.notification-badge.blinking {
    animation: blinkNotification 1.5s ease-in-out infinite;
}

@keyframes blinkNotification {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(239, 68, 68, 0.6);
    }
}

.notification-tooltip {
    position: absolute;
    top: 60px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
}

.notification-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.tooltip-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.overdue-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.overdue-item:hover {
    background: #fee2e2;
    transform: translateX(5px);
}

.overdue-item:last-child {
    margin-bottom: 0;
}

.overdue-student-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}

.overdue-student-info strong {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.overdue-seat {
    color: #64748b;
    font-size: 12px;
}

.overdue-time {
    color: #ef4444;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.overdue-time::before {
    content: '⏰';
    font-size: 14px;
}

@media (max-width: 768px) {
    .notification-tooltip {
        right: -50px;
        min-width: 280px;
    }
    
    .notification-badge {
        width: 45px;
        height: 45px;
    }
    
    .notification-badge i {
        font-size: 18px;
    }
}

/* ================================================
   MOBILE BOTTOM NAVIGATION - Circular Transparent Icons
   ================================================ */
.mobile-bottom-nav {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #64748b;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    min-width: 70px;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.mobile-nav-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    border: 2px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-nav-icon i {
    font-size: 22px;
    color: #6366f1;
    transition: all 0.3s ease;
}

.mobile-nav-item span {
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    color: #64748b;
    transition: all 0.3s ease;
}

.mobile-nav-item:active .mobile-nav-icon {
    transform: scale(0.92);
    background: rgba(99, 102, 241, 0.15);
}

.mobile-nav-item:active .mobile-nav-icon i {
    transform: scale(1.05);
}

.mobile-nav-item:hover .mobile-nav-icon {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.mobile-nav-item:hover .mobile-nav-icon i {
    transform: scale(1.1);
    color: #4f46e5;
}

.mobile-nav-item:hover span {
    color: #6366f1;
}

.mobile-nav-item.active .mobile-nav-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.9) 0%, rgba(139, 92, 246, 0.9) 100%);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.4),
        0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.mobile-nav-item.active .mobile-nav-icon i {
    color: white;
    transform: scale(1.15);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-nav-item.active span {
    color: #6366f1;
    font-weight: 700;
}

/* Show only on mobile */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Add padding to main content to prevent content from being hidden */
    .main-content {
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .mobile-nav-icon {
        width: 50px;
        height: 50px;
    }
    
    .mobile-nav-icon i {
        font-size: 20px;
    }
    
    .mobile-nav-item {
        min-width: 60px;
        padding: 6px 12px;
    }
    
    .mobile-nav-item span {
        font-size: 10px;
    }
}

/* ================================================
   WHATSAPP-STYLE NOTIFICATIONS
   ================================================ */
.whatsapp-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: 100%;
    pointer-events: none;
}

.whatsapp-notification {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 320px;
    max-width: 380px;
    position: relative;
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
    transition: all 0.3s ease;
    cursor: pointer;
}

.whatsapp-notification:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-notification.slide-out {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* Notification Types */
.whatsapp-notification.type-student {
    border-left-color: #667eea;
}

.whatsapp-notification.type-transaction {
    border-left-color: #10b981;
}

.whatsapp-notification.type-checkin {
    border-left-color: #3b82f6;
}

.whatsapp-notification.type-checkout {
    border-left-color: #f59e0b;
}

.whatsapp-notification.type-auto-checkout {
    border-left-color: #ef4444;
}

.whatsapp-notification-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whatsapp-notification.type-student .whatsapp-notification-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.whatsapp-notification.type-transaction .whatsapp-notification-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.whatsapp-notification.type-checkin .whatsapp-notification-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.whatsapp-notification.type-checkout .whatsapp-notification-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.whatsapp-notification.type-auto-checkout .whatsapp-notification-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.whatsapp-notification-content {
    flex: 1;
    min-width: 0;
}

.whatsapp-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.whatsapp-notification-title {
    font-weight: 700;
    font-size: 15px;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

.whatsapp-notification-time {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 8px;
}

.whatsapp-notification-message {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}

.whatsapp-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 12px;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.whatsapp-notification:hover .whatsapp-notification-close {
    opacity: 1;
    pointer-events: auto;
}

.whatsapp-notification-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.1);
}

.whatsapp-notification-close:active {
    transform: scale(0.95);
}

/* Notification Badge */
.whatsapp-notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    border: 2px solid white;
}

/* ================================================
   SLOT AVAILABILITY CARDS - Simple & Clear Design
   ================================================ */

.slot-cards-section {
    margin-top: 20px;
}

.slot-card {
    background: white !important;
    border: 3px solid transparent;
    position: relative;
    overflow: visible;
}

.slot-card::before {
    width: 100%;
    height: 100%;
    opacity: 1;
    border-radius: 20px;
}

.slot-card.slot-8hrs {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border-color: rgba(59, 130, 246, 0.3);
}

.slot-card.slot-8hrs::before {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.slot-card.slot-6hrs {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border-color: rgba(139, 92, 246, 0.3);
}

.slot-card.slot-6hrs::before {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.slot-card.slot-4hrs {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%) !important;
    border-color: rgba(236, 72, 153, 0.3);
}

.slot-card.slot-4hrs::before {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.slot-card .stat-icon {
    background: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    width: 70px;
    height: 70px;
    font-size: 30px;
}

.slot-card .stat-info {
    color: white !important;
    flex: 1;
}

.slot-card .stat-info h3 {
    color: white !important;
    font-size: 48px;
    font-weight: 900;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
    margin: 0 0 8px 0;
    line-height: 1;
    letter-spacing: -1px;
}

.slot-label {
    color: white !important;
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 1 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slot-label small {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-top: 6px;
    opacity: 1;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 8px;
}

.slot-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25) !important;
}

.slot-card:hover .stat-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .whatsapp-notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
    
    .whatsapp-notification {
        min-width: auto;
        max-width: 100%;
    }
    
    .whatsapp-notification-close {
        opacity: 1;
        pointer-events: auto;
    }
    
    .slot-card .stat-info h3 {
        font-size: 36px;
    }
    
    .slot-label {
        font-size: 14px;
    }
}
