/* Custom Styles for Field Engineer Management System */
body {
    font-family: 'Inter', sans-serif;
}

/* Navigation Styles */
.nav-btn.active {
    background-color: rgba(29, 78, 216, 0.8) !important;
}

/* Section Display */
.section {
    display: none;
}

.section.active {
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
}

.modal.show {
    display: flex !important;
}

.modal.hidden {
    display: none !important;
}

/* Table Styles */
.table-auto th {
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.table-auto td {
    border-bottom: 1px solid #f3f4f6;
    padding: 12px 16px;
    vertical-align: middle;
}

.table-auto tr:hover {
    background-color: #f9fafb;
}

/* Custom Checkbox Styles */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Status Badge Styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    rounded: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.status-online {
    background-color: #dcfce7;
    color: #166534;
}

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

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

/* WhatsApp Green Theme */
.whatsapp-green {
    background-color: #25d366;
}

.whatsapp-green:hover {
    background-color: #128c7e;
}

/* Outlook Blue Theme */
.outlook-blue {
    background-color: #0078d4;
}

.outlook-blue:hover {
    background-color: #106ebe;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .table-auto {
        font-size: 14px;
    }
    
    .table-auto th,
    .table-auto td {
        padding: 8px 12px;
    }
    
    .modal > div {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }
}

/* Form Validation Styles */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

/* Success Message */
.success-message {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
}

/* Error Message */
.error-alert {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
}

/* Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.2s;
    margin: 0 2px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.edit-btn {
    background-color: #3b82f6;
    color: white;
}

.edit-btn:hover {
    background-color: #2563eb;
}

.delete-btn {
    background-color: #ef4444;
    color: white;
}

.delete-btn:hover {
    background-color: #dc2626;
}

.whatsapp-btn {
    background-color: #25d366;
    color: white;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
}

/* Pagination Styles */
#pageInfo {
    background-color: #f3f4f6;
    color: #374151;
    font-weight: 500;
}

/* Filter and Search */
.filter-active {
    background-color: #dbeafe;
    border-color: #3b82f6;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Map Styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
}

.fe-marker-popup {
    min-width: 250px;
}

.fe-marker-popup .status-available {
    color: #10b981;
    font-weight: 600;
}

.fe-marker-popup .status-busy {
    color: #f59e0b;
    font-weight: 600;
}

.fe-marker-popup .status-on-assignment {
    color: #3b82f6;
    font-weight: 600;
}

.fe-marker-popup .status-offline {
    color: #6b7280;
    font-weight: 600;
}

/* Notification Styles */
.notification-dropdown {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

.notification-unread {
    background-color: #f0f9ff;
    border-left: 4px solid #3b82f6;
}

/* Priority and Status Badges */
.priority-low {
    background-color: #f3f4f6;
    color: #374151;
}

.priority-medium {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.priority-high {
    background-color: #fed7aa;
    color: #ea580c;
}

.priority-urgent {
    background-color: #fee2e2;
    color: #dc2626;
    animation: pulse 2s infinite;
}

.status-new {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.status-assigned {
    background-color: #fef3c7;
    color: #d97706;
}

.status-in-progress {
    background-color: #e9d5ff;
    color: #7c3aed;
}

.status-completed {
    background-color: #d1fae5;
    color: #059669;
}

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

/* Bulk Import Styles */
.csv-preview-table {
    font-size: 12px;
}

.csv-preview-table th,
.csv-preview-table td {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
}

.csv-preview-table th {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* Map Control Styles */
.map-filter-controls select {
    font-size: 12px;
    max-width: 150px;
}

.leaflet-control-custom {
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
}

/* Custom marker styles */
.custom-fe-marker {
    background: transparent;
    border: none;
}