:root {
    --primary: #2563eb;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #ea580c;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--primary);
}

header p {
    color: var(--text-light);
}

.btn-logout {
    position: absolute;
    top: 30px;
    right: 30px;
    padding: 10px 20px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.btn-logout:hover {
    opacity: 0.9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.stat-icon {
    font-size: 2.5rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.controls {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.controls h2 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.control-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-control {
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-control:hover {
    border-color: var(--primary);
}

.btn-control.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.map {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    z-index: 1;
}

.section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.section h2 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.zones-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.zone-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg);
    border-radius: 10px;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.zone-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.zone-rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    min-width: 50px;
    text-align: center;
}

.zone-info {
    flex: 1;
}

.zone-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.zone-location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.zone-count {
    color: var(--warning);
    font-size: 0.95rem;
}

.btn-zoom {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.btn-zoom:hover {
    opacity: 0.9;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.report-card-admin {
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.report-card-admin:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.report-details {
    padding: 15px;
}

.report-desc {
    margin-bottom: 10px;
    line-height: 1.5;
}

.report-meta-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.report-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.btn-locate {
    padding: 6px 12px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.btn-locate:hover {
    opacity: 0.9;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.empty {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .btn-logout {
        position: static;
        margin-top: 15px;
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .map {
        height: 400px;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }

    .zone-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 14px;
    border: 2px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: var(--text);
    min-width: 40px;
}

.page-btn:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: bold;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
