/* Emerald Color Theme */
:root {
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    --emerald-800: #065f46;
    --emerald-900: #064e3b;
}

/* Promotional Banner Styles */
.promo-banner {
    padding: 12px 0;
    color: white;
    font-weight: 500;
    position: relative;
    z-index: 1030;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.promo-banner .container {
    max-width: 1200px;
}

.promo-banner .btn-close {
    opacity: 0.8;
    filter: brightness(0) invert(1);
}

.promo-banner .btn-close:hover {
    opacity: 1;
}

.promo-banner i {
    font-size: 1.1em;
}

/* Adjust body top margin when banner is present */
body:has(.promo-banner) {
    padding-top: 0;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Emerald themed components */
.bg-emerald {
    background-color: var(--emerald-600) !important;
}

.btn-emerald {
    background-color: var(--emerald-600);
    border-color: var(--emerald-600);
    color: white;
}

.btn-emerald:hover {
    background-color: var(--emerald-700);
    border-color: var(--emerald-700);
    color: white;
}

.btn-outline-emerald {
    color: var(--emerald-600);
    border-color: var(--emerald-600);
    background-color: transparent;
}

.btn-outline-emerald:hover {
    background-color: var(--emerald-600);
    border-color: var(--emerald-600);
    color: white;
}

.btn-outline-emerald.active {
    background-color: var(--emerald-600);
    border-color: var(--emerald-600);
    color: white;
}

.text-emerald {
    color: var(--emerald-600) !important;
}

.border-emerald {
    border-color: var(--emerald-600) !important;
}

/* Navigation */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Map Container */
#map, #jobsMap {
    height: 500px;
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Jobs Map specific styling */
#jobsMap {
    height: 400px;
}

.jobs-map-container {
    position: relative;
}

.map-view-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

/* Pilot Dashboard Specific Styles */
.pilot-dashboard .main-map-section {
    min-height: 650px;
}

.pilot-dashboard .compact-card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.pilot-dashboard .compact-card .card-header {
    background-color: var(--emerald-50);
    border-bottom: 1px solid var(--emerald-200);
    padding: 0.5rem 1rem;
}

.pilot-dashboard .compact-card .card-body {
    padding: 0.75rem;
}

/* Extra small buttons for compact layout */
.btn-xs {
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 0.25rem;
}

/* Compact trip cards */
.compact-trip-item {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.5rem;
    border-left: 3px solid var(--emerald-600);
}

/* Enhanced list view for jobs */
.jobs-list-view .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jobs-list-view .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

.border-emerald {
    border-color: var(--emerald-200) !important;
    border-width: 2px !important;
}

.border-emerald:hover {
    border-color: var(--emerald-400) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Job Details Modal */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    background-color: var(--emerald-50);
    border-radius: 0.75rem 0.75rem 0 0;
}

.modal-title {
    color: var(--emerald-800);
    font-weight: 600;
}

/* Service badges */
.service-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin: 0.25rem;
    background-color: var(--emerald-100);
    color: var(--emerald-800);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Rating stars */
.rating-stars {
    color: #fbbf24;
}

.rating-stars .fa-star-half-alt {
    color: #fbbf24;
}

.rating-stars .far.fa-star {
    color: #d1d5db;
}

/* Notifications */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Make notification dropdown wider */
#notificationsDropdown + .dropdown-menu {
    min-width: 400px;
    max-width: 500px;
}

/* Responsive notification dropdown */
@media (max-width: 768px) {
    #notificationsDropdown + .dropdown-menu {
        min-width: 300px;
        max-width: 350px;
    }
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
    white-space: normal; /* Allow text wrapping */
}

.notification-item:hover {
    background-color: #f9fafb;
}

.notification-item.unread {
    background-color: #ecfdf5;
    border-left: 3px solid var(--emerald-600);
}

/* Notification content styling */
.notification-item .notification-content {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.notification-item .notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #374151;
}

.notification-item .notification-message {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.notification-item .notification-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Trip status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-posted {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-confirmed {
    background-color: #fef3c7;
    color: #92400e;
}

.status-in_progress {
    background-color: #d1fae5;
    color: #065f46;
}

.status-completed {
    background-color: #e5e7eb;
    color: #374151;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Gamification badges */
.achievement-badge {
    position: relative;
    display: inline-block;
    padding: 0.5rem;
    margin: 0.5rem;
    background-color: var(--emerald-50);
    border-radius: 0.5rem;
    text-align: center;
    width: 100px;
    cursor: pointer;
    transition: transform 0.2s;
}

.achievement-badge:hover {
    transform: translateY(-2px);
}

.achievement-badge.earned {
    background-color: var(--emerald-500);
    color: white;
}

.achievement-badge i {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

/* Location sharing */
.location-share-card {
    background-color: #f3f4f6;
    border: 2px dashed #9ca3af;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.location-share-card:hover {
    border-color: var(--emerald-500);
    background-color: var(--emerald-50);
}

/* Trip cards */
.trip-card {
    border-left: 4px solid var(--emerald-600);
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.trip-card:hover {
    transform: translateX(4px);
}

/* Success rate meter */
.success-meter {
    height: 20px;
    background-color: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.success-meter-fill {
    height: 100%;
    background-color: var(--emerald-500);
    transition: width 0.5s ease;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #map {
        height: 400px;
    }
    
    .achievement-badge {
        width: 80px;
        font-size: 0.75rem;
    }
    
    .achievement-badge i {
        font-size: 1.5rem;
    }
}

/* Map markers */
.pilot-marker {
    background-color: var(--emerald-600);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.trip-marker {
    background-color: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

/* Loading spinner */
.spinner-emerald {
    color: var(--emerald-600);
}

/* Dashboard stats */
.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--emerald-600);
}

.stat-card .stat-label {
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Colored background stat cards for admin dashboard */
.bg-light-warning {
    background: rgba(255, 193, 7, 0.1) !important;
    border-left: 4px solid #ffc107;
}

.bg-light-danger {
    background: rgba(220, 53, 69, 0.1) !important;
    border-left: 4px solid #dc3545;
}

.bg-light-info {
    background: rgba(13, 202, 240, 0.1) !important;
    border-left: 4px solid #0dcaf0;
}

.bg-light-success {
    background: rgba(25, 135, 84, 0.1) !important;
    border-left: 4px solid #198754;
} 

/* CRM Dashboard - Clean Emerald Theme */
.crm-card {
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
}

.crm-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* CRM Dashboard Specific Styling */
.crm-dashboard .stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
}

.crm-dashboard .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.crm-dashboard .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: white !important;
}

.crm-dashboard .stat-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white !important;
}

.crm-dashboard .stat-card .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.85rem;
}

.crm-dashboard .stat-card {
    color: white !important;
}

.crm-dashboard .stat-card * {
    color: white !important;
}

/* Clean Emerald Theme - All cards use consistent branding */ 