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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

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

/* Header */
.dashboard-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.dashboard-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 15px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #28a745;
    color: white;
}

.btn-primary:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #1e3c72;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 5px;
}

.stat-card p {
    color: #888;
    font-size: 14px;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

/* Table Section */
.table-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.table-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.table-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input, .filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.refresh-btn {
    padding: 10px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s ease;
}

.refresh-btn:hover {
    background: #218838;
}

.zones-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.zones-table th,
.zones-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.zones-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.zones-table tr:hover {
    background: #f8f9fa;
}

.trend-positive {
    color: #28a745;
}

.trend-negative {
    color: #dc3545;
}

/* Loading states */
.stat-number:contains("Loading") {
    color: #6c757d;
    font-size: 1.5rem;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 0.6;
    }
    to {
        opacity: 1;
    }
}

/* Previous year indicator */
.dashboard-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Enhanced stat cards for previous year data */
.stat-card {
    position: relative;
}



.action-btn {
    padding: 6px 12px;
    margin: 0 3px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.edit-btn {
    background: #007bff;
    color: white;
}

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

/* Complaints Section */
.complaints-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.complaints-chart {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.complaints-empty {
    /* Empty space for future content */
}

.complaints-total {
    font-size: 3rem;
    font-weight: 700;
    color: #28a745;
    margin: 15px 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 2px rgba(30, 60, 114, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

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

    .table-actions {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }

    .zones-table {
        font-size: 12px;
    }

    .zones-table th,
    .zones-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 10px;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
}