@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #6366f1; /* Indigo 500 */
    --primary-color-dark: #4f46e5;
    --primary-color-light: #818cf8;
    --secondary-color: #ec4899; /* Pink 500 */
    --background: #0f172a; /* Slate 900 */
    --surface: #1e293b; /* Slate 800 */
    --surface-light: #334155; /* Slate 700 */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #94a3b8; /* Slate 400 */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Dynamic Animated Background */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--primary-color); border-radius: 50%; opacity: 0.3;}
.blob-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: var(--secondary-color); border-radius: 50%; animation-delay: -5s; opacity: 0.2;}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.glass-nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Layout Utilities */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color-light), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.25rem; margin-bottom: 1rem; }

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 20px -10px var(--primary-color);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px var(--primary-color);
}
.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color-light);
}
.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover { background: #dc2626; }

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}
.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
}
.navbar .logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color-light);
}

/* Card layout */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    .flex-col-md {
        flex-direction: column !important;
    }
    /* Admin Fixes */
    .admin-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100% !important;
        height: auto !important;
        position: relative !important;
        border-right: none !important;
        border-bottom: 1px solid var(--glass-border) !important;
    }
    /* Navbar Fixes */
    .btn-toggle-mobile {
        display: block !important;
    }
    .nav-links {
        display: none !important;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0.75rem !important;
        margin-top: 1.5rem;
        padding: 0;
        background: rgba(15, 23, 42, 0.95);
        padding: 1.5rem;
        border-radius: 12px;
        border: 1px solid var(--glass-border);
    }
    .nav-links.active {
        display: flex !important;
    }
    header.navbar .container {
        flex-direction: row !important;
        justify-content: space-between;
    }
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    .nav-links a {
        display: block;
        padding: 0.5rem;
    }
    .nav-links li:last-child {
        margin-top: 0.5rem;
    }
    .btn-sm-mobile {
        width: 80% !important;
        margin: 0 auto;
    }
    /* Top bar */
    .top-bar-hide-mobile {
        display: none !important;
    }
    .top-bar-mobile-stack {
        flex-direction: column !important;
        gap: 0.5rem !important;
        text-align: center;
    }
    /* Fix Huge Paddings */
    div[style*="6rem"], div[style*="5rem"], div[style*="10rem"], div[style*="4rem"] {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    /* Responsive Table */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
    }
}

.card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    border-color: rgba(99, 102, 241, 0.3);
}
.card-body { padding: 1.5rem; }

/* Seat Map Styling */
.bus-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface-light);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    margin: 2rem auto;
    width: fit-content;
}
.steering-wheel {
    width: 60px;
    height: 60px;
    border: 4px solid var(--text-secondary);
    border-radius: 50%;
    margin-bottom: 2rem;
    align-self: flex-start;
    position: relative;
}
.seat-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}
.seat-gap { width: 30px; } /* Aisle */

.seat {
    width: 45px;
    height: 45px;
    background: var(--surface);
    border: 2px solid var(--primary-color);
    border-radius: 8px 8px 4px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-weight: 600;
    position: relative;
}
.seat::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 10%;
    width: 80%;
    height: 6px;
    background: var(--primary-color);
    border-radius: 0 0 4px 4px;
}
.seat:hover:not(.booked) {
    background: var(--primary-color-dark);
    transform: scale(1.05);
}
.seat.selected {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}
.seat.selected::after { background: #be185d; }
.seat.booked {
    background: var(--surface-light);
    border-color: var(--text-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}
.seat.booked::after { background: var(--text-secondary); }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}
.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid var(--success); color: var(--success); }
.alert-danger { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--danger); color: var(--danger); }

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}
th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}
tbody tr { transition: var(--transition); }
tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

/* Footer */
footer {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.5);
}
