/* ===================================================
   MRDU Ride — Mobile-Only Web App Stylesheet
   Modern Dark Theme with Vibrant Campus Indigo & Emerald Accents
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #0a0f1d;
    --bg-surface: #11192e;
    --bg-card: #18233d;
    --bg-card-hover: #1f2d4e;
    --bg-input: #0e1528;
    
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.35);
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: #6366f1;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.5);
    
    --nav-height: 68px;
    --header-height: 60px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* ---- Keyframe Animations ---- */
@keyframes splashPop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    background-color: #030712;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Outer Desktop Frame Container */
#app-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-main);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

@media (min-width: 500px) {
    #app-container {
        height: 94vh;
        max-height: 920px;
        border-radius: 36px;
        border: 4px solid #1e293b;
    }
}

/* Screens Wrapper */
#screens-wrapper {
    flex: 1;
    min-height: 0;          /* CRITICAL: flex children won't scroll without this */
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--nav-height) + 32px);
}

#screens-wrapper::-webkit-scrollbar {
    width: 4px;
}
#screens-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.screen {
    display: none;
    width: 100%;
    min-height: 100%;
    padding: 16px 16px 40px;
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen.active {
    display: block;
}

.screen.no-nav-padding {
    padding-bottom: 24px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Screen Headers */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-top: 4px;
}

.header-title-group h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.header-title-group p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.btn-icon-round {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-round:active {
    transform: scale(0.92);
    background: var(--bg-card);
}

/* Splash Screen */
#splash-screen {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: linear-gradient(135deg, #090e1a 0%, #17153b 50%, #090e1a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.splash-logo-container {
    position: relative;
    margin-bottom: 24px;
}

.splash-logo-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
    box-shadow: 0 12px 36px var(--primary-glow);
    animation: pulseLogo 2s infinite ease-in-out;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.splash-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.splash-tagline {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.splash-loader {
    margin-top: 40px;
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    font-size: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.form-control {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    padding-left: 44px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-control.no-icon {
    padding-left: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    background: #111b33;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    cursor: pointer;
}

select.form-control option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.gender-select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gender-card-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gender-card-label i {
    font-size: 26px;
    color: var(--text-secondary);
}

.gender-card-label span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.gender-radio:checked + .gender-card-label {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.15);
}

.gender-radio:checked + .gender-card-label i,
.gender-radio:checked + .gender-card-label span {
    color: var(--primary-light);
}

.gender-radio {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* Notice Badges */
.gender-rule-badge {
    background: rgba(79, 70, 229, 0.12);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.gender-rule-badge i {
    font-size: 20px;
    color: var(--primary-light);
    flex-shrink: 0;
    margin-top: 1px;
}

.gender-rule-badge p {
    font-size: 12px;
    line-height: 1.4;
    color: #cbd5e1;
}

/* Buttons */
.btn-primary {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 20px var(--primary-glow);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px var(--primary-glow);
}

.btn-secondary {
    width: 100%;
    height: 50px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-secondary:active {
    background: var(--bg-card);
}

.btn-sm {
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.btn-danger:active {
    background: rgba(239, 68, 68, 0.25);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* Home Screen Styles */
.user-hero-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #172554 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.user-hero-info {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
}

.user-hero-info h2 {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-hero-info p {
    font-size: 12px;
    color: #a5b4fc;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gender-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gender-tag.male {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.gender-tag.female {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.4);
}

.user-hero-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid #818cf8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    flex-shrink: 0;
}

.user-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Quick Action Cards */
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.action-card:active {
    transform: translateY(2px);
}

.action-card.find-ride {
    border-color: rgba(6, 182, 212, 0.3);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.08) 0%, var(--bg-card) 100%);
}

.action-card.offer-ride {
    border-color: rgba(79, 70, 229, 0.4);
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.12) 0%, var(--bg-card) 100%);
}

.action-card-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
}

.find-ride .action-card-icon {
    background: rgba(6, 182, 212, 0.2);
    color: var(--secondary);
}

.offer-ride .action-card-icon {
    background: var(--primary-glow);
    color: var(--primary-light);
}

.action-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.action-card p {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-header a, .section-header button {
    font-size: 12px;
    color: var(--primary-light);
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

/* Ride Cards */
.rides-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ride-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.ride-card:active {
    background: var(--bg-card);
    transform: scale(0.99);
}

.ride-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.driver-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.driver-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.driver-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.driver-details {
    flex: 1;
    min-width: 0;
}

.driver-details h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.driver-details p {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-tag {
    text-align: right;
    flex-shrink: 0;
    margin-left: auto;
}

.price-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-green);
    white-space: nowrap;
}

.price-label {
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Route Display */
.route-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.route-point {
    display: flex;
    align-items: center;
    gap: 10px;
}

.point-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.point-dot.start {
    background: var(--secondary);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

.point-dot.end {
    background: var(--primary-light);
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.6);
}

.point-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ride-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.ride-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ride-meta-item i {
    font-size: 14px;
    color: var(--text-muted);
}

.seats-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.seats-badge.low {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border-color: rgba(245, 158, 11, 0.3);
}

.seats-badge.full {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state i {
    font-size: 54px;
    color: var(--text-muted);
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 260px;
}

/* Bottom Navigation — Fixed, never scrolls */
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: rgba(10, 15, 29, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 200;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 22px;
    transition: transform 0.2s ease;
}

.nav-item span {
    font-size: 10px;
    font-weight: 600;
}

.nav-item.active {
    color: var(--primary-light);
}

.nav-item.active i {
    transform: translateY(-2px);
    color: var(--primary-light);
}

.nav-item-offer {
    position: relative;
    top: -12px;
}

.offer-bubble {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 6px 18px var(--primary-glow);
    border: 3px solid var(--bg-main);
    transition: transform 0.2s ease;
}

.nav-item-offer:active .offer-bubble {
    transform: scale(0.92);
}

/* Modals & Bottom Sheets */
.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: none;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.bottom-sheet {
    width: 100%;
    max-height: 88%;
    max-height: min(88%, calc(100vh - 48px));
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    padding: 20px 20px 32px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .bottom-sheet {
    transform: translateY(0);
}

.sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: 0 auto 16px;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sheet-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.sheet-drag-handle,
.sheet-header {
    flex-shrink: 0;
}

/* Scrollable content areas inside bottom sheets (flexible, mobile-safe) */
#ride-detail-content,
#manage-requests-list,
#incoming-request-popup-content,
#accepted-request-popup-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

#ride-detail-content::-webkit-scrollbar,
#manage-requests-list::-webkit-scrollbar,
#incoming-request-popup-content::-webkit-scrollbar,
#accepted-request-popup-content::-webkit-scrollbar {
    width: 4px;
}

#ride-detail-content::-webkit-scrollbar-thumb,
#manage-requests-list::-webkit-scrollbar-thumb,
#incoming-request-popup-content::-webkit-scrollbar-thumb,
#accepted-request-popup-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Chat Styling */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    max-height: 700px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 78%;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.45;
    word-break: break-word;
    position: relative;
}

.chat-bubble.sent {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    align-self: flex-start;
    background: var(--bg-card);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border);
}

.chat-time {
    font-size: 9.5px;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
    text-align: right;
}

.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

.chat-input-bar input {
    flex: 1;
    height: 46px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0 18px;
    color: var(--text-primary);
    font-size: 14px;
}

.chat-input-bar input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.btn-send {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Tabs */
.tab-group {
    display: flex;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 18px;
}

.tab-btn {
    flex: 1;
    height: 36px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* Toast */
.toast {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 150;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    font-size: 22px;
}

.toast.success i { color: var(--accent-green); }
.toast.error i { color: var(--accent-red); }
.toast.info i { color: var(--secondary); }

.toast-message {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* SOS Floating Banner */
.sos-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sos-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sos-info i {
    color: #f87171;
    font-size: 18px;
}

.sos-info span {
    font-size: 12px;
    font-weight: 600;
    color: #fca5a5;
}

/* ===================================================
   Rapido-Style Interactive Ride-Sharing Map UI
   =================================================== */

/* Interactive Map Card (Always Visible & Responsive) */
/* Interactive Map Card (Always Visible & Responsive) */
.map-display-box {
    width: 100%;
    height: 310px;
    min-height: 290px;
    background: #1e293b;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.35);
    overflow: hidden;
    margin-bottom: 18px;
    position: relative;
    box-shadow: var(--shadow-md);
    z-index: 5;
    display: flex;
    flex-direction: column;
}

.map-display-box.map-tall {
    height: 350px;
    min-height: 330px;
}

.map-display-header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 20;
    flex-shrink: 0;
}

.map-inner-canvas {
    width: 100%;
    flex: 1;
    min-height: 260px;
    background: #0f172a;
    position: relative;
    z-index: 1;
}

.floating-gps-pill {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: var(--secondary);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}


/* Rapido Bottom Booking Card */
.rapido-bottom-card {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    padding: 18px 18px 24px;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 10;
    max-height: 75vh;
    overflow-y: auto;
}

.rapido-route-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 14px;
    margin-bottom: 14px;
    position: relative;
}

.rapido-route-line-connector {
    position: absolute;
    left: 23px;
    top: 26px;
    bottom: 26px;
    width: 2px;
    background: linear-gradient(180deg, #06b6d4 0%, #6366f1 100%);
}

.rapido-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.rapido-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    z-index: 2;
}

.rapido-dot.pickup {
    background: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
}

.rapido-dot.dropoff {
    background: #6366f1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

.rapido-select {
    flex: 1;
    height: 38px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.rapido-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* Vehicle Selector Pills (Rapido Style) */
.vehicle-pills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.vehicle-pill {
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vehicle-pill.active {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.15);
}

.vehicle-pill-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vehicle-pill-info i {
    font-size: 22px;
    color: var(--secondary);
}

.vehicle-pill-text h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.vehicle-pill-text span {
    font-size: 10px;
    color: var(--text-muted);
}

.vehicle-pill-fare {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-green);
}

/* Leaflet Map Overrides & Dark Theme Styling */
.leaflet-container {
    width: 100% !important;
    height: 100% !important;
    background: #0f172a !important;
    font-family: inherit !important;
    z-index: 1 !important;
}

.leaflet-tile {
    filter: brightness(0.85) contrast(1.1) saturate(1.2);
}

.leaflet-control-zoom {
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-bottom: 1px solid var(--border) !important;
}

.leaflet-control-zoom a:hover {
    background: #334155 !important;
}

.leaflet-popup-content-wrapper {
    background: #1e293b !important;
    color: #f8fafc !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6) !important;
    padding: 4px 6px !important;
}

.leaflet-popup-tip {
    background: #1e293b !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
}

.leaflet-popup-content {
    margin: 8px 10px !important;
    line-height: 1.4 !important;
    font-size: 12px !important;
}

.custom-map-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.custom-map-pin:hover {
    transform: scale(1.15);
}

/* ===================================================
   Ride Details Bottom Sheet — Clean Mobile UI
   =================================================== */

.rd-driver-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.rd-driver-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.rd-driver-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rd-driver-meta {
    flex: 1;
    min-width: 0;
}

.rd-driver-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rd-driver-sub {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.4;
    word-break: break-word;
}

.rd-driver-meta .gender-tag {
    margin-top: 6px;
}

.rd-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
}

.rd-route-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rd-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rd-dot-start {
    background: var(--secondary);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.7);
}

.rd-dot-end {
    background: var(--primary-light);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.7);
}

.rd-route-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rd-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.rd-value {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1px;
    word-break: break-word;
}

.rd-connector {
    width: 2px;
    height: 24px;
    margin-left: 4px;
    background: repeating-linear-gradient(180deg, var(--secondary) 0 4px, transparent 4px 8px);
}

.rd-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.rd-info-cell {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.rd-cell-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.rd-cell-value {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-primary);
    word-break: break-word;
}

.rd-cell-accent {
    font-size: 12.5px;
    color: var(--primary-light);
    font-weight: 700;
}

.rd-cell-price {
    color: var(--accent-green);
    font-size: 18px;
}

.rd-cell-sub {
    font-size: 10.5px;
    color: var(--text-muted);
}

.rd-notes p {
    font-size: 13px;
    color: var(--text-primary);
    margin-top: 6px;
    line-height: 1.5;
    word-break: break-word;
}

.rd-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.rd-section-head h4 {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rd-section-list {
    margin-bottom: 12px;
}

/* Request Status Box */
.rd-status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.rd-status-box i {
    font-size: 26px;
    flex-shrink: 0;
}

.rd-status-box > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rd-status-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.rd-status-sub {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.rd-status-box.accepted {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.4);
}

.rd-status-box.accepted i {
    color: var(--accent-green);
}

.rd-status-box.pending {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
}

.rd-status-box.pending i {
    color: var(--accent);
}

.rd-status-box.rejected {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
}

.rd-status-box.rejected i {
    color: var(--accent-red);
}

.rd-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rd-action-btn {
    width: 100%;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.rd-action-call {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.rd-action-map {
    background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.35);
}

/* ===================================================
   COMING SOON & COUNTDOWN TIMER LOCK SCREEN STYLES
   =================================================== */

.coming-soon-container {
    padding: 24px 16px 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    justify-content: center;
}

.coming-soon-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--primary-light);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 14px #10b981; }
    100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
}

.coming-soon-logo-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
}

.coming-soon-logo {
    width: 100%;
    height: 100%;
    border-radius: 26px;
    object-fit: cover;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.coming-soon-logo-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.5) 0%, rgba(6, 182, 212, 0) 70%);
    z-index: 1;
    border-radius: 50%;
    filter: blur(10px);
}

.coming-soon-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    margin-bottom: 8px;
}

.text-gradient {
    background: linear-gradient(135deg, #818cf8 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coming-soon-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 340px;
    margin: 0 auto 22px;
}

/* Digital Countdown */
.countdown-container {
    width: 100%;
    max-width: 380px;
    background: linear-gradient(180deg, rgba(30, 27, 75, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-lg);
    padding: 18px 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.countdown-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.countdown-tile {
    flex: 1;
    background: rgba(10, 15, 29, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.countdown-value {
    font-size: 24px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.countdown-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--primary-light);
    margin-top: 4px;
}

.countdown-separator {
    font-size: 20px;
    font-weight: 800;
    color: rgba(129, 140, 248, 0.6);
    margin-top: -12px;
}

.countdown-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--secondary);
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* User Status Info Card */
.coming-soon-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    text-align: left;
    margin-bottom: 22px;
}

.card-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 6px;
}

.coming-soon-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.user-email-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    word-break: break-all;
}

.coming-soon-actions {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Login Screen Pilot Banner */
.login-pilot-banner {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.8) 0%, rgba(17, 24, 39, 0.9) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.pilot-banner-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-pilot-banner p {
    font-size: 12px;
    color: #e2e8f0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.login-timer-highlight {
    font-family: 'Plus Jakarta Sans', monospace;
    font-weight: 800;
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 2px 6px;
    border-radius: 6px;
}




