/* =========================================
   GoNeighbor - Premium Dark Mode UI
   ========================================= */

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

/* ---- DESIGN TOKENS & VARIABLES ---- */
:root {
    /* Colors - Dark Theme Backgrounds */
    --bg-darker: #050810;
    --bg-dark: #0a0f18;
    --bg-card: rgba(18, 25, 41, 0.4);
    --bg-surface: rgba(26, 35, 55, 0.6);
    --bg-surface-lighter: rgba(40, 50, 75, 0.8);
    
    /* Colors - Accents & Brand */
    --accent-green: #00ff88;
    --accent-green-dim: rgba(0, 255, 136, 0.2);
    --accent-blue: #00b3ff;
    --accent-blue-dim: rgba(0, 179, 255, 0.2);
    --accent-purple: #8758ff;
    --accent-purple-dim: rgba(135, 88, 255, 0.2);
    --warning: #ffb800;
    --danger: #ff4757;
    
    /* Text */
    --text-primary: #ffffff;
    --text-muted: #94a3b8;
    
    /* Borders & Glass */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(16px);
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ---- UTILITIES ---- */
.text-accent-green { color: var(--accent-green); }
.text-accent-blue { color: var(--accent-blue); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-gradient {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Background gradients */
.bg-gradient-blue { background: linear-gradient(135deg, #0052cc, var(--accent-blue)); }
.bg-gradient-purple { background: linear-gradient(135deg, #512da8, var(--accent-purple)); }
.bg-gradient-green { background: linear-gradient(135deg, #00b359, var(--accent-green)); }

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}
.border-glow-blue { border-color: var(--accent-blue-dim); box-shadow: 0 0 20px rgba(0, 179, 255, 0.1); }
.border-accent-green { border-color: var(--accent-green-dim); }
.bg-surface-lighter { border-radius: var(--radius-md); background: var(--bg-surface-lighter); padding: 1rem; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-full { width: 100%; }

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-darker);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}
.btn-secondary:hover {
    background: var(--bg-surface-lighter);
    border-color: var(--border-glass-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-accent-green {
    background: var(--accent-green);
    color: var(--bg-darker);
}
.btn-accent-blue {
    background: var(--accent-blue);
    color: var(--bg-darker);
}

.glow-effect {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}
.glow-effect-blue {
    box-shadow: 0 0 20px var(--accent-blue-dim);
}
.btn-accent-blue:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(0, 179, 255, 0.6); }

.icon-btn, .action-btn, .action-btn-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}
.icon-btn { border-radius: var(--radius-md); width: 40px; height: 40px; }
.action-btn { border-radius: var(--radius-sm); padding: 0.5rem; }
.action-btn-circle { border-radius: 50%; width: 45px; height: 45px; font-size: 1.1rem; }
.action-btn-circle:hover, .icon-btn:hover { background: var(--bg-surface-lighter); }

/* ---- AVATARS & BADGES ---- */
.avatar, .avatar-small, .avatar-large {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: white;
    object-fit: cover;
}
.avatar { width: 40px; height: 40px; font-size: 1.1rem; }
.avatar-small { width: 30px; height: 30px; font-size: 0.9rem; background: var(--bg-surface-lighter); border: 1px solid var(--border-glass); }
.avatar-large { width: 60px; height: 60px; font-size: 1.5rem; }
.image-placeholder { background: var(--bg-surface); border: 2px solid var(--border-glass); }

.badge, .badge-glow, .badge-urgent, .badge-normal {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
}
.badge { background: var(--accent-blue); color: var(--bg-darker); }
.badge-glow { background: var(--accent-green-dim); color: var(--accent-green); border: 1px solid var(--accent-green); box-shadow: 0 0 15px var(--accent-green-dim); margin-bottom: 1rem; }
.badge-urgent { background: rgba(255, 71, 87, 0.2); color: var(--danger); border: 1px solid var(--danger); }
.badge-normal { background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-glass); }

/* ---- NAVIGATION ---- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(10, 15, 24, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.5rem; }
.logo-icon { color: var(--accent-green); }

.view-controls {
    display: flex;
    background: var(--bg-darker);
    padding: 0.25rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-glass);
}
.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.nav-btn:hover { color: var(--text-primary); }
.nav-btn.active { background: var(--bg-surface-lighter); color: var(--text-primary); }

/* Language Switcher */
.lang-switch { display: flex; align-items: center; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-glass); border-radius: var(--radius-pill); padding: 0.25rem; }
.lang-btn { background: transparent; border: none; color: var(--text-muted); padding: 0.4rem 0.8rem; font-weight: 700; font-size: 0.85rem; border-radius: var(--radius-pill); cursor: pointer; transition: var(--transition); }
.lang-btn:hover { color: white; }
.lang-btn.active { background: var(--bg-darker); color: var(--accent-blue); box-shadow: 0 0 10px rgba(0, 179, 255, 0.3); border: 1px solid var(--accent-blue-dim); }
.lang-switch .divider { width: 1px; height: 16px; background: var(--border-glass); margin: 0 0.25rem; }

/* ---- APP CONTAINER & VIEWS ---- */
#app-container {
    padding-top: 70px; /* Offset for fixed nav */
    min-height: 100vh;
}
.view {
    display: none;
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}
.view.active {
    display: block;
}

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

/* =========================================
   1. LANDING PAGE STYLES
   ========================================= */
#view-landing { padding-bottom: 4rem; }

.hero-section {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 5% 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    overflow: hidden;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}
.hero-cta { display: flex; gap: 1rem; }

/* Hero Visuals & Micro-animations */
.hero-visual { position: relative; height: 500px; }
.mockup-card {
    position: absolute;
    width: 320px;
    padding: 1.5rem;
    z-index: 2;
}
.mockup-card:nth-child(1) { top: 10%; right: 10%; }
.mockup-driver { bottom: 10%; left: 0; width: 340px; background: rgba(20, 30, 50, 0.7); border-color: rgba(255, 255, 255, 0.15); z-index: 3;}

.floating-animation { animation: float 6s ease-in-out infinite; }
.floating-animation-delay { animation: float 6s ease-in-out infinite 3s; }

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.mockup-header { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.mockup-card h3 { font-size: 1.2rem; margin-bottom: 1rem; }
.mockup-details { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.tag { padding: 0.25rem 0.5rem; border-radius: 4px; background: var(--bg-surface); font-size: 0.8rem; }
.tag-price { background: var(--accent-green-dim); color: var(--accent-green); font-weight: 700; }
.mockup-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-glass); padding-top: 1rem; }
.user-mini { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }

.driver-match { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.driver-info { display: flex; flex-direction: column; }
.driver-info strong { font-size: 1.1rem; }
.driver-info span { font-size: 0.85rem; color: var(--text-muted); }
.driver-message { font-style: italic; color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* Ambient Background Blobs */
.blur-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
}
.blob-blue { width: 300px; height: 300px; background: var(--accent-blue); top: 20%; right: 5%; }
.blob-green { width: 250px; height: 250px; background: var(--accent-green); bottom: 10%; left: 20%; }

/* Features Section */
.features-section { max-width: 1200px; margin: 0 auto; padding: 4rem 5%; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.feature-card { padding: 2.5rem 2rem; text-align: center; transition: var(--transition); }
.feature-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); box-shadow: 0 15px 35px rgba(0,0,0,0.4); }
.feature-icon { width: 64px; height: 64px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; margin-bottom: 1.5rem; }
.feature-card h3 { margin-bottom: 1rem; font-size: 1.3rem; }
.feature-card p { color: var(--text-muted); }

/* =========================================
   2. CLIENT UI STYLES
   ========================================= */
.app-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 5%;
    display: grid;
    grid-template-columns: 260px 1fr 320px;
    gap: 2rem;
    height: calc(100vh - 70px);
    overflow: hidden;
}

/* Sidebar */
.sidebar { padding: 2rem 1.5rem; display: flex; flex-direction: column; }
.user-profile { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.user-details h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.user-details p { font-size: 0.85rem; }
.nav-menu { flex-grow: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-menu li a { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); color: var(--text-muted); transition: var(--transition); }
.nav-menu li a i { width: 20px; text-align: center; font-size: 1.2rem; }
.nav-menu li.active a, .nav-menu li a:hover { background: var(--bg-surface-lighter); color: var(--text-primary); }
.sidebar-footer { margin-top: auto; }

/* Main Content / Feed */
.main-content { overflow-y: auto; padding-right: 1rem; padding-bottom: 2rem; }
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-thumb { background: var(--bg-surface); border-radius: 10px; }

.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.filter-pills { display: flex; gap: 0.5rem; }
.pill { padding: 0.5rem 1rem; border-radius: var(--radius-pill); background: var(--bg-surface); border: 1px solid var(--border-glass); color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.pill.active, .pill:hover { background: var(--text-primary); color: var(--bg-darker); }

.job-feed { display: flex; flex-direction: column; gap: 1.5rem; }
.job-card { padding: 1.5rem; transition: var(--transition); }
.job-card:hover { border-color: rgba(255,255,255,0.2); }
.job-header { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.job-category { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.job-price { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; }
.job-title { font-size: 1.3rem; margin-bottom: 0.75rem; }
.job-desc { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; line-height: 1.6; }
.job-meta { display: flex; gap: 1.5rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.job-meta span i { margin-right: 0.25rem; }
.job-actions { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border-glass); padding-top: 1rem; }

.status-badge { padding: 0.35rem 0.75rem; border-radius: var(--radius-sm); font-size: 0.8rem; font-weight: 600; }
.status-open { background: rgba(255, 255, 255, 0.1); }
.status-pending { background: var(--accent-blue-dim); color: var(--accent-blue); }

/* Right Panel / Tracking */
.right-panel { padding-top: 5px; }
.tracking-card { padding: 1.5rem; }
.tracking-header { margin-bottom: 1.5rem; }
.live-indicator { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; text-transform: uppercase; }
.dot { width: 8px; height: 8px; background: var(--accent-green); border-radius: 50%; box-shadow: 0 0 10px var(--accent-green); animation: pulseDot 2s infinite; }
.tracking-header h3 { font-size: 1.2rem; }

@keyframes pulseDot { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

/* Simple Map Mockup in CSS */
.map-container-small { height: 180px; background: #1a2233; border-radius: var(--radius-md); position: relative; overflow: hidden; margin-bottom: 1.5rem; border: 1px solid var(--border-glass); }
/* Map Container is now managed by Mapbox */
/* We let mapbox handle markers */

.driver-tracker { background: var(--bg-surface-lighter); border-radius: var(--radius-md); padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.driver-tracker .driver-match { margin-bottom: 0; gap: 0.75rem; }
.tracker-actions { display: flex; gap: 0.5rem; }

/* Modals General */
.modal-overlay { position: fixed; inset: 0; background: rgba(5, 8, 16, 0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 2000; display: none; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content { width: 100%; max-width: 600px; padding: 2.5rem; position: relative; transform: translateY(20px) scale(0.95); transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); background: var(--bg-card); border: 1px solid var(--border-glass); border-radius: var(--radius-lg); box-shadow: var(--shadow-glass); }
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
.close-modal { position: absolute; top: 1.5rem; right: 1.5rem; background: transparent; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; transition: color 0.2s; }
.close-modal:hover { color: white; }

/* Auth Modal Specifics */
.auth-modal { max-width: 450px; padding: 2.5rem 2.5rem; }
.auth-tabs { display: flex; margin-bottom: 2rem; border-bottom: 1px solid var(--border-glass); }
.auth-tab { flex: 1; background: none; border: none; color: var(--text-muted); font-size: 1.1rem; font-weight: 600; padding: 1rem 0; cursor: pointer; transition: all 0.3s; position: relative; outline: none; }
.auth-tab:hover { color: white; }
.auth-tab.active { color: white; }
.auth-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background: var(--accent-blue); box-shadow: 0 -2px 10px var(--accent-blue-dim); }
.auth-form { display: none; animation: fadeIn 0.4s ease; }
.auth-form.active { display: block; }
.role-selector { display: flex; gap: 1rem; margin-top: 0.5rem; }
.role-card { flex: 1; position: relative; cursor: pointer; }
.role-card input { position: absolute; opacity: 0; cursor: pointer; }
.role-content { background: var(--bg-surface); border: 1px solid var(--border-glass); border-radius: var(--radius-md); padding: 1rem; text-align: center; transition: all 0.2s; color: var(--text-muted); }
.role-content i { font-size: 1.5rem; margin-bottom: 0.5rem; display: block; }
.role-card input:checked + .role-content { background: rgba(0, 179, 255, 0.1); border-color: var(--accent-blue); color: var(--accent-blue); box-shadow: 0 0 15px var(--accent-blue-dim); }
.role-card.driver-card input:checked + .role-content { background: rgba(0, 255, 136, 0.1); border-color: var(--accent-green); color: var(--accent-green); box-shadow: 0 0 15px var(--accent-green-dim); }

/* Forms */
.publish-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.form-group label { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.form-input { background: var(--bg-surface-lighter); border: 1px solid var(--border-glass); border-radius: var(--radius-sm); padding: 0.8rem 1rem; color: white; font-family: inherit; font-size: 1rem; transition: var(--transition); width: 100%; }
.form-input:focus { border-color: var(--accent-blue); outline: none; box-shadow: 0 0 0 3px var(--accent-blue-dim); }
.input-with-icon { position: relative; }
.input-with-icon i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-with-icon .form-input { padding-left: 2.5rem; width: 100%; }

/* =========================================
   3. DRIVER UI STYLES
   ========================================= */
.driver-layout {
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
}

/* Driver Header */
.driver-header { margin: 1rem 5%; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; border-radius: var(--radius-lg); z-index: 10; position: relative;}
.driver-stat { display: flex; flex-direction: column; }
.stat-value { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--accent-green); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Status Toggle Switch */
.status-toggle-container { display: flex; align-items: center; gap: 1rem; background: var(--bg-surface-lighter); padding: 0.5rem 1rem; border-radius: var(--radius-pill); border: 1px solid var(--border-glass); }
.status-text { font-weight: 600; font-size: 0.9rem; transition: color 0.3s; }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: var(--bg-surface); border-radius: 26px; transition: .4s; border: 1px solid var(--border-glass); }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: var(--text-muted); border-radius: 50%; transition: .4s; }
input:checked + .slider { background-color: var(--accent-green-dim); border-color: var(--accent-green); box-shadow: 0 0 10px rgba(0,255,136,0.3); }
input:checked + .slider:before { transform: translateX(24px); background-color: var(--accent-green); }

.driver-main-area { flex-grow: 1; display: grid; grid-template-columns: 1fr 400px; position: relative; overflow: hidden; }

/* Map Area Mock */
.driver-map { height: 100%; position: relative; background: #0c1220; /* Darker map feel */ border-top: 1px solid var(--border-glass); }
/* Driver map will render here. Overlays will sit on top */

/* Radar Animation */
.driver-radar { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; justify-content: center; align-items: center; z-index: 5; }
.radar-center { width: 40px; height: 40px; background: var(--accent-green); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: black; font-size: 1.2rem; box-shadow: 0 0 20px var(--accent-green); z-index: 2; transform: rotate(-45deg); }
.pulse-ring { position: absolute; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent-green); animation: radarPulse 3s cubic-bezier(0.215, 0.610, 0.355, 1) infinite; z-index: 1; }
.delay-1 { animation-delay: 1.5s; }

@keyframes radarPulse {
    0% { transform: scale(1); opacity: 0.8; border-width: 2px; }
    100% { transform: scale(10); opacity: 0; border-width: 0px; }
}

/* Map Pins */
.job-pin { position: absolute; display: flex; flex-direction: column; align-items: center; cursor: pointer; transition: transform 0.2s; z-index: 10; opacity: 0; }
.job-pin:hover { transform: scale(1.1) translateY(-5px); }
.pin-price { background: var(--bg-surface-lighter); backdrop-filter: blur(5px); border: 1px solid var(--border-glass); padding: 0.4rem 0.8rem; border-radius: var(--radius-pill); font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.1rem; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.pin-pointer { width: 2px; height: 15px; background: var(--text-primary); margin-top: -2px; }
.marker-urgent .pin-price { background: rgba(255, 71, 87, 0.2); border-color: var(--danger); color: var(--danger); }
.marker-new .pin-price { background: var(--accent-blue-dim); border-color: var(--accent-blue); color: var(--accent-blue); }

@keyframes popIn {
    0% { transform: scale(0) translateY(20px); opacity: 0; }
    80% { transform: scale(1.1) translateY(-5px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Driver Right Panel Overlay */
.driver-jobs-panel { margin: 1rem 5% 1rem 0; display: flex; flex-direction: column; overflow: hidden; position: relative; z-index: 10; height: calc(100% - 2rem); }
.panel-header { padding: 1.5rem; border-bottom: 1px solid var(--border-glass); display: flex; justify-content: space-between; align-items: center; }
.panel-header h3 { font-size: 1.2rem; }

.state-container { flex-grow: 1; padding: 1.5rem; display: none; }
.state-container.active { display: flex; }
.scrollable-list { overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; padding-right: 1rem; }
.scrollable-list::-webkit-scrollbar { width: 4px; }
.scrollable-list::-webkit-scrollbar-thumb { background: var(--bg-surface); border-radius: 4px; }

/* States styling */
.state-icon { font-size: 4rem; margin-bottom: 1.5rem; opacity: 0.5; }
#offline-state h3, #searching-state h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
#offline-state p, #searching-state p { text-align: center; max-width: 80%; }

.radar-spinner { width: 60px; height: 60px; border: 3px solid var(--bg-surface-lighter); border-top-color: var(--accent-green); border-radius: 50%; margin-bottom: 1.5rem; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Job Request Card */
.job-request-card { padding: 1.25rem; }
.req-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.req-time { font-size: 0.8rem; color: var(--text-muted); }
.req-body { margin-bottom: 1.5rem; }
.req-price { font-family: 'Outfit'; font-size: 2.5rem; font-weight: 700; color: var(--accent-blue); line-height: 1; margin-bottom: 0.5rem; }
.req-price-small { font-family: 'Outfit'; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.req-title { font-size: 1.2rem; margin-bottom: 1rem; }
.req-route { background: var(--bg-darker); padding: 1rem; border-radius: var(--radius-sm); position: relative; margin-bottom: 1rem; }
.route-line { position: absolute; left: 1.45rem; top: 1.5rem; bottom: 1.5rem; width: 2px; background: var(--bg-surface-lighter); border-left: 1px dashed var(--text-muted); }
.route-point { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; z-index: 1; position: relative; }
.route-point:first-child { margin-bottom: 0.75rem; }
.req-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.req-footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border-glass); }
.client-info { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.req-actions { display: flex; gap: 0.75rem; }
.flex-grow { flex-grow: 1; }
.btn-outline-danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: rgba(255, 71, 87, 0.1); }

/* Active Mission */
.active-mission-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.pulse-dot-green { width: 12px; height: 12px; background: var(--accent-green); border-radius: 50%; box-shadow: 0 0 10px var(--accent-green); animation: pulseDot 2s infinite; }
.client-card { display: flex; flex-direction: column; }
.action-row { display: flex; gap: 1rem; justify-content: center; }

.mission-steps { display: flex; flex-direction: column; gap: 1rem; position: relative; }
.mission-steps::before { content: ''; position: absolute; left: 14px; top: 10px; bottom: 10px; width: 2px; background: var(--bg-surface-lighter); }
.step { display: flex; align-items: center; gap: 1rem; position: relative; z-index: 1; opacity: 0.5; }
.step.active { opacity: 1; }
.step.completed { opacity: 1; }
.step-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-surface); border: 2px solid var(--border-glass); display: flex; justify-content: center; align-items: center; font-size: 0.8rem; }
.step.completed .step-icon { background: var(--accent-green); border-color: var(--accent-green); color: black; }
.step.active .step-icon { border-color: var(--accent-blue); background: var(--bg-darker); color: var(--accent-blue); box-shadow: 0 0 10px var(--accent-blue-dim); }
.step.active .step-text { font-weight: 700; color: var(--accent-blue); }

/* =========================================
   4. RESPONSIVE DESIGN (MOBILE FIRST ADAPTATION)
   ========================================= */
@media (max-width: 1024px) {
    .app-layout { grid-template-columns: 220px 1fr; }
    .right-panel { display: none; } /* Hide tracking panel on smaller screens, could move to modal */
    .hero-section { grid-template-columns: 1fr; text-align: center; gap: 2rem; padding-top: 4rem; }
    .hero-subtitle { margin: 0 auto 2.5rem; }
    .hero-cta { justify-content: center; }
    .mockup-card:nth-child(1) { top: 0; right: auto; left: 10%; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { padding: 0 1rem; }
    .nav-actions { display: none; } /* Hide login btn on mobile for space */
    .view-controls { font-size: 0.8rem; }
    .nav-btn { padding: 0.4rem 0.6rem; }
    
    .hero-title { font-size: 2.5rem; }
    .hero-cta { flex-direction: column; }
    .features-grid { grid-template-columns: 1fr; }
    
    .app-layout { grid-template-columns: 1fr; padding: 1rem; gap: 1rem; height: auto; }
    .sidebar { display: none; } /* Hide sidebar on mobile, assume a bottom nav would replace it in real app */
    .main-content { overflow: visible; padding-right: 0; }
    
    .driver-layout { margin: 0; position: relative; }
    .driver-header { margin: 1rem; padding: 0.75rem 1rem; }
    .driver-main-area { grid-template-columns: 1fr; }
    .driver-jobs-panel { position: absolute; bottom: 0; left: 0; right: 0; height: 60vh; margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
    
    .form-row { grid-template-columns: 1fr; }
    .modal-content { padding: 1.5rem; width: 95%; }
}
