/**
 * KanoLine Mobile App & Design System (2026 Modern Edition)
 * Balanced Color System & Responsive Component Library
 */

:root {
    /* ── Balanced Brand Palette (Less aggressive green, premium contrast) ── */
    --kl-primary: #0D7A4D;            /* Refined Forest Emerald */
    --kl-primary-rgb: 13, 122, 77;
    --kl-primary-light: #10B981;      /* Bright Emerald Accent */
    --kl-primary-dark: #064E3B;       /* Deep Pine */
    --kl-primary-surface: #F0FDF4;    /* Light Emerald Tint */
    
    --kl-dark: #0F172A;               /* Slate Navy (Primary Header / Card Dark) */
    --kl-dark-rgb: 15, 23, 42;
    --kl-dark-light: #1E293B;         /* Slate 800 */
    --kl-dark-surface: #334155;       /* Slate 700 */

    --kl-accent: #F59E0B;             /* Amber Gold */
    --kl-accent-dark: #D97706;
    --kl-accent-light: #FEF3C7;
    --kl-accent-rgb: 245, 158, 11;

    --kl-bg: #F8FAFC;                 /* Soft Off-White / Slate 50 */
    --kl-surface: #FFFFFF;            /* Pure Crisp White */
    --kl-surface-elevated: #FFFFFF;
    
    --kl-text-main: #0F172A;          /* Deep Slate */
    --kl-text-muted: #64748B;         /* Slate 500 */
    --kl-text-subtle: #94A3B8;        /* Slate 400 */
    --kl-border: #E2E8F0;             /* Slate 200 */
    --kl-border-light: #F1F5F9;       /* Slate 100 */

    --kl-success: #10B981;
    --kl-warning: #F59E0B;
    --kl-danger: #EF4444;
    --kl-info: #2563EB;

    --kl-radius-sm: 8px;
    --kl-radius-md: 14px;
    --kl-radius-lg: 20px;
    --kl-radius-xl: 26px;
    --kl-radius-pill: 9999px;

    --kl-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --kl-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --kl-shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
    --kl-shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --kl-shadow-card: 0 1px 4px 0 rgba(15, 23, 42, 0.05), 0 2px 10px -2px rgba(15, 23, 42, 0.04);

    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

/* Base Body Styles for Travel Platform */
body.kanoline-app {
    background-color: var(--kl-bg);
    color: var(--kl-text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: block;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE TRAVEL APP ARCHITECTURE
   ───────────────────────────────────────────────────────────── */
.kl-app-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--kl-bg);
}

.kl-app-container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 16px 16px calc(100px + var(--safe-bottom, 0px));
    flex: 1 0 auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (max-width: 576px) {
    .kl-app-container {
        padding: 14px 14px calc(100px + var(--safe-bottom, 0px));
    }
    .kl-app-container .row {
        margin-left: -6px;
        margin-right: -6px;
    }
    .kl-app-container .row > [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }
}

@media (min-width: 769px) {
    .kl-app-container {
        padding: 24px 24px 60px;
    }
}

/* Backward-compatible alias for previous views */
.kl-mobile-app-shell {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    background: transparent;
    border: none !important;
    box-shadow: none !important;
}

.kl-app-content {
    flex: 1 1 auto;
    width: 100%;
}

/* ─────────────────────────────────────────────────────────────
   GLOBAL APP TOP PROGRESS / LOADER
   ───────────────────────────────────────────────────────────── */
#kl-top-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999999;
    pointer-events: none;
    overflow: hidden;
    display: none;
}

#kl-top-loader .kl-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--kl-primary), var(--kl-accent), var(--kl-primary));
    background-size: 200% 100%;
    animation: klLoaderSlide 1.2s infinite linear;
}

@keyframes klLoaderSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Action feedback toast */
#kl-action-toast {
    position: fixed;
    bottom: calc(90px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: var(--kl-radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: var(--kl-shadow-lg);
}

#kl-action-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Interactive tap animations */
.kl-btn, .kanoline-app .btn, .kl-app-wrapper .btn, .kl-card-interactive, .kl-nav-item, .kl-quick-action {
    transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease, opacity 0.15s ease;
}

.kl-btn:active, .kanoline-app .btn:active, .kl-app-wrapper .btn:active, .kl-card-interactive:active {
    transform: scale(0.97) !important;
}

/* Submitting state to prevent double clicks */
form.is-submitting button[type="submit"],
.btn.is-processing {
    pointer-events: none !important;
    opacity: 0.75 !important;
    position: relative;
}

.btn.is-processing .spinner-border {
    display: inline-block !important;
}

/* ─────────────────────────────────────────────────────────────
   MOBILE APP TOPBAR
   ───────────────────────────────────────────────────────────── */
.kl-app-header {
    background: var(--kl-surface);
    border-bottom: 1px solid var(--kl-border);
    padding: calc(10px + var(--safe-top)) 16px 12px;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--kl-shadow-xs);
}

.kl-header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.kl-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--kl-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.kl-header-text {
    min-width: 0;
    flex: 1;
}

.kl-header-text .kl-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--kl-text-main);
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kl-header-text .kl-subtitle {
    font-size: 0.72rem;
    color: var(--kl-text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kl-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.kl-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--kl-bg);
    border: 1px solid var(--kl-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kl-text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.kl-icon-btn:hover {
    background: #e2e8f0;
    color: var(--kl-primary);
}

/* ─────────────────────────────────────────────────────────────
   MOBILE APP BOTTOM NAVIGATION (Mobile & Expo WebView)
   ───────────────────────────────────────────────────────────── */
.kl-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--kl-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 4px calc(8px + var(--safe-bottom, 0px));
    z-index: 1030;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    height: calc(64px + var(--safe-bottom, 0px));
}

@media (min-width: 769px) {
    .kl-bottom-nav {
        display: none !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   DESKTOP TOP NAVIGATION (Desktop & Tablet)
   ───────────────────────────────────────────────────────────── */
.kl-desktop-navbar {
    display: none;
    background: #FFFFFF;
    border-bottom: 1px solid var(--kl-border);
    padding: 12px 0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    position: relative;
    z-index: 1025;
}

.kl-mobile-header {
    display: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--kl-border);
    padding: max(10px, env(safe-area-inset-top, 10px)) 16px 10px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
    position: sticky;
    top: 0;
    z-index: 1040;
    align-items: center;
    justify-content: space-between;
    min-height: calc(56px + env(safe-area-inset-top, 0px));
}

.kl-mobile-wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #F8FAFC;
    border: 1px solid var(--kl-border);
    border-radius: var(--kl-radius-pill);
    padding: 4px 10px;
    transition: all 0.15s ease;
}

.kl-mobile-wallet-pill:hover, .kl-mobile-wallet-pill:active {
    background: #ECFDF5;
    border-color: #A7F3D0;
}

/* Ensure DashLite admin/merchant fixed header never clips content on mobile */
@media (max-width: 991px) {
    .nk-header.nk-header-fixed {
        padding-top: max(6px, env(safe-area-inset-top, 0px)) !important;
    }
    .nk-header-fixed + .nk-content {
        margin-top: calc(72px + env(safe-area-inset-top, 0px)) !important;
        padding-top: 16px !important;
    }
}

@media (min-width: 769px) {
    .kl-desktop-navbar {
        display: block !important;
    }
    .kl-mobile-header {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .kl-desktop-navbar {
        display: none !important;
    }
    .kl-mobile-header {
        display: flex !important;
    }
}

.kl-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--kl-text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--kl-radius-md);
    gap: 3px;
    position: relative;
    flex: 1;
    max-width: 72px;
    transition: color 0.15s ease;
}

.kl-nav-item i, .kl-nav-item em {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.kl-nav-item.active {
    color: var(--kl-primary);
    font-weight: 700;
}

.kl-nav-item.active i, .kl-nav-item.active em {
    color: var(--kl-primary);
}

.kl-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 1px;
    width: 16px;
    height: 3px;
    background: var(--kl-primary);
    border-radius: var(--kl-radius-pill);
}

/* ─────────────────────────────────────────────────────────────
   CARDS & CONTAINERS (Scoped to KanoLine Passenger App)
   ───────────────────────────────────────────────────────────── */
.kanoline-app .card,
.kl-app-wrapper .card {
    border-radius: var(--kl-radius-lg) !important;
    border: 1px solid var(--kl-border) !important;
    box-shadow: var(--kl-shadow-card) !important;
    background: var(--kl-surface);
}

/* Sophisticated Slate & Pine Wallet Card (Apple/Revolut Style) */
.kl-wallet-card-sleek {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 55%, #064E3B 100%);
    border-radius: var(--kl-radius-xl);
    padding: 24px 22px;
    color: #ffffff;
    box-shadow: var(--kl-shadow-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kl-wallet-card-sleek::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────
   SUBTLE & DIM COLOR TOKENS (Cross-Framework Compatibility)
   ───────────────────────────────────────────────────────────── */
.bg-primary-subtle, .bg-primary-dim {
    background-color: rgba(13, 122, 77, 0.12) !important;
    color: #0D7A4D !important;
}
.bg-success-subtle, .bg-success-dim {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}
.bg-warning-subtle, .bg-warning-dim {
    background-color: rgba(245, 158, 11, 0.14) !important;
    color: #B45309 !important;
}
.bg-danger-subtle, .bg-danger-dim {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #DC2626 !important;
}
.bg-info-subtle, .bg-info-dim {
    background-color: rgba(37, 99, 235, 0.12) !important;
    color: #2563EB !important;
}
.border-primary-subtle { border-color: rgba(13, 122, 77, 0.25) !important; }
.border-success-subtle { border-color: rgba(16, 185, 129, 0.25) !important; }
.border-warning-subtle { border-color: rgba(245, 158, 11, 0.25) !important; }
.border-danger-subtle { border-color: rgba(239, 68, 68, 0.25) !important; }
.border-info-subtle { border-color: rgba(37, 99, 235, 0.25) !important; }

/* Wallet Eye Visibility Toggle Button */
.kl-balance-toggle-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #FFFFFF !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}
.kl-balance-toggle-btn:hover,
.kl-balance-toggle-btn:active {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #FFFFFF !important;
}
.kl-balance-toggle-btn em,
.kl-balance-toggle-btn i {
    color: #FFFFFF !important;
    font-size: 15px !important;
}

/* ─────────────────────────────────────────────────────────────
   BUTTONS & SIZING (Scoped to KanoLine Passenger App)
   ───────────────────────────────────────────────────────────── */
.kanoline-app .btn,
.kl-app-wrapper .btn {
    font-weight: 600;
    border-radius: var(--kl-radius-pill) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-decoration: none;
    vertical-align: middle;
    transition: all 0.15s ease;
}

.kanoline-app .btn-primary,
.kl-app-wrapper .btn-primary {
    background-color: var(--kl-primary) !important;
    border-color: var(--kl-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(13, 122, 77, 0.25) !important;
}

.kanoline-app .btn-primary:hover, 
.kanoline-app .btn-primary:focus,
.kl-app-wrapper .btn-primary:hover,
.kl-app-wrapper .btn-primary:focus {
    background-color: var(--kl-primary-dark) !important;
    border-color: var(--kl-primary-dark) !important;
    box-shadow: 0 4px 12px rgba(13, 122, 77, 0.35) !important;
}

.kanoline-app .btn-outline-primary,
.kl-app-wrapper .btn-outline-primary {
    color: var(--kl-primary) !important;
    border-color: var(--kl-primary) !important;
    background: transparent !important;
}

.kanoline-app .btn-outline-primary:hover,
.kl-app-wrapper .btn-outline-primary:hover {
    background-color: var(--kl-primary) !important;
    color: #ffffff !important;
}

.kanoline-app .btn-warning,
.kl-app-wrapper .btn-warning {
    background-color: var(--kl-accent) !important;
    border-color: var(--kl-accent) !important;
    color: #0F172A !important;
    font-weight: 700;
}

.kanoline-app .btn-warning:hover,
.kl-app-wrapper .btn-warning:hover {
    background-color: var(--kl-accent-dark) !important;
    border-color: var(--kl-accent-dark) !important;
}

/* Responsive button helper */
@media (max-width: 575.98px) {
    .btn-mobile-full {
        width: 100% !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   BADGES (Prevent overlapping & overflow in KanoLine App)
   ───────────────────────────────────────────────────────────── */
.kanoline-app .badge,
.kl-app-wrapper .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--kl-radius-pill) !important;
    font-size: 0.75rem;
    line-height: 1;
}

.badge-pill-soft-primary {
    background-color: #ECFDF5;
    color: var(--kl-primary-dark);
    border: 1px solid #A7F3D0;
}

.badge-pill-soft-warning {
    background-color: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.badge-pill-soft-slate {
    background-color: #F1F5F9;
    color: #334155;
    border: 1px solid #E2E8F0;
}

/* ─────────────────────────────────────────────────────────────
   BOOKING PAGE SPECIFIC FIXES (No badge/button collisions)
   ───────────────────────────────────────────────────────────── */
.kl-booking-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.kl-booking-header-info {
    min-width: 0;
    flex: 1 1 240px;
}

.kl-booking-header-badge {
    flex-shrink: 0;
}

/* Route Summary Card Sleek Style (White with deep slate accents, not solid green) */
.kl-route-summary-card {
    background: #ffffff;
    border-radius: var(--kl-radius-lg);
    border: 1px solid var(--kl-border);
    box-shadow: var(--kl-shadow-sm);
    overflow: hidden;
}

.kl-route-header-strip {
    background: #0F172A; /* Slate Navy instead of blinding green */
    color: #ffffff;
    padding: 16px 18px;
}

.kl-route-station-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 0 6px;
}

.kl-station-item {
    min-width: 0;
    flex: 1;
}

.kl-station-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    word-break: break-word;
}

.kl-route-arrow-center {
    flex-shrink: 0;
    padding: 0 4px;
    color: var(--kl-accent);
    font-size: 1.2rem;
}

/* Bus Cockpit Frame */
.kl-bus-cockpit-frame {
    max-width: 480px;
    margin: 0 auto;
    background: #F8FAFC;
    border: 1.5px solid var(--kl-border) !important;
    border-radius: var(--kl-radius-lg);
    padding: 18px 14px;
}

/* Interactive Seat Button */
.kl-seat-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 320px;
    margin: 0 auto;
}

@media (min-width: 400px) {
    .kl-seat-grid-container {
        gap: 10px;
        max-width: 340px;
    }
}

.kl-seat-item {
    position: relative;
    aspect-ratio: 1;
}

.kl-seat-checkbox {
    display: none;
}

.kl-seat-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    border-radius: var(--kl-radius-sm);
    color: #334155;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--kl-shadow-xs);
    user-select: none;
    padding: 4px;
}

.kl-seat-button:hover {
    border-color: var(--kl-primary);
    background: #F0FDF4;
    color: var(--kl-primary);
}

.kl-seat-checkbox:checked + .kl-seat-button {
    background: var(--kl-primary) !important;
    border-color: var(--kl-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(13, 122, 77, 0.35) !important;
    transform: scale(0.96);
}

.kl-seat-item.is-booked .kl-seat-button {
    background: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
    color: #94A3B8 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

/* Seat Legend */
.kl-legend-indicator {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}
.kl-legend-indicator.available { background: #FFFFFF; border: 1.5px solid #CBD5E1; }
.kl-legend-indicator.selected  { background: var(--kl-primary); border: 1.5px solid var(--kl-primary); }
.kl-legend-indicator.booked    { background: #F1F5F9; border: 1.5px solid #E2E8F0; }

/* Booking Page Action Bar (Fits cleanly on mobile above nav, no overlap) */
.kl-booking-footer-bar {
    background: #ffffff;
    border-top: 1px solid var(--kl-border);
    padding: 16px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kl-booking-footer-left {
    min-width: 160px;
    flex: 1 1 auto;
}

.kl-booking-btn {
    min-height: 48px;
    width: 100%;
}

@media (min-width: 576px) {
    .kl-booking-footer-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
    .kl-booking-btn {
        width: auto !important;
        min-width: 260px;
        flex-shrink: 0;
    }
}

.kl-selected-seats-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-height: 52px;
    overflow-y: auto;
}

/* ─────────────────────────────────────────────────────────────
   DIGITAL BOARDING PASS TICKET
   ───────────────────────────────────────────────────────────── */
.kl-boarding-pass-card {
    background: #ffffff;
    border-radius: var(--kl-radius-xl);
    border: 1px solid var(--kl-border);
    box-shadow: var(--kl-shadow-md);
    overflow: hidden;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.kl-boarding-pass-header {
    background: #0F172A; /* Slate Navy instead of intense green */
    color: #ffffff;
    padding: 20px 22px;
    position: relative;
}

.kl-pass-perforation {
    position: relative;
    background: #ffffff;
    padding: 6px 0;
}

.kl-pass-perforation::before, .kl-pass-perforation::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: var(--kl-bg);
    border-radius: 50%;
    z-index: 2;
}

.kl-pass-perforation::before { left: -10px; }
.kl-pass-perforation::after  { right: -10px; }

.kl-pass-dashed-line {
    border-bottom: 2px dashed #E2E8F0;
    margin: 0 16px;
}

/* ─────────────────────────────────────────────────────────────
   SEARCH TRIPS FORM & INPUTS
   ───────────────────────────────────────────────────────────── */
.form-control, .form-select {
    border-radius: var(--kl-radius-pill) !important;
    border: 1px solid var(--kl-border) !important;
    background-color: #F8FAFC !important;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 0.92rem;
    color: var(--kl-text-main) !important;
    box-shadow: none !important;
    transition: border-color 0.15s, background-color 0.15s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--kl-primary) !important;
    background-color: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(13, 122, 77, 0.12) !important;
}

/* ─────────────────────────────────────────────────────────────
   OFFLINE OVERLAY
   ───────────────────────────────────────────────────────────── */
#kl-offline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

@media (min-width: 576px) {
    #kl-offline-overlay {
        align-items: center;
        padding: 20px;
    }
}

.kl-offline-sheet {
    background: #ffffff;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 440px;
    padding: 28px 22px calc(24px + var(--safe-bottom));
    text-align: center;
    box-shadow: var(--kl-shadow-lg);
}

@media (min-width: 576px) {
    .kl-offline-sheet {
        border-radius: var(--kl-radius-xl);
    }
}

/* ─────────────────────────────────────────────────────────────
   GLOBAL COLLISION PREVENTION & LAYOUT INTEGRITY
   ───────────────────────────────────────────────────────────── */
.nk-block-head .nk-block-between {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.nk-block-head .nk-block-head-content {
    min-width: 0 !important;
    flex: 1 1 auto;
}

.nk-block-head .nk-block-head-content:last-child {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

.page-title, .nk-block-title {
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.25 !important;
}

/* Safe margin for fixed mobile bottom nav */
@media (max-width: 991.98px) {
    body.kanoline-app,
    body.has-sidebar {
        padding-bottom: calc(84px + var(--safe-bottom)) !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   PASSENGER DASHBOARD & SEARCH CARD COMPONENTS
   ───────────────────────────────────────────────────────────── */
.kl-mobile-wrap {
    width: 100%;
    margin: 0 auto;
}

.kl-allow-desktop-wide {
    max-width: 1280px;
}

.kl-search-card {
    background: #FFFFFF;
    border-radius: var(--kl-radius-xl);
    border: 1px solid var(--kl-border);
    padding: 22px 20px;
    box-shadow: var(--kl-shadow-card);
}

.kl-search-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--kl-dark);
}

.kl-search-card-title em {
    color: var(--kl-primary);
    font-size: 1.25rem;
}

.kl-route-inputs {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.kl-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #F8FAFC;
    border: 1.5px solid var(--kl-border);
    border-radius: var(--kl-radius-md);
    padding: 10px 14px;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.kl-input-group:focus-within {
    border-color: var(--kl-primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(13, 122, 77, 0.1);
}

.kl-input-icon {
    font-size: 1.25rem;
    color: var(--kl-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kl-input-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.kl-input-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--kl-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.kl-select, .kl-input {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--kl-text-main) !important;
    width: 100% !important;
    outline: none !important;
    box-shadow: none !important;
}

.kl-route-swap-btn {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid var(--kl-border);
    color: var(--kl-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
    box-shadow: var(--kl-shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.kl-route-swap-btn:hover {
    background: var(--kl-primary-surface);
    color: var(--kl-primary);
    border-color: var(--kl-primary);
    transform: translateY(-50%) rotate(180deg);
}

.kl-route-swap-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.kl-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--kl-primary) !important;
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--kl-radius-pill) !important;
    border: none;
    padding: 13px 24px;
    box-shadow: 0 4px 14px rgba(13, 122, 77, 0.25) !important;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.kl-btn-primary:hover {
    background: var(--kl-primary-dark) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 18px rgba(13, 122, 77, 0.35) !important;
}

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

/* ─────────────────────────────────────────────────────────────
   KANOLINE VIRTUAL WALLET CARD
   ───────────────────────────────────────────────────────────── */
.kl-wallet-card {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 55%, #064E3B 100%);
    border-radius: var(--kl-radius-xl);
    padding: 22px 20px;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: var(--kl-shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kl-wallet-card::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

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

.kl-wallet-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kl-wallet-label em {
    color: var(--kl-accent);
}

.kl-wallet-balance-wrap {
    margin-top: 4px;
}

.kl-wallet-balance {
    font-size: 1.85rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.kl-wallet-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.kl-wallet-toggle:hover {
    background: rgba(255, 255, 255, 0.22);
}

.kl-wallet-details {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--kl-radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.kl-wallet-acc-info {
    min-width: 0;
    flex: 1;
}

.kl-wallet-acc-title {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.kl-wallet-acc-num {
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 1px;
}

.kl-wallet-bank-pill {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--kl-radius-pill);
}

.kl-wallet-copy-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}

.kl-wallet-copy-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ─────────────────────────────────────────────────────────────
   QUICK ACTION SHORTCUT GRID
   ───────────────────────────────────────────────────────────── */
.kl-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.kl-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 12px 6px;
    background: #FFFFFF;
    border: 1px solid var(--kl-border);
    border-radius: var(--kl-radius-lg);
    box-shadow: var(--kl-shadow-xs);
    transition: all 0.15s ease;
}

.kl-quick-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--kl-shadow-sm);
    border-color: var(--kl-primary);
}

.kl-quick-item span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--kl-text-main);
    margin-top: 6px;
    text-align: center;
}

.kl-quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.kl-card {
    background: #FFFFFF;
    border-radius: var(--kl-radius-xl);
    border: 1px solid var(--kl-border);
    box-shadow: var(--kl-shadow-card);
}

/* ─────────────────────────────────────────────────────────────
   TRIP CARDS & ROUTE FLOW (Clean White, Slate Header, Emerald Fare)
   ───────────────────────────────────────────────────────────── */
.kl-trip-card {
    background: #FFFFFF;
    border-radius: var(--kl-radius-lg);
    border: 1px solid var(--kl-border);
    padding: 18px 16px;
    box-shadow: var(--kl-shadow-card);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kl-trip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--kl-shadow-md);
    border-color: var(--kl-primary-light);
}

.kl-trip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.kl-route-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
}

.kl-station-block {
    min-width: 0;
    flex: 1;
}

.kl-station-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--kl-dark);
    word-break: break-word;
    line-height: 1.25;
}

.kl-station-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--kl-text-muted);
}

.kl-route-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 6px;
    color: var(--kl-primary);
}

.kl-route-arrow em {
    font-size: 1.1rem;
}

.kl-route-time-est {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--kl-text-muted);
}

.kl-trip-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--kl-border);
    margin-top: auto;
}

.kl-fare-tag {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--kl-primary);
    line-height: 1.2;
}

.kl-fare-sub {
    font-size: 0.68rem;
    color: var(--kl-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive button behavior */
.kl-trip-footer .kl-btn-primary {
    width: auto !important;
    white-space: nowrap !important;
    padding: 10px 20px !important;
    font-size: 0.88rem !important;
    flex-shrink: 0 !important;
}

@media (max-width: 380px) {
    .kl-trip-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .kl-trip-footer .kl-btn-primary {
        width: 100% !important;
        text-align: center !important;
    }
}

/* ─────────────────────────────────────────────────────────────
   NATIVE MOBILE APP HEADER
   ───────────────────────────────────────────────────────────── */
.kl-app-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--kl-border);
    padding: calc(10px + var(--safe-top)) 14px 10px;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kl-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.kl-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--kl-bg);
    border: 1px solid var(--kl-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kl-dark);
    text-decoration: none;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.1s ease;
}

.kl-back-btn:active {
    transform: scale(0.92);
}

.kl-brand-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kl-header-meta {
    min-width: 0;
    flex: 1;
}

.kl-screen-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--kl-dark);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.kl-screen-sub {
    font-size: 0.68rem;
    color: var(--kl-text-muted);
    display: block;
    line-height: 1.1;
    margin-top: 1px;
}

.kl-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.kl-header-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--kl-bg);
    border: 1px solid var(--kl-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kl-dark);
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s ease;
}

.kl-header-icon-btn:active {
    transform: scale(0.92);
}

/* ─────────────────────────────────────────────────────────────
   AUTHENTIC BUS SEAT SELECTION MATRIX (Clean, Mobile App Touch)
   ───────────────────────────────────────────────────────────── */
.seat-map-container {
    background: #F8FAFC;
    border-radius: var(--kl-radius-lg);
    border: 1px solid var(--kl-border);
    padding: 16px 14px;
    margin: 0 auto;
    width: 100%;
}

.seat-grid-bus {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 10px;
    justify-items: center;
    max-width: 300px;
    margin: 0 auto;
}

.seat {
    position: relative;
    width: 50px;
    height: 50px;
    border: 2px solid var(--kl-primary);
    border-radius: 12px;
    background-color: #FFFFFF;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

@media (max-width: 380px) {
    .seat {
        width: 44px;
        height: 44px;
    }
}

.seat input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.seat label {
    cursor: pointer;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--kl-primary);
    border-radius: 10px;
    transition: all 0.15s ease;
}

.seat:hover:not(.booked) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 122, 77, 0.2);
}

.seat input[type="checkbox"]:checked + label {
    background-color: var(--kl-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(13, 122, 77, 0.35);
}

.seat.booked {
    background-color: #F1F5F9;
    border-color: #E2E8F0;
    color: #94A3B8;
    cursor: not-allowed;
    box-shadow: none;
}

.seat.booked input[type="checkbox"] {
    cursor: not-allowed;
    pointer-events: none;
}

.seat.booked label {
    color: #94A3B8;
    cursor: not-allowed;
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    display: inline-block;
}
.legend-box.available {
    background: #FFFFFF;
    border: 2px solid var(--kl-primary);
}
.legend-box.selected {
    background: var(--kl-primary);
    border: 2px solid var(--kl-primary);
}
.legend-box.booked {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
}

/* Mini Trip Search Inputs */
.kl-search-mini-input,
.kl-app-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.kl-search-mini-input .form-control,
.kl-search-mini-input .form-select,
.kl-app-input-wrap .form-control,
.kl-app-input-wrap .form-select {
    padding-left: 32px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    height: 38px !important;
    border-color: #E2E8F0 !important;
    background-color: #F8FAFC !important;
    color: #0F172A !important;
    border-radius: 9999px !important;
}

.kl-search-mini-input .form-control:focus,
.kl-search-mini-input .form-select:focus,
.kl-app-input-wrap .form-control:focus,
.kl-app-input-wrap .form-select:focus {
    background-color: #FFFFFF !important;
    border-color: #0D7A4D !important;
    box-shadow: 0 0 0 2px rgba(13, 122, 77, 0.15) !important;
}

.kl-search-mini-icon,
.kl-app-input-wrap .kl-app-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.82rem;
    pointer-events: none;
    z-index: 3;
}

/* ─────────────────────────────────────────────────────────────
   PREMIER TRAVEL APP DESIGN SYSTEM (2026 Reference Edition)
   ───────────────────────────────────────────────────────────── */

/* Header Branding */
.kl-brand-logo-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--kl-primary);
    line-height: 1.1;
    letter-spacing: -0.3px;
}
.kl-brand-sub-text {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--kl-text-muted);
    line-height: 1.2;
}

/* Home Greeting with Bus Graphic */
.kl-home-greeting-wrap {
    position: relative;
    padding: 4px 2px 14px;
}
.kl-greeting-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--kl-text-main);
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 2px;
}
.kl-greeting-sub {
    font-size: 0.82rem;
    color: var(--kl-text-muted);
    margin-bottom: 0;
}
.kl-greeting-bus-img {
    height: 68px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(13, 122, 77, 0.15));
}

/* Primary Journey Booking Panel (Screen A) */
.kl-search-panel-premier {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    position: relative;
    margin-bottom: 16px;
}

.kl-input-item-premier {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.kl-input-item-premier:focus-within {
    border-color: var(--kl-primary);
    box-shadow: 0 0 0 3px rgba(13, 122, 77, 0.1);
}

.kl-input-icon-pill {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(13, 122, 77, 0.1);
    color: var(--kl-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.kl-input-text-wrap {
    min-width: 0;
    flex: 1;
}

.kl-input-label-mini {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--kl-text-muted);
    display: block;
    line-height: 1;
    margin-bottom: 3px;
}

.kl-input-field-premier {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--kl-text-main);
    padding: 0;
    margin: 0;
    line-height: 1.2;
}

.kl-input-field-premier::placeholder {
    color: #94A3B8;
    font-weight: 500;
}

/* Floating Terminal Swap Button */
.kl-swap-btn-floating {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    color: var(--kl-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease, background 0.15s ease;
}

.kl-swap-btn-floating:hover {
    background: #F0FDF4;
    color: var(--kl-primary-dark);
}

.kl-swap-btn-floating:active {
    transform: translateY(-50%) rotate(180deg) scale(0.95);
}

/* Primary "Find buses" Button */
.kl-btn-find-buses {
    width: 100%;
    height: 50px;
    background-color: var(--kl-primary) !important;
    border: none !important;
    color: #FFFFFF !important;
    border-radius: 14px !important;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(13, 122, 77, 0.3) !important;
    transition: all 0.15s ease;
    text-decoration: none;
}

.kl-btn-find-buses:hover {
    background-color: var(--kl-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13, 122, 77, 0.35) !important;
}

/* Upcoming Booking Summary Card (Target Reference) */
.kl-upcoming-card-ref {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 14px;
    text-decoration: none;
    display: block;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kl-upcoming-card-ref:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.12);
    color: inherit;
}

/* Quick Access 3-Action Row */
.kl-quick-access-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 14px 8px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.kl-quick-access-card:hover {
    border-color: var(--kl-primary-light);
    transform: translateY(-2px);
}

.kl-quick-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(13, 122, 77, 0.08);
    color: var(--kl-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.kl-quick-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--kl-text-main);
    margin: 0;
}

/* Service Notice Card */
.kl-service-notice-card {
    background: #FFFBEB;
    border: 1px solid #FEF3C7;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

/* Screen B: Trip Card Component (Center Phone Reference) */
.kl-trip-card-ref {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kl-trip-card-ref:hover {
    border-color: #CBD5E1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.kl-trip-brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(13, 122, 77, 0.1);
    color: var(--kl-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.kl-timeline-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0 12px;
}

.kl-timeline-line {
    width: 100%;
    height: 1.5px;
    background: #CBD5E1;
    position: relative;
}

.kl-timeline-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #94A3B8;
}

.kl-timeline-duration {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--kl-text-muted);
    background: #FFFFFF;
    padding: 0 6px;
    position: relative;
    z-index: 2;
}

.kl-btn-choose-seats {
    background-color: var(--kl-primary) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: var(--kl-radius-pill) !important;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 9px 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(13, 122, 77, 0.25);
    text-decoration: none;
    transition: all 0.15s ease;
}

.kl-btn-choose-seats:hover {
    background-color: var(--kl-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(13, 122, 77, 0.35);
}

/* Screen F: Profile View (Right Phone Reference) */
.kl-profile-avatar-ref {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #D1FAE5;
    color: var(--kl-primary);
    font-size: 1.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto 12px;
    box-shadow: 0 4px 14px rgba(13, 122, 77, 0.12);
    border: 3px solid #FFFFFF;
}

.kl-profile-verified-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--kl-primary);
    color: #FFFFFF;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFFFFF;
}

.kl-profile-stats-bar {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    padding: 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    margin-bottom: 16px;
}

.kl-stat-item-ref {
    text-align: center;
    flex: 1;
}

.kl-stat-item-ref:not(:last-child) {
    border-right: 1px solid #F1F5F9;
}

.kl-menu-card-ref {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    margin-bottom: 16px;
}

.kl-menu-item-ref {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.kl-menu-item-ref:not(:last-child) {
    border-bottom: 1px solid #F1F5F9;
}

.kl-menu-item-ref:hover,
.kl-menu-item-ref:active {
    background: #F8FAFC;
    color: inherit;
}

.kl-menu-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--kl-text-main);
}

.kl-btn-signout-ref {
    width: 100%;
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: #EF4444;
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.kl-btn-signout-ref:hover {
    background: #FEE2E2;
    color: #DC2626;
}



/* ─────────────────────────────────────────────────────────────
   3-SERVICE SEGMENTED TABS (TICKET | CHARTER | WAYBILL)
   ───────────────────────────────────────────────────────────── */
.kl-service-tabs-segmented {
    display: flex;
    background: #E2E8F0;
    padding: 4px;
    border-radius: 16px;
    gap: 4px;
    margin-bottom: 16px;
    position: relative;
    user-select: none;
    border: 1px solid #CBD5E1;
}

.kl-service-tab-btn {
    flex: 1;
    min-height: 44px;
    border: none;
    background: transparent;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.kl-service-tab-btn .tab-icon {
    font-size: 1.05rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.kl-service-tab-btn:hover {
    color: var(--kl-text-main);
}

.kl-service-tab-btn.active {
    background: #FFFFFF;
    color: #0D7A4D;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
    font-weight: 800;
}

.kl-service-tab-btn.active .tab-icon {
    transform: scale(1.1);
    color: #0D7A4D;
}

/* Service Tab Panels */
.kl-service-panel {
    display: none;
    animation: klFadeSlideIn 0.22s ease-out forwards;
}

.kl-service-panel.active {
    display: block;
}

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

/* Radio Pill Segmented Controls (e.g. One-Way vs Round Trip) */
.kl-pill-toggle-group {
    display: flex;
    background: #F1F5F9;
    padding: 3px;
    border-radius: 9999px;
    gap: 4px;
    margin-bottom: 14px;
    border: 1px solid #E2E8F0;
}

.kl-pill-toggle-label {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 9999px;
    cursor: pointer;
    color: #64748B;
    transition: all 0.15s ease;
    margin-bottom: 0;
    user-select: none;
}

.kl-pill-toggle-input {
    display: none;
}

.kl-pill-toggle-input:checked + .kl-pill-toggle-label {
    background: #0D7A4D;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(13, 122, 77, 0.25);
}

/* Interactive Tariff Breakdown Card */
.kl-tariff-calc-card {
    background: #F0FDF4;
    border: 1.5px dashed #86EFAC;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.kl-tariff-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #334155;
    margin-bottom: 4px;
}

.kl-tariff-total {
    border-top: 1px solid #BBF7D0;
    padding-top: 6px;
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #065F46;
}

/* ─────────────────────────────────────────────────────────────
   WAYBILL & CONSIGNMENT TRACKING TIMELINE
   ───────────────────────────────────────────────────────────── */
.kl-tracking-timeline {
    position: relative;
    padding: 10px 0 10px 24px;
    margin-left: 8px;
}

.kl-tracking-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 14px;
    bottom: 14px;
    width: 2px;
    background: #E2E8F0;
}

.kl-timeline-step {
    position: relative;
    padding-bottom: 22px;
}

.kl-timeline-step:last-child {
    padding-bottom: 0;
}

.kl-timeline-marker {
    position: absolute;
    left: -24px;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #CBD5E1;
    border: 3px solid #FFFFFF;
    box-shadow: 0 0 0 1px #94A3B8;
    z-index: 2;
    transition: all 0.2s ease;
}

.kl-timeline-step.completed .kl-timeline-marker {
    background: #10B981;
    box-shadow: 0 0 0 1px #10B981;
}

.kl-timeline-step.active .kl-timeline-marker {
    background: #F59E0B;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
    animation: klPulse 1.8s infinite;
}

@keyframes klPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.kl-timeline-content {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kl-timeline-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 2px;
}

.kl-timeline-meta {
    font-size: 0.75rem;
    color: #64748B;
}

/* ─────────────────────────────────────────────────────────────
   BRANDED KANOLINE MOBILE OFFLINE & ERROR OVERLAYS
   ───────────────────────────────────────────────────────────── */
.kl-error-state-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 32px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    margin: 20px 0;
}

.kl-error-illustration-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #FEF2F2;
    color: #EF4444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 16px;
    border: 2px solid #FEE2E2;
}

.kl-error-state-card.offline .kl-error-illustration-wrap {
    background: #F0FDF4;
    color: #0D7A4D;
    border-color: #DCFCE7;
}

.kl-error-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 8px;
}

.kl-error-desc {
    font-size: 0.85rem;
    color: #64748B;
    max-width: 320px;
    margin: 0 auto 20px auto;
    line-height: 1.5;
}

.kl-btn-retry {
    background: #0D7A4D;
    color: #FFFFFF;
    font-weight: 700;
    border-radius: 9999px;
    padding: 10px 28px;
    border: none;
    font-size: 0.88rem;
    box-shadow: 0 4px 12px rgba(13, 122, 77, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.kl-btn-retry:hover, .kl-btn-retry:active {
    background: #0A633E;
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* Offline Fullscreen Backdrop */
#kl-full-offline-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* Service Detail Quick Cards */
.kl-detail-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    margin-bottom: 16px;
}

.kl-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.kl-detail-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748B;
    letter-spacing: 0.03em;
    display: block;
    margin-bottom: 2px;
}

.kl-detail-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0F172A;
}

@media (max-width: 360px) {
    .kl-service-tab-btn {
        font-size: 0.72rem;
        padding: 6px 3px;
        gap: 3px;
    }
    .kl-service-tab-btn .tab-icon {
        font-size: 0.92rem;
    }
}


/* ─────────────────────────────────────────────────────────────
   MOBILE APP DATE STRIP & HORIZONTAL FILTER CHIPS (Screen B Revamp)
   ───────────────────────────────────────────────────────────── */
.kl-journey-header-card {
    border: 1px solid #E2E8F0 !important;
    border-radius: 20px !important;
    background: #FFFFFF !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
}

.kl-journey-header-card button.badge {
    transition: all 0.15s ease-in-out;
}

.kl-journey-header-card button.badge:hover,
.kl-journey-header-card button.badge:active {
    background-color: #E2E8F0 !important;
    color: var(--kl-primary) !important;
    border-color: #CBD5E1 !important;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .kl-journey-header-card {
        padding: 14px 14px !important;
        border-radius: 18px !important;
    }
}

.kl-date-strip-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.kl-date-strip-scroll::-webkit-scrollbar {
    display: none;
}

.kl-date-chip-btn {
    flex: 0 0 auto;
    width: 64px;
    padding: 8px 4px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    text-align: center;
    text-decoration: none;
    color: #475569;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.15s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.kl-date-chip-btn .day-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94A3B8;
}

.kl-date-chip-btn .day-num {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0F172A;
}

.kl-date-chip-btn .month-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94A3B8;
}

.kl-date-chip-btn.active {
    background: var(--kl-primary) !important;
    border-color: var(--kl-primary) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(13, 122, 77, 0.3) !important;
    transform: translateY(-1px);
}

.kl-date-chip-btn.active .day-label,
.kl-date-chip-btn.active .day-num,
.kl-date-chip-btn.active .month-label {
    color: #FFFFFF !important;
}

/* Quick Filter Chips */
.kl-filter-chips-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.kl-filter-chips-scroll::-webkit-scrollbar {
    display: none;
}

.kl-filter-chip {
    flex: 0 0 auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    white-space: nowrap;
}

.kl-filter-chip.active {
    background: #0F172A !important;
    border-color: #0F172A !important;
    color: #FFFFFF !important;
}

.kl-filter-chip:hover:not(.active) {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: #0F172A;
}

/* Enhanced Mobile Trip Card */
.kl-trip-card-mobile {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.kl-trip-card-mobile:hover {
    border-color: #CBD5E1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.kl-timeline-schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
    gap: 8px;
}

.kl-station-col {
    flex: 1 1 0;
    min-width: 0;
}

.kl-station-time {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.1;
    margin-bottom: 3px;
}

.kl-station-name {
    font-size: 0.74rem;
    font-weight: 600;
    color: #64748B;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kl-route-middle-track {
    flex: 0 0 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 4px;
}

.kl-duration-tag {
    font-size: 0.64rem;
    font-weight: 700;
    color: #64748B;
    background: #F1F5F9;
    padding: 2px 7px;
    border-radius: 999px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.kl-route-line-graphic {
    width: 100%;
    height: 2px;
    background: #CBD5E1;
    position: relative;
}

.kl-route-line-graphic::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 5px solid #0D7A4D;
}

.kl-amenity-chip {
    font-size: 0.68rem;
    font-weight: 600;
    color: #475569;
    background: #F8FAFC;
    border: 1px solid #F1F5F9;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kl-seat-status-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.kl-seat-status-pill.plenty {
    background: #ECFDF5;
    color: #0D7A4D;
    border: 1px solid #A7F3D0;
}
.kl-seat-status-pill.limited {
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.kl-btn-book-action {
    background: var(--kl-primary) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 999px !important;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 10px 22px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(13, 122, 77, 0.28);
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    min-height: 42px;
}

.kl-btn-book-action:hover, .kl-btn-book-action:active {
    background: var(--kl-primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13, 122, 77, 0.38);
    color: #FFFFFF !important;
}

@media (max-width: 360px) {
    .kl-route-middle-track {
        flex: 0 0 58px;
    }
    .kl-station-time {
        font-size: 1rem;
    }
    .kl-btn-book-action {
        padding: 8px 14px;
        font-size: 0.78rem;
    }
}
