/* Modern SpatialDB Page Styles */

body {
    background: #f5f5f5;
}

.spatialdb-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px 60px 20px;
    margin-top: 80px;
    text-align: center;
    margin-bottom: 40px;
}

.spatialdb-hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.spatialdb-hero p {
    font-size: 18px;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

.spatialdb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #0f62fe;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-card.residential {
    border-left-color: #dc143c;
}

.stat-card.commercial {
    border-left-color: #0f62fe;
}

.stat-card h3 {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-card p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.spatialdb-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.spatialdb-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.spatialdb-section h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.map-container-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

#mapid {
    width: 100%;
    height: 750px;
    border-radius: 16px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.chart-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.recent-buildings-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 25px;
    max-height: 400px;
    overflow-y: auto;
}

.recent-buildings-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.recent-buildings-table {
    width: 100%;
    border-collapse: collapse;
}

.recent-buildings-table tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.recent-buildings-table tr:hover {
    background-color: #f3f4f6;
}

.recent-buildings-table td {
    padding: 12px 8px;
    font-size: 14px;
    color: #4b5563;
}

.recent-buildings-table td:first-child {
    font-weight: 600;
    color: #1a1a1a;
}

.time-range-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #4338ca;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.download-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.download-section h3 {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: white;
    color: #0f62fe;
    border: 2px solid #0f62fe;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.download-btn:hover {
    background: #0f62fe;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 98, 254, 0.3);
}

.download-btn i {
    font-size: 18px;
}

.alert-banner {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-banner i {
    color: #f59e0b;
    font-size: 20px;
}

.alert-banner p {
    margin: 0;
    color: #92400e;
    font-size: 14px;
}

@media (max-width: 768px) {
    .spatialdb-hero h1 {
        font-size: 32px;
    }
    
    .spatialdb-hero p {
        font-size: 16px;
    }
    
    .spatialdb-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
    }
    
    #mapid {
        height: 500px;
    }
}
