/* Admin Panel Styles - Simplified & Mobile First */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4361ee;
    --success: #06d6a0;
    --warning: #ffb703;
    --danger: #ef476f;
    --info: #4cc9f0;
    --dark: #2b2d42;
    --light: #f8f9fa;
    --gray: #6c757d;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f7fc;
}

/* Admin Container */
.admin-container {
    max-width: 100%;
    min-height: 100vh;
    background: #f4f7fc;
}

/* Top Navigation */
.admin-nav {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

.nav-brand i {
    font-size: 1.5rem;
}

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

.admin-email {
    font-size: 0.85rem;
    color: var(--gray);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--primary);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1;
}

.dropdown-content a {
    color: var(--dark);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background: var(--light);
}

.profile-dropdown:hover .dropdown-content {
    display: block;
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: white;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mobile-menu a {
    display: block;
    padding: 12px 15px;
    color: var(--dark);
    text-decoration: none;
    border-radius: 8px;
    margin: 5px 0;
}

.mobile-menu a.active {
    background: var(--primary);
    color: white;
}

.mobile-menu.show {
    display: block;
}

/* Main Content */
.admin-main {
    padding: 20px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h1 {
    font-size: 1.5rem;
    color: var(--dark);
}

.date-display {
    font-size: 0.85rem;
    color: var(--gray);
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: white;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-box i {
    font-size: 2rem;
}

.stat-box.primary i { color: var(--primary); }
.stat-box.success i { color: var(--success); }
.stat-box.warning i { color: var(--warning); }
.stat-box.info i { color: var(--info); }

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray);
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

/* Info Card */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.card-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}

.bus-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.info-item i {
    color: var(--primary);
    font-size: 1rem;
}

.info-item small {
    display: block;
    color: var(--gray);
    font-size: 0.7rem;
}

.info-item strong {
    color: var(--dark);
    font-size: 0.9rem;
}

/* Bus Section */
.bus-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.section-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}

.legend {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
}

.legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.dot.available {
    background: #90be6d;
}

.dot.booked {
    background: #f08080;
}

/* Bus Front & Exit */
.bus-front, .bus-exit {
    background: var(--light);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bus-front i, .bus-exit i {
    color: var(--primary);
}

/* Seats Grid */
.seats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 15px;
    background: var(--light);
    border-radius: 12px;
}

.seat-item {
    background: white;
    border: 2px solid;
    border-radius: 8px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.seat-item.available {
    background: #90be6d;
    border-color: #4c956c;
    color: white;
}

.seat-item.booked {
    background: #f08080;
    border-color: #c44545;
    color: white;
}

.seat-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2;
}

.seat-number {
    font-weight: 700;
    font-size: 0.9rem;
}

.passenger-name {
    font-size: 0.6rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.btn-action {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: white;
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.btn-action i {
    color: var(--primary);
}

.btn-action.warning i {
    color: var(--warning);
}

.btn-action.info i {
    color: var(--info);
}

.btn-action:active {
    transform: scale(0.98);
}

/* Panels */
.panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.panel.hidden {
    display: none;
}

.panel h4 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-content input {
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
}

.btn-save {
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-reset {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-reset.warning {
    background: var(--warning);
    color: white;
}

.btn-reset.danger {
    background: var(--danger);
    color: white;
}

/* Bookings Panel */
.bookings-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.bookings-panel.hidden {
    display: none;
}

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

.badge {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.bookings-list {
    max-height: 300px;
    overflow-y: auto;
}

.booking-item {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.booking-info {
    flex: 1;
}

.booking-seat {
    font-weight: 700;
    color: var(--primary);
    margin-right: 10px;
}

.booking-name {
    font-size: 0.9rem;
    color: var(--dark);
}

.booking-dest {
    font-size: 0.8rem;
    color: var(--gray);
}

.booking-time {
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 3px;
}

.cancel-booking-btn {
    padding: 6px 12px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
}

.loading {
    text-align: center;
    padding: 20px;
    color: var(--gray);
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 350px;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 15px 20px;
    background: var(--primary);
    color: white;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 5px;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.status-badge.available {
    background: var(--success);
    color: white;
}

.status-badge.booked {
    background: var(--danger);
    color: white;
}

#bookingDetails p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 0.9rem;
}

#bookingDetails i {
    width: 20px;
    color: var(--primary);
}

#availableMessage {
    color: var(--success);
    margin: 15px 0;
    font-weight: 500;
}

.btn-cancel-modal, .btn-close-modal {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-cancel-modal {
    background: var(--danger);
    color: white;
}

.btn-close-modal {
    background: var(--gray);
    color: white;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: none;
    text-align: center;
    z-index: 2000;
}

.toast.show {
    display: block;
    animation: slideUp 0.3s ease;
}

.toast.success {
    background: var(--success);
    color: white;
}

.toast.error {
    background: var(--danger);
    color: white;
}

/* Responsive */
@media (min-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .info-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .seats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .action-buttons {
        grid-template-columns: repeat(3, 200px);
    }
}

@media (max-width: 480px) {
    .admin-email {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .profile-dropdown {
        margin-right: 10px;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .info-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .seats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 10px;
    }
    
    .seat-item {
        min-height: 50px;
        padding: 8px 3px;
    }
    
    .passenger-name {
        display: none;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 95%;
    }
}
/* Add these styles to your admin.css file */

/* Login Required Section */
.login-required {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    margin: 40px auto;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.login-required i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.login-required h2 {
    color: var(--dark);
    margin-bottom: 10px;
}

.login-required p {
    color: var(--gray);
    margin-bottom: 30px;
}

.btn-login-large {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-login-large:hover {
    background: #3a56d4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Login Modal */
#loginModal .modal-content {
    max-width: 400px;
}

#loginModal .modal-header {
    background: var(--primary);
    color: white;
}

#loginModal .modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

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

#loginModal .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

#loginModal .form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-login-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login-submit:hover {
    background: #3a56d4;
    transform: translateY(-2px);
}

.login-note {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    color: var(--gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.login-note i {
    color: var(--info);
}

/* Show/Hide Elements */
.hidden {
    display: none !important;
}

/* Admin email in navbar */
.admin-email {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    background: var(--light);
    padding: 5px 12px;
    border-radius: 20px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-required {
        margin: 20px;
        padding: 40px 15px;
    }
    
    .btn-login-large {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    #loginModal .modal-content {
        width: 95%;
    }
}