/**
 * E-Peta Jarlab - Public Landing Page CSS
 * Premium & Modern Design
 */

/* ===== Global Styles ===== */
* {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #51cf66;
    --warning-color: #ffd43b;
    --danger-color: #ff6b6b;
    --info-color: #4dabf7;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    min-height: 100vh;
}

/* ===== Header ===== */
/* .main-header {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 20px 0;
    z-index: 1000;
} */
.main-header {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 20px 0;
    /* position: sticky; Removed as per request */
    /* top: 0; */
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    height: 60px;
    width: auto;
}

.header-title h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.header-title p {
    margin: 5px 0 0 0;
    color: #718096;
    font-size: 14px;
}

.header-actions {
    margin-left: auto;
}

/* ===== Filter Section ===== */
.filter-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.filter-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
}

.filter-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== Map Container ===== */
.map-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

#map {
    height: 60vh;
    min-height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* ===== Legend ===== */
.legend-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.legend-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.legend-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-color);
}

/* ===== Statistics ===== */
.stats-container {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    padding: 25px;
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Data Table ===== */
.table-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.table-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
}

.table-responsive {
    border-radius: 15px;
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.data-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table thead th:first-child {
    border-radius: 15px 0 0 0;
}

.data-table thead th:last-child {
    border-radius: 0 15px 0 0;
}

.data-table tbody tr {
    transition: all 0.3s;
}

.data-table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.01);
}

.data-table tbody td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Leaflet Popup Customization ===== */
.leaflet-popup-content-wrapper {
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 15px;
}

.popup-content h6 {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.popup-content p {
    margin: 5px 0;
    font-size: 14px;
    color: #4a5568;
}

.popup-content strong {
    color: var(--dark-color);
    font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== Loading Spinner ===== */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: #718096;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-actions {
        margin-left: 0;
    }

    .filter-controls {
        grid-template-columns: 1fr;
    }

    #map {
        height: 50vh;
        min-height: 300px;
    }

    .legend-items {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .data-table {
        min-width: 600px;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== Custom Marker Icon ===== */
.custom-marker-icon {
    background: transparent !important;
    border: none !important;
}