/*
 * LPP Dashboard Styles
 * Version 5.5.30 (FINAL FIX V13: Synchronized CSS for new PHP structure to resolve overlap.)
 * Color: Dark Theme, Orange Accent (#f28c18)
 */

/* ========================================================================= */
/* GLOBALE REGELN (KEINE MOBILE-OVERWRITES) */
/* ========================================================================= */

.lpp-modal-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.lpp-tab-link {
    background: none;
    border: none;
    color: #aaa;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 2px solid transparent;
}

.lpp-tab-link.active {
    color: #f28c18; /* LPP ORANGE */
    border-bottom-color: #f28c18; /* LPP ORANGE */
}

/* KRITISCHER FIX: Versteckt inaktive Tabs standardmäßig */
.lpp-tab-content {
    display: none; 
}

.lpp-tab-content.active {
    display: block;
}

/* --- NEU: SESSION WARNING MODAL FIX --- */

#lpp-session-warning-modal {
    /* Absicherung der Inline-Styles */
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 99999999 !important; /* Extrem hoher Z-Index für maximale Priorität */
    background: #dc3545 !important;
    color: white !important;
    padding: 15px !important;
    border-radius: 5px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5) !important;
    max-width: 300px !important;
    cursor: pointer !important;
    /* Zusätzliche Absicherung für den Text */
    font-family: inherit !important;
    line-height: 1.4 !important;
}

#lpp-session-warning-modal p {
    margin: 0 !important;
}

#lpp-session-warning-modal #lpp-session-timer {
    font-size: 1.1em !important;
    font-weight: bold !important;
    color: #ffe08a !important; /* Helle Farbe für den Timer selbst */
}

@media (max-width: 480px) {
    #lpp-session-warning-modal {
        /* Mobile: Auf volle Breite zentrieren */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90% !important;
    }
}
/* --- ENDE SESSION WARNING MODAL FIX --- */


/* ========================================================================= */
/* MOBILE OVERWRITES (@media max-width: 768px) - MOBILE FINAL FIX */
/* ========================================================================= */

@media (max-width: 768px) {
    #lpp-dashboard-wrapper {
        padding: 15px;
    }

    #lpp-dashboard-wrapper .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 15px;
    }

    #lpp-dashboard-wrapper .client-info {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        padding: 8px;
        /* KRITISCH: 90% Breite des Containers für konsistente Ausrichtung */
        margin: 0 auto; 
        width: 90% !important; 
        box-sizing: border-box;
    }

    #lpp-dashboard-wrapper .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 10px;
        
        /* KRITISCH: Erzwingt 90% Breite und Zentrierung */
        align-self: center !important; 
        width: 90% !important; /* NEUE BREITE: 90% */
        max-width: 100% !important; 
        margin: 10px auto 0 auto !important; /* Zentrierung */
    }

    /* ******************************************************************* */
    /* KRITISCHER FIX: Buttons und Dropdown auf 100% des 90%-Containers setzen */
    /* ******************************************************************* */
    
    /* Zuerst die Button-Wrapper auf 100% Breite des Parent-Containers setzen */
    #lpp-dashboard-wrapper .header-actions .lpp-header-buttons-wrapper {
        width: 100% !important;
        /* Sicherstellen, dass die Buttons gestapelt werden */
        flex-direction: column !important; 
    }
    
    /* A N W E N D U N G S P U N K T: Alle Buttons und das Dropdown auf 100% setzen */
    #lpp-dashboard-wrapper .lpp-btn,
    #lpp-dashboard-wrapper .header-actions .lpp-btn,
    .lpp-dashboard-wrapper .lpp-btn.lpp-btn-outline,
    .lpp-modal-content .lpp-btn,
    #lpp-chart-controls, /* ZIELE DEN SELECT-CONTAINER */
    #lpp-chart-controls select /* ZIELE DAS SELECT-ELEMENT SELBST */
    {
        width: 100% !important; /* KRITISCH: Breite auf 100% des umgebenden Wrappers erzwingen */
        max-width: 100%; 
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 12px 15px !important; 
        font-size: 17px !important; 
        height: auto !important;
        /* WICHTIG: Display-Eigenschaft auf Block für SELECT/Buttons setzen */
        display: block !important; 
        margin: 0 0 8px 0 !important; /* Abstand für gestapelte Elemente */
    }

    /* Entfernt den überflüssigen Bottom-Margin vom letzten Element im Wrapper */
    #lpp-dashboard-wrapper .lpp-header-buttons-wrapper > *:last-child {
         margin-bottom: 0 !important;
    }

    /* Notification-Button (Glocke) benötigt spezielle Padding-Korrektur */
    #lpp-notification-wrapper.lpp-btn-outline {
        padding: 10px 15px !important;
        height: auto !important; 
        width: 100% !important;
    }
    
    /* Stellt sicher, dass das select-Feld richtig ausgerichtet ist */
    #lpp-chart-controls {
        width: 90% !important; /* Behält die 90% Breite des Screens bei */
        max-width: 100% !important; 
        justify-content: center;
        margin: 0 auto 10px auto !important; 
    }
    
    /* ... (Bestehende Logik für Card View TDs und Inhalte) ... */
    #lpp-dashboard-wrapper .lpp-td { padding: 0 !important; box-sizing: border-box !important; }
    #lpp-dashboard-wrapper .lpp-td-icon { display: none !important; flex-basis: 0 !important; flex-shrink: 0 !important; padding: 0 !important; }
    #lpp-dashboard-wrapper .lpp-td-description {
        flex-grow: 1 !important; 
        flex-basis: 0 !important; 
        padding-right: 5px !important;
        padding-left: 15px !important; 
        display: flex !important; 
        flex-direction: column !important; 
        align-items: flex-start !important;
        justify-content: flex-start !important;
        line-height: 1.2 !important;
        min-width: 0 !important; 
        overflow: hidden; 
    }
    
    #lpp-dashboard-wrapper .lpp-td-amount {
        flex-basis: 120px !important; 
        flex-shrink: 0 !important;
        text-align: right !important;
        font-size: 1.1em !important; 
        font-weight: bold !important;
        padding-right: 0 !important;
        display: flex !important;
        align-items: flex-start !important; 
        justify-content: flex-end !important;
        margin-top: 2px !important; 
    }

    #lpp-dashboard-wrapper .lpp-entry-main-desc {
        font-size: 14px !important;
        font-weight: bold !important;
        display: block !important; 
        width: 100% !important;
        line-height: 1.2 !important;
        white-space: normal !important; 
        word-break: break-word !important;
    }

    #lpp-dashboard-wrapper .lpp-entry-meta-desc {
        display: block !important; 
        font-size: 11px !important;
        color: rgba(255, 255, 255, 0.4) !important;
        margin-top: 2px !important;
        text-align: left !important;
        white-space: normal !important; 
        word-break: break-word !important;
    }
    
    #lpp-dashboard-wrapper .lpp-td-amount > * {
        display: block !important;
    }

    /* Deposit Modal Tabs Scrollbar entfernen, aber Scrollen erlauben */
    .lpp-modal-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -ms-overflow-style: none !important;  /* IE and Edge */
        scrollbar-width: none !important;     /* Firefox */
    }
    
    /* WebKit Scrollbar entfernen */
    .lpp-modal-tabs::-webkit-scrollbar {
        display: none !important;
    }

    /* Deposit Details Text Area/Pre Tag Fix */
    #lpp-deposit-info-modal .lpp-deposit-pre,
    #lpp-withdraw-modal .lpp-deposit-pre {
        /* Erzwingt Umbruch für lange Strings */
        word-break: break-all !important; 
        white-space: pre-wrap !important; 
        /* Schriftgröße dynamisch anpassen */
        font-size: 13px !important; 
        line-height: 1.3 !important;
        padding-right: 15px !important; 
    }
    
    /* Deposit QR Column muss volle Breite nehmen */
    #lpp-deposit-info-modal .lpp-deposit-qr-column {
        flex: 1 1 100% !important; 
    }
    
    /* FIX: Header-Filter in der mobilen Ansicht stapeln */
    #lpp-dashboard-wrapper .lpp-history-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important; 
        justify-content: center !important; 
        text-align: center !important; 
        padding: 15px 15px !important;
    }
    
    /* KRITISCHER FIX FÜR FILTER ZENTRIERUNG (Final) */
    #lpp-dashboard-wrapper .lpp-history-filters-container {
        margin-top: 10px;
        display: flex !important; 
        flex-direction: column !important; 
        
        /* NEU: Erzwungene Breite und Zentrierung */
        width: 100% !important; 
        max-width: 300px !important; 
        margin: 10px auto 0 auto !important; /* Zentrierung */
        
        justify-content: center !important; 
        gap: 8px; 
        padding: 0 !important;
    }
    
    /* ... (Bestehende Logik für Filter-Items) ... */
    #lpp-dashboard-wrapper .lpp-history-filters-container > * {
        width: 100% !important;
        flex-basis: auto !important;
        flex-grow: 1 !important;
        height: 40px !important; 
        margin: 0 !important; 
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 15px !important; 
    }
    
    /* KRITISCHER FIX: Export Button (Jetzt als Teil der Filtergruppe) */
    #lpp-export-statement-btn {
        height: 40px !important; 
        padding: 10px 15px !important; 
        text-align: center !important;
        line-height: 1.2 !important;
        width: 100% !important; /* Muss volle Breite im gestapelten Container nehmen */
        display: block !important;
        margin: 0 !important; /* Abstand wird durch Gap im Container gesteuert */
    }
    
    /* KRITISCHE ANPASSUNG: Export Button und Actions Group müssen 100% Breite des Parent einnehmen */
    #lpp-dashboard-wrapper .lpp-history-actions-group {
        width: 100% !important; 
        flex-basis: 100% !important; 
        flex-shrink: 0 !important;
        
        /* NEU: Zentriert die Export-Buttons, wenn der Container breiter ist */
        display: flex;
        justify-content: center;
    }

    /* Stellt sicher, dass der Filter Select Text richtig zentriert ist */
    .lpp-history-filters-container select {
        line-height: 38px !important; 
        padding: 0 15px !important; 
        height: 40px !important;
    }

    /* KRITISCHER FIX: Versteckt den Spalten-Header */
    #lpp-dashboard-wrapper .lpp-transaction-table-header {
        display: none !important; 
    }

    /* KRITISCH: TRANSACTION HISTORY ROW - ZENTRIERT & CARD VIEW */
    #lpp-dashboard-wrapper #lpp-transaction-history .lpp-history-body .lpp-transaction-row {
        display: flex !important; 
        align-items: flex-start !important; 
        padding: 10px 15px !important; 
        flex-wrap: nowrap !important;
        
        /* NEU: Begrenzt die Breite (300px + Paddings) und **zentriert** die einzelnen Zeilen */
        max-width: 500px; 
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Tooltip Fix: Mobile positioniert den Tooltip mittig unten */
    #lpp-tooltip-container { 
         /* KRITISCHER FIX: Positionierung wird jetzt vollständig vom JS übernommen. */
         /* left, transform, top, bottom, margin-top ENTFERNT. */
         z-index: 1000001 !important; /* Stellt sicher, dass es über allem liegt */
    }
    
    /* CHIRURGISCHER FIX (CHART OVERFLOW): Fügt min-width: 0 zur Grid-Kachel hinzu */
    #lpp-dashboard-wrapper .dashboard-tile-large {
        grid-column: 1 / -1 !important;
        min-width: 0; /* ERMÖGLICHT DAS SCHRUMPFEN DER KACHEL */
    }
}


/* ========================================================================= */
/* TABLET OPTIMIERUNG (@media min-width: 769px and max-width: 1024px) */
/* HEADER GESTAPELT (ZENTRIERT), HISTORY DESKTOP-LOOK (UX OPTIMIERT) */
/* ========================================================================= */

@media (min-width: 769px) and (max-width: 1024px) {
    
    /* --------------------------------------------------------------------- */
    /* 1. HEADER-MENÜ (MUSS GESTAPELT & ZENTRIERT BLEIBEN) */
    /* --------------------------------------------------------------------- */
    
    #lpp-dashboard-wrapper .dashboard-header {
        flex-direction: column; /* Erzwingt Spalten-Layout für die gesamte Sektion */
        align-items: center; /* Zentriert die Haupt-Items (Client Info und Header Actions) */
        flex-wrap: wrap; 
        justify-content: center;
        gap: 15px;
    }
    
    #lpp-dashboard-wrapper .client-info {
        flex-direction: row;
        align-items: center;
        padding: 10px 15px; 
        gap: 10px;
        margin: 0 auto; /* Zentriert die Client-Info-Zeile */
    }

    #lpp-dashboard-wrapper .header-actions {
        flex-direction: column !important;
        align-items: stretch !important; 
        gap: 10px !important;
        
        width: 100% !important; 
        max-width: 300px !important; /* Erzwungene Breite von 300px */
        /* KRITISCH: Zentrierung des Header-Actions Containers */
        align-self: auto !important; 
        margin: 10px auto 0 auto !important; 
    }
    
    /* Chart Controls (Filter) muss die gleiche Breite und Zentrierung wie die Buttons haben */
    #lpp-chart-controls {
        width: 300px; /* Gleiche Breite wie Buttons */
        justify-content: center;
        margin: 0 auto 10px auto; /* Zentriert */
    }
    
    #lpp-dashboard-wrapper .header-actions .lpp-header-buttons-wrapper {
        display: flex !important; 
        flex-direction: column !important; 
        gap: 8px !important;
        width: 100% !important;
    }

    #lpp-dashboard-wrapper .header-actions .lpp-btn,
    #lpp-dashboard-wrapper .header-actions .lpp-btn.lpp-btn-outline,
    #lpp-notification-wrapper.lpp-btn-outline {
        width: 100% !important;
        height: auto !important; 
        padding: 12px 15px !important; 
        font-size: 17px !important; 
        line-height: 1.2 !important; 
    }
    
    /* --------------------------------------------------------------------- */
    /* 2. TRANSACTION HISTORY FILTER (OPTIMIERT FÜR TABLET) */
    /* --------------------------------------------------------------------- */
       
    #lpp-dashboard-wrapper .lpp-history-header {
         flex-direction: column; 
         justify-content: center;
         align-items: center;
         flex-wrap: wrap;
         text-align: center;
         position: relative; /* Basis für Z-Index */
         z-index: 10;
         
         /* KRITISCHER FIX: Setzt die Actions Group und den Filtercontainer auf 100% Breite */
         padding: 15px 15px;
    }
    
    /* KRITISCHER FIX: Export Button und Actions Group müssen 100% Breite des Parent einnehmen */
    #lpp-dashboard-wrapper .lpp-history-actions-group {
        width: 100% !important; 
        flex-basis: 100% !important; 
        flex-shrink: 0 !important;
        
        /* NEU: Zentriert die Export-Buttons, wenn der Container breiter ist */
        display: flex;
        justify-content: center;
    }
    
    /* KRITISCHER FIX: Export Button (Jetzt als Teil der Actions Group) */
    #lpp-export-statement-btn {
        flex-basis: auto !important;
        min-width: 120px;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        margin: 0 !important; /* Abstand wird durch Gap im Container gesteuert */
    }
    
    .lpp-history-filters-container {
        flex-direction: row !important; 
        flex-wrap: wrap !important; 
        gap: 10px !important;
        
        /* KRITISCHE KORREKTUR: ZENTRIERT den Filter-Container im Header-Block */
        margin: 10px auto 0 auto !important; 
        width: 100% !important; 
        max-width: 90%; 
        justify-content: center;
        
        min-width: 0;
        box-sizing: border-box;
        
        position: relative;
        z-index: 9999; 
    }
    
    .lpp-history-filters-container > * {
        /* WICHTIG: Erlaubt den Elementen, zu schrumpfen und zu wachsen */
        flex-basis: 150px; 
        flex-grow: 1; 
        flex-shrink: 1; 
        
        height: 36px !important; 
        padding: 0 12px !important;
        margin: 0 !important;
    }
    
    /* --------------------------------------------------------------------- */
    /* 3. TRANSACTION HISTORY TABELLE (OPTIMIERT FÜR TABLET) */
    /* Geradlinig, mittig & Line Height für edle Optik */
    /* --------------------------------------------------------------------- */

    /* Zeigt den Spalten-Header wieder an */
    #lpp-dashboard-wrapper .lpp-transaction-table-header {
        display: flex !important; 
        padding: 12px 20px;
    }

    /* Stellt das Flex-Layout auf die Desktop-Version zurück (Tabelle) */
    #lpp-dashboard-wrapper #lpp-transaction-history .lpp-history-body .lpp-transaction-row {
        display: flex !important; 
        align-items: center !important; 
        padding: 18px 0 !important; /* ERHÖHTES PADDING */
        max-width: 100%; /* Volle Breite */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* ******************************************************************* */
    /* NEU: SPALTEN-ALIGNMENT FIX FÜR HEADER UND TD (TABLET) */
    /* ******************************************************************* */

    /* ICON SPALTE (Header und Body) */
    .lpp-th-icon, .lpp-td-icon {
        flex-basis: 60px !important; 
        flex-shrink: 0 !important;
        padding-left: 20px !important;
        padding-right: 0 !important; 
        display: flex !important;
        justify-content: center !important; 
        align-items: center !important;
        text-align: center;
    }
    
    /* DESCRIPTION SPALTE (Header und Body) */
    .lpp-th-description, .lpp-td-description {
        flex-grow: 1 !important;
        flex-basis: auto !important;
        padding-left: 15px !important; 
        padding-right: 15px !important; 
        text-align: left; /* Header Text linksbündig */
    }
    
    /* AMOUNT SPALTE (Header und Body) */
    .lpp-th-amount, .lpp-td-amount {
        flex-basis: 160px !important; 
        flex-shrink: 0 !important;
        padding-left: 15px !important; 
        padding-right: 20px !important; 
        text-align: right !important;
    }
    
    /* DESCRIPTION SPALTE (Inhalt für Tablet) */
    #lpp-dashboard-wrapper .lpp-td-description {
        /* Muss linksbündig ausgerichtet bleiben */
        align-items: flex-start !important; 
        justify-content: center !important;
    }
    
    /* Text-Elemente innerhalb der Description (Line Height UX) */
    #lpp-dashboard-wrapper .lpp-entry-main-desc {
        display: block !important; 
        font-size: 16px; 
        white-space: normal !important; 
        line-height: 1.4 !important; 
        margin-bottom: 2px;
    }
    #lpp-dashboard-wrapper .lpp-entry-meta-desc {
        display: block !important; 
        font-size: 12px; 
        margin-top: 0 !important;
        margin-left: 0 !important;
        line-height: 1.4 !important; 
    }
    
    /* ******************************************************************* */
    /* ENDE NEU: SPALTEN-ALIGNMENT FIX FÜR HEADER UND TD (TABLET) */
    /* ******************************************************************* */

}


/* General Wrapper */
#lpp-dashboard-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #241f1d;
    color: #fff;
    padding: 25px;
    border-radius: 8px;
}

/* Header */
#lpp-dashboard-wrapper .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

#lpp-dashboard-wrapper .client-info {
    background-color: rgba(0,0,0,0.2);
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#lpp-dashboard-wrapper .header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* KRITISCHE ANPASSUNGEN FÜR DESKTOP-HEADER-AUSRICHTUNG (Desktop > 1024px) */
@media (min-width: 1025px) { 
    /* 1. Passt den Gesamt-Container an */
    #lpp-dashboard-wrapper .dashboard-header {
        justify-content: space-between; 
        align-items: center; 
        flex-wrap: nowrap; 
    }

    /* 2. Stellt sicher, dass die Buttons im Wrapper horizontal sind */
    #lpp-dashboard-wrapper .header-actions .lpp-header-buttons-wrapper {
        display: flex; 
        flex-direction: row !important; 
        gap: 10px;    
        margin-top: 0 !important; 
    }

    /* 3. Entfernt die erzwungene Block-Breite für Buttons IM Header-Actions-Container */
    #lpp-dashboard-wrapper .header-actions .lpp-btn,
    #lpp-dashboard-wrapper .lpp-history-header .lpp-btn.lpp-btn-outline, /* TARGET CSV BUTTON HERE */
    #lpp-notification-wrapper.lpp-btn-outline {
        width: auto !important; 
        display: inline-block !important; 
        margin-top: 0 !important; 
        padding: 8px 18px !important; 
        height: 36px !important; 
        font-size: 14px !important;
    }

    /* 4. Chart Controls (Filter) müssen nach rechts verschoben werden */
    #lpp-chart-controls {
        margin-right: 15px; 
    }
    
    /* 5. HISTORY FILTER (DESKTOP > 1024px) - ROLLBACK auf kompaktes Layout */
    .lpp-history-filters-container {
        /* Zurück zum Desktop-Standard: kein Umbruch, rechtsbündig */
        flex-wrap: nowrap !important; 
        width: auto !important;
        flex-grow: 1; /* ERMÖGLICHEN WACHSTUM AUF DER RECHTEN SEITE */
        margin-left: auto;
        justify-content: flex-end;
        position: relative;
        z-index: 9999; /* ULTIMATIVER FIX */
    }
    
    /* KRITISCHER FIX: Export Button (Jetzt als Teil der Actions Group) */
    #lpp-export-statement-btn {
        /* KRITISCHER FIX: MUSS LINKS von den Filtern angezeigt werden */
        order: -1; 
        margin-right: 10px !important; /* Abstand zu den Filtern */
        height: 36px !important;
        align-self: center !important;
        line-height: 1.2 !important; 
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0;
        flex-basis: auto !important; 
        min-width: 100px;
        flex-grow: 0;
    }
    
    /* Stellt sicher, dass die Selects und Buttons sich anpassen, ohne zu brechen */
    .lpp-history-filters-container > * {
        /* Setzt die Elemente auf die Zielhöhe und entfernt Margins */
        height: 36px !important; 
        margin: 0 0 0 10px !important; /* Abstand zwischen Filtern */
        
        /* KRITISCHER FIX: Erlaubt Schrumpfen, um Überlauf zu verhindern */
        flex-basis: 150px; 
        flex-grow: 1; 
        flex-shrink: 0; 
        
        display: inline-flex !important;
        align-items: center !important; 
        justify-content: center !important;
        box-sizing: border-box;
        
        /* KRITISCHER FIX: Setzt die minimale Breite */
        min-width: 100px;
    }
    
    /* NEUE KRITISCHE KORREKTUR für Selects und Button Textzentrierung */
    #lpp-transaction-filters select {
        line-height: 34px !important; 
        padding: 0 12px !important; 
        transform: translateY(0px) !important; 
        box-sizing: border-box;
        display: inline-block !important; 
        min-width: 100px !important; 
        width: 100% !important; 
        flex-basis: 120px; 
        color: #fff !important; 
    }
    
    /* Export CSV Button (Sicherstellen, dass er sich am Flex-Flow beteiligt, aber nicht schrumpft) */
    .lpp-history-filters-container #lpp-export-statement-btn {
        order: -1; 
        margin-right: 10px;
    }
}
/* ENDE KRITISCHE ANPASSUNGEN FÜR DESKTOP-HEADER-AUSRICHTUNG */

/* WICHTIG: Button-Anpassung, um A-Elemente an Button-Höhe anzugleichen - LPP ORANGE */
#lpp-dashboard-wrapper .lpp-btn,
#lpp-settings-modal .lpp-btn,
#lpp-deposit-info-modal .lpp-btn,
#lpp-withdraw-modal .lpp-btn {
    background-color: #f28c18; /* LPP ORANGE */
    color: #fff !important;
    border: none;
    /* FIX: REDUZIERTE BUTTON HÖHE */
    padding: 8px 18px; 
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box; /* Sicherstellen, dass Padding in der Breite enthalten ist */
    line-height: 1.2;
    height: 36px; /* ERZWUNGENE HÖHE */
    
    /* NEU: ZENTRIERT DEN TEXT IM BUTTON (wichtig für Logout) */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lpp-dashboard-wrapper .lpp-btn:hover,
#lpp-settings-modal .lpp-btn:hover,
#lpp-deposit-info-modal .lpp-btn:hover,
#lpp-withdraw-modal .lpp-btn:hover {
    background-color: #d87e15; /* Darker Orange */
    color: #fff !important;
}

/* KRITISCHER FIX: Hier wird das Outline-Styling für Buttons wiederhergestellt */
#lpp-notification-wrapper.lpp-btn-outline,
#lpp-dashboard-wrapper .lpp-btn.lpp-btn-outline,
#lpp-withdraw-modal .lpp-btn.lpp-btn-outline {
    background-color: transparent !important; /* Hintergrund bleibt transparent */
    border: 1px solid #fff !important; /* KORRIGIERT: WEISSE Umrandung für die Glocke */
    color: #fff !important; /* KORRIGIERT: Icon-Farbe WEISS */
}

#lpp-dashboard-wrapper .lpp-btn.lpp-btn-outline:hover,
#lpp-withdraw-modal .lpp-btn.lpp-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1) !important; /* Leichte weiße Aufhellung bei Hover */
}


/* Chart Controls */
#lpp-chart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 0;
}

/* HIER WIRD DER WEISSE RAHMEN DES SELECT-DROPDOWNS KORRIGIERT */
#lpp-chart-period {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5) !important; /* KORREKTUR: Sichtbarer weißer Rahmen */
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
}

#lpp-chart-period option {
    background-color: #2a2522;
    color: #fff;
}

/* ========================================================================= */
/* NEU: SKELETON LOADER FÜR METRIK-KACHELN (UX) */
/* ========================================================================= */

/* 1. WAVE ANIMATION DEFINITION */
@keyframes wave-reveal {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 2. SKELETON BASIS (kein Pulsieren, dunklere Basis) */
.lpp-loading-skeleton {
    /* WICHTIG: Animation nur für den Pseudo-Element-Wave */
    position: relative;
    overflow: hidden;
    /* Dunklere Basis, auf der der Wave-Effekt abläuft */
    background-color: rgba(0, 0, 0, 0.3) !important; 
}

/* Überdeckt den Text/Wert, um nur die Animation zu zeigen */
.lpp-loading-skeleton .tile-header,
.lpp-loading-skeleton .tile-value {
    color: transparent !important; /* Macht den Inhalt unsichtbar */
}

/* NEU: Hinzufügen der Wave-Animation zur Wert-Placeholder-Leiste */
.lpp-loading-skeleton .tile-value::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 60%; 
    height: 14px; 
    background-color: rgba(255, 255, 255, 0.1); /* Subtiler Platzhalter-Balken (dunkler) */
    border-radius: 4px;
}


/* 3. WAVE-ÜBERLAY FÜR DIE GESAMTE KACHEL */
.lpp-loading-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Der Wave-Gradient, der von links nach rechts wischt */
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%, /* Transparent */
        rgba(255, 255, 255, 0.03) 50%, /* KRITISCHE KORREKTUR: Opazität auf 0.03 reduziert (noch subtiler) */
        rgba(255, 255, 255, 0) 100% /* Transparent */
    );
    animation: wave-reveal 4.5s infinite linear; /* KRITISCHE KORREKTUR: Dauer auf 4.5s erhöht */
    /* Startet links außerhalb des Containers (-100%) und wischt nach rechts (100%) */
    transform: translateX(-100%); 
}


/* NEU: Behandlung des Chart-Containers */
/* KRITISCHE KORREKTUR FÜR SANFTES EINBLENDEN DES CHARTS */
/* Setzt den Chart-Bereich auf 0 Opazität UND 10px Verschiebung nach links */
.lpp-loading-skeleton .tile-chart {
    opacity: 0;
    transform: translateX(-10px);
    /* KRITISCHER FIX: TRANSITION DAUER AUF 2.5s ERHÖHT UND CUSTOM EASING BEIBEHALTEN */
    transition: opacity 2.5s cubic-bezier(0.16, 1, 0.3, 1), transform 2.5s cubic-bezier(0.16, 1, 0.3, 1); 
}

/* KRITISCHE KORREKTUR: Wenn die Skeleton-Klasse entfernt wird, blende das Chart sanft ein */
.dashboard-tile-large:not(.lpp-loading-skeleton) .tile-chart {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* NEU: Visuelles Overlay für den Chart-Bereich */
.lpp-loading-skeleton .tile-chart::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.05); /* Sehr subtiles Overlay */
    z-index: 10;
}


/* ========================================================================= */
/* ENDE SKELETON LOADER */
/* ========================================================================= */

/* Grid & Tiles */
#lpp-dashboard-wrapper .dashboard-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

#lpp-dashboard-wrapper .dashboard-tile-large {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    margin: 0 !important;
}

#lpp-dashboard-wrapper .tile-header {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
    text-transform: uppercase;
}

#lpp-dashboard-wrapper .tile-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff !important;
}

#lpp-dashboard-wrapper .tile-chart {
    position: relative;
    width: 100%;
    height: 100px; /* HÖHE ANGEPASST */
    flex-grow: 1;
}

/* Version Info Style */
#lpp-version-info {
    color: #aaa;
    margin-top: 15px;
    display: block;
}

/* Transaction History (TABLE Structure) */
#lpp-dashboard-wrapper #lpp-transaction-history {
    margin-top: 30px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    color: #fff;
}

/* KRITISCHER FIX FÜR DESKTOP TRANSACTION HISTORY (NEU) */
#lpp-dashboard-wrapper .lpp-history-header {
    display: flex; 
    /* Stellt sicher, dass der Titel links und der Filter-Container rechts ist */
    justify-content: space-between; 
    align-items: center;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
    /* KRITISCHER FIX: Erlaubt dem Titel zu schrumpfen und dem Filter-Container zu bleiben */
    flex-wrap: nowrap; 
    
    position: relative; /* Basis für Z-Index */
    z-index: 10;
}

/* NEUE KRITISCHE REGEL FÜR DEN TITEL: VERHINDERT UMBUCH */
/* Der Titeltext selbst (impliziert, da es kein eigenes DIV dafür gibt) */
#lpp-dashboard-wrapper .lpp-history-header > div:first-child {
    white-space: nowrap; /* Verhindert das Umbrechen des Titels */
    /* KRITISCH: Setzt die maximale Breitenbasis des Titels auf 20% */
    flex-shrink: 1; 
    flex-basis: 20%; /* WENIGER PLATZ FÜR DEN TITEL */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis; 
    
    position: relative;
    z-index: 1; /* ULTIMATIVER FIX: Niedrigste Priorität für den Titelbereich */
}

/* KRITISCHER FIX FÜR ACTIONS GROUP (DER CONTAINER FÜR DEN EXPORT BUTTON) */
#lpp-dashboard-wrapper .lpp-history-actions-group {
    flex-shrink: 0;
    flex-basis: auto;
    margin-left: auto;
    position: relative;
    z-index: 9999;
    
    /* NEU: Flex Container, um den Button rechts zu halten, falls die Filter brechen */
    display: flex; 
    align-items: center; 
    justify-content: flex-end;
}


/* KRITISCHER FIX: Setzt den Filtercontainer auf Flex damit Selects und Button in einer Reihe sind */
.lpp-history-filters-container {
    display: flex; 
    gap: 10px; 
    align-items: center; 
    font-weight: normal; 
    font-size: 14px; 
    
    /* KRITISCHER FIX: Zwingt den Container maximal weit nach rechts */
    /* MARGIN LEFT AUTO HIER ENTFERNT, DA ACTIONS GROUP DEN PLATZ ÜBERNIMMT */
    
    /* KRITISCHER FIX: Verhindert, dass der Filter-Container bricht oder zu viel Platz wegnimmt */
    width: auto !important; 
    flex-grow: 1; /* WICHTIG: Erlaubt Wachstum, damit die Filter so viel Platz wie möglich einnehmen */
    flex-shrink: 1; 
    
    /* PADDING LINKS HINZUFÜGEN, DAMIT CSV NICHT ABGESCHNITTEN WIRD */
    padding-left: 10px; 
    
    position: relative;
    z-index: 9999; 
    
    /* KRITISCHE KORREKTUR FÜR DESKTOP: Richtiges Alignment */
    justify-content: flex-end;
}

/* ZWINGENDE KORREKTUR FÜR DESKTOP: Erzwingt, dass alle Kinder des Filtercontainers horizontal ausgerichtet sind */
@media (min-width: 1025px) { 
    /* Stellt sicher, dass die Selects und Buttons auf dem Desktop horizontal bleiben und die gleiche Höhe haben */
    .lpp-history-filters-container {
        flex-direction: row !important;
        align-items: center !important;
        
        /* KRITISCHER FIX: Setzt den Export Button LINKS VON DEN FILTERN */
        margin-left: 0 !important;
        
        /* KRITISCHER FIX: Erzwingt, dass die Filter rechtsbündig sind */
        justify-content: flex-end;
    }
    
    /* KRITISCHER FIX: Export Button */
    #lpp-export-statement-btn {
        order: -1; 
        margin-right: 10px !important; /* Abstand zu den Filtern */
        height: 36px !important;
        align-self: center !important;
        line-height: 1.2 !important; 
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0;
        flex-basis: auto !important; 
        min-width: 100px;
        flex-grow: 0;
    }
    
    /* KRITISCHER FIX: Stellt sicher, dass die Actions Group das Margin hält */
    #lpp-dashboard-wrapper .lpp-history-actions-group {
        /* Setzt die Actions Group ganz nach rechts */
        margin-left: auto;
        /* KRITISCHER FIX: Entfernt das Flex, da es jetzt im Filtercontainer integriert ist */
        display: block; 
        
        /* Setzt das Margin für die Actions Group auf 0 (wird jetzt im Filtercontainer gesteuert) */
        margin-right: 0 !important; 
        
        /* KRITISCHER FIX: Stellt sicher, dass die Actions Group ihren eigenen Platz hat (z.B. für den Button) */
        flex-grow: 0; 
        flex-shrink: 0; 
        flex-basis: auto; 
        
        /* Wir müssen den Export Button in den Filter Container VERSCHIEBEN */
    }
    
    /* KRITISCHER FIX: Setzt den Export CSV Button in die Actions Group zurück */
    .lpp-history-actions-group #lpp-export-statement-btn {
        display: none !important; /* Temporär versteckt, da er in den Filtercontainer verschoben wird */
    }

    /* ZIEL: Wenn der Export Button wieder in den Filter Container VOR den Selects ist */
    #lpp-dashboard-wrapper .lpp-history-filters-container #lpp-export-statement-btn {
        display: inline-flex !important;
        order: -1;
        margin-right: 10px;
        height: 36px !important;
    }

    /* ZIEL: Selects haben die richtige Höhe und Breitenverteilung */
    .lpp-history-filters-container > * {
        height: 36px !important; 
        margin: 0 0 0 10px !important; /* Abstand zwischen Filtern */
        
        /* KRITISCHER FIX: Erlaubt Schrumpfen, um Überlauf zu verhindern */
        flex-basis: 150px; 
        flex-grow: 1; 
        flex-shrink: 0; 
        
        display: inline-flex !important;
        align-items: center !important; 
        justify-content: center !important;
        box-sizing: border-box;
        
        /* KRITISCHER FIX: Setzt die minimale Breite */
        min-width: 100px;
    }
    
    /* NEUE KRITISCHE KORREKTUR für Selects und Button Textzentrierung */
    #lpp-transaction-filters select {
        line-height: 34px !important; 
        padding: 0 12px !important; 
        transform: translateY(0px) !important; 
        box-sizing: border-box;
        display: inline-block !important; 
        min-width: 100px !important; 
        width: 100% !important; 
        flex-basis: 120px; 
        color: #fff !important; 
    }
    
    /* Export CSV Button (Sicherstellen, dass er sich am Flex-Flow beteiligt, aber nicht schrumpft) */
    .lpp-history-filters-container #lpp-export-statement-btn {
        order: -1; 
        margin-right: 10px;
    }
}
/* ENDE KRITISCHE KORREKTUR Transaction History */

/* HINWEIS: Hier ist der ursprüngliche, breiten-erzwingende Selektor (unverändert) */
.lpp-tab-content input,
.lpp-tab-content textarea,
.lpp-tab-content select { 
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    box-sizing: border-box;
}


#lpp-dashboard-wrapper .lpp-history-body {
    max-height: 450px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

/* TABLE-Layout mit Flexbox */
#lpp-dashboard-wrapper .lpp-transaction-table-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    width: 100%; /* Stellt sicher, dass die gesamte Breite genutzt wird */
    box-sizing: border-box;
}

#lpp-dashboard-wrapper .lpp-transaction-row {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%; /* Stellt sicher, dass die gesamte Breite genutzt wird */
    box-sizing: border-box;
}

#lpp-dashboard-wrapper .lpp-transaction-row:last-child {
    border-bottom: none;
}

#lpp-dashboard-wrapper #lpp-transaction-tbody .lpp-transaction-row:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Spaltenbreiten für Flexbox-Layout */
#lpp-dashboard-wrapper .lpp-th,
#lpp-dashboard-wrapper .lpp-td {
    padding: 0 15px;
}

#lpp-dashboard-wrapper .lpp-th-icon,
#lpp-dashboard-wrapper .lpp-td-icon {
    flex-basis: 50px;
    flex-shrink: 0;
    padding-left: 20px !important;
}

#lpp-dashboard-wrapper .lpp-th-description,
#lpp-dashboard-wrapper .lpp-td-description {
    flex-grow: 1;
    padding-right: 20px !important;
}

#lpp-dashboard-wrapper .lpp-th-amount,
#lpp-dashboard-wrapper .lpp-td-amount {
    flex-basis: 150px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 20px !important;
}

#lpp-dashboard-wrapper .lpp-td-icon .lpp-entry-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

#lpp-dashboard-wrapper .lpp-entry-main-desc {
    font-weight: 500;
    color: #fff;
    margin-bottom: 2px;
}

#lpp-dashboard-wrapper .lpp-entry-meta-desc {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

#lpp-dashboard-wrapper .lpp-td-amount {
    font-weight: bold;
    font-size: 1.1em;
    white-space: nowrap;
}

#lpp-dashboard-wrapper .lpp-td-amount.positive {
    color: #28a745 !important;
}

#lpp-dashboard-wrapper .lpp-td-amount.negative {
    color: #dc3545 !important;
}

/* Generic Button Style is defined above */

/* Modals (Settings & Deposit Info) */
.lpp-modal {
    /* display: none; <-- CHIRURGISCH ENTFERNT! Das JS und der Inline-Style im HTML steuern dies jetzt */
    position: fixed;
    z-index: 999999;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    transform: translate(-50%, -50%);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.lpp-modal-content {
    background-color: #2a2522;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 500px; /* Standardbreite */
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 !important;
}

/* ******************************************************************* */
/* KORRIGIERT: Schließen-Button dominanter gestalten (FINAL) */
/* ******************************************************************* */
.lpp-close-modal-btn {
    color: #f28c18 !important; /* LPP ORANGE für das X-Symbol */
    position: absolute;
    top: 10px;
    right: 10px; 
    font-size: 20px; 
    font-weight: bold;
    cursor: pointer;
    /* Z-INDEX ERHÖHT, um über dem Gradienten und anderem Inhalt zu sein */
    z-index: 99999 !important; 
    
    /* NEU: Hintergrund LPP Orange Transparent, Flat */
    background-color: rgba(242, 140, 24, 0.15) !important; /* Orange mit 15% Transparenz */
    border-radius: 50%;
    padding: 8px; /* Vergrößert die Trefferfläche */
    width: 36px; /* Feste Größe */
    height: 36px; /* Feste Größe */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.2s;

    /* KRITISCHER FIX: Entfernt Border/Outline/Shadows für FLAT-LOOK */
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.lpp-close-modal-btn:hover {
    background-color: rgba(242, 140, 24, 0.3) !important; /* Etwas dunkleres Orange bei Hover */
    color: #fff !important; /* X-Symbol wird weiß bei Hover für besseren Kontrast */
}
/* ******************************************************************* */


.lpp-modal-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.lpp-tab-link {
    background: none;
    border: none;
    color: #aaa;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    border-bottom: 2px solid transparent;
}

.lpp-tab-link.active {
    color: #f28c18; /* LPP ORANGE */
    border-bottom-color: #f28c18; /* LPP ORANGE */
}

/* KRITISCHER FIX: Versteckt inaktive Tabs standardmäßig */
.lpp-tab-content {
    display: none; 
}

.lpp-tab-content.active {
    display: block;
}

.lpp-modal-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff;
    /* FIX: Standardmäßig linksbündig */
    text-align: left; 
}

.lpp-tab-content input,
.lpp-tab-content textarea,
.lpp-tab-content select { 
    width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    box-sizing: border-box;
}

/* Hinzugefügt für Readonly-Felder in der Wallet-Ansicht, um den visuellen Hinweis zu geben */
.lpp-tab-content input[readonly], 
.lpp-tab-content textarea[readonly] {
    /* Macht den Hintergrund leicht heller, um die Readonly-Funktionalität zu zeigen */
    background-color: rgba(0, 0, 0, 0.4);
    cursor: text;
    pointer-events: auto; /* Erlaubt Klicks zum Auslösen von JS */
}

.lpp-tab-content .lpp-btn {
    margin-top: 20px;
    width: 100%;
}

/* Deposit Info Modal Specifics (Final Styling) */

/* Erhöht die Breite für den Deposit Manager */
#lpp-deposit-info-modal .lpp-modal-content {
    max-width: 700px;
}

#lpp-deposit-info-modal h4 {
    margin: 0 0 10px;
    color: #f28c18; /* LPP ORANGE */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    font-size: 18px;
}

/* NEUES FLEX-LAYOUT FÜR BILD UND TEXT */
#lpp-deposit-info-modal .lpp-deposit-flex-grid {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap; /* Erlaube Umbruch auf Mobilgeräten */
}

#lpp-deposit-info-modal .lpp-deposit-qr-column {
    flex: 1 1 250px; /* QR Code nimmt fix 250px ein */
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#lpp-deposit-info-modal .lpp-deposit-qr-img {
    max-width: 100%;
    height: auto;
    border: 5px solid white; /* Klarer Rahmen um das Bild */
    border-radius: 44px;
    margin-top: 5px;
}

/* Kopierbares Feld */
#lpp-deposit-info-modal .lpp-deposit-content {
    position: relative;
    align-items: flex-start;
    margin-top: 5px;
}

/* LPP-Deposit-PRE für Einzahlungs-/Kopierfelder */
#lpp-deposit-info-modal .lpp-deposit-pre {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    padding: 15px 80px 15px 15px; /* Padding mit Platz für den Copy Button (Desktop) */
    box-sizing: border-box;
    resize: none;
    white-space: pre-wrap;
    overflow-y: auto;
    line-height: 1.4;
    position: relative;
    font-size: 16px;
    min-height: 50px;
    display: flex;
    align-items: center;
    text-align: left; 
}


#lpp-deposit-info-modal .lpp-copy-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #f28c18; /* LPP ORANGE */
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

/* Withdrawal Modal Layout Fixes */

/* FIX: Stellt sicher, dass die Überschrift im Withdrawal Modal linksbündig ist (sollte durch .lpp-modal-title abgedeckt sein, aber hier zur Sicherheit) */
#lpp-withdraw-modal .lpp-modal-title {
    text-align: left;
}

/* Korrigiert die Textausrichtung innerhalb des Formulars, wenn die Adresse fehlt */
#lpp-withdraw-modal .lpp-message-box.error {
    text-align: left !important;
}


/* BOX-STYLE für Adresse und Notizen (Pre-Tags) */
#lpp-withdraw-modal .lpp-deposit-content {
    position: relative;
    align-items: flex-start;
    margin-top: 5px;
}

#lpp-withdraw-modal .lpp-deposit-pre {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    
    /* Text/Box-Styles */
    color: #fff !important; 
    
    /* WICHTIGE ANPASSUNG: Standardmäßig linksbündig, aber mit Platz für Copy-Button */
    padding: 15px 80px 15px 15px; 
    box-sizing: border-box;
    min-height: 50px;
    line-height: 1.4;
    
    /* Flex-Eigenschaften zur vertikalen Zentrierung */
    display: flex; 
    align-items: center; /* Vertikale Zentrierung */
    
    /* Zentrierung nur für leere Zustände */
    justify-content: center; 
    text-align: center;
    
    white-space: pre-wrap; 
    overflow-wrap: break-word;
    word-wrap: break-word;
    
    font-size: 16px; 
}

/* ZU DIESER KLASSE WIRD BEI LEEREM ZUSTAND HINZUGEFÜGT (lpp-empty-state) */
#lpp-withdraw-modal .lpp-deposit-pre.lpp-empty-state {
    /* Wenn leer, wird der Platz für den Copy Button entfernt, um eine perfekte Zentrierung zu gewährleisten */
    padding: 15px; 
}


/* Korrektur für das NOTES-Feld ohne Copy-Button */
#lpp-withdraw-modal .lpp-deposit-pre:not(.lpp-copy-text) {
    padding-right: 15px; /* Korrigiert das Padding für das Notiz-Feld */
    font-size: 14px; 
    color: rgba(255, 255, 255, 0.7) !important;
}

#lpp-withdraw-modal strong {
    color: #fff; 
    display: block; 
    margin-top: 15px; 
    text-align: left; /* FIX: Überschreibt Standard-Zentrierung */
}
#lpp-withdraw-modal p {
    margin: 0;
}


/* Copy-Button Tooltip-Stil */
#lpp-copy-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 1000000;
    display: none;
    text-align: center;
}

/* FIX: Stellt sicher, dass die Nachricht am Ende des Modals linksbündig ist */
#lpp-withdraw-modal #tab-withdraw-wallet .lpp-message-box {
    /* Setzt die Ausrichtung des Message Box Textes auf links */
    text-align: left !important; 
    
    /* FIX: Zentriert den Button, der in dieser Message Box enthalten ist */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* FIX: Korrigiert die Ausrichtung des Buttons Open General Settings im Message Box */
#lpp-withdraw-modal #tab-withdraw-wallet .lpp-message-box .lpp-btn {
    width: auto; /* Button nimmt nur den benötigten Platz ein */
    margin-top: 10px;
}


/* FIX: Stellt die Zentrierung für die gesamte Wallet Settings-Ansicht wieder her (für leere Ansicht) */
#lpp-withdraw-modal #tab-withdraw-wallet {
    /* WICHTIG: Stellt die Standard-Display-Eigenschaft wieder her, 
       damit spezifische Kindelemente den Fluss steuern können */
    display: block; 
    text-align: left; /* Überschreibt die Center-Regel von außen */
}

/* Ausnahmen: Elemente, die linksbündig bleiben müssen */
#lpp-withdraw-modal #tab-withdraw-wallet .lpp-modal-title,
#lpp-withdraw-modal #tab-withdraw-wallet strong,
#lpp-withdraw-modal #tab-withdraw-wallet .lpp-deposit-content,
#lpp-withdraw-modal #tab-withdraw-wallet .lpp-message-box {
    /* Stellt sicher, dass diese Elemente den vollen Platz einnehmen und linksbündig sind */
    width: 100%;
    text-align: left !important;
    align-self: flex-start;
}
/* Ende der Wallet Settings Zentrierungskorrektur */


.lpp-message-box {
    background-color: #241f1d;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    color: #fff;
}

/* ========================================================================= */
/* KRITISCHER FINAL-LAYOUT FIX (V5.3.77): Erzeugt die breite, orange Admin-Box */
/* ========================================================================= */

/* 1. Stellt die Container-Formatierung als breite, blaue WP-Meldung wieder her */
#lpp-dashboard-wrapper .lpp-admin-preview-notice {
    /* WP Default Blue Notification Style */
    background: #00a0d2; 
    background-color: #00a0d2 !important; /* Erzwingt Blau als Hintergrund */
    border: none;
    box-shadow: none;
    
    /* Text und Padding für zentriertes Layout */
    color: #fff; /* Weisse Schrift */
    padding: 10px 20px;
    margin: 15px 0 20px 0;
    border-radius: 4px;
    
    /* Layout für zentrierte Ausrichtung des Buttons */
    display: flex; 
    align-items: center;
    justify-content: center; /* Zentriert den Inhalt */
    gap: 15px; /* Abstand zwischen Text und Button */
    
    font-size: 14px;
    line-height: 1.5;
}

/* 2. Repariert den Button-Stil innerhalb des blauen Kastens und macht ihn ORANGE und GRÖSSER */
#lpp-dashboard-wrapper .lpp-admin-preview-notice a.button {
    /* WP Default Reset */
    background: initial !important;
    border: initial !important;
    color: initial !important;
    font-weight: initial !important;
    cursor: initial !important;
    text-decoration: initial !important;
    box-sizing: initial !important;
    line-height: initial !important;
    transition: none !important;
    
    /* LPP ORANGE & GRÖSSE */
    background-color: #f28c18 !important; /* LPP ORANGE */
    color: #fff !important;
    border: none !important;
    box-shadow: 0 0 0 rgba(0,0,0,0.1) !important;
    
    /* Macht den Button größer und prominenter */
    padding: 8px 18px !important; 
    font-size: 14px !important;
    height: auto !important; 
    line-height: 1.2 !important; 
    text-shadow: none !important;
}

#lpp-dashboard-wrapper .lpp-admin-preview-notice a.button:hover {
    background-color: #d87e15 !important; /* Darker Orange on hover */
}

/* --- NEUE BENACHRICHTIGUNGS-STYLES (V5.4.9) --- */

/* ALLGEMEINE OUTLINE FÜR DIE GLOCKE (MUSS WEISS SEIN) */
#lpp-notification-wrapper.lpp-btn-outline {
    /* FIX: WHITE OUTLINE & ICON COLOR */
    color: #fff !important; 
    border: 1px solid #fff !important; /* KORRIGIERT: Weißer Rahmen */
    
    /* FIX: Höhe korrigiert durch Padding Anpassung (Passt zur 36px Höhe der anderen Button) */
    padding: 8px 18px !important; 
    height: 36px; 
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s; 
    
    /* Setzt den Hintergrund auf Transparent, um nicht orange zu werden */
    background-color: transparent !important;
}

/* EXPLIZITE FIX FÜR DAS ICON (Stellt sicher, dass das SVG weiß ist) */
#lpp-notification-wrapper #lpp-notification-icon {
    stroke: #fff !important; /* KORRIGIERT: Icon Stroke weiß */
    transition: stroke 0.2s; /* Für Hover-Effekt (optional) */
}

#lpp-notification-wrapper.lpp-btn-outline:hover {
    /* FIX: Leichte Aufhellung */
    background-color: rgba(255, 255, 255, 0.1) !important; /* Sehr leichte weiße Aufhellung */
    border-color: #fff !important;
}

#lpp-notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #dc3545; /* Rot für Ungelesen */
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    line-height: 1;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 0 0 2px #241f1d; /* Border matching dashboard bg */
}

.lpp-notification-dropdown {
    /* FIX: ÄNDERUNG VON POSITION: ABSOLUTE ZU FIXED FÜR SCROLL-FOLLOW */
    position: fixed; 
    top: auto; /* Wird durch JS dynamisch gesetzt */
    
    /* CSS für Dropdown-Design */
    right: 0;
    margin-top: 0;
    background-color: #2a2522;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    width: 350px;
    max-height: 450px;
    overflow: hidden;
    z-index: 10000;
}

/* KRITISCHER FIX FÜR DAS NOTIFICATION MODAL (Mobil zentriert) */
@media (max-width: 768px) {
    .lpp-notification-dropdown {
        top: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        left: 50% !important;
        margin: 0 !important; 
        width: 95%;
        max-width: 500px;
    }
}
/* ENDE KRITISCHER FIX FÜR DAS NOTIFICATION MODAL */

.lpp-notification-header {
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    color: #f28c18; /* Orange Accent */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lpp-notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.lpp-notification-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

.lpp-notification-item.unread {
    background-color: rgba(242, 140, 24, 0.1); /* Leichter Orange-Hintergrund für ungelesene */
    font-weight: 500;
}

.lpp-notification-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.lpp-notif-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px; 
    margin-right: 10px;
    font-size: 18px;
    text-align: center;
    
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Spezifische Icon-Styles */
.lpp-notif-icon-success::before {
    content: '\2713'; /* Checkmark */
    color: #28a745; 
}
.lpp-notif-icon-warning::before {
    content: '\26A0'; /* Warning Sign */
    color: #f28c18; 
}
.lpp-notif-icon-debit::before {
    content: '\2193'; /* Down Arrow */
    color: #dc3545; 
    font-size: 20px;
}
.lpp-notif-icon-credit::before {
    content: '\2191'; /* Up Arrow */
    color: #28a745; 
    font-size: 20px;
}
.lpp-notif-icon-info::before {
    content: '\24D8'; /* Circled i */
    color: #1e90ff; 
}


.lpp-notif-content {
    flex-grow: 1;
}

.lpp-notif-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #fff;
    /* font-weight: 600; */
}

.lpp-notif-meta {
    display: block;
    font-size: 0.8em; /* 10px */
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.lpp-notification-footer {
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* KRITISCHER FIX FÜR DEN 'Mark All as Read' BUTTON */
#lpp-mark-all-read-btn {
    /* Übernimmt Basis-Outline-Stile von lpp-btn-outline */
    background-color: transparent !important;
    border: 1px solid #f28c18 !important; 
    color: #f28c18 !important;
    
    /* Stellt sicher, dass er die volle Breite nimmt und WP-Default-Style überschreibt */
    width: 100% !important; 
    box-sizing: border-box !important;
    padding: 8px 12px !important;
    line-height: 1.2 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    border-radius: 5px !important;
    
    /* Hover-Effekt wie die anderen Outline-Button */
    transition: background-color 0.2s;
}

#lpp-mark-all-read-btn:hover {
    background-color: rgba(242, 140, 24, 0.1) !important;
}

/* --- NEU: PASSWORD STRENGTH INDICATOR STYLES --- */
#lpp-password-strength-container {
    margin: 10px 0 20px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#lpp-password-strength-indicator {
    height: 6px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
    display: none;
}

#lpp-password-strength-indicator::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease-in-out, background-color 0.3s;
}

#lpp-password-strength-indicator.password-weak::after {
    width: 33%;
    background-color: #dc3545; /* Red */
}
#lpp-password-strength-indicator.password-medium::after {
    width: 66%;
    background-color: #ffc107; /* Yellow */
}
#lpp-password-strength-indicator.password-strong::after {
    width: 100%;
    background-color: #28a745; /* Green */
}

#lpp-password-strength-text {
    font-size: 0.9em;
    font-weight: 600;
}
#lpp-password-strength-text.weak { color: #dc3545; }
#lpp-password-strength-text.medium { color: #ffc107; }
#lpp-password-strength-text.strong { color: #28a745; }
/* --- ENDE PASSWORD STRENGTH INDICATOR STYLES --- */

/* CHIRURGISCHER FIX: Tooltip Styling (pointer-events entfernt, z-index erhöht) */
#lpp-tooltip-container {
    position: fixed; 
    z-index: 1000001; /* HÖHERER Z-INDEX (ÜBER MODALS) */
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.2s;
    
    /* KRITISCHER FIX: pointer-events: none; ENTFERNT, damit Klicks auf Mobilgeräten funktionieren */
    
    /* Basis-Styling aus dem Dark Theme */
    background-color: #2a2522; /* Dunkler Modal-Hintergrund */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 13px;
    max-width: 300px;
    text-align: left;
    line-height: 1.4;
}

/* --- LPP-Stil für die Auszahlungs-Kalkulation im Modal --- */

/* Der Hauptcontainer für die Zusammenfassung */
#lpp-fee-calculator {
    background: #2f2f2f; /* Dunkler Hintergrund */
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 20px;
    margin-bottom: 20px; /* Abstand zum Submit-Button */
}

/* Jede Zeile in der Zusammenfassung (z.B. "Total Deduction...") */
.fee-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    padding: 8px 0;
    border-bottom: 1px dashed #444;
}

/* Die Beschriftung auf der linken Seite (z.B. "Total Deduction (Gross):") */
.fee-calc-row .fee-calc-label {
    color: #ccc; /* Helles Grau für die Beschriftung */
}

/* Der Wert auf der rechten Seite (z.B. "$1000.00") */
.fee-calc-row .fee-calc-value {
    font-weight: 600;
    color: #fff; /* Weiß für den Wert */
}

/* Die letzte Zeile ("You Will Receive (Net):") wird hervorgehoben */
.fee-calc-row-net {
    font-size: 1.15rem;
    font-weight: bold;
    color: #f28c18; /* LPP Orange für die Beschriftung */
    padding-top: 15px;
    margin-top: 10px;
    border-top: 1px solid #555;
    border-bottom: none; /* Entfernt die gestrichelte Linie am Ende */
}

/* Der finale Netto-Betrag wird ebenfalls hervorgehoben */
.fee-calc-row-net .fee-calc-value-net {
    color: #f28c18; /* LPP Orange für den Wert */
    font-weight: bold;
}

/* ========================================================================= */
/* LIVE EARNING SONAR BADGE (Zins-Anzeige im Chart) - FRAMELESS V3 */
/* ========================================================================= */

.lpp-live-earning-badge {
    position: absolute;
    /* Zieht das Badge nach oben zwischen Wert und Diagramm */
    top: -12px; 
    /* Verankert es rechts */
    right: -3px; 
    z-index: 20; 
    
    display: flex;
    align-items: center;
    gap: 8px;
    
    /* Dunklerer Hintergrund für Kontrast */
    background-color: rgba(20, 20, 20, 0.85); 
    
    /* RAHMEN ENTFERNT */
    border: none; 
    
    padding: 4px 12px;
    border-radius: 20px;
    
    backdrop-filter: blur(4px); 
    /* Leichter Schatten, damit es sich vom Hintergrund abhebt */
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.lpp-earning-text {
    font-size: 11px;
    color: #28a745; /* Success Green */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap; 
}

.lpp-earning-text strong {
    font-weight: 800;
    font-size: 12px;
    color: #fff; 
}

/* Der pulsierende Punkt (Glow bleibt) */
.lpp-sonar-emitter {
    position: relative;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    box-shadow: 0 0 6px #28a745; 
}

/* Die Welle */
.lpp-sonar-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: transparent;
    /* Welle bleibt als Ring sichtbar */
    border: 2px solid #28a745; 
    opacity: 0;
    z-index: -1;
    
    animation: lpp-sonar-pulse 2.5s infinite ease-out;
}

@keyframes lpp-sonar-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        border-width: 2px;
    }
    100% {
        transform: translate(-50%, -50%) scale(3.5); 
        opacity: 0;
        border-width: 0px;
    }
}

@media (max-width: 768px) {
    .lpp-live-earning-badge {
        top: -8px; 
        right: -3px;
        padding: 3px 10px;
    }
    .lpp-earning-text {
        font-size: 10px;
    }
    .lpp-earning-text strong {
    font-weight: 600;
    font-size: 10px;
    color: #fff; 
}
}

/* ========================================================================= */
/* PENDING INVESTMENT BADGE (Roter Waiting Status) */
/* ========================================================================= */

.lpp-pending-badge {
   position: absolute;
    /* Zieht das Badge nach oben zwischen Wert und Diagramm */
    top: -12px; 
    /* Verankert es rechts */
    right: -3px; 
    z-index: 20; 
    
    display: flex;
    align-items: center;
    gap: 8px;
    
    background-color: rgba(20, 20, 20, 0.85);
    border: none;
    padding: 4px 12px;
    border-radius: 20px;
    
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.lpp-status-dot-red {
    width: 8px;
    height: 8px;
    background-color: #dc3545; /* Danger Red */
    border-radius: 50%;
    box-shadow: 0 0 6px #dc3545; /* Statischer Glow (kein Puls) */
}

.lpp-pending-text {
    font-size: 11px;
    color: #dc3545; /* Red Text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
    font-weight: 800;
}

/* Mobile Anpassung */
@media (max-width: 768px) {
    .lpp-pending-badge {
        top: -8px;
        padding: 3px 10px;
    }
    .lpp-pending-text {
        font-size: 10px;
    }
    .lpp-pending-text strong {
    font-weight: 600;
    font-size: 10px;
    color: #fff; 
}
}

/* ========================================================================= */
/* TEAM LIST STYLING (MATCHING TRANSACTION HISTORY) */
/* ========================================================================= */

/* Container-Rahmen und Hintergrund */
#lpp-team-list-container {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    /* Angleichung an Transaction History Border (0.1) */
    border: 1px solid rgba(255, 255, 255, 0.1) !important; 
    overflow: hidden;
    color: #fff;
    margin-bottom: 20px;
}

/* Header-Bereich */
#lpp-team-list-container .lpp-history-header {
    padding: 15px 20px;
    /* Angleichung an Transaction History Border (0.1) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: bold;
    font-size: 16px;
}

/* Scrollbarer Bereich (Body) */
#lpp-team-list-container .lpp-history-body {
    /* Begrenzt die Höhe auf ca. 5-6 Einträge, danach Scrollbalken */
    max-height: 280px !important; 
    overflow-y: auto !important;
}

/* Tabellen-Zeilen */
#lpp-team-list-container tr {
    /* Angleichung an Transaction History Border (0.1) */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#lpp-team-list-container tr:last-child {
    border-bottom: none !important;
}

/* Tabellen-Header (Sticky) */
#lpp-team-list-container thead {
    background-color: rgba(0, 0, 0, 0.2) !important; /* Etwas dunklerer Header */
    position: sticky;
    top: 0;
    z-index: 2;
}

/* ------------------------------------------------------------------------- */
/* MOBILE OPTIMIERUNG FÜR TEAM LISTE (Karten-Ansicht) */
/* ------------------------------------------------------------------------- */

@media (max-width: 768px) {
    
    /* Header ausblenden */
    #lpp-team-list-container thead {
        display: none;
    }

    /* Zeilen als Blöcke/Karten darstellen */
    #lpp-team-list-container tr {
        display: flex;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.2) !important;
        margin-bottom: 10px;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 4px;
        padding: 10px;
    }
    
    /* Zellen als volle Breite */
    #lpp-team-list-container td {
        display: flex;
        justify-content: space-between;
        padding: 5px 0 !important;
        border: none !important;
        text-align: left !important;
        width: 100%;
    }

    /* Labels für Mobile hinzufügen (Pseudo-Elemente) */
    #lpp-team-list-container td:nth-child(1)::before { content: "Level:"; color: #777; font-size: 0.9em; margin-right: 10px; }
    #lpp-team-list-container td:nth-child(2)::before { content: "Name:"; color: #777; font-size: 0.9em; margin-right: 10px; }
    #lpp-team-list-container td:nth-child(3)::before { content: "ID:"; color: #777; font-size: 0.9em; margin-right: 10px; }
    
    /* Rechtsbündige ID auf Mobile linksbündig machen (für Einheitlichkeit) */
    #lpp-team-list-container td:nth-child(3) {
        text-align: left !important;
        font-family: monospace;
    }
}