/* Color Scheme from JDS Logo */
:root {
    --primary-red: #8B1A1A;
    --secondary-red: #C41E3A;
    --accent-red: #DC143C;
    --gray-accent: #6C757D;
    --light-gray: #E9ECEF;
    --yellow-accent: #FFD700;
    --dark-text: #2C3E50;
    --light-bg: #F8F9FA;
    --success-green: #28a745;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--dark-text);
}

/* Navbar */
.navbar-dark.bg-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    padding: 60px 0;
    margin-bottom: -50px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    border-radius: 15px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%) !important;
    border: none;
    padding: 20px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 26, 26, 0.4);
    background: linear-gradient(135deg, var(--secondary-red) 0%, var(--primary-red) 100%);
}

.btn-outline-primary {
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.btn-outline-primary:hover {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(139, 26, 26, 0.25);
}

/* Feature Boxes */
.feature-box {
    padding: 30px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 15px;
}

/* Seat Layout */
.bus-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border: 3px solid var(--primary-red);
}

.bus-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    padding: 20px;
    border-radius: 15px 15px 0 0;
    margin: -30px -30px 20px -30px;
    color: white;
    text-align: center;
}

.driver-section {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.steering-wheel {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-red);
}

.seat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    align-items: center;
}

.row-number {
    width: 30px;
    font-weight: bold;
    color: var(--primary-red);
    font-size: 1.1rem;
}

.seats-group {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.seat {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s;
    position: relative;
}

.seat.available {
    background-color: var(--success-green);
    color: white;
    border-color: var(--success-green);
}

.seat.available:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4);
}

/* Jumping seats - special middle seats */
.seat.jumping-seat {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    color: var(--dark-text);
    border-color: #FF8C00;
    font-weight: bold;
}

.seat.jumping-seat.available {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    color: var(--dark-text);
    border-color: #FF8C00;
    border-width: 2px;
}

.seat.jumping-seat.available:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(255, 165, 0, 0.6);
    border-color: #FF6B00;
}

.seat.jumping-seat.reserved {
    background-color: #dc3545;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #dc3545;
}

.seat.selected {
    background-color: var(--yellow-accent);
    color: var(--dark-text);
    border-color: var(--primary-red);
    border-width: 3px;
    transform: scale(1.05);
}

.seat.jumping-seat.selected {
    background: var(--yellow-accent);
    color: var(--dark-text);
    border-color: var(--primary-red);
    border-width: 3px;
    box-shadow: 0 4px 15px rgba(139, 26, 26, 0.4);
}

.seat.reserved {
    background-color: #dc3545;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
    border-color: #dc3545;
}

/* Seat Legend */
.seat-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 10px;
}

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

.legend-box {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 2px solid #ddd;
}

.jumping-seat-legend {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    border-color: #FF8C00;
}

/* Booking Summary */
.booking-summary {
    position: sticky;
    top: 20px;
}

.summary-card {
    background: linear-gradient(135deg, var(--light-bg) 0%, white 100%);
    border: 2px solid var(--primary-red);
    border-radius: 15px;
    padding: 25px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.total-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-red);
}

/* Ticket Styles */
.ticket {
    background: white;
    border: 3px dashed var(--primary-red);
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.ticket-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    color: white;
    padding: 20px;
    margin: -30px -30px 20px -30px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.ticket-body {
    padding: 20px;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.qr-code {
    text-align: center;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 10px;
    margin: 20px 0;
}

/* Admin Styles */
.admin-sidebar {
    background: linear-gradient(180deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    min-height: 100vh;
    padding: 20px;
}

.admin-nav-link {
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 5px;
    display: block;
    text-decoration: none;
    transition: all 0.3s;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Table Styles */
.table-custom {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table-custom thead {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    color: white;
}

/* Badge Styles */
.badge-success {
    background-color: var(--success-green);
}

.badge-warning {
    background-color: var(--yellow-accent);
    color: var(--dark-text);
}

.badge-danger {
    background-color: #dc3545;
}

/* Alert Styles */
.alert-info {
    background-color: var(--light-bg);
    border-color: var(--primary-red);
    color: var(--dark-text);
}

/* Loading Spinner */
.spinner-custom {
    border-color: var(--primary-red);
    border-right-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .bus-container {
        padding: 20px 10px;
    }
    
    .seat {
        width: 40px;
        height: 40px;
        font-size: 0.75rem;
    }
    
    .seat-legend {
        flex-direction: column;
        gap: 10px;
    }
}

/* Print Styles for Ticket */
@media print {
    body * {
        visibility: hidden;
    }
    
    .ticket,
    .ticket * {
        visibility: visible;
    }
    
    .ticket {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .no-print {
        display: none !important;
    }
}
