:root{
    --tw-blue:#0f7f95;
    --tw-orange:#f0a11f;
    --tw-anthracite:#232b2f;
}

[data-tooltip]{
    position:relative;
}

[data-tooltip]::after{
    content:attr(data-tooltip);
    position:absolute;
    left:50%;
    top:calc(100% + 10px);
    bottom:auto;
    transform:translateX(-50%) translateY(-6px);
    background:rgba(7, 26, 34, 0.96);
    color:#ffffff;
    padding:7px 10px;
    border-radius:9px;
    font-size:12px;
    font-weight:600;
    letter-spacing:.02em;
    white-space:nowrap;
    box-shadow:0 10px 24px rgba(0,0,0,0.28);
    opacity:0;
    pointer-events:none;
    transition:opacity .16s ease, transform .16s ease;
    z-index:12000;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after,
[data-tooltip].tooltip-visible::after{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}

@media (hover: none), (pointer: coarse){
    [data-tooltip]::after{
        top:calc(100% + 8px);
        font-size:11px;
        padding:6px 9px;
        max-width:140px;
        white-space:normal;
        text-align:center;
    }
}

.modal-overlay,
.modal,
.modal-content,
.large-modal,
.small-modal,
.form-section,
.form-grid,
.view-grid,
.view-list,
.dynamic-list,
.dynamic-card,
.picker-list,
.picker-item,
.card-scroll{
    overflow-x:hidden;
}

html[data-theme="light"]{
    --theme-text:#233136;
    --theme-text-muted:#536971;
    --theme-surface:#fbfeff;
    --theme-surface-soft:#f4f9fb;
    --theme-surface-strong:#f7fbfc;
    --theme-surface-alt:#e1eff3;
    --theme-border:rgba(15,127,149,0.22);
    --theme-shadow:0 14px 34px rgba(12,42,52,0.10);
    --theme-page-bg:
        radial-gradient(circle at 10% 0%, #f07f19 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, #005566 0%, transparent 40%),
        linear-gradient(160deg,#08141c,#0d2733);
    --theme-panel-bg:#fbfeff;
    --theme-panel-soft-bg:#f4f9fb;
    --theme-sidebar-bg:#f7fbfc;
    --theme-input-bg:#f8f4ee;
    --theme-input-border:#ddd4c7;
    --theme-input-text:#213136;
    --theme-table-head:#dbeef2;
    --theme-button-bg:linear-gradient(135deg,var(--tw-orange),#ffbd59);
    --theme-button-text:#ffffff;
    --theme-accent:var(--tw-blue);
    --theme-icon-bg:#e7f2f5;
}

html[data-theme="light"] body{
    background:var(--theme-page-bg) !important;
    color:var(--theme-text) !important;
}

html[data-theme="light"] body,
html[data-theme="light"] body p,
html[data-theme="light"] body span,
html[data-theme="light"] body h1,
html[data-theme="light"] body h2,
html[data-theme="light"] body h3,
html[data-theme="light"] body h4,
html[data-theme="light"] body h5,
html[data-theme="light"] body h6,
html[data-theme="light"] body label,
html[data-theme="light"] body td,
html[data-theme="light"] body th,
html[data-theme="light"] body li{
    color:var(--theme-text);
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .card,
html[data-theme="light"] .topbar,
html[data-theme="light"] .modal,
html[data-theme="light"] .login-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .form-section,
html[data-theme="light"] .card-scroll,
html[data-theme="light"] .kunde_modal,
html[data-theme="light"] .qr-box{
    background:var(--theme-panel-bg) !important;
    border-color:var(--theme-border) !important;
    box-shadow:var(--theme-shadow) !important;
}

html[data-theme="light"] .sidebar{
    background:var(--theme-sidebar-bg) !important;
}

html[data-theme="light"] .mobile-bottom-dock{
    background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(245,248,250,0.97));
    border-top-color:rgba(15,127,149,0.12);
}

html[data-theme="light"] .mobile-bottom-dock__item{
    color:#6d7279;
}

html[data-theme="light"] .mobile-bottom-dock__item i{
    color:#8a9096;
}

html[data-theme="light"] .mobile-bottom-dock__item.is-active,
html[data-theme="light"] .mobile-bottom-dock__item.is-active i{
    color:#38414a;
}

html[data-theme="light"] .mobile-bottom-dock__fab-track{
    background:linear-gradient(180deg, #d8dde2, #c6cdd4);
    box-shadow:0 8px 18px rgba(56,73,89,0.12), inset 0 1px 0 rgba(255,255,255,0.7);
}

html[data-theme="light"] .time-live-panel{
    --time-ring-shell:rgba(255,255,255,0.42);
    --time-ring-track:rgba(255,255,255,0.52);
    --time-ring-progress:#58d487;
    --time-ring-glow:rgba(88,212,135,0.28);
    --time-panel-glow:rgba(88,212,135,0.24);
    --time-inner-bg-start:rgba(252,254,255,0.98);
    --time-inner-bg-end:rgba(232,240,245,0.96);
    --time-inner-text:#000000;
    --time-inner-sub:#667b85;
    --time-label:#ffffff;
}

html[data-theme="light"] .time-live-panel__ring{
    box-shadow:0 18px 36px rgba(5,18,25,0.18), inset 0 1px 0 rgba(255,255,255,0.62);
}

html[data-theme="light"] .time-live-panel__inner{
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.92), 0 10px 22px rgba(8,24,33,0.14);
}

html[data-theme="light"] .time-live-panel p{
    text-shadow:0 6px 18px rgba(3,14,20,0.28);
}

html[data-theme="light"] #timeLiveLabel{
    color:#ffffff !important;
}

html:not([data-theme="light"]) .mobile-bottom-dock{
    background:linear-gradient(180deg, rgba(8,20,28,0.98), rgba(10,26,35,0.98));
    border-top-color:rgba(255,255,255,0.06);
    box-shadow:0 -12px 28px rgba(0,0,0,0.34);
}

html:not([data-theme="light"]) .mobile-bottom-dock::before{
    background:radial-gradient(circle at center, rgba(10,26,35,0.98) 0 58%, rgba(10,26,35,0) 60%);
}

html:not([data-theme="light"]) .mobile-bottom-dock__item{
    color:#95a5b1;
}

html:not([data-theme="light"]) .mobile-bottom-dock__item i{
    color:#8396a3;
}

html:not([data-theme="light"]) .mobile-bottom-dock__item.is-active,
html:not([data-theme="light"]) .mobile-bottom-dock__item.is-active i{
    color:#ffffff;
}

html:not([data-theme="light"]) .mobile-bottom-dock__fab-track{
    background:linear-gradient(180deg, #7b8490, #656e7a);
}

html:not([data-theme="light"]) .time-live-panel{
    --time-ring-shell:rgba(15,24,31,0.78);
    --time-ring-track:rgba(190,208,219,0.16);
    --time-ring-progress:#67df90;
    --time-ring-glow:rgba(103,223,144,0.34);
    --time-panel-glow:rgba(121,230,154,0.16);
    --time-inner-bg-start:#16232c;
    --time-inner-bg-end:#0f1a22;
    --time-inner-text:#eef7fb;
    --time-inner-sub:#9eb4bf;
    --time-label:#eef7fb;
}

html:not([data-theme="light"]) .time-live-panel__ring{
    box-shadow:0 18px 34px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.08);
}

html:not([data-theme="light"]) .time-live-panel__inner{
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 24px rgba(0,0,0,0.22);
}

@media(max-width:850px){
    html[data-theme="light"] .time-mobile-menu{
        background:linear-gradient(180deg, rgba(221,232,238,0.10), rgba(221,232,238,0.42));
    }

    html[data-theme="light"] .time-mobile-menu__sheet{
        background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,250,0.98));
        border-color:rgba(15,127,149,0.10);
        box-shadow:0 18px 34px rgba(20,49,61,0.12);
    }

    html[data-theme="light"] .time-mobile-menu__headline h2,
    html[data-theme="light"] .time-mobile-menu__profile strong,
    html[data-theme="light"] .time-mobile-menu__item,
    html[data-theme="light"] .time-mobile-menu__project,
    html[data-theme="light"] .time-mobile-menu__task,
    html[data-theme="light"] .time-mobile-menu__halle-entry{
        color:#223238;
    }

    html[data-theme="light"] .time-mobile-menu__submenu-header,
    html[data-theme="light"] .time-mobile-menu__item-copy small,
    html[data-theme="light"] .time-mobile-menu__project-copy small,
    html[data-theme="light"] .time-mobile-menu__task small,
    html[data-theme="light"] .time-mobile-menu__halle-entry small,
    html[data-theme="light"] .time-mobile-menu__item > i,
    html[data-theme="light"] .time-mobile-menu__empty{
        color:#61767e;
    }

    html[data-theme="light"] .time-mobile-menu__close,
    html[data-theme="light"] .time-mobile-menu__item,
    html[data-theme="light"] .time-mobile-menu__project,
    html[data-theme="light"] .time-mobile-menu__task,
    html[data-theme="light"] .time-mobile-menu__halle-entry,
    html[data-theme="light"] .time-mobile-menu__create-form input{
        background:rgba(15,127,149,0.04);
        border-color:rgba(15,127,149,0.10);
    }

    html[data-theme="light"] .time-mobile-menu__item{
        border-bottom-color:rgba(15,127,149,0.10);
    }

    html[data-theme="light"] .time-mobile-menu__add{
        background:rgba(15,127,149,0.08);
        color:#1d3a44;
    }

    html[data-theme="light"] .time-mobile-menu__empty{
        border-color:rgba(15,127,149,0.14);
    }

    html[data-theme="light"] .time-mobile-menu__avatar{
        background:linear-gradient(180deg, rgba(15,127,149,0.18), rgba(15,127,149,0.08));
        color:#1d3a44;
    }

    html[data-theme="light"] .time-mobile-menu__handle{
        background:rgba(15,127,149,0.18);
    }

    html[data-theme="light"] .time-day-log-menu__sheet{
        background:linear-gradient(180deg, rgba(255,255,255,0.985), rgba(244,249,251,0.985));
        border-color:rgba(15,127,149,0.12);
        box-shadow:0 18px 36px rgba(13,48,58,0.14);
    }

    html[data-theme="light"] .time-day-log-menu__handle{
        background:rgba(15,127,149,0.20);
    }

    html[data-theme="light"] .time-day-log-menu__topbar strong,
    html[data-theme="light"] .time-day-log-menu__date-chip,
    html[data-theme="light"] .time-day-log-menu__item-copy strong,
    html[data-theme="light"] .time-day-log-menu__item-time strong,
    html[data-theme="light"] .time-day-log-menu__summary-card strong{
        color:#17313b;
    }

    html[data-theme="light"] .time-day-log-menu__nav-btn{
        background:#ffffff;
        color:#20404a;
        border:1px solid rgba(15,127,149,0.14);
        box-shadow:0 10px 22px rgba(13,48,58,0.08);
    }

    html[data-theme="light"] .time-day-log-menu__nav-btn:disabled,
    html[data-theme="light"] .time-day-log-menu__nav-btn[aria-disabled="true"]{
        opacity:.45;
        background:rgba(15,127,149,0.06);
        box-shadow:none;
    }

    html[data-theme="light"] .time-day-log-menu__date-chip{
        background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,246,249,0.98));
        border:1px solid rgba(15,127,149,0.12);
        box-shadow:0 12px 24px rgba(13,48,58,0.08);
    }

    html[data-theme="light"] .time-day-log-menu__date-chip i,
    html[data-theme="light"] .time-day-log-menu__summary-card span,
    html[data-theme="light"] .time-day-log-menu__item-time small,
    html[data-theme="light"] .time-day-log-menu__item-copy small{
        color:#5c7580;
    }

    html[data-theme="light"] .time-day-log-menu__summary-card{
        background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,247,250,0.98));
        border-color:rgba(15,127,149,0.12);
        box-shadow:0 12px 24px rgba(13,48,58,0.08);
    }

    html[data-theme="light"] .time-day-log-menu__summary-card.is-pause{
        background:linear-gradient(180deg, rgba(51,166,255,0.14), rgba(51,166,255,0.06));
        border-color:rgba(51,166,255,0.18);
    }

    html[data-theme="light"] .time-day-log-menu__item-main{
        background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,248,250,0.98));
        border-color:rgba(15,127,149,0.12);
        border-left-color:rgba(77,200,120,0.92);
        box-shadow:0 14px 28px rgba(13,48,58,0.09);
    }

    html[data-theme="light"] .time-day-log-menu__item.is-pause .time-day-log-menu__item-main{
        background:linear-gradient(180deg, rgba(232,245,255,0.98), rgba(223,239,250,0.98));
        border-color:rgba(51,166,255,0.22);
        border-left-color:rgba(51,166,255,0.92);
    }

    html[data-theme="light"] .time-day-log-menu__item-duration{
        background:rgba(15,127,149,0.08);
        color:#20404a;
    }

    html[data-theme="light"] .time-day-log-menu__item-dot{
        box-shadow:0 0 0 4px rgba(103,226,141,0.18);
    }

    html[data-theme="light"] .time-day-log-menu__timeline .time-mobile-menu__empty{
        background:#ffffff;
        border-color:rgba(15,127,149,0.14);
        color:#5c7580;
    }
}

html[data-theme="light"] .card-scroll,
html[data-theme="light"] .extra-adresse,
html[data-theme="light"] .arbeit-item,
html[data-theme="light"] .selected-arbeiten,
html[data-theme="light"] .delete-warning,
html[data-theme="light"] .dynamic-card,
html[data-theme="light"] .view-card,
html[data-theme="light"] .view-item,
html[data-theme="light"] .autocomplete-box{
    background:var(--theme-panel-soft-bg) !important;
    border-color:var(--theme-border) !important;
}

html[data-theme="light"] .topbar{
    background:var(--theme-panel-bg) !important;
}

html[data-theme="light"] .modal-header,
html[data-theme="light"] .arbeits-table thead,
html[data-theme="light"] .kunden-table thead,
html[data-theme="light"] .mitarbeiter-table thead,
html[data-theme="light"] .arbeiten-table thead,
html[data-theme="light"] .plz-table thead{
    background:var(--theme-table-head) !important;
}

html[data-theme="light"] .modal-header{
    background:#ffffff !important;
    border-bottom:1px solid rgba(15,127,149,0.12) !important;
}

html[data-theme="light"] .menu-item{
    color:var(--theme-text) !important;
}

html[data-theme="light"] .menu-item i{
    background:var(--theme-icon-bg) !important;
    border-color:var(--theme-border) !important;
}

html[data-theme="light"] .menu-toggle,
html[data-theme="light"] .menu-toggle i{
    color:var(--theme-text) !important;
}

html[data-theme="light"] .menu-item:hover,
html[data-theme="light"] .actions a:hover,
html[data-theme="light"] .maps-btn:hover,
html[data-theme="light"] .add-btn:hover{
    background:var(--theme-surface-alt) !important;
}

html[data-theme="light"] .actions a{
    background:#ffffff !important;
    border:1px solid rgba(15,127,149,0.18) !important;
    color:#1f2f35 !important;
}

html[data-theme="light"] .actions a i{
    color:#1f2f35 !important;
}

html[data-theme="light"] .maps-btn,
html[data-theme="light"] .modal-close,
html[data-theme="light"] .remove-adresse,
html[data-theme="light"] .remove-ort{
    background:#ffffff !important;
    border:1px solid rgba(15,127,149,0.18) !important;
    color:#1f2f35 !important;
}

html[data-theme="light"] .maps-btn i,
html[data-theme="light"] .modal-close i,
html[data-theme="light"] .remove-adresse i,
html[data-theme="light"] .remove-ort i{
    color:#1f2f35 !important;
}

html[data-theme="light"] .menu-item.active{
    background:linear-gradient(135deg, rgba(15,127,149,0.14), rgba(240,161,31,0.18)) !important;
}

html[data-theme="light"] .logout-btn,
html[data-theme="light"] .add-customer-btn,
html[data-theme="light"] .add-order-btn,
html[data-theme="light"] .save-btn,
html[data-theme="light"] .add-btn,
html[data-theme="light"] .login-btn{
    background:var(--theme-button-bg) !important;
    color:var(--theme-button-text) !important;
    border:none !important;
}

html[data-theme="light"] .add-btn{
    background:#ffffff !important;
    color:#1f2f35 !important;
    border:1px solid rgba(15,127,149,0.18) !important;
    box-shadow:none !important;
}

html[data-theme="light"] .add-btn i{
    color:#1f2f35 !important;
}

html[data-theme="light"] .add-btn:hover{
    background:linear-gradient(135deg, rgba(15,127,149,0.10), rgba(240,161,31,0.12)) !important;
    border-color:rgba(15,127,149,0.28) !important;
    color:#17333c !important;
}

html[data-theme="light"] .add-btn:hover i{
    color:#17333c !important;
}

html[data-theme="light"] .qr-btn{
    background:linear-gradient(135deg, #f0a11f, #ffb949) !important;
    color:#ffffff !important;
    border:none !important;
    box-shadow:0 10px 22px rgba(240,161,31,0.22) !important;
}

html[data-theme="light"] .qr-btn:hover{
    background:linear-gradient(135deg, #e48f11, #ffad31) !important;
    box-shadow:0 12px 26px rgba(240,161,31,0.28) !important;
}

html[data-theme="light"] .qr-btn i,
html[data-theme="light"] .login-btn i,
html[data-theme="light"] .logout-btn i,
html[data-theme="light"] .save-btn i,
html[data-theme="light"] .add-btn i,
html[data-theme="light"] .add-customer-btn i,
html[data-theme="light"] .add-order-btn i{
    color:#ffffff !important;
}

html[data-theme="light"] .cancel-btn{
    background:var(--theme-surface-alt) !important;
    color:var(--theme-text) !important;
}

html[data-theme="light"] .delete-btn,
html[data-theme="light"] .actions .delete:hover{
    background:#d74b3f !important;
    color:#fff !important;
}

html[data-theme="light"] .actions .delete:hover i{
    color:#ffffff !important;
}

html[data-theme="light"] .remove-adresse:hover,
html[data-theme="light"] .remove-ort:hover{
    background:#d74b3f !important;
    border-color:#d74b3f !important;
}

html[data-theme="light"] .remove-adresse:hover i,
html[data-theme="light"] .remove-ort:hover i{
    color:#ffffff !important;
}

html[data-theme="light"] .remove-row{
    background:#ffffff !important;
    border:1px solid rgba(15,127,149,0.18) !important;
    color:#1f2f35 !important;
}

html[data-theme="light"] .remove-row:hover{
    background:#d74b3f !important;
    border-color:#d74b3f !important;
    color:#ffffff !important;
}

html[data-theme="light"] #tasksModal .dynamic-card{
    background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,252,0.98)) !important;
    border:1px solid rgba(15,127,149,0.16) !important;
    box-shadow:0 12px 28px rgba(13,48,58,0.08) !important;
}

html[data-theme="light"] #tasksModal .section-header{
    border-bottom:1px solid rgba(15,127,149,0.12) !important;
}

html[data-theme="light"] #tasksModal input[name="task_order[]"],
html[data-theme="light"] #tasksModal input[name="task_title[]"],
html[data-theme="light"] #tasksModal textarea[name="task_steps[]"]{
    background:#ffffff !important;
}

html[data-theme="light"] .time-analysis-panel{
    background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,250,252,0.98)) !important;
    border:1px solid rgba(15,127,149,0.16) !important;
    box-shadow:0 12px 28px rgba(13,48,58,0.08) !important;
}

html[data-theme="light"] .time-analysis-copy h4,
html[data-theme="light"] .time-analysis-stat strong,
html[data-theme="light"] .time-analysis-center strong{
    color:#14313d !important;
}

html[data-theme="light"] .time-analysis-copy p,
html[data-theme="light"] .time-analysis-kicker,
html[data-theme="light"] .time-analysis-stat span,
html[data-theme="light"] .time-analysis-center span{
    color:#55727d !important;
}

html[data-theme="light"] .time-analysis-stat{
    background:#ffffff !important;
    border:1px solid rgba(15,127,149,0.12) !important;
}

html[data-theme="light"] .time-analysis-track{
    stroke:rgba(20,49,61,0.12) !important;
}

.status-offen,
.status-geplant,
.status-arbeit,
.status-zugeordnet,
.status-erledigt,
.status-vorgeschrieben,
.status-geloescht{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:6px !important;
    width:auto !important;
    min-width:auto !important;
    padding:0 !important;
    border-radius:0 !important;
    border:0 !important;
    font-size:14px !important;
    font-weight:800 !important;
    line-height:1 !important;
    background:none !important;
    box-shadow:none !important;
    outline:0 !important;
}

.status-offen i,
.status-geplant i,
.status-arbeit i,
.status-zugeordnet i,
.status-erledigt i,
.status-vorgeschrieben i,
.status-geloescht i{
    font-size:15px !important;
    width:16px !important;
    text-align:center !important;
}

.status-offen{
    color:#ff4d4d !important;
}

.status-geplant{
    color:#2f80ff !important;
}

.status-zugeordnet{
    color:#00b8ff !important;
}

.status-arbeit{
    color:#00b86b !important;
}

.status-erledigt{
    color:#9aa6b2 !important;
}

.status-vorgeschrieben{
    color:#ff7a00 !important;
}

.status-geloescht{
    color:#ffffff !important;
}

html[data-theme="light"] .status-offen,
html[data-theme="light"] .status-geplant,
html[data-theme="light"] .status-arbeit,
html[data-theme="light"] .status-zugeordnet,
html[data-theme="light"] .status-erledigt,
html[data-theme="light"] .status-vorgeschrieben,
html[data-theme="light"] .status-geloescht{
    outline:0 !important;
    background:none !important;
    border:0 !important;
    box-shadow:none !important;
}

html[data-theme="light"] .status-offen{
    color:#ff4d4d !important;
}

html[data-theme="light"] .status-geplant{
    color:#2f80ff !important;
}

html[data-theme="light"] .status-arbeit{
    color:#00b86b !important;
}

html[data-theme="light"] .status-zugeordnet{
    color:#00b8ff !important;
}

html[data-theme="light"] .status-erledigt{
    color:#9aa6b2 !important;
}

html[data-theme="light"] .status-vorgeschrieben{
    color:#ff7a00 !important;
}

html[data-theme="light"] .status-geloescht{
    color:#ffffff !important;
    outline:0 !important;
}

html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group select,
html[data-theme="light"] .form-group textarea,
html[data-theme="light"] .select-box select,
html[data-theme="light"] .input-group input,
html[data-theme="light"] .twid-part,
html[data-theme="light"] .password-part,
html[data-theme="light"] .arbeit-input,
html[data-theme="light"] .kunde_adresse_input input,
html[data-theme="light"] .adresse-input input{
    background:var(--theme-input-bg) !important;
    color:var(--theme-input-text) !important;
    border:1px solid var(--theme-input-border) !important;
    border-radius:12px !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.85) !important;
}

html[data-theme="light"] .table-search input,
html[data-theme="light"] #kundenSearch,
html[data-theme="light"] .autocomplete input{
    background:var(--theme-input-bg) !important;
    color:var(--theme-input-text) !important;
    border:1px solid var(--theme-input-border) !important;
    border-radius:12px !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.85) !important;
}

html[data-theme="light"] .form-group input:focus,
html[data-theme="light"] .form-group select:focus,
html[data-theme="light"] .form-group textarea:focus,
html[data-theme="light"] .select-box select:focus,
html[data-theme="light"] .input-group input:focus,
html[data-theme="light"] .twid-part:focus,
html[data-theme="light"] .password-part:focus,
html[data-theme="light"] .status-filter:focus,
html[data-theme="light"] .arbeit-input:focus,
html[data-theme="light"] .kunde_adresse_input input:focus,
html[data-theme="light"] .adresse-input input:focus,
html[data-theme="light"] .table-search input:focus,
html[data-theme="light"] #kundenSearch:focus,
html[data-theme="light"] .autocomplete input:focus{
    outline:none !important;
    border-color:#d4c7b6 !important;
    box-shadow:0 0 0 3px rgba(240,161,31,0.10), inset 0 1px 0 rgba(255,255,255,0.92) !important;
}

html[data-theme="light"] .modal-content,
html[data-theme="light"] .modal p,
html[data-theme="light"] .modal .form-grid{
    background:transparent !important;
    color:var(--theme-text) !important;
}

html[data-theme="light"] .arbeit-item,
html[data-theme="light"] .selected-arbeiten{
    background:var(--theme-panel-soft-bg) !important;
}

html[data-theme="light"] .form-group label,
html[data-theme="light"] .field-hint,
html[data-theme="light"] .subtitle,
html[data-theme="light"] .bottom,
html[data-theme="light"] .table-search input::placeholder,
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{
    color:var(--theme-text-muted) !important;
}

html[data-theme="light"] .kunden-table thead th,
html[data-theme="light"] .mitarbeiter-table thead th,
html[data-theme="light"] .arbeiten-table thead th,
html[data-theme="light"] .arbeits-table thead th,
html[data-theme="light"] .plz-table thead th{
    color:#17333c !important;
}

html[data-theme="light"] .kunden-table td,
html[data-theme="light"] .mitarbeiter-table td,
html[data-theme="light"] .arbeiten-table td,
html[data-theme="light"] .arbeits-table td,
html[data-theme="light"] .plz-table td{
    color:var(--theme-text) !important;
    border-color:rgba(15,127,149,0.14) !important;
}

html[data-theme="light"] .kunden-table .cell-title,
html[data-theme="light"] .mitarbeiter-table .cell-title,
html[data-theme="light"] .arbeiten-table .cell-title,
html[data-theme="light"] .arbeits-table .cell-title,
html[data-theme="light"] .plz-table .cell-title,
html[data-theme="light"] .arbeiten-table .summary-stack strong,
html[data-theme="light"] .arbeits-table .summary-stack strong{
    color:var(--theme-text) !important;
}

html[data-theme="light"] .kunden-table tbody tr:hover,
html[data-theme="light"] .mitarbeiter-table tbody tr:hover,
html[data-theme="light"] .arbeiten-table tbody tr:hover,
html[data-theme="light"] .arbeits-table tbody tr:hover,
html[data-theme="light"] .plz-table tbody tr:hover{
    background:rgba(15,127,149,0.10) !important;
}

html[data-theme="light"] .kunden-table,
html[data-theme="light"] .mitarbeiter-table,
html[data-theme="light"] .arbeiten-table,
html[data-theme="light"] .arbeits-table{
    background:#f7fbfc !important;
}

html[data-theme="light"] .kunden-table thead,
html[data-theme="light"] .mitarbeiter-table thead,
html[data-theme="light"] .arbeiten-table thead,
html[data-theme="light"] .arbeits-table thead{
    background:#d9edf2 !important;
}

html[data-theme="light"] .kunden-table thead th,
html[data-theme="light"] .mitarbeiter-table thead th,
html[data-theme="light"] .arbeiten-table thead th,
html[data-theme="light"] .arbeits-table thead th{
    background:#d9edf2 !important;
    color:#17333c !important;
    border-bottom:1px solid rgba(15,127,149,0.16) !important;
}

html[data-theme="light"] .kunden-table thead th.table-header-sortable::after,
html[data-theme="light"] .mitarbeiter-table thead th.table-header-sortable::after,
html[data-theme="light"] .arbeiten-table thead th.table-header-sortable::after,
html[data-theme="light"] .arbeits-table thead th.table-header-sortable::after{
    color:#4a6770 !important;
}

html[data-theme="light"] .status-filter{
    background:#ffffff !important;
    color:#1f2f35 !important;
    border:1px solid rgba(15,127,149,0.18) !important;
    border-radius:10px !important;
    box-shadow:none !important;
}

html[data-theme="light"] .status-filter.active,
html[data-theme="light"] .status-filter:hover{
    background:var(--theme-surface-alt) !important;
    border-color:rgba(15,127,149,0.28) !important;
    color:#17333c !important;
}

html[data-theme="light"] .status-filter:focus{
    outline:none !important;
    background:var(--theme-surface-alt) !important;
    border-color:rgba(15,127,149,0.28) !important;
    box-shadow:none !important;
}

html[data-theme="light"] .status-filter i{
    color:inherit !important;
}

html[data-theme="light"] .modal-overlay,
html[data-theme="light"] .kunde_modal_overlay{
    background:rgba(18,26,29,0.56) !important;
}

html[data-theme="light"] .overlay{
    background:rgba(18,26,29,0.42) !important;
}

html[data-theme="light"] ::-webkit-scrollbar{
    width:10px;
    height:10px;
}

html[data-theme="light"] ::-webkit-scrollbar-track{
    background:#eaf2f4;
    border-radius:999px;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb{
    background:linear-gradient(180deg, #0f7f95, #f0a11f);
    border-radius:999px;
    border:2px solid #eaf2f4;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb:hover{
    background:linear-gradient(180deg, #0b6d81, #e38f17);
}

.theme-toggle{
    position:static;
    margin-left:auto;
    border:none;
    border-radius:999px;
    padding:4px;
    background:rgba(7, 26, 34, 0.9);
    color:#fff;
    cursor:pointer;
    box-shadow:0 10px 24px rgba(0,0,0,0.2);
    display:flex;
    align-items:center;
    flex-shrink:0;
    transition:transform .18s ease, box-shadow .18s ease, background .25s ease;
}

.theme-toggle:hover{
    transform:translateY(-1px);
}

html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after{
    transition:none !important;
}

.theme-toggle__track{
    position:relative;
    width:72px;
    height:36px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    padding:0 10px;
    background:linear-gradient(180deg, #0a3140 0%, #112733 100%);
    overflow:hidden;
    transition:background .35s ease, box-shadow .35s ease;
}

.theme-toggle__track::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 22% 30%, rgba(240,161,31,0.12), transparent 22%),
        radial-gradient(circle at 78% 28%, rgba(255,255,255,0.16), transparent 10%),
        radial-gradient(circle at 64% 42%, rgba(255,255,255,0.11), transparent 8%),
        radial-gradient(circle at 84% 58%, rgba(255,255,255,0.1), transparent 9%);
    opacity:1;
    transition:opacity .35s ease;
}

.theme-toggle__sun,
.theme-toggle__moon{
    position:absolute;
    z-index:1;
    font-size:13px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:18px;
    height:18px;
    transition:opacity .35s ease, transform .35s ease, color .35s ease, text-shadow .35s ease;
}

.theme-toggle__sun{
    right:10px;
    color:#ffe08a;
    opacity:0.42;
    transform:translateY(0) scale(0.88);
    text-shadow:none;
}

.theme-toggle__moon{
    left:10px;
    color:#273849;
    opacity:0.42;
    transform:translateY(0) scale(0.88);
    text-shadow:none;
}

.theme-toggle__thumb{
    position:absolute;
    top:4px;
    left:4px;
    width:28px;
    height:28px;
    border-radius:50%;
    background:linear-gradient(180deg, rgba(248,252,255,0.96), rgba(223,236,245,0.94));
    box-shadow:0 8px 18px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.72);
    transition:left .35s ease, transform .35s ease, background .35s ease, box-shadow .35s ease;
}

.theme-toggle[data-theme-state="light"]{
    background:rgba(255,255,255,0.98);
}

.theme-toggle[data-theme-state="light"] .theme-toggle__track{
    background:linear-gradient(180deg, #7fd2e3 0%, #f6c45c 100%);
}

.theme-toggle[data-theme-state="light"] .theme-toggle__track::before{
    background:
        radial-gradient(circle at 20% 28%, rgba(255,247,177,0.5), transparent 18%),
        radial-gradient(circle at 72% 74%, rgba(255,255,255,0.18), transparent 24%);
    opacity:0.95;
}

.theme-toggle[data-theme-state="light"] .theme-toggle__thumb{
    left:40px;
    background:linear-gradient(180deg, rgba(255,251,238,0.98), rgba(255,228,156,0.96));
    box-shadow:0 8px 18px rgba(136,92,12,0.18), inset 0 1px 0 rgba(255,255,255,0.8);
}

.theme-toggle[data-theme-state="light"] .theme-toggle__sun{
    opacity:1;
    transform:translateY(0) scale(1.02);
    filter:brightness(1.08);
    text-shadow:0 0 14px rgba(255,191,73,0.55);
}

.theme-toggle[data-theme-state="light"] .theme-toggle__moon{
    opacity:0.45;
    transform:translateY(0) scale(0.88);
    filter:none;
}

.theme-toggle[data-theme-state="dark"] .theme-toggle__sun,
.theme-toggle:not([data-theme-state="light"]) .theme-toggle__sun{
    opacity:0.45;
    transform:translateY(0) scale(0.88);
    filter:none;
}

.theme-toggle[data-theme-state="dark"] .theme-toggle__moon,
.theme-toggle:not([data-theme-state="light"]) .theme-toggle__moon{
    opacity:1;
    transform:translateY(0) scale(1.02);
    filter:brightness(1.08);
    text-shadow:0 0 14px rgba(171,215,255,0.45);
}

.sidebar-secondary-action{
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid rgba(255,255,255,0.06);
}

.sidebar-qr-trigger{
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border:1px solid rgba(255,255,255,0.08);
    border-radius:12px;
    background:rgba(255,255,255,0.02);
    color:inherit;
    cursor:pointer;
    text-align:left;
    opacity:.88;
    transition:background .2s ease, border-color .2s ease, opacity .2s ease;
}

.sidebar-qr-trigger:hover{
    background:rgba(255,255,255,0.05);
    border-color:rgba(240,161,31,0.16);
    opacity:1;
}

.sidebar-qr-trigger__icon{
    width:34px;
    height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    border-radius:10px;
    background:rgba(240,161,31,0.10);
    color:rgba(248,187,93,0.86);
    font-size:14px;
}

.sidebar-qr-trigger__icon .material-symbols-rounded{
    font-size:20px !important;
    font-variation-settings:'FILL' 0, 'wght' 520, 'GRAD' 0, 'opsz' 24 !important;
}

.sidebar-qr-trigger__copy{
    display:flex;
    flex-direction:column;
    gap:1px;
    min-width:0;
}

.sidebar-qr-trigger__copy strong{
    font-size:13px;
    font-weight:600;
    line-height:1.2;
}

.sidebar-qr-trigger__copy small{
    font-size:11px;
    line-height:1.25;
    color:#8ca3af;
}

.qr-popup{
    position:fixed;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(0,0,0,0.6);
    backdrop-filter:blur(6px);
    z-index:2000;
}

.qr-box{
    width:min(320px, 100%);
    padding:28px;
    border-radius:20px;
    text-align:center;
    background:#0c1e27;
    border:1px solid rgba(0,120,150,0.4);
    box-shadow:0 20px 60px rgba(0,0,0,0.6);
}

.qr-box h2{
    margin-bottom:12px;
    font-size:22px;
}

.qr-box img{
    width:min(210px, 100%);
    margin:14px 0 18px;
    padding:10px;
    border-radius:12px;
    background:#ffffff;
}

.qr-close{
    width:100%;
    padding:10px 18px;
    border:none;
    border-radius:10px;
    background:linear-gradient(135deg,#f07f19,#ff9c3f);
    color:#ffffff;
    cursor:pointer;
    font-weight:600;
    transition:transform .2s ease, box-shadow .2s ease;
}

.qr-close:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 22px rgba(0,0,0,0.25);
}

html[data-theme="light"] .login-card{
    background:rgba(255,255,255,0.92) !important;
}

html[data-theme="light"] .background{
    backdrop-filter:blur(1px);
}

html[data-theme="light"] .logo img{
    filter:none !important;
}

html[data-theme="light"] .topbar h1,
html[data-theme="light"] .modal-header h2,
html[data-theme="light"] .stat-card h3{
    color:#1f2f35 !important;
}

html[data-theme="light"] .stat-card p,
html[data-theme="light"] .modal-close,
html[data-theme="light"] .table-header-sortable::after{
    color:var(--theme-text-muted) !important;
}

html[data-theme="light"] .summary-stack span,
html[data-theme="light"] .card-subtitle,
html[data-theme="light"] .cell-description,
html[data-theme="light"] .view-item p,
html[data-theme="light"] .picker-item span{
    color:var(--theme-text-muted) !important;
}

html[data-theme="light"] .secondary-btn{
    background:#ffffff !important;
    border:1px solid rgba(15,127,149,0.18) !important;
    color:#1f2f35 !important;
}

html[data-theme="light"] .secondary-btn:hover{
    background:var(--theme-surface-alt) !important;
}

html[data-theme="light"] .address-map-btn{
    background:#ffffff !important;
    border:1px solid rgba(15,127,149,0.18) !important;
    color:#1f2f35 !important;
}

html[data-theme="light"] .status-pill{
    border:1px solid rgba(15,127,149,0.12) !important;
}

html[data-theme="light"] .picker-item{
    background:#ffffff !important;
    color:var(--theme-text) !important;
    border:1px solid rgba(15,127,149,0.18) !important;
}

html[data-theme="light"] .arbeiten-table tr,
html[data-theme="light"] .kunden-table tr,
html[data-theme="light"] .mitarbeiter-table tr,
html[data-theme="light"] .plz-table tr,
html[data-theme="light"] .arbeits-table tr{
    background:var(--theme-panel-soft-bg) !important;
    border-color:var(--theme-border) !important;
}

html[data-theme="light"] .arbeiten-table td::before,
html[data-theme="light"] .kunden-table td::before,
html[data-theme="light"] .mitarbeiter-table td::before,
html[data-theme="light"] .plz-table td::before,
html[data-theme="light"] .arbeits-table td::before{
    color:var(--theme-text-muted) !important;
}

@media (max-width: 950px){
    html[data-theme="light"] .topbar .menu-toggle,
    html[data-theme="light"] .topbar .menu-toggle i,
    html[data-theme="light"] button.menu-toggle,
    html[data-theme="light"] button.menu-toggle i{
        color:var(--tw-blue) !important;
    }

    html[data-theme="light"] .arbeiten-table tr,
    html[data-theme="light"] .kunden-table tr,
    html[data-theme="light"] .mitarbeiter-table tr,
    html[data-theme="light"] .plz-table tr,
    html[data-theme="light"] .arbeits-table tr,
    html[data-theme="light"] .arbeiten-table tbody tr,
    html[data-theme="light"] .kunden-table tbody tr,
    html[data-theme="light"] .mitarbeiter-table tbody tr,
    html[data-theme="light"] .plz-table tbody tr,
    html[data-theme="light"] .arbeits-table tbody tr{
        background:var(--theme-panel-bg) !important;
        border:1px solid var(--theme-border) !important;
        box-shadow:var(--theme-shadow) !important;
    }

    html[data-theme="light"] .arbeiten-table td,
    html[data-theme="light"] .kunden-table td,
    html[data-theme="light"] .mitarbeiter-table td,
    html[data-theme="light"] .plz-table td,
    html[data-theme="light"] .arbeits-table td{
        background:transparent !important;
        color:var(--theme-text) !important;
    }

    html[data-theme="light"] .arbeiten-table td *,
    html[data-theme="light"] .kunden-table td *,
    html[data-theme="light"] .mitarbeiter-table td *,
    html[data-theme="light"] .plz-table td *,
    html[data-theme="light"] .arbeits-table td *{
        color:var(--theme-text) !important;
    }

    html[data-theme="light"] .arbeiten-table .cell-description,
    html[data-theme="light"] .kunden-table .cell-description,
    html[data-theme="light"] .mitarbeiter-table .cell-description,
    html[data-theme="light"] .plz-table .cell-description,
    html[data-theme="light"] .arbeits-table .cell-description,
    html[data-theme="light"] .arbeiten-table .summary-stack span,
    html[data-theme="light"] .kunden-table .summary-stack span,
    html[data-theme="light"] .mitarbeiter-table .summary-stack span,
    html[data-theme="light"] .plz-table .summary-stack span,
    html[data-theme="light"] .arbeits-table .summary-stack span,
    html[data-theme="light"] .arbeiten-table td::before,
    html[data-theme="light"] .kunden-table td::before,
    html[data-theme="light"] .mitarbeiter-table td::before,
    html[data-theme="light"] .plz-table td::before,
    html[data-theme="light"] .arbeits-table td::before{
        color:var(--theme-text-muted) !important;
    }
}

html[data-theme="light"] .picker-item:hover{
    background:var(--theme-surface-alt) !important;
}

html[data-theme="light"] #viewKommission{
    color:#233136 !important;
}


html[data-theme="light"] .view-overview-box{
    background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,249,251,0.98)) !important;
    border:1px solid rgba(15,127,149,0.18) !important;
    box-shadow:0 14px 32px rgba(13,48,58,0.10) !important;
}

html[data-theme="light"] [data-tooltip]::after{
    background:rgba(255,255,255,0.98);
    color:#233136;
    border:1px solid rgba(15,127,149,0.18);
    box-shadow:0 12px 26px rgba(13,48,58,0.12);
}

html[data-theme="light"] .stat-icon{
    background:#ffffff !important;
    border:1px solid rgba(15,127,149,0.18) !important;
}

html[data-theme="light"] .stat-icon i{
    color:#1f2f35 !important;
}

html[data-theme="light"] .sidebar-secondary-action{
    border-top-color:rgba(15,127,149,0.12);
}

html[data-theme="light"] .sidebar-qr-trigger{
    background:rgba(15,127,149,0.03);
    border-color:rgba(15,127,149,0.10);
    color:#1f2f35;
    opacity:.92;
}

html[data-theme="light"] .sidebar-qr-trigger:hover{
    background:rgba(15,127,149,0.06);
    border-color:rgba(15,127,149,0.16);
}

html[data-theme="light"] .sidebar-qr-trigger__icon{
    background:rgba(240,161,31,0.10);
    color:#b97814;
}

html[data-theme="light"] .sidebar-qr-trigger__copy small{
    color:var(--theme-text-muted);
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .card,
html[data-theme="light"] .topbar,
html[data-theme="light"] .modal,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .login-card,
html[data-theme="light"] .qr-box{
    box-shadow:0 16px 36px rgba(13,48,58,0.10) !important;
}

@media (max-width: 900px){
    .theme-toggle{
        padding:4px;
    }

    .sidebar-secondary-action{
        margin-top:10px;
        padding-top:10px;
    }

    .sidebar-qr-trigger{
        gap:8px;
        padding:9px 10px;
        border-radius:10px;
    }

    .sidebar-qr-trigger__icon{
        width:30px;
        height:30px;
        border-radius:8px;
        font-size:13px;
    }

    .sidebar-qr-trigger__copy strong{
        font-size:12px;
    }

    .sidebar-qr-trigger__copy small{
        font-size:10px;
    }
}

/* =========================================
   Einheitliche App-Shell fuer alle Seiten
========================================= */

body:has(.dashboard){
    min-height:100dvh !important;
    height:100dvh !important;
    overflow:hidden !important;
    background:
        radial-gradient(circle at 10% 0%, #f07f19 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, #005566 0%, transparent 40%),
        linear-gradient(160deg,#08141c,#0d2733) !important;
}

.dashboard{
    display:grid !important;
    grid-template-columns:300px minmax(0, 1fr) !important;
    width:100vw !important;
    height:100dvh !important;
    min-height:100dvh !important;
    gap:22px !important;
    padding:22px !important;
    overflow:hidden !important;
}

.sidebar{
    position:static !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    max-height:calc(100dvh - 44px) !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    scrollbar-width:thin !important;
    scrollbar-color:rgba(143,177,191,0.45) transparent !important;
    border-radius:20px !important;
    z-index:auto !important;
}

.sidebar::-webkit-scrollbar{
    width:6px !important;
}

.sidebar::-webkit-scrollbar-track{
    background:transparent !important;
}

.sidebar::-webkit-scrollbar-thumb{
    background:rgba(143,177,191,0.42) !important;
    border-radius:999px !important;
}

.sidebar::-webkit-scrollbar-thumb:hover{
    background:rgba(143,177,191,0.66) !important;
}

html[data-theme="light"] .sidebar{
    scrollbar-color:rgba(105,139,150,0.34) transparent !important;
}

html[data-theme="light"] .sidebar::-webkit-scrollbar-track{
    background:transparent !important;
}

html[data-theme="light"] .sidebar::-webkit-scrollbar-thumb{
    background:rgba(105,139,150,0.30) !important;
}

html[data-theme="light"] .sidebar::-webkit-scrollbar-thumb:hover{
    background:rgba(105,139,150,0.48) !important;
}

.main{
    min-width:0 !important;
    min-height:0 !important;
    width:100% !important;
    height:100% !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
}

.topbar{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    flex-shrink:0 !important;
}

.content{
    min-width:0 !important;
    min-height:0 !important;
    flex:1 1 auto !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
    max-width:100% !important;
}

.card,
.card-scroll{
    min-width:0 !important;
    max-width:100% !important;
}

.dashboard:has(.app-sidebar) > .main > .content > .card:only-child{
    flex:1 1 auto !important;
    min-height:0 !important;
    display:flex !important;
    flex-direction:column !important;
    height:100% !important;
    overflow:hidden !important;
}

.dashboard:has(.app-sidebar) > .main > .content > .card:only-child .card-scroll{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
}

.overlay{
    z-index:1000 !important;
}

.menu-toggle{
    display:none !important;
}

@media(max-width:900px){
    body:has(.dashboard){
        overflow:hidden !important;
    }

    .dashboard{
        display:flex !important;
        flex-direction:column !important;
        width:100vw !important;
        height:100dvh !important;
        min-height:100dvh !important;
        padding:0 !important;
        gap:0 !important;
    }

    .main{
        width:100% !important;
        min-height:100dvh !important;
        padding:15px !important;
        gap:15px !important;
        overflow:hidden !important;
    }

    .topbar{
        height:60px !important;
        min-height:60px !important;
        border-radius:0 !important;
        padding:0 18px !important;
    }

    .menu-toggle{
        display:block !important;
        cursor:pointer !important;
    }

    .sidebar{
        position:fixed !important;
        top:0 !important;
        left:-300px !important;
        width:280px !important;
        min-width:280px !important;
        height:100dvh !important;
        max-height:100dvh !important;
        padding:30px 20px !important;
        border-radius:0 20px 20px 0 !important;
        z-index:1001 !important;
        transition:left .3s ease !important;
    }

    .sidebar.active{
        left:0 !important;
    }

    .content{
        flex:1 1 auto !important;
        overflow:hidden !important;
    }
}

/* =========================================
   Neues fixes Sidebar-Layout
========================================= */

:root{
    --app-sidebar-width:280px;
    --app-sidebar-bg:#0b1218;
    --app-sidebar-border:rgba(255,255,255,0.08);
    --app-sidebar-line:rgba(255,255,255,0.07);
    --app-sidebar-muted:#93a7b2;
    --app-sidebar-text:#edf5f8;
    --app-sidebar-active:#16212b;
}

.material-symbols-rounded{
    font-family:'Material Symbols Rounded';
    font-weight:400;
    font-style:normal;
    font-size:20px;
    line-height:1;
    letter-spacing:normal;
    text-transform:none;
    display:inline-flex;
    white-space:nowrap;
    word-wrap:normal;
    direction:ltr;
    -webkit-font-feature-settings:'liga';
    -webkit-font-smoothing:antialiased;
    font-variation-settings:'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

body:has(.app-sidebar){
    min-height:100dvh !important;
    height:100dvh !important;
    overflow-x:hidden !important;
    overflow-y:hidden !important;
    background:#0b1218 !important;
}

@media(min-width:901px){
    .dashboard:has(.app-sidebar){
        display:block !important;
        width:100% !important;
        min-height:100dvh !important;
        height:100dvh !important;
        padding:0 !important;
        gap:0 !important;
        overflow:hidden !important;
    }

    .app-sidebar{
        position:fixed !important;
        inset:0 auto 0 0 !important;
        width:var(--app-sidebar-width) !important;
        min-width:var(--app-sidebar-width) !important;
        height:100dvh !important;
        max-height:none !important;
        padding:0 !important;
        display:flex !important;
        flex-direction:column !important;
        overflow:hidden !important;
        border-radius:0 !important;
        border:0 !important;
        border-right:1px solid var(--app-sidebar-border) !important;
        background:var(--app-sidebar-bg) !important;
        box-shadow:none !important;
        z-index:900 !important;
    }

    .dashboard:has(.app-sidebar) > .main{
        margin-left:var(--app-sidebar-width) !important;
        width:calc(100vw - var(--app-sidebar-width)) !important;
        min-height:100dvh !important;
        height:100dvh !important;
        padding:22px !important;
        gap:18px !important;
        overflow:hidden !important;
    }

    .dashboard:has(.app-sidebar) > .main > .content{
        flex:1 1 auto !important;
        min-height:0 !important;
        height:100% !important;
        display:flex !important;
        flex-direction:column !important;
        overflow:hidden !important;
    }
}

.app-sidebar .sidebar-top{
    flex:1 1 auto !important;
    min-height:0 !important;
    display:flex !important;
    flex-direction:column !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    scrollbar-width:thin !important;
    scrollbar-color:rgba(143,177,191,0.34) transparent !important;
}

.app-sidebar .sidebar-top::-webkit-scrollbar{
    width:6px !important;
}

.app-sidebar .sidebar-top::-webkit-scrollbar-track{
    background:transparent !important;
}

.app-sidebar .sidebar-top::-webkit-scrollbar-thumb{
    background:rgba(143,177,191,0.32) !important;
    border-radius:999px !important;
}

.sidebar-brand{
    min-height:98px !important;
    padding:24px 16px 18px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:0 !important;
    background:#f4f8fa !important;
    border-bottom:1px solid var(--app-sidebar-line) !important;
}

.sidebar-brand img{
    display:block !important;
    width:218px !important;
    max-width:100% !important;
    height:auto !important;
    filter:none !important;
}

.sidebar-brand__mark{
    width:46px !important;
    height:46px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 46px !important;
    border-radius:11px !important;
    background:rgba(240,127,25,0.16) !important;
    border:1px solid rgba(240,127,25,0.34) !important;
    color:#ff7d3b !important;
    font-size:18px !important;
}

.sidebar-brand__copy{
    min-width:0 !important;
    display:flex !important;
    flex-direction:column !important;
    gap:3px !important;
    line-height:1 !important;
}

.sidebar-brand__kicker{
    color:#a9bec9 !important;
    font-size:14px !important;
    font-weight:500 !important;
    letter-spacing:0.28em !important;
    text-transform:uppercase !important;
}

.sidebar-brand__copy strong{
    color:#ffffff !important;
    font-size:18px !important;
    font-weight:800 !important;
    letter-spacing:0.08em !important;
    text-transform:uppercase !important;
}

.app-sidebar-nav,
.app-sidebar nav{
    padding:19px 8px 18px !important;
    display:flex !important;
    flex-direction:column !important;
    gap:7px !important;
}

.app-sidebar-nav__label{
    padding:0 13px 13px !important;
    color:#8fa2ae !important;
    font-size:11px !important;
    font-weight:600 !important;
    letter-spacing:0.28em !important;
    line-height:1.2 !important;
    text-transform:uppercase !important;
}

.app-sidebar .menu-item{
    position:relative !important;
    min-height:47px !important;
    padding:0 13px !important;
    display:flex !important;
    align-items:center !important;
    gap:14px !important;
    border-radius:8px !important;
    color:#d7e0e5 !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    text-decoration:none !important;
    font-size:15px !important;
    font-weight:500 !important;
    transition:background .18s ease, color .18s ease !important;
}

.app-sidebar .menu-item > .material-symbols-rounded{
    width:18px !important;
    height:18px !important;
    flex:0 0 18px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    color:#a7b5bd !important;
    font-size:19px !important;
    font-variation-settings:'FILL' 0, 'wght' 450, 'GRAD' 0, 'opsz' 24 !important;
}

.app-sidebar .menu-item span{
    color:inherit !important;
}

.app-sidebar .menu-item:hover{
    background:rgba(255,255,255,0.06) !important;
    color:#ffffff !important;
}

.app-sidebar .menu-item:hover > .material-symbols-rounded{
    color:#ff8a47 !important;
}

.app-sidebar .menu-item.active{
    background:var(--app-sidebar-active) !important;
    color:#ffffff !important;
}

.app-sidebar .menu-item.active::before{
    content:"" !important;
    position:absolute !important;
    left:0 !important;
    top:8px !important;
    bottom:8px !important;
    width:3px !important;
    border-radius:0 999px 999px 0 !important;
    background:#ff7d3b !important;
}

.app-sidebar .menu-item.active > .material-symbols-rounded{
    color:#ff7d3b !important;
    font-variation-settings:'FILL' 1, 'wght' 520, 'GRAD' 0, 'opsz' 24 !important;
}

.app-sidebar-group{
    display:flex !important;
    flex-direction:column !important;
    gap:6px !important;
}

.app-sidebar-group__toggle{
    min-height:34px !important;
    width:100% !important;
    padding:0 13px !important;
    border:0 !important;
    border-radius:8px !important;
    background:transparent !important;
    color:var(--app-sidebar-muted) !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    font:inherit !important;
    font-size:12px !important;
    font-weight:800 !important;
    letter-spacing:0.10em !important;
    text-transform:uppercase !important;
    cursor:pointer !important;
    transition:background .18s ease, color .18s ease !important;
}

.app-sidebar-group__toggle:hover{
    background:rgba(255,255,255,0.045) !important;
    color:#ffffff !important;
}

.app-sidebar-group__toggle .material-symbols-rounded{
    font-size:19px !important;
    transition:transform .18s ease !important;
}

.app-sidebar-group.is-open .app-sidebar-group__toggle .material-symbols-rounded{
    transform:rotate(180deg) !important;
}

.app-sidebar-group__items{
    display:flex !important;
    flex-direction:column !important;
    gap:6px !important;
    padding-left:8px !important;
}

.app-sidebar-group__items[hidden]{
    display:none !important;
}

.app-sidebar .sidebar-secondary-action{
    margin:4px 8px 18px !important;
    padding:16px 0 0 !important;
    border-top:1px solid var(--app-sidebar-line) !important;
}

.app-sidebar .sidebar-bottom{
    flex:0 0 auto !important;
    margin:0 !important;
    padding:14px 14px 16px !important;
    border-top:1px solid var(--app-sidebar-line) !important;
    background:var(--app-sidebar-bg) !important;
}

.app-sidebar .logout-btn{
    min-height:44px !important;
    padding:0 13px !important;
    justify-content:flex-start !important;
    border-radius:8px !important;
    background:transparent !important;
    color:#d7e0e5 !important;
    box-shadow:none !important;
    font-size:14px !important;
    font-weight:600 !important;
}

.app-sidebar .logout-btn > .material-symbols-rounded{
    width:18px !important;
    color:#ff8a47 !important;
    font-size:19px !important;
}

.app-sidebar .logout-btn:hover{
    background:rgba(240,127,25,0.12) !important;
    color:#ffffff !important;
}

html[data-theme="light"]{
    --app-sidebar-bg:#f8fbfc;
    --app-sidebar-border:rgba(15,127,149,0.16);
    --app-sidebar-line:rgba(15,127,149,0.12);
    --app-sidebar-muted:#60747e;
    --app-sidebar-text:#1e2c33;
    --app-sidebar-active:#eaf2f5;
}

html[data-theme="light"] body:has(.app-sidebar){
    background:#eef5f7 !important;
}

html[data-theme="light"] .app-sidebar{
    background:var(--app-sidebar-bg) !important;
    border-right-color:var(--app-sidebar-border) !important;
    box-shadow:none !important;
}

html[data-theme="light"] .sidebar-brand__copy strong,
html[data-theme="light"] .app-sidebar .menu-item.active,
html[data-theme="light"] .app-sidebar .menu-item:hover{
    color:#17262c !important;
}

html[data-theme="light"] .sidebar-brand img{
    filter:none !important;
}

html[data-theme="light"] .app-sidebar .menu-item{
    color:#31434b !important;
}

html[data-theme="light"] .app-sidebar .menu-item > .material-symbols-rounded{
    color:#657780 !important;
}

html[data-theme="light"] .app-sidebar-group__toggle{
    color:#60747e !important;
}

html[data-theme="light"] .app-sidebar-group__toggle:hover{
    background:rgba(15,127,149,0.10) !important;
    color:#1e2c33 !important;
}

/* =========================================
   Einheitliche Topbar
========================================= */

.app-topbar{
    position:relative !important;
    min-height:74px !important;
    height:74px !important;
    width:calc(100% + 44px) !important;
    max-width:none !important;
    margin:-22px -22px 0 !important;
    padding:0 28px !important;
    display:flex !important;
    align-items:center !important;
    gap:18px !important;
    border-radius:0 !important;
    border:0 !important;
    background:#0f1822 !important;
    box-shadow:none !important;
}

.app-topbar::after{
    content:"" !important;
    position:absolute !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    height:1px !important;
    background:rgba(255,255,255,0.08) !important;
    pointer-events:none !important;
}

.app-topbar__breadcrumb{
    min-width:0 !important;
    display:flex !important;
    align-items:center !important;
    gap:13px !important;
    color:#9aa6ae !important;
    font-size:15px !important;
    font-weight:500 !important;
}

.app-topbar__breadcrumb > .material-symbols-rounded{
    color:#69757d !important;
    font-size:18px !important;
    font-variation-settings:'FILL' 0, 'wght' 420, 'GRAD' 0, 'opsz' 20 !important;
}

.app-topbar__breadcrumb strong{
    color:#eef3f5 !important;
    font-size:15px !important;
    font-weight:700 !important;
}

.app-topbar__actions{
    margin-left:auto !important;
    display:flex !important;
    align-items:center !important;
    gap:14px !important;
}

.app-topbar__date{
    display:inline-flex !important;
    align-items:center !important;
    gap:8px !important;
    color:#a9b3ba !important;
    font-size:14px !important;
    font-weight:500 !important;
    white-space:nowrap !important;
}

.app-topbar__date .material-symbols-rounded{
    color:#8d9ba4 !important;
    font-size:18px !important;
    font-variation-settings:'FILL' 0, 'wght' 450, 'GRAD' 0, 'opsz' 20 !important;
}

.app-topbar__theme-slot{
    min-width:76px !important;
    height:40px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
    border-radius:999px !important;
    background:transparent !important;
    border:0 !important;
}

.app-topbar .theme-toggle{
    margin-left:0 !important;
    padding:3px !important;
    background:#16212b !important;
    border:1px solid rgba(255,255,255,0.08) !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,0.03) !important;
}

.app-topbar .theme-toggle__track{
    width:70px !important;
    height:34px !important;
    background:#16212b !important;
}

.app-topbar .theme-toggle__track::before{
    display:none !important;
}

.app-topbar .theme-toggle__thumb{
    top:3px !important;
    left:3px !important;
    width:28px !important;
    height:28px !important;
    background:#ff7136 !important;
    box-shadow:0 7px 16px rgba(255,113,54,0.26), inset 0 1px 0 rgba(255,255,255,0.28) !important;
}

.app-topbar .theme-toggle[data-theme-state="light"] .theme-toggle__thumb{
    left:38px !important;
}

.app-topbar .theme-toggle__sun{
    right:10px !important;
    color:#8b969d !important;
    opacity:0.78 !important;
    font-size:17px !important;
    font-variation-settings:'FILL' 0, 'wght' 460, 'GRAD' 0, 'opsz' 20 !important;
}

.app-topbar .theme-toggle__moon{
    left:8px !important;
    color:#11171b !important;
    opacity:1 !important;
    font-size:17px !important;
    font-variation-settings:'FILL' 1, 'wght' 520, 'GRAD' 0, 'opsz' 20 !important;
}

.app-topbar .theme-toggle[data-theme-state="light"] .theme-toggle__sun{
    color:#ffffff !important;
    opacity:1 !important;
    font-variation-settings:'FILL' 0, 'wght' 520, 'GRAD' 0, 'opsz' 20 !important;
}

.app-topbar .theme-toggle[data-theme-state="light"] .theme-toggle__moon{
    color:#8b969d !important;
    opacity:0.68 !important;
}

.app-topbar__avatar{
    width:42px !important;
    height:42px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    flex:0 0 42px !important;
    border-radius:50% !important;
    background:rgba(240,127,25,0.18) !important;
    border:1px solid rgba(240,127,25,0.30) !important;
    color:#ff8a47 !important;
    font-size:13px !important;
    font-weight:700 !important;
    cursor:pointer !important;
    transition:background .18s ease, border-color .18s ease, color .18s ease !important;
}

.app-topbar__avatar:hover,
.app-profile-menu.is-open .app-topbar__avatar{
    background:rgba(240,127,25,0.26) !important;
    border-color:rgba(240,127,25,0.46) !important;
    color:#ffffff !important;
}

.app-profile-menu{
    position:relative !important;
    display:inline-flex !important;
    align-items:center !important;
}

.app-profile-menu__panel{
    position:absolute !important;
    top:calc(100% + 12px) !important;
    right:0 !important;
    width:190px !important;
    padding:7px !important;
    border-radius:12px !important;
    background:var(--app-modal-surface) !important;
    border:1px solid var(--app-modal-border) !important;
    box-shadow:0 18px 34px rgba(0,0,0,0.28) !important;
    z-index:1200 !important;
}

.app-profile-menu__panel[hidden]{
    display:none !important;
}

.app-profile-menu__item{
    min-height:42px !important;
    width:100% !important;
    padding:0 11px !important;
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    border-radius:8px !important;
    border:0 !important;
    background:transparent !important;
    color:#d9e2e7 !important;
    text-decoration:none !important;
    font-size:14px !important;
    font-weight:650 !important;
    font-family:inherit !important;
    cursor:pointer !important;
    text-align:left !important;
}

.app-profile-menu__item:hover{
    background:rgba(240,127,25,0.12) !important;
    color:#ffffff !important;
}

.app-profile-menu__item .material-symbols-rounded{
    color:#ff7d3b !important;
    font-size:20px !important;
    font-variation-settings:'FILL' 0, 'wght' 520, 'GRAD' 0, 'opsz' 24 !important;
}

.app-sidebar .sidebar-bottom{
    display:none !important;
}

.app-sidebar .sidebar-secondary-action{
    display:none !important;
}

html[data-theme="light"] .app-topbar{
    background:#f8fbfc !important;
}

html[data-theme="light"] .app-topbar::after{
    background:rgba(15,127,149,0.14) !important;
}

html[data-theme="light"] .app-topbar__breadcrumb strong{
    color:#18272d !important;
}

html[data-theme="light"] .app-topbar__breadcrumb,
html[data-theme="light"] .app-topbar__date{
    color:#5e7079 !important;
}

html[data-theme="light"] .app-topbar__theme-slot{
    background:transparent !important;
    border-color:transparent !important;
}

html[data-theme="light"] .app-topbar .theme-toggle__track{
    background:#f7fbfc !important;
}

html[data-theme="light"] .app-topbar .theme-toggle{
    padding:2px !important;
    background:#f8faf9 !important;
    border:1px solid #dde1dc !important;
    box-shadow:0 1px 2px rgba(23,48,58,0.04) !important;
}

html[data-theme="light"] .app-topbar .theme-toggle__thumb{
    background:#ff7043 !important;
    box-shadow:0 5px 12px rgba(255,112,67,0.24), inset 0 1px 0 rgba(255,255,255,0.28) !important;
}

html[data-theme="light"] .app-topbar .theme-toggle__moon{
    color:#9eb0b8 !important;
    opacity:1 !important;
}

html[data-theme="light"] .app-profile-menu__panel{
    background:#ffffff !important;
    border-color:rgba(15,127,149,0.14) !important;
    box-shadow:0 18px 32px rgba(13,48,58,0.12) !important;
}

html[data-theme="light"] .app-profile-menu__item{
    color:#263941 !important;
}

html[data-theme="light"] .app-profile-menu__item:hover{
    background:rgba(240,127,25,0.10) !important;
    color:#17262c !important;
}

@media(max-width:900px){
    .app-sidebar{
        background:var(--app-sidebar-bg) !important;
        border-radius:0 !important;
        border:0 !important;
        border-right:1px solid var(--app-sidebar-border) !important;
        box-shadow:18px 0 34px rgba(0,0,0,0.28) !important;
        overflow:hidden !important;
    }

    .sidebar-brand{
        min-height:88px !important;
        padding:20px 16px 15px !important;
    }

    .app-topbar{
        height:60px !important;
        min-height:60px !important;
        width:100vw !important;
        margin:-15px -15px 0 !important;
        padding:0 14px !important;
        gap:12px !important;
    }

    .app-topbar__breadcrumb{
        gap:9px !important;
        font-size:14px !important;
    }

    .app-topbar__breadcrumb span,
    .app-topbar__breadcrumb > .material-symbols-rounded,
    .app-topbar__date{
        display:none !important;
    }

    .app-topbar__avatar{
        width:36px !important;
        height:36px !important;
        flex-basis:36px !important;
        font-size:12px !important;
    }

    .app-topbar__theme-slot{
        min-width:72px !important;
        height:38px !important;
    }

    .app-topbar .theme-toggle__track{
        width:66px !important;
        height:30px !important;
    }

    .app-topbar .theme-toggle__thumb{
        width:24px !important;
        height:24px !important;
    }

    .app-topbar .theme-toggle[data-theme-state="light"] .theme-toggle__thumb{
        left:38px !important;
    }

}

/* =========================================
   Einheitliches Modal-Design
========================================= */

.theme,
:root{
    --app-modal-overlay-bg: rgba(7, 14, 22, 0.54);
    --app-modal-overlay-filter: blur(12px) saturate(0.92);
    --app-modal-overlay-filter-webkit: blur(12px) saturate(0.92);
    --app-modal-surface: rgba(15, 24, 34, 0.98);
    --app-modal-surface-alt: rgba(10, 18, 27, 0.99);
    --app-modal-border: rgba(255,255,255,0.08);
    --app-modal-divider: rgba(255,255,255,0.07);
    --app-modal-scroll-thumb: rgba(143, 160, 174, 0.36);
    --app-modal-scroll-thumb-strong: rgba(143, 160, 174, 0.42);
}

html[data-theme="light"]{
    --app-modal-overlay-bg: rgba(255, 255, 255, 0.20);
    --app-modal-overlay-filter: blur(12px) saturate(0.72) brightness(1.18);
    --app-modal-overlay-filter-webkit: blur(12px) saturate(0.72) brightness(1.18);
    --app-modal-surface: #fdfcf9;
    --app-modal-surface-alt: #ffffff;
    --app-modal-border: rgba(31, 42, 48, 0.12);
    --app-modal-divider: rgba(31, 42, 48, 0.10);
    --app-modal-scroll-thumb: rgba(31, 42, 48, 0.24);
    --app-modal-scroll-thumb-strong: rgba(31, 42, 48, 0.32);
}

.modal-overlay,
.kunde_modal_overlay{
    position:fixed !important;
    inset:0 !important;
    display:none !important;
    z-index:2000 !important;
    align-items:center !important;
    justify-content:center !important;
    padding:28px !important;
    background:var(--app-modal-overlay-bg) !important;
    backdrop-filter:var(--app-modal-overlay-filter) !important;
    -webkit-backdrop-filter:var(--app-modal-overlay-filter-webkit) !important;
    overflow:hidden !important;
    overscroll-behavior:contain !important;
}

.modal-overlay.active,
.kunde_modal_overlay.active{
    display:flex !important;
}

.modal,
.large-modal,
.small-modal,
.kunde_modal{
    position:relative !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
    border-radius:18px !important;
    padding:0 !important;
    background:var(--app-modal-surface) !important;
    border:1px solid var(--app-modal-border) !important;
    box-shadow:0 28px 80px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
    max-height:calc(100dvh - 56px) !important;
}

.large-modal{
    width:min(720px, calc(100vw - 56px)) !important;
    max-height:calc(100dvh - 56px) !important;
}

.small-modal{
    width:min(440px, calc(100vw - 56px)) !important;
}

.modal-header,
.kunde_modal_header{
    flex:0 0 auto !important;
    min-height:76px !important;
    padding:24px 30px 18px !important;
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:20px !important;
    margin:0 !important;
    border-bottom:1px solid var(--app-modal-divider) !important;
    background:var(--app-modal-surface) !important;
}

.modal-header h2,
.kunde_modal_header h2,
.modal > h3{
    margin:0 !important;
    color:#f2f5f6 !important;
    font-size:21px !important;
    line-height:1.25 !important;
    font-weight:750 !important;
    letter-spacing:0 !important;
}

.modal-close,
.kunde_modal_close{
    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:0 !important;
    border-radius:999px !important;
    background:transparent !important;
    color:#9ba7af !important;
    box-shadow:none !important;
    cursor:pointer !important;
    transition:background .18s ease, color .18s ease !important;
}

.modal-close:hover,
.kunde_modal_close:hover{
    background:rgba(255,255,255,0.06) !important;
    color:#ffffff !important;
}

.modal-close i,
.kunde_modal_close i{
    font-size:16px !important;
}

.modal-content,
.kunde_modal_body,
.modal > form{
    flex:1 1 auto !important;
    min-height:0 !important;
    padding:32px 30px 28px !important;
    background:var(--app-modal-surface-alt) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
}

.modal-content::-webkit-scrollbar,
.kunde_modal_body::-webkit-scrollbar,
.modal > form::-webkit-scrollbar{
    width:0 !important;
    height:0 !important;
}

.modal-content::-webkit-scrollbar-track,
.kunde_modal_body::-webkit-scrollbar-track,
.modal > form::-webkit-scrollbar-track{
    background:transparent !important;
}

.modal-content::-webkit-scrollbar-thumb,
.kunde_modal_body::-webkit-scrollbar-thumb,
.modal > form::-webkit-scrollbar-thumb{
    background:transparent !important;
    border-radius:999px !important;
}

html.modal-open,
body.modal-open{
    overflow:hidden !important;
    overscroll-behavior:none !important;
}

.modal-content form{
    margin:0 !important;
}

.modal > form{
    margin:0 !important;
}

.modal > form .form-grid{
    margin-bottom:0 !important;
}

.modal > form .form-section .form-grid + h5,
.modal > form .form-section h5{
    color:inherit !important;
}

.modal .form-section,
.large-modal .form-section,
.small-modal .form-section,
.kunde_modal .form-section,
.modal > form .form-section{
    margin:0 !important;
    padding:0 !important;
    background:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
}

.modal .form-section + .form-section,
.large-modal .form-section + .form-section,
.small-modal .form-section + .form-section,
.kunde_modal .form-section + .form-section,
.modal > form .form-section + .form-section{
    margin-top:26px !important;
    padding-top:24px !important;
    border-top:1px solid rgba(143, 160, 174, 0.12) !important;
}

.modal .form-section h3,
.large-modal .form-section h3,
.small-modal .form-section h3,
.kunde_modal .form-section h3,
.modal > form .form-section h3,
.modal > form .form-section-title h3{
    margin:0 0 18px !important;
    color:#f2f5f6 !important;
    font-size:17px !important;
    line-height:1.25 !important;
    font-weight:750 !important;
    padding:0 !important;
    border:0 !important;
}

.modal > form .form-section-title{
    margin:0 0 18px !important;
    padding:0 !important;
    border:0 !important;
}

.modal > form .inline-toggle{
    color:#9aa6ae !important;
}

.modal-content .save-btn,
.modal-content .cancel-btn,
.modal-content .delete-btn,
.modal-actions button,
.modal .save-btn,
.modal .cancel-btn,
.modal .delete-btn,
.kunde_save_btn{
    min-height:42px !important;
    border-radius:9px !important;
    font-weight:700 !important;
}

.modal-content .save-btn,
.modal .save-btn,
.kunde_save_btn{
    background:#ff6d3a !important;
    color:#17120f !important;
    border:1px solid rgba(255, 109, 58, 0.52) !important;
    box-shadow:0 10px 24px rgba(255, 109, 58, 0.18) !important;
}

.modal-content .cancel-btn,
.modal .cancel-btn,
.modal-actions .modal-cancel{
    background:#1c2328 !important;
    color:#e4ebef !important;
    border:1px solid rgba(143, 160, 174, 0.16) !important;
    box-shadow:none !important;
}

.modal-content .delete-btn,
.modal .delete-btn,
.modal-actions .modal-delete{
    background:#ff4d4d !important;
    color:#ffffff !important;
    border:1px solid rgba(255, 77, 77, 0.44) !important;
}

.modal-actions{
    padding-top:22px !important;
    border-top:1px solid rgba(143, 160, 174, 0.12) !important;
}

.required-push-modal .modal-content{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:14px;
    text-align:left;
}

.required-push-modal__icon{
    width:48px;
    height:48px;
    border-radius:14px;
    background:linear-gradient(135deg,#f06c2f,#ff874a);
    color:#ffffff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
}

.required-push-modal p{
    margin:0;
    line-height:1.5;
}

.required-push-modal__status{
    padding:10px 12px;
    border:1px solid var(--app-modal-divider);
    border-radius:10px;
    background:rgba(255,255,255,0.04);
    color:#dbe7f8;
    font-size:13px;
    font-weight:700;
}

.required-push-modal__button{
    width:100%;
    min-height:44px;
    border:0;
    border-radius:10px;
    background:linear-gradient(135deg,#f06c2f,#ff874a);
    color:#ffffff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    font:inherit;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 12px 24px rgba(240,108,47,0.18);
}

.required-push-modal__button:disabled{
    opacity:.72;
    cursor:wait;
}

html[data-theme="light"] .modal-overlay,
html[data-theme="light"] .kunde_modal_overlay{
    background:var(--app-modal-overlay-bg) !important;
    backdrop-filter:var(--app-modal-overlay-filter) !important;
    -webkit-backdrop-filter:var(--app-modal-overlay-filter-webkit) !important;
}

html[data-theme="light"] .modal,
html[data-theme="light"] .large-modal,
html[data-theme="light"] .small-modal,
html[data-theme="light"] .kunde_modal{
    background:var(--app-modal-surface) !important;
    border-color:var(--app-modal-border) !important;
    box-shadow:0 26px 52px rgba(28, 34, 38, 0.20), 0 8px 20px rgba(28, 34, 38, 0.10), inset 0 1px 0 rgba(255,255,255,0.86) !important;
}

html[data-theme="light"] .modal-header,
html[data-theme="light"] .kunde_modal_header,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .kunde_modal_body,
html[data-theme="light"] .modal > form{
    background:var(--app-modal-surface-alt) !important;
}

html[data-theme="light"] .required-push-modal__status{
    background:#f6f8fa;
    color:#33425d;
}

html[data-theme="light"] .modal-header,
html[data-theme="light"] .kunde_modal_header,
html[data-theme="light"] .modal-actions{
    border-color:var(--app-modal-divider) !important;
}

html[data-theme="light"] .modal-header h2,
html[data-theme="light"] .kunde_modal_header h2,
html[data-theme="light"] .modal > h3{
    color:#171c20 !important;
}

html[data-theme="light"] .modal .form-section h3,
html[data-theme="light"] .large-modal .form-section h3,
html[data-theme="light"] .small-modal .form-section h3,
html[data-theme="light"] .kunde_modal .form-section h3,
html[data-theme="light"] .modal .form-section-title h3,
html[data-theme="light"] .large-modal .form-section-title h3,
html[data-theme="light"] .small-modal .form-section-title h3,
html[data-theme="light"] .modal > form .form-section h3,
html[data-theme="light"] .modal > form .form-section-title h3{
    color:#171c20 !important;
    border:0 !important;
}

html[data-theme="light"] .modal label,
html[data-theme="light"] .kunde_modal label,
html[data-theme="light"] .modal .field-hint,
html[data-theme="light"] .modal small{
    color:#43525b !important;
}

html[data-theme="light"] .modal .form-section,
html[data-theme="light"] .large-modal .form-section,
html[data-theme="light"] .small-modal .form-section,
html[data-theme="light"] .kunde_modal .form-section,
html[data-theme="light"] .modal > form .form-section{
    background:transparent !important;
    border-color:transparent !important;
    box-shadow:none !important;
    color:#1d2a31 !important;
}

html[data-theme="light"] .modal > form .inline-toggle{
    color:#43525b !important;
}

html[data-theme="light"] .modal-close,
html[data-theme="light"] .kunde_modal_close{
    color:#5f6870 !important;
}

html[data-theme="light"] .modal-close:hover,
html[data-theme="light"] .kunde_modal_close:hover{
    background:rgba(31,42,48,0.06) !important;
    color:#171c20 !important;
}

html[data-theme="light"] .modal-content .cancel-btn,
html[data-theme="light"] .modal .cancel-btn,
html[data-theme="light"] .modal-actions .modal-cancel{
    background:#f7f5f1 !important;
    color:#30373d !important;
    border-color:rgba(31, 42, 48, 0.12) !important;
}

html[data-theme="light"] .modal-content .save-btn,
html[data-theme="light"] .modal .save-btn,
html[data-theme="light"] .kunde_save_btn{
    background:#f26538 !important;
    color:#ffffff !important;
    border-color:rgba(242, 101, 56, 0.48) !important;
    box-shadow:0 10px 18px rgba(242, 101, 56, 0.18) !important;
}

html[data-theme="light"] .modal-content,
html[data-theme="light"] .kunde_modal_body,
html[data-theme="light"] .modal > form{
    scrollbar-color:rgba(88, 99, 108, 0.28) transparent !important;
}

html[data-theme="light"] .modal-content::-webkit-scrollbar-thumb,
html[data-theme="light"] .kunde_modal_body::-webkit-scrollbar-thumb,
html[data-theme="light"] .modal > form::-webkit-scrollbar-thumb{
    background:rgba(88, 99, 108, 0.24) !important;
}

@media(max-width:700px){
    .modal-overlay,
    .kunde_modal_overlay{
        padding:14px !important;
        align-items:flex-end !important;
    }

    .modal,
    .large-modal,
    .small-modal,
    .kunde_modal{
        width:100% !important;
        max-height:calc(100dvh - 28px) !important;
        border-radius:16px !important;
    }

    .modal-header,
    .kunde_modal_header{
        min-height:78px !important;
        padding:22px 20px 18px !important;
    }

    .modal-content,
    .kunde_modal_body,
    .modal > form{
        padding:26px 20px 22px !important;
    }
}
