body {
    font-family: Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f9fc;
    margin: 0;
}

.dashboard-container {
    max-width: 1080px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.navbar {
    position: sticky;
    top: 0;
    background-color: #f7f9fc;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;   
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo img {
    max-width: 200px; 
    margin-right: 10px;
    height: auto
}

.navbar-controls {
    display: flex;
    align-items: center;
}

#searchBox {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.navbar-controls button {
    padding: 0.5rem 1rem;
    align-self: center;
    font-size: 1rem;
    background-color: #1e4fa2;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

#backBtn {
    margin-right: 2rem;
}

.navbar-controls button:hover {
    background-color: #e0e0e0;
}

h1 {
    font-size: 2em;
    font-weight: 700;
    margin: 1rem 0 2rem 0;
    text-align: center;
    width: 100%;
    color: #333
}

.pagination {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

button {
    padding: 10px 16px;
    background-color: #7da9f8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

button:hover:not(:disabled) {
    background-color: #5e91f6;
}

#pageIndicator {
    font-weight: bold;
}

.page-numbers {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.page-numbers button {
    padding: 6px 12px;
    background: #eaf1ff;
    color: #2d7ff9;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background 0.2s ease;
}

.page-numbers button.active,
.page-numbers button:hover {
    background-color: #7da9f8;
    color: white;
}

.page-numbers button.ellipsis {
    background: none;
    border: none;
    color: #999;
    cursor: default;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.risk-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid #e2e6eb;
    border-radius: 8px;
    padding: 1rem;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    color: #4a4a4a;
    font-weight: 400;
    cursor: pointer;
}

.risk-card strong {
    font-weight: 500;
    color: #33354f;
    text-shadow: 0 0 0.5px currentColor
}

.risk-card .crime-profile {
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zip-header {
    font-size: 1.05em;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #33354f;
    text-shadow: 0 0 0.5px currentColor
}

.risk-detail-container {
    max-width: 1080px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.risk-detail-container h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #2b2b2b;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.risk-detail-container .highlight {
    font-weight: 500;
    color: #1e4fa2;
}

.crime-detail-section {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.2rem 1.5rem;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e6eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    color: #4a4a4a;
}

.crime-detail-section ul {
    padding-left: 1.2rem;
    list-style-type: disc;
    margin-left: 1.2rem;
}

.key-value {
    margin-bottom: 0.4rem;
}

.hazard-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e6eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    color: #4a4a4a;
    padding: 1.2rem 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.hazard-list {
    flex: 1 1 400px;
}

.hazard-chart {
    flex: 1 1 600px;
}

canvas {
    width: 100% !important;
    height: auto !important;
}

.hazard-table-wrapper {
    margin-top: 20px;
    overflow-x: auto;
}

.hazard-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    font-family: Roboto, sans-serif;
    font-size: 15px;
    background-color: #fff;
    box-shadow: 0 0 0 1px #ddd;
}

.hazard-table thead {
    background-color: #f7f7f7;
    color: #333;
}

.hazard-table th,
.hazard-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.hazard-table th {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.hazard-table tbody tr:hover {
    background-color: #f1f1f1;
}

.row-high td {
    background-color: #fdecea;
    color: #c62828;
}

.row-moderate td {
    background-color: #fff8e1;
    color: #f9a825;
}

.row-low td {
    background-color: #e3f2fd;
    color: #1565c0;
}

.row-minimal td {
    background-color: #e8f5e9;
    color: #2e7d32;
}

@media (max-width: 600px) {

    .hazard-table th,
    .hazard-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
}

.summary-top-section {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.2rem 1.5rem;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e6eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    color: #4a4a4a;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.summary-left {
    flex: 1 1 400px;
    font-size: 15px;
    color: #444;
}

.general-profile {
    text-align: justify;
    margin-bottom: 1rem;
}

.summary-map {
    flex: 1 1 500px;
}

.map-container {
    height: 250px;
    width: 100%;
}

@media (max-width: 768px) {
    .summary-top-section {
        flex-direction: column;
    }

    .summary-map {
        order: 2;
    }
}

.footer {
    text-align: center;
    padding: 2em 1em 1em 1em;
    font-size: 0.9em;
    margin-top: 2em;
    color: #555;
}

.footer a {
    color: #1e4fa2;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer strong {
    color: #1e4fa2;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #555;
    background-color: #f9fbfc;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0,0,0,0.03);
    margin-top: 40px;
}

.no-results-image {
    max-width: 120px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.no-results-message {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0 5px;
    color: #2c3e50;
}

.no-results-subtext {
    font-size: 14px;
    color: #777;
}