:root {
    --primary: #1B3A4B;
    --primary-dark: #142D3B;
    --secondary: #E8A838;
    --accent: #E8A838;
    --danger: #D9534F;
    --dark: #1A2332;
    --gray: #6B7A8D;
    --light-gray: #FDF6EC;
    --border: #E8DFD1;
    --cream: #FDEBD3;
    --shadow: 0 1px 4px rgba(27,58,75,0.08), 0 1px 2px rgba(27,58,75,0.06);
    --shadow-lg: 0 4px 16px rgba(27,58,75,0.12);
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    background: var(--light-gray);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content { flex: 1; }

.navbar { box-shadow: var(--shadow); }
.bg-primary { background-color: var(--primary) !important; }
.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background-color: var(--primary-dark); border-color: var(--primary-dark); }
.text-primary { color: var(--primary) !important; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1B3A4B 0%, #0F2530 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--light-gray);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hero h1 { font-size: 2.5rem; font-weight: 800; }
.hero .lead { font-size: 1.2rem; opacity: 0.9; }

/* Search Box */
.search-box {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

/* Cards */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.card-ride {
    border-left: 4px solid var(--primary);
}
.card-ride .route-line {
    position: relative;
    padding-left: 24px;
    margin: 12px 0;
}
.card-ride .route-line::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}
.card-ride .route-dot {
    position: relative;
    padding: 6px 0;
}
.card-ride .route-dot::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
}
.card-ride .route-dot.destination::before {
    background: var(--primary);
}

/* Price Tag */
.price-tag {
    font-size: 1.4rem;
    font-weight: 700;
    color: #E8A838;
}
.price-label {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Ride Info Badges */
.ride-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--light-gray);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Status Badges */
.badge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-active { background: #E3EEF3; color: #1B3A4B; }
.badge-pending { background: #FDEBD3; color: #D4922A; }
.badge-completed { background: #E8F0E3; color: #3A7D34; }
.badge-cancelled { background: #F5E6E5; color: #C62828; }
.badge-in_progress { background: #FDF6EC; color: #E8A838; }
.badge-rider_noshow, .badge-driver_noshow, .badge-no_show { background: #F5E6E5; color: #C62828; }
.badge-rejected { background: #F5E6E5; color: #C62828; }

/* Avatar */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 96px; height: 96px; }
.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

/* Rating Stars */
.text-warning { color: #E8A838 !important; }

/* Map */
.map-container {
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.map-container-lg { height: 400px; }

/* Stats Cards */
.stat-card {
    text-align: center;
    padding: 20px;
}
.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #1B3A4B;
}
.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 4px;
}

/* Chat */
.chat-container {
    height: 400px;
    overflow-y: auto;
    padding: 16px;
    background: #f0f2f5;
    border-radius: var(--radius);
}
.chat-bubble {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 16px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}
.chat-bubble.sent {
    background: #1B3A4B;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}
.chat-bubble.received {
    background: white;
    color: var(--dark);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow);
}
.chat-time {
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 2px;
}

/* Wallet */
.wallet-balance {
    background: linear-gradient(135deg, #1B3A4B 0%, #0F2530 100%);
    color: white;
    border-radius: var(--radius);
    padding: 30px;
}
.wallet-balance .amount {
    font-size: 2.5rem;
    font-weight: 800;
}

/* Feature Cards (Landing) */
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}
.feature-icon.blue { background: #E3EEF3; color: #1B3A4B; }
.feature-icon.green { background: #FDEBD3; color: #E8A838; }
.feature-icon.yellow { background: #FDF6EC; color: #D4922A; }
.feature-icon.red { background: #F5E6E5; color: #D9534F; }

/* How It Works */
.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #E8A838;
    color: #1A2332;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Form Styling */
.form-control:focus, .form-select:focus {
    border-color: #1B3A4B;
    box-shadow: 0 0 0 0.2rem rgba(27, 58, 75, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 60px 0 40px; }
    .hero h1 { font-size: 1.8rem; }
    .search-box { margin-top: -30px; padding: 16px; }
    .price-tag { font-size: 1.1rem; }
    .wallet-balance .amount { font-size: 1.8rem; }
    .map-container { height: 200px; }
    .chat-bubble { max-width: 85%; }
}

/* Admin */
.admin-sidebar {
    background: var(--dark);
    min-height: 100vh;
    padding-top: 20px;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 10px 20px;
    border-radius: 8px;
    margin: 2px 10px;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* Notification List */
.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}
.notification-item:hover { background: var(--light-gray); }
.notification-item.unread { background: #FDF6EC; }
.notification-item.unread:hover { background: #FDEBD3; }

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Pulse animation for live tracking dot */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}
.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #E8A838;
    animation: pulse 1.5s infinite;
    display: inline-block;
}
