:root {
    --primary-color: #1a73e8;
    --secondary-color: #567EBB;
    --tertiary-color: #5ebdec;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #10b981; /* ganz weiches grün */
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --bg-light: #f9fafb;
    --fg-default: #43505b;
    --fg-muted: #6b7280;
    --fg-light-muted: #E0E0E0; /* sehr helles graue Farbe für Text in der AI Quick-Check */
    --icon-blue: #3b82f6;
    --fg-blue: #0366d6;
    
    /* Globale Schrift: DM Sans zuerst, Fallbacks nur für fehlende Glyphen */
    --po-font-family: 'DM Sans', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-name: var(--po-font-family);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Globale Typografie - DM Sans für die gesamte App
   ───────────────────────────────────────────────────────────────────────────── */

html, body {
    font-family: var(--po-font-family) !important;
    font-weight: 400;
}

body, 
.app-bar,
.navview,
.sidebar,
.d-menu,
.v-menu,
.h-menu,
.t-menu,
.accordion,
.panel,
.card,
.table,
.button,
.input,
.select,
.textarea,
.dropdown-toggle,
[data-role="accordion"],
[data-role="panel"],
[data-role="hint"] {
    font-family: var(--po-font-family) !important;
}

/* Harte App-weite Schriftregel: keine Modul- oder Vendor-Schrift darf die UI übernehmen. */
body *:not(.fa):not(.fas):not(.far):not(.fal):not(.fad):not(.fab):not([class^="fa-"]):not([class*=" fa-"]):not([class^="mif-"]):not([class*=" mif-"]),
body *:not(.fa):not(.fas):not(.far):not(.fal):not(.fad):not(.fab):not([class^="fa-"]):not([class*=" fa-"]):not([class^="mif-"]):not([class*=" mif-"])::before,
body *:not(.fa):not(.fas):not(.far):not(.fal):not(.fad):not(.fab):not([class^="fa-"]):not([class*=" fa-"]):not([class^="mif-"]):not([class*=" mif-"])::after {
    font-family: var(--po-font-family) !important;
}

/* Sichtbarer Text nutzt maximal Gewicht 500; Icon-Fonts bleiben ausgenommen. */
:where(h1, h2, h3, h4, h5, h6, b, strong, th, label, button, summary, legend),
:where(.button, .btn, .primary, .secondary, .title, .headline, .subtitle, .caption, .badge, .chip, .pill, .label, .tabulator-header, .tabulator-col, .tabulator-col-title, .tabulator-page, .tabulator-page-size),
:where(.text-weight-600, .text-weight-700, .text-weight-800, .text-weight-900, .font-weight-600, .font-weight-700, .font-weight-800, .font-weight-900, .font-semibold, .font-bold, .fw-semibold, .fw-bold),
[style*="font-weight: 600"],
[style*="font-weight:600"],
[style*="font-weight: 700"],
[style*="font-weight:700"],
[style*="font-weight: 800"],
[style*="font-weight:800"],
[style*="font-weight: 900"],
[style*="font-weight:900"],
[style*="font-weight: bold"],
[style*="font-weight:bold"],
[style*="font-weight: bolder"],
[style*="font-weight:bolder"] {
    font-weight: 500 !important;
}

/* EXIF-Orientierung respektieren (Smartphone-Fotos korrekt drehen) */
img {
    image-orientation: from-image;
}

/* Deaktiviert: Unterstreichung fuer fehlende Uebersetzungen fuehrt zu
   Falsch-Positiven wenn Dialoge aus ihrem data-i18n-scope verschoben werden.
   Die Klasse .i18n-missing-translation wird weiterhin von core.js gesetzt,
   hat aber keinen visuellen Effekt mehr. */
/*
.i18n-missing-translation {
    text-decoration: underline;
    text-decoration-color: #fde7ea;
    text-decoration-style: wavy;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
*/

.fg-primary{
    color: var(--primary-color);
}
.fg-secondary{
    color: var(--secondary-color);
}

.fg-text-blue{
    color: var(--fg-blue)!important;
}
.fg-icon-blue{
    color: var(--icon-blue)!important;
}
.bg-button-green{
    background-color: #10b981!important;
}

.text-11px{
    font-size: 11px!important;
}
.text-13px{
    font-size: 13px!important;
}
.text-14px{
    font-size: 14px!important;
}
.text-16px{
    font-size: 16px!important;
}
.text-weight-normal{
    font-weight: normal!important;
}
.text-weight-500{
    font-weight: 500!important;
}
.text-weight-1000{
    font-weight: 500!important;
}
.line-height-150{
    line-height: 150%!important;
}

.flat-button{
    font-size: 13px!important;
}

.no-border-radius{
    border-radius: 0px!important;
}

/* Select active option - verwendet po-accent fuer Light UND Dark Mode */
.select .option-list li.active {
    background-color: var(--po-accent, var(--icon-blue)) !important;
    color: var(--po-text-inverse, #fff) !important;
    font-weight: normal !important;
}

@keyframes slideInLeft {
from {
    transform: translate3d(-10%, 0, 0);
    visibility: visible;
}
to {
    transform: translate3d(0, 0, 0);
}
}

.animate__slideInLeft {
animation-name: slideInLeft;
}

@keyframes slideInUp {
from {
    transform: translate3d(0, 10%, 0);
    visibility: visible;
}
to {
    transform: translate3d(0, 0, 0);
}
}

.animate__slideInUp {
animation-name: slideInUp;
}

@keyframes slideInDown {
from {
    transform: translate3d(0, -10%, 0);
    visibility: visible;
}
to {
    transform: translate3d(0, 0, 0);
}
}

.animate__slideInDown {
animation-name: slideInDown;
}

@keyframes slideOutDown {
from {
    transform: translate3d(0, 0, 0);
}
to {
    visibility: hidden;
    transform: translate3d(0, 10%, 0);
}
}

.animate__slideOutDown {
animation-name: slideOutDown;
}




.fg-primary{
    color: #00A9CE;
}
.bg-primary{
    background-color: #00A9CE;
}

.switch-material .check::after { 
    background-color: #0a87c1;
}
.switch-material input:checked~.check {
     background-color: rgba(10,135,193,.5);
}

.disabled_blured {
    filter: blur(3px);
    pointer-events: none;
}


.input_off{
    border-bottom: 2px solid transparent!important;
}
.input_off.focused{
    border-bottom: 2px solid #85C7DA!important;
    transition: 0.1s;
    height:37px;
}


.dialog_wrapper{ 
    min-width:510px;
    height:620px;
}
@media only screen and (min-height: 700px) {
    .dialog_wrapper{
        height:680px;
    }
}
@media only screen and (max-width: 576px) {
    .dialog_wrapper{
        height:100%;
    }
}

.dialog_ribbon_menu_open{
    position:relative;
    top:50px;
}

.dialog_desktop{

    border-radius:10px;
    border-color: #D7DDE8;
    background-image: linear-gradient( 315deg, #ECF0F5 26.8%, #FFFFFF 64% );
    box-shadow: 0 9px 8px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.12);
    opacity:1;

}
.dialog_mobile{

    background-color: #D7DDE8;
    max-width:480px;

}
.dialog_center{
    margin: 0;
    top: 50%;
    transform: translateY(-50%);
}

.opacity-5{
    opacity: 0.8!important;
    box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}

#activity_modal, #uploader_modal { 
    background: radial-gradient(#647687, transparent);
    height: 1px;
    overflow: hidden;
    z-index:999998;
    opacity:0.5;
    position: fixed;
        top: 50%;
        left: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease 0.5s, 
                height 0.5s ease;
    width: 0;
}

.ribbon-menu .content-holder .group{
    padding: 0px;
}

.carousel{
    background-color:transparent;
}

.rounded{
    border-radius: 10%;  
}

/* text-divider */
.text-divider {
    --text-divider-gap: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
    letter-spacing: 0.1em;
}
.text-divider::before, .text-divider::after {
    content: '';
    height: 1px;
    background-color: silver;
    flex-grow: 1;
}
.text-divider::before {
    margin-right: var(--text-divider-gap);
}
.text-divider::after {
    margin-left: var(--text-divider-gap);
}

.text-default{
    font-size: 14px;
}


.uicol0_button{
    margin:none;
    border:none;
    border-left:5px solid transparent;
    width:50px;
    height:50px;
    line-height:50px;
    border-left:5px solid transparent;
    border-radius: 0px 0px 0px 0px;
}

.uicol0_button.warning{
    border-left:5px solid orange;
}

.uicol4_button{
    margin:none;
    border:none;
    border-left:5px solid transparent;
    width:50px;
    height:50px;
    line-height:50px;
    border-right:5px solid transparent;
    border-radius: 0px 0px 0px 0px;
}

.uicol4_button.warning{
    border-right:5px solid orange;
}


.uicol0_button.active{
    background-color: #95ab8d!important;
}


#uicol3 > #documentview_big{

    max-height: calc(100% - 140px);
    max-width: calc(100%); 

}

.block-shadow{
    box-shadow: 6px 2px 5px 0px rgb(0 0 0 / 40%) !important;
}

.block-shadow-right{
    box-shadow: 6px 2px 5px 0px rgb(0 0 0 / 40%) !important;
}

.block-shadow-left{
    box-shadow: -6px 2px 5px 0px rgb(0 0 0 / 40%) !important;
}

.block-glow{
    box-shadow: 0px 0px 5px 0px rgb(0 0 0 / 40%) !important;
}

.uicol0_hint{
    min-width:250px;
    /*box-shadow: 6px 2px 5px 0 rgb(0 0 0 / 40%) !important;*/
    height: 50px;
    margin-left:-4px;
    padding: 5px;
    padding-left:20px;
    border-radius: 0px 10px 10px 0px;
}
.uicol4_hint{
    min-width:250px;
    box-shadow: -6px 2px 5px 0 rgb(0 0 0 / 40%) !important;
    height: 50px;
    padding: 5px;
    margin-left:5px!important;
}

.fg-hintYellow{
    color:#fffcc0;
}

.bg-warmYellow{
    background-color: #FDB913!important;
}

.bg-warmGreen{
    background-color: #92C353!important;
}

.bg-warmRed{
    background-color: #CE352C!important;
}

.bg-warmOrange{
    background-color: #ff9447!important;
}

.fg-warmYellow{
    color: #FDB913!important;
}

.fg-warmGreen{
    color: #92C353!important;
}

.fg-warmRed{
    color: #CE352C!important;
}

.fg-warmOrange{
    color: #ff9447!important;
}

.fg-lightererWinSteel{
    color: #E1E7F5!important;
}
.bg-lightererWinSteel{
    background: #E1E7F5!important;
}

.fg-dimGray{
    color: #736c64;
}

/* Die standardmässige Farbe für Text */
.fg-default{
    color: #43505b!important;
}

.fg-lighterSteel{
    color: #C6CDD5!important;
}
.bg-lighterSteel{
    background: #C6CDD5!important;
}
.bg-lighterSteel-hover:hover{
    background: #C6CDD5!important;
}

.fg-lightererSteel{
    color: #ECF0F5!important;
}
.bg-lightererSteel{
    background: #ECF0F5!important;
}

.bg-lighter{
    background: #FBFBFB!important;
}

.bg-pogray{
    background: rgb(250, 249, 248);
}

.bg-lightBlue-pulse {
    background-color: #adeb6e;
    animation-name: color;
    animation-duration: 5s;
    animation-iteration-count: infinite;
}

@keyframes color {
    0% {
        background-color: #adeb6e;
    }
    50% {
        background-color: #DBF7BF;
    }
    100% {
        background-color: #adeb6e;
    }
}

.poui_apps_store_select_calculate_credits_wrapper .select .drop-container{
    top: auto !important;
    bottom: 120% !important; 
}  

.text-line-height-more{
    line-height: 150%;
}

.no-shadow{
    -webkit-box-shadow: none!important;
    box-shadow: none!important;
}


.ribbon-menu .content-holder{
    background: #FBFBFB;	
}

.ribbon-menu .tabs-holder li{	
    background: #E7EAED;
}

.ribbon-menu .tabs-holder .active{
    background: #FBFBFB;
}

#paperoffice_account_croppie_upload .drop-zone{
    height:40%;
    /*background-image: linear-gradient( 135deg, #ECF0F5 26.8%, #D7DDE8 64% );*/
    /*border: 1px solid #D7DDE8;border-radius:10px; */
    background-color: transparent;
    padding: 20px!important;
    outline-offset: 0px;
    outline: 2px dashed #D7DDE8;
    border-radius:10px;
}
.drop-zone .caption{
    white-space: normal;
}

.flat-button{
    min-width: 1px !important;
}

.button.btn-close.sys-button{
    border-top-right-radius:10px;
}

.button, .hint{
    border-radius:3px;
}

.hint{
    max-width: min(320px, calc(100vw - 32px));
    white-space: normal;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: normal;
    text-overflow: clip;
    line-height: 1.35;
    text-align: center;
};

.button.inline{
    border-radius:0px;
    box-shadow: none!important;
    -webkit-box-shadow: none!important;
}

.window.win-shadow{
    border-radius:10px;
    border-color: #D7DDE8;
    box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}

.window-caption{
    height: 30px;
    border-top-left-radius:10px;
    border-top-right-radius:10px;
}

.window-content{
    border-bottom-left-radius:10px;
    border-bottom-right-radius:10px;
}

#topmenu_start_container .window-content{
    padding-bottom: 40px!important;
}

.no-radius{
    border-radius:0px;
}


.window-content{
    height:100%;
    background: #FBFBFB;
    overflow:hidden; 
}

.mCSB_scrollTools .mCSB_draggerRail{
    height:10000px!important;
    position:relative;
    top:-5000px;
}

.stepper .step{
    font-size:13px;
}

a.link {
    position: relative;
    color: #0366d6;
    text-decoration: none;
    background-color: transparent;
    -webkit-text-decoration-skip: objects;
    -webkit-box-shadow: none;
    box-shadow: none;
}
a.link:hover {
    text-decoration: underline;
    cursor: pointer;
}

#topmenu_start_container .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ z-index:3;  }
#topmenu_start_container .mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{ z-index:2; background-color: #CCC; } 


.text-spacing{
    letter-spacing:3px;
}


@keyframes slideInLeft {
from {
    transform: translate3d(-10%, 0, 0);
    visibility: visible;
}
to {
    transform: translate3d(0, 0, 0);
}
}

.animate__slideInLeft {
animation-name: slideInLeft;
}

@keyframes slideInUp {
from {
    transform: translate3d(0, 10%, 0);
    visibility: visible;
}
to {
    transform: translate3d(0, 0, 0);
}
}

.animate__slideInUp {
animation-name: slideInUp;
}

@keyframes slideInDown {
from {
    transform: translate3d(0, -10%, 0);
    visibility: visible;
}
to {
    transform: translate3d(0, 0, 0);
}
}

.animate__slideInDown {
animation-name: slideInDown;
}

@keyframes slideOutDown {
from {
    transform: translate3d(0, 0, 0);
}
to {
    visibility: hidden;
    transform: translate3d(0, 10%, 0);
}
}

.animate__slideOutDown {
animation-name: slideOutDown;
}


.switch-material .check::after { 
    background-color: #0a87c1;
}
.switch-material input:checked~.check {
     background-color: rgba(10,135,193,.5);
}

.disabled_blured {
    filter: blur(3px);
    pointer-events: none;
}


.input_off{
    border-bottom: 2px solid transparent!important;
}
.input_off.focused{
    border-bottom: 2px solid #85C7DA!important;
    transition: 0.1s;
    height:37px;
}


.dialog_wrapper{ 
    min-width:510px;
    height:620px;
}
@media only screen and (min-height: 700px) {
    .dialog_wrapper{
        height:680px;
    }
}
@media only screen and (max-width: 576px) {
    .dialog_wrapper{
        height:100%;
    }
}

.dialog_ribbon_menu_open{
    position:relative;
    top:50px;
}

.dialog_desktop{

    border-radius:10px;
    border-color: #D7DDE8;
    background-image: linear-gradient( 315deg, #ECF0F5 26.8%, #FFFFFF 64% );
    box-shadow: 0 9px 8px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.12);
    opacity:1;

}
.dialog_mobile{

    background-color: #D7DDE8;
    max-width:480px;

}
.dialog_center{
    margin: 0;
    top: 50%;
    transform: translateY(-50%);
}

.opacity-5{
    opacity: 0.8!important;
    box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}

#activity_modal, #uploader_modal { 
    background: radial-gradient(#647687, transparent);
    height: 1px;
    overflow: hidden;
    z-index:999998;
    opacity:0.5;
    position: fixed;
        top: 50%;
        left: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease 0.5s, 
                height 0.5s ease;
    width: 0;
}

.ribbon-menu .content-holder .group{
    padding: 0px;
}

.carousel{
    background-color:transparent;
}

.rounded{
    border-radius: 10%;  
}

/* text-divider */
.text-divider {
    --text-divider-gap: 1rem;
    display: flex;
    align-items: center;
    font-size: 0.9375rem;
    letter-spacing: 0.1em;
}
.text-divider::before, .text-divider::after {
    content: '';
    height: 1px;
    background-color: silver;
    flex-grow: 1;
}
.text-divider::before {
    margin-right: var(--text-divider-gap);
}
.text-divider::after {
    margin-left: var(--text-divider-gap);
}

.text-default{
    font-size: 14px;
}


.uicol0_button{
    margin:none;
    border:none;
    border-left:5px solid transparent;
    width:50px;
    height:50px;
    line-height:50px;
    border-left:5px solid transparent;
    border-radius: 0px 0px 0px 0px;
}

.uicol0_button.warning{
    border-left:5px solid orange;
}

.uicol4_button{
    margin:none;
    border:none;
    border-left:5px solid transparent;
    width:50px;
    height:50px;
    line-height:50px;
    border-right:5px solid transparent;
    border-radius: 0px 0px 0px 0px;
}

.uicol4_button.warning{
    border-right:5px solid orange;
}


.uicol0_button.active{
    background-color: #95ab8d!important;
}


#uicol3 > #documentview_big{

    max-height: calc(100% - 140px);
    max-width: calc(100%); 

}

.block-shadow{
    box-shadow: 6px 2px 5px 0px rgb(0 0 0 / 40%) !important;
}

.block-shadow-right{
    box-shadow: 6px 2px 5px 0px rgb(0 0 0 / 40%) !important;
}

.block-shadow-left{
    box-shadow: -6px 2px 5px 0px rgb(0 0 0 / 40%) !important;
}

.block-glow{
    box-shadow: 0px 0px 5px 0px rgb(0 0 0 / 40%) !important;
}

.uicol0_hint{
    min-width:250px;
    /*box-shadow: 6px 2px 5px 0 rgb(0 0 0 / 40%) !important;*/
    height: 50px;
    margin-left:-4px;
    padding: 5px;
    padding-left:20px;
    border-radius: 0px 10px 10px 0px;
}
.uicol4_hint{
    min-width:250px;
    box-shadow: -6px 2px 5px 0 rgb(0 0 0 / 40%) !important;
    height: 50px;
    padding: 5px;
    margin-left:5px!important;
}

.fg-hintYellow{
    color:#fffcc0;
}

.bg-warmYellow{
    background-color: #FDB913!important;
}

.bg-warmGreen{
    background-color: #92C353!important;
}

.bg-warmRed{
    background-color: #CE352C!important;
}

.bg-warmOrange{
    background-color: #ff9447!important;
}

.fg-warmYellow{
    color: #FDB913!important;
}

.fg-warmGreen{
    color: #92C353!important;
}

.fg-warmRed{
    color: #CE352C!important;
}

.fg-warmOrange{
    color: #ff9447!important;
}

.fg-lightererWinSteel{
    color: #E1E7F5!important;
}
.bg-lightererWinSteel{
    background: #E1E7F5!important;
}

.fg-dimGray{
    color: #736c64;
}



.fg-lighterSteel{
    color: #C6CDD5!important;
}
.bg-lighterSteel{
    background: #C6CDD5!important;
}
.bg-lighterSteel-hover:hover{
    background: #C6CDD5!important;
}

.fg-lightererSteel{
    color: #ECF0F5!important;
}
.bg-lightererSteel{
    background: #ECF0F5!important;
}

.bg-lighter{
    background: #FBFBFB!important;
}

.bg-pogray{
    background: rgb(250, 249, 248);
}

.bg-lightBlue-pulse {
    background-color: #adeb6e;
    animation-name: color;
    animation-duration: 5s;
    animation-iteration-count: infinite;
}

@keyframes color {
    0% {
        background-color: #adeb6e;
    }
    50% {
        background-color: #DBF7BF;
    }
    100% {
        background-color: #adeb6e;
    }
}

.poui_apps_store_select_calculate_credits_wrapper .select .drop-container{
    top: auto !important;
    bottom: 120% !important; 
}  

.text-line-height-more{
    line-height: 150%;
}

.no-shadow{
    -webkit-box-shadow: none!important;
    box-shadow: none!important;
}


.ribbon-menu .content-holder{
    background: #FBFBFB;	
}

.ribbon-menu .tabs-holder li{	
    background: #E7EAED;
}

.ribbon-menu .tabs-holder .active{
    background: #FBFBFB;
}

#paperoffice_account_croppie_upload .drop-zone{
    height:40%;
    /*background-image: linear-gradient( 135deg, #ECF0F5 26.8%, #D7DDE8 64% );*/
    /*border: 1px solid #D7DDE8;border-radius:10px; */
    background-color: transparent;
    padding: 20px!important;
    outline-offset: 0px;
    outline: 2px dashed #D7DDE8;
    border-radius:10px;
}
.drop-zone .caption{
    white-space: normal;
}

.flat-button{
    min-width: 1px !important;
}

.button.btn-close.sys-button{
    border-top-right-radius:10px;
}

.button, .hint{
    border-radius:3px;
}

.hint{
    max-width: min(320px, calc(100vw - 32px));
    white-space: normal;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: normal;
    text-overflow: clip;
    line-height: 1.35;
    text-align: center;
};

.button.inline{
    border-radius:0px;
    box-shadow: none!important;
    -webkit-box-shadow: none!important;
}

.window.win-shadow{
    border-radius:10px;
    border-color: #D7DDE8;
    box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}

.window-caption{
    height: 30px;
    border-top-left-radius:10px;
    border-top-right-radius:10px;
}

.window-content{
    border-bottom-left-radius:10px;
    border-bottom-right-radius:10px;
}

#topmenu_start_container .window-content{
    padding-bottom: 40px!important;
}

.no-radius{
    border-radius:0px;
}

body, .dialog{
    color-scheme: inherit;
    forced-color-adjust: auto;
    font-family: var(--po-font-family) !important;
    font-size: 0.8rem !important;
    color: #43505b!important;
}

.window-content{
    height:100%;
    background: #FBFBFB;
    overflow:hidden; 
}

.mCSB_scrollTools .mCSB_draggerRail{
    height:10000px!important;
    position:relative;
    top:-5000px;
}

.stepper .step{
    font-size:13px;
}

a.link {
    position: relative;
    color: #0366d6;
    text-decoration: none;
    background-color: transparent;
    -webkit-text-decoration-skip: objects;
    -webkit-box-shadow: none;
    box-shadow: none;
}
a.link:hover {
    text-decoration: underline;
    cursor: pointer;
}

#topmenu_start_container .mCS-dark-thin.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar{ z-index:3;  }
#topmenu_start_container .mCS-dark-thin.mCSB_scrollTools .mCSB_draggerRail{ z-index:2; background-color: #CCC; } 


.text-spacing{
    letter-spacing:3px;
}


.text-elli{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

td{
    vertical-align:bottom;
}

.documentlist_document_block:hover, #documentlist_detailview_bottom tbody tr:hover{
    background-color:#E6F2FA;
}

.documentlist_document_block.active, #documentlist_detailview_bottom tr.active{
    background-color:#CDE6F7;
}

#documentlist_detailview .gutter{
    display:none;
}


#main_ribbonmenu_content .group .selected-item .title{
    display: block !important;
    position: relative !important;
    max-width: 180px !important;
    font-size: 14px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    -o-text-overflow: ellipsis !important;
    text-overflow: ellipsis !important;
    margin: 0 4px !important;
    line-height: 18px !important;
    border:none !important;
}

.color-picker.required:not(.invalid), .file.required:not(.invalid), .input.required:not(.invalid), .metro-input.required:not(.invalid), .select.required:not(.invalid), .spinner.required:not(.invalid), .tag-input.required:not(.invalid), .textarea.required:not(.invalid){
    border: 1px #d9d9d9 solid!important;
}

.vertical-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.underline-off{
    text-decoration: none;
}
.underline-auto{
    text-decoration: none;
}
.underline-auto:hover{
    text-decoration: underline;
}

.documentlist_toggle{
    color: #bebebe!important;
}
.documentlist_toggle:hover{
    color: #989898 !important
}


/* TREE */
.e-treeview .e-list-img {
    width: 25px;
    height: 25px;
}
.e-treeview .e-list-icon {
    background-repeat: no-repeat;
    background-image: url(/assets/images/shared_images/file_icons.png);
    height: 20px;
}
.e-treeview .e-list-icon.folder { background-position: -10px -552px }
.e-treeview .e-list-icon.docx { background-position: -10px -20px }
.e-treeview .e-list-icon.ppt { background-position: -10px -48px }
.e-treeview .e-list-icon.pdf { background-position: -10px -104px }
.e-treeview .e-list-icon.images { background-position: -10px -132px }
.e-treeview .e-list-icon.zip { background-position: -10px -188px }
.e-treeview .e-list-icon.audio { background-position: -10px -244px }
.e-treeview .e-list-icon.video { background-position: -10px -272px }
.e-treeview .e-list-icon.exe { background-position: -10px -412px }

.control_wrapper {
    max-width: 320px;
    margin: auto;
    border: 1px solid #dddddd;
    border-radius: 3px;
}
.e-treeview .e-list-text {
    width: 95%;
}
.treeCount.e-badge {
    padding: 0.4em;
    vertical-align: text-bottom;
}
.material .treeCount.e-badge {
    vertical-align: middle;
}
.nodetext {
    float: left;
} 
.e-rtl .nodetext {
    float: right;
}
.nodebadge {
    float: right;
    margin-right: 5px;
    margin-top:16px;
}
.e-rtl .nodebadge {
    float: left;
    margin-left: 5px
}
.e-treeview.e-interaction.e-fullrow-wrap .e-text-content {
    pointer-events: none;
}

.e-treeview .e-list-text{
    font-size:12px;

    font-family: var(--po-font-family) !important;
}

.e-treeview > .e-ul{
    overflow:hidden;
}

.e-treeview .e-ul{
    padding:0px;

    
}
.e-treeview .e-list-item.e-active > .e-text-content .e-list-text{
    color:#212121;
    font-weight:bold;
}

.e-treeview .e-list-item {
    padding: 0px;
    padding-left:0px;
}

.e-treeview .e-list-item .e-ul{
    padding: 0 0 0 10px;
}

.e-treeview .e-list-item.e-hover > .e-fullrow {
    background-color: #E6F2FA;
    border-color: #E6F2FA;
}

/* removes counter badge from clone when drag&drop */
.e-drag-item.e-treeview .treeviewdiv div:nth-child(2){
    display:none;
}

    .custom.e-treeview .e-list-item {
        background-image: url(/assets/images/shared_images/paperoffice_treeview_horizontal.png);
        background-repeat: repeat-y;
    }

    .custom.e-treeview .e-fullrow {
        padding-left: 4px;
    }

    .custom .e-fullrow:before {
        display: block;
        content: " ";
        background: url(/assets/images/shared_images/paperoffice_treeview_vertical.png);
        height: 10px;
        position: absolute;
        width: 20px;
        margin-left: -17px;
        margin-top: 12px;
        background-repeat: repeat-x;
    }

    .custom.e-treeview .e-icon.e-minus:before {
        content: "";
        font-size: 12px;
        margin-left: 2px;
    }

    .custom.e-treeview .e-icon.e-plus:before {
        content: "";
        font-size: 12px;
        margin-left: 2px;
    }

    .custom.e-treeview .e-icon.e-minus, .custom.e-treeview .e-icon.e-plus{
        border: 1px solid gray;
        padding: 0px;
        display: flex;
        margin-left: -28px;
        align-items: center;
        background-color: darkgrey;
    }

    .e-list-item.last.e-collapse {
        background-repeat: no-repeat !important;
    }
    
    .custom.e-treeview .e-list-item.last {
        background-image: url(/assets/images/shared_images/paperoffice_treeview_connector.png);
        background-repeat: no-repeat;
    }

    .e-treeview .e-list-text, .e-treeview .e-fullrow{
        line-height:28px;
        min-height: 28px;
        height: 28px;
    }

    .metro-input {
        padding: 0 8px;
        font-size:14px;
    }


    .text-error {
    position: relative;
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    }
    .text-error:before {
    content: '\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f\fe4f'; /* too much? */
    font-size:60px;
    max-width: 100%;
    position: absolute;
    white-space: nowrap;
    bottom: -15px;
    }
    .text-error.grammar:before {
    color: green; 
    }
    .text-error.spelling:before {
    color: red;
    }
    .text-error.other:before {
    color: blue;
    }
    .success-checkmark {
    width: 80px;
    height: 115px;
    margin: 0 auto;
}

.e-dashboardlayout.e-control.e-responsive {
    background: cyan;
    margin:60px 0px 0px 0px;
    max-height: calc(100% - 80px);
}
.poui_panel{
    border-radius:10px 10px 10px 10px!important;
    background-color:#F5F8FA;
    max-height: calc(100%);
}

.poui_button_dock{
    transition: all 0.2s ease-in-out;
}

.rotate_90_zoom{
    transform: scale(1.2) rotate(-90deg);
}
.rotate_0_zoom{
    transform: scale(1.2) rotate(0deg);
}
.rotate_90_nozoom{
    transform: scale(1) rotate(-90deg);
}
.rotate_0_nozoom{
    transform: scale(1) rotate(0deg);
}
.rotate_180 {
transform: rotate(180deg);
}
.rotate_0 {
transform: rotate(0deg);
}
.transition_05 {
transition: transform 0.5s;
}

.paperoffice_footer_version,
.paperoffice_footer_sse{
    align-items:center;
    gap:4px;
}

#paperoffice_ai_suite_wrapper_content_bottom_main_default{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    flex-wrap:wrap;
}

.paperoffice_footer_sse{
    font-weight:600;
    color:#647687;
}

.paperoffice_footer_sse.connected{
    color:#2f855a;
}

.paperoffice_footer_sse.disconnected{
    color:#c53030;
}

.paperoffice_footer_sse.connecting{
    color:#b7791f;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION SYSTEM STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 5px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: #ef4444;
    border-radius: 9px;
    border: 2px solid var(--po-bg-primary);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 380px;
    max-height: 500px;
    background: var(--po-bg-primary);
    border: 1px solid var(--po-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--po-border);
    background: var(--po-bg-secondary);
}

.notification-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--po-text-primary);
}

.notification-dropdown-actions {
    display: flex;
    gap: 8px;
}

.notification-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--po-border);
    border-radius: 8px;
    color: var(--po-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-action-btn:hover {
    background: var(--po-bg-tertiary);
    color: var(--po-text-primary);
    border-color: var(--po-accent);
}

.notification-dropdown-content {
    max-height: 350px;
    overflow-y: auto;
}

.notification-dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--po-border);
    background: var(--po-bg-secondary);
    text-align: center;
}

.notification-dropdown-footer a {
    font-size: 13px;
    color: var(--po-accent);
    text-decoration: none;
}

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

/* Notification Item */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--po-border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: var(--po-bg-secondary);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.04);
}

.notification-item.unread:hover {
    background: rgba(59, 130, 246, 0.08);
}

.notification-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--po-text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-priority-dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.notification-message {
    font-size: 12px;
    color: var(--po-text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--po-text-muted);
}

.notification-category {
    padding: 2px 6px;
    background: var(--po-bg-tertiary);
    border-radius: 4px;
}

/* Empty State */
.notification-empty,
.notification-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--po-text-muted);
}

.notification-empty i,
.notification-loading i {
    font-size: 32px;
    opacity: 0.5;
}

/* Dark Mode Adjustments */
html.dark-side .notification-dropdown,
[data-theme="dark"] .notification-dropdown {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

html.dark-side .notification-badge,
[data-theme="dark"] .notification-badge {
    border-color: var(--po-bg-secondary);
}

.d-menu.context{
    border-radius:0px 0px 0px 10px;
    background-color:#F5F8FA;
    box-shadow: 0 19px 38px rgba(0,0,0,0.20), 0 15px 12px rgba(0,0,0,0.12);
    transition: width 0.3s ease-in-out;
    width:240px;
}
.uicol_rightmenu li:last-of-type, .uicol_rightmenu a:last-of-type{
    border-radius:0px 0px 0px 10px;
}
.d-menu.context .icon{
    margin-top:-7px;
}


.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4caf50;
}
.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}
.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}
.success-checkmark .check-icon::before, .success-checkmark .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: #fff;
    transform: rotate(-45deg);
}
.success-checkmark .check-icon .icon-line {
    height: 5px;
    background-color: #4caf50;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}
.success-checkmark .check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}
.success-checkmark .check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}
.success-checkmark .check-icon .icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(76, 175, 80, .5);
}
.success-checkmark .check-icon .icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: #fff;
}
@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }
    5% {
        transform: rotate(-45deg);
    }
    12% {
        transform: rotate(-405deg);
    }
    100% {
        transform: rotate(-405deg);
    }
}
@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }
    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }
    100% {
        width: 25px;
        left: 14px;
        top: 45px;
    }
}
@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }
    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}


#train_ai_smart_train_sidenav_left.sidenav-counter a, #train_ai_smart_train_sidenav_left.sidenav-counter li{
    height: 42px;
    line-height: 42px;
}

[contenteditable] {
outline: 0px solid transparent;
}

#train_ai_smart_train_document_tab_publisher .listview.view-content .node>.data{

    font-size: 13px;

}

.autocomplete-list{
    z-index: 2;
}


.cr-slider{
    width:100%;
    height: 20px;
    appearance: none;
    background: #75b5fd;
    outline: none;
}
/* for chrome/safari */
.cr-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 60px;
    background: #0366d6;
    cursor: pointer;
    border: 3px solid #0366d6;
    border-radius: 4px;
    position:relative;
    top:-20px;
}

/* for firefox */
.cr-slider::-moz-range-thumb {
    width: 20px;
    height: 60px;
    background: #0366d6;
    cursor: pointer;
    border: 3px solid #0366d6;
    border-radius: 4px;
    position:relative;
    top:-20px;
}

.cr-slider-wrap{
    display:none;
    position:absolute;
    bottom:-20px;
    left:0px;
    width:100%!important;
    z-index:999997;
}

.tabs-material li a{
    text-transform: none;
}
.tabs-material li.active{
    color:#0366d6;
}
.tab-marker{
    height: 2px!important;
    background-color: #0366d6!important;
}


.dialog.secondary .dialog-title{
    background-color: #f8f8f8;
    color: #1d1d1d;
    border-bottom-color: transparent;
}


.animate__faster{
    --animate-duration: 0.3s;	
}

#poui_login_switch_darkmode .switch .check{
    border-color: white;
}
#poui_login_switch_darkmode .switch .check::before{
    font-size:14px;
}
#poui_login_switch_darkmode .switch .check::after{
    border-color: white;
    background: white;
}


/*
.table tbody{
display:block;
overflow:auto;
height:410px;
width:100%;
}
.table thead tr{
display:block;
}
*/
/*
.table-container{
    height: 490px;
}
*/
.table-info{
    font-size: 13px;
}

.table-pagination{
    margin-left:3px;
}
.pagination .page-link{
    font-size: 13px;
}

.table-search-block .prepend{
    font-size: 13px;
}
.table-rows-block .prepend, .table-rows-block .select-input{
    font-size: 13px;
}


.paperoffice_treeview{
    /*width: 400px;*/
    margin-left:0px;
}

.mCSB_container_wrapper>.mCSB_container{
    padding-right:0px;
}
.mCSB_container_wrapper{
    margin-right:0px;
}


.e-toolbar .e-toolbar-items{
    height:auto;
}

.e-table, .e-content, .e-gridcontent, .e-gridheader{
    background-color: transparent;
}


.e-gridcontent, .e-content, .e-table{
    background-color: transparent!important;
}

.e-grid .e-headercelldiv{
    height: 42px;
    line-height:42px;
    margin:0px;
}

.e-grid .e-rowcell{
    padding: 3px 0px 3px 0px;
}
.e-grid .e-headercell, .e-grid .e-detailheadercell{
    padding: 3px 0px 3px 7px;
}

/* ============================================
   GRID CHECKBOXEN - Nur bei Hover oder Checked anzeigen
   ============================================ */

/* Checkbox standardmäßig verstecken */
.e-grid .e-rowcell .e-checkbox-wrapper {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Checkbox bei Row-Hover anzeigen */
.e-grid .e-row:hover .e-checkbox-wrapper {
    opacity: 1;
}

/* Checkbox immer anzeigen wenn checked */
.e-grid .e-checkbox-wrapper.e-checkbox-checked,
.e-grid .e-checkbox-wrapper:has(input:checked) {
    opacity: 1 !important;
}

/* Header-Checkbox immer sichtbar */
.e-grid .e-headercell .e-checkbox-wrapper {
    opacity: 1 !important;
}

#upload_container{
    display: inline-block!important;
    border-color: #D7DDE8;
    background-image: linear-gradient( 135deg, #ECF0F5 26.8%, #D7DDE8 64% );
    box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
    opacity:1;
}


.e-upload.e-control-wrapper, .e-bigger.e-small .e-upload.e-control-wrapper {
    height: 500px;
    width: 600px;
}
.e-upload-files{
    height: 450px;	
}

.e-upload{
    height: 500px;
    overflow-y: auto; 
    overflow-x: hidden;
}

.e-upload-file-list, .e-file-select-wrap, .e-upload .e-file-drop {
    display: none !important;
}

/* Syncfusion Upload komplett verstecken im Dialog */
#dialog_add_new_document_droparea .e-upload,
#dialog_add_new_document_droparea .e-upload-files {
    display: none !important;
}

.e-upload .e-upload-files .e-upload-file-list, .e-bigger.e-small .e-upload .e-upload-files .e-upload-file-list, .e-upload .e-upload-files .e-upload-file-list, .e-bigger.e-small .e-upload .e-upload-files .e-upload-file-list{
    height:70px;
    min-height:70px;
}

#uploader_wrapper{
    overflow-y: auto;
    overflow-x: hidden;
}

.border-highlight {
border: 2px dashed #0061fe;
}

.node-hovered {
background-color: #f0f0f0;
}

/* Currency Select*/
.select_currency_style{
    font-size:14px;width:80px;
}
.poui_locale_select_currency_wrapper .select .option-list a{
    padding: 0px;
    padding-left:10px;
}
.poui_locale_select_currency_wrapper li{
    margin-left:0px;
}
.poui_locale_select_currency_wrapper .drop-container{
    width:410px;
}
.poui_locale_select_currency_wrapper .option-list{
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    list-style-type: none;
    padding: 0;
    max-height: 250px;
    width:404px;
}
.poui_locale_select_currency_wrapper .button-group{
    display:none;
}

/* S poui_apps_store_select_calculate_credits */
.poui_apps_store_select_calculate_credits_style{
    font-size:13px;width:280px;
}
.poui_apps_store_select_calculate_credits_wrapper .drop-container{
    width:410px;
}
.poui_apps_store_select_calculate_credits_wrapper .option-list{
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    list-style-type: none;
    padding: 0;
    max-height: 250px;
    width:404px;
}
.poui_apps_store_select_calculate_credits_wrapper li{
    font-size:13px;
}
.poui_apps_store_select_calculate_credits_wrapper .select .option-list a{
    padding: 0px;
    padding-left:10px;
}
.poui_apps_store_select_calculate_credits_wrapper .select-input{
    font-size:13px!important;

}
/* E poui_apps_store_select_calculate_credits */

label {
    display: inline-block;
    margin-bottom: 5px;
    color: #5E636E;
    font-size:14px;
    font-weight:400;
}

.head-bar~.fixed-tabs, .tabs-material-wrapper.app-bar-present{
    top:-10px;
}

.tabs-material {
    margin: 0;
    padding: 0 52px;
    position: relative;
    height: auto;
    display: -webkit-box;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    flex-flow: row nowrap;
    overflow: auto;
    overflow-y: hidden;
    width: 100%;
    z-index: 1030;
    background-color: #fff;
    color: #1d1d1d;
    white-space: nowrap;
    list-style: none inside;
    line-height: 1;
    justify-content: space-between; /* Zentriert die Elemente horizontal */
    align-items: center;
}




    .white-logo img {
        filter: brightness(0) invert(1);
        }
    .dialog-actions {
        border-top: none;	
    }


    .flip-card {
        background-color: transparent;
        width: 100%;
        height:560px;
        perspective: 1000px;
    }
    .flip-card-inner {
        position: relative;
        width: 100%;
        height: 100%;
        text-align: center;
        transition: transform 0.6s;
        transform-style: preserve-3d;
    }
    .flip-card-front, .flip-card-back {
        position: absolute;
        width: 100%;
        height: 100%;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    .flip-card-back {
        transform: rotateY(180deg);
    }

    #poui_store_summary_invoicing_waiting_status .lottie-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    #poui_store_summary_invoicing_waiting_status dotlottie-player {
        max-width: 300px;
        max-height: 300px;
        width: 100%;
        height: auto;
    }

    .tally{
        line-height: 20px;
    }

 

    #paperoffice_ai_suite_wrapper_content_main_wrapper{
        overflow-y: auto;
        overflow-x: hidden;
        background-color: var(--po-bg-sidebar, #EBEFF4);
    }

    /* FIX 11.02.2026: GPU-Compositing-Artefakte an border-radius Ecken beheben.
       Problem: Browser hinterlässt farbige Dreiecke / stale Paint-Layer an den
       abgerundeten Ecken des Content-Wrappers (Shell-Surface auf --po-bg-sidebar Parent).
       Lösung: Gesamte Parent-Kette auf eigene GPU-Layer + overflow:hidden auf _cell
       damit Artefakte physisch abgeschnitten werden. */

    /* Äussere Row (Parent von _cell) */
    #paperoffice_ai_suite_wrapper_content_main_wrapper_cell {
        will-change: transform;
        isolation: isolate;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
        /* Overflow hidden: schneidet Rendering-Artefakte an den border-radius Ecken ab */
        overflow: hidden;
    }
    #paperoffice_ai_suite_wrapper_content_main_wrapper_cell > .grid {
        will-change: transform;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
        overflow: hidden;
    }
    #paperoffice_ai_suite_wrapper_content_main_wrapper_cell > .grid > .row {
        will-change: transform;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
        overflow: hidden;
        /* App-Shell bleibt eckig, damit keine fremden Hintergründe in den Ecken durchscheinen. */
        border-radius: 0;
    }
    #paperoffice_ai_suite_wrapper_content_main_wrapper {
        will-change: transform;
        isolation: isolate;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
        border-radius: 0 !important;
    }
    
    /* Scrollbar - immer sichtbar */
    #paperoffice_ai_suite_wrapper_content_main_wrapper::-webkit-scrollbar {
        width: var(--po-scrollbar-size, 10px);
        height: var(--po-scrollbar-size, 10px);
        position: relative;
        top: 16px;
    }
    
    #paperoffice_ai_suite_wrapper_content_main_wrapper::-webkit-scrollbar-track {
        background: var(--po-scrollbar-track)!important;
        border-radius: 4px;
        margin-top: 16px;
    }
    
    #paperoffice_ai_suite_wrapper_content_main_wrapper::-webkit-scrollbar-thumb {
        background: var(--po-scrollbar-thumb)!important;  /* Zentrale Scrollbar-Farbe */
        border-radius: 4px;
    }
    
    /* Wenn der Wrapper gehovered wird, wird der Thumb dunkel */
    #paperoffice_ai_suite_wrapper_content_main_wrapper:hover::-webkit-scrollbar-thumb {
        background: var(--po-scrollbar-thumb-hover)!important;
    }

    

    /* Alte Metro-UI-Style Regeln fuer #top_menu_sidebar_right_toggle am
       22.04.2026 entfernt - der neue Toggle wird als Icon-Like-Element in
       Block "SIDEBAR LOGO-BOX + TOGGLE-ROW" definiert (siehe weiter unten). */

    /* Hide-Scrollbar Klasse für alle Menüs */
    .hide-scrollbar::-webkit-scrollbar-thumb {
        background: var(--po-scrollbar-thumb)!important;
    }
    
    .hide-scrollbar::-webkit-scrollbar-track {
        background: var(--po-scrollbar-track)!important;
    }
    
    /* Scrollbar Definitionen für die seitlichen Menüs */
    #top_menu_sidebar_left, 
    #top_menu_sidebar_right {
        height: calc(100vh - 64px - 52px);
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    #top_menu_sidebar_left::-webkit-scrollbar,
    #top_menu_sidebar_right::-webkit-scrollbar {
        width: var(--po-scrollbar-size, 10px);
        height: var(--po-scrollbar-size, 10px);
        background: var(--po-scrollbar-track)!important;
    }
    
    #top_menu_sidebar_left::-webkit-scrollbar-track,
    #top_menu_sidebar_right::-webkit-scrollbar-track {
        background: var(--po-scrollbar-track)!important;
        border-radius: 4px;
    }
    
    #top_menu_sidebar_left::-webkit-scrollbar-thumb,
    #top_menu_sidebar_right::-webkit-scrollbar-thumb{
        background: var(--po-scrollbar-thumb)!important;
        border-radius: 4px;
    }
    
    #top_menu_sidebar_left:hover::-webkit-scrollbar-thumb,
    #top_menu_sidebar_right:hover::-webkit-scrollbar-thumb {
        background: var(--po-scrollbar-thumb-hover)!important;
    }

    /* Dark Mode: Scrollbar-Farben über zentrale Theme-Tokens */
    .dark-side #top_menu_sidebar_left::-webkit-scrollbar-thumb,
    .dark-side #top_menu_sidebar_right::-webkit-scrollbar-thumb {
        background: var(--po-scrollbar-thumb) !important;
    }
    .dark-side #top_menu_sidebar_left:hover::-webkit-scrollbar-thumb,
    .dark-side #top_menu_sidebar_right:hover::-webkit-scrollbar-thumb {
        background: var(--po-scrollbar-thumb-hover) !important;
    }







.button.focus, .button:active, .button:focus{
    box-shadow: none;
}

.accordion.material .frame+.frame {
    border: none!important;
}
.bg-paperoffice-light-blue-hover:hover {
    background-color: #E0F0F8!important;
    border: none!important;
}
.bg-paperoffice-light-blue-hover{
    border: none!important;
}
.accordion.material > .frame > .heading::after {
    display: block;
    content: "\203A";
    position: absolute;
    right: -10px;
    top: 4px;
    font-size: 16px;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    transform: rotate(0);
    transition: transform .3s;
    transform-origin: center center;
}
/* Styles für den Dropdown-Toggle */
.collapse-trigger {
    position: relative!important;
    overflow: hidden!important;
    display: block!important;
    width: 100%!important;
    text-align: left!important;
    padding: 0.75rem!important;
    font-size: 0.875rem!important;
    cursor: pointer!important;
    background: none!important;
    border: none!important;
}
.collapse-trigger::after {
    content: "\203A";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) rotate(0);
    transition: transform .3s;
    font-size: 16px;
}
.collapse-trigger.active {
    background-color: #E0F0F8!important;
}
.collapse-trigger.active::after {
    transform: translateY(-50%) rotate(90deg);
}
/* Aktive Sidebar-Links - überschreibt bg-transparent */
#top_menu_sidebar_left_content a.sidebar-active,
#top_menu_sidebar_left_content a.sidebar-active.bg-transparent {
    background-color: #E0F0F8!important;
    font-weight: bold;
}

/* Styles für den Collapse-Content */
.collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.collapse-content.expanded {
    max-height: 1000px; /* Genug Platz für den Content */
}.tippy-box{
    background-color: #647687!important;
    color: #fff!important;
}
.tippy-arrow{
    color: #647687!important;
}

/* Datenfelder Section Management Styles */
.sections-container {
    margin-top: 20px;
    min-height:80px;
}




.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0px 20px 9px;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #555;
}

.section-title .delete-section-btn {
    margin-left: 8px;
    padding: 2px 6px;
    font-size: 11px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.section-title .delete-section-btn:hover {
    opacity: 1;
}

.section-drag-handle {
    cursor: grab;
    color: #555;
    font-size: 14px;
}

.section-drag-handle:hover {
    color: #555;
}

.section-drag-handle:active {
    cursor: grabbing;
}

.section-actions {
    display: flex;
    gap: 8px;
}

.section-content {
    padding: 0;
}

.section-content .properties-table {
    margin: 0;
    border: none;
}

.section-content .properties-table tbody tr:last-child td {
    border-bottom: none;
}


.field-drag-handle:active {
    cursor: grabbing;
}

.property-row .property-value {
    position: relative;
}

.property-row .property-label {
    color: #333 !important;
}





.section-management-controls {
    text-align: right;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* Sortable Styles */
.sortable-ghost {
    opacity: 0.4;
    background: #f0f8ff;
}

.sortable-chosen {
    background: #e6f3ff;
}

.sortable-drag {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: rotate(2deg);
}

/* Combined Controls Row */
.table-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5px 15px 5px;
    border-bottom: 1px solid #e0e0e0;
    gap: 20px;
}

.field-filter-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Add Section Form Styles */
.add-section-form {
    max-width: 550px;
}

.input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.input-group .form-control {
    flex: 1;
}

.input-group .button {
    white-space: nowrap;
}

/* Add Field Form Styles */
.add-field-form {
    border-top: 1px solid #e0e0e0;
    padding: 16px;
    margin: 0;
    overflow: hidden;
}

.add-field-inline-form {
    display: flex;
    align-items: end;
    gap: 15px;
    flex-wrap: wrap;
}

.add-field-inline-form .form-group {
    flex: 1;
    min-width: 200px;
}

.add-field-inline-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    color: #666;
    font-size: 13px;
}

.form-actions-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Responsive Design für Add Field Form */
@media (max-width: 768px) {
    .add-field-inline-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-field-inline-form .form-group {
        min-width: auto;
    }
    
    .form-actions-inline {
        justify-content: center;
        margin-top: 10px;
    }
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .section-actions {
        justify-content: center;
    }
    
    
    .add-section-form {
        max-width: none;
        margin-left: 0;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .form-actions {
        justify-content: center;
    }
    
    .table-controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .field-filter-controls {
        justify-content: center;
    }
    
    .form-row-two-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-row-three-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ===== MODERNE UI-KOMPONENTEN FÜR DATENFELDER ===== */

/* Modern Controls Row */
.modern-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Field Filter Dropdown */
.field-filter-dropdown {
    position: relative;
}



/* Inline Section Add */
.inline-section-add {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}





.add-text {
    font-size: 13px;
}
/* Inline Input Container - Ultra Minimalistisch */
.inline-input-container {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 8px;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.inline-input {
    border: none;
    outline: none;
    padding: 0;
    font-size: 13px;
    color: #333;
    background: transparent;
    flex: 1;
    min-width: 200px;
}

.inline-input::placeholder {
    color: #999;
}

.confirm-btn, .cancel-btn {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 9px;
    opacity: 0.6;
    transition: opacity 0.1s;
}

.confirm-btn:hover, .cancel-btn:hover {
    opacity: 1;
}

.confirm-btn {
    background: #10b981;
    color: white;
}

.cancel-btn {
    background: #6b7280;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-controls-row {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .field-filter-dropdown {
        width: 100%;
    }
    
    
    .inline-section-add {
        justify-content: center;
    }
    
    .inline-input-container {
        width: 100%;
        justify-content: space-between;
    }
    
    .inline-input {
        flex: 1;
        min-width: auto;
    }
}

/* Filter Options Area - Optimierte UX für viele Einträge */
#filter_options_area {
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

#filter_options_area.expanded {
    max-height: 400px;
    overflow-y: auto;
}

.filter_options_container {
    position: relative;
}

.filter_options_content {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
    margin-right: 12px;
}

.filter_options_scroll_area {
    max-height: 80px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.filter_options_scroll_area::-webkit-scrollbar {
    width: 6px;
}

.filter_options_scroll_area::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.filter_options_scroll_area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.filter_options_scroll_area::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.filter-option-item {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 1px;
    white-space: nowrap;
}

.filter-option-item:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.filter-option-item.selected {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.filter-option-item.selected:hover {
    background: #2563eb;
}

.filter_search_container {
    position: relative;
    margin-bottom: 8px;
    width: 100%;
}

.filter_search_input {
    width: 100%;
    padding: 6px 32px 6px 10px;
    font-size: 11px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    outline: none;
    transition: border-color 0.2s ease;
}

.filter_search_input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.filter_search_icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 12px;
}

.filter_controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.filter_expand_btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter_expand_btn:hover {
    background: #f3f4f6;
}

.filter_stats {
    font-size: 10px;
    color: #6b7280;
}

.filter_popular_badge {
    background: #fef3c7;
    color: #92400e;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 6px;
    margin-left: 4px;
}

.filter_section_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.filter_section_title {
    font-size: 11px;
    color: #374151;
    font-weight: 500;
}

.filter_quick_actions {
    display: flex;
    gap: 4px;
}

.filter_quick_btn {
    background: none;
    border: 1px solid #d1d5db;
    color: #6b7280;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter_quick_btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Inline Filter Search Input */
.filter_inline_search {
    width: 150px;
    padding: 2px 6px;
    font-size: 11px !important;
    border: 1px solid #d1d5db;
    border-radius: 4px; 
    margin-right: 4px;
    outline: none;
}

.filter_inline_search::placeholder {
    font-size: 11px !important;
    color: #9ca3af;
}

.filter_inline_search:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.1);
}

/* Date Range Filter Styling */
.date_range_container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.date_input_group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 8px;
    transition: all 0.2s ease;
}

.date_input_group:hover {
    border-color: #9ca3af;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.date_input_group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.date_input_label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
    min-width: 28px;
}

.date_range_input {
    border: none;
    outline: none;
    font-size: 11px;
    padding: 2px 4px;
    background: transparent;
    color: #374151;
    width: 110px;
}

.date_range_input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: opacity(0.6);
    transition: filter 0.2s ease;
}

.date_range_input::-webkit-calendar-picker-indicator:hover {
    filter: opacity(1);
}

.date_range_clear_btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.date_range_clear_btn:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Filter Active Indicator Styles */
.search-input.filters-active {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}


/* Suchfeld Container muss relative sein für absolute Badge */
.search-input {
    position: relative;
}

.search-input:parent {
    position: relative;
}

.search-input.filters-active::placeholder {
    color: #1e40af !important;
    font-weight: 500 !important;
}

.paperoffice_account_avatar_image {
    width: 45px !important;
    height: 45px !important;
    border-radius: 15% !important;
    object-fit: cover;
    object-position: center;
}

/* FIX 09.01.2026: Filter-Badge responsive positioniert, keine Ueberlappung mehr */
.filter-active-badge {
    background: var(--success-color, #10b981);
    color: white;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -180px; /* Rechts ausserhalb des Containers */
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* FIX 09.01.2026: Alt+P Shortcut verstecken wenn Filter-Badge sichtbar */
.command-palette:has(.filter-active-badge) .command-palette-shortcut {
    display: none !important;
}



.filter-active-badge:hover {
    background: red;
    cursor: pointer;
}

.language_selector_link {
	text-decoration: none !important;
}

.language_selector_link:hover {
	text-decoration: none !important;
}


.color-picker, .file, .input, .metro-input, .select, .spinner, .tag-input, .textarea {
    position: relative;
    border: 1px #d9d9d9 solid;
    color: #1d1d1d;
    width: 100%;
    font-size: 13px;
    height: 36px;
    line-height: 36px;
    background: #fff none;
    background-clip: padding-box;
    min-width: 0;
}

/* Metro-Textarea-Wrapper: height/line-height überschreiben, damit mehrzeilige
   Textareas nicht auf 36px abgeschnitten werden (Issue #337) */
.textarea {
    height: auto;
    line-height: normal;
    min-height: 36px;
}

/* Drag & Drop Zone Feedback */
#dialog_add_new_document_droparea {
    border: none !important;
    background: transparent !important;
}

#dialog_add_new_document_droparea.drag-over {
    border: none !important;
    background: transparent !important;
}

/* Upload Main Area - Border-Farbe bei Drag-Over ändern */
.upload-main-area {
    transition: border-color 0.2s ease;
    max-height: 280px;
    min-height: 200px;
}

.upload-main-area.drag-over {
    border-color: #5B9BD5 !important;
    border-style: solid !important;
}

/* Syncfusion Uploader - Innere dashed border verstecken */
.e-upload .e-file-drop,
.e-upload.e-upload-drag-hover .e-file-drop,
#dialog_add_new_document_droparea .e-file-drop {
    border: none !important;
    background: transparent !important;
}

.e-upload-drag-hover {
    border: none !important;
    outline: none !important;
}

/* ========== Upload File List (links neben Dropzone) ========== */
.upload-file-list {
    height: 100%;
    overflow-y: auto;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.upload-file-list:empty::before {
    content: 'Keine Dateien';
    display: block;
    text-align: center;
    color: #adb5bd;
    font-size: 12px;
    padding: 20px 10px;
}

.upload-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: white;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #e9ecef;
    position: relative;
    transition: all 0.15s ease;
}

.upload-file-item:hover {
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.upload-file-item .file-preview {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: visible; /* Wichtig für Popover! */
    background: #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.upload-file-item .file-preview > img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

/* Großes Vorschaubild Popover - FIXED Position für volle Sichtbarkeit */
.preview-popover-fixed {
    position: fixed;
    z-index: 9999999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.preview-popover-fixed.visible {
    opacity: 1;
    visibility: visible;
}

.preview-popover-fixed img {
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 4px solid #fff;
    background: #fff;
}

/* Pfeil oben am Popover */
.preview-popover-fixed::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 24px;
    border: 10px solid transparent;
    border-bottom-color: #fff;
}

.upload-file-item .file-preview i {
    font-size: 18px;
    color: #5B9BD5;
}

.upload-file-item .file-info {
    flex: 1;
    min-width: 0;
}

.upload-file-item .file-name {
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-file-item .file-size {
    font-size: 10px;
    color: #94a3b8;
}

.upload-file-item .file-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.upload-file-item:hover .file-remove {
    opacity: 1;
}

.upload-file-item .file-remove i {
    font-size: 8px;
    color: white;
}

.upload-file-item.mobile-file {
    border-left: 3px solid #10b981;
}

.upload-file-item.mobile-file .file-preview {
    background: rgba(16, 185, 129, 0.1);
}

.upload-file-item.mobile-file .file-preview i {
    color: #10b981;
}

/* Klickbare Bilder im Upload - Cursor Hinweis */
.upload-file-item .file-preview img {
    cursor: zoom-in;
}

.upload-file-item:has(.file-preview img) {
    cursor: pointer;
}

.upload-file-item:has(.file-preview img):hover {
    background: #f8fafc;
}

/* ========== UPLOAD DIALOG OVERLAY - Dunkler Modal-Hintergrund ========== */
.e-dlg-overlay {
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(2px);
}

/* Hover-Effekt für "Alle löschen" Button */
#btn_clear_all_files:hover {
    background: #fef2f2 !important;
    border-color: #f87171 !important;
}

/* Dateiliste Header bei leerem Zustand - initial versteckt */
#upload_file_list:empty {
    display: none !important;
}

/* Zeige "Keine Dateien" nur wenn explizit per Klasse angefordert */
#upload_file_list.show-empty-state:empty {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
}

#upload_file_list.show-empty-state:empty::before {
    content: "Dateien werden hier angezeigt";
}

/* ============================================== */
/* NEUES UPLOAD DIALOG LAYOUT - Dynamisch & Clean */
/* ============================================== */

.upload-dialog-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Upload Steps */
.upload-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.upload-step:not(.active) {
    display: none !important;
}

/* ============================================== */
/* SCHRITT 1: DROPZONE (Volle Breite) */
/* ============================================== */

.dropzone-full {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 3px dashed #5B9BD5;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(91, 155, 213, 0.03) 0%, rgba(91, 155, 213, 0.08) 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    margin: 16px;
    min-height: 280px;
}

.dropzone-full:hover,
.dropzone-full.drag-over {
    border-color: #5B9BD5;
    background: linear-gradient(135deg, rgba(91, 155, 213, 0.05) 0%, rgba(91, 155, 213, 0.1) 100%);
}

.dropzone-full.drag-over {
    transform: scale(1.01);
}

.dropzone-inner {
    text-align: center;
    padding: 40px;
}

.dropzone-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #5B9BD5 0%, #4178BE 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(91, 155, 213, 0.3);
}

.dropzone-icon i {
    font-size: 36px;
    color: white;
}

.dropzone-title {
    font-size: 24px;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.dropzone-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 16px 0;
}

.browse-link {
    color: #5B9BD5;
    text-decoration: none;
    font-weight: 600;
}

.browse-link:hover {
    text-decoration: underline;
}

.dropzone-hints {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
    color: #94a3b8;
}

.dropzone-hints kbd {
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
}

.hint-divider {
    opacity: 0.5;
}

/* ============================================== */
/* SOURCE TABS (Neue Tab-Navigation) */
/* FIX 09.01.2026: Dark Mode Support via CSS-Variablen */
/* ============================================== */

.source-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--po-bg-secondary, #f8fafc);
    border-bottom: 1px solid var(--po-border, #e2e8f0);
    overflow-x: auto;
}

.source-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--po-bg-primary, white);
    border: 1px solid var(--po-border, #e2e8f0);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--po-text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.source-tab:hover {
    border-color: var(--po-accent, #5B9BD5);
    color: var(--po-accent, #5B9BD5);
}

.source-tab.active {
    background: var(--po-accent, #5B9BD5);
    border-color: var(--po-accent, #5B9BD5);
    color: white;
}

.source-tab i {
    font-size: 14px;
}

.tab-status-badge {
    color: #10b981;
    font-size: 10px;
    margin-left: 4px;
}

.source-tab.active .tab-status-badge {
    color: #a7f3d0;
}

/* Tab Contents */
.source-tab-contents {
    flex: 1;
    overflow-y: auto;
}

.source-tab-content {
    display: none;
    height: 100%;
}

.source-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Source Panel (für alle außer Datei-Tab) */
.source-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    height: 100%;
}

.source-panel-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(91, 155, 213, 0.1) 0%, rgba(91, 155, 213, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.source-panel-icon i {
    font-size: 32px;
    color: #5B9BD5;
}

.source-panel h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--po-text-primary, #1e293b);
    margin: 0 0 8px 0;
}

.source-panel p {
    font-size: 14px;
    color: var(--po-text-secondary, #64748b);
    margin: 0 0 24px 0;
    max-width: 400px;
}

.source-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #5B9BD5 0%, #4178BE 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.source-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.3);
}

/* URL Input Group */
.url-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 20px;
}

.url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--po-border, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    background: var(--po-bg-primary, white);
    color: var(--po-text-primary, #1e293b);
    transition: border-color 0.2s;
}

.url-input:focus {
    outline: none;
    border-color: var(--po-accent, #5B9BD5);
}

.url-input::placeholder {
    color: var(--po-text-tertiary, #94a3b8);
}

.url-import-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #5B9BD5;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.url-import-btn:hover {
    background: #4178BE;
}

/* URL Options */
.url-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.url-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.url-option:hover {
    border-color: #5B9BD5;
}

.url-option input[type="radio"] {
    display: none;
}

.url-option:has(input[type="radio"]:checked) {
    border-color: #5B9BD5;
    background: rgba(91, 155, 213, 0.08);
}

.url-option:has(input[type="radio"]:checked) span {
    color: #5B9BD5;
    font-weight: 600;
}

.url-option span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.url-option span i {
    font-size: 14px;
}

/* Cloud Providers Grid */
.cloud-providers-grid,
.email-providers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 400px;
}

.cloud-provider-btn,
.email-provider-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.cloud-provider-btn:hover,
.email-provider-btn:hover {
    border-color: #5B9BD5;
    background: rgba(91, 155, 213, 0.05);
    transform: translateY(-2px);
}

.cloud-provider-btn i,
.email-provider-btn i {
    font-size: 28px;
}

.cloud-provider-btn[data-provider="dropbox"] i { color: #0061FF; }
.cloud-provider-btn[data-provider="gdrive"] i { color: #4285F4; }
.cloud-provider-btn[data-provider="onedrive"] i { color: #0078D4; }
.cloud-provider-btn[data-provider="box"] i { color: #0061D5; }
.cloud-provider-btn[data-provider="icloud"] i { color: #3693F3; }
.cloud-provider-btn[data-provider="paperoffice"] i { color: #5B9BD5; }

.email-provider-btn[data-provider="gmail"] i { color: #EA4335; }
.email-provider-btn[data-provider="outlook"] i { color: #0078D4; }
.email-provider-btn[data-provider="imap"] i { color: #64748b; }

.cloud-provider-btn span,
.email-provider-btn span {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}

/* QR Container */
.qr-container {
    width: 180px;
    height: 180px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
}

.qr-placeholder i {
    font-size: 48px;
}

.qr-placeholder span {
    font-size: 12px;
}

/* ============================================== */
/* URL IMPORT ERWEITERT */
/* ============================================== */

/* URL-Panel: Web2PDF Import — Redesign mit mehr Luft und Struktur */
.url-panel {
    padding: 28px 32px !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-y: auto;
}

.url-panel h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--po-text-primary, #1e293b);
}

.url-panel h3 i {
    color: #5B9BD5;
    font-size: 18px;
}

.url-panel > p {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.url-form {
    width: 100%;
}

.url-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.url-input-row .url-input {
    flex: 1;
}

/* Erweiterte Optionen — Karte mit Schatten */
.url-advanced-options {
    background: var(--po-bg-secondary, #f8fafc);
    border: 1px solid var(--po-border, #e2e8f0);
    border-radius: 12px;
    padding: 20px 24px;
}

/* Responsive Grid: 4 Spalten bei breitem Dialog, 2 Spalten bei schmal */
.url-option-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 20px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .url-option-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.url-option-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.url-option-item label {
    font-size: 11px;
    font-weight: 600;
    color: var(--po-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.url-select {
    padding: 9px 12px;
    border: 1px solid var(--po-border, #e2e8f0);
    border-radius: 8px;
    font-size: 13px;
    color: var(--po-text-primary, #1e293b);
    background: var(--po-bg-primary, white);
    cursor: pointer;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.url-select:hover {
    border-color: var(--po-accent-light, #93c5fd);
}

.url-select:focus {
    outline: none;
    border-color: var(--po-accent, #5B9BD5);
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.1);
}

/* Trennlinie zwischen Grid und CSS-Klassen */
.url-option-full {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid var(--po-border, #e2e8f0);
}

.url-option-full label {
    font-size: 11px;
    font-weight: 600;
    color: var(--po-text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.url-option-full label .hint {
    font-weight: 400;
    text-transform: none;
}

.url-input-full {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--po-border, #e2e8f0);
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--po-font-family) !important;
    background: var(--po-bg-primary, white);
    transition: border-color 0.15s ease;
}

.url-input-full:hover {
    border-color: var(--po-accent-light, #93c5fd);
}

.url-input-full:focus {
    outline: none;
    border-color: var(--po-accent, #5B9BD5);
    box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.1);
}

.url-hint {
    font-size: 11px;
    color: var(--po-text-tertiary, #94a3b8);
    margin-top: 2px;
    font-style: italic;
}

/* ============================================== */
/* EMAIL ADRESSE TAB */
/* ============================================== */

.email-addr-panel {
    max-width: 500px;
    margin: 0 auto;
}

.email-address-box {
    width: 100%;
    margin-bottom: 24px;
}

.email-address-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #5B9BD5;
    border-radius: 12px;
    margin-bottom: 8px;
}

.email-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5B9BD5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.email-address {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    font-family: var(--po-font-family) !important;
}

.copy-email-btn {
    padding: 10px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-email-btn:hover {
    background: #5B9BD5;
    border-color: #5B9BD5;
    color: white;
}

.email-hint {
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.email-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.email-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.email-feature i {
    color: #10b981;
}

.email-feature span {
    font-size: 14px;
    color: #475569;
}

/* Legacy - Upload-Quellen Grid (unused) */
.upload-sources {
    padding: 16px 20px;
    margin: 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.sources-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-align: center;
}

.sources-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.source-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
    min-width: 90px;
    min-height: 70px;
}

.source-btn:hover {
    border-color: #5B9BD5;
    color: #5B9BD5;
    background: rgba(91, 155, 213, 0.05);
    transform: translateY(-2px);
}

.source-btn.connected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}

.source-btn.active {
    border-color: #5B9BD5;
    background: rgba(91, 155, 213, 0.1);
    color: #5B9BD5;
}

.source-btn i {
    font-size: 22px;
    color: #5B9BD5;
}

.source-btn:hover i {
    color: #4178BE;
}

.source-btn.connected i {
    color: #10b981;
}

/* Smartphone Button Wrapper mit Trennen-Button */
.source-btn-wrapper {
    position: relative;
    display: inline-flex;
}

.disconnect-mini-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid white;
    color: white;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.disconnect-mini-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ============================================== */
/* SOURCE OPTIONS PANEL */
/* ============================================== */

.source-options-panel {
    margin: 0 16px 16px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.source-option-content {
    padding: 0;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
}

.option-header i:first-child {
    color: #5B9BD5;
    font-size: 18px;
}

.option-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.option-close:hover {
    background: #e2e8f0;
    color: #64748b;
}

.option-body {
    padding: 16px;
}

.option-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    transition: border-color 0.2s;
}

.option-input:focus {
    outline: none;
    border-color: #5B9BD5;
}

.option-hint {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.option-footer {
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn.primary {
    background: linear-gradient(135deg, #5B9BD5 0%, #4178BE 100%);
    color: white;
}

.option-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.3);
}

/* Cloud Provider Buttons */
.cloud-providers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.cloud-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.cloud-btn:hover {
    border-color: #5B9BD5;
    background: rgba(91, 155, 213, 0.05);
}

.cloud-btn i {
    font-size: 24px;
}

.cloud-btn[data-provider="dropbox"] i { color: #0061FF; }
.cloud-btn[data-provider="gdrive"] i { color: #4285F4; }
.cloud-btn[data-provider="onedrive"] i { color: #0078D4; }
.cloud-btn[data-provider="paperoffice"] i { color: #5B9BD5; }

.cloud-btn span {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
}

/* Status-Leiste - Über den Upload-Quellen */
.status-bar {
    position: absolute;
    bottom: 110px; /* Über den Upload-Quellen */
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    margin: 0 16px;
    padding: 10px 16px;
    z-index: 101;
}

.status-bar-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.status-indicator.connected {
    background: #10b981;
    color: white;
}

.status-indicator.pending {
    background: #f59e0b;
    color: white;
    animation: pulse 1.5s infinite;
}

.status-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-title {
    font-size: 13px;
    font-weight: 600;
    color: #065f46;
}

.status-detail {
    font-size: 11px;
    color: #059669;
}

.status-badge {
    background: white;
    border: 1px solid #a7f3d0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #059669;
}

.status-action {
    padding: 6px 14px;
    background: white;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    color: #059669;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.status-action:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* ============================================== */
/* SCHRITT 2: KONFIGURATION (2-Spalten) */
/* ============================================== */

.configure-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    height: 100%;
    min-height: 400px;
}

/* Linke Seite: Dateiliste */
.configure-left {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.file-count {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.file-list-actions {
    display: flex;
    gap: 8px;
}

.add-more-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #5B9BD5;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.add-more-btn:hover {
    background: #4178BE;
}

.clear-all-btn {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-all-btn:hover {
    background: #fef2f2;
}

/* Dateiliste */
#step_configure .upload-file-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Mini-Dropzone */
.mini-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    margin: 8px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-dropzone:hover {
    border-color: #5B9BD5;
    color: #5B9BD5;
    background: rgba(91, 155, 213, 0.05);
}

/* Upload Dialog Styles wurden nach content_main.htm verschoben */

.mode-description {
    text-align: center;
    margin-bottom: 20px;
}

.mode-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.mode-icon i {
    font-size: 24px;
    color: white;
}

.mode-icon.save {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.mode-icon.ai {
    background: linear-gradient(135deg, #5B9BD5 0%, #4178BE 100%);
}

.mode-icon.workflow {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.mode-description h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.mode-description p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Feature Liste */
.mode-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.mode-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.mode-features li:last-child {
    border-bottom: none;
}

.mode-features li i.fa-check {
    color: #10b981;
}

.mode-features li i.fa-times {
    color: #ef4444;
}

/* Preis */
.mode-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.mode-price .price {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.mode-price .unit {
    font-size: 12px;
    color: #64748b;
}

.mode-price.recommended {
    background: rgba(91, 155, 213, 0.1);
    border: 1px solid rgba(91, 155, 213, 0.2);
    flex-wrap: wrap;
}

.mode-price .badge {
    width: 100%;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #5B9BD5;
    margin-bottom: 4px;
}

/* Agent Select */
.agent-select-wrapper {
    margin-bottom: 16px;
}

.agent-select-wrapper label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.agent-select-wrapper select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
}

/* Upload Action - Immer sichtbar unten */
.upload-action {
    margin-top: 16px;
    padding: 16px 0 0 0;
    border-top: 1px solid #e2e8f0;
    background: white;
    flex-shrink: 0;
}

.upload-btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #5B9BD5 0%, #4178BE 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.3);
}

.upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upload-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 155, 213, 0.4);
}

/* Mobile Banner */
.mobile-banner {
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 10px;
}

.mobile-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-banner-icon {
    width: 40px;
    height: 40px;
    background: #10b981;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.mobile-banner-info {
    flex: 1;
}

.mobile-banner-info strong {
    display: block;
    color: #065f46;
    font-size: 14px;
}

.disconnect-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    color: #059669;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

/* QR Popup */
.qr-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100001;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.qr-popup-content {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}

.qr-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    color: #64748b;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #5B9BD5 0%, #4178BE 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(91, 155, 213, 0.3);
}

.qr-icon i {
    font-size: 28px;
    color: white;
}

.qr-popup-content h5 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-weight: 700;
    font-size: 20px;
}

.qr-popup-content > p {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 24px 0;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.qr-loading {
    padding: 20px;
}

.qr-loading i {
    font-size: 32px;
    color: #5B9BD5;
}

.qr-loading p {
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
}

.qr-status {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qr-status .status-indicator {
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.qr-status code {
    font-size: 10px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

.qr-cancel {
    margin-top: 24px;
    padding: 12px 32px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Metro Delete Dialog Styles ===== */
.metro-delete-dialog {
    max-width: 95vw;
}

.metro-delete-dialog .dialog-content {
    padding: 0;
}

.metro-delete-dialog .delete-dialog-items {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-height: 150px;
    overflow-y: auto;
}

.metro-delete-dialog .delete-dialog-items::-webkit-scrollbar {
    width: 6px;
}

.metro-delete-dialog .delete-dialog-items::-webkit-scrollbar-track {
    background: var(--po-bg-secondary, #ffffff);
    border-radius: 3px;
}

.metro-delete-dialog .delete-dialog-items::-webkit-scrollbar-thumb {
    background: var(--po-scrollbar-thumb, #C4C7C5);
    border-radius: 3px;
}

.metro-delete-dialog .dialog-actions {
    padding: 16px 24px;
    gap: 12px;
}

.metro-delete-dialog .metro-delete-confirm-btn {
    background-color: var(--po-danger, #ef4444) !important;
}

.metro-delete-dialog .metro-delete-confirm-btn:hover {
    background-color: #dc2626 !important;
}

/* ===================================================================
   METRO UI v4 → v5 KOMPATIBILITÄTS-SCHICHT
   Diese Klassen stellen sicher, dass das alte Layout mit Metro v5 funktioniert
   =================================================================== */

/* Grid-System: .condensed entfernt den Gap zwischen Zellen */
.grid.condensed,
.row.condensed {
    --grid-gap: 0px !important;
}

.grid.condensed > .row {
    --grid-gap: 0px !important;
    margin-right: 0 !important;
    gap: 0 !important;
}

.grid.condensed .row > * {
    max-width: 100% !important;
}

/* .stub: Feste Breite-Elemente im Grid (nicht flexibel) */
.row > .stub {
    flex: 0 0 auto !important;
    max-width: none !important;
    width: auto;
}

/* .cell ohne Nummer: nimmt den verfügbaren Platz */
.row > .cell {
    flex: 1 1 0% !important;
    max-width: none !important;
}

/* Row mit no-gap Variante */
.row.no-gap {
    --grid-gap: 0px !important;
    gap: 0 !important;
    margin-right: 0 !important;
}

.row.no-gap > * {
    max-width: 100% !important;
}

/* Fix für die Sidebar/Content Layout-Struktur */
#paperoffice_ai_suite_wrapper.grid {
    display: flex !important;
    flex-direction: column !important;
}

#paperoffice_ai_suite_wrapper > .row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    margin-right: 0 !important;
}

#paperoffice_ai_suite_wrapper > .row > .stub {
    flex: 0 0 auto !important;
}

#paperoffice_ai_suite_wrapper > .row > .cell {
    flex: 1 1 0% !important;
    min-width: 0 !important;
}

/* Sicherstellen, dass verschachtelte Grids korrekt funktionieren */
.grid .grid {
    display: flex;
    flex-direction: column;
}

.grid .grid > .row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

/* h-100 Fix für Metro v5 */
.h-100 {
    height: 100% !important;
}

/* w-100 Fix für Metro v5 */
.w-100 {
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR OVERLAY MODE - 10.02.2026
   Beide Sidebars als fixed overlay statt inline (kein Content-Push).
   Rail (collapsed: 58px) bleibt sichtbar, expanded (300px) schwebt ueber Content.
   Click-to-Toggle: Klick auf Rail expandiert, Klick ausserhalb collapsed.
   Content hat festes Padding (58px je Seite) fuer die Rails.
   ═══════════════════════════════════════════════════════════════ */

#top_menu_sidebar_left_wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important;
    /* 22.04.2026: z-index 1005 (vorher 1000) damit der Toggle-Button im
       Sidebar-Header NICHT vom #search-container (z-index 1001) verdeckt
       wird. Die Sidebar ist ein Overlay ueber der Top-Nav und gehoert
       logisch auch visuell darueber. */
    z-index: 1005;
    transition: box-shadow 0.2s ease-out;
}

/* Rechte Sidebar: unterhalb Nav-Leiste (FIX 07.05.2026: top 71px passend zur App-Topbar), feste Breite 72px collapsed */
#top_menu_sidebar_right_wrapper {
    position: fixed !important;
    top: 71px !important;
    right: 0 !important;
    width: 72px;
    height: calc(-71px + 100vh) !important;
    /* 22.04.2026: z-index 1005 (vorher 1000) - siehe Kommentar oben. */
    z-index: 1005;
    transition: box-shadow 0.2s ease-out;
    overflow: hidden;
}

/* Shadow nur wenn expandiert - visueller Tiefeneffekt */
#top_menu_sidebar_left_wrapper.sidebar-expanded {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

#top_menu_sidebar_right_wrapper.sidebar-expanded {
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

/* Rechte Sidebar Inner: Kein margin-top, volle Wrapper-Hoehe (11.02.2026) */
#top_menu_sidebar_right {
    margin-top: 0 !important;
    height: 100% !important;
}

/* Content-Bereich: Festes Padding fuer die Sidebar-Rails (links 58px, rechts 72px) */
#paperoffice_ai_suite_wrapper > .row {
    padding-left: 58px !important;
    padding-right: 72px !important;
}

/* Sidebar Scroll-Bereich: Horizontalen Overflow clippen (fuer Rail-Modus) */
#top_menu_sidebar_left,
#top_menu_sidebar_right {
    overflow-x: hidden;
}

/* FIX 10.02.2026: Accordion-Chevrons im collapsed Rail ausblenden.
   Bei 58px Breite haben die Chevrons keinen Nutzen - nur Icons zeigen. */
#top_menu_sidebar_left_wrapper:not(.sidebar-expanded) .heading::after,
#top_menu_sidebar_right_wrapper:not(.sidebar-expanded) .heading::after {
    display: none !important;
}

/* FIX 11.02.2026: Accordion-Content im collapsed Rail komplett ausblenden.
   Im Rail-Modus (58px) sollen NUR die Heading-Icons sichtbar sein.
   Die Unter-Menuepunkte (Links, Badges etc.) werden erst bei Hover-Expand gezeigt. */
#top_menu_sidebar_left_wrapper:not(.sidebar-expanded) .frame > .content,
#top_menu_sidebar_right_wrapper:not(.sidebar-expanded) .frame > .content {
    display: none !important;
}

/* FIX 11.02.2026: Text-Labels in Headings im collapsed Rail ausblenden.
   Nur das Icon bleibt sichtbar - kein abgeschnittener Text. */
#top_menu_sidebar_left_wrapper:not(.sidebar-expanded) .heading span,
#top_menu_sidebar_right_wrapper:not(.sidebar-expanded) .heading span {
    display: none !important;
}

/* Collapsed-Sidebar: cursor:pointer zeigt Klickbarkeit an.
   Linke Sidebar: Icons + Chevrons signalisieren Klick zum Öffnen.
   Rechte Sidebar: Dezenter Chevron bei leerer Sidebar, sonst Icons. */
#top_menu_sidebar_left_wrapper:not(.sidebar-expanded) {
    cursor: pointer;
}

#top_menu_sidebar_right_wrapper:not(.sidebar-expanded) {
    cursor: pointer;
    border-left: none;
}

#top_menu_sidebar_right_wrapper.sidebar-expanded {
    border-left: none;
}

#top_menu_sidebar_right_wrapper:not(.sidebar-expanded) #top_menu_sidebar_right {
    position: relative;
}

/* 22.04.2026: Leerer-Sidebar-Chevron entfernt - der Toggle-Button im
   po-sidebar-header uebernimmt jetzt die Indikator-Funktion. */

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR LOGO-BOX + TOGGLE-ROW (22.04.2026 v2, Claude-Style)

   Layout-Konzept:
   - Wrapper = flex column
   - Logo-Box (nur links)    = fixe Hoehe, Logo zentriert/links-ausgerichtet
   - Toggle-Row (beide)      = fixe Hoehe, liegt vertikal im Rhythmus der Menu-
                               Icon-Rows direkt darunter. Collapsed wirkt der
                               Toggle wie das erste Item der Icon-Kolonne.
   - Scroll-Area             = flex:1, nimmt den Rest

   COLLAPSED (58px links / 62px rechts):
       [ Logo klein zentriert (nur links) ]
       [ Toggle zentriert              ]
       [ erstes Menu-Icon ...          ]

   EXPANDED (300px):
       Logo-Box und Toggle werden in einer Zeile kombiniert (Toggle sitzt
       rechts neben dem grossen Logo). Rechte Sidebar expanded: Toggle sitzt
       links im sichtbaren Panel-Rand (naturliche Position zum Schliessen).
   ═══════════════════════════════════════════════════════════════════════════ */

#top_menu_sidebar_left_wrapper,
#top_menu_sidebar_right_wrapper {
    display: flex !important;
    flex-direction: column !important;
}

/* --- Logo-Box (NUR linke Sidebar) --- */
.po-sidebar-logo-box {
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    position: relative;
}

#top_menu_sidebar_left_wrapper:not(.sidebar-expanded) .po-sidebar-logo-box {
    justify-content: center;
    padding: 12px 0 4px;
    min-height: 48px;
}

#top_menu_sidebar_left_wrapper.sidebar-expanded .po-sidebar-logo-box {
    justify-content: flex-start;
    padding: 14px 15px;
    min-height: 60px;
}

.po-sidebar-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    line-height: 0;
}

.po-sidebar-logo-link .po-sidebar-logo-small {
    display: block;
    width: 32px;
    height: auto;
}

.po-sidebar-logo-link .po-sidebar-logo-big {
    display: none;
    width: auto;
    height: 42px;
}

.sidebar-expanded .po-sidebar-logo-link .po-sidebar-logo-small {
    display: none;
}
.sidebar-expanded .po-sidebar-logo-link .po-sidebar-logo-big {
    display: block;
}

/* --- Sidebar-Toggle als normales Menu-Heading (22.04.2026 v3) ---
   Der Toggle (.frame.po-sidebar-toggle-frame > .heading) wird optisch
   identisch zu den echten Menu-Headings behandelt. Die eigentlichen Heading-
   Styles liefern die gescopten Regeln unter ".sidebar-left-nav .frame > .heading"
   (weiter unten in dieser Datei) sowie die Scope-Erweiterung darauf.
   
   Hier nur minimale Rahmendaten (flex-shrink, z-index) damit der Toggle-Frame
   im Flex-Wrapper korrekt sitzt. */
.po-sidebar-toggle-frame {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Kleiner Abstand nach unten, damit der Toggle visuell klar vom ersten
   echten Menu-Item getrennt ist. */
.po-sidebar-toggle-frame + * {
    margin-top: 2px;
}

/* --- Content-Scroll-Area fuellt den Rest des Wrappers --- */
#top_menu_sidebar_left,
#top_menu_sidebar_right {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

#top_menu_sidebar_left_content,
#top_menu_sidebar_right_content {
    height: auto !important;
}

/* FIX 11.02.2026: Nav-Row ueber Padding hinaus auf volle Breite erweitern.
   Negative Margins heben das Outer-Row-Padding auf.
   Links: padding-left 58px (hinter linker Sidebar-Rail).
   Rechts: padding-right 0 - Nav-Content (Avatar) geht bis zum rechten Rand,
   weil rechte Sidebar erst bei top:65px beginnt (unterhalb der Nav). */
#paperoffice_ai_suite_wrapper > .row > .cell > .grid.condensed > .row:first-child {
    margin-left: -58px !important;
    margin-right: -72px !important;
    padding-left: 58px !important;
    padding-right: 0 !important;
    min-height: 65px !important;
}

#paperoffice_ai_suite_wrapper > .row > .cell > .grid.condensed > .row:first-child > .cell > nav {
    min-height: 65px !important;
    padding: 0px 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PAPEROFFICE SIDEBAR RIGHT - MODERN DESIGN (wie neue PWA)
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
    /* PaperOffice Design System Variables - Sync mit Svelte PWA */
    --po-accent: #5B9BD5;
    --po-accent-dark: #4178BE;
    --po-accent-light: #7ab3e0;
    --po-accent-soft: rgba(91, 155, 213, 0.1);
    --po-accent-violet: #8b5cf6;
    --po-accent-pink: #ec4899;
    --po-primary: var(--po-accent);
    --po-primary-dark: var(--po-accent-dark);
    --po-primary-light: var(--po-accent-light);
    --po-button-primary-bg: var(--po-accent);
    --po-button-primary-bg-hover: var(--po-accent-dark);
    --po-button-primary-text: #ffffff;
    
    /* Background Colors */
    --po-bg-primary: #f8f9fa;
    --po-bg-secondary: #ffffff;
    --po-bg-tertiary: #f1f3f5;
    --po-bg-sidebar: #EBEFF4;
    --po-bg-hover: #e9ecef;
    --po-bg-active: #E6F2FA;
    --po-bg-selected: #CDE6F7;
    --po-bg-input: #ffffff;
    --po-bg-elevated: #ffffff;
    --po-surface: var(--po-bg-secondary);
    --po-surface-muted: var(--po-bg-tertiary);
    --po-surface-elevated: var(--po-bg-elevated);
    --po-overlay: rgba(0, 0, 0, 0.5);
    --po-scrollbar-size: 10px;
    --po-scrollbar-thumb: #C4C7C5;
    --po-scrollbar-thumb-hover: #9AA5B1;
    --po-scrollbar-track: #EBEFF4;
    --po-scrollbar-corner: #EBEFF4;
    
    /* Text Colors - EXAKT wie Svelte PWA */
    --po-text-primary: #1f2937;
    --po-text-secondary: #495057;
    --po-text-muted: #6b7280;
    --po-text-tertiary: #94a3b8;
    --po-text-light: #9ca3af;
    --po-text-inverse: #ffffff;
    
    /* Icon & Border */
    --po-icon-default: #647687;
    --po-icon-active: #5B9BD5;
    --po-border: #e5e7eb;
    --po-border-color: var(--po-border);
    --po-border-light: #f3f4f6;
    --po-border-dark: #cbd5e1;
    --po-border-focus: #5B9BD5;
    
    /* Shadows */
    --po-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --po-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --po-font-family: 'DM Sans', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Hebrew', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --po-font-xs: 0.75rem;
    --po-font-sm: 0.875rem;
    --po-font-base: 1rem;
    --po-font-lg: 1.125rem;
    
    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-normal: 250ms ease-out;
    
    /* Status Colors */
    --po-success: #22c55e;
    --po-success-bg: rgba(34, 197, 94, 0.1);
    --po-warning: #f59e0b;
    --po-warning-bg: rgba(245, 158, 11, 0.1);
    --po-danger: #ef4444;
    --po-danger-bg: rgba(239, 68, 68, 0.1);
    --po-info: #3b82f6;
    --po-info-bg: rgba(59, 130, 246, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DARK MODE - Palantir-inspiriertes Dark Theme
   Aktiviert durch: html.dark-side oder [data-theme="dark"]
   ═══════════════════════════════════════════════════════════════════════════════ */

html.dark-side,
[data-theme="dark"] {
    /* PaperOffice Design System Variables - DARK MODE */
    --po-accent: #60a5fa;
    --po-accent-dark: #3b82f6;
    --po-accent-light: #93c5fd;
    --po-accent-soft: rgba(96, 165, 250, 0.15);
    --po-accent-violet: #a78bfa;
    --po-accent-pink: #f472b6;
    --po-primary: var(--po-accent);
    --po-primary-dark: var(--po-accent-dark);
    --po-primary-light: var(--po-accent-light);
    --po-button-primary-bg: #2563eb;
    --po-button-primary-bg-hover: #1d4ed8;
    --po-button-primary-text: #ffffff;
    
    /* Background Colors - Dark */
    --po-bg-primary: #0b1220;
    --po-bg-secondary: #0f172a;
    --po-bg-tertiary: #172033;
    --po-bg-sidebar: #111827;
    --po-bg-hover: rgba(148, 163, 184, 0.12);
    --po-bg-active: rgba(96, 165, 250, 0.16);
    --po-bg-selected: rgba(96, 165, 250, 0.22);
    --po-bg-input: #0b1020;
    --po-bg-elevated: #111827;
    --po-surface: var(--po-bg-secondary);
    --po-surface-muted: var(--po-bg-tertiary);
    --po-surface-elevated: var(--po-bg-elevated);
    --po-overlay: rgba(0, 0, 0, 0.72);
    --po-scrollbar-size: 10px;
    --po-scrollbar-thumb: rgba(96, 165, 250, 0.48);
    --po-scrollbar-thumb-hover: rgba(147, 197, 253, 0.74);
    --po-scrollbar-track: #0b1220;
    --po-scrollbar-corner: #0b1220;
    
    /* Text Colors - Dark */
    --po-text-primary: #f8fafc;
    --po-text-secondary: #cbd5e1;
    --po-text-muted: #94a3b8;
    --po-text-tertiary: #64748b;
    --po-text-light: #64748b;
    --po-text-inverse: #0f172a;
    
    /* Icon & Border - Dark */
    --po-icon-default: #94a3b8;
    --po-icon-active: #60a5fa;
    --po-border: rgba(148, 163, 184, 0.22);
    --po-border-color: var(--po-border);
    --po-border-light: rgba(148, 163, 184, 0.14);
    --po-border-dark: rgba(15, 23, 42, 0.88);
    --po-border-focus: #60a5fa;
    
    /* Shadows - Dark */
    --po-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.34);
    --po-shadow-md: 0 10px 28px rgba(0, 0, 0, 0.34);
    --po-shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(96, 165, 250, 0.07);
    --po-dialog-bg: linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
    
    /* Status Colors - Dark Mode adjusted */
    --po-success: #4ade80;
    --po-success-bg: rgba(74, 222, 128, 0.15);
    --po-warning: #fbbf24;
    --po-warning-bg: rgba(251, 191, 36, 0.15);
    --po-danger: #f87171;
    --po-danger-bg: rgba(248, 113, 113, 0.15);
    --po-info: #60a5fa;
    --po-info-bg: rgba(96, 165, 250, 0.15);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Sidebar Account Navigation - Accordion Override (EXAKT wie Svelte PWA)
   ───────────────────────────────────────────────────────────────────────────── */

.sidebar-account-nav {
    padding: 8px 0;
    font-family: var(--po-font-family);
}

/* FIX 11.02.2026: Enterprise-Spacing - klare Sektions-Trennung */
.sidebar-account-nav .frame {
    margin-bottom: 0 !important;
    padding-bottom: 4px !important;
    border: none !important;
}

.sidebar-account-nav .frame + .frame {
    margin-top: 8px !important;
    border: none !important;
}

/* ================================================================
   Section Headers - Enterprise UX Style (11.02.2026)
   Identisch mit linker Sidebar: klein, uppercase, muted
   ================================================================ */
.sidebar-account-nav .frame > .heading {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 16px !important;
    margin-top: 4px !important;
    font-family: var(--po-font-family) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--po-text-muted, #94a3b8) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    user-select: none !important;
    text-align: left !important;
}

.sidebar-account-nav .frame:first-child > .heading {
    margin-top: 0 !important;
}

.sidebar-account-nav .frame > .heading:hover {
    background: rgba(133, 182, 211, 0.12) !important;
    color: var(--po-text-secondary, #64748b) !important;
}

.sidebar-account-nav .frame > .heading i:first-child {
    width: 18px !important;
    color: var(--po-text-muted, #94a3b8) !important;
    font-size: 13px !important;
}

.sidebar-account-nav .frame > .heading:hover i:first-child {
    color: var(--po-text-secondary, #64748b) !important;
}

.sidebar-account-nav .frame > .heading span:not(.po-sidebar-internal-badge) {
    flex: 1 !important;
    font-weight: 500 !important;
}

/* Chevron Animation */
.sidebar-account-nav .frame > .heading::after {
    font-size: 0.6rem !important;
    color: var(--po-text-muted, #94a3b8) !important;
    transition: transform 0.2s ease !important;
}

.sidebar-account-nav .frame.active > .heading::after {
    transform: rotate(90deg) !important;
}

/* Section Content */
.sidebar-account-nav .frame > .content {
    padding: 0 !important;
    padding-left: 4px !important;
    border: none !important;
}

/* Nav Items - Enterprise UX (11.02.2026) */
.sidebar-account-nav .nav-item,
.sidebar-account-nav .frame .content a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 12px 7px 20px !important;
    margin: 2px 4px !important;
    font-family: var(--po-font-family) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--po-text-secondary, #475569) !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.sidebar-account-nav .nav-item:hover,
.sidebar-account-nav .frame .content a:hover {
    background: rgba(133, 182, 211, 0.15) !important;
    color: var(--po-text-primary, #1e293b) !important;
}

.sidebar-account-nav .nav-item i,
.sidebar-account-nav .frame .content a i:first-child {
    width: 16px !important;
    color: var(--po-text-muted, #94a3b8) !important;
    font-size: 13px !important;
}

.sidebar-account-nav .nav-item:hover i,
.sidebar-account-nav .frame .content a:hover i:first-child {
    color: var(--po-accent) !important;
}

/* Active State */
.sidebar-account-nav .nav-item.active,
.sidebar-account-nav .frame .content a.active {
    background: var(--po-bg-active) !important;
    color: var(--po-accent) !important;
    font-weight: 500 !important;
}

.sidebar-account-nav .nav-item.active i,
.sidebar-account-nav .frame .content a.active i:first-child {
    color: var(--po-accent) !important;
}

/* External Link Icon */
.sidebar-account-nav .frame .content a i.fa-external-link-alt {
    width: auto !important;
    font-size: 0.65rem !important;
    opacity: 0.5 !important;
    margin-left: auto !important;
}

/* Logout Button Special Style */
.sidebar-account-nav .paperoffice_account_logout {
    color: #dc2626 !important;
}

.sidebar-account-nav .paperoffice_account_logout:hover {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #dc2626 !important;
}

.sidebar-account-nav .paperoffice_account_logout i {
    color: #dc2626 !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Sidebar Welcome (nicht eingeloggt) - CTA Box Modern Style + Dark Mode
   ───────────────────────────────────────────────────────────────────────────── */

.sidebar-welcome-cta {
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sidebar-welcome-cta .cta-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--po-accent) 0%, var(--po-accent-dark) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.25);
}

.sidebar-welcome-cta .cta-icon i {
    font-size: 24px;
    color: #ffffff;
}

.sidebar-welcome-cta .cta-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 6px;
}

.sidebar-welcome-cta .cta-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin: 0 0 16px 0;
    font-weight: 500;
}

/* Dark Mode - Subtitle */
html.dark-side .sidebar-welcome-cta .cta-subtitle,
[data-theme="dark"] .sidebar-welcome-cta .cta-subtitle {
    color: #94a3b8;
}

.sidebar-welcome-cta .cta-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 22px 0;
}

.sidebar-welcome-cta .cta-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    transition: transform 0.2s ease;
}

.sidebar-welcome-cta .cta-benefits li:hover {
    transform: translateX(3px);
}

.sidebar-welcome-cta .cta-benefits li i {
    color: var(--po-accent);
    font-size: 0.9rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.sidebar-welcome-cta .cta-benefits li i.fa-bolt {
    color: #f59e0b;
}

.sidebar-welcome-cta .cta-btn-primary {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: var(--po-accent);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(91, 155, 213, 0.25);
}

.sidebar-welcome-cta .cta-btn-primary:hover {
    background: var(--po-accent-dark);
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.35);
}

.sidebar-welcome-cta .cta-btn-secondary {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px 20px;
    background: transparent;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.sidebar-welcome-cta .cta-btn-secondary:hover {
    color: var(--po-accent);
    background: rgba(91, 155, 213, 0.08);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Sidebar Welcome CTA - Dark Mode (Glassmorphism Style)
   ───────────────────────────────────────────────────────────────────────────── */

html.dark-side .sidebar-welcome-cta,
[data-theme="dark"] .sidebar-welcome-cta {
    background: #1e2530;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

html.dark-side .sidebar-welcome-cta .cta-icon,
[data-theme="dark"] .sidebar-welcome-cta .cta-icon {
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.3);
}

html.dark-side .sidebar-welcome-cta .cta-title,
[data-theme="dark"] .sidebar-welcome-cta .cta-title {
    color: #f1f5f9;
}

html.dark-side .sidebar-welcome-cta .cta-benefits li,
[data-theme="dark"] .sidebar-welcome-cta .cta-benefits li {
    color: #94a3b8;
}

html.dark-side .sidebar-welcome-cta .cta-benefits li i,
[data-theme="dark"] .sidebar-welcome-cta .cta-benefits li i {
    color: #7dd3fc;
}

html.dark-side .sidebar-welcome-cta .cta-benefits li i.fa-bolt,
[data-theme="dark"] .sidebar-welcome-cta .cta-benefits li i.fa-bolt {
    color: #fbbf24;
}

html.dark-side .sidebar-welcome-cta .cta-btn-primary,
[data-theme="dark"] .sidebar-welcome-cta .cta-btn-primary {
    box-shadow: 0 2px 8px rgba(91, 155, 213, 0.3);
}

html.dark-side .sidebar-welcome-cta .cta-btn-primary:hover,
[data-theme="dark"] .sidebar-welcome-cta .cta-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(91, 155, 213, 0.4);
}

html.dark-side .sidebar-welcome-cta .cta-btn-secondary,
[data-theme="dark"] .sidebar-welcome-cta .cta-btn-secondary {
    color: #64748b;
}

html.dark-side .sidebar-welcome-cta .cta-btn-secondary:hover,
[data-theme="dark"] .sidebar-welcome-cta .cta-btn-secondary:hover {
    color: #7dd3fc;
    background: rgba(91, 155, 213, 0.12);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Sidebar Left Navigation - Modern Design (wie neue PWA)
   ───────────────────────────────────────────────────────────────────────────── */

.sidebar-left-nav {
    padding: 8px 0;
}

/* FIX 11.02.2026: Enterprise-Spacing - klare Sektions-Trennung */
.sidebar-left-nav .frame {
    margin-bottom: 0 !important;
    padding-bottom: 4px !important;
    border: none !important;
}

.sidebar-left-nav .frame + .frame {
    margin-top: 8px !important;
    border: none !important;
}

/* ================================================================
   Section Headers - Enterprise UX Style (11.02.2026)
   Kleinere, gemutete, uppercase Labels als Sektions-Trenner.
   Sub-Items sind die primaeren interaktiven Elemente.
   ================================================================ */
.sidebar-left-nav .frame > .heading,
.po-sidebar-toggle-frame > .heading {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 16px !important;
    margin-top: 4px !important;
    font-family: var(--po-font-family) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--po-text-muted, #94a3b8) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    user-select: none !important;
    text-align: left !important;
}

.sidebar-left-nav .frame:first-child > .heading,
.po-sidebar-toggle-frame > .heading {
    margin-top: 0 !important;
}

.sidebar-left-nav .frame > .heading:hover,
.po-sidebar-toggle-frame > .heading:hover {
    background: rgba(133, 182, 211, 0.12) !important;
    color: var(--po-text-secondary, #64748b) !important;
}

.sidebar-left-nav .frame > .heading i:first-child,
.po-sidebar-toggle-frame > .heading i:first-child {
    width: 18px !important;
    color: var(--po-text-muted, #94a3b8) !important;
    font-size: 13px !important;
}

.sidebar-left-nav .frame > .heading:hover i:first-child,
.po-sidebar-toggle-frame > .heading:hover i:first-child {
    color: var(--po-text-secondary, #64748b) !important;
}

.sidebar-left-nav .frame > .heading span:not(.po-sidebar-internal-badge),
.po-sidebar-toggle-frame > .heading span:not(.po-sidebar-internal-badge) {
    flex: 1 !important;
    font-weight: 500 !important;
}

/* Toggle-Frame hat keinen Collapse-Chevron (faltet nichts auf, sondern
   schaltet die ganze Sidebar um). Das accordion::after Pseudo-Element aus
   Metro UI wird hier unterdrueckt, ebenso das per JS injizierte
   .po-sidebar-chevron <i>-Element (sidebar_left.htm fuegt es in ALLE
   .sidebar-left-nav .frame > .heading ein - auch unseren Toggle). */
.po-sidebar-toggle-frame > .heading::after {
    display: none !important;
    content: none !important;
}
.po-sidebar-toggle-frame > .heading > .po-sidebar-chevron {
    display: none !important;
}

/* ----------------------------------------------------------------------
   Toggle-Icon IMMER sichtbar (in BEIDEN States: expanded + collapsed).
   
   Hintergrund: sidebar_left.htm + sidebar_right.htm (cockpit) bringen je
   eine interne Style-Regel mit, die alle Heading-Icons im EXPANDED state
   per "display: none !important" versteckt - damit die Section-Labels
   ("DOCUMENT AI", "MEIN PAPEROFFICE AI" etc.) als reine Text-Headings ohne
   Icon erscheinen. Im collapsed (Rail-)state werden Icons wieder eingeblendet.
   
   Fuer den Toggle ist das genau falsch rum: Der Toggle zeigt KEINEN Text
   (span ist visibility:hidden), nur das Panel-Icon - in BEIDEN States.
   
   Dreifache Selektor-Angabe:
     - .sidebar-left-nav scope (links)
     - .sidebar-account-nav scope (rechts cockpit)
     - unscoped fallback (rechte Sidebar-Varianten ohne Scope, z.B. 
       workflow-designer)
   
   Spezifitaet der scoped-Regel ist (0,5,2) > die native (0,4,3)
   Verstecker-Regel aus sidebar_{left,right}.htm.
---------------------------------------------------------------------- */
.sidebar-left-nav .po-sidebar-toggle-frame > .heading > i:first-child,
.sidebar-account-nav .po-sidebar-toggle-frame > .heading > i:first-child,
.po-sidebar-toggle-frame > .heading > i:first-child {
    display: inline-flex !important;
}

/* ----------------------------------------------------------------------
   Toggle-Frame OHNE Hover-Effekt (22.04.2026 v6).
   
   Die Heading-Styles aus sidebar_{left,right}.htm liefern Hover-Regeln
   (background, border-radius, color) mit Spezifitaet (0,4,1). Damit unser
   Override zuverlaessig gewinnt - unabhaengig davon ob core.css vor oder
   nach den sidebar_*.htm-<style>-Bloecken im DOM steht - nutzen wir einen
   ID-Selektor (#top_menu_sidebar_{left,right}_wrapper, Spezifitaet (1,3,1)).
   
   Ergebnis: Kein Background-Flash, keine Color-Aenderung, kein Border-Radius
   - der Toggle fuehlt sich statisch an (Click bleibt funktional, Cursor:
   pointer kommt vom .heading:cursor aus sidebar_*.htm).
---------------------------------------------------------------------- */
#top_menu_sidebar_left_wrapper .po-sidebar-toggle-frame > .heading:hover,
#top_menu_sidebar_right_wrapper .po-sidebar-toggle-frame > .heading:hover {
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    color: inherit !important;
}

#top_menu_sidebar_left_wrapper .po-sidebar-toggle-frame > .heading:hover > i:first-child,
#top_menu_sidebar_right_wrapper .po-sidebar-toggle-frame > .heading:hover > i:first-child {
    color: var(--po-text-muted, #94a3b8) !important;
}

/* ----------------------------------------------------------------------
   Toggle-Frame NUR im collapsed (Rail-)state sichtbar (22.04.2026 v7).
   
   Im expanded state ist der Toggle redundant - die Sidebar ist bereits
   offen und kann per Click-Outside kollabiert werden. Darum hier komplett
   per display:none ausblenden, damit die Section-Headings unmittelbar an
   den Logo-Header anschliessen (keine Luecke, kein Platzhalter).
   
   Spezifitaet (1,2,0) via #top_menu_sidebar_{left,right}_wrapper schlaegt
   alle Layout-Regeln aus sidebar_{left,right}.htm.
---------------------------------------------------------------------- */
#top_menu_sidebar_left_wrapper.sidebar-expanded .po-sidebar-toggle-frame,
#top_menu_sidebar_right_wrapper.sidebar-expanded .po-sidebar-toggle-frame {
    display: none !important;
}

/* Chevron Animation */
.sidebar-left-nav .frame > .heading::after {
    font-size: 0.6rem !important;
    color: var(--po-text-muted, #94a3b8) !important;
    transition: transform 0.2s ease !important;
}

.sidebar-left-nav .frame.active > .heading::after {
    transform: rotate(90deg) !important;
}

/* Section Content */
.sidebar-left-nav .frame > .content {
    padding: 0 !important;
    border: none !important;
}

/* Collapse Trigger (Sub-Sections) - Enterprise UX (11.02.2026) */
.sidebar-left-nav .collapse-trigger {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 12px 7px 20px !important;
    margin: 2px 4px !important;
    font-family: var(--po-font-family) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--po-text-secondary, #475569) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    text-align: left !important;
    width: calc(100% - 8px) !important;
}

.sidebar-left-nav .collapse-trigger:hover {
    background: rgba(133, 182, 211, 0.2) !important;
    color: var(--po-text-primary) !important;
}

.sidebar-left-nav .collapse-trigger.active {
    background: rgba(91, 155, 213, 0.15) !important;
    color: var(--po-accent) !important;
}

.sidebar-left-nav .collapse-trigger i {
    width: 18px !important;
    color: var(--po-icon-default) !important;
    font-size: 0.9rem !important;
}

.sidebar-left-nav .collapse-trigger:hover i,
.sidebar-left-nav .collapse-trigger.active i {
    color: var(--po-accent) !important;
}

/* Nav Items - Enterprise UX (11.02.2026)
   Kompakt, eingerückt unter Section-Header, kleinere Icons */
.sidebar-left-nav .nav-item,
.sidebar-left-nav .frame .content > div > a,
.sidebar-left-nav .collapse-content a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 12px 7px 20px !important;
    margin: 2px 4px !important;
    font-family: var(--po-font-family) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--po-text-secondary, #475569) !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.4 !important;
}

.sidebar-left-nav .nav-item:hover,
.sidebar-left-nav .frame .content > div > a:hover,
.sidebar-left-nav .collapse-content a:hover {
    background: rgba(133, 182, 211, 0.15) !important;
    color: var(--po-text-primary, #1e293b) !important;
}

.sidebar-left-nav .nav-item i:first-child,
.sidebar-left-nav .frame .content > div > a i:first-child,
.sidebar-left-nav .collapse-content a i:first-child {
    width: 16px !important;
    color: var(--po-text-muted, #94a3b8) !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
}

.sidebar-left-nav .nav-item:hover i:first-child,
.sidebar-left-nav .frame .content > div > a:hover i:first-child,
.sidebar-left-nav .collapse-content a:hover i:first-child {
    color: var(--po-accent) !important;
}

/* Active State */
.sidebar-left-nav .nav-item.sidebar-active,
.sidebar-left-nav .frame .content > div > a.sidebar-active,
.sidebar-left-nav .collapse-content a.sidebar-active {
    background: var(--po-bg-active) !important;
    color: var(--po-accent) !important;
    font-weight: 500 !important;
}

.sidebar-left-nav .nav-item.sidebar-active i:first-child,
.sidebar-left-nav .frame .content > div > a.sidebar-active i:first-child,
.sidebar-left-nav .collapse-content a.sidebar-active i:first-child {
    color: var(--po-accent) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR RIGHT (PaperOffice Account) - Active States
   ═══════════════════════════════════════════════════════════════════════════ */
#top_menu_sidebar_right_content a.sidebar-active,
.sidebar-account-nav .frame .content a.sidebar-active {
    background: var(--po-bg-active) !important;
    color: var(--po-accent) !important;
    font-weight: 500 !important;
    border-radius: 4px;
}

#top_menu_sidebar_right_content a.sidebar-active i:first-child,
.sidebar-account-nav .frame .content a.sidebar-active i:first-child {
    color: var(--po-accent) !important;
}

/* Badges in Left Sidebar */
.sidebar-left-nav .badge {
    min-width: 20px !important;
    height: 20px !important;
    font-size: 10px !important;
    line-height: 20px !important;
    padding: 0 6px !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    flex-shrink: 0 !important;
}

/* Section Labels (Security Tier, AI Features) */
.sidebar-left-nav .collapse-content > div[style*="text-transform: uppercase"] {
    font-size: 0.65rem !important;
    font-weight: 500 !important;
    color: var(--po-text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px 4px 40px !important;
    margin: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DARK MODE FIXES - GitHub Issues #1-#23
   Hinzugefügt: 12.01.2026
   ═══════════════════════════════════════════════════════════════════════════════ */

/* --- DATATABLE DARK MODE (Issue #1, #7, #19, #20) --- */
html.dark-side .table,
html.dark-side table,
[data-theme="dark"] .table,
[data-theme="dark"] table {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
}

html.dark-side .table thead th,
html.dark-side table thead th,
[data-theme="dark"] .table thead th,
[data-theme="dark"] table thead th {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border-color) !important;
}

html.dark-side .table tbody tr,
html.dark-side table tbody tr,
[data-theme="dark"] .table tbody tr,
[data-theme="dark"] table tbody tr {
    background: var(--po-bg-secondary) !important;
    border-color: var(--po-border-color) !important;
}

html.dark-side .table tbody tr:hover,
html.dark-side table tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover,
[data-theme="dark"] table tbody tr:hover {
    background: var(--po-bg-tertiary) !important;
}

html.dark-side .table td,
html.dark-side .table th,
html.dark-side table td,
html.dark-side table th,
[data-theme="dark"] .table td,
[data-theme="dark"] .table th,
[data-theme="dark"] table td,
[data-theme="dark"] table th {
    border-color: var(--po-border-color) !important;
    color: var(--po-text-primary) !important;
}

/* Datatable Wrapper & Controls */
html.dark-side .dataTables_wrapper,
[data-theme="dark"] .dataTables_wrapper {
    color: var(--po-text-primary) !important;
}

html.dark-side .dataTables_wrapper .dataTables_length,
html.dark-side .dataTables_wrapper .dataTables_filter,
html.dark-side .dataTables_wrapper .dataTables_info,
[data-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-theme="dark"] .dataTables_wrapper .dataTables_info {
    color: var(--po-text-secondary) !important;
}

/* Datatable Pagination (Issue #19, #20) */
html.dark-side .dataTables_wrapper .dataTables_paginate .paginate_button,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border-color) !important;
}

html.dark-side .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--po-bg-active) !important;
    color: var(--po-accent) !important;
    border-color: var(--po-accent) !important;
}

html.dark-side .dataTables_wrapper .dataTables_paginate .paginate_button.current,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--po-accent) !important;
    color: #fff !important;
    border-color: var(--po-accent) !important;
}

html.dark-side .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: var(--po-text-muted) !important;
    opacity: 0.5;
}

/* --- SELECT / DROPDOWN DARK MODE (Issue #3, #16, #17, #18) --- */
/* DEAKTIVIERT: Zu breiter Selektor verursacht unerwuenschte Styles bei speziellen Elementen wie #poui_username_style_select */
html.dark-side select,
html.dark-side .select,
html.dark-side input[type="text"],
html.dark-side input[type="search"],
html.dark-side input[type="email"],
html.dark-side input[type="password"],
html.dark-side input[type="number"],
html.dark-side textarea,
[data-theme="dark"] select,
[data-theme="dark"] .select,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea {
    /* background: var(--po-bg-tertiary) !important; */
    /* color: var(--po-text-primary) !important; */
    /* border-color: var(--po-border-color) !important; */
}

html.dark-side select option,
[data-theme="dark"] select option {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
}

/* Metro UI Select */
html.dark-side .select .button-group,
html.dark-side .select .select-input,
[data-theme="dark"] .select .button-group,
[data-theme="dark"] .select .select-input {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border-color) !important;
}

html.dark-side .select .drop-container,
html.dark-side .select ul,
[data-theme="dark"] .select .drop-container,
[data-theme="dark"] .select ul {
    background: var(--po-bg-secondary) !important;
    border-color: var(--po-border-color) !important;
}

html.dark-side .select li,
html.dark-side .select li a,
[data-theme="dark"] .select li,
[data-theme="dark"] .select li a {
    color: var(--po-text-primary) !important;
}

html.dark-side .select li:hover,
html.dark-side .select li a:hover,
[data-theme="dark"] .select li:hover,
[data-theme="dark"] .select li a:hover {
    background: var(--po-bg-active) !important;
}

/* --- SEARCHBOX DARK MODE (Issue #7, #8, #9) --- */
html.dark-side .search-block input,
html.dark-side input.search,
html.dark-side .input-search,
[data-theme="dark"] .search-block input,
[data-theme="dark"] input.search,
[data-theme="dark"] .input-search {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border-color) !important;
}

html.dark-side .search-block input::placeholder,
html.dark-side input.search::placeholder,
[data-theme="dark"] .search-block input::placeholder,
[data-theme="dark"] input.search::placeholder {
    color: var(--po-text-muted) !important;
}

/* --- TABS DARK MODE (Issue #16, #23) --- */
html.dark-side .tabs,
html.dark-side .tabs-material,
html.dark-side .tab-content,
[data-theme="dark"] .tabs,
[data-theme="dark"] .tabs-material,
[data-theme="dark"] .tab-content {
    background: var(--po-bg-secondary) !important;
}

html.dark-side .tabs ul li,
html.dark-side .tabs-material ul li,
[data-theme="dark"] .tabs ul li,
[data-theme="dark"] .tabs-material ul li {
    background: transparent !important;
}

html.dark-side .tabs ul li a,
html.dark-side .tabs-material ul li a,
[data-theme="dark"] .tabs ul li a,
[data-theme="dark"] .tabs-material ul li a {
    color: var(--po-text-secondary) !important;
    background: transparent !important;
}

html.dark-side .tabs ul li.active a,
html.dark-side .tabs-material ul li.active a,
[data-theme="dark"] .tabs ul li.active a,
[data-theme="dark"] .tabs-material ul li.active a {
    color: var(--po-accent) !important;
    background: var(--po-bg-tertiary) !important;
}

/* --- SPELL CHECK UNDERLINE ENTFERNEN (Issue #19, #21) --- */
html.dark-side [spellcheck="false"],
html.dark-side input,
html.dark-side textarea,
html.dark-side [contenteditable],
[data-theme="dark"] [spellcheck="false"],
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] [contenteditable] {
    -webkit-text-decoration-skip-ink: none;
}

/* Spellcheck komplett deaktivieren für bestimmte Elemente */
.no-spellcheck,
[data-no-spellcheck] {
    -webkit-text-decoration: none !important;
    text-decoration: none !important;
}

/* --- CHART DARK MODE (Issue #6) --- */
html.dark-side .chart-container,
html.dark-side canvas,
[data-theme="dark"] .chart-container,
[data-theme="dark"] canvas {
    color: var(--po-text-primary) !important;
}

/* --- FORM ELEMENTS ALLGEMEIN --- */
html.dark-side .form-group label,
html.dark-side label,
[data-theme="dark"] .form-group label,
[data-theme="dark"] label {
    color: var(--po-text-primary) !important;
}

html.dark-side .input,
html.dark-side .textarea,
[data-theme="dark"] .input,
[data-theme="dark"] .textarea {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border-color) !important;
}

/* --- DIALOG/MODAL DARK MODE --- */
html.dark-side .dialog,
html.dark-side .window,
html.dark-side .modal-content,
[data-theme="dark"] .dialog,
[data-theme="dark"] .window,
[data-theme="dark"] .modal-content {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border-color) !important;
}

html.dark-side .dialog-title,
html.dark-side .window-caption,
[data-theme="dark"] .dialog-title,
[data-theme="dark"] .window-caption {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
}

/* --- BUTTONS DARK MODE FIX --- */
html.dark-side .button.light,
html.dark-side button.light,
[data-theme="dark"] .button.light,
[data-theme="dark"] button.light {
    color: var(--po-text-primary) !important;
    border-color: var(--po-border-color) !important;
}

/* --- CARDS DARK MODE --- */
html.dark-side .card,
html.dark-side .tile,
[data-theme="dark"] .card,
[data-theme="dark"] .tile {
    background: var(--po-bg-secondary) !important;
    border-color: var(--po-border-color) !important;
}

html.dark-side .card-header,
[data-theme="dark"] .card-header {
    background: var(--po-bg-tertiary) !important;
    border-color: var(--po-border-color) !important;
}

/* --- CONTENT AREAS & PANELS DARK MODE --- */
html.dark-side .panel,
html.dark-side .content-box,
html.dark-side .info-box,
html.dark-side .empty-state,
html.dark-side [class*="content-"],
html.dark-side [class*="box-"],
html.dark-side .rounded-box,
html.dark-side .shadow-box,
[data-theme="dark"] .panel,
[data-theme="dark"] .content-box,
[data-theme="dark"] .info-box,
[data-theme="dark"] .empty-state,
[data-theme="dark"] [class*="content-"],
[data-theme="dark"] [class*="box-"],
[data-theme="dark"] .rounded-box,
[data-theme="dark"] .shadow-box {
    /* background entfernt - verhindert unerwuenschte Hintergruende bei content-title etc. */
    color: var(--po-text-primary) !important;
    border-color: var(--po-border-color) !important;
}

/* Main Content Area */
html.dark-side .main-content,
html.dark-side .page-content,
html.dark-side #content,
html.dark-side .content,
html.dark-side main,
[data-theme="dark"] .main-content,
[data-theme="dark"] .page-content,
[data-theme="dark"] #content,
[data-theme="dark"] .content,
[data-theme="dark"] main {
    background: var(--po-bg-primary) !important;
}

/* Grid/AG-Grid Container */
html.dark-side .ag-root-wrapper,
html.dark-side .ag-theme-alpine,
html.dark-side .ag-theme-balham,
html.dark-side [class*="ag-"],
[data-theme="dark"] .ag-root-wrapper,
[data-theme="dark"] .ag-theme-alpine,
[data-theme="dark"] .ag-theme-balham,
[data-theme="dark"] [class*="ag-"] {
    --ag-background-color: var(--po-bg-secondary) !important;
    --ag-header-background-color: var(--po-bg-tertiary) !important;
    --ag-odd-row-background-color: var(--po-bg-secondary) !important;
    --ag-row-hover-color: var(--po-bg-tertiary) !important;
    --ag-foreground-color: var(--po-text-primary) !important;
    --ag-border-color: var(--po-border-color) !important;
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
}

/* Spezifisch für leere Tabellen */
html.dark-side .no-data,
html.dark-side .empty-table,
html.dark-side .no-results,
html.dark-side [class*="empty"],
[data-theme="dark"] .no-data,
[data-theme="dark"] .empty-table,
[data-theme="dark"] .no-results,
[data-theme="dark"] [class*="empty"] {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-secondary) !important;
}

/* Tipps/Info Boxen */
html.dark-side .tips-box,
html.dark-side .hint-box,
html.dark-side .info-panel,
[data-theme="dark"] .tips-box,
[data-theme="dark"] .hint-box,
[data-theme="dark"] .info-panel {
    background: var(--po-bg-tertiary) !important;
    border-color: var(--po-border-color) !important;
    color: var(--po-text-secondary) !important;
}

/* Upload/Drop Area */
html.dark-side .drop-area,
html.dark-side .upload-area,
html.dark-side .dropzone,
html.dark-side [class*="upload"],
html.dark-side [class*="drop-"],
[data-theme="dark"] .drop-area,
[data-theme="dark"] .upload-area,
[data-theme="dark"] .dropzone,
[data-theme="dark"] [class*="upload"],
[data-theme="dark"] [class*="drop-"] {
    background: var(--po-bg-tertiary) !important;
    border-color: var(--po-border-color) !important;
    color: var(--po-text-primary) !important;
}

/* White Background Override - Wichtig! */
html.dark-side [style*="background: white"],
html.dark-side [style*="background:#fff"],
html.dark-side [style*="background: #fff"],
html.dark-side [style*="background-color: white"],
html.dark-side [style*="background-color:#fff"],
html.dark-side [style*="background-color: #fff"],
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background-color: #fff"] {
    background: var(--po-bg-secondary) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DARK MODE FIXES R260117 - GitHub Issues #2,#4,#6,#7,#8,#9,#10,#19,#22,#23,#68
   ═══════════════════════════════════════════════════════════════════════════════ */

/* --- Issue #2: API Keys - Modal UI Overflow Fix --- */
html.dark-side .dialog,
html.dark-side .modal,
html.dark-side [data-role="dialog"],
[data-theme="dark"] .dialog,
[data-theme="dark"] .modal,
[data-theme="dark"] [data-role="dialog"] {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

html.dark-side .dialog .dialog-content,
html.dark-side .modal .modal-content,
[data-theme="dark"] .dialog .dialog-content,
[data-theme="dark"] .modal .modal-content {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
    overflow: visible !important;
}

/* --- Issue #4: Users Management Badge Fix --- */
html.dark-side .badge,
html.dark-side .tag,
html.dark-side span[class*="badge"],
[data-theme="dark"] .badge,
[data-theme="dark"] .tag,
[data-theme="dark"] span[class*="badge"] {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

/* --- Issue #6: Partner Dashboard - Chart.js Tooltip Blackbox Fix --- */
html.dark-side .chartjs-tooltip,
html.dark-side .chart-tooltip,
html.dark-side [id*="chartjs"],
html.dark-side canvas + div,
[data-theme="dark"] .chartjs-tooltip,
[data-theme="dark"] .chart-tooltip,
[data-theme="dark"] [id*="chartjs"],
[data-theme="dark"] canvas + div {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border: 1px solid var(--po-border) !important;
    border-radius: 4px !important;
}

/* Chart Grid Lines */
html.dark-side .chart-container canvas,
[data-theme="dark"] .chart-container canvas {
    filter: none !important;
}

/* --- Issue #7, #8, #9: Searchbox Internal Color Fix --- */
html.dark-side input[type="search"],
html.dark-side input[type="text"],
html.dark-side input.search-input,
html.dark-side .search-input,
html.dark-side .input-search,
html.dark-side [data-role="input"],
html.dark-side .input,
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input.search-input,
[data-theme="dark"] .search-input,
[data-theme="dark"] .input-search,
[data-theme="dark"] [data-role="input"],
[data-theme="dark"] .input {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side input::placeholder,
[data-theme="dark"] input::placeholder {
    color: var(--po-text-muted) !important;
}

/* Metro UI Input Wrapper */
html.dark-side .input-control,
html.dark-side .input-control input,
html.dark-side .input-control textarea,
[data-theme="dark"] .input-control,
[data-theme="dark"] .input-control input,
[data-theme="dark"] .input-control textarea {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

/* --- Issue #10: Document View - OCR Bereiche Overflow Fix --- */
html.dark-side .ocr-areas,
html.dark-side .ocr-sidebar,
html.dark-side [class*="ocr-"],
[data-theme="dark"] .ocr-areas,
[data-theme="dark"] .ocr-sidebar,
[data-theme="dark"] [class*="ocr-"] {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
    max-height: calc(100vh - 200px) !important;
    overflow-y: auto !important;
}

/* Document Menu Options */
html.dark-side .document-menu,
html.dark-side .doc-menu,
html.dark-side .toolbar,
[data-theme="dark"] .document-menu,
[data-theme="dark"] .doc-menu,
[data-theme="dark"] .toolbar {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

/* --- Issue #19: AI Agents - Spell Check Underline Remove --- */
html.dark-side textarea,
html.dark-side [contenteditable],
[data-theme="dark"] textarea,
[data-theme="dark"] [contenteditable] {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

/* Datatable Per-Page Select Fix */
html.dark-side .dataTables_length select,
html.dark-side select.dt-input,
html.dark-side .dt-length select,
[data-theme="dark"] .dataTables_length select,
[data-theme="dark"] select.dt-input,
[data-theme="dark"] .dt-length select {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

/* --- Issue #22: Double Tooltip Fix --- */
html.dark-side [title]:not([data-tooltip-disabled])::after,
[data-theme="dark"] [title]:not([data-tooltip-disabled])::after {
    display: none !important;
}

html.dark-side .tooltip,
html.dark-side [data-role="hint"],
html.dark-side .hint,
[data-theme="dark"] .tooltip,
[data-theme="dark"] [data-role="hint"],
[data-theme="dark"] .hint {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border: 1px solid var(--po-border) !important;
}

/* --- Issue #23: Neues Dokument Modal - Tabs & Forms --- */
html.dark-side .tabs-content,
html.dark-side .tab-content,
html.dark-side .tabcontrol .tabs,
html.dark-side .nav-tabs,
[data-theme="dark"] .tabs-content,
[data-theme="dark"] .tab-content,
[data-theme="dark"] .tabcontrol .tabs,
[data-theme="dark"] .nav-tabs {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
}

html.dark-side .tab-pane,
html.dark-side .tabcontrol .tab-pane,
[data-theme="dark"] .tab-pane,
[data-theme="dark"] .tabcontrol .tab-pane {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
}

/* Info Boxes in Dark Mode */
html.dark-side .info-box,
html.dark-side .alert-info,
html.dark-side .notice,
html.dark-side [class*="info-"],
[data-theme="dark"] .info-box,
[data-theme="dark"] .alert-info,
[data-theme="dark"] .notice,
[data-theme="dark"] [class*="info-"] {
    color: var(--po-text-primary) !important;
    border-color: var(--po-info) !important;
}

/* Modal Close Button Fix - Make sure it's always visible */
html.dark-side .dialog-actions,
html.dark-side .modal-actions,
html.dark-side .dialog .button,
html.dark-side .modal .button,
[data-theme="dark"] .dialog-actions,
[data-theme="dark"] .modal-actions,
[data-theme="dark"] .dialog .button,
[data-theme="dark"] .modal .button {
    position: relative !important;
    z-index: 10 !important;
}

/* Ensure modal scrolls properly */
html.dark-side .dialog-content,
html.dark-side .modal-body,
[data-theme="dark"] .dialog-content,
[data-theme="dark"] .modal-body {
    max-height: 70vh !important;
    overflow-y: auto !important;
}

/* --- Issue #68: AI Creator Profilbild Input Layout Fix --- */
html.dark-side .form-group,
html.dark-side .input-group,
html.dark-side .avatar-input,
[data-theme="dark"] .form-group,
[data-theme="dark"] .input-group,
[data-theme="dark"] .avatar-input {
    position: relative !important;
}

html.dark-side .form-group .input-clear,
html.dark-side .input-group .btn-clear,
html.dark-side .input-control .button,
[data-theme="dark"] .form-group .input-clear,
[data-theme="dark"] .input-group .btn-clear,
[data-theme="dark"] .input-control .button {
    right: 8px !important;
    z-index: 5 !important;
}

/* Button positioning fix */
html.dark-side .input-control .button.input-clear-button,
[data-theme="dark"] .input-control .button.input-clear-button {
    position: absolute !important;
    right: 40px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* --- General Dark Mode Select Fix --- */
html.dark-side select,
html.dark-side .select,
html.dark-side [data-role="select"],
[data-theme="dark"] select,
[data-theme="dark"] .select,
[data-theme="dark"] [data-role="select"] {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side select option,
html.dark-side .select .option-list,
html.dark-side .select .option-list li,
[data-theme="dark"] select option,
[data-theme="dark"] .select .option-list,
[data-theme="dark"] .select .option-list li {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
}

html.dark-side .select .option-list li:hover,
[data-theme="dark"] .select .option-list li:hover {
    background: var(--po-bg-hover) !important;
}

/* --- General White Border Override --- */
html.dark-side [style*="border: 1px solid white"],
html.dark-side [style*="border:1px solid white"],
html.dark-side [style*="border-color: white"],
html.dark-side [style*="border-color:#fff"],
[data-theme="dark"] [style*="border: 1px solid white"],
[data-theme="dark"] [style*="border:1px solid white"],
[data-theme="dark"] [style*="border-color: white"],
[data-theme="dark"] [style*="border-color:#fff"] {
    border-color: var(--po-border) !important;
}
/* ═══════════════════════════════════════════════════════════════════════════════
   TABULATOR TABLE - DARK MODE COMPREHENSIVE FIX (Issue #7: White Borders)
   Added R260117 Double-Check
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Tabulator Header */
html.dark-side .tabulator .tabulator-header,
html.dark-side .tabulator-header,
[data-theme="dark"] .tabulator .tabulator-header,
[data-theme="dark"] .tabulator-header {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side .tabulator .tabulator-col,
html.dark-side .tabulator-col,
[data-theme="dark"] .tabulator .tabulator-col,
[data-theme="dark"] .tabulator-col {
    background: var(--po-bg-secondary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side .tabulator .tabulator-col-content,
[data-theme="dark"] .tabulator .tabulator-col-content {
    color: var(--po-text-primary) !important;
}

/* Tabulator Body Rows */
html.dark-side .tabulator .tabulator-row,
html.dark-side .tabulator-row,
[data-theme="dark"] .tabulator .tabulator-row,
[data-theme="dark"] .tabulator-row {
    background: var(--po-bg-primary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side .tabulator .tabulator-row:nth-child(even),
[data-theme="dark"] .tabulator .tabulator-row:nth-child(even) {
    background: var(--po-bg-secondary) !important;
}

html.dark-side .tabulator .tabulator-row:hover,
[data-theme="dark"] .tabulator .tabulator-row:hover {
    background: var(--po-bg-hover) !important;
}

/* Tabulator Cells */
html.dark-side .tabulator .tabulator-cell,
html.dark-side .tabulator-cell,
[data-theme="dark"] .tabulator .tabulator-cell,
[data-theme="dark"] .tabulator-cell {
    border-color: var(--po-border) !important;
    color: var(--po-text-primary) !important;
}

/* Tabulator Footer/Pagination */
html.dark-side .tabulator .tabulator-footer,
html.dark-side .tabulator-footer,
[data-theme="dark"] .tabulator .tabulator-footer,
[data-theme="dark"] .tabulator-footer {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side .tabulator .tabulator-page,
[data-theme="dark"] .tabulator .tabulator-page {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side .tabulator .tabulator-page.active,
[data-theme="dark"] .tabulator .tabulator-page.active {
    background: var(--po-accent) !important;
    color: #fff !important;
}

/* Tabulator Search/Filter Input */
html.dark-side .tabulator .tabulator-header-filter input,
[data-theme="dark"] .tabulator .tabulator-header-filter input {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

/* Global Tabulator Border Fix */
html.dark-side .tabulator,
[data-theme="dark"] .tabulator {
    border-color: var(--po-border) !important;
    background: var(--po-bg-primary) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DATATABLES (jQuery) - DARK MODE FIX
   ═══════════════════════════════════════════════════════════════════════════════ */

html.dark-side .dataTables_wrapper,
html.dark-side table.dataTable,
[data-theme="dark"] .dataTables_wrapper,
[data-theme="dark"] table.dataTable {
    background: var(--po-bg-primary) !important;
    color: var(--po-text-primary) !important;
}

html.dark-side .dataTables_wrapper thead th,
html.dark-side table.dataTable thead th,
[data-theme="dark"] .dataTables_wrapper thead th,
[data-theme="dark"] table.dataTable thead th {
    background: var(--po-bg-secondary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side .dataTables_wrapper tbody tr,
[data-theme="dark"] .dataTables_wrapper tbody tr {
    background: var(--po-bg-primary) !important;
    color: var(--po-text-primary) !important;
}

html.dark-side .dataTables_wrapper tbody tr:nth-child(even),
[data-theme="dark"] .dataTables_wrapper tbody tr:nth-child(even) {
    background: var(--po-bg-secondary) !important;
}

html.dark-side .dataTables_wrapper tbody td,
[data-theme="dark"] .dataTables_wrapper tbody td {
    border-color: var(--po-border) !important;
}

html.dark-side .dataTables_filter input,
html.dark-side .dataTables_length select,
[data-theme="dark"] .dataTables_filter input,
[data-theme="dark"] .dataTables_length select {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side .dataTables_paginate .paginate_button,
[data-theme="dark"] .dataTables_paginate .paginate_button {
    background: var(--po-bg-tertiary) !important;
    color: var(--po-text-primary) !important;
    border-color: var(--po-border) !important;
}

html.dark-side .dataTables_paginate .paginate_button.current,
[data-theme="dark"] .dataTables_paginate .paginate_button.current {
    background: var(--po-accent) !important;
    color: #fff !important;
}

/* Toast-Meldungen muessen UEBER Modal-Dialogen (z-index:1100) liegen */
.toast {
    z-index: 15000 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIX 01.04.2026: Safety-Net fuer POUI Upload Dialog
   Diese Elemente werden per JS nach document.body verschoben und ueberleben
   SPA-Navigation. Ohne globale Styles werden sie sichtbar sobald die
   Section-spezifischen Inline-Styles bei Page-Wechsel entfernt werden.
   ═══════════════════════════════════════════════════════════════════════════ */
#poui_upload_dialog_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
#poui_upload_dialog_overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
#poui_upload_dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#poui_upload_dialog.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translate(-50%, -50%) scale(1) !important;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GUEST-MODE (23.04.2026)
   Wenn body.po-guest-mode gesetzt ist, werden sämtliche App-Shell-Elemente
   ausgeblendet (linke/rechte Sidebar, Such-Container). Nur Login-, Register-,
   Activate- und externe Public-Link-Seiten sind sichtbar.
   Die Sichtbarkeit wird zentral in core.odr.js::update_page_content()
   über die Body-Klasse gesteuert.
   ═══════════════════════════════════════════════════════════════════════════ */

body.po-guest-mode #top_menu_sidebar_left_wrapper,
body.po-guest-mode #top_menu_sidebar_right_wrapper,
body.po-guest-mode #search-container,
body.po-guest-mode #top_menu_sidebar_left,
body.po-guest-mode #top_menu_sidebar_right {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
}

body.po-guest-mode #paperoffice_ai_suite_wrapper_content_main_wrapper {
    border-radius: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    background-color: transparent !important;
}

body.po-guest-mode #paperoffice_ai_suite_wrapper_content_bottom_progress,
body.po-guest-mode #paperoffice_ai_suite_wrapper_content_bottom_main {
    display: none !important;
}

/* Top-Menu-Row (nav) komplett entfernen im Guest-Mode, sonst reserviert der
   <nav> mit min-height:75px vertikalen Platz (→ 71px Overflow unter der
   Login-Karte). Selektor: erstes .row im grid.condensed unterhalb des
   Suite-Wrappers.                                              23.04.2026 */
body.po-guest-mode #paperoffice_ai_suite_wrapper > .row > .cell > .grid.condensed > .row:first-child {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

/* Bottom-Row (Footer/Progress) auch ausblenden — sie sitzt innerhalb der
   inneren grid.condensed (unter dem Content-Wrapper-Cell).     23.04.2026 */
body.po-guest-mode #paperoffice_ai_suite_wrapper_content_main_wrapper_cell > .grid.condensed > .row:last-child {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}


/* ==========================================================================
   PaperOffice Metro Hint Theme – globale Übernahme von pohint → Metro Hint.
   24.04.2026 – Ersetzt die bisherige Tippy/pohint-Darstellung durch das
   ruhige Metro-Hint-Darstellung als präziser Enterprise-Micro-Hint.
   ========================================================================== */

/* Globale CSS-Variablen überschreiben (Metro nutzt diese für Hints).  */
:root,
html,
body {
    --hint-background: #273142;
    --hint-color: #f8fafc;
    --hint-border-color: rgba(148, 163, 184, 0.18);
}

/* Basis-Styling aller Metro Hints (auch ohne Zusatzklasse).            */
.hint {
    background-color: #273142 !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    font-family: var(--po-font-family) !important;
    font-size: 12px !important;
    font-weight: 500;
    font-synthesis: none;
    line-height: 1.35;
    padding: 8px 11px !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.20) !important;
    letter-spacing: 0.12px;
    max-width: min(320px, calc(100vw - 32px));
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word;
    word-break: normal;
    text-overflow: clip;
    text-align: center;
    z-index: 10010 !important;
    pointer-events: none;
}

/* Zusatzklasse – explizit über data-cls-hint="po-hint-dark" aktivierbar. */
.hint.po-hint-dark,
.hint.po-hint-stable {
    background-color: #273142 !important;
    color: #f8fafc !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    font-family: var(--po-font-family) !important;
    font-size: 12px !important;
    font-weight: 500;
    font-synthesis: none;
    padding: 8px 11px !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.20) !important;
    letter-spacing: 0.12px;
    max-width: min(320px, calc(100vw - 32px));
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word;
    word-break: normal;
    text-overflow: clip;
    text-align: center;
}

/* Soft-Fade-In (Metro animiert per opacity – wir verstärken das).       */
.hint {
    transition: opacity 0.15s ease, transform 0.15s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Kleine Korrekturen für Richtungs-Varianten (falls Metro-CSS einen
   Tail via ::before/::after rendert – PaperOffice will keinen Pfeil).   */
.hint.top::before,
.hint.bottom::before,
.hint.left::before,
.hint.right::before,
.hint.top::after,
.hint.bottom::after,
.hint.left::after,
.hint.right::after {
    display: none !important;
}

/* In Dialogen/Overlays sicherstellen, dass Hints sichtbar bleiben.      */
.dialog .hint,
.overlay .hint,
.app-bar .hint {
    z-index: 100010 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Page-Shell-Loader (SPA Main-Content — zentriertes Animations-Logo)
   ═══════════════════════════════════════════════════════════════════════════ */
#paperoffice_ai_suite_wrapper_content_main_wrapper,
.po-app-main-shell {
    position: relative;
    background-color: var(--po-bg-sidebar, #EBEFF4);
}

/* Während SPA-Navigation: Scroll sperren (Hintergrund ist Shell-Default, kein bg-light) */
#paperoffice_ai_suite_wrapper_content_main_wrapper.po-page-shell-nav-active,
#paperoffice_ai_suite_wrapper_content_main_wrapper.po-page-shell-loading {
    overflow: hidden;
}

/* Frosted-Glass: Sidebar-Farbe (--po-bg-sidebar), Inhalt geblurt, Logo scharf */
.po-page-shell-loader {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
    backdrop-filter: blur(12px) saturate(1.05);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, backdrop-filter 0.22s ease;
}

.po-page-shell-loader::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: var(--po-bg-sidebar, #EBEFF4);
    opacity: 0.8;
    pointer-events: none;
}

.po-page-shell-loader.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.po-page-shell-loader.is-hiding {
    opacity: 0;
    pointer-events: none;
}

/* Nach Ausblendung per JS ([hidden]) — DOM bleibt für SPA-Re-Show */
.po-page-shell-loader[hidden] {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.po-page-shell-loader__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    z-index: 1;
}

.po-page-shell-loader__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.po-page-shell-loader__logo {
    display: block;
    width: 96px;
    height: 96px;
    max-width: min(96px, 24vw);
    max-height: min(96px, 24vw);
    object-fit: contain;
    flex-shrink: 0;
    pointer-events: none;
    user-select: none;
}

/* Kein backdrop-filter: deckende Sidebar-Farbe wie top_menu_sidebar (72px) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .po-page-shell-loader {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .po-page-shell-loader::before {
        opacity: 0.96;
    }
}

@media (prefers-reduced-motion: reduce) {
    .po-page-shell-loader {
        transition: none !important;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .po-page-shell-loader::before {
        opacity: 0.96;
    }
}

