:root {
    --primary-color: #FF6B35;
    --primary-dark: #E55A2B;
    --secondary-color: #1a2332;
    --accent-color: #4ECDC4;
    --danger-color: #E74C3C;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --text-dark: #1a1a1a;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* ---- Navbar ---- */
.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}
.navbar-brand i {
    color: var(--primary-color);
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2c3e50 100%);
    color: white;
    padding: 100px 0;
    min-height: 85vh;
    display: flex;
    align-items: center;
}
.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}
.hero-section .lead {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}
.hero-section .highlight {
    color: var(--primary-color);
}

/* ---- Feature Cards ---- */
.feature-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

/* ---- How It Works Steps ---- */
.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

/* ---- Section Spacing ---- */
.section-padding {
    padding: 80px 0;
}

/* ---- Auth Pages ---- */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
}
.auth-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.auth-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 12px 12px 0 0;
    text-align: center;
    padding: 2rem;
}
.auth-card .card-header h3,
.auth-card .card-header h4 {
    color: inherit;
    margin: 0;
}

/* ---- Dashboard / Map ---- */
.dashboard-page {
    overflow: hidden;
}
#map {
    height: calc(100vh - 56px);
    width: 100%;
    z-index: 1;
}
.map-search-card {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 500px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.map-search-card:focus-within {
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
}
.map-search-card .search-box {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.map-search-card .search-box input {
    flex: 1;
    border: none;
    background: transparent;
    color: #1a1a1a;
    font-size: 0.95rem;
    padding: 0.75rem 0.75rem;
    outline: none;
    font-family: inherit;
}
.map-search-card .search-btn {
    background: var(--danger-color, #dc3545);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.map-search-card .search-btn:hover {
    background: #c82333;
}
.pac-dropdown {
    display: none;
    border-top: 1px solid #e8e8e8;
}
.pac-dropdown-item {
    padding: 10px 14px 10px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: background 0.1s;
    border-bottom: 1px solid #f0f0f0;
}
.pac-dropdown-item:hover {
    background: #f5f5f5;
}
.pac-dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 14px 14px;
}
.pac-dropdown-item .pac-icon {
    color: #dc3545;
    font-size: 0.9rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.pac-dropdown-item .pac-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.pac-dropdown-item .pac-main {
    font-size: 0.9rem;
    color: #1a1a1a;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pac-dropdown-item .pac-secondary {
    font-size: 0.78rem;
    color: #70757a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pac-container {
    display: none !important;
}
.map-fab {
    position: absolute;
    bottom: 30px;
    right: 20px;
    z-index: 1000;
}
.map-fab .btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-alert-count {
    position: absolute;
    bottom: 30px;
    left: 20px;
    z-index: 1000;
}
.map-alert-count .badge {
    font-size: 0.9rem;
    padding: 8px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ---- Driver Marker (pulsing blue dot) ---- */
.driver-marker-wrapper {
    background: none !important;
    border: none !important;
}
.driver-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4285F4;
    border: 3px solid white;
    box-shadow: 0 0 0 rgba(66, 133, 244, 0.4);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(66, 133, 244, 0); }
    100% { box-shadow: 0 0 0 0 rgba(66, 133, 244, 0); }
}

/* ---- Flag Markers ---- */
.flag-marker-wrapper {
    background: none !important;
    border: none !important;
}
.flag-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* ---- Category Badges ---- */
.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: white;
    font-weight: 500;
}

/* ---- Flag Popup ---- */
.flag-popup {
    min-width: 220px;
    font-size: 0.9rem;
}
.flag-popup .popup-category {
    font-weight: 600;
    margin-bottom: 6px;
}
.flag-popup .popup-address {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 6px;
}
.flag-popup .popup-notes {
    margin-bottom: 8px;
}
.flag-popup .vote-btn {
    padding: 2px 8px;
    font-size: 0.75rem;
}

/* ---- Destination Check Results ---- */
.check-result {
    border-left: 4px solid;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 0 8px 8px 0;
}
.check-result.clear {
    border-color: var(--success-color);
}
.check-result.warning {
    border-color: var(--warning-color);
}
.check-result.danger {
    border-color: var(--danger-color);
}

/* ---- Profile Page ---- */
.profile-container {
    max-width: 600px;
    margin: 30px auto;
}

/* ---- Toast/Alert ---- */
.tb-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 280px;
}

/* ---- Footer ---- */
footer {
    background-color: var(--secondary-color);
    color: rgba(255,255,255,0.7);
    padding: 2rem 0;
}
footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}
footer a:hover {
    color: var(--primary-color);
}

/* ---- Modal Header ---- */
.modal-header .modal-title {
    color: inherit;
}

/* ---- Card Headers ---- */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: inherit;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section {
        padding: 60px 0;
        min-height: auto;
    }
    .map-search-bar {
        width: 95%;
        top: 65px;
    }
    .section-padding {
        padding: 50px 0;
    }
}
