/* Modern Emergency Dashboard Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --border-radius: 0.75rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Login/Register Page Styles */
.login-card, .register-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-hover);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
}

/* Modern Form Elements */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: var(--transition);
    background: white;
    color: var(--dark-color);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Modern Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: white;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
}

.table tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* Modern Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border-left: 4px solid var(--primary-color);
}

/* Modern Cards */
.modern-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
    overflow: hidden;
}

.modern-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-1px);
}

.modern-card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-card-body {
    padding: 1.5rem;
}

.modern-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modern Buttons */
.modern-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.modern-btn:hover::before {
    left: 100%;
}

.modern-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.25);
}

.modern-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(37, 99, 235, 0.35);
    color: white;
}

.modern-btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.25);
}

.modern-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.35);
    color: white;
}

.modern-btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.modern-btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.modern-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge-pending {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge-progress {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge-resolved {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge-online {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Status Indicator Dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-dot-pending { background: #ef4444; }
.status-dot-progress { background: #f59e0b; }
.status-dot-resolved { background: #10b981; }
.status-dot-online { background: #3b82f6; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Filter Buttons */
.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    align-items: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    text-decoration: none;
}

.filter-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
    color: #64748b;
    text-decoration: none;
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.25);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border-left: 4px solid;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.stat-card-pending { border-left-color: #ef4444; }
.stat-card-progress { border-left-color: #f59e0b; }
.stat-card-resolved { border-left-color: #10b981; }
.stat-card-online { border-left-color: #3b82f6; }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.7;
    color: var(--secondary-color);
}

/* Map Container */
#map {
    height: 65vh;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
}

/* Action Controls */
.map-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.map-actions .btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Page Header */
.page-header {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-subtitle {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1rem;
}

/* Loading States */
.loading-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-hover);
    display: none;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .map-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: center;
        padding: 0.75rem;
    }
    
    #map {
        height: 50vh;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-card-header {
        padding: 1rem;
    }
    
    .modern-card-body {
        padding: 1rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        justify-content: center;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus States for Accessibility */
.modern-btn:focus,
.filter-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    box-shadow: var(--card-shadow-hover);
}

.sidebar-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-brand:hover {
    color: #60a5fa !important;
    text-decoration: none;
}

.sidebar-menu a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    border-radius: 0.5rem;
    margin: 0.25rem 1rem;
}

.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    text-decoration: none;
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background: var(--primary-color);
    color: white !important;
    font-weight: 500;
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Menu Button */
#menuBtn {
    background: var(--dark-color) !important;
    border: none;
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

#menuBtn:hover {
    background: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Modern Input Groups */
.input-group .form-control {
    border-right: none;
}

.input-group .btn {
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--card-shadow-hover);
}

.modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    border: 2px solid #e2e8f0;
    color: var(--dark-color);
    margin: 0 0.125rem;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dropdown Menus */
.dropdown-menu {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--card-shadow-hover);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--primary-color);
    color: white;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .modern-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .modern-btn {
        display: none;
    }
    
    #map {
        height: 400px;
        break-inside: avoid;
    }
    
    .sidebar {
        display: none;
    }
    
    #menuBtn {
        display: none;
    }
}
