/* =====================================================
   RESET & BASIS
   ===================================================== */

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: system-ui, sans-serif;
}

/* =====================================================
   APP LAYOUT
   ===================================================== */

.app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   TOPBAR / HEADER
   ===================================================== */

.topbar {
    height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.topbar h1 {
    font-size: 22px;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.nav {
    display: flex;
    gap: 12px;
}

.nav-btn {
    padding: 8px 18px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    text-decoration: none;
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-btn:hover {
    background-color: #f1f5f9;
    border-color: #9ca3af;
}

.nav-btn.active {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* =====================================================
   CONTENT & VIEWS
   ===================================================== */

.content {
    flex: 1;
    position: relative;
}

/* gemeinsame View-Eigenschaften */
.view {
    position: absolute;
    inset: 0;
}

/* Map View: KEIN Scroll */
.map-view {
    overflow: hidden;
}

/* Data View: Scroll erlaubt */
.data-view {
    overflow-y: auto;
    padding: 20px;
}

/* versteckte Views */
.hidden {
    display: none;
}

/* =====================================================
   MAP
   ===================================================== */

#map {
    width: 100%;
    height: 99%;
    background-color: #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.05);
}

/* =====================================================
   TABLE (DATENSÄTZE)
   ===================================================== */

table {
    width: 98%;
    /* zentrieren */
    margin: 0 auto;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.05);
}

thead {
    background-color: #f8fafc;
}

th {
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 10px;
    font-size: 13px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    color: #111827;
}

tbody tr:hover {
    background-color: #f9fafb;
}

/* =====================================================
   BADGES (optional)
   ===================================================== */

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-good {
    background-color: #dcfce7;
    color: #166534;
}

.badge-medium {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-bad {
    background-color: #fee2e2;
    color: #991b1b;
}

/* =====================================================
   LEAFLET FEINSCHLIFF
   ===================================================== */

.leaflet-control-zoom {
    border-radius: 8px;
    overflow: hidden;
}

.leaflet-bar a {
    background-color: #ffffff;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.leaflet-bar a:hover {
    background-color: #f1f5f9;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
}

.leaflet-popup-content {
    font-size: 13px;
    line-height: 1.4;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1100px) {
    .topbar h1 {
        font-size: 20px;
    }
}
