
/* Shared framed tiles. Themes can override this class without component-specific selectors. */
.z-tile {
    padding: 1.25rem;
    border: 1px solid var(--rz-base-300);
    border-radius: 12px;
    background: transparent;
    color: inherit;
}

/* Logo */
.headerLogo {
    background-image: url('img/zerocode_trans.png') !important;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    height: 32px !important;
    width: 122px !important;
}   

/* Where Am I Text in the header*/
.whereAmI {
    display: block;
    font-size: 1.2em;
    margin: 0;
    font-weight: 400;
    unicode-bidi: isolate;
    margin-left: 25px;
}

/* Where Am I, wenn es auf Mobile unter den Header rutscht */
.whereAmI-mobile {
    display: block;
    font-size: 1.1em;
    font-weight: 400;
    padding: 4px 15px 6px;
    border-bottom: 1px solid var(--rz-border, #e0e0e0);
    unicode-bidi: isolate;
}

/* Container in der rechten Sidebar fuer die auf Mobile ausgelagerten Header-Actions */
.sidebar-actions-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--rz-border, #e0e0e0);
}

/* Radzen setzt bei einer frisch gemounteten Sidebar mit Expanded=false keine
   .rz-sidebar-collapsed-Klasse. Die Sidebar hat also nur .rz-sidebar (Basis = volle
   Breite) und erscheint initial offen. Wir erzwingen fuer die rechte Settings-Sidebar
   den eingeklappten Zustand, solange .rz-sidebar-expanded nicht gesetzt ist. Sobald
   der User das Zahnrad klickt, bekommt die Sidebar die Expanded-Klasse und die Regel
   greift nicht mehr.

   Je nach Radzen-/Theme-Kombination taucht die Positionsklasse als .rz-sidebar-end
   oder .rz-sidebar-right auf, deshalb decken wir beide Varianten ab. */
.rz-layout > .rz-sidebar.rz-sidebar-end:not(.rz-sidebar-expanded),
.rz-layout > .rz-sidebar.rz-sidebar-right:not(.rz-sidebar-expanded) {
    width: 0 !important;
    min-width: 0 !important;
    flex: 0 0 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Radzen drueckt bei <=768px Header/Footer nach rechts, wenn die linke Sidebar
   kollabiert und die rechte expanded ist (Default-Regel in Radzen.Blazor default.css).
   Das erzeugt die leere Spalte links neben Header und Footer. Wir wollen den gewohnten
   Layout-Flow behalten. */
@media (max-width: 768px) {
    .rz-layout:has(> .rz-sidebar-collapsed + .rz-sidebar-expanded) {
        justify-content: normal !important;
    }

    .rz-layout:has(> .rz-sidebar-collapsed + .rz-sidebar-expanded) .rz-header,
    .rz-layout:has(> .rz-sidebar-collapsed + .rz-sidebar-expanded) .rz-footer {
        margin-inline-start: 0 !important;
    }
}

/* Mobile-Layout — Sidebars legen sich ueber den Content, statt ihn zu verschieben.
   Im Radzen-Layout-Grid sitzt die Sidebar normal in einer `auto`-Spalte und draengt
   `.rz-body` zur Seite. Sobald der Mobile-Modus aktiv ist — schmaler Viewport ODER der
   erzwungene "Mobile Device Mode" — setzt MainLayout per JS die Klasse `z-mobile-layout`
   auf <body>. Dann nehmen wir beide Sidebars aus dem Grid-Fluss (position: fixed),
   reduzieren das Layout auf eine Spalte und schieben die Sidebars per transform ueber
   den Content — aufloesungsunabhaengig. */
body.z-mobile-layout .rz-layout {
    grid-template-columns: 1fr !important;
    grid-template-areas: "rz-header" "rz-body" "rz-footer" !important;
}

body.z-mobile-layout .rz-layout > .rz-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    width: var(--rz-sidebar-width, 250px) !important;
    max-width: 86vw;
    opacity: 1 !important;
    z-index: 900;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.22s ease;
}

/* Linkes Hauptmenue: faehrt von links ein. */
body.z-mobile-layout .rz-layout > .rz-sidebar.rz-sidebar-start,
body.z-mobile-layout .rz-layout > .rz-sidebar.rz-sidebar-left {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

/* Rechtes Settings-Menue: faehrt von rechts ein. */
body.z-mobile-layout .rz-layout > .rz-sidebar.rz-sidebar-end,
body.z-mobile-layout .rz-layout > .rz-sidebar.rz-sidebar-right {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

/* Expanded -> vollstaendig eingefahren. */
body.z-mobile-layout .rz-layout > .rz-sidebar.rz-sidebar-expanded {
    transform: translateX(0);
}

/* Geschlossene Sidebars duerfen ausserhalb des Sichtbereichs keine Taps abfangen. */
body.z-mobile-layout .rz-layout > .rz-sidebar:not(.rz-sidebar-expanded) {
    pointer-events: none;
}

/* Die 1fr-Spalte des Radzen-Layout-Grids hat ein auto-Minimum (= min-content der
   Grid-Items). Ein einziges nicht umbrechbares Element in Header, Body oder Footer
   (z.B. die nowrap-Lizenzzaehler im Footer der Benutzer-Maske) macht sonst die ganze
   Spalte — und damit die Seite — breiter als den Viewport: horizontales Scrollen,
   rechte Bedienelemente abgeschnitten. min-width:0 laesst die Spalte auf Viewport-
   Breite schrumpfen; Header/Footer clippen ueberlaufenden Inhalt statt ihn
   ueberzustehen (Body clippt nicht, damit Seitenprobleme sichtbar bleiben). */
body.z-mobile-layout .rz-layout > .rz-header,
body.z-mobile-layout .rz-layout > .rz-body,
body.z-mobile-layout .rz-layout > .rz-footer {
    min-width: 0;
}

body.z-mobile-layout .rz-layout > .rz-header,
body.z-mobile-layout .rz-layout > .rz-footer {
    overflow-x: clip;
}

/* Abdunkelnder Backdrop hinter dem offenen Menue — von MainLayout gerendert (nur wenn
   _isMobile), daher kein Klassen-Gate noetig. */
.mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 899;
    background: rgba(0, 0, 0, 0.45);
}

/* Rote Farbe beim mouseover eines menuitems */
.menu-item-hover-danger:hover .rz-navigation-item-icon,
.menu-item-hover-danger:hover .rz-navigation-item-text {
    color: var(--rz-danger) !important;
}

/* Konfig-Modus: flache Liste der Top-Level-Hauptmenues mit Sichtbarkeits-Switch */
.main-menu-config-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 4px;
    width: 100%;
    box-sizing: border-box;
}

.main-menu-config-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.main-menu-config-row:hover {
    background-color: var(--rz-base-200, rgba(0, 0, 0, 0.04));
}

.main-menu-config-title {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--rz-text-color, inherit);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-menu-config-row > .rz-switch {
    flex-shrink: 0;
    margin-left: auto;
}


.menu-item-hover-frozen:hover .rz-navigation-item-icon,
.menu-item-hover-frozen:hover .rz-navigation-item-text {
    color: #00bcd4 !important;
    text-shadow: 0 0 8px rgba(0, 188, 212, 0.6), 0 0 16px rgba(0, 188, 212, 0.4), 0 0 24px rgba(0, 188, 212, 0.2) !important;
    filter: drop-shadow(0 0 3px rgba(0, 188, 212, 0.8));
    position: relative;
}



.frozen-button {
    background: linear-gradient(135deg, #00bcd4, #26c6da, #4dd0e1) !important;
    border: 2px solid #00acc1 !important;
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

    .frozen-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: left 0.5s ease;
    }

    .frozen-button:hover {
        background: linear-gradient(135deg, #0097a7, #00acc1, #26c6da) !important;
        box-shadow: 0 0 30px rgba(0, 188, 212, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
        transform: translateY(-1px) !important;
    }

        .frozen-button:hover::before {
            left: 100%;
        }

    .frozen-button:active {
        transform: translateY(0) !important;
        box-shadow: 0 0 15px rgba(0, 188, 212, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    }

    /* Frost-Effekt */
    .frozen-button::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 2px, transparent 2px), radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.2) 1px, transparent 1px), radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.25) 1.5px, transparent 1.5px);
        pointer-events: none;
    }



/* Sucking Animation */
.sucking {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.particle {
    position: fixed;
    pointer-events: none;
    opacity: 0.8;
    z-index: 9999;
}


.rz-datatable td,
.rz-datatable th,
.rz-grid-table td,
.rz-grid-table th {
    user-select: text !important;
}


.dnone{
    display:none;
}


html, body, .rz-layout-main, .rz-root {
    height: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}


.rz-body-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 0 !important;
    margin: 0 !important;
}


.rz-grid-grow {
    flex: 1 1 auto;
    min-height: 0;
}

.rz-body-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
}



/* Standard: Text ist sichtbar */
.responsive-menu .rz-navigation-item-text {
    display: inline;
    transition: opacity 0.2s;
}

/* Kleine Displays: Nur noch das Icon! */
@media (max-width: 1350px) {
    .responsive-menu .rz-navigation-item-text {
        display: none !important;
    }
}







/* SITE LOADER */
/* ZERPLite Connecting Overlay */
.zerplite-connecting {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: #0b0f1a;
    color: #e5e7eb;
    z-index: 9999;
    transition: opacity .25s ease;
}

    .zerplite-connecting.hidden {
        opacity: 0;
        pointer-events: none;
    }

.zerplite-connecting-card {
    min-width: 260px;
    max-width: 90vw;
    padding: 24px 20px;
    border-radius: 16px;
    background: #111827;
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    display: grid;
    gap: 10px;
    justify-items: center;
}

.zerplite-title {
    font-size: 18px;
    font-weight: 600;
}

.zerplite-sub {
    font-size: 13px;
    opacity: .85;
}

/* animierter Punkt */
.zerplite-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: #60a5fa;
    animation: zl-pulse 1.2s infinite ease-in-out;
}

@keyframes zl-pulse {
    0% {
        transform: scale(1);
        opacity: .8;
    }

    50% {
        transform: scale(1.6);
        opacity: .3;
    }

    100% {
        transform: scale(1);
        opacity: .8;
    }
}
/* ===========================
   Item Group Tree – Komplett
   =========================== */

.tree-shell{
    max-height: 30vh;
    overflow-y: auto;
}

.generic-group-tree .rz-treenode-content-selected .rz-treenode-label {
    border-radius: var(--rz-tree-node-selected-border-radius);
    color: var(--rz-tree-node-selected-color);
    background-color: var(--rz-tree-node-selected-background-color);
}

.generic-group-tree .rz-treenode-content-selected:hover .rz-treenode-label:hover {
    border-radius: var(--rz-tree-node-selected-border-radius);
    color: var(--rz-tree-node-selected-color);
    background-color: var(--rz-tree-node-selected-background-color);
}

/* ----- Scope-Basis ----- */
.generic-group-tree .root-node {
    font-weight: 600;
}

.generic-group-tree .rz-treenode {
    width: 100% !important;
}

.generic-group-tree .rz-tree .rz-treenode-content {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.generic-group-tree .rz-tree .rz-treenode-label {
    display: inline-flex;
    align-items: center;
    width: 100%;
}
/* ----- Node Row Layout ----- */
.generic-group-tree .node-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 28px;
    width: 100%;
    min-width: 0;
}

    .generic-group-tree .node-row > span:first-child {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
/* ----- Actions (grundsätzlich versteckt) ----- */
.generic-group-tree .rz-treenode .node-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-left: auto;
    -webkit-user-drag: none;
    user-select: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease;
}
/* ----- Sichtbarkeit NUR für direkt gehoverten/gefocussten Label ----- */
.generic-group-tree .rz-treenode-label:hover > .node-row > .node-actions,
.generic-group-tree .rz-treenode-label:focus-within > .node-row > .node-actions {
    opacity: 1;
    visibility: visible;
}
/* ----- Editing sperrt globale Hover-Buttons (aber NICHT beim editierten Knoten) ----- */
.generic-group-tree.tree-has-editing .rz-treenode-label:hover > .node-row:not(.editing) > .node-actions,
.generic-group-tree.tree-has-editing .rz-treenode-label:focus-within > .node-row:not(.editing) > .node-actions {
    opacity: 0;
    visibility: hidden;
}
/* ... beim aktuell editierten Knoten immer anzeigen (auch bei Hover/Fokus) */
.generic-group-tree .node-row.editing > .node-actions,
.generic-group-tree .node-row.editing:hover > .node-actions,
.generic-group-tree .node-row.editing:focus-within > .node-actions {
    opacity: 1;
    visibility: visible;
}
/* ----- Editing Visual ----- */
.generic-group-tree .node-row.editing {
    background: rgba(0,0,0,0.06);
    border-radius: .4rem;
    padding: .1rem .25rem;
    outline: 1px solid rgba(0,0,0,0.08);
}
/* ----- Moving (optimistic update) ----- */
.generic-group-tree .node-row.moving {
    opacity: .55;
    outline: 1px dashed #9e9e9e;
    border-radius: .4rem;
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0, rgba(0,0,0,0.03) 6px, rgba(0,0,0,0.00) 6px, rgba(0,0,0,0.00) 12px);
    transition: opacity .25s ease;
}
/* ----- Hover-Highlights bei Drag & Drop (optional) ----- */
.generic-group-tree .node-row.drop-hover-allowed {
    background: rgba(76, 175, 80, 0.08);
    outline: 2px dashed #4CAF50;
    border-radius: .4rem;
}

.generic-group-tree .node-row.drop-hover-forbidden {
    background: rgba(229, 57, 53, 0.08);
    outline: 2px dashed #E53935;
    border-radius: .4rem;
}
/* ----- Suche Highlight ----- */
.generic-group-tree .search-highlight {
    background-color: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
    text-decoration: none;
}
/* Während Drag keine Klicks auf Aktionen zulassen */
.dragging-subnode .node-actions {
    pointer-events: none;
}

.generic-group-tree .node-row.selected {
    background: rgba(63, 81, 181, 0.10);
    outline: 2px solid rgba(63, 81, 181, 0.35);
    border-radius: .4rem;
}
/* Optional: Hover background for entire node label */
.generic-group-tree .rz-treenode-label:hover {
    background: rgba(0, 0, 0, 0.05);
    border-radius: .4rem;
}
/* Search box sticky in Select mode */
.generic-group-tree.tree-select .rz-form-field {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--rz-input-background-color, #fff);
    padding: .5rem;
    margin-bottom: 0;
}

.generic-group-tree.tree-select .rz-tree {
    max-height: calc(50vh - 2.5rem); /* Adjust for search box and actions */
    overflow-y: auto;
}



/* ===== GenericDropDownTree (DropDown-Tree) ===== */
/* ===== Base ===== */
.ggt-picker {
    position: relative;
    display: block;
    width: 100%;
}

    /* Radzen-Message unter dem Feld */
    .ggt-picker + .rz-message {
        display: block;
        margin-top: 4px;
    }

/* ===== Trigger (Kopf des Dropdowns) ===== */
.ggt-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    height: var(--rz-input-height, 2.5rem);
    padding: 0 var(--rz-input-padding-x, .75rem);
    cursor: pointer;
    /* neutrale Defaults (außerhalb Radzen-FormField) */
    background: var(--rz-input-background-color, #fff);
    border: 1px solid var(--rz-input-border-color, rgba(0,0,0,.23));
    border-radius: var(--rz-border-radius, 4px);
}

/* Text im Trigger */
.ggt-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    margin-right: 0.5rem; /* Platz für Caret-Gruppe */
}

.ggt-placeholder {
    color: rgb(135, 164, 196);
}

/* Caret rechts */
.ggt-caret,
.rz-dropdown-trigger {
    display: flex;
    align-items: center;
    margin-left: .25rem;
}

/* ===== Radzen FormField – Varianten und States ===== */

/* FILLED-Variante: Hintergrund + Unterkante statt voller Rahmen */
.rz-form-field.rz-variant-filled .ggt-trigger {
    background: var(--rz-form-field-filled-bg, var(--rz-input-bg, rgba(0,0,0,.04)));
    border: 1px solid transparent;
    border-bottom: 1px solid var(--rz-form-field-border, rgba(0,0,0,.42));
    border-radius: var(--rz-border-radius, 4px) var(--rz-border-radius, 4px) 0 0;
    box-shadow: none;
}


/* Gilt nur, wenn das Control in einem RadzenFormField steckt */
.rz-form-field .ggt-trigger {
    /* Höhe bleibt gleich, Inhalt rutscht minimal nach unten */
    height: var(--rz-input-height, 2.5rem);
    padding-top: 15px;
}

    /* Chevron / Caret leicht mit verschieben, damit mittig bleibt */
    .rz-form-field .ggt-trigger .rz-dropdown-trigger,
    .rz-form-field .ggt-trigger .ggt-caret {
        transform: translateY(1.5px);
    }

/* Optional: Fokuslinie dezenter, wirkt optisch mittiger */
.rz-form-field.rz-variant-filled.rz-state-focused .ggt-trigger {
    box-shadow: 0 1px 0 0 var(--rz-primary, #3f51b5);
}

/* OUTLINED-Variante: wie Radzen-Inputs mit vollem Rahmen */
.rz-form-field.rz-variant-outlined .ggt-trigger {
    background: var(--rz-input-bg, #fff);
    border: 1px solid var(--rz-form-field-border, rgba(0,0,0,.23));
    border-radius: var(--rz-border-radius, 4px);
}

/* Hover (leicht betonen) */
.rz-form-field:hover .ggt-trigger {
    border-bottom-color: var(--rz-form-field-border-hover, rgba(0,0,0,.62));
}

/* Fokuszustand – Radzen-typische Akzentlinie unten (keine fette Box-Shadow) */
.rz-form-field.rz-state-focused .ggt-trigger {
    border-bottom-color: var(--rz-primary, #3f51b5) !important;
    box-shadow: 0 2px 0 0 var(--rz-primary, #3f51b5);
}

/* Disabled-Optik */
.rz-form-field .rz-state-disabled .ggt-trigger,
.ggt-trigger.rz-state-disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Leerer Zustand für Floating-Label (optional hilfreich) */
.rz-form-field .ggt-trigger.rz-state-empty .ggt-text {
    opacity: .8;
}


/* 1) Unterlinie des FormField-Containers abschalten */
.rz-form-field.rz-variant-filled .rz-form-field-content {
    border-bottom: none !important;
}

/* 2) Eigene Unterkante am Trigger ebenfalls neutralisieren */
.rz-form-field.rz-variant-filled .ggt-trigger {
    border-bottom: 1px solid transparent !important;
    box-shadow: none; /* falls du den Fokus-Schatten reduziert hast */
}

/* 3) Auch im Fokus keine Linie zeichnen */
.rz-form-field.rz-variant-filled.rz-state-focused .ggt-trigger {
    border-bottom-color: transparent !important;
    box-shadow: none !important;
}

/* ===== Keyboard-Fokus außerhalb Radzen (z.B. Standalone-Nutzung) ===== */
.ggt-trigger:focus {
    outline: none;
}

/* ===== Outside-Click Overlay ===== */
.ggt-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 998;
}

/* ===== Panel (Popup) ===== */
.ggt-panel {
    position: absolute;
    z-index: 99999;
    top: calc(100% + 4px);
    left: 0;
    display: flex;
    flex-direction: column;
    width: auto;
    min-width: 20rem;
    min-height: 20rem;
    max-width: calc(100vw - 24px);
    max-height: 45vh;
    /* Radzen-kompatible Optik */
    background: var(--rz-input-background-color, #fff);
    border: 1px solid var(--rz-form-field-border, rgba(0,0,0,.23));
    border-radius: var(--rz-border-radius, 4px);
    box-shadow: var(--rz-elevation-8, 0 8px 16px rgba(0,0,0,.2));
}

    /* Inhalt im Panel füllt und ist scrollbar */
    .ggt-panel .generic-group-tree,
    .ggt-panel .rz-tree {
        width: auto;
        flex: 1 1 auto;
        overflow: auto;
    }

        /* In Panel-Ansicht: keine Ellipsen */
        .ggt-panel .generic-group-tree .node-row > span:first-child {
            overflow: visible;
            text-overflow: clip;
            white-space: nowrap;
        }

/* Aktionen-Leiste unten */
.ggt-actions {
    position: sticky;
    bottom: 0;
    right: 0;
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding: .5rem;
    background: var(--rz-input-background-color, #fff);
    z-index: 1000;
    border-top: 1px solid var(--rz-form-field-border, rgba(0,0,0,.12));
}

/* Fixierte Panel-Variante (z.B. Viewport-basiert) */
.ggt-panel-fixed {
    position: fixed !important;
    max-height: 45vh;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    overflow: hidden;
    z-index: 100000;
    background: var(--rz-input-background-color, #fff);
    border: 1px solid var(--rz-form-field-border, rgba(0,0,0,.23));
    border-radius: var(--rz-border-radius, 4px);
    box-shadow: var(--rz-elevation-8, 0 8px 16px rgba(0,0,0,.2));
}

    .ggt-panel-fixed > .ggt-cell-unclip {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 0;
        overflow: auto;
    }

    .ggt-panel-fixed .rz-card {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

/* (Schreibfehler-Schutz, falls die Klasse mal ohne Punkt landet) */
ggt-panel.ggt-panel-fixed {
    position: fixed !important;
}







/* AI CHAT */
/* ---------- LAYOUT WRAPPER ---------- */
.erpchat-wrap {
    width: 100%;
    height: 100%;
    border-radius: var(--rz-border-radius, 20px);
    overflow: hidden;
    border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    background: var(--rz-body-background-color, transparent);
    box-shadow: var(--rz-shadow-2, 0 2px 10px rgba(0,0,0,.15));
}

/* ---------- CHAT SHELL ---------- */
.erpchat {
    /* "Body" Hintergrund über Radzen, aber mit dezenten Radzen-Akzenten */
    background: linear-gradient(180deg, color-mix(in srgb, var(--rz-primary, #3b82f6) 12%, transparent), transparent 30%), radial-gradient(1200px 600px at 80% -20%, color-mix(in srgb, var(--rz-secondary, #22c55e) 12%, transparent), transparent 60%), var(--rz-body-background-color, #0b0d10);
    color: var(--rz-text-color, #e8ebf0);
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 250px 1fr; /* Sidebar / Chat */
    grid-template-rows: auto 1fr auto; /* Header / Body / Composer */
}

/* ---------- SIDEBAR (conversations, ChatGPT-style) ---------- */
.erpchat-sidebar {
    grid-column: 1;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px 10px;
    background: color-mix(in srgb, var(--rz-base-background-color, #111318) 94%, var(--rz-primary, #3b82f6) 6%);
    border-right: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
}

.erpchat-header,
.erpchat-body,
.erpchat-composer {
    grid-column: 2;
}

.erpchat-side-new {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    background: color-mix(in srgb, var(--rz-primary, #3b82f6) 22%, transparent);
    color: var(--rz-text-color, #e8ebf0);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

    .erpchat-side-new:hover {
        background: color-mix(in srgb, var(--rz-primary, #3b82f6) 32%, transparent);
    }

.erpchat-side-sep {
    height: 1px;
    margin: 12px 2px;
    background: var(--rz-border-color, rgba(0,0,0,.18));
    flex: none;
}

.erpchat-side-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.erpchat-side-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--rz-text-color, #e8ebf0);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

    .erpchat-side-item:hover {
        background: color-mix(in srgb, var(--rz-primary, #3b82f6) 12%, transparent);
    }

    .erpchat-side-item.is-active {
        background: color-mix(in srgb, var(--rz-primary, #3b82f6) 20%, transparent);
        border-color: color-mix(in srgb, var(--rz-primary, #3b82f6) 45%, transparent);
    }

.erpchat-side-title {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13.5px;
}

.erpchat-side-date {
    font-size: 11px;
    color: var(--rz-text-secondary-color, #9aa3b5);
}

/* Narrow dialogs: hide the sidebar, chat takes the full width. */
@media (max-width: 900px) {
    .erpchat {
        grid-template-columns: 1fr;
    }

    .erpchat-sidebar {
        display: none;
    }

    .erpchat-header,
    .erpchat-body,
    .erpchat-composer {
        grid-column: 1;
    }
}

/* ---------- HEADER ---------- */
.erpchat-header {
    padding: 14px 18px;
    /* Header: Radzen Primary/Secondary statt hardcoded */
    background: linear-gradient(135deg, color-mix(in srgb, var(--rz-primary, #3b82f6) 35%, transparent), color-mix(in srgb, var(--rz-secondary, #22c55e) 35%, transparent) );
    border-bottom: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Radzen Typography (wenn vorhanden) */
    font-family: var(--rz-text-font-family, inherit);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Badge stärker "Radzen-chip-like" */
.brand-badge {
    height: 32px;
    width: 32px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rz-base-background-color, #fff) 80%, transparent);
    color: var(--rz-text-color, #111);
    border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    user-select: none;
    box-shadow: var(--rz-shadow-1, 0 1px 4px rgba(0,0,0,.12));
}

/* ---------- BODY ---------- */
.erpchat-body {
    overflow: auto;
    padding: 18px;
    /* Radzen "Card" / "Panel" Feeling: base bg + dezentes Pattern */
    background: radial-gradient(20px 20px at 25px 25px, color-mix(in srgb, var(--rz-text-color, #000) 7%, transparent) 20%, transparent 21%) 0 0/20px 20px, var(--rz-base-background-color, #111318);
}

    /* Scrollbar: optional, Radzen-like */
    .erpchat-body::-webkit-scrollbar {
        width: 10px;
    }

    .erpchat-body::-webkit-scrollbar-track {
        background: color-mix(in srgb, var(--rz-base-background-color, #111318) 85%, transparent);
    }

    .erpchat-body::-webkit-scrollbar-thumb {
        background: color-mix(in srgb, var(--rz-text-color, #e8ebf0) 16%, transparent);
        border-radius: 999px;
        border: 2px solid color-mix(in srgb, var(--rz-base-background-color, #111318) 85%, transparent);
    }

/* ---------- MESSAGE ROW ---------- */
.erpchat-msg {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    margin: 14px 0;
}

    .erpchat-msg.is-user {
        direction: rtl;
    }

        /* User bubble etwas "leichter" wie Radzen surface */
        .erpchat-msg.is-user .erpchat-bubble {
            background: color-mix(in srgb, var(--rz-base-background-color, #fff) 6%, transparent);
            border: 1px solid color-mix(in srgb, var(--rz-text-color, #000) 10%, transparent);
        }

        .erpchat-msg.is-user .erpchat-meta .name {
            color: color-mix(in srgb, var(--rz-text-color, #e8ebf0) 70%, transparent);
        }

        .erpchat-msg.is-user .erpchat-avatar {
            background: color-mix(in srgb, var(--rz-base-background-color, #fff) 6%, transparent);
            border: 1px solid color-mix(in srgb, var(--rz-border-color, rgba(0,0,0,.12)) 70%, transparent);
        }

/* ---------- AVATAR ---------- */
.erpchat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rz-base-background-color, #111318) 92%, var(--rz-primary, #3b82f6) 8%);
    border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    user-select: none;
    box-shadow: var(--rz-shadow-1, 0 1px 4px rgba(0,0,0,.12));
}

/* ---------- BUBBLE ---------- */
.erpchat-bubble {
    direction: ltr;
    /* Assistant bubble: Radzen panel + minimal primary tint */
    background: linear-gradient(180deg, color-mix(in srgb, var(--rz-base-background-color, #151922) 92%, var(--rz-primary, #3b82f6) 8%), var(--rz-base-background-color, #10131a) );
    border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    border-radius: calc(var(--rz-border-radius, 14px) * 0.9);
    padding: 12px 14px;
    box-shadow: var(--rz-shadow-2, 0 4px 16px rgba(0,0,0,.18));
}

/* ---------- META ---------- */
.erpchat-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    opacity: .85;
    margin-bottom: 6px;
}

    .erpchat-meta .name {
        font-weight: 600;
        color: var(--rz-text-color, #e8ebf0);
    }

/* Copy Button: an Radzen Button/Chip anlehnen */
.copy-btn {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rz-base-background-color, #fff) 8%, transparent);
    border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    color: var(--rz-text-color, #e8ebf0);
    cursor: pointer;
    transition: filter .15s ease, transform .04s ease;
}

    .copy-btn:hover {
        filter: brightness(1.05);
    }

    .copy-btn:active {
        transform: translateY(1px);
    }

/* ---------- CONTENT ---------- */
.erpchat-content {
    line-height: 1.6;
    font-size: 15px;
    white-space: pre-wrap;
    color: var(--rz-text-color, #e8ebf0);
}

    /* Assistant bubbles render Markdown → block elements manage their own spacing. */
    .erpchat-content.is-markdown {
        white-space: normal;
    }

        .erpchat-content.is-markdown p {
            margin: 0 0 0.55em;
        }

        .erpchat-content.is-markdown p:last-child {
            margin-bottom: 0;
        }

        .erpchat-content.is-markdown ul,
        .erpchat-content.is-markdown ol {
            margin: 0.25em 0 0.55em 1.4em;
            padding: 0;
        }

        .erpchat-content.is-markdown li {
            margin: 0.15em 0;
        }

        .erpchat-content.is-markdown h1,
        .erpchat-content.is-markdown h2,
        .erpchat-content.is-markdown h3,
        .erpchat-content.is-markdown h4 {
            font-size: 1.05em;
            margin: 0.6em 0 0.3em;
        }

        .erpchat-content.is-markdown table {
            border-collapse: collapse;
            margin: 0.5em 0;
            display: block;
            overflow-x: auto;
        }

        .erpchat-content.is-markdown th,
        .erpchat-content.is-markdown td {
            border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
            padding: 4px 10px;
        }

        .erpchat-content.is-markdown blockquote {
            margin: 0.5em 0;
            padding: 0.25em 0.75em;
            border-left: 3px solid var(--rz-border-color, rgba(0,0,0,.2));
            color: var(--rz-text-secondary-color, inherit);
        }

        .erpchat-content.is-markdown hr {
            border: none;
            border-top: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
            margin: 0.6em 0;
        }

    .erpchat-content code {
        background: color-mix(in srgb, var(--rz-base-background-color, #000) 18%, transparent);
        padding: 2px 6px;
        border-radius: 6px;
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        border: 1px solid color-mix(in srgb, var(--rz-border-color, rgba(0,0,0,.12)) 70%, transparent);
    }

    .erpchat-content pre {
        background: color-mix(in srgb, var(--rz-base-background-color, #0b0f16) 92%, transparent);
        border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
        border-radius: 12px;
        padding: 12px;
        overflow: auto;
        box-shadow: var(--rz-shadow-1, 0 1px 4px rgba(0,0,0,.12));
    }

/* ---------- TYPING ---------- */
.typing {
    display: flex;
    gap: 6px;
    padding: 4px 2px;
}

    .typing span {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--rz-primary, #3b82f6) 55%, transparent);
        animation: erpchat-bounce 1.2s infinite ease-in-out;
    }

        .typing span:nth-child(2) {
            animation-delay: .15s;
        }

        .typing span:nth-child(3) {
            animation-delay: .3s;
        }

@keyframes erpchat-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: .6;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* ---------- COMPOSER ---------- */
.erpchat-composer {
    border-top: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    background: linear-gradient(0deg, color-mix(in srgb, var(--rz-base-background-color, #0f1115) 96%, transparent), var(--rz-base-background-color, #111318) );
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.erpchat-composer-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

    .erpchat-composer textarea {
        flex: 1 1 auto;
        resize: none;
        min-height: 44px;
        max-height: 30vh;
        overflow-y: auto;
        border-radius: var(--rz-border-radius, 12px);
        border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
        background: var(--rz-input-background-color, color-mix(in srgb, var(--rz-base-background-color, #0f1320) 92%, transparent));
        color: var(--rz-text-color, #e8ebf0);
        padding: 12px 14px;
        line-height: 1.5;
        outline: none;
        transition: box-shadow .15s ease, border-color .15s ease, height .1s ease;
    }

        .erpchat-composer textarea::placeholder {
            color: color-mix(in srgb, var(--rz-text-color, #9aa3b5) 55%, transparent);
        }

        .erpchat-composer textarea:focus {
            border-color: color-mix(in srgb, var(--rz-primary, #3b82f6) 65%, var(--rz-border-color, rgba(0,0,0,.12)));
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--rz-primary, #3b82f6) 22%, transparent);
        }

/* ---------- BUTTONS ---------- */
.composer-actions {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 10px 14px;
    border-radius: var(--rz-border-radius, 12px);
    cursor: pointer;
    font-weight: 600;
    font-family: var(--rz-text-font-family, inherit);
    transition: transform .04s ease, filter .15s ease, opacity .15s ease, box-shadow .15s ease;
    user-select: none;
    border: 1px solid transparent;
}

    .btn:active {
        transform: translateY(1px);
    }

/* Ghost an Radzen "Light"/"Base" Buttons */
.btn-ghost {
    border-color: var(--rz-border-color, rgba(0,0,0,.12));
    background: color-mix(in srgb, var(--rz-base-background-color, #fff) 8%, transparent);
    color: var(--rz-text-color, #e8ebf0);
}

    .btn-ghost:hover {
        filter: brightness(1.05);
    }

/* Primary an Radzen Primary */
.btn-primary {
    border: 1px solid color-mix(in srgb, var(--rz-primary, #3b82f6) 40%, var(--rz-border-color, rgba(0,0,0,.12)));
    background: linear-gradient(135deg, var(--rz-primary, #3b82f6), color-mix(in srgb, var(--rz-primary, #3b82f6) 45%, var(--rz-secondary, #22c55e)) );
    color: var(--rz-button-text-color, #0b0d10);
    box-shadow: var(--rz-shadow-1, 0 1px 4px rgba(0,0,0,.12));
}

    .btn-primary:hover {
        filter: brightness(1.03);
    }

.btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

/* ---------- ATTACHMENTS ---------- */
.erpchat-attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
    padding: 10px 12px;
}

.erpchat-attach-tray,
.erpchat-attach-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.erpchat-attach-list {
    margin-top: 8px;
}

.erpchat-attach {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 240px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: .82rem;
    /* Theme-relative surface paired with theme text color (not a fixed grey) */
    background: var(--rz-base-background-color, #1a1d22);
    color: var(--rz-text-color, #e8ebf0);
    border: 1px solid var(--rz-border-color, rgba(0,0,0,.12));
    direction: ltr;
}

    .erpchat-attach.is-sent {
        background: color-mix(in srgb, var(--rz-text-color, #000) 8%, transparent);
    }

.erpchat-attach-icon {
    flex: 0 0 auto;
}

.erpchat-attach-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.erpchat-attach-size {
    flex: 0 0 auto;
    opacity: .65;
    font-variant-numeric: tabular-nums;
}

.erpchat-attach-remove {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 2px;
    opacity: .7;
}

    .erpchat-attach-remove:hover {
        opacity: 1;
    }

.erpchat-attach-error {
    align-self: center;
    font-size: .82rem;
    color: var(--rz-danger, #ef4444);
}

/* Notice / error bubble inside the transcript (warning tint blended into the themed surface) */
.erpchat-bubble.erpchat-notice {
    background: color-mix(in srgb, var(--rz-warning, #f59e0b) 18%, var(--rz-base-background-color, #111318));
    border: 1px solid color-mix(in srgb, var(--rz-warning, #f59e0b) 45%, transparent);
    color: var(--rz-text-color, #e8ebf0);
}

/* Full-window drop overlay */
.erpchat-dropzone {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--rz-primary, #3b82f6) 22%, transparent);
    backdrop-filter: blur(2px);
    pointer-events: none;
}

    .erpchat-dropzone.is-visible {
        display: flex;
    }

.erpchat-dropzone-inner {
    padding: 24px 32px;
    border-radius: var(--rz-border-radius, 16px);
    border: 2px dashed var(--rz-on-primary, #fff);
    background: color-mix(in srgb, var(--rz-primary, #3b82f6) 75%, transparent);
    color: var(--rz-on-primary, #fff);
    font-weight: 600;
    text-align: center;
    box-shadow: var(--rz-shadow-3, 0 6px 24px rgba(0,0,0,.3));
}

.erpchat-dropzone-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}











/* ---------- SMALL UTILITIES ---------- */
.flex-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.subtle {
    font-size: 12px;
    opacity: .8;
}

.ggt-panel-fixed {
    position: fixed !important; /* statt absolute */
    max-height: 45vh;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    overflow: hidden;
    z-index: 100000;
    box-shadow: var(--rz-input-hover-shadow);
    background: var(--rz-input-background-color, #fff);
    border: var(--rz-input-hover-border);
}

ggt-panel.ggt-panel-fixed {
    position: fixed !important;
}

.ggt-picker + .rz-message {
    display: block; /* <-- Wichtig */
    margin-top: 4px;
}











/* STACKED LOADERS */
.zlc {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: min(360px, calc(100vw - 1rem));
    pointer-events: none;
}

.zlc-card {
    pointer-events: auto;
    position: relative;
    border-width: 1px;
    border-style: solid;
    animation: zlc-slide-in 0.15s ease-out;
}

.zlc-card.zlc-clickable {
    cursor: pointer;
}

.zlc-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.zlc-icon-btn {
    min-width: 1.75rem;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
}

.zlc-title {
    padding-right: 4.5rem;
}

.zlc-sub {
    opacity: 0.92;
    overflow-wrap: anywhere;
    padding-right: 0.25rem;
}

.zlc-progress-text {
    text-align: right;
    opacity: 0.9;
}

.zlc-fade-out {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

@keyframes zlc-slide-in {
    from {
        opacity: 0;
        transform: translateX(8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 420px) {
    .zlc {
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
    }
}

/* File: wwwroot/css/job-controls.css */
.job-controls {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.job-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
}

    .job-line.running {
        background: #f8fafc;
    }

    .job-line.ok {
        background: #ecfdf5;
        border-color: #86efac;
    }

    .job-line.failed {
        background: #fef2f2;
        border-color: #fca5a5;
    }

.job-msg {
    font-size: .9rem;
    color: #4b5563;
    margin-left: 4px;
}

.btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
}

    .btn:hover {
        background: #f9fafb;
    }

    .btn.danger {
        border-color: #fecaca;
        color: #991b1b;
    }

        .btn.danger:hover {
            background: #fee2e2;
        }









/* FONT VARIATIONS*/
.filled-icon {
    font-variation-settings: 'FILL' 1;
}

    .filled-icon .rzi {
        font-variation-settings: 'FILL' 1; /* 0 = outline, 1 = filled */
    }







/* LOGIN */

.account-security-page {
    max-width: 980px;
    margin: 0 auto;
}

.security-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.security-option-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1.2rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.security-option-card h4 {
    margin: 0;
}

.security-option-card p {
    margin: 0.35rem 0 0 0;
    color: var(--rz-text-secondary-color);
}

.security-option-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.security-badge {
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.security-badge.enabled {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.security-badge.disabled {
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
}

.security-badge.coming-soon {
    background: rgba(107, 114, 128, 0.18);
    color: #4b5563;
}

.security-detail-list {
    margin: 1rem 0;
    padding-left: 1.2rem;
}

.security-detail-list li {
    margin-bottom: 0.4rem;
}

.security-option-button {
    width: 100%;
}

.security-option-card-disabled {
    opacity: 0.72;
}

.totp-qr-wrapper {
    margin-top: 0.75rem;
    padding: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
}

.totp-qr-image {
    width: 220px;
    height: 220px;
    display: block;
}

.account-form-card {
    max-width: 760px;
    margin-top: 1rem;
}

.account-form-input {
    background: var(--rz-base-background-color);
    color: var(--rz-text-color);
}

.account-form-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}



/* ZImageUpload */
.zimageupload-container {
    position: relative;
}

.zimageupload-wrapper {
    position: relative;
    display: inline-block;
}

.zimageupload-preview-area {
    position: relative;
}

.zimageupload-upload-below {
    width: 100%;
    margin-top: 0.35rem;
}

.zimageupload-upload-below .rz-fileupload,
.zimageupload-upload-below .rz-fileupload-buttonbar,
.zimageupload-upload-below .rz-fileupload-buttonbar .rz-button {
    width: 100%;
}

.zimageupload-spinner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zimageupload-nav {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 11;
    display: flex;
    gap: 4px;
}

.zimageupload-delete-button {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--rz-danger, #d9534f) 60%, transparent);
    border-radius: 50%;
    background: var(--rz-danger, #d9534f);
    color: var(--rz-on-danger, #fff);
    box-shadow: var(--rz-shadow-2, 0 2px 8px rgba(0, 0, 0, 0.25));
    cursor: pointer;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 120ms ease, transform 120ms ease, filter 120ms ease;
}

.zimageupload-preview-area:hover .zimageupload-delete-button,
.zimageupload-delete-button:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.zimageupload-delete-button:hover:not(:disabled) {
    filter: brightness(1.08);
}

.zimageupload-delete-button:disabled {
    cursor: progress;
    opacity: 0.65;
}




/* DataFlowMappingEditor */
.mapping-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: 1rem;
    row-gap: 0.75rem;
}

.mapping-grid-header {
    font-weight: 600;
}

.mapping-grid-cell {
    /* optional: volle Breite für innere Controls */
    width: 100%;
}


/* DataFlowSourceFilter */

.filter-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rz-border-color);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr auto;
    gap: 1rem;
    align-items: start;
}

.filter-grid-header {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--rz-text-secondary-color);
    padding: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-grid-cell {
    display: flex;
    align-items: center;
    min-height: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .filter-grid-header {
        display: none;
    }

    .filter-grid-cell {
        width: 100%;
    }
}

/* Invalid Field Styling */
.filter-grid-cell :deep(.invalid) {
    border-color: var(--rz-danger) !important;
}

.filter-grid-cell :deep(.invalid:focus) {
    box-shadow: 0 0 0 0.2rem rgba(var(--rz-danger-rgb), 0.25) !important;
}





/* Theme Change */
/* Overlay container */
.theme-fade-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    /* Standard: unsichtbar + klickt nicht im Weg */
    opacity: 0;
    pointer-events: none;
    background: #000;
    transition: opacity 280ms ease;
}

    /* Aktiv: sichtbar + blockt Eingaben */
    .theme-fade-overlay.is-visible {
        opacity: 1;
        pointer-events: all;
    }





/* FK EDITOR */
.fk-readonly {
    height: 52px;
    vertical-align: middle !important;
    line-height: 52px;
}

.fk-footertext {
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    color: var(--rz-base-300);
}

/* fk-footertext ausblenden, wenn in der Helper-Zone eine Error-Message existiert */
.rz-form-field-helper:has(.rz-messages-error) .fk-footertext {
    display: none;
}




/* DATA FLOW MAPPER */
/* Erweiterung der DropDown im DataFlowFieldMapper */

.dataFlowMappingSourceFieldDropDownItem {
    padding-left: 0.5rem;
}

.dataFlowMappingSourceFieldDropDownItemName {
}

.dataFlowMappingSourceFieldDropDownDescription {
    font-size: 0.75rem;
    color: var(--rz-secondary);
}


/* Der Hover muss auf das Radzen-Element gehen */
.rz-dropdown-item:hover .dataFlowMappingSourceFieldDropDownDescription {
    color: navajowhite;
}

.dataFlowMappingSourceFieldDropDownHeaderItem {
    font-weight: bold;
    color: var(--rz-secondary);
    padding: 0.5rem 0 0.25rem 0;
    border-top: 1px solid var(--rz-border-color);
    margin-top: 0.25rem;
}

.rz-dropdown-item:hover .dataFlowMappingSourceFieldDropDownHeaderItem {
    color: white;
}





.menu-item-exportButton:hover > .rz-navigation-item-wrapper > .rz-navigation-item-link > .rz-navigation-item-icon,
.menu-item-exportButton:hover > .rz-navigation-item-wrapper > .rz-navigation-item-link > .rz-navigation-item-text,
.menu-item-exportButton:hover > .rz-navigation-item-wrapper > .rz-navigation-item-link > .rz-navigation-item-icon-children {
    color: #33C481 !important;
}

.menu-item-exportButton-downloading .rz-navigation-item-icon,
.menu-item-exportButton-downloading .rz-navigation-item-text {
    color: #33C481 !important;
}

.menu-item-exportButton-downloading:hover .rz-navigation-item-icon,
.menu-item-exportButton-downloading:hover .rz-navigation-item-text {
    color: #33C481 !important;
}


/* Tab in einem Dialog muss sich abheben */
.rz-dialog .rz-tabview {
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), /* leichter „Einschnitt“ */
    0 4px 10px rgba(0, 0, 0, 0.25); /* dezenter Schatten */
    padding: 0.25rem;
}

/* Tabs selbst ohne weißen Hintergrund lassen */
.rz-dialog .rz-tabview-nav {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}


/* Panels nicht extra einfärben, damit dein Feldset-Blau bleibt */
.rz-dialog .rz-tabview-panels,
.rz-dialog .rz-tabview-panel {
    background: transparent;
}

/* rz-dialog muss sich besser abheben */
.rz-dialog {
    box-sizing: border-box;
    position: absolute;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 150px;
    min-height: 150px;
    max-height: 100%;
    z-index: var(--rz-dialog-zindex);
    background-color: var(--rz-dialog-background-color);
    border-radius: var(--rz-dialog-border-radius);
    /* deutlichere Abhebung */
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35), /* tiefer Shadow */
    0 0 0 1px rgba(255, 255, 255, 0.06); /* feiner „Halo“-Rand nach außen */
    /* statt Border – wirkt weicher */
    outline: none;
}



.rz-dialog-wrapper {
    box-sizing: border-box;
    display: flex;
    position: fixed;
    inset: 0;
    z-index: var(--rz-dialog-zindex);
    align-items: center;
    justify-content: center;
    /* ✨ Hintergrund abdunkeln */
    background-color: rgba(0, 0, 0, 0.35);
    /* ✨ leichtes „Entschärfen“ des Inhalts dahinter */
    backdrop-filter: blur(2px) saturate(0.9);
}

/* Mobile-Layout: ein Dialog darf nie breiter als der Viewport sein. Viele Host-Dialoge
   packen ihren Inhalt in ein <div> mit fixer, desktop-orientierter `min-width`
   (z. B. min-width: 640px) — auf dem Handy erzwingt das horizontalen Overflow
   bzw. einen horizontalen Scrollbalken. Wir deckeln den Dialog auf Viewport-Breite
   und lassen seinen Inhalt schrumpfen. Wie das Sidebar-Overlay an die `z-mobile-layout`-
   Body-Klasse gehaengt (schmaler Viewport ODER erzwungener "Mobile Device Mode"). */
body.z-mobile-layout .rz-dialog {
    max-width: 100vw !important;
    max-height: 100dvh !important;
}

body.z-mobile-layout .rz-dialog-content,
body.z-mobile-layout .rz-dialog-content * {
    min-width: 0 !important;
}


/* DropDowns müssen sich mehr abheben */
.rz-dropdown-panel {
    position: absolute;
    background-color: var(--rz-dropdown-open-background-color);
    border-radius: var(--rz-input-border-radius);
    /* klare, sichtbare Kante */
    border: 1px solid rgba(0, 0, 0, 0.28);
    /* starke, tief gestaffelte Schatten */
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45), 0 8px 18px rgba(0, 0, 0, 0.28), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
    /* leichter Lift */
    transform: translateY(3px);
}




/* Grünen Rahmen bei der Validierung ausblenden */
.valid.modified:not([type=checkbox]) {
    outline: 0 !important;
}

/* Alle RadzenSwitch innerhalb von RadzenFormField auf 20px Höhe setzen */
.rz-form-field .rz-switch {
    height: 20px !important;
    min-height: 20px !important;
    margin-top: 0.5rem; /* entspricht rz-my-2 */
    margin-bottom: 0.5rem;
    margin-left: 0.25rem; /* entspricht rz-mx-1 */
    margin-right: 0.25rem;
}

/* Multiselect-Dropdowns mit Chips: kompakte Pillen, damit das Feld
   die Standard-Feldhöhe der übrigen Formfelder behält */
.rz-dropdown-chips {
    --rz-chip-padding-block: 0.0625rem;
    --rz-chip-padding-inline: 0.5rem;
    --rz-chip-font-size: 0.8125rem;
}

/* Mit Chips bleibt die Content-Box exakt auf Standard-Feldhöhe (53px) */
.rz-dropdown-chips:has(.rz-chip) {
    padding-bottom: 5px;
}

.rz-dropdown-chips .rz-chip .rz-button {
    min-width: 1rem;
    width: 1rem;
    height: 1rem;
}

.rz-dropdown-chips .rz-chip .rz-button .rzi {
    font-size: 0.875rem;
}

/* Fokusfarbe von Labels in Formfields deaktivieren */
.rz-form-field.rz-state-focused .rz-form-field-label {
    color: inherit !important;
}

/* Radzen FormField bei Fokus hervorheben */
.rz-form-field.rz-state-focused {
    box-shadow: 0 0 6px 1px rgba(205, 205, 205, 0.4);
}


/* Footer Anpassung Padding war im Original zu hoch */
:root {
    --rz-footer-padding: 0.5rem 1rem !important;
    --rz-fieldset-padding: 0.5rem !important;
    --rz-tabs-padding: 0rem !important;
    --rz-grid-header-filter-icon-active-color: #bae945 !important;
}


.main-component-progressbar {
    height: 5px;
}

/* Kommt ein Fieldset gleich nach einem Fieldset -> Abstand halten*/
.rz-fieldset + .rz-fieldset {
    margin-top: 20px;
}


/* Locked Icon - Hinweis, dass das Formfield nicht bearbeitet werden darf */
.lockedIcon {
    color: #FFFFFF55 !important;
    font-size: 1rem !important;
}




/* Rote Checkbox bei Tristate Checkbox false */
.rz-chkbox-redGreen .rz-chkbox-box .rzi-times {
    color: white !important;
    background-color: rgb(125, 48, 65) !important;
}

.rz-chkbox-redGreen .rz-chkbox-box:has(.rzi-times) {
    background-color: rgb(125, 48, 65) !important;
}

/* Grüne Checkbox bei Tristate Checkbox true */
.rz-chkbox-redGreen .rz-chkbox-box .rzi-check {
    color: white !important;
    background-color: rgb(48, 125, 65) !important;
}

.rz-chkbox-redGreen .rz-chkbox-box:has(.rzi-check) {
    background-color: rgb(48, 125, 65) !important;
}



/* Nur ungültige Textboxen innerhalb eines Radzen Data Grids */
.rz-datatable .rz-textbox.invalid,
.rz-datatable .rz-dropdown.invalid,
.rz-datatable .rz-numeric-input.invalid,
.rz-datatable .rz-masked.invalid,
.rz-datatable .rz-datepicker .invalid {
    border: 2px solid var(--rz-danger) !important;
    box-shadow: none !important;
    border-radius: 2px;
    outline: 0 !important;
}


.grid-goto-link {
    color: #fdd07a !important;
}

.goto-link {
    color: #fdd07a !important;
    text-decoration: underline !important;
}



.mark.highlight-match {
    background-color: #ffe08a;
    color: #000;
    border-radius: 3px;
    padding: 0 2px;
}


/* Download Link for File Download Dialog*/
.fileDownloadLink {
    color: white;
}

    .fileDownloadLink:hover {
        color: white;
    }


.rz-message-popup {
    z-index: 100;
}

.rz-form-field:has(.rz-dropdown.invalid) {
    border: 2px solid var(--rz-danger);
    border-radius: 4px;
    padding: 2px;
}

.rz-form-field:has(.rz-textbox.invalid) {
    border: 2px solid var(--rz-danger);
    border-radius: 4px;
    padding: 2px;
}

.rz-form-field:has(.ggt-picker.invalid) {
    border: 2px solid var(--rz-danger);
    border-radius: 4px;
    padding: 2px;
}

.rz-form-field-content > .rz-dropdown.invalid,
.rz-form-field-content > .rz-textbox.invalid,
.rz-form-field-content > .ggt-picker.invalid > .rz-inputtext {
    border: none !important;
    box-shadow: none !important;
    outline: 0 !important;
}


/* Right Sidebar */
.sidebar-stack {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.flex-spacer {
    flex-grow: 1;
}










/* Form Field */
.rz-form-field {
    border-radius: 12px;
}

.rz-form-field-content {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-bottom-left-radius: 12px;
    border-top-left-radius: 12px;
    border-bottom-right-radius: 12px;
    border-top-right-radius: 12px;
    color: var(--rz-text-color, #fff);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.rz-form-field:not(.rz-variant-outlined):not(.rz-floating-label) .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) *:focus ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) *:focus-within ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) :not(.rz-state-empty) ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) .rz-radio-button-list-vertical ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) .rz-radio-button-list-horizontal ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) .rz-checkbox-list-vertical ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) .rz-checkbox-list-horizontal ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) .rz-chkbox ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) .rz-fileupload ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined) .rz-state-empty:has(.rz-placeholder) ~ .rz-form-field-label,
.rz-form-field:not(.rz-variant-outlined).rz-state-focused .rz-form-field-label {
    background-color: transparent !important;
    color: var(--rz-base) !important;
}

/* Radzen 10 setzt auf gefloatete Labels "background-color: inherit !important" mit
   Selektoren bis Spezifität (0,6,0) — das schlägt die Regel oben und erscheint auf
   gesperrten Feldern als heller Chip (das Input dunkelt ab, der Content nicht). Die
   verdreifachten Klassen heben diese Regel auf (0,7,0), damit sie unabhängig von der
   Ladereihenfolge gewinnt. Outlined bleibt ausgenommen: dort maskiert das Label
   bewusst die Border. */
.rz-form-field.rz-form-field.rz-form-field:not(.rz-variant-outlined) .rz-form-field-label.rz-form-field-label.rz-form-field-label {
    background-color: transparent !important;
}



span.rz-switch-circle.rz-readonly {
    background-color: var(--rz-input-disabled-color) !important;
}

.fk-readonly {
    padding: 0.75rem 2.5rem 0.75rem 0.75rem; /* Beispiel: links rein, rechts Platz für Icon */
    box-sizing: border-box;
    color: var(--rz-input-disabled-color);
    padding-left: 7px !important;
}





/* Tabs, welche die volle Seitenhöhe nutzen */
.tabview-fill {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.zgrid-tab-fill {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* ZDataGrid im Tab: Menüzeile oben, Grid füllt die Resthöhe */
.zdatagrid-tab-fill {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

    /* Container, der die Panels hält, muss Resthöhe bekommen */
    .tabview-fill .rz-tabview-panels {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;

    }

    /* Panel selbst darf nicht den Body scrollen lassen */
    .tabview-fill .rz-tabview-panel {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: auto;
    }


/* Linke Seiten Tab Buttons brauchen etwas Abstand zum Tab Content*/
.rz-tabview-left > .rz-tabview-nav {
    margin-right: 2px;
    margin-top: 35px
}

.rz-tabview-panel {
    padding: 1px;
}



/* Permission Spalte im Permission Selektor*/
.permission-cell {
    line-height: 1.2;
}

.permission-description {
    font-size: 0.95rem;
    font-weight: 500;
}

.permission-key {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color, #888);
    margin-top: 2px;
}



/* Grid Dialog. Grid soll scrollen, nicht der Dialog */
.rz-dialog.dlg-grid {
    display: flex;
    flex-direction: column;
}

    /* Content muss Resthöhe bekommen, darf schrumpfen, aber NICHT selbst scrollen */
    .rz-dialog.dlg-grid > .rz-dialog-content {
        flex: 1 1 auto; /* statt 0 1 auto */
        min-height: 0; /* entscheidend */
        overflow: hidden; /* verhindert den 2. Scroller */
        display: flex;
        flex-direction: column;
    }

        /* Grid füllt dann die Content-Fläche und scrollt intern */
        .rz-dialog.dlg-grid > .rz-dialog-content > .rz-data-grid.rz-grid-grow {
            flex: 1 1 auto;
            min-height: 0;
        }

/* Grid-Scrollbar auch im Dialog wie im Theme */
.rz-dialog .rz-data-grid-data::-webkit-scrollbar {
    width: var(--rz-scrollbar-size);
    height: var(--rz-scrollbar-size);
}

.rz-dialog .rz-data-grid-data::-webkit-scrollbar-track {
    background: var(--rz-scrollbar-background);
}

.rz-dialog .rz-data-grid-data::-webkit-scrollbar-thumb {
    background: var(--rz-scrollbar-color);
    border-radius: var(--rz-scrollbar-border-radius);
    border: var(--rz-scrollbar-border);
}

/* Firefox (falls relevant) */
.rz-dialog .rz-data-grid-data {
    scrollbar-width: thin;
    scrollbar-color: var(--rz-scrollbar-color) var(--rz-scrollbar-background);
}



/* Grid Goto Link mit Edit Control*/
.fk-editor-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0; /* wichtig, damit der Editor schrumpfen darf */
}

    .fk-editor-row .goto-link {
        flex: 0 0 auto; /* Link bleibt “klein” */
    }

    /* Optional: wenn dein Renderer Radzen Inputs/Dropdowns rendert,
   sorgt das dafür, dass der Editor den restlichen Platz nimmt */
    .fk-editor-row :is(.rz-dropdown, .rz-autocomplete, .rz-textbox, .rz-numeric, .rz-datepicker, .rz-inputtext) {
        flex: 1 1 auto;
        min-width: 0;
    }

/* ===== Homescreen ===== */

.homescreen-container {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 200px);
}

.homescreen-edit-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 10;
}

.homescreen-grid {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 200px);
}

.homescreen-grid.edit-mode {
    background-image: radial-gradient(circle, var(--rz-text-disabled-color) 1px, transparent 1px);
    background-size: 32px 32px;
}

.homescreen-tile {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--rz-border-radius);
    cursor: pointer;
    transition: background-color 0.15s, transform 0.15s;
    user-select: none;
    gap: 2px;
}

.homescreen-tile:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.homescreen-tile.no-hover:hover {
    background-color: transparent;
}

.homescreen-tile .tile-icon {
    font-size: 28px;
    line-height: 1;
}

.homescreen-tile .tile-title {
    font-size: 9px;
    line-height: 1.1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    padding: 0 2px;
}

.homescreen-grid.edit-mode .homescreen-tile {
    animation: tile-wobble 0.3s ease-in-out infinite alternate;
    cursor: grab;
}

@keyframes tile-wobble {
    0% { transform: rotate(-0.5deg); }
    100% { transform: rotate(0.5deg); }
}

.homescreen-tile .tile-delete {
    display: none;
    position: absolute;
    top: -10px;
    left: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--rz-danger);
    color: white;
    font-size: 13px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    z-index: 5;
}

.homescreen-grid.edit-mode .homescreen-tile .tile-delete {
    display: block;
}

.homescreen-drop-ghost {
    position: absolute;
    border: 2px dashed var(--rz-primary);
    border-radius: var(--rz-border-radius);
    background: rgba(59, 130, 246, 0.1);
    pointer-events: none;
    display: none;
    z-index: 4;
}

/* Widget tile */
.homescreen-widget {
    background: transparent;
    border: none;
    overflow: visible;
}

.homescreen-widget .widget-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Widget resize handle (edit mode): bottom-right grip on grid tiles,
   right-edge grip on footer items. touch-action none for pointer-resize on touch. */
.tile-resize-handle {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(128, 128, 128, 0.6);
    border-radius: 50%;
    cursor: nwse-resize;
    z-index: 5;
    touch-action: none;
    user-select: none;
}

.tile-resize-handle .rzi {
    font-size: 12px;
    color: white;
    pointer-events: none;
}

.tile-resize-handle:hover {
    background: var(--rz-primary);
}

.homescreen-tile.resizing {
    outline: 2px dashed var(--rz-primary);
    outline-offset: 2px;
}

.footer-resize-handle {
    position: absolute;
    right: -3px;
    top: 2px;
    bottom: 2px;
    width: 7px;
    border-radius: 3px;
    background: rgba(128, 128, 128, 0.6);
    cursor: ew-resize;
    z-index: 5;
    touch-action: none;
    user-select: none;
}

.footer-resize-handle:hover {
    background: var(--rz-primary);
}

.footer-dock-item.resizing {
    outline: 2px dashed var(--rz-primary);
    outline-offset: 1px;
}

/* Widget options button */
.widget-options-btn {
    position: absolute;
    bottom: -10px;
    left: -10px;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(128, 128, 128, 0.6);
    border-radius: 50%;
    cursor: pointer;
    z-index: 4;
    transition: opacity 0.15s ease;
}

.homescreen-grid.edit-mode .widget-options-btn,
.footer-dock-item.edit-mode .widget-options-btn {
    display: flex;
}

.widget-options-btn .rzi {
    font-size: 12px;
    color: white;
}

/* Widget picker panel (edit mode) */
.homescreen-widget-picker {
    position: fixed;
    right: 16px;
    top: 80px;
    width: 180px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: var(--rz-panel-background-color);
    border: 1px solid var(--rz-border-color);
    border-radius: var(--rz-border-radius);
    padding: 8px;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.homescreen-widget-picker h4 {
    margin: 0 0 8px 0;
    font-size: 12px;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-picker-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    cursor: grab;
    border-radius: var(--rz-border-radius);
    margin-bottom: 4px;
    gap: 4px;
}

.widget-picker-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.widget-picker-item .rzi {
    font-size: 24px;
}

.widget-picker-item span {
    font-size: 11px;
}

.widget-picker-item .worker-avatar-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.widget-picker-item small {
    font-size: 9px;
    opacity: 0.5;
}

/* Widget picker search */
.widget-picker-search {
    width: 100%;
    padding: 4px 8px;
    margin-bottom: 8px;
    border: 1px solid var(--rz-border-color);
    border-radius: var(--rz-border-radius);
    background: var(--rz-input-background-color);
    color: var(--rz-text-color);
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}

.widget-picker-search:focus {
    border-color: var(--rz-primary);
}

.widget-picker-search::placeholder {
    opacity: 0.5;
}

/* Widget picker paging */
.widget-picker-paging {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 0 2px;
    border-top: 1px solid var(--rz-border-color);
    margin-top: 4px;
}

.widget-picker-page-btn {
    background: none;
    border: none;
    color: var(--rz-text-color);
    cursor: pointer;
    padding: 2px;
    border-radius: var(--rz-border-radius);
    display: flex;
    align-items: center;
}

.widget-picker-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}

.widget-picker-page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.widget-picker-page-btn .rzi {
    font-size: 18px;
}

.widget-picker-page-info {
    font-size: 11px;
    opacity: 0.6;
}

/* Widget picker loading spinner */
.widget-picker-loading {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    opacity: 0.5;
}

.widget-picker-spinner {
    font-size: 22px;
    animation: widget-spin 1s linear infinite;
}

@keyframes widget-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* AI Worker Widget */
.ai-worker-widget {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
    align-items: center;
}

.worker-head {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    transition: opacity 0.5s;
    flex-shrink: 0;
}

.worker-head img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.worker-head .rzi {
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.worker-head.worker-pulse {
    animation: worker-pulse-anim 1.5s ease-in-out infinite;
}

@keyframes worker-pulse-anim {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1.0; }
}

/* LED Widgets */
.led-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.led-widget.led-widget--labeled {
    justify-content: flex-start;
    gap: 8px;
    padding: 0 8px;
}

.led-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: var(--led-color, var(--rz-base-400));
    transition: opacity 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}

.led-dot.led-off {
    opacity: 0.25;
    box-shadow: none;
}

.led-dot.led-on {
    opacity: 1;
    box-shadow: 0 0 6px 1px var(--led-color, var(--rz-base-400));
}

.led-dot.led-blink {
    animation: led-blink var(--led-blink, 800ms) steps(1, end) infinite;
}

@keyframes led-blink {
    0%, 49% {
        opacity: 1;
        box-shadow: 0 0 6px 1px var(--led-color, var(--rz-base-400));
    }
    50%, 100% {
        opacity: 0.2;
        box-shadow: none;
    }
}

.led-widget__label {
    font-size: 0.8rem;
    line-height: 1;
    color: var(--rz-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Clock Widget */
.clock-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    user-select: none;
}

.clock-widget-icon {
    font-size: 18px;
    opacity: 0.6;
}

.clock-widget-time {
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}

/* Online Users Widget */
.online-users-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    user-select: none;
}

.online-users-widget-icon {
    font-size: 18px;
    opacity: 0.6;
}

.online-users-widget-count {
    font-size: 14px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}

/* Footer Dock (inside ZERPLiteFooter) */
.footer-dock-zone {
    display: none;
}

.footer-dock-zone:has(.footer-dock-item),
.footer-dock-zone.edit-mode {
    display: flex;
    align-items: center;
    padding: 0 6px;
}

/* Footer-Dock ist ein Desktop-Feature: Widget-Kacheln haben feste Breiten (SpanX * 32px)
   und koennen weder schrumpfen noch umbrechen — auf schmalen Geraeten wuerden sie
   abgeschnitten. Im Mobile-Modus komplett aus (gewinnt per Spezifitaet gegen die
   :has()-Anzeige-Regel oben). */
body.z-mobile-layout .footer-dock-zone {
    display: none;
}

.footer-dock-zone.edit-mode {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    min-height: 34px;
    min-width: 40px;
}

.footer-dock-items {
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-dock-item {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.footer-dock-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.15);
}

.footer-dock-item.no-hover:hover {
    background: transparent;
    transform: none;
}

.footer-dock-item .rzi {
    font-size: 20px;
    opacity: 0.85;
}

.footer-dock-item img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-dock-item .tile-delete {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 16px;
    height: 16px;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    background: var(--rz-danger);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
}

.footer-dock-item .widget-options-btn {
    bottom: -8px;
    left: -8px;
    width: 16px;
    height: 16px;
}

.footer-dock-item .widget-options-btn .rzi {
    font-size: 10px;
}

.footer-dock-item.edit-mode {
    animation: homescreen-wobble 0.3s ease-in-out infinite alternate;
}

.footer-dock-empty-slot {
    width: 30px;
    height: 30px;
    border: 2px dashed currentColor;
    opacity: 0.15;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-dock-empty-slot .rzi {
    font-size: 16px;
    opacity: 0.2;
}

.footer-dock-empty-slot.drag-over {
    border-color: var(--rz-primary);
    opacity: 0.7;
    background: rgba(var(--rz-primary-rgb, 51, 133, 255), 0.15);
    transition: all 0.15s ease;
}

.footer-dock-empty-slot.drag-over .rzi {
    opacity: 0.8;
}

.footer-drop-indicator {
    width: 3px;
    height: 32px;
    background: var(--rz-primary);
    border-radius: 2px;
    flex-shrink: 0;
    animation: footer-indicator-pulse 0.8s ease-in-out infinite;
}

@keyframes footer-indicator-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1.0; }
}

/* ============================================================================
   ZMarkDownViewer — structural / shared CSS
   ============================================================================ */
.host-howto-page {
    display: grid;
    gap: 3rem;
    width: 100%;
}

.host-howto-header {
    display: grid;
    gap: 1rem;
}

.host-howto-title {
    margin: 0;
    padding-top: 1rem;
}

.z-markdown-viewer {
    display: block;
}

.z-markdown-viewer__surface {
    position: relative;
    border: 1px solid var(--rz-base-300);
    padding: 1rem;
    padding-top: 2.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.z-markdown-viewer__surface--light {
    background-color: var(--z-md-surface-light-bg, #ffffff);
    color: var(--z-md-surface-light-color, #1a1a1a);
}

.z-markdown-viewer__surface--dark {
    background-color: var(--z-md-surface-dark-bg, #1a1a1a);
    color: var(--z-md-surface-dark-color, #e0e0e0);
}

.z-markdown-viewer__toolbar {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    display: flex;
    gap: 0.125rem;
    z-index: 1;
}

.z-markdown-viewer__btn {
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.z-markdown-viewer__btn:hover {
    opacity: 1;
}

.z-markdown-viewer__surface--light .z-markdown-viewer__btn {
    color: var(--z-md-surface-light-color, #1a1a1a) !important;
}

.z-markdown-viewer__surface--dark .z-markdown-viewer__btn {
    color: var(--z-md-surface-dark-color, #e0e0e0) !important;
}

.z-markdown-viewer__content {
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.z-markdown-viewer__content h1,
.z-markdown-viewer__content h2,
.z-markdown-viewer__content h3,
.z-markdown-viewer__content h4,
.z-markdown-viewer__content h5,
.z-markdown-viewer__content h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: inherit;
}

.z-markdown-viewer__content h1 {
    font-size: 1.75em;
    border-bottom: 1px solid var(--rz-base-300);
    padding-bottom: 0.3em;
}

.z-markdown-viewer__content h2 {
    font-size: 1.4em;
    border-bottom: 1px solid var(--rz-base-300);
    padding-bottom: 0.25em;
}

.z-markdown-viewer__content h3 {
    font-size: 1.2em;
}

.z-markdown-viewer__content p {
    margin: 0.5em 0;
}

.z-markdown-viewer__content code {
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}

.z-markdown-viewer__surface--light .z-markdown-viewer__content code {
    background-color: var(--z-md-code-light-bg, #f1f3f5);
    color: var(--z-md-code-light-color, #be185d);
}

.z-markdown-viewer__surface--dark .z-markdown-viewer__content code {
    background-color: var(--z-md-code-dark-bg, #2b313a);
    color: var(--z-md-code-dark-color, #f472b6);
}

.z-markdown-viewer__content pre {
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.75em 0;
}

.z-markdown-viewer__surface--light .z-markdown-viewer__content pre {
    background-color: var(--z-md-pre-light-bg, #eceff3);
    border: 1px solid var(--z-md-pre-light-border, #d7dbe0);
}

.z-markdown-viewer__surface--dark .z-markdown-viewer__content pre {
    background-color: var(--z-md-pre-dark-bg, #2d2d2d);
}

.z-markdown-viewer__surface--light .z-markdown-viewer__content pre code,
.z-markdown-viewer__surface--dark .z-markdown-viewer__content pre code {
    padding: 0;
    background: none;
    color: inherit;
}

.z-markdown-viewer__content table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.75em 0;
}

.z-markdown-viewer__content th,
.z-markdown-viewer__content td {
    padding: 0.5em 0.75em;
    text-align: left;
}

.z-markdown-viewer__surface--light .z-markdown-viewer__content th,
.z-markdown-viewer__surface--light .z-markdown-viewer__content td {
    border: 1px solid var(--z-md-table-light-border, #ddd);
}

.z-markdown-viewer__surface--dark .z-markdown-viewer__content th,
.z-markdown-viewer__surface--dark .z-markdown-viewer__content td {
    border: 1px solid var(--z-md-table-dark-border, #444);
}

.z-markdown-viewer__surface--light .z-markdown-viewer__content th {
    background-color: var(--z-md-th-light-bg, #f0f0f0);
}

.z-markdown-viewer__surface--dark .z-markdown-viewer__content th {
    background-color: var(--z-md-th-dark-bg, #2d2d2d);
}

.z-markdown-viewer__content blockquote {
    margin: 0.75em 0;
    padding: 0.5em 1em;
    border-left: 4px solid var(--rz-primary);
}

.z-markdown-viewer__surface--light .z-markdown-viewer__content blockquote {
    background-color: var(--z-md-blockquote-light-bg, #f9f9f9);
}

.z-markdown-viewer__surface--dark .z-markdown-viewer__content blockquote {
    background-color: var(--z-md-blockquote-dark-bg, #2a2a2a);
}

.z-markdown-viewer__content ul,
.z-markdown-viewer__content ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

.z-markdown-viewer__content hr {
    border: none;
    border-top: 1px solid var(--rz-base-300);
    margin: 1em 0;
}

.z-markdown-viewer__content a {
    color: var(--rz-primary);
    text-decoration: none;
}

.z-markdown-viewer__content a:hover {
    text-decoration: underline;
}

.z-markdown-viewer__content img {
    max-width: 100%;
    height: auto;
}

.z-markdown-viewer__empty {
    opacity: 0.5;
    font-style: italic;
    padding: 0.5em 0;
}

/* ============================================================================
   ZJsonViewer — structural / shared CSS
   ============================================================================ */
.z-json-viewer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.z-json-viewer__error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.85rem;
    line-height: 1.35;
}

.z-json-viewer__surface {
    overflow: visible;
}

.z-json-viewer__empty {
    padding: 0.9rem 1rem;
    opacity: 0.78;
    font-size: 0.9rem;
}

/* /Sys/AiToolLog double-click dialog: the JSON viewer fills the whole dialog body. */
.rz-dialog:has(.ai-toollog-json) {
    display: flex;
    flex-direction: column;
}

.rz-dialog-content:has(.ai-toollog-json) {
    flex: 1 1 auto;
    min-height: 0;
}

.ai-toollog-json {
    height: 100%;
}

    .ai-toollog-json .z-json-viewer,
    .ai-toollog-json .z-json-viewer__surface {
        height: 100%;
    }

    .ai-toollog-json .z-json-viewer__code-frame {
        height: 100%;
        min-height: 0;
    }

/* Fehler- bzw. Operation-Text im Detail-Reiter der Log-Masken (Farben via rz-*-Klassen) */
.ai-toollog-error,
.agent-apicall-operation {
    margin: 0;
    padding: 0.5rem;
    max-height: 40vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border-radius: var(--rz-border-radius);
}

.z-json-viewer__code-frame {
    position: relative;
    min-height: var(--z-json-viewer-height, calc(12 * 1.55em + 1.8rem));
    height: var(--z-json-viewer-height, calc(12 * 1.55em + 1.8rem));
    overflow: auto;
    scrollbar-gutter: stable;
    color: var(--rz-input-value-color, var(--rz-text-color));
    background-color: var(--rz-input-background-color, var(--rz-base-50));
    border: var(--rz-input-border, 1px solid var(--rz-input-border-color, rgba(0,0,0,.23)));
    border-block-end: var(--rz-input-border-block-end, var(--rz-input-border, 1px solid var(--rz-input-border-color, rgba(0,0,0,.23))));
    border-radius: var(--rz-input-border-radius, 12px);
    box-shadow: var(--rz-input-shadow);
    transition: var(--rz-input-transition, all .15s ease);
    outline: none;
    cursor: text;
}

.z-json-viewer__code-frame--resizable {
    resize: vertical;
    max-height: var(--z-json-viewer-max-height, none);
}

.z-json-viewer__code-frame:hover {
    box-shadow: var(--rz-input-shadow);
    background-color: var(--rz-input-background-color, var(--rz-base-50));
    border: var(--rz-input-border, 1px solid var(--rz-input-border-color, rgba(0,0,0,.23)));
    border-block-end: var(--rz-input-border-block-end, var(--rz-input-border, 1px solid var(--rz-input-border-color, rgba(0,0,0,.23))));
}

.z-json-viewer__code-frame:focus,
.z-json-viewer__code-frame:focus-visible,
.z-json-viewer__code-frame:focus-within {
    box-shadow: var(--rz-input-shadow);
    background-color: var(--rz-input-background-color, var(--rz-base-50));
    border: var(--rz-input-border, 1px solid var(--rz-input-border-color, rgba(0,0,0,.23)));
    border-block-end: var(--rz-input-border-block-end, var(--rz-input-border, 1px solid var(--rz-input-border-color, rgba(0,0,0,.23))));
    outline: var(--rz-input-focus-outline, none);
    outline-offset: var(--rz-input-focus-outline-offset, 0);
}

.z-json-viewer__code {
    margin: 0;
    padding-top: var(--rz-input-padding-block, .625rem);
    padding-right: var(--rz-input-padding-inline, .75rem);
    padding-bottom: var(--rz-input-padding-block, .625rem);
    padding-left: var(--rz-input-padding-inline, .75rem);
    min-height: 100%;
    overflow: visible;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.87rem;
    line-height: 1.55;
    white-space: pre;
    tab-size: 2;
}

.z-json-viewer__code--wrap {
    white-space: pre-wrap;
    word-break: break-word;
}

.z-json-viewer__copy-btn {
    position: absolute;
    top: calc(var(--rz-input-padding-block, .625rem) - 0.05rem);
    right: calc(var(--rz-input-padding-inline, .75rem) + 0.7rem);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rz-base-background-color, var(--rz-base)) 78%, transparent);
    backdrop-filter: blur(2px);
}

.z-json-viewer__copy-btn .rz-button-text {
    display: none;
}

.z-json-viewer__copy-btn .rzi {
    font-size: 1rem;
}

.z-json-viewer__token--punct {
    color: var(--rz-text-color);
}

.z-json-viewer__token--key {
    color: var(--rz-primary);
}

.z-json-viewer__token--string {
    color: var(--rz-success);
}

.z-json-viewer__token--number {
    color: var(--rz-info);
}

.z-json-viewer__token--bool {
    color: var(--rz-warning);
    font-weight: 600;
}

.z-json-viewer__token--null {
    color: var(--rz-danger);
    font-style: italic;
}



/* ===================================================================
 * ZGrid — generic mobile / accordion view
 * Active when ZGrid.UseMobileInlineView is true (mobile viewport or
 * forced Mobile Device Mode). Theme-safe: uses card-background-color
 * + text-color for adaptive surfaces; semantic colors paired with on-*.
 * =================================================================== */

.zgrid-desktop-hidden {
    display: none !important;
}

/* Desktop-Grid temporaer sichtbar wenn editiert wird (Inline-Edit-Row) */
.zgrid-desktop-shown-for-edit {
    display: block;
}

.zgrid-mob-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    background: var(--rz-card-background-color);
    border-bottom: 1px solid var(--rz-base-border-color);
}

.zgrid-mob-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-base-border-color);
}

.zgrid-mob-search-input {
    flex: 1 1 auto;
    border: none;
    outline: none;
    background: transparent;
    color: var(--rz-text-color);
    font-size: 0.95rem;
}

.zgrid-mob-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.zgrid-mob-actions > .rz-button {
    min-width: 42px;
    min-height: 42px;
    padding: 0 0.8rem;
}

.zgrid-mob-hamburger {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--rz-base-border-color);
    border-radius: 6px;
    overflow: hidden;
    background: var(--rz-card-background-color);
    margin-top: 0.25rem;
}

.zgrid-mob-hamburger-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--rz-base-border-color);
    color: var(--rz-text-color);
    font: inherit;
    text-align: left;
    cursor: pointer;
    min-height: 44px;
}

.zgrid-mob-hamburger-item:last-child {
    border-bottom: none;
}

.zgrid-mob-hamburger-item:hover:not([disabled]) {
    background: var(--rz-base-100);
    color: var(--rz-base-900);
}

.zgrid-mob-hamburger-item[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.zgrid-mob-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem 1.5rem 0.6rem;
}

.zgrid-mob-card {
    background: var(--rz-card-background-color);
    border: 1px solid var(--rz-base-border-color);
    border-radius: 6px;
    overflow: hidden;
    color: var(--rz-text-color);
}

.zgrid-mob-card.is-expanded {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.zgrid-mob-card.is-editing {
    border-color: var(--rz-primary);
}

.zgrid-mob-card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    cursor: pointer;
    min-height: 56px;
}

.zgrid-mob-card-headmain {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.zgrid-mob-card-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
}

.zgrid-mob-card-line:first-child {
    font-weight: 600;
}

.zgrid-mob-card-chevron {
    flex: 0 0 auto;
    color: var(--rz-text-color);
    opacity: 0.7;
}

.zgrid-mob-card-body {
    padding: 0.6rem 0.7rem 0.8rem 0.7rem;
    border-top: 1px solid var(--rz-base-border-color);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.zgrid-mob-card-detail {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    padding: 0.2rem 0;
    border-bottom: 1px dashed var(--rz-base-border-color);
}

.zgrid-mob-card-detail:last-of-type {
    border-bottom: none;
}

.zgrid-mob-card-detail-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.65;
}

.zgrid-mob-card-detail-value {
    font-size: 0.95rem;
    word-break: break-word;
}

.zgrid-mob-card-edit-hint {
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    background: var(--rz-info);
    color: var(--rz-on-info);
    font-size: 0.85rem;
}

.zgrid-mob-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.zgrid-mob-card-actions > .rz-button {
    flex: 1 1 calc(50% - 0.4rem);
    min-height: 42px;
}

.zgrid-mob-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--rz-text-color);
    opacity: 0.65;
}


/* ZGrid mobile auto-edit-form */
.zgrid-mob-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.zgrid-mob-edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.zgrid-mob-edit-field-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.75;
    color: var(--rz-text-color);
}

.zgrid-mob-edit-field-required {
    color: var(--rz-danger);
    margin-left: 0.15rem;
}

.zgrid-mob-edit-field-readonly {
    padding: 0.5rem 0.6rem;
    border-radius: 4px;
    background: var(--rz-base-background-color);
    border: 1px dashed var(--rz-base-border-color);
    color: var(--rz-text-color);
    word-break: break-word;
}

/* Form-Controls bei schmaler Breite immer 100% */
.zgrid-mob-edit-field .rz-textbox,
.zgrid-mob-edit-field .rz-dropdown,
.zgrid-mob-edit-field .rz-datepicker,
.zgrid-mob-edit-field .rz-numeric,
.zgrid-mob-edit-field .rz-password {
    width: 100% !important;
}

/* Im Edit-Modus gibt es keinen Card-Head -> oberen Trenner weglassen */
.zgrid-mob-card.is-editing .zgrid-mob-card-body {
    border-top: none;
}

/* Secret-Eingabefelder (ZFormFieldText IsSecret): type="text" mit CSS-Maskierung,
   damit Browser-Passwortmanager sie ignorieren (kein Speichern-Dialog, kein Autofill). */
input.z-secret-mask,
.z-secret-mask input {
    -webkit-text-security: disc;
}
