:root {
    --primary-color: #7c3aed;
    --secondary-color: #0ea5e9;
    --accent-color: #22c55e;
    --danger-color: #ef4444;
    --text-color: #0f172a;
    --muted-text: rgba(15, 23, 42, 0.65);
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --surface: rgba(255,255,255,0.92);
    --surface-strong: #ffffff;
    --surface-muted: rgba(255,255,255,0.78);
    --border-color: rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.12);
    --sidebar-width: 250px;
    --header-height: 60px;
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background:
        radial-gradient(900px 550px at 12% 12%, rgba(124, 58, 237, 0.22), transparent 60%),
        radial-gradient(800px 520px at 88% 18%, rgba(14, 165, 233, 0.20), transparent 55%),
        radial-gradient(720px 520px at 35% 92%, rgba(34, 197, 94, 0.18), transparent 60%),
        radial-gradient(680px 480px at 92% 92%, rgba(245, 158, 11, 0.16), transparent 55%),
        linear-gradient(180deg, #f7f5ff 0%, #f6fbff 40%, #f7fff9 100%);
    color: var(--text-color);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background:
        radial-gradient(900px 650px at 0% 0%, rgba(124, 58, 237, 0.14), transparent 55%),
        radial-gradient(760px 520px at 100% 35%, rgba(14, 165, 233, 0.12), transparent 55%),
        radial-gradient(760px 520px at 35% 100%, rgba(34, 197, 94, 0.10), transparent 60%),
        rgba(255,255,255,0.78);
    box-shadow: 8px 0 26px rgba(15, 23, 42, 0.10);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    z-index: 100;
}

.brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.brand h2 {
    background: linear-gradient(135deg, rgba(124,58,237,1), rgba(14,165,233,1), rgba(34,197,94,1));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: 0.3px;
}

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

.nav-group {
    padding: 10px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.55);
    font-weight: 600;
    margin-top: 10px;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: rgba(15, 23, 42, 0.82);
    text-decoration: none;
    transition: background 0.18s, transform 0.18s, color 0.18s;
    font-weight: 500;
}

.nav-item:hover, .nav-item.active {
    background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(14,165,233,0.08));
    color: rgba(15, 23, 42, 0.92);
    border-radius: 10px;
    transform: translateX(2px);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: var(--header-height);
    background: rgba(255,255,255,0.72);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.top-bar h1 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: rgba(15, 23, 42, 0.92);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted-text);
    font-weight: 600;
}

.content-area {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.90) 100%);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--muted-text);
}

.stat {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

.dash-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background:
        radial-gradient(600px 220px at 12% 10%, rgba(124, 58, 237, 0.18), transparent 55%),
        radial-gradient(540px 220px at 88% 18%, rgba(14, 165, 233, 0.16), transparent 55%),
        radial-gradient(520px 220px at 45% 92%, rgba(34, 197, 94, 0.14), transparent 60%),
        rgba(255,255,255,0.72);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 18px;
    margin-bottom: 18px;
}

.dash-title {
    font-size: 22px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.92);
    letter-spacing: 0.2px;
}

.dash-subtitle {
    margin-top: 6px;
    color: var(--muted-text);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.dash-dot {
    opacity: 0.6;
}

.dash-hero-right {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.dash-filter {
    min-width: 180px;
}

.dash-label {
    display: block;
    font-size: 12px;
    color: var(--muted-text);
    margin-bottom: 6px;
}

.dash-date {
    padding: 8px 10px;
    font-size: 14px;
}

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.kpi-card {
    padding: 18px;
    border: 1px solid var(--border-color);
}

.kpi-label {
    font-size: 12px;
    color: var(--muted-text);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 30px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.96);
    line-height: 1.05;
}

.kpi-foot {
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted-text);
}

.kpi-primary { border-left: 4px solid rgba(124,58,237,1); }
.kpi-success { border-left: 4px solid rgba(34,197,94,1); }
.kpi-warning { border-left: 4px solid rgba(245,158,11,1); }
.kpi-danger { border-left: 4px solid rgba(239,68,68,1); }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.dash-span-2 {
    grid-column: span 2;
}

.dash-panel {
    padding: 18px;
}

.dash-panel-header {
    align-items: center;
}

.dash-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dash-action {
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
}

.dash-lookup {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dash-btn {
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
}

.dash-muted {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}

.dash-table {
    margin-top: 0;
}

.dash-table-wrap {
    overflow-x: auto;
}

.dash-recent {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.dash-recent-item {
    display: grid;
    grid-template-columns: 120px 1fr 110px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(255,255,255,0.70);
}

.dash-recent-meta {
    font-size: 12px;
    color: var(--muted-text);
}

.dash-recent-title {
    font-size: 14px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.92);
}

.dash-pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    justify-content: center;
    background: rgba(124,58,237,0.12);
    color: rgba(124,58,237,1);
}

.dash-pill.warn { background: rgba(245,158,11,0.16); color: rgba(180,83,9,1); }
.dash-pill.bad { background: rgba(239,68,68,0.16); color: rgba(185,28,28,1); }
.dash-pill.good { background: rgba(34,197,94,0.16); color: rgba(22,101,52,1); }

@media (max-width: 1100px) {
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-span-2 { grid-column: span 2; }
}

@media (max-width: 640px) {
    .dash-grid { grid-template-columns: 1fr; }
    .dash-span-2 { grid-column: span 1; }
    .dash-hero { flex-direction: column; }
    .dash-actions-grid { grid-template-columns: 1fr; }
    .dash-recent-item { grid-template-columns: 1fr; }
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.data-table th {
    background: linear-gradient(180deg, rgba(124,58,237,0.10), rgba(14,165,233,0.08));
    font-weight: 600;
    color: rgba(15, 23, 42, 0.78);
}

.data-table tr:hover {
    background-color: rgba(124,58,237,0.06);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(15, 23, 42, 0.78);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    background: rgba(255,255,255,0.75);
}

.form-control:focus {
    border-color: rgba(124, 58, 237, 0.55);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14);
    outline: none;
}

.input-error {
    border-color: var(--danger-color);
}

.error-text {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 6px;
    display: block;
}

.form-error {
    color: var(--danger-color);
    background: #fdecea;
    border: 1px solid #f5c2c0;
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.16s, box-shadow 0.16s, background 0.16s, opacity 0.16s;
    font-size: 0.9rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(124,58,237,1) 0%, rgba(14,165,233,1) 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
}

.btn-success {
    background: linear-gradient(135deg, rgba(34,197,94,1) 0%, rgba(16,185,129,1) 100%);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, rgba(239,68,68,1) 0%, rgba(244,63,94,1) 100%);
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(99,102,241,1) 0%, rgba(124,58,237,1) 100%);
    color: #fff;
}

.btn-warning {
    background: linear-gradient(135deg, rgba(245,158,11,1) 0%, rgba(250,204,21,1) 100%);
    color: #111827;
}

.btn-info {
    background: linear-gradient(135deg, rgba(6,182,212,1) 0%, rgba(14,165,233,1) 100%);
    color: #fff;
}

.btn-outline-primary {
    background: rgba(255,255,255,0.70);
    color: rgba(124,58,237,1);
    border: 1px solid rgba(124,58,237,0.35);
    box-shadow: none;
}

.btn-outline-primary:hover {
    background: rgba(124,58,237,0.08);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.text-muted {
    color: rgba(15, 23, 42, 0.55);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.70);
    color: rgba(15, 23, 42, 0.80);
}

.badge.success { background: rgba(34,197,94,0.16); color: rgba(22,101,52,1); border-color: rgba(34,197,94,0.20); }
.badge.warning { background: rgba(245,158,11,0.16); color: rgba(180,83,9,1); border-color: rgba(245,158,11,0.20); }
.badge.danger { background: rgba(239,68,68,0.16); color: rgba(185,28,28,1); border-color: rgba(239,68,68,0.20); }
.badge.info { background: rgba(6,182,212,0.16); color: rgba(8,145,178,1); border-color: rgba(6,182,212,0.20); }

.btn-block {
    display: block;
    width: 100%;
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

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

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: rgba(255,255,255,0.92);
    border-radius: 14px;
    width: 500px;
    max-width: 90%;
    box-shadow: var(--shadow-md);
    overflow: scroll;
    border: 1px solid var(--border-color);
    max-height: 1200px;
    padding-left: 10px;
}

.modal.modal-lg {
    width: 900px;
    max-width: 95vw;
    max-height: 1000px;
}

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

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(15, 23, 42, 0.55);
}

.modal-body {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.section {
    background: rgba(255,255,255,0.70);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.section h4 {
    margin-bottom: 12px;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px 12px;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.chips-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
    padding: 6px 6px 0 6px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: 10px;
    background: rgba(255,255,255,0.70);
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(124,58,237,0.10);
    border: 1px solid rgba(124,58,237,0.20);
    border-radius: 16px;
    font-size: 0.9rem;
}
.chip-x {
    background: transparent;
    border: none;
    color: rgba(15, 23, 42, 0.65);
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}
.chips-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

/* Utilities */
.hidden {
    display: none !important;
}

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

.filters {
    display: flex;
    gap: 10px;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background:
        radial-gradient(900px 650px at 20% 15%, rgba(124, 58, 237, 0.55), transparent 55%),
        radial-gradient(850px 600px at 85% 25%, rgba(14, 165, 233, 0.50), transparent 55%),
        radial-gradient(900px 650px at 35% 90%, rgba(34, 197, 94, 0.45), transparent 60%),
        linear-gradient(135deg, rgba(124,58,237,1) 0%, rgba(14,165,233,1) 55%, rgba(34,197,94,1) 100%);
}

.login-card {
    background: rgba(255,255,255,0.92);
    padding: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.20);
    width: 400px;
    text-align: center;
}

.login-card h2 {
    color: rgba(15, 23, 42, 0.92);
    margin-bottom: 10px;
}

.login-card p {
    color: rgba(15, 23, 42, 0.65);
    margin-bottom: 30px;
}

/* Bus Layout Styles */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

.booking-shell {
    padding: 18px;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
}

.booking-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: rgba(15, 23, 42, 0.92);
}

.booking-sub {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted-text);
}

.booking-steps .step-title {
    font-size: 14px;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.86);
    margin: 10px 0 12px 0;
    letter-spacing: 0.2px;
}

.booking-row-2 {
    padding-top: 10px;
    border-top: 1px dashed rgba(15, 23, 42, 0.14);
    margin-top: 12px;
}

.booking-grow {
    flex: 0 1 260px;
}

.booking-toggle {
    flex: 0 0 auto;
}

.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255,255,255,0.70);
    color: rgba(15, 23, 42, 0.78);
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.toggle-chip input {
    width: 16px;
    height: 16px;
}

.booking-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    align-items: start;
}

.booking-layout-card {
    padding: 16px;
}

.booking-layout-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.booking-layout-title {
    font-size: 14px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.88);
}

.booking-time-drop {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.booking-alert {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.70);
    font-weight: 700;
    color: rgba(15, 23, 42, 0.78);
}

.booking-alert-info {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.20);
    color: rgba(7, 89, 133, 1);
}

.booking-alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.20);
    color: rgba(185, 28, 28, 1);
}

.booking-bus {
    margin-bottom: 12px;
}

.booking-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.legend-item {
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.72);
    color: rgba(15, 23, 42, 0.76);
}

.legend-available { background: rgba(255,255,255,0.72); }
.legend-booked { background: rgba(239,68,68,0.14); color: rgba(185,28,28,1); border-color: rgba(239,68,68,0.20); }
.legend-phone { background: rgba(245,158,11,0.18); color: rgba(180,83,9,1); border-color: rgba(245,158,11,0.22); }
.legend-selected { background: rgba(34,197,94,0.16); color: rgba(22,101,52,1); border-color: rgba(34,197,94,0.20); }
.legend-business { background: rgba(14,165,233,0.14); color: rgba(7,89,133,1); border-color: rgba(14,165,233,0.20); }
.legend-executive { background: rgba(124,58,237,0.12); color: rgba(88,28,135,1); border-color: rgba(124,58,237,0.18); }

.booking-mini {
    padding: 14px 16px;
}

.booking-mini-head {
    font-weight: 900;
    color: rgba(15, 23, 42, 0.86);
    margin-bottom: 10px;
}

.booking-mini-body p {
    margin: 6px 0;
    color: rgba(15, 23, 42, 0.78);
}

.booking-side-card {
    padding: 16px;
}

.booking-side-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.booking-side-title {
    font-size: 14px;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.88);
}

.booking-side-total {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(124,58,237,0.10);
    border: 1px solid rgba(124,58,237,0.16);
    font-weight: 900;
    color: rgba(88,28,135,1);
}

.booking-live-summary {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.booking-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.70);
    color: rgba(15, 23, 42, 0.80);
    font-weight: 700;
}

.booking-divider {
    height: 1px;
    background: rgba(15, 23, 42, 0.08);
    margin: 12px 0;
}

.booking-row-compact .form-group {
    flex: 1 1 150px;
}

.booking-summary {
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.70);
    display: grid;
    gap: 8px;
}

.booking-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: rgba(15, 23, 42, 0.78);
    font-weight: 700;
}

.booking-summary-strong {
    color: rgba(15, 23, 42, 0.92);
    font-weight: 900;
}

.booking-confirm {
    margin-top: 12px;
}

.booking-table-card {
    padding: 16px;
}

.booking-table-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.booking-table-title {
    font-weight: 900;
    color: rgba(15, 23, 42, 0.86);
}

@media (max-width: 1100px) {
    .booking-grid {
        grid-template-columns: 1fr;
    }
}

.bus-layout-container {
    background: rgba(255,255,255,0.70);
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.driver-area {
    width: 200px;
    background: rgba(15, 23, 42, 0.10);
    text-align: center;
    padding: 5px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-weight: bold;
}

.bus-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bus-row {
    display: flex;
    gap: 10px;
}

.seat {
    width: 120px;
    height: 50px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255,255,255,0.85);
    font-size: 14px;
    transition: transform 0.12s, box-shadow 0.12s, background 0.12s, border-color 0.12s;
}

.seat.business {
    background: rgba(14, 165, 233, 0.14);
    border-color: rgba(14, 165, 233, 0.40);
}

.seat.executive {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.42);
}

.seat.selected {
    background: linear-gradient(135deg, rgba(34,197,94,1), rgba(16,185,129,1)) !important;
    color: white;
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.22);
}

.seat.booked {
    background: linear-gradient(135deg, rgba(239,68,68,1), rgba(244,63,94,1));
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Issued seat gender-specific colors */
.seat.booked.booked-male {
    background: linear-gradient(135deg, rgba(37,99,235,1), rgba(124,58,237,1));
    color: #fff;
    border-color: rgba(37,99,235,0.55);
}
.seat.booked.booked-female {
    background: linear-gradient(135deg, rgba(236,72,153,1), rgba(244,63,94,1));
    color: #fff;
    border-color: rgba(236,72,153,0.55);
}

.seat.phone-hold {
    background: linear-gradient(135deg, rgba(245,158,11,1), rgba(250,204,21,1));
    border-color: rgba(245,158,11,0.55);
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.20);
}

.aisle {
    width: 40px;
}

.legend {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.legend .seat {
    width: auto;
    padding: 0 10px;
    height: 30px;
    cursor: default;
}
 
.page-break {
    page-break-before: always;
    break-before: page;
}

.cut-break {
    page-break-before: always;
    break-before: page;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Wizard Steps */
.wizard-steps {
    padding: 20px;
}
.wizard-steps .step {
    animation: fadeIn 0.3s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Voucher Print Styles */
#print-area {
    display: none;
}

.voucher-print {
    display: none;
}

@media print {
    /* Hide Everything Else */
    body > *:not(#print-area) {
        display: none;
    }

    #print-area {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Thermal Ticket Styles */
    @page {
        size: auto; /* Default to auto to support both thermal and A4 */
        margin: 0;
    }
    
    .ticket-print {
        width: 64mm;
        font-family: 'Aptos', 'Segoe UI', Arial, sans-serif;
        font-size: 10px;
        font-weight: 700;
        padding-bottom: 2mm;
        margin-bottom: 2mm;
        page-break-after: always;
        page-break-inside: avoid;
        break-after: page;
        break-inside: avoid;
    }
    
    .coupon-print {
        width: 60mm;
        font-family: 'Aptos', 'Segoe UI', Arial, sans-serif;
        font-size: 8px;
        font-weight: 700;
        padding-bottom: 4mm;
        margin-bottom: 4mm;
        page-break-after: always;
        page-break-inside: avoid;
        break-after: page;
        break-inside: avoid;
    }
    
    /* Increase text intensity for entire coupon and ticket */
    .coupon-print,
    .coupon-print *,
    .ticket-print,
    .ticket-print * {
        font-weight: 700 !important;
        color: #000 !important;
        text-shadow: none !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        padding-left: 5px;
    }
    
    /* Ensure Ticket also uses a safe font for POS if Aptos is causing issues */
    .ticket-print, .coupon-print {
        font-family: Arial, Helvetica, sans-serif !important;
    }
    
    .coupon-print .ticket-row {
        padding-left: 4mm;
    }
    

    /* Voucher Styles */
    .voucher-print {
        display: block;
        width: 210mm; /* A4 Width */
        min-height: 297mm;
        padding: 10mm;
        font-family: Arial, sans-serif;
        box-sizing: border-box;
    }

    .voucher-header {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .voucher-header h2 {
        margin: 0;
        text-decoration: underline;
    }

    .voucher-info {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;
        border-bottom: 2px solid #000;
        padding-bottom: 2px;
        
        }

    .info-column p {
        margin: 2px 0;
        font-size: 13px;
    }

    .voucher-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 0px;
        font-size: 8px;
    }

    .voucher-table th, .voucher-table td {
        border: 1px solid #000;
        padding: 2px;
        text-align: left;
    }
    
    .voucher-table th {
        background-color: #f0f0f0;
    }

    .voucher-totals {
        margin-top: 5px;
        border-top: 2px solid #000;
        padding-top: 2px;
        font-size: 12px; 
    }
    
    .voucher-online p {
        font-size: 9px;
        padding-left: 5px;
    }

    .totals-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 2px;
        font-size: 8px;
        border-bottom: 1px solid #000;
        padding-bottom: 2px;
    }

    .totals-breakdown {
        margin-left: 20px;
        font-size: 8px;
    }
    
    .totals-breakdown p {
        margin: 5px 0;
    }

    .voucher-signatures {
        margin-top: 50px;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .signature-line {
        font-size: 8px;
        margin-bottom: 0px;
    }
    
    /* Ticket Specifics inside @media print */
    .ticket-header {
        text-align: center;
        margin-bottom: 5px;
    }
    
    .ticket-logo {
        max-width: 150px;
        height: auto;
        margin: 0 auto 10px;
        display: block;
    }

    .ticket-qr {
        display: flex;
        justify-content: center;
        margin: 5px auto;
    }

    .ticket-qr img {
        display: block !important;
        margin: 0 auto;
    }
    
    .ticket-seat-area {
        text-align: center;
        border: 2px solid #000;
        margin: 5px 0;
        padding: 5px;
    }
    
    .ticket-row {
        display: flex;
        justify-content: flex-start;
        align-items: baseline;
        margin-bottom: -3px;
        font-size: 12px;
        padding-left: 4mm;
    }
    
    .ticket-label {
        font-weight: bold;
        width: auto;
        padding-right: 5px;
        flex-shrink: 0;
    }
    
    .ticket-value {
        flex-grow: 1;
        /* Removed to allow bold intensity from global print rule */
    }
    
    .ticket-footer {
        text-align: center;
        margin-top: 20px;
        font-size: 10px;
        padding-top: 5px;
    }
}

/* Tracking Form Specific Styles */
#tracking-view .card {
    transition: all 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

#tracking-view .form-control:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

#tracking-view .btn-primary {
    background-color: #1a73e8;
    border: none;
    font-weight: 600;
    transition: background 0.2s;
}

#tracking-view .btn-primary:hover {
    background-color: #1557b0;
}

#tracking-result {
    animation: fadeIn 0.4s ease-out;
}

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