/* Dashboard Light Theme - Clean & Professional */
:root {
    --primary-blue: #1e40af;
    /* Deep Blue header */
    --accent-blue: #3b82f6;
    --bg-body: #f8f9fa;
    /* Light Gray */
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: var(--primary-blue);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1100;
    /* Increased to be above Leaflet (1000) */
}

.brand {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-item {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #dc2626;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Tab Views */
.view-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.view-section.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats Cards (Dashboard View) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.stat-icon.blue {
    background: #eff6ff;
    color: #3b82f6;
}

.stat-icon.yellow {
    background: #fffbeb;
    color: #f59e0b;
}

.stat-icon.green {
    background: #ecfdf5;
    color: #10b981;
}

.stat-info h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
}

.stat-info p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-weight: 600;
}

/* Reports View Styles */
.actions-toolbar {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.filter-select {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    color: var(--text-main);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: #1e3a8a;
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
}

/* Clean Table */
.table-container {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 1.2rem;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

tr:hover {
    background: #f8fafc;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-admin {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.badge-public {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.status-verified {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Modal */
/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 3000;
    /* Higher than navbar and map */
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Reusing modal logic but with clean white theme */
.modal-content {
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-title {
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.btn-modal-close {
    color: var(--text-muted);
    transition: color 0.2s;
}

.btn-modal-close:hover {
    color: var(--text-main);
}

/* Map Admin Container */
.map-container-admin {
    background: white;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Mobile Responsiveness for Dashboard */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        /* Hidden by default on mobile */
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        background-color: var(--primary-blue);
        /* Fix: Solid background */
        border-radius: 0 0 12px 12px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 100%;
        /* Pushes it below navbar */
        left: 0;
        z-index: 1200;
        /* Higher than navbar but below modals */
        animation: slideDown 0.3s ease-out;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        padding: 0.8rem 1rem;
        border-radius: 8px;
    }

    .btn-logout {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0.5rem;
        text-align: center;
    }

    /* Animation for menu */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .actions-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .actions-toolbar>div:last-child {
        flex-direction: column;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
        /* Ensure table doesn't squish too much */
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-info h3 {
        font-size: 2rem;
    }
}

/* Glass Modal for Logout */
.glass-modal {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-content {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.btn-confirm-yes {
    background: #ef4444;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-confirm-yes:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-confirm-no {
    background: #f1f5f9;
    color: #475569;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

/* Map Specific Styles (Synced from map.css) */
.map-tooltip {
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.district-label-active {
    pointer-events: none;
}

.custom-pin {
    background: transparent;
    border: none;
}

.btn-confirm-no:hover {
    background: #e2e8f0;
}