:root {
    --bg: #e8f1ef;
    --panel-bg: linear-gradient(165deg, #083b3b 0%, #0f5452 65%, #146463 100%);
    --panel-text: #eaf7f5;
    --muted: #b8d9d4;
    --border: rgba(190, 226, 219, 0.28);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: "Avenir Next", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top left, #f8fcfb 0%, var(--bg) 72%);
}

#app {
    display: grid;
    grid-template-columns: 320px 1fr;
    width: 100%;
    height: 100%;
}

#panel {
    position: relative;
    padding: 22px 20px 20px;
    border-right: 1px solid var(--border);
    background: var(--panel-bg);
    overflow: auto;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.09);
}

#panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #9be4d2 0%, #68cbb5 48%, #4ea0f2 100%);
}

.brand {
    display: flex;
    align-items: center;
    margin: 2px 0 14px;
}

.brand-logo {
    display: block;
    max-width: 178px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

#panel h1 {
    margin: 0 0 10px;
    font-size: 1.45rem;
    letter-spacing: 0.2px;
    line-height: 1.2;
    color: var(--panel-text);
}

#panel p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.93rem;
}

#status {
    margin: 14px 0;
    padding: 10px 12px;
    border: 1px solid rgba(190, 226, 219, 0.42);
    border-radius: 10px;
    color: #e8fbf8;
    background: rgba(255, 255, 255, 0.09);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

#summary {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--panel-text);
    line-height: 1.4;
    font-size: 0.9rem;
    display: grid;
    gap: 8px;
}

#summary li {
    --dataset-color: rgba(190, 226, 219, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--dataset-color);
    border-radius: 8px;
    padding: 7px 9px;
    word-break: break-word;
    box-shadow: inset 3px 0 0 var(--dataset-color);
}

.summary-swatch {
    width: 12px;
    height: 12px;
    margin-top: 3px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex: 0 0 12px;
}

.summary-item-content {
    flex: 1;
}

.hint {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(190, 226, 219, 0.35);
    color: #d8efea !important;
    font-size: 0.83rem;
}

#map {
    width: 100%;
    height: 100%;
}

.map-north-arrow {
    width: 36px;
    height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #0f2a2a;
    font-weight: 700;
    line-height: 1;
}

.north-n {
    font-size: 11px;
    margin-bottom: 1px;
}

.north-arrow {
    font-size: 20px;
}

.map-coords-control {
    min-width: 180px;
    padding: 6px 8px;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #cad8d4;
    border-radius: 5px;
    color: #184242;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}

.leaflet-control-minimap {
    border: 1px solid #c8d6d2 !important;
    box-shadow: 0 1px 7px rgba(0, 0, 0, 0.2);
}

.leaflet-control-geocoder {
    border-radius: 4px;
}

.leaflet-control-fullscreen a,
a.leaflet-control-zoom-fullscreen {
    background-image: none !important;
    font-size: 0;
    color: transparent;
    position: relative;
}

.leaflet-control-fullscreen a::before,
a.leaflet-control-zoom-fullscreen::before {
    content: "\26F6";
    font-size: 17px;
    line-height: 26px;
    text-align: center;
    color: #184242;
    font-weight: 700;
    display: block;
}

.leaflet-control-fullscreen a.leaflet-fullscreen-on::before,
a.leaflet-control-zoom-fullscreen.leaflet-fullscreen-on::before {
    content: "\2715";
    font-size: 14px;
}

.popup-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}

.popup-table th,
.popup-table td {
    text-align: left;
    padding: 3px 4px;
    border-bottom: 1px solid #e5ece9;
    vertical-align: top;
}

.popup-table th {
    white-space: nowrap;
    width: 34%;
    color: #355f5f;
}

@media (max-width: 840px) {
    #app {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    #panel {
        border-right: 0;
        border-bottom: 1px solid var(--border);
        max-height: 43vh;
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
    }

    .brand-logo {
        max-width: 150px;
    }

    #summary {
        gap: 6px;
    }
}