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

:root {
    --color-primary-red: #E85C4A; /* Burkina flag red / Warm Terracotta Red */
    --color-primary-red-hover: #D44B39;
    --color-primary-red-light: #FDF1EF;
    --color-primary-yellow: #F6CD56; /* Burkina flag yellow / Savannah Gold */
    --color-primary-yellow-hover: #E8BF45;
    --color-primary-yellow-light: #FEFAF0;
    --color-primary-green: #27AE60; /* Burkina flag green */
    --color-primary-green-hover: #219653;
    --color-primary-green-light: #E8F7EE;
    --color-primary-brown: #8D5537; /* African Earthy Terracotta Clay Brown */
    --color-primary-brown-hover: #75442A;
    --color-primary-brown-light: #FAF5F0;
    --color-primary-brown-dark: #5E3D28; /* Rich Soil African Deep Brown */
    --color-bg-warm: #FAF6F2; /* Beautiful Savannah Warm Sand-Beige */
    --color-card-white: #FFFFFF;
    --color-charcoal: #362A21; /* Rich Coffee Clay Brown instead of solid dark gray */
    --color-charcoal-light: #605146; /* Warm Soil Gray */
    --color-charcoal-muted: #A39387; /* Soft Savannah Sand Gray */
    --color-border: #EFE9E2; /* Clean Earth Sand Border */
    --color-green-soft: #27AE60;
    --color-green-light: #E8F7EE;
    --color-overlay: rgba(54, 42, 33, 0.5);
    --font-sans: 'Outfit', sans-serif;
    --shadow-soft: 0 8px 30px rgba(54, 42, 33, 0.04);
    --shadow-medium: 0 12px 40px rgba(54, 42, 33, 0.08);
    --shadow-hard: 0 20px 50px rgba(54, 42, 33, 0.16);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none !important;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-warm);
    color: var(--color-charcoal);
    line-height: 1.5;
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-warm);
}
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-charcoal-muted);
}

/* Header Minimal */
header {
    background: rgba(250, 246, 242, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(54, 42, 33, 0.03), inset 0 1px 1px rgba(255, 255, 255, 0.85);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    height: 64px;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--color-bg-warm);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1.5px solid var(--color-primary-brown);
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-charcoal);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--color-primary-brown); /* Rich brown highlights on logo */
}

.nav-buttons {
    display: flex;
    gap: 8px;
}

.btn {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background-color: var(--color-primary-red);
    color: var(--color-card-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-red-hover);
    transform: translateY(-1px);
}

#btn-nav-register {
    background: linear-gradient(135deg, var(--color-primary-green), var(--color-primary-green-hover)) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 
        0 10px 24px rgba(39, 174, 96, 0.3),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.35) !important;
    border-radius: 20px !important;
    padding: 14px 28px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    margin-top: 10px;
    margin-bottom: 20px;
    color: var(--color-card-white) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

#btn-nav-register:hover {
    background: linear-gradient(135deg, var(--color-primary-green-hover), var(--color-primary-green)) !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 14px 30px rgba(39, 174, 96, 0.42),
        inset 0 2px 3px rgba(255, 255, 255, 0.45) !important;
}

.btn-secondary {
    background-color: var(--color-bg-warm);
    color: var(--color-charcoal);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-border);
}

.btn:active {
    transform: translateY(1px);
}

/* App Main Layout */
main {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Map Container */
#map {
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #e5e3df; /* Leaflet placeholder bg */
}

/* Leaflet Customizations to fit Wave Theme */
.leaflet-container {
    font-family: var(--font-sans) !important;
}

.leaflet-bar {
    border: none !important;
    box-shadow: var(--shadow-medium) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.leaflet-bar a {
    background-color: var(--color-card-white) !important;
    color: var(--color-charcoal) !important;
    border-bottom: 1px solid var(--color-border) !important;
    transition: var(--transition-smooth);
}

.leaflet-bar a:hover {
    background-color: var(--color-bg-warm) !important;
    color: var(--color-primary-red) !important;
}

/* Elegant Pulsing Rider Pins */
.rider-pin {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--color-green-soft);
    border: 3px solid var(--color-card-white);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rider-pin::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--color-green-soft);
    opacity: 0.4;
    animation: pulse-pin 2s infinite ease-out;
    z-index: -1;
}

.rider-pin-active {
    background-color: var(--color-primary-red);
    border-color: var(--color-card-white);
    box-shadow: 0 4px 15px rgba(232, 92, 74, 0.5);
    transform: scale(1.15);
    z-index: 1000 !important;
}

.rider-pin-active::after {
    background-color: var(--color-primary-red);
}

@keyframes pulse-pin {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* City Switcher Overlay */
.city-switcher {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 100px;
    padding: 4px;
    display: flex;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(54, 42, 33, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);
    z-index: 500;
}

.city-btn {
    border: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    background: transparent;
    color: var(--color-charcoal-light);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.city-btn.active {
    background-color: var(--color-primary-red-light);
    color: var(--color-primary-red);
}

.city-btn:hover:not(.active) {
    color: var(--color-charcoal);
    background-color: var(--color-bg-warm);
}

/* Floating Info Panel - Map Stats */
.map-info-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 100px;
    box-shadow: 0 8px 32px rgba(54, 42, 33, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-green-soft);
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* Bottom Sheet / Rider details drawer */
.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.65);
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    border-right: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -15px 40px rgba(54, 42, 33, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    z-index: 600;
    transform: translateY(105%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.bottom-sheet.open {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin: 12px auto;
}

.sheet-content {
    padding: 0 24px 28px 24px;
}

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

.rider-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rider-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--color-primary-yellow-light);
    color: var(--color-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 1px solid rgba(246, 205, 86, 0.3);
}

.rider-identity h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-charcoal);
}

.rider-vehicle {
    font-size: 0.85rem;
    color: var(--color-charcoal-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rider-status {
    background-color: var(--color-green-light);
    color: var(--color-green-soft);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sheet-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.info-item {
    background: var(--color-bg-warm);
    border-radius: 16px;
    padding: 12px;
    border: 1px solid var(--color-border);
}

.info-label {
    font-size: 0.75rem;
    color: var(--color-charcoal-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.phone-masked {
    letter-spacing: 2px;
    color: var(--color-charcoal-light);
}

.sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-unlock {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border-radius: 16px;
    background-color: var(--color-primary-red);
    color: var(--color-card-white);
    border: none;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(232, 92, 74, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

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

.btn-call {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border-radius: 16px;
    background-color: var(--color-green-soft);
    color: var(--color-card-white);
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-call:hover {
    background-color: #219653;
}

.btn-close-sheet {
    position: absolute;
    top: 16px;
    right: 20px;
    background: var(--color-bg-warm);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-charcoal-light);
    transition: var(--transition-smooth);
}

.btn-close-sheet:hover {
    background: var(--color-border);
    color: var(--color-charcoal);
}

/* Modal Payment Flow & Driver Drawer Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-overlay);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 16px;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.payment-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 400px;
    border-radius: 28px;
    box-shadow: 
        0 24px 50px rgba(54, 42, 33, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.95);
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .payment-card {
    transform: translateY(0);
}

.payment-header {
    background: var(--color-bg-warm);
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-header h3 {
    font-weight: 700;
    font-size: 1.1rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-charcoal-light);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-body {
    padding: 24px;
}

.payment-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--color-primary-yellow-light);
    border: 1px solid rgba(246, 205, 86, 0.3);
    border-radius: 16px;
    margin-bottom: 20px;
}

.payment-title {
    font-size: 0.85rem;
    color: var(--color-charcoal-light);
}

.payment-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-charcoal);
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.method-option {
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.method-option.selected {
    border-color: var(--color-primary-red);
    background-color: var(--color-primary-red-light);
}

.method-logo {
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
}

.method-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-charcoal-light);
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    color: var(--color-charcoal-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-charcoal);
    outline: none;
    transition: var(--transition-smooth);
    background-color: var(--color-bg-warm);
}

.form-input-prefix {
    padding-left: 60px;
}

.form-input:focus {
    border-color: var(--color-primary-red);
    background-color: var(--color-card-white);
    box-shadow: 0 0 0 4px rgba(232, 92, 74, 0.1);
}

.payment-disclaimer {
    font-size: 0.75rem;
    color: var(--color-charcoal-muted);
    text-align: center;
    margin-top: 16px;
    line-height: 1.4;
}

/* Simulated USSD Push UI */
.ussd-simulation {
    display: none;
    text-align: center;
    padding: 10px 0;
}

.phone-mockup {
    background: #111;
    border-radius: 36px;
    padding: 16px;
    width: 250px;
    margin: 0 auto 20px auto;
    border: 4px solid #333;
    box-shadow: var(--shadow-medium);
}

.phone-screen {
    background: #000;
    border-radius: 24px;
    padding: 20px 16px;
    color: white;
    font-family: monospace;
    font-size: 0.85rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    border: 1px solid #222;
}

.ussd-title {
    color: #4AF626;
    margin-bottom: 12px;
    font-weight: bold;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.ussd-msg {
    line-height: 1.4;
    margin-bottom: 15px;
    color: #eee;
    font-size: 0.8rem;
}

.ussd-input {
    background: #222;
    border: 1px solid #444;
    color: white;
    padding: 8px;
    width: 100%;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 4px;
}

.ussd-buttons {
    display: flex;
    gap: 8px;
}

.ussd-btn {
    flex: 1;
    background: #333;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.75rem;
    cursor: pointer;
}

.ussd-btn-confirm {
    background: #E85C4A;
}

.loader-ussd {
    width: 24px;
    height: 24px;
    border: 3px solid #333;
    border-top: 3px solid var(--color-primary-red);
    border-radius: 50%;
    margin: 20px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Card UI */
.success-checkout {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.success-icon-anim {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--color-green-light);
    color: var(--color-green-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px auto;
    animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Driver Registration Full Screen Drawer */
.driver-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.85);
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1500;
    transform: translateX(105%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -15px 0 45px rgba(54, 42, 33, 0.12), inset 1px 0 2px rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.driver-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-bg-warm);
}

.drawer-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-close-drawer {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-charcoal-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.form-subtitle {
    font-size: 0.9rem;
    color: var(--color-charcoal-light);
    margin-bottom: 24px;
}

/* Map Picker styles */
.map-picker-container {
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: var(--color-bg-warm);
}

.map-picker-header {
    padding: 10px 14px;
    background: var(--color-border);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-charcoal-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#map-picker {
    width: 100%;
    height: 180px;
    z-index: 10;
}

.gps-hint {
    background-color: var(--color-primary-yellow-light);
    border: 1px solid rgba(246, 205, 86, 0.3);
    padding: 8px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
    margin-top: 8px;
    color: #8A6D1C;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Geolocation Status Card Styles */
.geo-status-card {
    background-color: var(--color-primary-brown-light);
    border: 1.5px dashed var(--color-primary-brown);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}

.geo-status-card:hover {
    background-color: rgba(141, 85, 55, 0.08);
}

.geo-status-card.success-style {
    background-color: var(--color-primary-green-light);
    border-color: var(--color-primary-green);
    border-style: solid;
}

.geo-status-card.error-style {
    background-color: var(--color-primary-red-light);
    border-color: var(--color-primary-red);
    border-style: solid;
}

.geo-status-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.geo-status-details {
    flex: 1;
}

.geo-status-details h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--color-charcoal);
}

.geo-status-details p {
    font-size: 0.75rem;
    margin: 0;
    color: var(--color-charcoal-light);
    line-height: 1.4;
}

/* Spinner during Geolocation active fetch */
.geo-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.geo-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary-red);
    border-radius: 50%;
    animation: geo-spin 0.8s linear infinite;
}

@keyframes geo-spin {
    to { transform: rotate(360deg); }
}

.geo-status-card.success-style .geo-spinner {
    border-top-color: var(--color-primary-green);
}

/* File Upload Styles */
.file-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.file-upload-grid .upload-box:last-child {
    grid-column: span 2;
}

.upload-box {
    border: 2px dashed var(--color-border);
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background-color: var(--color-bg-warm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    min-height: 140px;
}

.upload-box:hover {
    border-color: var(--color-primary-red);
    background-color: var(--color-primary-red-light);
}

.upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 1.5rem;
    color: var(--color-charcoal-muted);
}

.upload-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-charcoal-light);
}

.upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
    display: none;
    z-index: 5;
}

.upload-box.has-file .upload-preview {
    display: block;
}

.upload-box.has-file .upload-icon,
.upload-box.has-file .upload-text {
    display: none;
}

.upload-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(44, 38, 35, 0.8);
    border-radius: 50%;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    z-index: 10;
    border: none;
}

.upload-box.has-file .upload-remove {
    display: flex;
}

/* Radio Choice button group for vehicle types */
.vehicle-selector {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.vehicle-option {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    background-color: var(--color-bg-warm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.vehicle-option.selected {
    border-color: var(--color-primary-red);
    background-color: var(--color-primary-red-light);
    color: var(--color-primary-red);
}

.vehicle-option input {
    display: none;
}

.vehicle-icon {
    font-size: 1.25rem;
}

.vehicle-label {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Success registration card */
.registration-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.registration-success h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-charcoal);
}

.registration-success p {
    font-size: 0.95rem;
    color: var(--color-charcoal-light);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Minimalist Footer */
footer {
    background-color: var(--color-card-white);
    border-top: 1px solid var(--color-border);
    padding: 16px 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-charcoal-muted);
    z-index: 500;
    flex-shrink: 0;
}

.footer-contacts {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 8px;
}

.footer-link {
    color: var(--color-charcoal-light);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: var(--color-primary-red);
}

/* Welcome Portal View */
.welcome-portal {
    width: 100%;
    height: 100%;
    /* Rich radial gradient of African terracotta clay & deep soil browns with spotlight effect + Delivery Doodle watermarks */
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 120 120'%3E%3Cg stroke='%23FAF5F0' stroke-width='1.2' stroke-opacity='0.05' fill='none'%3E%3Ccircle cx='20' cy='35' r='4'/%3E%3Ccircle cx='40' cy='35' r='4'/%3E%3Cpath d='M 20 35 L 30 35 L 32 25 L 40 35 M 32 25 L 26 22 L 26 18 M 32 25 L 35 15 L 38 15 M 22 28 L 22 24 H 14 V 28 H 22'/%3E%3Crect x='75' y='15' width='16' height='14' rx='1'/%3E%3Cline x1='83' y1='15' x2='83' y2='29'/%3E%3Cline x1='75' y1='22' x2='91' y2='22'/%3E%3Cpath d='M 80 12 L 83 15 L 86 12'/%3E%3Cpath d='M 25 70 C 20 70, 17 74, 17 78 C 17 84, 25 90, 25 90 C 25 90, 33 84, 33 78 C 33 74, 30 70, 25 70 Z'/%3E%3Ccircle cx='25' cy='77' r='2.5'/%3E%3Ccircle cx='75' cy='85' r='3.5'/%3E%3Ccircle cx='91' cy='85' r='3.5'/%3E%3Cpath d='M 75 85 L 83 85 L 87 75 L 91 85 M 83 85 L 80 75 H 72 V 68 M 80 72 L 86 65 H 90'/%3E%3Ccircle cx='86' cy='62' r='2'/%3E%3C/g%3E%3Cg fill='%23FAF5F0' fill-opacity='0.05'%3E%3Ccircle cx='55' cy='50' r='1.5'/%3E%3Ccircle cx='105' cy='100' r='1.5'/%3E%3Ccircle cx='15' cy='110' r='1'/%3E%3Ccircle cx='110' cy='40' r='1'/%3E%3Ccircle cx='50' cy='105' r='1'/%3E%3C/g%3E%3C/svg%3E"), 
        radial-gradient(circle at center, #8D5537 0%, var(--color-primary-brown-dark) 65%, #3D2619 100%);
    background-repeat: repeat, no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    z-index: 1000;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden; /* Prevent scrolling inside portal overlay */
    transition: var(--transition-smooth);
}

.welcome-portal.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05); /* Modern scale-out transition */
}

.portal-card-container {
    width: 100%;
    max-width: 480px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px; /* Reduced gap to pull elements and search button higher */
    padding: 28px 24px; /* Slightly more compact padding */
    background: rgba(255, 255, 255, 0.75); /* High-end clay glass reflection */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    box-shadow: 
        0 20px 40px rgba(54, 42, 33, 0.12),
        0 4px 12px rgba(54, 42, 33, 0.04),
        inset 0 1px 2px rgba(255, 255, 255, 0.9); /* Inset white glow for premium rim highlight */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: portalFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-align: center;
}

@keyframes portalFadeIn {
    from { opacity: 0; transform: translateY(15px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.portal-hero {
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
}

.portal-hero p {
    font-size: 0.92rem;
    color: var(--color-charcoal-light); /* Charcoal gray color for readability over light glass */
    line-height: 1.45;
    max-width: 460px;
    margin: 0 auto; /* Removed bottom margin to lift the search container */
}

.portal-logo-glow {
    width: 76px;
    height: 76px;
    background: var(--color-primary-red-light);
    color: var(--color-primary-red);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 30px rgba(232, 92, 74, 0.08);
}

.portal-hero h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-charcoal); /* Premium high-contrast charcoal clay brown */
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.35;
}

/* Burkina Faso CSS Flag Badge Styling */
.burkina-flag-badge {
    position: relative;
    width: 70px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    margin: 0 auto 24px auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.burkina-map-badge {
    display: block;
    width: 76px;
    height: auto;
    margin: 0 auto 16px auto;
    filter: drop-shadow(0 6px 12px rgba(54, 42, 33, 0.16));
    transition: var(--transition-smooth);
}

.burkina-map-badge:hover {
    transform: scale(1.06) rotate(1deg);
}

.flag-half {
    width: 100%;
    height: 50%;
}

.flag-red {
    background-color: #E85C4A; /* Burkina flag red */
}

.flag-green {
    background-color: #27AE60; /* Burkina flag green */
}

.flag-star {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #F6CD56; /* Burkina flag golden star */
    font-size: 1.4rem;
    z-index: 10;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* Card Container for Single search action button */
.portal-options-single {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Big Magnifying Glass Search Button */
.portal-search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.btn-portal-search-magnifier {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E85C4A, #F77D6D); /* Precise gradient from screenshot */
    color: white;
    border: 6px solid #FFFFFF; /* High-contrast white border */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.35), /* Inner glow reflection */
        0 12px 28px rgba(232, 92, 74, 0.35), /* Deep warm button drop shadow */
        0 0 0 0px rgba(232, 92, 74, 0.25);
    cursor: pointer;
    transition: var(--transition-smooth);
    animation: searchPulse 2s infinite;
}

.btn-portal-search-magnifier svg {
    transition: var(--transition-smooth);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.portal-search-container:hover .btn-portal-search-magnifier {
    transform: scale(1.06) rotate(5deg);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        0 16px 36px rgba(232, 92, 74, 0.45),
        0 0 0 4px rgba(232, 92, 74, 0.15);
}

.portal-search-container:active .btn-portal-search-magnifier {
    transform: scale(0.96);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 6px 16px rgba(232, 92, 74, 0.3);
}

.portal-search-caption {
    color: var(--color-charcoal-light);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition-smooth);
}

.portal-search-container:hover .portal-search-caption {
    color: var(--color-primary-red);
}

@keyframes searchPulse {
    0% {
        box-shadow: 
            inset 0 2px 4px rgba(255, 255, 255, 0.35),
            0 12px 28px rgba(232, 92, 74, 0.35),
            0 0 0 0px rgba(232, 92, 74, 0.3);
    }
    70% {
        box-shadow: 
            inset 0 2px 4px rgba(255, 255, 255, 0.35),
            0 12px 28px rgba(232, 92, 74, 0.2),
            0 0 0 18px rgba(232, 92, 74, 0);
    }
    100% {
        box-shadow: 
            inset 0 2px 4px rgba(255, 255, 255, 0.35),
            0 12px 28px rgba(232, 92, 74, 0.35),
            0 0 0 0px rgba(232, 92, 74, 0);
    }
}

/* Clickable Rating row in Bottom Sheet */
.sheet-rider-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: 5px;
    padding: 2px 0;
    width: fit-content;
    transition: var(--transition-smooth);
}

.sheet-rider-rating:hover {
    opacity: 0.85;
    transform: translateX(2px);
}

.rating-stars {
    color: var(--color-primary-yellow);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.rating-val {
    color: var(--color-charcoal-light);
    font-weight: 700;
}

.reviews-count {
    color: var(--color-charcoal-muted);
    text-decoration: underline;
    font-size: 0.7rem;
}

/* Reviews Modal Explored Card Styles */
.review-entry-card {
    background-color: var(--color-primary-brown-light);
    border: 1px solid rgba(141, 85, 55, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(54, 42, 33, 0.02);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition-smooth);
}

.review-entry-card:hover {
    background-color: white;
    border-color: var(--color-border);
    box-shadow: 0 4px 12px rgba(54, 42, 33, 0.05);
}



/* pulsing blue beacon for client position on main map */
.client-location-beacon-container {
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-beacon-core {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #2D9CDB; /* Sleek wave blue */
    border: 2px solid white;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.client-beacon-pulse {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(45, 156, 219, 0.4);
    animation: beaconPulse 1.8s infinite ease-out;
    z-index: 5;
}

@keyframes beaconPulse {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

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

/* Mobile Header Fluid Optimization (avoids wrapping / overlaps) */
@media (max-width: 480px) {
    header {
        padding: 8px 12px;
        height: 56px;
    }
    .logo-container {
        gap: 6px;
    }
    .logo-icon {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }
    .logo-icon svg {
        width: 16px;
        height: 16px;
    }
    .logo-text {
        font-size: 0.95rem;
    }
    .nav-buttons {
        gap: 6px;
    }
    .btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    .city-switcher {
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 90%;
        box-shadow: 0 4px 16px rgba(54, 42, 33, 0.06);
    }
    .map-info-badge {
        top: 68px; /* Stacked below the city-switcher to completely prevent overlap on mobile */
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        padding: 6px 12px;
        font-size: 0.78rem;
        box-shadow: 0 4px 16px rgba(54, 42, 33, 0.06);
    }
}

@media (max-width: 375px) {
    .logo-text {
        font-size: 0.82rem; /* Scale down font size to ensure 'Livraison Rapide' fits completely without wrapping */
    }
    .logo-container {
        gap: 4px;
    }
}

/* Responsive Overrides (For Desktops & Tablets) */
@media (min-width: 768px) {
    header {
        padding: 12px 40px;
    }
    
    .city-switcher {
        top: 24px;
    }
    
    .map-info-badge {
        top: 24px;
        right: 24px;
    }

    .bottom-sheet {
        bottom: 24px;
        left: 24px;
        border: 1px solid rgba(255, 255, 255, 0.6) !important;
        border-radius: 24px;
        width: 380px;
        margin: 0;
        box-shadow: var(--shadow-medium);
        transform: translateY(120%);
    }
    
    .bottom-sheet.open {
        transform: translateY(0);
    }
    
    .sheet-handle {
        display: none;
    }
    
    .sheet-content {
        padding: 24px;
    }
    
    .btn-close-sheet {
        top: 12px;
        right: 12px;
    }
    
    .driver-drawer {
        border-radius: 20px 0 0 20px;
    }
}

/* ==========================================================================
   LIVE CHAT & ADMIN MONITORING DASHBOARD COMPONENT STYLES
   ========================================================================== */

/* Unlocked actions layout in Bottom Sheet */
.sheet-unlocked-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}

.btn-chat {
    transition: var(--transition-smooth) !important;
}

.btn-chat:hover {
    background-color: var(--color-primary-brown-hover) !important;
    transform: translateY(-1px);
}

.btn-chat:active {
    transform: translateY(1px);
}

/* Live Chat Drawer Panel */
.chat-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.85);
    border-left: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1600;
    transform: translateX(105%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -15px 0 45px rgba(54, 42, 33, 0.12), inset 1px 0 2px rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-drawer.open {
    transform: translateX(0);
}

.chat-header-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-primary-yellow-light);
    color: var(--color-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid rgba(246, 205, 86, 0.3);
}

.chat-header-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: var(--color-green-soft);
    font-weight: 600;
}

.chat-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-green-soft);
    display: inline-block;
    animation: pulse-dot 1.5s infinite;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat Message Bubbles */
.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    animation: bubbleFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.message-system {
    align-self: center;
    max-width: 90%;
    background-color: rgba(54, 42, 33, 0.05);
    color: var(--color-charcoal-light);
    font-size: 0.75rem;
    border-radius: 100px;
    padding: 6px 16px;
    text-align: center;
    font-style: italic;
    border: 1px solid var(--color-border);
}

.chat-message.sent {
    align-self: flex-end;
    background-color: var(--color-primary-red);
    color: var(--color-card-white);
    border-radius: 18px 18px 0 18px;
    box-shadow: 0 4px 12px rgba(232, 92, 74, 0.15);
}

.chat-message.received {
    align-self: flex-start;
    background-color: var(--color-card-white);
    color: var(--color-charcoal);
    border-radius: 18px 18px 18px 0;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
}

.message-time {
    display: block;
    font-size: 0.65rem;
    margin-top: 4px;
    text-align: right;
    opacity: 0.7;
}

.chat-message.sent .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.chat-message.received .message-time {
    color: var(--color-charcoal-muted);
}

/* Typing Indicator Styling */
.chat-typing-indicator {
    padding: 8px 24px;
    font-size: 0.75rem;
    color: var(--color-charcoal-light);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
}

.typing-dots {
    animation: blink-dots 1.5s infinite;
}

@keyframes blink-dots {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}

/* Chat Input Footer Area */
.chat-footer {
    padding: 16px 20px;
    background-color: var(--color-card-white);
    border-top: 1px solid var(--color-border);
}

#chat-send-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

#chat-input {
    flex: 1;
    border: 1px solid var(--color-border);
    padding: 12px 16px;
    border-radius: 100px;
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    background-color: var(--color-bg-warm);
    transition: var(--transition-smooth);
    color: var(--color-charcoal);
}

#chat-input:focus {
    border-color: var(--color-primary-brown);
    background-color: white;
}

#btn-send-message {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: var(--color-primary-red);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(232, 92, 74, 0.2);
}

#btn-send-message:hover {
    background-color: var(--color-primary-red-hover);
    transform: scale(1.05);
}

#btn-send-message:active {
    transform: scale(0.95);
}

/* Floating Admin Dashboard Button */
.btn-admin-floating {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1400;
    background-color: var(--color-charcoal);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-admin-floating:hover {
    background-color: var(--color-primary-brown-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hard);
}

.admin-notification-badge {
    background-color: var(--color-primary-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Admin Dashboard Card */
.admin-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 900px;
    border-radius: 28px;
    box-shadow: 
        0 24px 50px rgba(54, 42, 33, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.95);
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .admin-card {
    transform: translateY(0);
}

.admin-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 80vh;
    overflow-y: auto;
}

.admin-subtitle {
    font-size: 0.85rem;
    color: var(--color-charcoal-light);
    line-height: 1.5;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1.5px solid var(--color-border);
    padding-bottom: 8px;
}

.admin-tab {
    background: transparent;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-charcoal-muted);
    padding: 6px 12px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.admin-tab.active {
    color: var(--color-primary-brown);
}

.admin-tab.active::after {
    content: '';
    position: absolute;
    bottom: -9.5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary-brown);
}

.chat-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 220px;
}

.no-session-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-charcoal-muted);
    font-size: 0.85rem;
    font-style: italic;
    border: 1.5px dashed var(--color-border);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    flex: 1;
}

/* Chat Session Admin Row Item */
.session-item-row {
    background-color: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.session-item-row:hover {
    background-color: white;
    border-color: var(--color-primary-brown);
    transform: translateX(3px);
}

.session-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.session-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--color-primary-brown-light);
    color: var(--color-primary-brown);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.session-driver-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-charcoal);
}

.session-last-msg {
    font-size: 0.75rem;
    color: var(--color-charcoal-light);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-badge-count {
    background-color: var(--color-primary-red);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 100px;
}

/* Conversation Inspector inside Admin Modal */
.admin-conversation-inspector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: paneFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes paneFadeIn {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

.inspector-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
}

.btn-inspector-back {
    background-color: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    padding: 4px 10px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-charcoal);
    transition: var(--transition-smooth);
}

.btn-inspector-back:hover {
    background-color: var(--color-border);
}

.inspector-messages {
    background-color: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Admin Platform Statistics */
.admin-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    background-color: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--color-charcoal-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-charcoal);
    margin-bottom: 4px;
}

.stat-desc {
    font-size: 0.65rem;
    color: var(--color-charcoal-light);
}

@media (max-width: 768px) {
    .chat-drawer {
        max-width: 100%;
    }
    .btn-admin-floating {
        bottom: 16px;
        left: 16px;
    }
}

/* ==========================================================================
   LOCATION SELECTION PORTAL (VILLES & QUARTIERS)
   ========================================================================== */
.location-portal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-overlay);
    backdrop-filter: blur(8px);
    z-index: 3000; /* Higher than modal to prevent stack issues */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px;
}

.location-portal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.location-portal-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 410px; /* Reduced by 15% from 480px for a more compact and mobile-friendly fit */
    border-radius: 28px;
    box-shadow: 
        0 24px 50px rgba(54, 42, 33, 0.12),
        inset 0 1px 2px rgba(255, 255, 255, 0.95);
    overflow-y: auto; /* Enable scroll if viewport is extremely small on mobile (Bobo-Dioulasso choice stays 100% accessible) */
    position: relative;
    padding: 26px 22px; /* Adjusted padding to look perfect with smaller width */
    transform: translateY(30px) scale(0.98);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.location-portal-overlay.open .location-portal-card {
    transform: translateY(0) scale(1);
}

.loc-header {
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loc-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin-top: 10px;
    margin-bottom: 6px;
}

.loc-header p {
    font-size: 0.9rem;
    color: var(--color-charcoal-light);
    line-height: 1.4;
}

/* Étape 1 : Grid des Villes */
.loc-city-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}

.loc-city-card {
    background: var(--color-bg-warm);
    border: 2px solid var(--color-border);
    border-radius: 20px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.loc-city-card:hover {
    border-color: var(--color-primary-red);
    background-color: var(--color-primary-red-light);
    transform: translateY(-2px);
}

.city-card-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 10px rgba(54, 42, 33, 0.08));
    transition: var(--transition-smooth);
}

.loc-city-card:hover .city-card-img {
    transform: scale(1.08) rotate(2deg);
}

.loc-city-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-charcoal);
}

.city-desc {
    font-size: 0.75rem;
    color: var(--color-charcoal-muted);
    font-weight: 600;
}

/* Étape 2 : Mode d'accès (Carte vs Secteurs) */
.loc-options-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.loc-option-btn-card {
    background: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
}

.loc-option-btn-card:hover {
    border-color: var(--color-primary-brown);
    background-color: var(--color-primary-brown-light);
    transform: translateY(-1px);
}

.loc-option-icon {
    font-size: 1.8rem;
    background: var(--color-card-white);
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
}

.loc-option-btn-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin-bottom: 2px;
}

.loc-option-btn-card p {
    font-size: 0.8rem;
    color: var(--color-charcoal-light);
    line-height: 1.3;
}

/* Étape 3 : Liste des Quartiers/Secteurs */
.sectors-search-wrapper {
    margin-bottom: 16px;
}

.sectors-search-wrapper input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-charcoal);
    background-color: var(--color-bg-warm);
    outline: none;
    transition: var(--transition-smooth);
}

.sectors-search-wrapper input:focus {
    border-color: var(--color-primary-red);
    background-color: var(--color-card-white);
    box-shadow: 0 0 0 4px rgba(232, 92, 74, 0.1);
}

.loc-sectors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 20px;
}

.sector-chip {
    background: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-charcoal);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sector-chip:hover {
    border-color: var(--color-primary-red);
    background-color: var(--color-primary-red-light);
    color: var(--color-primary-red);
    transform: translateY(-1px);
}

/* Boutons retour */
.btn-loc-back {
    position: absolute;
    bottom: 12px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent !important;
    border: none !important;
    font-family: var(--font-sans);
    font-size: 1.4rem !important; /* Elegant bold black arrow size */
    font-weight: 800 !important;
    color: var(--color-charcoal) !important;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: 50%;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 100;
}

.btn-loc-back:hover {
    color: var(--color-primary-red) !important; /* Warm red hover highlight */
    transform: scale(1.15) translateX(-2px);
    background: rgba(0, 0, 0, 0.05) !important;
}

.btn-loc-back:active {
    transform: scale(0.95);
}

/* Floating Home Button on Map */
.map-home-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-card-white);
    color: var(--color-primary-brown);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 500;
    transition: var(--transition-smooth);
}

.map-home-btn:hover {
    color: var(--color-primary-brown-hover);
    transform: scale(1.08) rotate(-10deg);
    box-shadow: 0 8px 24px rgba(141, 85, 55, 0.2);
}

.map-home-btn:active {
    transform: scale(0.95);
}

/* Offset Leaflet zoom controls to prevent overlap with floating home button */
.leaflet-top.leaflet-left {
    top: 70px !important;
}

/* Toast indicateur de quartier actif */
.sector-active-toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: var(--color-charcoal);
    color: white;
    padding: 10px 18px;
    border-radius: 100px;
    box-shadow: var(--shadow-hard);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1100;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 90%;
    white-space: nowrap;
}

.sector-active-toast.show {
    transform: translateX(-50%) translateY(0);
}

.sector-toast-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.sector-toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    padding: 2px;
}

.sector-toast-close:hover {
    color: white;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .location-portal-card {
        padding: 20px 16px;
    }
    .loc-city-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .loc-sectors-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Premium Map Blur effect before payment */
.map-blurred {
    filter: blur(5px) grayscale(15%);
    transition: filter 0.4s ease;
}

/* Driver Onboarding Weekly Subscription Information Badge */
.driver-info-badge {
    background-color: var(--color-primary-yellow-light);
    border: 1px solid rgba(246, 205, 86, 0.3);
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 0.8rem;
    color: var(--color-charcoal-light);
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    line-height: 1.5;
    text-align: left;
    align-items: flex-start;
    box-shadow: 0 4px 12px rgba(54, 42, 33, 0.02);
}

.info-badge-icon {
    font-size: 1.25rem;
    line-height: 1;
}

/* Drivers & Subscriptions Administration Styles */
.admin-drivers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 10px;
}

.driver-admin-card {
    background: var(--color-card-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.driver-admin-card:hover {
    transform: translateY(-1px);
    border-color: var(--color-primary-brown);
    box-shadow: var(--shadow-medium);
}

.driver-admin-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.driver-admin-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--color-primary-yellow-light);
    color: var(--color-charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    border: 1px solid rgba(246, 205, 86, 0.3);
    flex-shrink: 0;
}

.driver-admin-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-charcoal);
    display: flex;
    align-items: center;
}

.driver-city-lbl {
    font-size: 0.65rem;
    background-color: var(--color-primary-brown-dark);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 600;
}

.driver-admin-details {
    font-size: 0.78rem;
    color: var(--color-charcoal-light);
    margin-top: 2px;
}

.driver-admin-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.driver-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    text-align: center;
    white-space: nowrap;
}

.badge-free {
    background-color: var(--color-primary-yellow-light);
    color: var(--color-primary-brown);
    border: 1px solid rgba(246, 205, 86, 0.2);
}

.badge-active {
    background-color: var(--color-green-light);
    color: var(--color-green-soft);
    border: 1px solid rgba(39, 174, 96, 0.1);
}

.badge-suspended {
    background-color: var(--color-primary-red-light);
    color: var(--color-primary-red);
    border: 1px solid rgba(232, 92, 74, 0.1);
}

.btn-pay-sub {
    border: none;
    background-color: var(--color-primary-red);
    color: white;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 6px rgba(232, 92, 74, 0.15);
}

.btn-pay-sub:hover {
    background-color: var(--color-primary-red-hover);
    transform: scale(1.03);
}

.btn-pay-sub:active {
    transform: scale(0.97);
}

/* Premium Blur Details style */
.blur-detail {
    filter: blur(5px) grayscale(20%);
    pointer-events: none;
    user-select: none;
    opacity: 0.85;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* Espace Livreur dashboard & panel styles */
.driver-login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--color-charcoal-light);
}

.driver-login-link a {
    color: var(--color-primary-red);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.driver-login-link a:hover {
    text-decoration: underline;
}

.driver-dashboard-welcome {
    margin-bottom: 20px;
    background: var(--color-primary-brown-light);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
}

.driver-dashboard-welcome h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary-brown-dark);
}

.driver-dashboard-welcome p {
    font-size: 0.85rem;
    color: var(--color-charcoal-light);
    margin-top: 2px;
}

.driver-status-card {
    background-color: var(--color-card-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

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

.driver-status-row:last-child {
    margin-bottom: 0;
}

.driver-dashboard-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.driver-stat-box {
    background: var(--color-bg-warm);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
}

.driver-stat-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-charcoal);
    margin-top: 4px;
}

/* Premium terms card in Drawer */
.driver-terms-info {
    background-color: var(--color-primary-yellow-light);
    border: 1px solid rgba(246, 205, 86, 0.3);
    border-radius: 16px;
    padding: 16px;
    margin: 20px 0;
    text-align: left;
}

.driver-terms-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-primary-brown-dark);
    margin-bottom: 8px;
}

.driver-terms-info ul {
    list-style-type: none;
    padding-left: 0;
}

.driver-terms-info li {
    font-size: 0.82rem;
    color: var(--color-charcoal-light);
    margin-bottom: 8px;
    position: relative;
    padding-left: 14px;
    line-height: 1.4;
}

.driver-terms-info li:last-child {
    margin-bottom: 0;
}

.driver-terms-info li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary-red);
    font-weight: bold;
}

/* Unified Auth Modal tab selectors */
.auth-tabs {
    display: flex;
    background: var(--color-bg-warm);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-sans);
    color: var(--color-charcoal-light);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.auth-tab.active {
    background: var(--color-card-white);
    color: var(--color-primary-red);
    box-shadow: var(--shadow-soft);
}

/* Admin Dashboard Tables & Lists styling */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--color-card-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.8rem;
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

.admin-table th {
    background-color: var(--color-bg-warm);
    font-weight: 700;
    color: var(--color-charcoal-light);
    white-space: nowrap;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background-color: var(--color-primary-brown-light);
}

.badge-status {
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-block;
    white-space: nowrap;
}

.badge-status.active {
    background-color: var(--color-green-light);
    color: var(--color-green-soft);
}

.badge-status.pending {
    background-color: var(--color-primary-yellow-light);
    color: var(--color-primary-brown);
}

.badge-status.suspended {
    background-color: var(--color-primary-red-light);
    color: var(--color-primary-red);
}

.btn-table-action {
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    margin-right: 4px;
    transition: var(--transition-smooth);
    display: inline-block;
}

.btn-table-action.validate {
    background-color: var(--color-green-light);
    color: var(--color-green-soft);
}

.btn-table-action.suspend {
    background-color: var(--color-primary-yellow-light);
    color: var(--color-primary-brown);
}

.btn-table-action.delete {
    background-color: var(--color-primary-red-light);
    color: var(--color-primary-red);
}

.btn-table-action:hover {
    transform: scale(1.06);
}

/* Visiteurs SVG chart & trend graph */
.stat-chart-container {
    background: var(--color-card-white);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}

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

.chart-legend {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-green-soft);
    background-color: var(--color-green-light);
    padding: 4px 10px;
    border-radius: 100px;
}

.chart-svg-wrapper {
    position: relative;
    width: 100%;
}

.evolution-chart {
    width: 100%;
    height: 140px;
    display: block;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 8px;
}

.chart-labels span {
    font-size: 0.65rem;
    color: var(--color-charcoal-muted);
    font-weight: 700;
}

/* Floating Locate Button on Map */
.map-locate-btn {
    position: absolute;
    bottom: 24px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-card-white);
    color: var(--color-primary-green);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 500;
    transition: var(--transition-smooth);
}

.map-locate-btn:hover {
    color: var(--color-primary-green-hover);
    transform: scale(1.08) rotate(15deg);
    box-shadow: 0 8px 24px rgba(39, 174, 96, 0.2);
}

.map-locate-btn:active {
    transform: scale(0.95);
}

/* Adjust map locate button position for mobile when sheet is open */
@media (max-width: 768px) {
    .map-locate-btn {
        bottom: 80px; /* Offset so it floats above the sheet/nav area nicely */
        right: 12px;
    }
}

/* GPS Auto-Detect Step 1 card style */
.gps-auto-detect-container {
    margin-bottom: 20px;
    width: 100%;
}

#btn-gps-auto-detect {
    background: #27AE60 !important; /* Pure Burkina flag green */
    border: 1.5px solid rgba(255, 255, 255, 0.45) !important; /* Premium gloss glass border reflection */
    color: var(--color-card-white) !important;
    border-radius: 14px !important; /* Slightly smaller border radius */
    padding: 10px 18px !important; /* Slightly smaller button height/padding as requested */
    font-size: 0.85rem !important; /* Slightly smaller font size */
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    box-shadow: 
        0 8px 24px rgba(39, 174, 96, 0.35), /* Highly vibrant green glow */
        inset 0 2px 4px rgba(255, 255, 255, 0.35) !important; /* Inner white light gloss reflection */
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#btn-gps-auto-detect:hover {
    background: #219653 !important; /* Vibrant flag green hover */
    transform: translateY(-1.5px);
    box-shadow: 
        0 12px 28px rgba(39, 174, 96, 0.45),
        inset 0 3px 6px rgba(255, 255, 255, 0.45) !important;
}

#btn-gps-auto-detect:active {
    transform: translateY(1px);
}

@keyframes pulse-radar {
    0% { transform: scale(1) rotate(0deg); opacity: 0.85; }
    50% { transform: scale(1.18) rotate(180deg); opacity: 1; }
    100% { transform: scale(1) rotate(360deg); opacity: 0.85; }
}

/* --- PASSWORD TOGGLE EYE BUTTON --- */
.btn-toggle-password {
    position: absolute;
    right: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-charcoal-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition-smooth);
    z-index: 10;
}

.btn-toggle-password:hover {
    color: var(--color-charcoal);
}

.form-input-password {
    padding-right: 48px;
}

/* --- PREMIUM LIQUID GLASSMORPHISM DESIGN SYSTEM OVERRIDES --- */

/* Glassmorphic main containers */
header {
    background: rgba(254, 250, 246, 0.68) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 4px 30px rgba(54, 42, 33, 0.02), inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

.driver-drawer, .bottom-sheet, .payment-card, .admin-card, .ussd-simulation, .chat-drawer {
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    box-shadow: 
        0 24px 70px rgba(54, 42, 33, 0.12),
        inset 0 1px 2.5px rgba(255, 255, 255, 0.95) !important;
}

/* Modals Overlay style */
.modal-overlay {
    background: rgba(54, 42, 33, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* Header areas of drawers/modals */
.drawer-header, .payment-header {
    background: rgba(250, 245, 240, 0.25) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    color: var(--color-charcoal) !important;
}

.drawer-header h2, .payment-header h3 {
    font-weight: 800 !important;
    letter-spacing: -0.4px !important;
    color: var(--color-primary-brown-dark) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Polished transparent inner cards & statistic tiles */
.driver-dashboard-welcome, .driver-status-card, .driver-stat-box, .info-item, .geo-status-card, .manual-location-selector, .driver-terms-info, .review-entry-card {
    background: rgba(255, 255, 255, 0.42) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
    box-shadow: 
        0 8px 30px rgba(54, 42, 33, 0.025),
        inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
    border-radius: 20px !important;
    transition: var(--transition-smooth) !important;
}

.driver-dashboard-welcome:hover, .driver-status-card:hover, .driver-stat-box:hover, .geo-status-card:hover, .review-entry-card:hover {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 14px 40px rgba(54, 42, 33, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.95) !important;
}

/* Highly premium inputs and buttons in liquid glass theme */
.form-input {
    background: rgba(255, 255, 255, 0.35) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: inset 0 1px 2px rgba(54, 42, 33, 0.02) !important;
    border-radius: 16px !important;
    transition: var(--transition-smooth) !important;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: var(--color-primary-red) !important;
    box-shadow: 
        0 0 0 4px rgba(232, 92, 74, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
}

/* African terracotta & savannah flag color highlights */
.btn-primary, .btn-unlock {
    background: linear-gradient(135deg, var(--color-primary-red), var(--color-primary-red-hover)) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 
        0 10px 24px rgba(232, 92, 74, 0.3),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.35) !important;
    border-radius: 16px !important;
}

.btn-primary:hover, .btn-unlock:hover {
    transform: translateY(-2px) !important;
    box-shadow: 
        0 14px 30px rgba(232, 92, 74, 0.42),
        inset 0 2px 3px rgba(255, 255, 255, 0.45) !important;
}

#btn-nav-register, #btn-gps-auto-detect, #btn-client-premium-search {
    background: linear-gradient(135deg, var(--color-primary-green), var(--color-primary-green-hover)) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 
        0 10px 24px rgba(39, 174, 96, 0.3),
        inset 0 1.5px 2px rgba(255, 255, 255, 0.35) !important;
}

#btn-nav-register:hover, #btn-gps-auto-detect:hover, #btn-client-premium-search:hover {
    transform: translateY(-2px) !important;
    box-shadow: 
        0 14px 30px rgba(39, 174, 96, 0.42),
        inset 0 2px 3px rgba(255, 255, 255, 0.45) !important;
}

/* Beautiful profile badge styling */
.badge-status.active {
    background-color: rgba(39, 174, 96, 0.12) !important;
    color: var(--color-primary-green) !important;
    border: 1px solid rgba(39, 174, 96, 0.25) !important;
}

.badge-status.suspended {
    background-color: rgba(232, 92, 74, 0.12) !important;
    color: var(--color-primary-red) !important;
    border: 1px solid rgba(232, 92, 74, 0.25) !important;
}

/* Chat bubble aesthetics */
.chat-message.sent {
    background: linear-gradient(135deg, var(--color-primary-brown), var(--color-primary-brown-hover)) !important;
    color: white !important;
    border-radius: 16px 16px 2px 16px !important;
    box-shadow: 0 4px 12px rgba(141, 85, 55, 0.15) !important;
}

.chat-message.received {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    color: var(--color-charcoal) !important;
    border-radius: 16px 16px 16px 2px !important;
    box-shadow: 0 4px 12px rgba(54, 42, 33, 0.02) !important;
}

/* Custom scrollbar hiding for clean fluid look */
.drawer-body::-webkit-scrollbar,
.loc-sectors-grid::-webkit-scrollbar,
#loc-sectors-list::-webkit-scrollbar,
#reviews-modal-list::-webkit-scrollbar,
.location-portal-card::-webkit-scrollbar,
.admin-body::-webkit-scrollbar,
.chat-body::-webkit-scrollbar,
.inspector-messages::-webkit-scrollbar {
    display: none !important;
}

.drawer-body,
.loc-sectors-grid,
#loc-sectors-list,
#reviews-modal-list,
.location-portal-card,
.admin-body,
.chat-body,
.inspector-messages {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

/* Gorgeous Glassmorphism Alert Toast System */
#custom-alert-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    width: 90%;
    max-width: 380px;
}

.custom-alert-toast {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 16px 20px !important;
    border-radius: 20px !important;
    box-shadow: 
        0 12px 36px rgba(54, 42, 33, 0.12), 
        inset 0 1px 1px rgba(255, 255, 255, 0.9) !important;
    color: var(--color-charcoal) !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    pointer-events: auto !important;
    animation: alert-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.custom-alert-toast.fade-out {
    opacity: 0 !important;
    transform: translateY(-20px) scale(0.9) !important;
}

@keyframes alert-slide-in {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Styled Se déconnecter button to be smaller and elegant */
#btn-nav-logout {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    background: rgba(232, 92, 74, 0.08) !important;
    color: var(--color-primary-red) !important;
    border: 1px solid rgba(232, 92, 74, 0.15) !important;
    box-shadow: none !important;
    transition: var(--transition-smooth) !important;
}

#btn-nav-logout:hover {
    background: rgba(232, 92, 74, 0.15) !important;
    color: var(--color-primary-red-hover) !important;
    transform: translateY(-1px) !important;
}

/* Floating Service Button on Map */
.map-service-btn {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.58) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    box-shadow: 
        0 16px 45px rgba(54, 42, 33, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.95) !important;
    color: var(--color-primary-brown-dark) !important;
    padding: 10px 22px !important;
    border-radius: 100px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    z-index: 500;
    transition: var(--transition-smooth);
    border: 1.5px solid rgba(141, 85, 55, 0.22) !important;
}

.map-service-btn svg {
    color: var(--color-primary-red) !important;
}

.map-service-btn:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    transform: translateX(-50%) translateY(-2.5px) !important;
    box-shadow: 
        0 20px 50px rgba(54, 42, 33, 0.14),
        inset 0 1px 2px rgba(255, 255, 255, 0.95) !important;
}

.map-service-btn:active {
    transform: translateX(-50%) translateY(0.5px) !important;
}

/* Offset service button on mobile viewport when sheet is closed */
@media (max-width: 768px) {
    .map-service-btn {
        bottom: 80px;
    }
}

/* Responsive Media Queries for Elegant Header Buttons */
@media (max-width: 768px) {
    header {
        padding: 8px 12px !important;
        height: 58px !important;
    }

    .logo-container {
        gap: 8px !important;
    }

    .logo-icon {
        width: 34px !important;
        height: 34px !important;
        border-radius: 8px !important;
    }

    .logo-text {
        font-size: 0.98rem !important;
    }

    .nav-buttons {
        gap: 6px !important;
    }

    .nav-buttons .btn {
        font-size: 0.78rem !important;
        padding: 6px 12px !important;
        border-radius: 12px !important;
        gap: 4px !important;
    }

    #btn-nav-logout {
        padding: 5px 10px !important;
        font-size: 0.75rem !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 480px) {
    header {
        padding: 8px 10px !important;
    }

    .logo-container {
        gap: 6px !important;
    }

    .logo-text {
        font-size: 0.9rem !important;
    }

    .nav-buttons {
        gap: 4px !important;
    }

    .nav-buttons .btn {
        font-size: 0.74rem !important;
        padding: 5px 10px !important;
        border-radius: 10px !important;
    }
}

@media (max-width: 380px) {
    .logo-container {
        gap: 4px !important;
    }
    .logo-icon {
        width: 28px !important;
        height: 28px !important;
        border-radius: 6px !important;
    }
    .logo-text {
        font-size: 0.82rem !important;
        display: block !important; /* Keep the name visible on small screens */
    }
}

/* ==========================================================================
   REFONTE VISUELLE PREMIUM & BOUTONS RETOUR UNIFIES (SAVANNAH GLASS)
   ========================================================================== */

/* Premium Header Profile Button */
#btn-nav-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 700;
    background: rgba(141, 85, 55, 0.08) !important;
    color: var(--color-primary-brown) !important;
    border: 1px solid rgba(141, 85, 55, 0.15) !important;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
}

#btn-nav-profile:hover {
    background: rgba(141, 85, 55, 0.15) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(141, 85, 55, 0.1);
}

#btn-nav-profile:active {
    transform: scale(0.97);
}

/* Unified Premium Back/Retour Buttons */
.btn-back-drawer, .btn-back-modal {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #111111 !important; /* Bold opaque black text */
    border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 800; /* Extra bold text */
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    transition: var(--transition-smooth);
    box-shadow: none !important;
}

.btn-back-drawer:hover, .btn-back-modal:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    transform: translateX(-2px);
    color: black !important;
}

.btn-back-drawer:active, .btn-back-modal:active {
    transform: scale(0.96);
}

/* Rider Dashboard Profile Card & Upgrades */
.rider-dash-profile-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.45)) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px !important;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    box-shadow: 0 12px 35px rgba(54, 42, 33, 0.06), inset 0 1px 2px rgba(255, 255, 255, 0.95);
    text-align: left;
}

.rider-dash-avatar-wrapper {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-yellow), var(--color-primary-brown)) !important;
    border: 2px solid white;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.rider-dash-avatar-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background-color: var(--color-primary-green);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.rider-dash-profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rider-dash-profile-info h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary-brown-dark);
    margin: 0;
}

.rider-dash-profile-info p {
    font-size: 0.82rem;
    color: var(--color-charcoal-light);
    margin: 0;
    font-weight: 600;
}

/* Stats in Glassmorphism */
.rider-dash-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.rider-dash-stat-card {
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 18px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(54, 42, 33, 0.03);
    transition: var(--transition-smooth);
}

.rider-dash-stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.65) !important;
    box-shadow: var(--shadow-soft);
}

.rider-dash-stat-lbl {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-charcoal-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.rider-dash-stat-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary-brown-dark);
}

.rider-dash-stat-desc {
    font-size: 0.62rem;
    color: var(--color-charcoal-light);
    margin-top: 2px;
}

/* Reviews List Speech Bubbles */
.rider-review-bubble {
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 4px 15px rgba(54, 42, 33, 0.02);
    text-align: left;
    transition: var(--transition-smooth);
}

.rider-review-bubble:hover {
    background: rgba(255, 255, 255, 0.7) !important;
    transform: translateY(-1px);
    border-color: rgba(141, 85, 55, 0.25);
}

/* Client Card upgrades */
.client-premium-badge-card {
    background: linear-gradient(135deg, var(--color-primary-brown), #A37050) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 24px !important;
    padding: 20px;
    color: white;
    text-align: left;
    box-shadow: 0 12px 35px rgba(141, 85, 55, 0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.client-premium-badge-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.client-premium-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    letter-spacing: -0.2px;
}

.client-premium-sub {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
}

/* Client History cards */
.client-history-item {
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 16px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: var(--transition-smooth);
    cursor: pointer;
    text-align: left;
}

.client-history-item:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: var(--color-primary-brown);
    transform: translateY(-1.5px);
    box-shadow: var(--shadow-soft);
}

.client-history-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: var(--color-primary-brown-light);
    color: var(--color-charcoal);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(141, 85, 55, 0.15);
}

.client-history-info {
    flex: 1;
    min-width: 0;
}

.client-history-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-history-sub {
    font-size: 0.72rem;
    color: var(--color-charcoal-light);
    margin-top: 1px;
}

.client-history-action {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary-red);
    background: rgba(232, 92, 74, 0.08);
    border: 1px solid rgba(232, 92, 74, 0.15);
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.client-history-item:hover .client-history-action {
    background: var(--color-primary-red);
    color: white;
}

/* ==========================================================================
   PROGRESSIVE WEB APP (PWA) INSTALLATION UI STYLE
   ========================================================================== */

/* PWA Installation Floating Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 460px;
    z-index: 10005;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    box-shadow: 
        0 24px 70px rgba(54, 42, 33, 0.16),
        inset 0 1px 2.5px rgba(255, 255, 255, 0.95) !important;
    transition: opacity 0.3s ease, transform 0.3s ease, display 0.3s ease;
}

.pwa-install-banner.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(40px);
    display: none !important;
}

.pwa-install-banner.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    display: flex !important;
}

.pwa-banner-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid white;
    box-shadow: 0 4px 12px rgba(54, 42, 33, 0.08);
}

.pwa-banner-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwa-banner-text {
    flex: 1;
    text-align: left;
}

.pwa-banner-text h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-primary-brown-dark);
}

.pwa-banner-text p {
    margin: 3px 0 0 0;
    font-size: 0.72rem;
    color: var(--color-charcoal-light);
    line-height: 1.3;
}

.pwa-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-banner-actions .btn {
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 12px !important;
    cursor: pointer;
    box-shadow: none !important;
}

.btn-pwa-close {
    background: rgba(0, 0, 0, 0.05) !important;
    color: var(--color-charcoal) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.btn-pwa-close:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

.btn-pwa-install {
    background: linear-gradient(135deg, var(--color-primary-green), var(--color-primary-green-hover)) !important;
    color: white !important;
    border: none !important;
}

/* iOS PWA Instruction Popover Modal Overlay */
.pwa-ios-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(54, 42, 33, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    transition: opacity 0.3s ease;
}

.pwa-ios-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.pwa-ios-modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
    display: flex !important;
}

.pwa-ios-card {
    position: relative;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    border-radius: 28px !important;
    background: rgba(255, 255, 255, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    box-shadow: 
        0 24px 70px rgba(54, 42, 33, 0.16),
        inset 0 1px 2.5px rgba(255, 255, 255, 0.95) !important;
    animation: pwa-ios-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

@keyframes pwa-ios-slide-in {
    0% { transform: translateY(40px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.pwa-ios-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(141, 85, 55, 0.15);
    margin-bottom: 18px;
    text-align: left;
}

.pwa-ios-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 1.5px solid white;
    box-shadow: var(--shadow-soft);
}

.pwa-ios-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-primary-brown-dark);
}

.pwa-ios-header p {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: var(--color-charcoal-light);
    font-weight: 600;
}

.pwa-ios-body {
    text-align: left;
    font-size: 0.82rem;
    color: var(--color-charcoal);
    line-height: 1.5;
}

.pwa-ios-body p {
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: 600;
}

.pwa-ios-body ol {
    margin: 0;
    padding-left: 20px;
}

.pwa-ios-body li {
    margin-bottom: 12px;
}

.pwa-ios-body li:last-child {
    margin-bottom: 0;
}

.ios-share-icon-placeholder, .ios-add-icon-placeholder {
    font-weight: bold;
}

/* Offset float positioning of locate button and service button on mobile when install banner is visible */
@media (max-width: 768px) {
    body:has(.pwa-install-banner.visible) .map-locate-btn {
        bottom: 160px !important;
    }
    body:has(.pwa-install-banner.visible) .map-service-btn {
        bottom: 160px !important;
    }
}

