.main-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}


.content-area {
    flex: 1;
    overflow: hidden;
    background-color: #f8f9fa;
}



h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}



/* Erscheint sofort beim Aufruf der Seite */
.loading-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f8f9fa;
    font-family: 'Inter', system-ui, sans-serif;
}

.login-card-skeleton {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 24px;
    border: 1px solid #eee;
    overflow: hidden;
}

/* Skeleton Elemente */
.skeleton-logo-container {
    padding-top: 3rem;
    display: flex;
    justify-content: center;
}

.skeleton-circle {
    width: 64px;
    height: 64px;
    background: #e9ecef;
    border-radius: 18px;
}

.skeleton-line {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    margin: 0 auto;
}

    .skeleton-line.title {
        width: 60%;
        height: 18px;
    }

    .skeleton-line.subtitle {
        width: 40%;
    }

.skeleton-label {
    width: 30%;
    height: 8px;
    background: #f1f3f5;
    border-radius: 4px;
}

.skeleton-input {
    width: 100%;
    height: 50px;
    background: #f8f9fa;
    border-radius: 12px;
}

.skeleton-button {
    width: 100%;
    height: 52px;
    background: #dee2e6;
    border-radius: 12px;
}

/* Animation: Pulsieren */
.pulse {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Lade-Text & Animation */
.loading-text {
    text-align: center;
    color: #adb5bd;
    font-size: 0.85rem;
}

.dot-flashing {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 5px;
    background-color: #0d6efd;
    color: #0d6efd;
    animation: dot-flashing 1s infinite linear alternate;
    display: inline-block;
    margin-bottom: 10px;
}

@keyframes dot-flashing {
    0% {
        background-color: #0d6efd;
    }

    50%, 100% {
        background-color: rgba(13, 110, 253, 0.2);
    }
}

/* Custom Stylesheets */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

#app {
    height: 100vh;
}


.map-container {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-wrapper {
    flex: 1;
    position: relative;
}

/* Moderne NAV-Bar*/
.navbar-modern {
    background-color: var(--app-bg);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
}

/* Brand Styling */
.brand-wrapper {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
}

/* Mobile Optimization: Flex-Container für Buttons */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #ffffff;
        margin: 0 -1rem;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-item {
        margin-bottom: 0.5rem;
    }

    .nav-divider {
        display: none;
    }

    .section-label {
        display: block;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }
}

/* Button Styling */
.btn-modern {
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #e0e0e0;
    background-color: #fcfcfc;
    color: #444;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .btn-modern:hover {
        background-color: var(--accent-soft);
        border-color: #cbd5e0;
    }

.button-circle {
    border-radius: 50px;
    padding: 0.5rem 0.7rem;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #e0e0e0;
    background-color: #fcfcfc;
    color: #444;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Aktive Zustände mit sanften Farben */
.btn-active-primary {
    background-color: #e7f1ff;
    color: #0d6efd;
    border-color: #b6d4fe;
}

.btn-active-success {
    background-color: #e1f5ea;
    color: #198754;
    border-color: #a3cfbb;
}

.btn-active-danger {
    background-color: #fce8e8;
    color: #dc3545;
    border-color: #f1aeb5;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 1rem;
}

.nav-divider {
    width: 1px;
    height: 28px;
    /*background-color: var(--border-color);*/
    background-color: #bababa;
    margin: 0 1.25rem;
}

/* angepasste Dropdowneffekte*/
/* Styling für das modernisierte Dropdown */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); /* Sehr weicher Schatten */
    padding: 0.6rem;
    min-width: 220px;
    margin-top: 12px !important; /* Abstand zum Button */
    animation: fadeInDropdown 0.2s ease-out;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    border-radius: 10px;
    padding: 0.7rem 1rem;
    color: #444;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

    .dropdown-item:last-child {
        margin-bottom: 0;
    }

    /* Der dezente Farbmix für Hover/Aktiv */
    .dropdown-item:hover {
        background-color: var(--accent-soft);
        color: #0d6efd;
    }

    .dropdown-item.active {
        background-color: #e7f1ff; /* Passend zum btn-active-primary */
        color: #0d6efd;
        font-weight: 600;
    }

    .dropdown-item i {
        font-size: 1.1rem;
        margin-right: 12px;
        opacity: 0.7;
    }

    .dropdown-item.active i {
        opacity: 1;
    }




.data-panel {
    background: white;
    border-top: 2px solid #e9ecef;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .data-panel.show {
        /* Höhe wird über Inline-Styles gesteuert */
    }

.data-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    position: relative;
    border-bottom: 1px solid #dee2e6;
}

.data-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1px 0.5rem;
    display: block;
    /*flex: 1;
    min-height: 0;*/ /* Verhindert, dass der Content den Flex-Container aufbläht */
    /*display: grid;*/ /* Hilft QuickGrid bei der Höhenberechnung */
    /*overflow-y: auto;
    padding: 1px 0.5rem;*/
}

/* Modern Pill Tabs */
.nav-tabs-modern {
    border-bottom: 1px solid var(--border-color);
    background-color: #fcfcfc;
    gap: 8px;
    padding: 0.5rem 1rem !important;
}

    .nav-tabs-modern .nav-item .nav-link {
        border: none !important;
        border-radius: 10px !important;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        font-weight: 600;
        color: #6c757d;
        transition: all 0.2s ease;
    }

        .nav-tabs-modern .nav-item .nav-link:hover {
            background-color: #f1f3f5;
        }

        .nav-tabs-modern .nav-item .nav-link.active {
            background-color: #e7f1ff !important; /* Soft Blue */
            color: #0d6efd !important;
        }

/* Badge Anpassung */
.badge-soft {
    background-color: rgba(0, 0, 0, 0.05);
    color: #666;
    font-weight: 500;
}

.nav-link.active .badge-soft {
    background-color: #0d6efd;
    color: white;
}

/* QuickGrid Styling */
.table-modern {
    font-size: 0.85rem;
}

    .table-modern thead th {
        background-color: #f8f9fa;
        color: #888;
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        font-weight: 700;
        padding: 12px 8px !important;
        border-top: none !important;
    }

    .table-modern tbody tr {
        height: 41px !important; /* Erzwingt die exakte Höhe */
        max-height: 41px !important;
        overflow: hidden;
    }

    .table-modern tbody td {
        padding: 4px 8px !important;
        vertical-align: middle;
        border-bottom: 1px solid #f2f2f2;
        height: 41px !important;
    }


.col-width-100 {
    width: 100px !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Aktions-Buttons in der Tabelle */
.btn-action-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: #f8f9fa;
    color: #0d6efd;
    transition: all 0.2s;
}

    .btn-action-sm:hover {
        background-color: #0d6efd;
        color: white;
    }



.floating-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.table {
    margin-bottom: 0;
}

    .table tbody tr {
        cursor: pointer;
    }

        .table tbody tr:hover {
            background-color: #f8f9fa;
        }

.splitter {
    height: 8px;
    background: #f1f3f5;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #dee2e6;
    z-index: 1001;
    flex-shrink: 0;
}

.splitter::after {
    content: "";
    width: 40px;
    height: 4px;
    background: #ced4da;
    border-radius: 2px;
}

.splitter:hover::after {
    background: #0d6efd;
}

.resizing {
    cursor: row-resize !important;
    user-select: none;
}


.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1060;
    padding-top: 60px;
    animation: fadeIn 0.3s ease;
}

.popup-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    animation: slideDown 0.3s ease;
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

    .popup-close:hover {
        background-color: rgba(255, 255, 255, 1);
    }

.popup-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: #f8f9fa;
}

    .popup-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.popup-content {
    padding: 24px;
}

.popup-title {
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
}

.popup-body {
    color: #6c757d;
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .popup-overlay {
        padding-top: 20px;
    }

    .popup-container {
        width: 95%;
        max-height: 90vh;
    }

    .popup-image {
        height: 200px;
    }

    .popup-content {
        padding: 16px;
    }

    .popup-title {
        font-size: 1.25rem;
    }
}


/* Scope-Container für das Leaflet Popup */
.mapapp-custom-popup .leaflet-popup-content-wrapper {
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.2) !important;
    border: none !important;
}

.mapapp-custom-popup .leaflet-popup-content {
    margin: 0 !important;
    width: 280px !important;
    font-family: 'Inter', system-ui, sans-serif;
}

/* Header Bereich */
.mapapp-custom-popup .popup-header {
    background-color: #fcfcfc;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.mapapp-custom-popup .popup-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    margin: 0 0 4px 0 !important;
    color: #0d6efd !important;
    line-height: 1.2;
}

.mapapp-custom-popup .popup-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.4;
}

/* Body & Grid */
.mapapp-custom-popup .popup-body {
    padding: 16px;
    background-color: #ffffff;
}

.mapapp-custom-popup .popup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.mapapp-custom-popup .grid-item {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 8px 10px;
}

.mapapp-custom-popup .grid-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 800;
    color: #99aab5;
    display: block;
    margin-bottom: 2px;
    letter-spacing: 0.03em;
}

.mapapp-custom-popup .grid-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2d3436;
}

/* Button-Styling im Scope */
.mapapp-custom-popup .btn-popup-action {
    background-color: #0d6efd;
    color: white !important;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .mapapp-custom-popup .btn-popup-action:hover {
        background-color: #0a58ca;
    }

/* Entferne den Standard Leaflet "Close" Button Hintergrund falls nötig */
.mapapp-custom-popup .leaflet-popup-close-button {
    padding: 8px !important;
    color: #999 !important;
}

.btn-floating-modern {
    background: linear-gradient(135deg, #0d6efd, #0056b3); /* Dezenter Verlauf für Tiefe */
    color: white !important;
    border: none;
    border-radius: 50px; /* Perfekte Pill-Form */
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3) !important; /* Blauer weicher Schatten */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1060; /* Über dem Datenpanel und Leaflet-Controls */
    display: flex;
    align-items: center;
    gap: 10px;
}

    .btn-floating-modern:hover {
        transform: translate(-50%, -4px); /* Schwebt leicht aufwärts beim Hover */
        box-shadow: 0 12px 25px rgba(13, 110, 253, 0.4) !important;
        background: linear-gradient(135deg, #0b5ed7, #004699);
    }

    .btn-floating-modern:active {
        transform: translate(-50%, 0px); /* Geht beim Klicken leicht zurück */
    }

    .btn-floating-modern i {
        font-size: 1.1rem;
    }


/* Login-Style */
.login-card {
    border-radius: 24px !important; /* Etwas runder für modernen Look */
    background: #ffffff;
    border: 1px solid var(--border-color) !important;
}

.login-header-icon {
    width: 64px;
    height: 64px;
    background: #e7f1ff;
    color: #0d6efd;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
}

.input-custom-group {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    border: 1px solid #eee;
    transition: all 0.2s ease;
}

    .input-custom-group:focus-within {
        border-color: #0d6efd;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
    }

.login-input {
    border: none !important;
    background: transparent !important;
    font-weight: 500;
}

    .login-input:focus {
        box-shadow: none !important;
    }

.btn-login {
    height: 52px;
    border-radius: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    background: #0d6efd;
    border: none;
    transition: all 0.3s ease;
}

    .btn-login:hover:not(:disabled) {
        background: #0b5ed7;
        transform: translateY(-2px);
        box-shadow: 0 8px 15px rgba(13, 110, 253, 0.2);
    }

.login-logo-container {
    padding: 1rem 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-brand-image {
    max-height: 80px; /* Groß genug für Sichtbarkeit, klein genug für die Card */
    width: auto;
    object-fit: contain;
    /* Optional: Ein ganz zarter Schatten, falls das Logo viel Weiß enthält */
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}