/* dashboard.css - Komplettes CSS für das Dashboard mit Verifikationssystem */

/* ====================================================================
   GRUNDLEGENDE VARIABLEN UND RESET
   ==================================================================== */

   :root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #1abc9c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --gray-color: #95a5a6;
    --white-color: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

#tabPackShot body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--dark-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ====================================================================
   HEADER UND NAVIGATION
   ==================================================================== */

#tabPackShot .dashboard-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

#tabPackShot .dashboard-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

#tabPackShot .header-left h1 {
    margin-bottom: 0.5rem;
}

#tabPackShot .header-right .card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* ====================================================================
   CARDS
   ==================================================================== */

#tabPackShot .card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
    /* Wichtig für Verifikations-Badges */
}

#tabPackShot .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

#tabPackShot .card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
    font-weight: 600;
}

#tabPackShot .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

#tabPackShot .card-body {
    padding: 20px;
}

/* ====================================================================
   KPI KOMPONENTEN
   ==================================================================== */

#tabPackShot .kpi-card {
    text-align: center;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 40px;
    /* Platz für Verifikations-Badge */
}

#tabPackShot .kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0;
    color: var(--primary-color);
    line-height: 1.2;
}

#tabPackShot .kpi-label {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Info Buttons */
#tabPackShot .kpi-info-btn {
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    font-size: 11px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    background: #f8f9fa !important;
    color: #6c757d !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    margin-left: 8px;
}

#tabPackShot .kpi-info-btn:hover {
    background: var(--secondary-color) !important;
    color: white !important;
    transform: scale(1.1) !important;
    border-color: var(--secondary-color) !important;
}

/* ====================================================================
   VERIFIKATIONS-BADGES - NEU!
   ==================================================================== */

#tabPackShot .verification-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

#tabPackShot .verification-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Success State - Grüner Haken */
#tabPackShot .verification-success {
    background-color: #28a745;
    color: white;
}

#tabPackShot .verification-success:hover {
    background-color: #1e7e34;
}

/* Warning State - Gelbes Dreieck */
#tabPackShot .verification-warning {
    background-color: #ffc107;
    color: #212529;
}

#tabPackShot .verification-warning:hover {
    background-color: #e0a800;
}

/* Error State - Rotes X */
#tabPackShot .verification-error {
    background-color: #dc3545;
    color: white;
    animation: verificationPulse 2s infinite;
}

#tabPackShot .verification-error:hover {
    background-color: #c82333;
    animation: none;
}

/* Pulse Animation für Aufmerksamkeit */
@keyframes verificationPulse {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    50% {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4), 0 0 0 4px rgba(220, 53, 69, 0.2);
    }

    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Mobile Anpassungen für Badges */
@media (max-width: 768px) {
    #tabPackShot .verification-badge {
        width: 20px;
        height: 20px;
        font-size: 10px;
        bottom: 6px;
        right: 6px;
    }
}

/* ====================================================================
   VERIFIKATIONS-MODAL STYLES
   ==================================================================== */

#tabPackShot .calculation-steps {
    padding: 0;
}

#tabPackShot .step {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#tabPackShot .step:last-child {
    border-bottom: none;
}

#tabPackShot .step-result {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 4px;
}

#tabPackShot .step-error {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 3px solid #dc3545;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 4px;
}

#tabPackShot .step-label {
    font-weight: 500;
    color: #6c757d;
}

#tabPackShot .step-value {
    font-weight: 600;
    color: #495057;
}

/* ====================================================================
   CARD BORDER UPDATES BASIEREND AUF VERIFIKATION
   ==================================================================== */

/* Spezielle Hervorhebung für KPIs mit Verifikation */
#tabPackShot .card:has(.verification-error) {
    border-color: #dc3545 !important;
    border-width: 2px !important;
}

#tabPackShot .card:has(.verification-warning) {
    border-color: #ffc107 !important;
    border-width: 2px !important;
}

#tabPackShot .card:has(.verification-success) {
    border-color: #28a745 !important;
}

/* ====================================================================
   PROGRESS BARS
   ==================================================================== */

#tabPackShot .progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

#tabPackShot .progress-bar {
    transition: width 0.6s ease;
}

/* ====================================================================
   BORDERED CARDS
   ==================================================================== */

#tabPackShot .border-success {
    border-left: 4px solid var(--success-color) !important;
}

#tabPackShot .border-primary {
    border-left: 4px solid var(--secondary-color) !important;
}

#tabPackShot .border-warning {
    border-left: 4px solid var(--warning-color) !important;
}

#tabPackShot .border-info {
    border-left: 4px solid var(--info-color) !important;
}

#tabPackShot .border-danger {
    border-left: 4px solid var(--danger-color) !important;
}

#tabPackShot .border-secondary {
    border-left: 4px solid var(--gray-color) !important;
}

/* ====================================================================
   TEXT COLORS
   ==================================================================== */

#tabPackShot .text-success {
    color: var(--success-color) !important;
}

#tabPackShot .text-primary {
    color: var(--secondary-color) !important;
}

#tabPackShot .text-warning {
    color: var(--warning-color) !important;
}

#tabPackShot .text-info {
    color: var(--info-color) !important;
}

#tabPackShot .text-danger {
    color: var(--danger-color) !important;
}

#tabPackShot .text-secondary {
    color: var(--gray-color) !important;
}

/* ====================================================================
   CHARTS
   ==================================================================== */

#tabPackShot .chart-container {
    position: relative;
    height: 300px;
    margin-top: 15px;
}

#tabPackShot .trend-chart-container {
    height: 250px;
    position: relative;
}

#tabPackShot #offerTrendContainer {
    height: 250px;
    position: relative;
}

/* ====================================================================
   SENTIMENT GAUGE UND ANZEIGE
   ==================================================================== */

#tabPackShot .gauge-container {
    position: relative;
    margin: 0 auto;
    max-width: 200px;
    text-align: center;
    padding: 10px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#tabPackShot .gauge-container canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 150px;
    margin: 0 auto;
    display: block;
}

#tabPackShot .gauge-value {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 10px;
    line-height: 1;
}

#tabPackShot #offerSentimentValue {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    z-index: 10;
}

#tabPackShot .sentiment-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 5px 0;
    position: relative;
    z-index: 5;
}

#tabPackShot #offerSentimentText {
    margin-top: 60px;
}

/* Sentiment Colors */
#tabPackShot .extreme-fear-color {
    color: #e74c3c;
}

#tabPackShot .fear-color {
    color: #e67e22;
}

#tabPackShot .neutral-color {
    color: #f1c40f;
}

#tabPackShot .greed-color {
    color: #2ecc71;
}

#tabPackShot .extreme-greed-color {
    color: #27ae60;
}

/* Sentiment Explanation */
#tabPackShot .sentiment-explanation {
    padding: 10px;
}

#tabPackShot .sentiment-explanation h6 {
    font-weight: 600;
    margin-bottom: 0.8rem;
}

#tabPackShot .sentiment-explanation p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

#tabPackShot .sentiment-scale-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

#tabPackShot .sentiment-scale-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}

#tabPackShot .sentiment-marker {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

#tabPackShot .extreme-fear {
    background-color: #e74c3c;
}

#tabPackShot .fear {
    background-color: #e67e22;
}

#tabPackShot .neutral {
    background-color: #f1c40f;
}

#tabPackShot .greed {
    background-color: #2ecc71;
}

#tabPackShot .extreme-greed {
    background-color: #27ae60;
}

/* ====================================================================
   TABELLEN
   ==================================================================== */

#tabPackShot .custom-table {
    width: 100%;
    border-collapse: collapse;
}

#tabPackShot .custom-table th {
    font-weight: 600;
    color: var(--gray-color);
    padding: 12px 15px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

#tabPackShot .custom-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

#tabPackShot .custom-table tr:last-child td {
    border-bottom: none;
}

#tabPackShot .custom-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
    transition: background-color var(--transition-speed) ease;
}

#tabPackShot .summary-row {
    background-color: #f8f9fa;
    font-weight: bold;
}

#tabPackShot .summary-row td {
    border-top: 2px solid #dee2e6;
}

/* Badge-Styles für Tabellen */
#tabPackShot .badge-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
}

#tabPackShot .sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

#tabPackShot #offerDetailsTable th {
    font-size: 0.8rem;
    padding: 8px 6px;
}

#tabPackShot #offerDetailsTable td {
    padding: 6px;
    vertical-align: middle;
}

#tabPackShot #offerDetailsTable tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* ====================================================================
   DECKUNGSBEITRAGSSCHEMA
   ==================================================================== */

#tabPackShot .kalkulation-schema {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

#tabPackShot .schema-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
    min-height: 60px;
}

#tabPackShot .schema-row:hover {
    background-color: #f8f9fa;
}

#tabPackShot .schema-row:last-child {
    border-bottom: none;
}

/* LABELS */
#tabPackShot .schema-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    font-weight: 500;
    color: #495057;
}

#tabPackShot .schema-operation {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6c757d;
    min-width: 30px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

#tabPackShot .schema-label i {
    font-size: 1rem;
    color: #6c757d;
    width: 18px;
    text-align: center;
}

#tabPackShot .schema-label span {
    font-size: 0.95rem;
}

/* VALUES */
#tabPackShot .schema-value {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-align: right;
    flex-shrink: 0;
}

#tabPackShot .schema-percent {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    padding: 2px 6px;
    background: #f8f9fa;
    border-radius: 4px;
    min-width: 50px;
    text-align: center;
    border: 1px solid #e9ecef;
}

/* FARBEN - NUR FÜR ZAHLEN */
#tabPackShot .value-positive {
    color: #28a745 !important;
    font-weight: 700;
}

#tabPackShot .value-negative {
    color: #dc3545 !important;
    font-weight: 700;
}

#tabPackShot .value-neutral {
    color: #495057 !important;
    font-weight: 600;
}

/* SPEZIELLE ZEILEN */
#tabPackShot .schema-row.umsatz {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

#tabPackShot .schema-row.umsatz .schema-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #495057;
}

#tabPackShot .schema-row.result {
    background-color: #f8f9fa;
    border-top: 2px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

#tabPackShot .schema-row.final-result {
    background-color: #f1f3f4;
    border-top: 3px solid #adb5bd;
    font-weight: 700;
}

#tabPackShot .schema-row.final-result .schema-value {
    font-size: 1.15rem;
}

/* INFO ICONS */
#tabPackShot .info-icon {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    font-size: 0.85rem;
    color: #6c757d;
    margin-left: 6px;
}

#tabPackShot .info-icon:hover {
    opacity: 1;
    color: #495057;
}

/* ZUSAMMENFASSUNG */
#tabPackShot .schema-summary {
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    padding: 20px;
    border-top: 1px solid #dee2e6;
}

#tabPackShot .summary-item {
    text-align: center;
    padding: 0 10px;
}

#tabPackShot .summary-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

#tabPackShot .summary-value {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 3px;
}

#tabPackShot .summary-detail {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ====================================================================
   SECTION TITLES UND KPI SEKTIONEN
   ==================================================================== */

#tabPackShot .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

#tabPackShot .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--danger-color);
}

/* KPI Section Styles */
#tabPackShot .kpi-section {
    margin-bottom: 2rem;
}

#tabPackShot .section-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    color: #495057;
}

#tabPackShot .section-header i {
    font-size: 1.1rem;
}

#tabPackShot .section-header small {
    font-size: 0.75rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Farbliche Hervorhebung der Sektionen */
#tabPackShot .kpi-section:nth-child(1) .section-header {
    color: #6c757d;
    border-bottom-color: #6c757d;
}

#tabPackShot .kpi-section:nth-child(2) .section-header {
    color: #28a745;
    border-bottom-color: #28a745;
}

#tabPackShot .kpi-section:nth-child(3) .section-header {
    color: #ffc107;
    border-bottom-color: #ffc107;
}

#tabPackShot .kpi-section:nth-child(4) .section-header {
    color: #17a2b8;
    border-bottom-color: #17a2b8;
}

#tabPackShot .kpi-section:nth-child(5) .section-header {
    color: #17a2b8;
    border-bottom-color: #17a2b8;
}

/* Gruppierung der KPI-Sektionen */
#tabPackShot .kpi-section:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1.5rem;
}

/* ====================================================================
   DESKTOP KPI GLOW-EFFEKTE
   ==================================================================== */

/* Spezielle Glow-Effekte für wichtige KPIs - Desktop Version */
#tabPackShot .kpi-glow-green {
    position: relative !important;
    overflow: visible !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #28a745 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#tabPackShot .kpi-glow-green:hover {
    box-shadow:
        0 0 30px rgba(46, 204, 113, 0.4),
        0 0 60px rgba(46, 204, 113, 0.3),
        0 0 90px rgba(46, 204, 113, 0.2),
        0 15px 40px rgba(0, 0, 0, 0.2) !important;

    border: 2px solid transparent !important;
    background:
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg,
            rgba(46, 204, 113, 0.8) 0%,
            rgba(39, 174, 96, 0.9) 25%,
            rgba(46, 204, 113, 0.8) 50%,
            rgba(39, 174, 96, 0.9) 75%,
            rgba(46, 204, 113, 0.8) 100%) border-box !important;

    transform: translateY(-8px) scale(1.05) !important;
    z-index: 999 !important;
}

#tabPackShot .kpi-glow-green:hover .kpi-value {
    color: #27ae60 !important;
    text-shadow:
        0 0 20px rgba(46, 204, 113, 0.5),
        0 0 40px rgba(46, 204, 113, 0.4) !important;
    font-weight: 800 !important;
}

#tabPackShot .kpi-glow-green:hover .kpi-label {
    color: #27ae60 !important;
    font-weight: 600 !important;
}

#tabPackShot .kpi-glow-green:hover .kpi-label i {
    color: #2ecc71 !important;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.5) !important;
    filter: drop-shadow(0 0 5px rgba(46, 204, 113, 0.5)) !important;
}

/* Goldener Glow für Ultimate Profit */
#tabPackShot .kpi-glow-gold {
    position: relative !important;
    overflow: visible !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #ffc107 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#tabPackShot .kpi-glow-gold:hover {
    box-shadow:
        0 0 30px rgba(255, 193, 7, 0.4),
        0 0 60px rgba(255, 193, 7, 0.3),
        0 0 90px rgba(255, 193, 7, 0.2),
        0 15px 40px rgba(0, 0, 0, 0.2) !important;

    border: 2px solid transparent !important;
    background:
        linear-gradient(white, white) padding-box,
        linear-gradient(135deg,
            rgba(255, 193, 7, 0.8) 0%,
            rgba(255, 152, 0, 0.9) 25%,
            rgba(255, 193, 7, 0.8) 50%,
            rgba(255, 152, 0, 0.9) 75%,
            rgba(255, 193, 7, 0.8) 100%) border-box !important;

    transform: translateY(-8px) scale(1.05) !important;
    z-index: 999 !important;
}

#tabPackShot .kpi-glow-gold:hover .kpi-value {
    color: #f39c12 !important;
    text-shadow:
        0 0 20px rgba(255, 193, 7, 0.5),
        0 0 40px rgba(255, 193, 7, 0.4) !important;
    font-weight: 800 !important;
}

#tabPackShot .kpi-glow-gold:hover .kpi-label {
    color: #f39c12 !important;
    font-weight: 600 !important;
}

#tabPackShot .kpi-glow-gold:hover .kpi-label i {
    color: #ffc107 !important;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5) !important;
    filter: drop-shadow(0 0 5px rgba(255, 193, 7, 0.5)) !important;
}

/* Desktop-spezifische Verbesserungen */
@media (min-width: 769px) {

    #tabPackShot .kpi-glow-green:hover,
#tabPackShot .kpi-glow-gold:hover {
        transform: translateY(-10px) scale(1.06);
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    #tabPackShot .kpi-glow-green:hover {
        box-shadow:
            0 0 35px rgba(46, 204, 113, 0.5),
            0 0 70px rgba(46, 204, 113, 0.4),
            0 0 105px rgba(46, 204, 113, 0.3),
            0 20px 50px rgba(0, 0, 0, 0.25) !important;
    }

    #tabPackShot .kpi-glow-gold:hover {
        box-shadow:
            0 0 35px rgba(255, 193, 7, 0.5),
            0 0 70px rgba(255, 193, 7, 0.4),
            0 0 105px rgba(255, 193, 7, 0.3),
            0 20px 50px rgba(0, 0, 0, 0.25) !important;
    }
}

/* Performance-Optimierung */
#tabPackShot .kpi-glow-green,
#tabPackShot .kpi-glow-gold {
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    perspective: 1000px;
    cursor: pointer;
}

/* ====================================================================
   PERFORMANCE METRICS
   ==================================================================== */

#tabPackShot .performance-metric {
    padding: 15px;
}

#tabPackShot .metric-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

#tabPackShot .metric-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

#tabPackShot .metric-previous {
    font-size: 0.9rem;
    margin: 5px 0;
}

#tabPackShot .metric-change {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 5px;
}

/* ====================================================================
   KOSTEN-MANAGEMENT
   ==================================================================== */

#tabPackShot .costs-modal .nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    border: 1px solid transparent;
    font-weight: 500;
}

#tabPackShot .costs-modal .nav-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

#tabPackShot .costs-modal .cost-name,
#tabPackShot .costs-modal .cost-description,
#tabPackShot .costs-modal .cost-amount {
    border: 1px solid #e0e0e0;
    transition: border-color var(--transition-speed) ease;
}

#tabPackShot .costs-modal .cost-name:focus,
#tabPackShot .costs-modal .cost-description:focus,
#tabPackShot .costs-modal .cost-amount:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

#tabPackShot .costs-modal .table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

#tabPackShot .costs-modal .btn-danger:hover {
    transform: scale(1.05);
}

#tabPackShot .costs-modal .card {
    transition: transform var(--transition-speed) ease;
}

#tabPackShot .costs-modal .card:hover {
    transform: translateY(-2px);
}

/* ====================================================================
   TOOLTIPS
   ==================================================================== */

#tabPackShot .tooltip-inner {
    max-width: 300px;
    padding: 10px 15px;
    background-color: var(--dark-color);
    border-radius: 6px;
    font-size: 0.85rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ====================================================================
   RESPONSIVE DESIGN
   ==================================================================== */

@media (max-width: 768px) {
    #tabPackShot .dashboard-header h1 {
        font-size: 1.5rem;
    }

    #tabPackShot .kpi-value {
        font-size: 1.5rem;
    }

    #tabPackShot .kpi-label {
        font-size: 0.8rem;
    }

    #tabPackShot .chart-container {
        height: 250px;
    }

    #tabPackShot .header-right .card-body {
        padding: 0.75rem !important;
    }

    #tabPackShot .gauge-value {
        font-size: 1.8rem;
    }

    #tabPackShot #offerSentimentValue {
        font-size: 1.8rem;
    }

    #tabPackShot .sentiment-text {
        font-size: 0.9rem;
    }

    #tabPackShot .trend-chart-container {
        height: 200px;
    }

    #tabPackShot .section-header {
        font-size: 1.1rem;
        text-align: center;
    }

    #tabPackShot .section-header small {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }

    #tabPackShot .kpi-section .col-md-6,
#tabPackShot .kpi-section .col-md-3 {
        margin-bottom: 1rem;
    }

    #tabPackShot .kpi-card {
        padding-bottom: 35px;
    }

    /* Schema responsive */
    #tabPackShot .schema-row {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        min-height: auto;
    }

    #tabPackShot .schema-label {
        width: 100%;
    }

    #tabPackShot .schema-value {
        width: 100%;
        justify-content: flex-end;
        font-size: 1.1rem;
    }

    #tabPackShot .schema-operation {
        min-width: 25px;
        font-size: 1rem;
    }

    #tabPackShot .schema-percent {
        font-size: 0.8rem;
        min-width: 45px;
    }

    #tabPackShot .summary-item {
        margin-bottom: 15px;
        padding: 0 5px;
    }
}

@media (max-width: 576px) {
    #tabPackShot .header-left h1 {
        font-size: 1.25rem;
    }

    #tabPackShot .kpi-value {
        font-size: 1.25rem;
    }

    #tabPackShot .kpi-label {
        font-size: 0.75rem;
    }

    #tabPackShot .card-body {
        padding: 15px;
    }

    #tabPackShot .chart-container {
        height: 200px;
    }

    #tabPackShot .kpi-card {
        padding-bottom: 30px;
    }

    #tabPackShot .schema-row {
        padding: 12px 14px;
    }

    #tabPackShot .schema-value {
        font-size: 1rem;
    }

    #tabPackShot .schema-row.final-result .schema-value {
        font-size: 1.1rem;
    }
}

/* ====================================================================
   ZUSÄTZLICHE STYLES AUS AJAX-DASHBOARD
   ==================================================================== */

/* Performance Metriken Styles */
#tabPackShot .performance-metric {
    padding: 15px;
    text-align: center;
}

#tabPackShot .metric-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 500;
}

#tabPackShot .metric-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 5px 0;
}

#tabPackShot .metric-previous {
    font-size: 0.9rem;
    margin: 5px 0;
    color: #6c757d;
}

#tabPackShot .metric-change {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 5px;
}

/* Verifikations-Modal zusätzliche Styles */
#tabPackShot .verification-modal .table-responsive {
    max-height: 400px;
    overflow-y: auto;
}

#tabPackShot .verification-modal .table {
    font-size: 0.9rem;
    margin-bottom: 0;
}

#tabPackShot .verification-modal .table th {
    font-size: 0.8rem;
    padding: 8px 6px;
    border-top: none;
    background-color: rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1;
}

#tabPackShot .verification-modal .table td {
    padding: 6px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#tabPackShot .verification-modal .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Modal Performance Optimierungen */
#tabPackShot .modal.fade .modal-dialog {
    transform: translate(0, -50px);
    transition: transform 0.3s ease-out;
}

#tabPackShot .modal.show .modal-dialog {
    transform: none;
}

/* Zusätzliche Badge-Animationen */
#tabPackShot .verification-badge.verification-success {
    animation: successPulse 3s ease-in-out infinite;
}

@keyframes successPulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    50% {
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3), 0 0 0 2px rgba(40, 167, 69, 0.1);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    #tabPackShot .verification-badge {
        border-color: #495057;
    }

    #tabPackShot .calculation-steps {
        background-color: #2d3748;
        color: #e2e8f0;
    }

    #tabPackShot .step {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    #tabPackShot .step-label {
        color: #a0aec0;
    }

    #tabPackShot .step-value {
        color: #e2e8f0;
    }
}

/* Focus States für Accessibility */
#tabPackShot .verification-badge:focus {
    outline: 3px solid rgba(52, 152, 219, 0.5);
    outline-offset: 2px;
}

#tabPackShot .kpi-info-btn:focus {
    outline: 2px solid rgba(52, 152, 219, 0.5);
    outline-offset: 1px;
}

/* Performance Optimierungen */
#tabPackShot .card,
#tabPackShot .verification-badge,
#tabPackShot .kpi-glow-green,
#tabPackShot .kpi-glow-gold {
    will-change: transform;
    backface-visibility: hidden;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    #tabPackShot .verification-badge,
#tabPackShot .card,
#tabPackShot .kpi-glow-green,
#tabPackShot .kpi-glow-gold {
        transition: none !important;
        animation: none !important;
    }

    #tabPackShot .verification-error {
        animation: none !important;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    #tabPackShot .verification-badge {
        border-width: 1px;
    }
}

/* ====================================================================
   PRINT STYLES
   ==================================================================== */

@media print {
    #tabPackShot .dashboard-header {
        background: white !important;
        color: black !important;
        box-shadow: none;
    }

    #tabPackShot .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    #tabPackShot .btn,
#tabPackShot .kpi-info-btn,
#tabPackShot .verification-badge {
        display: none !important;
    }

    #tabPackShot .chart-container {
        height: 250px;
    }

    #tabPackShot .kpi-glow-green,
#tabPackShot .kpi-glow-gold {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        background: white !important;
    }

    #tabPackShot .kpi-glow-green .kpi-value,
#tabPackShot .kpi-glow-gold .kpi-value {
        color: #333 !important;
        text-shadow: none !important;
    }

    /* Verifikations-Infos für Print */
    #tabPackShot .verification-badge::after {
        content: " [Verifiziert]";
        font-size: 8px;
        position: static;
        display: inline;
        color: #666;
    }
}


/* Auth Container Styles */
#tabPackShot .auth-container {
    position: relative;
    min-width: 350px;
}

#tabPackShot .auth-container input {
    font-size: 0.875rem;
}

#tabPackShot .auth-loading {
    width: 0.875rem;
    height: 0.875rem;
}

/* AUTH DROPDOWN - Absolute positioned to avoid navbar height changes */
#tabPackShot .auth-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    min-width: 350px;
    padding: 15px;
    margin-top: 5px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#tabPackShot .auth-method-selector {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

#tabPackShot .method-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin: 5px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

#tabPackShot .method-option:hover {
    border-color: #0d6efd;
    background-color: #f8f9ff;
}

#tabPackShot .method-option.selected {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

#tabPackShot .method-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

@media (max-width: 991px) {
    #tabPackShot .auth-container {
        min-width: auto;
        width: 100%;
        margin-top: 1rem;
    }

    #tabPackShot .auth-dropdown {
        position: fixed;
        top: 80px;
        left: 10px;
        right: 10px;
        min-width: auto;
        margin-top: 0;
    }
}

/* Hide content when not authenticated */
#tabPackShot .auth-required {
    display: none;
}

#tabPackShot .auth-required.show {
    display: block;
}

/* Navbar styles */
#tabPackShot .dashboard-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#tabPackShot .navbar-brand img {
    filter: brightness(0) invert(1);
}

/* Login prompt styles */
#tabPackShot .login-prompt {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* In dashboard.css am Ende hinzufügen oder bestehenden Code ersetzen: */

/* ====================================================================
   AUTHENTICATION STATES - VERBESSERT
   ==================================================================== */

/* Hide content when not authenticated - WICHTIG: Spezifität erhöhen */
#tabPackShot .auth-required {
    display: none !important;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show content when authenticated - WICHTIG: Noch höhere Spezifität */
#tabPackShot .auth-required.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Sicherstellen dass auch das Container-Element richtig angezeigt wird */
#tabPackShot #dashboardContent.auth-required.show {
    display: block !important;
}

/* Login prompt should only show when not authenticated */
#tabPackShot #loginPrompt {
    display: block;
}

#tabPackShot #loginPrompt.auth-hidden {
    display: none !important;
}

/* User info should only show when authenticated */
#tabPackShot #userInfo {
    display: none;
}

#tabPackShot #userInfo.auth-shown {
    display: block !important;
}

/* Auth container should hide when authenticated */
#tabPackShot #authContainer {
    display: block;
}

#tabPackShot #authContainer.auth-hidden {
    display: none !important;
}


/* ====================================================================
   MONATLICHE DECKUNGSBEITRAGSRECHNUNG
   ==================================================================== */

/* Horizontales Scrollen mit fester erster Spalte */
#tabPackShot .table-responsive {
    position: relative;
}

#tabPackShot .table-responsive table {
    margin-bottom: 0;
}

/* Sticky Header für monatliche Tabelle */
#tabPackShot .table-responsive thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 11;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Erste Spalte sticky (Kennzahl-Namen) */
#tabPackShot .table-responsive td[style*="position: sticky"],
#tabPackShot .table-responsive th[style*="position: sticky"] {
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

/* Monatsspalten - Basis-Styling */
#tabPackShot .table-responsive th,
#tabPackShot .table-responsive td {
    white-space: nowrap;
    padding: 10px 8px;
    font-size: 0.9rem;
}

/* Hervorhebung aktueller Monat */
#tabPackShot .table-info {
    background-color: rgba(13, 202, 240, 0.1) !important;
}

/* Monate mit Daten */
#tabPackShot .table-success {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

/* Jahresspalte */
#tabPackShot .table-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    font-weight: 600;
}

/* Negative Werte hervorheben */
#tabPackShot .text-danger {
    font-weight: 600;
}

/* Positive DB-Werte */
#tabPackShot .text-success {
    font-weight: 600;
}

/* Info-Werte (DB II) */
#tabPackShot .text-info {
    font-weight: 600;
}

/* Dunkle Zeile für DB III */
#tabPackShot .table-dark td,
#tabPackShot .table-dark th {
    background-color: #212529 !important;
    color: white !important;
    border-color: #32383e !important;
}

#tabPackShot .table-dark .text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Helle Trennzeilen für DB-Stufen */
#tabPackShot .table-light {
    background-color: #f8f9fa !important;
}

/* Badges in Tabellenkopf */
#tabPackShot .badge-sm {
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    font-weight: 600;
}

/* Hover-Effekte für bessere Lesbarkeit */
#tabPackShot .table-responsive tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Scroll-Hinweis für mobile Geräte */
@media (max-width: 768px) {
    #tabPackShot .table-responsive::after {
        content: '← Scrollen →';
        position: absolute;
        bottom: 10px;
        right: 20px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 0.75rem;
        pointer-events: none;
        animation: fadeInOut 3s ease-in-out infinite;
    }
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

/* Legende-Bereich */
#tabPackShot .bg-light.border-top {
    border-top: 2px solid #dee2e6 !important;
}

/* Verbesserte Lesbarkeit für kleine Werte */
#tabPackShot .table-responsive small {
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
}

/* Fokus auf finale Ergebnisse */
#tabPackShot .table-dark strong {
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

/* Tabellen-Zellen-Padding für bessere Dichte */
#tabPackShot .table-responsive td.text-end,
#tabPackShot .table-responsive th.text-end {
    padding-right: 12px;
}

#tabPackShot .table-responsive td.text-center,
#tabPackShot .table-responsive th.text-center {
    padding-left: 8px;
    padding-right: 8px;
}

/* Farbcodierung für schnelle Interpretation */
#tabPackShot .value-positive {
    color: #28a745;
    font-weight: 700;
}

#tabPackShot .value-negative {
    color: #dc3545;
    font-weight: 700;
}

#tabPackShot .value-neutral {
    color: #495057;
    font-weight: 600;
}

/* Icon-Styling in Tabelle */
#tabPackShot .table-responsive .fas {
    margin-right: 5px;
    width: 16px;
    text-align: center;
}

/* Responsive Anpassungen */
@media (max-width: 992px) {

    #tabPackShot .table-responsive th,
#tabPackShot .table-responsive td {
        padding: 8px 6px;
        font-size: 0.85rem;
    }

    #tabPackShot .table-responsive .badge-sm {
        font-size: 0.6rem;
        padding: 0.15rem 0.3rem;
    }
}

@media (max-width: 576px) {

    #tabPackShot .table-responsive th,
#tabPackShot .table-responsive td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }

    #tabPackShot .table-responsive small {
        font-size: 0.7rem;
    }

    /* Verstecke Icons auf sehr kleinen Displays */
    #tabPackShot .table-responsive .fas {
        display: none;
    }
}

/* Scroll-Shadow für bessere Orientierung */
#tabPackShot .table-responsive {
    background: linear-gradient(to right, white 30%, transparent),
        linear-gradient(to right, transparent, white 70%) 0 100%,
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .2), transparent),
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .2), transparent) 0 100%;
    background-repeat: no-repeat;
    background-color: white;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

/* Print-Optimierung für monatliche DB-Rechnung */
@media print {
    #tabPackShot .table-responsive {
        overflow: visible !important;
    }

    #tabPackShot .table-responsive table {
        min-width: auto !important;
        font-size: 8pt;
    }

    #tabPackShot .table-responsive thead th {
        position: static;
    }

    #tabPackShot .table-responsive td[style*="position: sticky"],
#tabPackShot .table-responsive th[style*="position: sticky"] {
        position: static !important;
        box-shadow: none !important;
    }

    #tabPackShot .badge {
        border: 1px solid #000;
    }

    /* Scroll-Hinweis verstecken */
    #tabPackShot .table-responsive::after {
        display: none;
    }
}

/* Accessibility: Fokus-Styles */
#tabPackShot .table-responsive:focus-within {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Smooth Scrolling */
#tabPackShot .table-responsive {
    scroll-behavior: smooth;
}

/* Zebra-Streiping für bessere Lesbarkeit (optional) */
#tabPackShot .table-responsive tbody tr:nth-child(even):not(.table-light):not(.table-dark) {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Separator zwischen Gruppen */
#tabPackShot .table-responsive tbody tr.table-light+tr:not(.table-light) {
    border-top: 2px solid #dee2e6;
}

/* Hervorhebung der Jahresspalte beim Hover */
#tabPackShot .table-responsive th.table-warning:hover,
#tabPackShot .table-responsive td.table-warning:hover {
    background-color: rgba(255, 193, 7, 0.25) !important;
}

/* Performance-Optimierung */
#tabPackShot .table-responsive table {
    will-change: transform;
}

/* Touch-Optimierung für Mobile */
@media (hover: none) and (pointer: coarse) {
    #tabPackShot .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* Zusätzliche Card-Styles für monatliche DB-Sektion */
#tabPackShot .card-header h5.card-title {
    margin-bottom: 0;
}

#tabPackShot .card-header .btn.kpi-info-btn {
    position: relative;
    top: -2px;
}

/* Tooltip-Styling für Monatsspalten */
#tabPackShot [data-bs-toggle="tooltip"] {
    cursor: help;
    border-bottom: 1px dotted #6c757d;
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    #tabPackShot .table-responsive {
        background-color: #1a1a1a;
    }

    #tabPackShot .table-responsive thead th {
        background: #2d2d2d;
        color: #e0e0e0;
    }

    #tabPackShot .table-info {
        background-color: rgba(13, 202, 240, 0.2) !important;
    }

    #tabPackShot .table-success {
        background-color: rgba(25, 135, 84, 0.2) !important;
    }

    #tabPackShot .table-warning {
        background-color: rgba(255, 193, 7, 0.2) !important;
    }
}

/* ====================================================================
   PIPELINE-CHART SPEZIFISCHE STYLES
   ==================================================================== */

#tabPackShot .pipeline-stats {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#tabPackShot .pipeline-stats h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

#tabPackShot .pipeline-stats .table {
    font-size: 0.9rem;
}

#tabPackShot .pipeline-stats .table td {
    padding: 8px 4px;
    vertical-align: middle;
}

#tabPackShot .pipeline-stats .badge {
    font-size: 0.8rem;
    padding: 4px 8px;
    color: white !important;
}

#tabPackShot .pipeline-stats .bg-light {
    border-left: 4px solid var(--primary-color);
}

/* ====================================================================
   DRAWER FÜR PIPELINE-DETAILS
   ==================================================================== */

#tabPackShot .pipeline-drawer {
    position: fixed;
    right: 0;
    top: 0;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform var(--transition-speed) ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#tabPackShot .pipeline-drawer.active {
    transform: translateX(0);
}

#tabPackShot .drawer-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

#tabPackShot .drawer-header h5 {
    color: var(--primary-color);
    font-weight: 600;
}

#tabPackShot .drawer-header .btn-close {
    padding: 0;
    width: 32px;
    height: 32px;
}

#tabPackShot .drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

#tabPackShot .drawer-table {
    font-size: 0.9rem;
    width: 100%;
}

#tabPackShot .drawer-table thead {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 10;
}

#tabPackShot .drawer-table th {
    padding: 10px 8px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid #dee2e6;
    font-size: 0.85rem;
}

#tabPackShot .drawer-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #dee2e6;
}

#tabPackShot .drawer-table tr:hover {
    background-color: #f8f9fa;
}

#tabPackShot .drawer-table .marge-negative {
    color: var(--danger-color);
    font-weight: 600;
}

#tabPackShot .drawer-table .marge-positive {
    color: var(--success-color);
    font-weight: 600;
}

#tabPackShot .drawer-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1040;
    transition: background var(--transition-speed) ease-in-out;
    pointer-events: none;
}

#tabPackShot .drawer-overlay.active {
    background: rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

#tabPackShot .drawer-stats {
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    margin-top: 20px;
    font-size: 0.9rem;
}

#tabPackShot .drawer-stats .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

#tabPackShot .drawer-stats .stat-row:last-child {
    border-bottom: none;
}

#tabPackShot .drawer-stats .stat-label {
    color: #6c757d;
    font-weight: 500;
}

#tabPackShot .drawer-stats .stat-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    #tabPackShot .pipeline-drawer {
        width: 100%;
    }
}
/* ====================================================================
   CRM-OVERRIDE: Reset CRM-Styles die in PackShot-Tab leaken
   packshot.css wird NACH app.css geladen → gewinnt bei gleicher Spezifizität
   ==================================================================== */

/* --- Section Headers: CRM setzt display:flex space-between --- */
#tabPackShot .kpi-section .section-header {
    display: block !important;
    justify-content: initial !important;
    align-items: initial !important;
    text-align: left !important;
}

#tabPackShot h3.section-header {
    display: block !important;
    justify-content: initial !important;
}

/* --- KPI Cards: Komplette Zentrierung erzwingen --- */
#tabPackShot .kpi-section .card .kpi-card {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

#tabPackShot .kpi-section .card .kpi-card .kpi-label {
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
}

#tabPackShot .kpi-section .card .kpi-card .kpi-value {
    text-align: center !important;
    width: 100% !important;
}

#tabPackShot .kpi-section .card .kpi-card > div {
    text-align: center !important;
    width: 100% !important;
}

#tabPackShot .kpi-section .card .kpi-card > div.text-muted {
    text-align: center !important;
}

#tabPackShot .kpi-section .card .kpi-card > div.text-muted small {
    text-align: center !important;
}

#tabPackShot .kpi-section .card .kpi-card > div.text-danger {
    text-align: center !important;
}

/* Verification badges: bleiben absolut positioniert */
#tabPackShot .kpi-section .card .verification-badge {
    width: auto !important;
    text-align: center !important;
}

/* Management-Übersicht: Detailbox linksbündig lassen */
#tabPackShot .kpi-card .bg-light.rounded {
    text-align: left !important;
}
#tabPackShot .kpi-card .bg-light.rounded .small,
#tabPackShot .kpi-card .bg-light.rounded .row,
#tabPackShot .kpi-card .bg-light.rounded div {
    text-align: left !important;
}

/* --- Header: Padding sicherstellen --- */
#tabPackShot .dashboard-header {
    padding: 25px 30px !important;
}

/* ====================================================================
   BETRIEBSKOSTEN: Ist aus Kontobewegungen + Fortführung + Planung
   (Kachel Gesamtkosten, Monatstabelle, Dialog #costsModal)
   ==================================================================== */
#tabPackShot .ps-opcost-split {
    font-size: 0.85em;
}

#tabPackShot .ps-cost-src {
    font-size: 0.68rem;
    white-space: nowrap;
}

#tabPackShot .ps-cost-plan,
#tabPackShot .ps-cost-open {
    font-style: italic;
}

#tabPackShot .opcost-dialog {
    max-width: min(1400px, 96vw);
}

#tabPackShot .opcost-kpi {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #6c757d;
    border-radius: 6px;
    padding: 8px 12px;
    height: 100%;
}

#tabPackShot .opcost-kpi.opc-k-fix { border-left-color: #0d6efd; }
#tabPackShot .opcost-kpi.opc-k-var { border-left-color: #fd7e14; }
#tabPackShot .opcost-kpi.opc-k-tot { border-left-color: #dc3545; }
#tabPackShot .opcost-kpi.opc-k-ex  { border-left-color: #adb5bd; }

#tabPackShot .opcost-kpi-title {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#tabPackShot .opcost-kpi-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
}

#tabPackShot .opcost-kpi-sub {
    font-size: 0.75rem;
    color: #6c757d;
}

#tabPackShot .opcost-split-wrap {
    max-height: 320px;
    overflow: auto;
}

#tabPackShot .opcost-grid-wrap {
    overflow: auto;
    max-height: 58vh;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

#tabPackShot .opcost-grid {
    font-size: 0.8rem;
    white-space: nowrap;
    border-collapse: separate;
    border-spacing: 0;
}

#tabPackShot .opcost-grid th,
#tabPackShot .opcost-grid td {
    padding: 3px 8px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

#tabPackShot .opcost-grid thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    line-height: 1.2;
}

#tabPackShot .opcost-grid .opc-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    min-width: 210px;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    border-right: 1px solid #dee2e6;
}

#tabPackShot .opcost-grid thead .opc-sticky {
    z-index: 5;
    background: #f8f9fa;
}

#tabPackShot .opcost-grid .opc-period-col {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #fff8e1;
    font-weight: 600;
    border-left: 2px solid #ffe08a;
}

#tabPackShot .opcost-grid thead .opc-period-col {
    z-index: 5;
    background: #fff3cd;
}

#tabPackShot .opcost-grid thead th.opc-in {
    box-shadow: inset 0 -3px 0 #0d6efd;
}

#tabPackShot .opcost-grid td.opc-in {
    background-color: rgba(13, 110, 253, 0.035);
}

#tabPackShot .opcost-grid thead th.opc-now {
    color: #0aa2c0;
}

#tabPackShot .opcost-grid td.opc-act {
    color: #212529;
}

#tabPackShot .opcost-grid td.opc-plan {
    color: #6f42c1;
    font-style: italic;
}

#tabPackShot .opcost-grid td.opc-set {
    font-weight: 700;
    box-shadow: inset 3px 0 0 #6f42c1;
}

#tabPackShot .opcost-grid td.opc-add::before {
    content: "+";
    color: #198754;
    font-weight: 700;
    margin-right: 3px;
}

#tabPackShot .opcost-grid td.opc-edit {
    cursor: pointer;
}

#tabPackShot .opcost-grid td.opc-edit:hover {
    background-color: #e7f1ff;
    outline: 1px solid #0d6efd;
    outline-offset: -1px;
}

#tabPackShot .opcost-grid tr.opc-group td {
    background: #f1f3f5;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #495057;
}

#tabPackShot .opcost-grid tr.opc-group td.opc-period-col {
    background: #fff3cd;
}

#tabPackShot .opcost-grid tr.opc-sum td {
    font-weight: 600;
    border-top: 1px solid #ced4da;
    background-color: #fafbfc;
}

#tabPackShot .opcost-grid tr.opc-sum td.opc-period-col {
    background: #fff3cd;
}

#tabPackShot .opcost-grid tr.opc-total td {
    font-weight: 700;
    background: #fdecea;
    border-top: 2px solid #dc3545;
}

#tabPackShot .opcost-grid tr.opc-total td.opc-sticky {
    background: #fdecea;
}

#tabPackShot .opcost-grid tr.opc-excluded td {
    color: #adb5bd;
}

#tabPackShot .opcost-grid tr.opc-excluded td.opc-plan {
    color: #b9a8dc;
}

#tabPackShot .opc-chip {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 500;
    font-style: normal;
    padding: 1px 6px;
    border-radius: 8px;
    margin-top: 2px;
}

#tabPackShot .opc-chip-actual     { background: #d1e7dd; color: #0f5132; }
#tabPackShot .opc-chip-incomplete { background: #fff3cd; color: #664d03; }
#tabPackShot .opc-chip-open       { background: #cff4fc; color: #055160; }
#tabPackShot .opc-chip-plan       { background: #e2d9f3; color: #432874; }
#tabPackShot .opc-chip-nodata     { background: #e9ecef; color: #6c757d; }
#tabPackShot .opc-chip-period     { background: #ffe08a; color: #664d03; }

#tabPackShot .opc-sw {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: -1px;
    border: 1px solid #ced4da;
}

#tabPackShot .opc-sw.opc-act  { background: #212529; }
#tabPackShot .opc-sw.opc-plan { background: #6f42c1; }
#tabPackShot .opc-sw.opc-set  { background: #fff; box-shadow: inset 3px 0 0 #6f42c1; }
#tabPackShot .opc-sw.opc-add  { background: #198754; }

#tabPackShot .opc-ua {
    display: inline-block;
    margin-left: 3px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 6px;
    background: #ffc107;
    color: #212529;
    cursor: help;
}

#tabPackShot .opcost-editor .card {
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.12);
}

/* Kachel "Darlehen zurückzahlbar?" (Management-Übersicht) */
#tabPackShot .kpi-section .card.ps-loan-card .kpi-card {
    text-align: left !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}

#tabPackShot .kpi-section .card.ps-loan-card .kpi-card div:not(.progress-bar),
#tabPackShot .kpi-section .card.ps-loan-card .kpi-card .kpi-label {
    text-align: left !important;
    justify-content: flex-start;
    width: auto !important;
}

#tabPackShot .kpi-section .card.ps-loan-card .ps-loan-row {
    justify-content: space-between !important;
}

#tabPackShot .kpi-section .card.ps-loan-card .ps-loan-head {
    justify-content: space-between !important;
}

#tabPackShot .ps-loan-card .ps-loan-row strong {
    text-align: right !important;
    white-space: nowrap;
}

#tabPackShot .ps-loan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

#tabPackShot .ps-loan-col {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fcfcfd;
}

#tabPackShot .ps-loan-col-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

#tabPackShot .ps-loan-big {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

#tabPackShot .ps-loan-row {
    font-size: 0.85rem;
    padding: 2px 0;
}
