/* ═══════════════════════════════════════════════════════════════
   0. BOOTSTRAP FARB-VARIABLEN
═══════════════════════════════════════════════════════════════ */

:root {
    --bs-primary: #E98074;
    --bs-primary-rgb: 233, 128, 116;

    --bs-secondary: #6c757d;
    --bs-secondary-rgb: 108, 117, 125;

    --bs-success: #198754;
    --bs-success-rgb: 25, 135, 84;

    --bs-danger: #dc3545;
    --bs-danger-rgb: 220, 53, 69;

    --bs-warning: #ffc107;
    --bs-warning-rgb: 255, 193, 7;

    --bs-info: #0dcaf0;
    --bs-info-rgb: 13, 202, 240;

    --bs-body-color: #2d3748;
    --color-background: #f9f9f6;
    --bs-body-bg: #fff;
    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-border-color: #dee2e6;
    --color-brand: #E85A4F;

    /* Neutrale Hintergründe */
    --color-panel-bg: #fefef8;
    --color-panel-bg-rgb: 254, 254, 248;
    --color-cream: #EAE7DC;
    --color-cream-rgb: 234, 231, 220;
    --color-gray: rgb(136, 136, 136);
    --color-gray-rgb: 136, 136, 136;
    --color-light-gray: #eee;
    --color-white: #fff;
    --color-white-rgb: 255, 255, 255;

    /* Checkbox-Varianten */
    --color-check-q: #2979ff;
    --color-check-v: #f5ad27;

    /* Schatten (Basis-RGB, Alpha bleibt pro Regel individuell) */
    --color-shadow-rgb: 0, 0, 0;
    --color-shadow-neutral-rgb: 230, 230, 230;
    
}

[data-bs-theme="dark"] {
    --bs-body-color: #e2e0d8;
    --color-background: #5b5b5b;
    --bs-body-bg: #4d4d4d;
    --bs-secondary-color: rgba(226, 224, 216, 0.75);
    --bs-border-color: #3a3a35;

    /* Neutrale Hintergründe */
    --color-panel-bg: rgb(95, 95, 90);
    --color-panel-bg-rgb: 95, 95, 90;
    --color-cream: rgb(184, 177, 149);
    --color-cream-rgb: 184, 177, 149;
    --color-gray: rgb(153, 153, 153);
    --color-gray-rgb: 153, 153, 153;
    --color-light-gray: #7f7d77;
    --color-white: #121210;
    --color-white-rgb: 18, 18, 16;

    --color-shadow-rgb: 0, 0, 0;
    --color-shadow-neutral-rgb: 80, 80, 80;
}


/* ═══════════════════════════════════════════════════════════════
   1. BASE
═══════════════════════════════════════════════════════════════ */

html {
    position: relative;
    min-height: 100%;
    overflow-x: hidden;
    scrollbar-color: var(--color-light-gray) rgba(var(--color-panel-bg-rgb), 1);
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    height: 100%;
    background-color: var(--color-background);
    color: var(--bs-body-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "DM Sans", sans-serif;
    font-weight: 200;
    letter-spacing: 1px;
}

.bg-monitor {
    background-color: var(--bs-primary);
}

textarea {
    field-sizing: content;
}

/* ═══════════════════════════════════════════════════════════════
   2. FORM CONTROLS
═══════════════════════════════════════════════════════════════ */
#startDateA,
#endDateA {
    width: 10.5rem;
    min-width: 10.5rem;
    box-sizing: border-box;
    border-radius: 30px;
}

@supports (-moz-appearance: none) {
    #startDateA,
    #endDateA {
        width: 13rem;
    }
}

.form-control:focus {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: none;
}

.form-select:focus {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: none;
}

/*.form-select {
    border-radius: 5px;
}*/

.form-check.form-switch {
    display: flex;
    align-items: center;
    padding-left: 0;
    /* border: 1px solid var(--color-light-gray);
    border-radius: 15px; */
    /* padding: 0px 5px 3px 5px; */
    gap: 3px;
}

    .form-check.form-switch .form-check-input {
        margin-left: auto;
        flex-shrink: 0;
    }
    
.form-check-input:hover {
    cursor: pointer;
}

.form-check-input.q:checked {
    background-color: var(--color-check-q);
    border-color: var(--color-check-q);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input.v:checked {
    background-color: var(--color-check-v);
    border-color: var(--color-check-v);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-label {
    font-weight: bold;
}

    .form-label.form-label-medium {
        font-weight: 500;
    }


/* ═══════════════════════════════════════════════════════════════
   3. LOADING
═══════════════════════════════════════════════════════════════ */

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
    text-align: center;
    opacity: 0;
    transition: opacity 1s;
    background-color: var(--color-panel-bg);
}

.loadingWidget {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--color-panel-bg-rgb), 1);
    z-index: 20;
    display: none;
}

.center {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.loading-text {
    padding: 10px;
    font-size: 30px;
}

.spinner {
    width: 20%;
    height: auto;
    margin: auto;
    overflow: hidden;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-animation: rotate 2s linear infinite;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    0%   { transform: rotate(0); }
    50%  { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}


/* ═══════════════════════════════════════════════════════════════
   4. GRID STACK
═══════════════════════════════════════════════════════════════ */

.grid-stack-item-content {
    overflow: hidden;
    background-color: rgba(var(--color-panel-bg-rgb), 1);
    border-radius: 15px;
    box-shadow: 0px 0px 5px 3px rgba(var(--color-shadow-neutral-rgb), .8);
    animation: fadeInAnimation ease .7s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    container-type: inline-size;
}

@keyframes fadeInAnimation {
    0%   { transform: translateY(-100%); }
    40%  { transform: translateY(1%); }
    55%  { transform: translateY(-0.5%); }
    70%  { transform: translateY(0.2%); }
    85%  { transform: translateY(-0.1%); }
    100% { transform: translateY(0%); }
}

.grid-stack > .grid-stack-item > .ui-resizable-se {
    width: 32px;
    height: 32px;
    background-image: none !important;
    background-color: var(--color-gray) !important;
    -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'%3e%3cpath d='m10 3 2 2H8l2-2v14l-2-2h4l-2 2'/%3e%3c/svg%3e") center / contain no-repeat !important;
    mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'%3e%3cpath d='m10 3 2 2H8l2-2v14l-2-2h4l-2 2'/%3e%3c/svg%3e") center / contain no-repeat !important;
    transition: background-color .15s, opacity .15s;
}

    .grid-stack > .grid-stack-item > .ui-resizable-se:hover {
        text-decoration: none;
        opacity: 1;
        background-color: var(--color-brand) !important;
    }


/* ═══════════════════════════════════════════════════════════════
   5. WIDGET LAYOUT
═══════════════════════════════════════════════════════════════ */

.widget {
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.widget-outer-container {
    position: relative;
}

.widget-header-row {
    position: relative;
    z-index: 25;
    /* Die Reihe spannt die volle Widget-Breite auf, auch über den Kartenbereich
       (widget-svg-panel) hinweg - ohne pointer-events:none würden Klicks/Hover
       auf der Karte dort abgefangen, wo im Nav nur Leerraum zwischen den
       eigentlichen Elementen sichtbar ist. */
    pointer-events: none;
}

    .widget-header-row .pill-holder,
    .widget-header-row .detailtitle {
        pointer-events: auto;
    }

.widget-details-panel {
    margin-right: 20%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.widget-svg-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20%;
    z-index: 0;
    overflow: hidden;
    box-shadow: inset 8px 0px 16px rgba(var(--color-shadow-rgb), .08);
}

.widget-svg-fill {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════
   6. UI CONTROLS
═══════════════════════════════════════════════════════════════ */
.ui-btn {
    position: absolute;
    z-index: 26;
    opacity: 1;
    background-color: var(--color-gray);
    transition: background-color .15s;
}

    .ui-btn:hover {
        text-decoration: none;
        background-color: var(--color-brand);
    }

.move {
    top: 9px;
    left: 9px;
    height: 26px;
    width: 26px;
    cursor: move;
    -webkit-mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' class='bi bi-arrows-move' viewBox='0 0 16 16' fill='rgb(142, 141, 138)'><path fill-rule='evenodd' d='M7.646.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 1.707V5.5a.5.5 0 0 1-1 0V1.707L6.354 2.854a.5.5 0 1 1-.708-.708zM8 10a.5.5 0 0 1 .5.5v3.793l1.146-1.147a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 0 1 .708-.708L7.5 14.293V10.5A.5.5 0 0 1 8 10M.146 8.354a.5.5 0 0 1 0-.708l2-2a.5.5 0 1 1 .708.708L1.707 7.5H5.5a.5.5 0 0 1 0 1H1.707l1.147 1.146a.5.5 0 0 1-.708.708zM10 8a.5.5 0 0 1 .5-.5h3.793l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L14.293 8.5H10.5A.5.5 0 0 1 10 8'/> </svg>") center / contain no-repeat;
    mask: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' class='bi bi-arrows-move' viewBox='0 0 16 16' fill='rgb(142, 141, 138)'><path fill-rule='evenodd' d='M7.646.146a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 1.707V5.5a.5.5 0 0 1-1 0V1.707L6.354 2.854a.5.5 0 1 1-.708-.708zM8 10a.5.5 0 0 1 .5.5v3.793l1.146-1.147a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 0 1 .708-.708L7.5 14.293V10.5A.5.5 0 0 1 8 10M.146 8.354a.5.5 0 0 1 0-.708l2-2a.5.5 0 1 1 .708.708L1.707 7.5H5.5a.5.5 0 0 1 0 1H1.707l1.147 1.146a.5.5 0 0 1-.708.708zM10 8a.5.5 0 0 1 .5-.5h3.793l-1.147-1.146a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L14.293 8.5H10.5A.5.5 0 0 1 10 8'/> </svg>") center / contain no-repeat;
}

.close {
    top: 12px;
    right: 12px;
    height: 21px;
    width: 21px;
    cursor: pointer;
    -webkit-mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center / contain no-repeat;
}

.settingBtn {
    border: 1px solid var(--color-light-gray);
    border-radius: 47px;
    margin: 0px;
    z-index: 10;
    padding: 4px 7.6px;
    font-size: smaller;
    background-color: rgba(var(--color-cream-rgb), .4);
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.settingBtn:hover {
    background-color: var(--color-cream);
}

.toggleBtn {
    border: solid 1px var(--color-light-gray);
    color: var(--bs-body-color);
    background-color: var(--color-panel-bg);
    padding: 0;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    overflow: hidden;
    transition: transform .2s;
}

    .toggleBtn.active {
        border: solid 2px var(--color-brand);
    }

    .toggleBtn:hover {
        transform: scale(1.2);
    }

    .toggleBtn.edit {
        position: absolute;
        top: 10px;
        left: 10px;
    }

        .toggleBtn.edit:hover {
            color: var(--color-cream);
        }

    .toggleBtn img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }



/* ═══════════════════════════════════════════════════════════════
   7. NAVIGATION / TABS
═══════════════════════════════════════════════════════════════ */

.pill-holder {
    background-color: rgba(var(--color-cream-rgb), .9);
    border-radius: 20px;
    margin: 4px;
    backdrop-filter: blur(16px);
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-shadow: 0px 8px 16px rgba(var(--color-shadow-rgb), .06);
}

.nav-link-details {
    margin: 5px;
    background-color: unset;
    border: 1px solid var(--color-light-gray);
    border-radius: 48px;
    padding: 4px 12px 4px 12px;
    white-space: nowrap;
    color: var(--bs-body-color);
}

    .nav-link-details:hover {
        background-color: var(--color-light-gray);
    }

    .nav-link-details.active {
        margin: 5px;
        background: var(--bs-primary);
        border: 1px solid var(--color-light-gray);
        border-radius: 48px;
        color: var(--color-white);
    }

.detailtitle {
    z-index: 1;
    margin: 4px;
    background-color: rgba(var(--color-cream-rgb), .4);
    backdrop-filter: blur(16px);
    border-radius: 48px;
    padding: 6px 12px 6px 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    box-shadow: 0px 8px 16px rgba(var(--color-shadow-rgb), .06);
}
    .detailtitle.type {
        background-color: rgba(var(--bs-primary-rgb), 1);
    }

.tab-content {
    height: 100%;
}

.tab-pane {
    height: 100%;
    width: 100%;
}

@media (max-width: 1220px) {
    .shortpick {
        display: none;
    }
}


/* ═══════════════════════════════════════════════════════════════
   8. TABLE / STATUS LIST
═══════════════════════════════════════════════════════════════ */

.table-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.first-div {
    display: flex;
    flex-direction: row;
    margin-left: 40px;
    margin-top: 0px;
    margin-right: 5px;
    margin-bottom: 3px;
    align-items: center;
    z-index: 25;
}

.second-div {
    flex-grow: 1;
    overflow: auto;
}

.search-wrapper {
    position: relative;
    display: inline-block;
    width: 50%;
    margin-top: 4px;
    margin-left: auto;
}

    .search-wrapper input {
        z-index: 1;
        border-radius: 47px;
    }

.clear-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--color-gray);
}

    .clear-icon:hover {
        color: var(--bs-body-color);
    }

table {
    width: 100%;
}

thead {
    position: sticky;
    top: 0px;
    background-color: rgba(var(--color-panel-bg-rgb), 1);
    z-index: 20;
}

tr td {
    border: .1px solid var(--color-light-gray);
    padding: 5px;
    cursor: pointer;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
tr > td:last-of-type {
    border-right: none;
}

tr > td:first-of-type {
    border-left: none;
}
th {
    padding: 3px;
    cursor: pointer;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

tbody tr:hover {
    background-color: rgba(var(--color-shadow-rgb), .03);
}

.status {
    display: block;
    width: 10px;
    height: 10px;
    margin: 5px 3px !important;
}

    .status.alive {
        animation: blinker 2s cubic-bezier(0.35, 0.47, 0.7, 1.57) infinite;
    }

    .status.struggle {
        animation: blinker 1s cubic-bezier(0.35, 0.47, 0.7, 1.57) infinite;
    }

@keyframes blinker {
    50% { opacity: 0; }
}

.status-element {
    margin: 2px 10px 2px 5px;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


/* ═══════════════════════════════════════════════════════════════
   9. GRAPHS / CHARTS
═══════════════════════════════════════════════════════════════ */

.graphcontainer {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.graph-toolbar {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    justify-content: space-between;
    gap: 6px;
    font-size: 1rem;
    line-height: 1.2;
}

.graph-period-switch,
.graphlayercontrol {
    flex: 0 1 auto;
    min-height: 2.4em;
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    padding: 4px;
    border-radius: 10px;
    margin: 0;
    gap: 6px;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    .graph-period-switch .nav-link-details {
        margin: 0 2px;
        padding: 2px 8px;
    }

    .graph-toolbar select,
    .graph-toolbar .form-check-label {
        font-size: inherit;
        line-height: inherit;
    }

    .graph-toolbar .form-check.form-switch {
        padding: 0 2px;
    }

.graph-plot-area {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

.graph {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    resize: none !important;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.metricChart {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
}

.graph:hover + div {
    opacity: 0.4;
    background-color: var(--color-light-gray);
    transition-duration: 500ms;
    z-index: 0;
}

.dygraph-axis-label {
    font-size: 11px;
}

.dygraph-roller {
    border: 1px solid var(--color-light-gray);
    border-radius: 3px;
    bottom: 0 !important;
    left: unset !important;
    right: 0px;
    width: 40px;
}

.dygraph-label {
    font-size: 15px;
    font-family: "DM Sans", sans-serif;
}

.dygraph-y2label {
    transform: rotate(-180deg);
}

.dygraph-legend {
    position: absolute;
    background-color: var(--color-white) !important;
    border-radius: 3px;
    pointer-events: none;
    transition-duration: 100ms;
    z-index: 400;
    padding: 8px;
    text-align: center;
    width: fit-content;
    top: 20% !important;
}

.reportField {
    background-color: var(--color-white);
    position: absolute;
    width: 1450px;
    height: 400px;
    z-index: 10;
    left: -9999px;
    top: 0;
    resize: none !important;
}


/* ═══════════════════════════════════════════════════════════════
   10. MAP
═══════════════════════════════════════════════════════════════ */

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

.map-container {
    position: relative;
    height: calc(100vh - 20px);
    margin: 5px;
    border-radius: 15px;
    box-shadow: 0px 0px 5px 3px rgba(var(--color-shadow-neutral-rgb), .8);
    animation: fadeInAnimation ease .7s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

.settingPanel {
    position: absolute;
    z-index: 1;
    top: 10px;
    right: 10px;
    height: fit-content;
    width: 300px;
    border-radius: 15px;
    background-color: rgba(var(--color-panel-bg-rgb), .8);
    padding: 8px;
    backdrop-filter: blur(6px);
}

gmp-map-3d {
    width: 100%;
    height: 100%;
    border-radius: 15px;
}

.vAygCK-api-load-alpha-banner {
    display: none;
}

.maplibregl-popup-content {
    pointer-events: none;
    max-width: 400px;
    font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;
    background-color: rgba(var(--color-white-rgb), 0.8);
    backdrop-filter: blur(2px);
    border: 1px solid var(--color-white);
    border-radius: 10px;
    padding: 4px;
}

.maplibregl-ctrl-bottom-right {
    right: 30px;
}

/* .maplibregl-canvas {
    border-radius: 15px;
} */

.maplibregl-ctrl-group:not(:empty) {
    border-radius: 47px;
    border: .2px solid var(--color-light-gray);
    box-shadow: 0 0 0 0px rgba(var(--color-shadow-rgb), .1);
}

.maplibregl-ctrl-group.layers-control {
    border-radius: 3px;
    background-color: var(--color-white);
}

.streetviewContainer {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}


/* ═══════════════════════════════════════════════════════════════
   11. CHECKBOXES
═══════════════════════════════════════════════════════════════ */

.checkcontainer {
    display: block;
    position: relative;
    padding-left: 25px;
    margin: 5px;
    cursor: pointer;
    font-size: 13px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    .checkcontainer input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
        height: 0;
        width: 0;
    }

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--color-light-gray);
    border-radius: 4px;
}

.checkcontainer:hover input ~ .checkmark {
    background-color: var(--color-light-gray);
}

.checkcontainer input:checked ~ .checkmark {
    background-color: var(--bs-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkcontainer input:checked ~ .checkmark:after {
    display: block;
}

.checkcontainer .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid var(--color-white);
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}


/* ═══════════════════════════════════════════════════════════════
   12. SLIDERS (noUiSlider)
═══════════════════════════════════════════════════════════════ */

.slider-round {
    height: 25px;
    border-radius: 5px;
}

.noUi-connects {
    background: var(--color-white);
    box-shadow: none;
    border-radius: 0px;
    border: 1px solid #D3D3D3;
    border-right: none;
    border-left: none;
}

.noUi-target {
    border-radius: 0px;
    border: none;
    box-shadow: none;
}

    .slider-round .noUi-connect {
        background: var(--bs-primary);
        cursor: pointer;
        width: 100%;
    }

        .slider-round .noUi-connect:hover {
            background: var(--color-brand);
        }

    .slider-round .noUi-handle {
        height: 30px;
        width: 10px;
        top: -2.5px;
        border-radius: 10px;
        cursor: pointer;
    }

    .noUi-handle.noUi-handle-lower {
        right: 0px;
    }

    .noUi-handle.noUi-handle-upper {
        right: -10px;
    }

        .slider-round .noUi-handle:hover {
            transform: scale(1.1);
        }

    .slider-round .noUi-handle:before,
    .slider-round .noUi-handle:after {
        display: none;
    }

.noUi-pips-horizontal {
    height: 10px;
}


/* ═══════════════════════════════════════════════════════════════
   13. EDIT / DETAIL PANEL
═══════════════════════════════════════════════════════════════ */

.editDetails {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.editPartial {
    display: none;
}

    .editPartial.show {
        display: block;
    }

.detailCol {
    width: 50%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.log-card {
    border-left: 6px solid var(--color-panel-bg);
    padding: 5px 8px 15px 8px;
    grid-column: 1 / -1;
}

.log-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.log-title-wrapper {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.log-title-prefix {
    flex: 0 0 auto;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bs-body-color);
    white-space: nowrap;
    border-bottom: 1px solid transparent;
}

    .log-title-prefix:not(:empty)::after {
        content: ':\00a0';
    }

.log-title-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

    .log-title-input:focus {
        outline: none;
        border-bottom: 1px solid var(--bs-border-color);
    }

.log-card-meta {
    flex: 0 0 auto;
    font-size: 0.72rem;
    color: var(--color-gray);
    white-space: nowrap;
}

.log-table-scroll {
    overflow-x: auto;
}

.log-table {
    --log-cols: auto minmax(100px, 1fr) auto auto auto auto auto auto;
    display: grid;
    grid-template-columns: var(--log-cols);
    min-width: min-content;
}

/* Kopf- und jede Datenzeile sind eigene Grids, aber per subgrid an die Spalten
   des gemeinsamen .log-table-Grids gebunden - dadurch bleiben sie über alle
   Zeilen hinweg synchron, obwohl jede Zeile ihre eigene Box (Rand, Hover,
   Padding) behält statt alle Zellen flach in ein einziges Grid zu packen. */
.log-table-head,
.log-row-line {
    display: grid;
    grid-template-columns: subgrid;
    grid-column: 1 / -1;
    gap: 6px;
    align-items: center;
}

.log-table-head {
    padding: 0 8px 4px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-gray);
}

/* .log-row und die Liste darüber (cardsContainer) tragen keine eigene Optik mehr -
   per display:contents werden .log-row-line/.log-card direkte Grid-Items von
   .log-table, wie es subgrid verlangt. Die Trennlinie zwischen Einträgen sitzt
   deshalb auf .log-row-line statt auf .log-row. */
.log-row,
.log-table-body {
    display: contents;
}

.log-table-empty {
    grid-column: 1 / -1;
    padding: 8px 14px;
}

.log-row-line {
    padding: 4px 8px 4px 8px;
    border-left: 6px solid var(--log-status-color, var(--color-panel-bg));
    border-top: 1px solid var(--bs-border-color);
}

.log-row .log-card {
    border-left-color: var(--log-status-color, var(--color-panel-bg));
}

    .log-row:hover .log-row-line,
    .log-row:hover .log-card {
        background-color: rgba(var(--color-shadow-rgb), .03);
    }

.log-cell-uid {
    font-size: 0.72rem;
    color: var(--color-gray);
    white-space: nowrap;
}

.log-cell-input {
    min-width: 0;
    font-size: 0.8rem;
}

.log-cell-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.log-row-status-badge {
    background-color: rgba(var(--color-panel-bg-rgb), 1);
    border: 0.5px solid rgba(var(--color-shadow-rgb), 0.1);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.72rem;
/*    color: var(--color-gray);*/
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(var(--color-shadow-rgb), .25);
    z-index: 2000;
}


.log-card input[readonly] {
    background-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.detailCol{
    width: 50%;
}

.detailCol.detailCol--full {
    width: 100%;
}

.editDetails input.form-control[readonly] {
    background-color: var(--color-light-gray);
    cursor: default;
}

.editDetails input.form-control:not([readonly]) {
    background-color: var(--color-white);
}

.mf-edit-handle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--color-white);
    box-shadow: 0 0 4px rgba(var(--color-shadow-rgb), .6);
    cursor: grab;
}

.mf-edit-handle-center {
    background-color: var(--bs-primary);
}

.mf-edit-handle-rotate {
    width: 12px;
    height: 12px;
    background-color: var(--bs-primary);
}

.mf-edit-handle:active {
    cursor: grabbing;
}

.lane-rect {
    cursor: pointer;
    transition-duration: 100ms;
}

    .lane-rect.hover {
        stroke-width: 3;
        fill-opacity: .2;
    }

    .lane-rect.active {
        stroke: var(--color-brand);
        stroke-width: 4;
        fill-opacity: .2;
    }

    .backup-rect.hover {
        border: 2px solid var(--color-brand) !important;
    }
    .backup-rect.active {
        border: 2px solid var(--color-brand) !important;
    }

#tooltip {
    background: var(--color-white);
    padding: 4px;
    border-radius: 5px;
    pointer-events: none; /* verhindert Flackern beim Hover */
    position: absolute;
    z-index: 9999;
}


/* ═══════════════════════════════════════════════════════════════
   14. CONTEXT MENU
═══════════════════════════════════════════════════════════════ */

#contextMenu {
    display: none;
    position: absolute;
    background: var(--color-white);
    z-index: 1000;
    border-radius: 5px;
}

    #contextMenu ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    #contextMenu li {
        padding: 8px 12px;
        cursor: pointer;
    }

        #contextMenu li:hover {
            background-color: var(--color-light-gray);
            border-radius: 5px;
        }

.log-context-menu {
    display: flex;
    flex-direction: row;
    background-color: rgba(var(--color-panel-bg-rgb), 1);
    border-radius: 5px;
    border: 0.5px solid rgba(var(--color-shadow-rgb), 0.1);
    overflow: hidden;
    white-space: nowrap;
    /* Jetzt fixed/frei über dem Inhalt positioniert (siehe showLogContextMenu),
       daher Schatten + hoher z-index, damit es über Tabelle/Karte sichtbar liegt. */
    z-index: 2000;
    box-shadow: 0 2px 8px rgba(var(--color-shadow-rgb), .25);
}

.log-context-menu-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
}

    .log-context-menu-item + .log-context-menu-item {
        border-left: 1px solid var(--bs-border-color);
    }

    .log-context-menu-item:hover {
        background-color: var(--color-light-gray);
    }



/* ═══════════════════════════════════════════════════════════════
   15. IMPRINT / LOGO
═══════════════════════════════════════════════════════════════ */

.imprint-container {
    position: relative;
    height: calc(100vh - 20px);
    border-radius: 15px;
    box-shadow: 0px 0px 5px 3px rgba(var(--color-shadow-neutral-rgb), .8);
    animation: fadeInAnimation ease .7s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
    background-image: url('/png/background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: right top;
    background-color: rgba(var(--color-panel-bg-rgb), 1);
    margin: 5px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-card {
    z-index: 1;
    background: rgba(var(--color-panel-bg-rgb), 0.97);
    border: 0.5px solid rgba(var(--color-shadow-rgb), 0.1);
    border-radius: 15px;
    padding: 2.25rem 2rem;
    box-shadow: 0 1px 3px rgba(var(--color-shadow-rgb), 0.07), 0 6px 20px rgba(var(--color-shadow-rgb), 0.06);
}

.custom-logo {
    padding: 10px;
    position: fixed;
    bottom: 25px;
    display: inline-block;
    border-radius: 15px;
    background: rgba(var(--color-panel-bg-rgb), 0.97);
    border: 0.5px solid rgba(var(--color-shadow-rgb), 0.1);
    box-shadow: 0 1px 3px rgba(var(--color-shadow-rgb), 0.07), 0 6px 20px rgba(var(--color-shadow-rgb), 0.06);
}

    .custom-logo.left {
        left: 20px;
        width: 18vw;
    }

    .custom-logo.central {
        width: 20vw;
    }

    .custom-logo.right {
        right: 20px;
        width: 12vw;
    }

.copyright {
    position: absolute;
    left: 6px;
    bottom: 3px;
    color: var(--color-white);
}


/* ═══════════════════════════════════════════════════════════════
   16. IDENTITY / AUTH FORMS
═══════════════════════════════════════════════════════════════ */

.lf-title {
    font-size: 30px;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.25rem;
}

    .lf-title.lf-title-danger {
        color: var(--bs-danger);
    }

.lf-sub {
    font-size: 18px;
    color: var(--bs-secondary-color);
    margin-bottom: 1.75rem;
}

.lf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), 0.08);
    margin-bottom: 1.25rem;
    color: var(--bs-primary);
}

    .lf-icon.lf-icon-warning {
        background: rgba(var(--bs-warning-rgb), 0.1);
        color: var(--bs-warning);
    }

    .lf-icon.lf-icon-danger {
        background: rgba(var(--bs-danger-rgb), 0.08);
        color: var(--bs-danger);
    }

.lf-section {
    font-size: 20px;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.25rem;
}

.lf-section-sub {
    font-size: 14px;
    color: var(--bs-secondary-color);
    margin-bottom: 1.5rem;
}

/* Farbige Hinweisboxen: Basis + Farb-Modifier (info/warning/danger) */
.lf-box {
    font-size: 14px;
    line-height: 1.6;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 1.5rem;
    color: var(--bs-body-color);
}

    .lf-box.lf-box-sm {
        padding: 12px 14px;
        margin-bottom: 1rem;
    }

    .lf-box.lf-box-info {
        background: rgba(var(--bs-primary-rgb), 0.05);
        border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    }

    .lf-box.lf-box-warning {
        background: rgba(var(--bs-warning-rgb), 0.06);
        border: 1px solid rgba(var(--bs-warning-rgb), 0.25);
    }

    .lf-box.lf-box-danger {
        background: rgba(var(--bs-danger-rgb), 0.06);
        border: 1px solid rgba(var(--bs-danger-rgb), 0.2);
    }

/* Formularfelder */
.lf-field {
    margin-bottom: 1rem;
}

    .lf-field label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: var(--bs-body-color);
        margin-bottom: 5px;
    }

    .lf-field .form-control {
        height: 42px;
        padding: 0 12px;
        font-size: 14px;
        border: 1px solid var(--bs-border-color);
        border-radius: 6px;
        background: var(--bs-body-bg);
        color: var(--bs-body-color);
        transition: border-color 0.15s, box-shadow 0.15s;
    }

    .lf-field .form-control:focus {
        border-color: var(--bs-primary);
        box-shadow: none;
        outline: none;
    }

    .lf-field .form-control:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        background: var(--bs-border-color);
    }

    .lf-field .form-control.is-invalid {
        border-color: var(--bs-danger);
        box-shadow: none;
    }

.lf-field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

    .lf-field-row label {
        margin: 0;
    }

.lf-name-row {
    display: flex;
    gap: 0.75rem;
}

    .lf-name-row .lf-field {
        flex: 1;
        min-width: 0; /* verhindert Overflow bei langen Placeholder-Texten */
    }

.lf-email-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .lf-email-row .form-control {
        flex: 1;
    }

.lf-verified {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 42px;
    color: var(--bs-success);
    font-size: 16px;
    flex-shrink: 0;
}

.lf-link-btn {
    font-size: 13px;
    color: var(--bs-primary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
    display: inline-block;
}

    .lf-link-btn:hover {
        text-decoration: underline;
    }

.lf-input-wrap {
    position: relative;
}

    .lf-input-wrap .form-control {
        padding-right: 40px;
    }

.lf-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--bs-secondary-color);
    display: flex;
    align-items: center;
    line-height: 1;
}

    .lf-eye:hover {
        color: var(--bs-body-color);
    }

.lf-divider {
    height: 1px;
    background: var(--bs-border-color);
    margin: 1.25rem 0 1.5rem;
}

/* Buttons: .lf-btn ist die volle Breite (Standard), Modifier für
   Danger-Farbe und für kompakte Inline-Buttons (z.B. Aktionsleisten) */
.lf-btn {
    display: block;
    width: 100%;
    height: 42px;
    line-height: 42px;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    background: var(--bs-primary);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: 0.5rem;
}

    .lf-btn:hover {
        background: var(--color-brand);
        color: var(--color-white);
    }

    .lf-btn:active {
        transform: scale(0.99);
    }

    .lf-btn.lf-btn-danger {
        background: var(--bs-danger);
    }

        .lf-btn.lf-btn-danger:hover {
            background: var(--color-brand);
        }

    .lf-btn.lf-btn-inline {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: 38px;
        line-height: normal;
        padding: 0 16px;
        margin-top: 0;
    }

.lf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

/* Sonstiges */
.lf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 1.5rem;
}

    .lf-table td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--bs-border-color);
        vertical-align: middle;
    }

    .lf-table td:last-child {
        text-align: right;
    }

.lf-provider-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lf-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

    .lf-steps li {
        counter-increment: step-counter;
        padding: 1rem 1rem 1rem 3rem;
        position: relative;
        border-bottom: 1px solid var(--bs-border-color);
        font-size: 14px;
        line-height: 1.6;
    }

        .lf-steps li:last-child {
            border-bottom: none;
        }

        .lf-steps li::before {
            content: counter(step-counter);
            position: absolute;
            left: 0;
            top: 1rem;
            width: 24px;
            height: 24px;
            background: var(--bs-primary);
            color: var(--color-white);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 600;
        }

.lf-code {
    font-family: monospace;
    font-size: 13px;
    background: var(--bs-border-color);
    border: 1px solid var(--bs-border-color);
    border-radius: 4px;
    padding: 4px 8px;
    letter-spacing: 0.05em;
}

.lf-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 0.5rem;
}

.lf-footer {
    font-size: 13px;
    color: var(--bs-secondary-color);
    text-align: center;
    margin-top: 1.25rem;
}

    .lf-footer a {
        font-size: 13px;
        color: var(--bs-primary);
        text-decoration: none;
    }

    .lf-footer a:hover {
        text-decoration: underline;
    }

.validation-summary-errors {
    font-size: 13px;
    color: var(--bs-danger);
    background: rgba(var(--bs-danger-rgb), 0.06);
    border: 1px solid rgba(var(--bs-danger-rgb), 0.2);
    border-radius: 6px;
    padding: 9px 12px;
    margin-bottom: 1rem;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 1rem;
    }

.text-danger {
    font-size: 12px;
    margin-top: 4px;
}
