/* ========================================
   KONSOLIDIERTE HAUPT-CSS - SCHADENSABRECHNUNG
   ======================================== */

/* ========================================
   IMPORTS
   ======================================== */
@import url('variables.css');

/* ========================================
   THEME DROPDOWN STYLES
   ======================================== */
.theme-option.active {
    background-color: var(--primary-color);
    color: white;
}

.theme-option:hover {
    background-color: var(--primary-color-light);
    color: white;
}

/* ========================================
   BASE STYLES & RESET
   ======================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--body-bg);
    min-height: 100vh;
    color: var(--body-text-color, #333);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    font-size: clamp(0.875rem, 1rem, 1.125rem);
    font-weight: 400;
    display: flex;
    flex-direction: column;
}

/* ========================================
   GUTACHTEN HEADER RESPONSIVE STYLES
   ======================================== */
/* Bei Tablets und kleineren Bildschirmen (< 768px) Button kann unter Vertragsinformationen wandern */
@media (max-width: 767px) {
    .header-container {
        flex-wrap: wrap !important;
    }
    .header-button {
        order: 3 !important;
        width: 100% !important;
        margin-top: 0.5rem !important;
    }
    .header-subtitle {
        order: 2 !important;
    }
}

/* ========================================
   FOOTER STICKY POSITIONING
   ======================================== */
.main-content {
    flex: 1;
    min-height: 0;
}

.footer {
    margin-top: auto;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Adaptive Scaling für verschiedene Viewport-Größen */
:root {
    --scale-factor: clamp(0.875, 1vw, 1.125);
    --container-padding: clamp(0.5rem, 2vw, 2rem);
    --section-padding: clamp(0.5rem, 1.5vw, 1.5rem);
    --grid-min-width: clamp(250px, 25vw, 400px);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

/* ========================================
   ÄNDERUNGSHISTORIE STYLES
   ======================================== */

/* ========================================
   BEDINGTE FELDANZEIGE BASIEREND AUF VERTRAGSTYP
   ======================================== */
#restwert-section,
#schlussrate-section {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

#restwert-section.hidden,
#schlussrate-section.hidden {
    display: none !important;
    opacity: 0;
    max-height: 0;
}

#restwert-section.visible,
#schlussrate-section.visible {
    display: block;
    opacity: 1;
    max-height: 500px;
}

/* Disabled Felder Styling */
.disabled {
    opacity: 0.6;
    pointer-events: none;
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

.disabled input,
.disabled select,
.disabled textarea {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    color: #6c757d !important;
}
.aenderungen-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    /* Gleiche Breite wie notizen-container */
    width: 100%;
}

.aenderungen-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-card);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.aenderungen-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.aenderungen-header .vertrag-info {
    margin-top: 1rem;
    opacity: 0.9;
}

.aenderungen-content {
    display: block;
    width: 100%;
    max-width: 100%;
    /* Gleiche Breite wie notizen-content */
    min-width: 100%;
}

.aenderungen-liste {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* Gleiche Breite wie notizen-liste */
    min-width: 100%;
}

.aenderung-item {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.aenderung-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}

.aenderung-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
    gap: 1.5rem;
}

.aenderung-titel-container {
    flex: 1;
    min-width: 0;
    overflow: visible;
    word-wrap: break-word;
}

.aenderung-typ {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin: 0 !important;
    background: none !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    text-transform: none !important;
    display: inline !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.3;
}

.aenderung-meta-inline {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    white-space: nowrap;
    min-width: 180px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.aenderung-user,
.aenderung-datum {
    white-space: nowrap;
}

.aenderung-beschreibung {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.aenderung-werte {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--primary-bg-light);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-color);
}

.aenderung-werte h6 {
    margin-bottom: 1rem;
    color: #495057;
    font-weight: 600;
    font-size: 1rem;
}

.wert-vergleich {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.wert-box {
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    background: white;
}

.alter-wert-box {
    border-left: 3px solid #dc3545;
}

.neuer-wert-box {
    border-left: 3px solid #28a745;
}

.wert-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wert-inhalt {
    color: #212529;
    word-wrap: break-word;
    font-size: 1rem;
    line-height: 1.4;
}

.alter-wert .wert-label {
    color: #dc3545;
}

.neuer-wert .neuer-wert-label {
    color: var(--success-color);
}

.empty-aenderungen {
    text-align: center;
    padding: 3rem;
    color: var(--text-color-light);
}

.empty-aenderungen i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.aenderung-typ-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: normal;
    overflow: visible;
    word-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
}

.typ-aenderung {
    background: var(--warning-bg);
    color: var(--warning-color-dark);
    border: 1px solid var(--warning-color-light);
}

.typ-neu {
    background: var(--info-bg);
    color: var(--info-color-dark);
    border: 1px solid var(--info-color-light);
}

.typ-geloescht {
    background: var(--danger-bg);
    color: var(--danger-color-dark);
    border: 1px solid var(--danger-color-light);
}

/* Mobile Styles für Änderungshistorie */
@media (max-width: 992px) {
    .aenderungen-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .aenderungen-container {
        padding: 1rem;
        max-width: 95%;
    }
    
    .aenderungen-header {
        padding: 1.5rem;
    }
    
    .aenderungen-header h1 {
        font-size: 1.75rem;
    }
    
    .aenderungen-liste {
        padding: 1.5rem;
    }
    
    .aenderung-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .aenderung-meta-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        min-width: auto;
        width: 100%;
    }
    
    .aenderung-titel-container {
        margin-right: 0;
        width: 100%;
    }
    
    .aenderung-typ-badge {
        max-width: 100%;
        font-size: 0.7rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .aenderung-typ {
        line-height: 1.4;
    }
    
    .wert-vergleich {
        grid-template-columns: 1fr;
    }
}
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
    color: #2c3e50;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.15s ease;
}

a:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* ========================================
   NAVIGATION & HEADER
   ======================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.25rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: var(--primary-bg);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--primary-bg);
    font-weight: 600;
}

.navbar .btn {
    margin-left: 0.5rem;
    font-weight: 500;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar .btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: var(--shadow-primary);
}

.navbar .btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-hover);
}

.navbar .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.navbar .btn-outline-primary:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.navbar .dropdown-menu {
    background: #ffffff;
    border: 1px solid #dee2e6;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 0.5rem;
}

.navbar .dropdown-item {
    color: #333;
    padding: 0.5rem 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar .dropdown-item:hover {
    background: var(--primary-bg);
    color: var(--primary-color);
}

.navbar .dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* ========================================
   LAYOUT & CONTAINERS
   ======================================== */
.main-content {
    padding: 6rem 0 2rem 0;
    min-height: calc(100vh - 120px);
}

.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

/* Fluid container improvements für verschiedene Bildschirmgrößen */
@media (min-width: 2560px) {
    .container-fluid {
        max-width: 2200px;
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 3440px) {
    .container-fluid {
        max-width: 2800px;
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

.container-fluid.py-4 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.row {
    margin-left: calc(-1 * 1rem);
    margin-right: calc(-1 * 1rem);
    display: flex;
    flex-wrap: wrap;
}

.row.justify-content-center {
    justify-content: center;
}

.col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 1rem;
}

.col-lg-9 {
    flex: 0 0 80%;
    max-width: 80%;
    padding: 0 1rem;
}

.col-lg-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
    padding: 0 1rem;
}

.col-lg-3 {
    flex: 0 0 20%;
    max-width: 20%;
    padding: 0 1rem;
}

.col-xl-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 1rem;
}

.col-xl-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding: 0 1rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 1rem;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 1rem;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 1rem;
}

/* ========================================
   TABS
   ======================================== */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.nav-tabs .nav-link {
    border: none;
    background: rgba(255, 255, 255, 0.8);
    color: #2c3e50;
    padding: 1rem 1.5rem;
    margin-right: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 500;
    transition: all 0.15s ease;
    position: relative;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid #dee2e6;
    border-bottom: none;
}

.nav-tabs .nav-link:hover {
    color: #ffffff;
    background: var(--gradient-primary);
    border-color: var(--primary-color) var(--primary-color) transparent var(--primary-color);
    transform: translateY(-1px);
    font-weight: 600;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: #ffffff;
    border-color: var(--primary-color) var(--primary-color) transparent var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.tab-content {
    background: #ffffff;
    border-radius: 0 0.5rem 0.5rem 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    border: 1px solid #dee2e6;
    border-top: none;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ========================================
   CARDS & SECTIONS
   ======================================== */
.section-card {
    background: transparent;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.section-header {
    background: var(--gradient-primary);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h4 {
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    flex: 1;
}

.section-header .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.section-header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.section-body {
    padding: 0.75rem 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 1.5rem;
    width: 100%;
    padding: 20px;
}

.info-item {
    background: transparent;
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.15s ease;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1rem;
}

.info-item:hover {
    background: var(--primary-bg-light);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: normal;
    color: #495057;
    margin-bottom: 0;
    font-size: 1rem;
    text-transform: none !important;
    letter-spacing: 0.1px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    flex-shrink: 0;
    min-width: 200px;
}

.info-value {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1rem;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    flex: 1;
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ========================================
   VERTRAGSDETAILS STYLING - IDENTISCH MIT PRINT
   ======================================== */

/* Höchste Spezifität für Vertragsdetails - IDENTISCH MIT PRINT */
#vertragsdetails .info-item,
#vertragsdetails .section-card .info-item,
#vertragsdetails .section-body .info-item,
#vertragsdetails .section-card .section-body .info-item {
    margin-bottom: 8px !important;
    padding: 6px 0 !important;
    border-bottom: 1px solid #f1f3f4 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    flex-direction: row !important;
}

/* Höchste Spezifität für Vertragsdetails Hover - IDENTISCH MIT PRINT */
#vertragsdetails .info-item:hover,
#vertragsdetails .section-card .info-item:hover,
#vertragsdetails .section-body .info-item:hover {
    background-color: transparent !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Höchste Spezifität für Vertragsdetails letztes Element */
#vertragsdetails .info-item:last-child,
#vertragsdetails .section-card .info-item:last-child,
#vertragsdetails .section-body .info-item:last-child {
    border-bottom: none !important;
}

/* Höchste Spezifität für Vertragsdetails Grid - IDENTISCH MIT PRINT */
#vertragsdetails .info-grid,
#vertragsdetails .section-card .info-grid,
#vertragsdetails .section-body .info-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 25px !important;
    padding: 20px !important;
    margin-top: 1rem !important;
}

/* Zusätzliche Regeln für korrekte Anzeige - IDENTISCH MIT PRINT */
#vertragsdetails .info-item span,
#vertragsdetails .section-card .info-item span,
#vertragsdetails .section-body .info-item span {
    display: inline-block !important;
}

#vertragsdetails .info-label,
#vertragsdetails .section-card .info-label,
#vertragsdetails .section-body .info-label {
    font-weight: normal !important;
    color: #495057 !important;
    font-size: 1rem !important;
    text-transform: none !important;
    letter-spacing: 0.1px !important;
    flex-shrink: 0 !important;
    min-width: 200px !important;
    text-align: left !important;
}

#vertragsdetails .info-value,
#vertragsdetails .section-card .info-value,
#vertragsdetails .section-body .info-value {
    color: #2c3e50 !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    text-align: right !important;
    flex: 1 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* ========================================
   COMPONENTS
   ======================================== */
.card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card-body {
    padding: 1.5rem;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 8px;
    transition: all 0.15s ease;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-primary {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: var(--gradient-primary);
    border-color: var(--primary-color-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    background: transparent;
}

.btn-outline-secondary:hover {
    color: #ffffff;
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
    background: transparent;
}

.btn-outline-success:hover {
    color: #ffffff;
    background: #28a745;
    border-color: #28a745;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background: transparent;
}

.btn-outline-danger:hover {
    color: #ffffff;
    background: #dc3545;
    border-color: #dc3545;
}

.btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
    background: transparent;
}

.btn-outline-warning:hover {
    color: #ffffff;
    background: #ffc107;
    border-color: #ffc107;
}

.btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
    background: transparent;
}

.btn-outline-info:hover {
    color: #ffffff;
    background: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-dark {
    color: #343a40;
    border-color: #343a40;
    background: transparent;
}

.btn-outline-dark:hover {
    color: #ffffff;
    background: #343a40;
    border-color: #343a40;
}

.btn-light {
    color: #2c3e50;
    background: #f8f9fa;
    border-color: #f8f9fa;
}

.btn-light:hover {
    color: #2c3e50;
    background: #e9ecef;
    border-color: #e9ecef;
}

.btn-sm {
    padding: 0.25rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
    min-height: auto !important;
    line-height: 1.5 !important;
    width: 220px !important;
    white-space: nowrap !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ========================================
   GUTACHTEN BUTTON - WEISS MIT PRIMARY COLOR UMRANDUNG
   ======================================== */
.gutachten-btn {
    background: #ffffff;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gutachten-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gutachten-btn i {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.gutachten-btn:hover i {
    color: #ffffff;
}

/* ========================================
   FORMS
   ======================================== */
.form-control, .form-select {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.15s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-control:focus, .form-select:focus {
    color: #333;
    background-color: #ffffff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(121, 174, 200, 0.25);
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-label.required::after {
    content: " *";
    color: #dc3545;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

/* ========================================
   TABLES
   ======================================== */
.table {
    width: 100%;
    margin-bottom: 1.5rem;
    color: #333;
    vertical-align: top;
    border-color: #dee2e6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.table th,
.table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    font-weight: 600;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table tbody tr:hover {
    background: var(--primary-bg-light);
}

.table-hover tbody tr:hover {
    background: var(--primary-bg-light);
}

.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.table-sm th,
.table-sm td {
    padding: 0.25rem 0.5rem;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   UTILITIES
   ======================================== */
.money-header {
    text-align: right;
    font-weight: 600;
}

/* ========================================
   TABELLEN-TEXTAUSRICHTUNG - HÖCHSTE PRIORITÄT
   ======================================== */
/* Diese Regeln überschreiben ALLE anderen CSS-Regeln */
html body table th.text-start,
html body table td.text-start,
html body .table th.text-start,
html body .table td.text-start {
    text-align: left !important;
}

html body table th.text-center,
html body table td.text-center,
html body .table th.text-center,
html body .table td.text-center {
    text-align: center !important;
}

html body table th.text-end,
html body table td.text-end,
html body .table th.text-end,
html body .table td.text-end {
    text-align: right !important;
}



/* ========================================
   GELDBETRÄGE RECHTSBÜNDIG
   ======================================== */
/* Alle Elemente mit Euro-Symbol rechtsbündig */
*:contains("€"),
.sidebar-summary-value,
.info-value:contains("€"),
[class*="betrag"],
[class*="money"],
[class*="euro"] {
    text-align: right !important;
}

/* Spezifische Selektoren für Geldbeträge */
.sidebar-summary-value {
    text-align: right !important;
}

.info-value {
    text-align: right !important;
    flex-shrink: 0;
    min-width: 0;
}

/* Tabellen-Zellen mit Geldbeträgen */
.table td.text-end,
.table th.text-end,
.table th.money-header,
.table-print th.money-header,
.table-print td.text-end {
    text-align: right !important;
}

/* Spezifische Regel für Geldbetrag-Zellen */
.money-cell {
    text-align: right !important;
}

/* Zusätzliche Sicherheit für Tabellen-Zellen */
.table .money-cell,
.table td.money-cell {
    text-align: right !important;
}

/* Höchste Spezifität für Geldbetrag-Zellen in Tabellen */
.table tbody td.money-cell,
.table thead th.text-end,
.table tbody td.text-end {
    text-align: right !important;
}

/* Bootstrap-Überschreibung verhindern */
.table td.text-end,
.table th.text-end {
    text-align: right !important;
}

/* Spezifische Regel für alle Geldbetrag-Zellen - höchste Priorität */
td.money-cell,
th.text-end,
td.text-end {
    text-align: right !important;
}

/* Zusätzliche Sicherheit mit höchster Spezifität */
.table tbody tr td.money-cell,
.table thead tr th.text-end,
.table tbody tr td.text-end {
    text-align: right !important;
}

/* Spezifische Ausrichtung für Offene Raten Tabelle */
.table thead th:nth-child(3),  /* Betrag (Brutto) */
.table thead th:nth-child(4),  /* RLS-Gebühr */
.table thead th:nth-child(5),  /* Verzugszinsen */
.table thead th:nth-child(6),  /* Gesamt */
.table tbody td:nth-child(3),  /* Betrag (Brutto) */
.table tbody td:nth-child(4),  /* RLS-Gebühr */
.table tbody td:nth-child(5),  /* Verzugszinsen */
.table tbody td:nth-child(6)   /* Gesamt */
{
    text-align: right !important;
}

/* Alte Regeln entfernt - neue Regeln sind oben mit höchster Spezifität */

/* Spezielle Ausrichtung für Gesamtzeilen (table-primary) */
.table-primary td:nth-child(1) {
    text-align: left !important;   /* Gesamt [Datum] */
}

.table-primary td:nth-child(2),  /* Gesamtbetrag */
.table-primary td:nth-child(3),  /* Rücklastschrift */
.table-primary td:nth-child(4),  /* Verzugszinsen */
.table-primary td:nth-child(5)   /* Gesamt */
{
    text-align: right !important;
}

/* Alternative: Klassen-basierte Ausrichtung für Gesamtzeilen */
.table-primary .text-end {
    text-align: right !important;
}

/* ========================================
   SCHADENSERSATZ TABELLE SPALTEN-AUSRICHTUNG
   ======================================== */
/* Schadensersatz-Tab spezifische Ausrichtung */
#schadensersatz .table:not(.verzugszinsen-details-table) th:nth-child(1),  /* Beschreibung Header */
#schadensersatz .table:not(.verzugszinsen-details-table) td:nth-child(1),  /* Beschreibung Zellen */
.schadensersatz-beschreibung {
    text-align: left !important;
}

#schadensersatz .table:not(.verzugszinsen-details-table) {
    table-layout: fixed;
}

/* Verzugszinsen-Details-Tabellen aus Schadensersatz-CSS ausschließen */
.verzugszinsen-details-table {
    table-layout: fixed !important;
    width: 100% !important;
}

.verzugszinsen-details-table th:nth-child(1),
.verzugszinsen-details-table th:nth-child(2) {
    width: 16.67% !important; /* Von/Bis - je 16.67% */
}

.verzugszinsen-details-table th:nth-child(3),
.verzugszinsen-details-table th:nth-child(4) {
    width: 12% !important; /* Zinstage/Zinssatz - je 12% */
}

.verzugszinsen-details-table th:nth-child(5),
.verzugszinsen-details-table th:nth-child(6) {
    width: 21.67% !important; /* Betrag/Zinsbetrag - je 21.67% */
}

/* Verzugszinsen-Details verwenden Bootstrap-Klassen wie offene Posten */
.verzugszinsen-details-table th:nth-child(1),
.verzugszinsen-details-table td:nth-child(1) {
    text-align: center !important;
}

#schadensersatz .table:not(.verzugszinsen-details-table) th:nth-child(1) { /* Beschreibung */
    width: 30%;
}

#schadensersatz .table:not(.verzugszinsen-details-table) th:nth-child(2) { /* Wert */
    width: 18%;
}

#schadensersatz .table:not(.verzugszinsen-details-table) th:nth-child(3) { /* Details */
    width: 52%;
}

#schadensersatz .table:not(.verzugszinsen-details-table) td:nth-child(3) { /* Details - Textumbruch */
    width: 52%;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: auto;
}

#schadensersatz .table:not(.verzugszinsen-details-table) th:nth-child(2),  /* Wert Header */
#schadensersatz .table:not(.verzugszinsen-details-table) td:nth-child(2),  /* Wert Zellen */
.schadensersatz-wert {
    text-align: right !important;
}

#schadensersatz .table:not(.verzugszinsen-details-table) th:nth-child(3),  /* Details Header */
#schadensersatz .table:not(.verzugszinsen-details-table) td:nth-child(3),  /* Details Zellen */
.schadensersatz-details {
    text-align: left !important;
}

/* Verzugszinsen-Details Tabelle - Zinstage Spalte mittig */
.table th.text-center,
.table td.text-center {
    text-align: center !important;
}

/* Spezifische Regeln für Verzugszinsen-Details Tabellen */
.card-body .table th.text-center,
.card-body .table td.text-center,
.table-responsive .table th.text-center,
.table-responsive .table td.text-center {
    text-align: center !important;
}

/* Verzugszinsen-Details spezifische Spalten - nur für Tabellen in Cards */
.card-body .table:not(.verzugszinsen-details-table) thead th:nth-child(1), /* Von */
.card-body .table:not(.verzugszinsen-details-table) tbody td:nth-child(1),
.card-body .table:not(.verzugszinsen-details-table) thead th:nth-child(2), /* Bis */
.card-body .table:not(.verzugszinsen-details-table) tbody td:nth-child(2),
.card-body .table:not(.verzugszinsen-details-table) thead th:nth-child(3), /* Zinstage */
.card-body .table:not(.verzugszinsen-details-table) tbody td:nth-child(3),
.card-body .table:not(.verzugszinsen-details-table) thead th:nth-child(4), /* Zinssatz */
.card-body .table:not(.verzugszinsen-details-table) tbody td:nth-child(4) {
    text-align: center !important;
}

/* Details-Spalte muted und nicht fett */
#schadensersatz .table td:nth-child(3) {
    font-weight: normal !important;
    color: #6c757d !important;
}

/* ========================================
   KOSTEN TABELLE SPALTEN-AUSRICHTUNG
   ======================================== */
/* ========================================
   TABELLEN-STYLES (ohne Kosten-Tabellen)
   ======================================== */




/* Print-Ansicht Schadensersatz */
.table-print .schadensersatz-beschreibung {
    text-align: left !important;
}

.table-print .schadensersatz-wert {
    text-align: right !important;
}

.table-print .schadensersatz-details {
    text-align: left !important;
}

.alert {
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-danger {
    color: #721c24;
    background-color: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
}

.alert-success {
    color: #155724;
    background-color: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
}

.alert-warning {
    color: #856404;
    background-color: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.alert-info {
    color: #0c5460;
    background-color: var(--primary-bg);
    border-color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

/* Verbesserte Sichtbarkeit für Vertragsinformationen */
.alert-info .text-primary {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

.alert-info .text-muted {
    color: #6c757d !important;
    font-weight: 500 !important;
}

/* Card Header mit Gradient für Kosten/Zahlung Formulare */
.card-header.text-white {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
    border-bottom: none;
}

.card-header.text-white h1 {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.card-header.text-white p {
    color: #ffffff !important;
    opacity: 0.9;
}

/* Section Header in Formularen verbessern */
.section-header .section-title {
    color: #2c3e50 !important;
    font-weight: 600 !important;
}

.section-header hr {
    border-color: var(--primary-color);
    border-width: 2px;
    opacity: 1;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
}

.badge.text-dark {
    color: #2c3e50 !important;
}

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }
.text-muted { color: #6c757d !important; }

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fst-italic { font-style: italic !important; }

/* ========================================
   SPACING UTILITIES
   ======================================== */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }

.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }

.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 2rem !important; }

.py-4 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* ========================================
   DISPLAY UTILITIES
   ======================================== */
.d-flex {
    display: flex !important;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-inline-block {
    display: inline-block !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

/* ========================================
   POSITION UTILITIES
   ======================================== */
.position-relative {
    position: relative !important;
}

.position-absolute {
    position: absolute !important;
}

.float-end {
    float: right !important;
}

.float-start {
    float: left !important;
}

/* ========================================
   BORDER UTILITIES
   ======================================== */
.border-0 {
    border: 0 !important;
}

.border-top {
    border-top: 1px solid #dee2e6 !important;
}

/* ========================================
   SPECIAL COMPONENTS
   ======================================== */
.summary-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    border: 1px solid #dee2e6;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.summary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
    transition: all 0.15s ease;
}

.summary-item:hover {
    background: var(--primary-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.summary-item:last-child {
    grid-column: 1 / -1;
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
}

.summary-label {
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.summary-value {
    font-size: 1.125rem;
    font-weight: 500;
    color: #343a40;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.action-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
    border: none;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.action-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.rate-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    margin-bottom: 1rem;
}

.rate-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
}

.rate-header h6 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ========================================
   SIDEBAR
   ======================================== */
.global-sidebar {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    border: 1px solid #dee2e6;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 1.5rem;
}

.sidebar-header {
    background: var(--gradient-primary);
    color: #ffffff;
    padding: 1rem;
    margin: -1.5rem -1.5rem 1.5rem;
    border-radius: 12px 12px 0 0;
    text-align: center;
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-section {
    border-bottom: 1px solid #e9ecef;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-action-btn {
    width: 100%;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
    border: 1px solid #dee2e6;
    background: #ffffff;
    color: #333;
    margin-bottom: 0.25rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-action-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-1px);
}

.sidebar-action-btn.btn-primary {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: #ffffff;
}

.sidebar-action-btn.btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

.sidebar-action-btn.btn-outline-primary {
    border-color: #417690;
    color: #417690;
}

.sidebar-action-btn.btn-outline-primary:hover {
    background: #417690;
    color: #ffffff;
    border-color: #2c5aa0;
}

.sidebar-action-btn.btn-outline-secondary {
    border-color: #417690;
    color: #417690;
}

.sidebar-action-btn.btn-outline-secondary:hover {
    background: #417690;
    color: #ffffff;
    border-color: #2c5aa0;
}

.sidebar-action-btn.btn-outline-dark {
    border-color: #417690;
    color: #417690;
}

.sidebar-action-btn.btn-outline-dark:hover {
    background: #417690;
    color: #ffffff;
    border-color: #2c5aa0;
}

.sidebar-action-btn.btn-outline-success {
    border-color: #417690;
    color: #417690;
}

.sidebar-action-btn.btn-outline-success:hover {
    background: #417690;
    color: #ffffff;
    border-color: #2c5aa0;
}

.sidebar-action-btn.btn-outline-info {
    border-color: #417690;
    color: #417690;
}

.sidebar-action-btn.btn-outline-info:hover {
    background: #417690;
    color: #ffffff;
    border-color: #2c5aa0;
}

.sidebar-action-btn.btn-outline-danger {
    border-color: #417690;
    color: #417690;
}

.sidebar-action-btn.btn-outline-danger:hover {
    background: #417690;
    color: #ffffff;
    border-color: #2c5aa0;
}

.sidebar-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-summary-item:last-child {
    border-bottom: none;
    font-weight: 600;
    color: var(--primary-color);
}

.sidebar-summary-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-summary-value {
    font-weight: 500;
    color: #2c3e50;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ========================================
   HEADER INFORMATION STYLES
   ======================================== */

/* Normal view header container */
.abrechnung-details-container .row.mb-4 {
    background: linear-gradient(135deg, #79aec8 0%, #417690 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem !important;
    color: #2c3e50;
}

.abrechnung-details-container .row.mb-4 .h3 {
    color: #2c3e50 !important;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.abrechnung-details-container .row.mb-4 .text-muted {
    color: #2c3e50 !important;
    font-weight: 500;
    font-size: 1rem;
    opacity: 0.9;
}

.abrechnung-details-container .row.mb-4 .text-muted strong {
    color: #2c3e50 !important;
    font-weight: 600;
    opacity: 1 !important;
}

/* General text-muted for other areas */
.text-muted {
    color: #2c3e50 !important;
    font-weight: 500;
    font-size: 1rem;
}

.text-muted strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Spezifische Styles für Print-Header */
.print-header .text-muted {
    color: #ffffff !important;
}

.print-header .text-muted strong {
    color: #ffffff !important;
}

/* ========================================
   PRINT STYLES
   ======================================== */
.print-header {
    background: var(--gradient-primary);
    color: #ffffff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
}

.print-header h1 {
    margin: 0;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
}

.print-header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.print-header-info {
    margin-top: 1rem;
}

.header-details {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.header-item {
    display: inline-block;
    margin: 0 0.75rem;
}

.header-item:first-child {
    margin-left: 0;
}

.header-item strong {
    font-weight: 600;
    opacity: 0.9;
}

.header-value {
    font-weight: 700;
    color: #ffffff;
}

.header-separator {
    margin: 0 0.5rem;
    opacity: 0.7;
    font-weight: 300;
}

.print-section {
    margin-bottom: 2rem;
    page-break-inside: avoid;
}

.print-section h3 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.print-section h3 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.table-print {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table-print th,
.table-print td {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.table-print th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.table-print th.text-end,
.table-print td.text-end {
    text-align: right;
}

.table-print th.money-header {
    text-align: right;
    font-weight: 600;
}

.table-print td.text-end.text-danger {
    color: #dc3545;
    font-weight: 600;
}

.table-print td.text-muted {
    color: #6c757d;
    font-style: italic;
}

/* =================================================================
   ABRECHNUNG LISTE - MODERNE TABELLEN-ANSICHT
   ================================================================= */

/* Container und Layout */
.abrechnung-liste-container {
    max-width: 100%;
    margin: 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

/* Header Bereich - Mit integrierter Suche */
.liste-header {
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-right: 1.5rem;
}

.header-title-section {
    flex-shrink: 0;
}

.liste-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #495057;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.liste-title .icon-wrapper {
    background: #6c757d;
    color: white;
    border-radius: 8px;
    padding: 0.625rem;
    font-size: 1.25rem;
}

.header-search-section {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 800px;
}

.liste-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Filter Bereich - Kompaktes Design */
.liste-filters {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
}

/* Such-Container */
.search-container {
    max-width: 100%;
}

/* Such-Formular */
.search-form {
    width: 100%;
}

.search-input-group {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
    flex: 1;
    min-width: 200px;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 0.9rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.2s ease;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.search-input:focus {
    border-color: #adb5bd;
    box-shadow: 0 0 0 0.15rem rgba(173, 181, 189, 0.1);
    outline: none;
}

.search-hint {
    display: none;
}

/* Such-Aktionen */
.search-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Einheitliche Button-Größen für Header */
.btn-header-uniform {
    padding: 0.5rem 1.5rem !important;
    font-size: 1rem !important;
    min-height: auto !important;
    line-height: 1.5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Überschreibt mobile Styles für Header-Buttons */
.btn-outline-primary.btn-header-uniform {
    min-height: auto !important;
    padding: 0.5rem 1.5rem !important;
    font-size: 1rem !important;
}

/* Überschreibt alle möglichen mobile Button-Größen für Header */
@media (max-width: 1023px) {
    .btn-header-uniform {
        min-height: auto !important;
        padding: 0.5rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .btn-outline-primary.btn-header-uniform {
        min-height: auto !important;
        padding: 0.5rem 1.5rem !important;
        font-size: 1rem !important;
        border-width: 1px !important;
        border-radius: 8px !important;
    }
}

/* Überschreibt die spezifische mobile Regel für btn-outline-primary */
@media (max-width: 1023px) {
    .btn-outline-primary.btn-header-uniform {
        min-height: auto !important;
        padding: 0.5rem 1.5rem !important;
        font-size: 1rem !important;
        border-width: 1px !important;
        border-radius: 8px !important;
    }
}

/* Header-Button Styles für dunklen Hintergrund */
.liste-header .btn-header-uniform {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.liste-header .btn-header-uniform:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.liste-header .btn-search {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #2c3e50 !important;
}

.liste-header .btn-search:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
}

.liste-header .btn-clear {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #2c3e50 !important;
}

.liste-header .btn-clear:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}

.liste-header .btn-status-filter {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #2c3e50 !important;
}

.liste-header .btn-status-filter:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}

.liste-header .btn-status-filter-active {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}

/* Header-spezifische aktive Filter-Styles */
.liste-header .btn-search-active {
    background: rgba(40, 167, 69, 0.8) !important;
    border-color: rgba(40, 167, 69, 1) !important;
    color: white !important;
}

.liste-header .btn-search-active:hover {
    background: rgba(40, 167, 69, 1) !important;
    border-color: rgba(40, 167, 69, 1) !important;
    color: white !important;
}

.liste-header .btn-outline-primary.btn-ersteller-active {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}

.liste-header .btn-outline-primary.btn-ersteller-active:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}


.liste-header .btn-export {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #2c3e50 !important;
}

.liste-header .btn-export:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
}

.liste-header .btn-create {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #2c3e50 !important;
}

.liste-header .btn-create:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #ffffff !important;
}

.liste-header .btn-outline-primary {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #2c3e50 !important;
    min-height: auto !important;
    padding: 0.5rem 1.5rem !important;
    font-size: 1rem !important;
}

/* Suchleiste für dunklen Hintergrund */
.liste-header .search-input {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #2c3e50 !important;
}

.liste-header .search-input:focus {
    background: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #2c3e50 !important;
    box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.3) !important;
}

.liste-header .input-icon {
    color: #6c757d !important;
}

/* Suchleiste-Breite */
.search-input-wrapper {
    width: 280px !important;
    flex-shrink: 0 !important;
}

.btn-search {
    background: #6c757d;
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    color: white;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 100px;
    justify-content: center;
}

.btn-search:hover {
    background: #5a6268;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

.btn-clear {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    color: #6c757d;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 100px;
    justify-content: center;
}

.btn-clear:hover {
    background: #e9ecef;
    border-color: #ced4da;
    color: #495057;
    text-decoration: none;
}

/* Export und Anlegen Buttons im Suchbereich */
.btn-export {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1.25rem;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 100px;
    justify-content: center;
}

.btn-export:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    color: white;
    text-decoration: none;
}

.btn-create {
    background: var(--gradient-primary);
    border: none;
    border-radius: 5px;
    padding: 0.5rem 1.25rem;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 100px;
    justify-content: center;
}

.btn-create:hover {
    background: var(--gradient-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    color: white;
    text-decoration: none;
}

/* Status-Filter Toggle Button */
.status-filter-toggle {
    display: flex;
    align-items: center;
}

.btn-status-filter {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 0.5rem 1.25rem;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 120px;
    justify-content: center;
}

.btn-status-filter:hover {
    background: #e9ecef;
    border-color: #ced4da;
    color: #495057;
    text-decoration: none;
}

.btn-status-filter-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-status-filter-active:hover {
    background: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    color: white;
}

/* Aktive Suchfilter-Styles */
.btn-search-active {
    background: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white !important;
}

.btn-search-active:hover {
    background: var(--success-color-dark) !important;
    border-color: var(--success-color-dark) !important;
    color: white !important;
}

/* Aktive Ersteller-Filter-Styles */
.btn-ersteller-active {
    background: var(--info-color) !important;
    border-color: var(--info-color) !important;
    color: white !important;
}

.btn-ersteller-active:hover {
    background: var(--info-color-dark) !important;
    border-color: var(--info-color-dark) !important;
    color: white !important;
}


/* Aktive Suche Info */
.active-search-info {
    margin-top: 0.75rem;
    text-align: center;
}

.search-results-info {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #f8f9fa;
    color: #495057;
    padding: 0.375rem 0.75rem;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid #e9ecef;
}

.search-results-info i {
    color: #6c757d;
}

/* Responsive Design */
/* Große Bildschirme - Suchleiste breiter */
@media (min-width: 1200px) {
    .search-input-wrapper {
        max-width: 400px;
        min-width: 300px;
    }
    
    .search-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-search,
    .btn-clear,
    .btn-export,
    .btn-create,
    .btn-status-filter {
        min-width: auto;
        width: auto;
    }
}

/* Mittlere Bildschirme - Standard-Größe (inkl. 15" Laptops) */
@media (min-width: 769px) and (max-width: 1199px) {
    .search-input-wrapper {
        max-width: 300px;
        min-width: 200px;
    }
    
    .search-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-search,
    .btn-clear,
    .btn-export,
    .btn-create,
    .btn-status-filter {
        min-width: auto;
        width: auto;
    }
}

/* 15" Laptops und ähnliche Bildschirme - alles in einer Zeile */
@media (min-width: 1024px) and (max-width: 1366px) {
    .search-input-group {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.75rem;
        align-items: center;
        justify-content: center;
    }
    
    .search-input-wrapper {
        max-width: 280px;
        min-width: 200px;
        flex: 0 0 auto;
    }
    
    .search-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        flex: 0 0 auto;
    }
    
    .btn-search,
    .btn-clear,
    .btn-export,
    .btn-create,
    .btn-status-filter {
        min-width: auto;
        width: auto;
        font-size: 0.85rem;
        padding: 0.45rem 1rem;
    }
}

/* Kleine Bildschirme - Suchleiste schmaler, aber alles in einer Zeile */
@media (max-width: 1023px) {
    .liste-header {
        padding: 1rem;
        margin: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding-right: 1rem;
    }
    
    .header-title-section {
        text-align: center;
    }
    
    .liste-title {
        font-size: 1.5rem;
        justify-content: center;
    }
    
    .header-search-section {
        max-width: 100%;
    }
    
    .search-input-group {
        gap: 0.5rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-input-wrapper {
        max-width: 200px;
        min-width: 150px;
        flex: 0 0 auto;
    }
    
    .search-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: center;
        flex: 1;
        min-width: 0;
    }
    
    .btn-search,
    .btn-clear,
    .btn-export,
    .btn-create,
    .btn-status-filter {
        width: auto;
        min-width: auto;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
        flex: 0 0 auto;
    }
    
    .search-input {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem 0.5rem 2rem;
    }
}

/* Sehr kleine Bildschirme - Kompakt aber in einer Zeile */
@media (max-width: 480px) {
    .search-input-wrapper {
        max-width: 150px;
        min-width: 120px;
    }
    
    .search-actions {
        gap: 0.2rem;
    }
    
    .btn-search,
    .btn-clear,
    .btn-export,
    .btn-create,
    .btn-status-filter {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
        min-width: 60px;
    }
    
    .search-input {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem 0.4rem 1.75rem;
    }
}

/* Tabellen Wrapper - ermöglicht horizontale Scrollbar am unteren Rand des sichtbaren Bereichs */
.table-wrapper {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    overflow-x: auto;
    overflow-y: auto;
    /* Begrenze Höhe, damit horizontale Scrollbar immer sichtbar ist, ohne nach unten scrollen zu müssen */
    max-height: calc(100vh - 250px);
}

/* Tabellen Container */
.table-container {
    overflow: visible;
    position: relative;
}

/* Moderne Tabelle */
.table-modern {
    margin: 0;
    border: none;
    width: 100%;
    min-width: 100%;
    table-layout: auto;
}

/* Erste Header-Zeile fixieren */
.table-modern thead > tr:first-child:not(.filter-row) th {
    position: sticky;
    top: 0;
    z-index: 12;
    background: #f8f9fa;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.table-modern thead th {
    background: #f8f9fa;
    color: #6c757d;
    border: none;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 0.75rem;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0.25px;
    white-space: nowrap;
}

/* Filterzeile direkt unter der ersten Header-Zeile fixieren */
.table-modern thead > tr.filter-row th {
    position: sticky;
    top: 50px; /* Direkt unter der Header-Zeile (padding 0.75rem * 2 + font-size ~14px = ~38px, aufgerundet auf 50px für Sicherheit) */
    z-index: 11;
    background: #f8f9fa;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.table-modern tbody tr {
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.table-modern tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-modern tbody td {
    padding: 0.6rem 0.75rem;
    border: none;
    vertical-align: middle;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Zell-spezifische Stile */
.vertragsnummer-cell {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
}

.vertragsnummer-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.vertragsnummer-link:hover {
    color: var(--primary-color-dark);
    border-bottom-color: var(--primary-color-dark);
    text-decoration: none;
}

.vertragspartner-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.money-cell {
    font-family: 'Segoe UI', monospace;
    font-weight: 600;
    color: #212529;
}

.money-cell.danger {
    color: #212529;
}

.money-cell.warning {
    color: #212529;
}

/* Status Badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: all 0.3s ease;
    transform: translateZ(0); /* Hardware-Beschleunigung für bessere Performance */
}

.status-badge.leasing {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.status-badge.mietkauf {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
}

.status-badge.aktiv {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.status-badge.gekuendigt {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

.offene-raten-badge {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ef6c00;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}



.btn-filter {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-hover);
}



/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.empty-state-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.empty-state h4 {
    color: #6c757d;
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-state p {
    color: #adb5bd;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Spaltenbreiten */
.col-vertragsnummer { width: 140px; }
.col-vertragspartner { 
    width: 300px !important; 
    max-width: 300px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 200px;
}
.col-gegenstand { 
    width: 300px !important; 
    max-width: 300px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 300px;
}
.col-vertragstyp { width: 130px; }
.col-vertragsende { width: 120px; }
.col-offene-raten { width: 120px; }
.col-offener-betrag { width: 130px; }
.col-schadensersatz { width: 130px; }
.col-gesamtschaden { width: 130px; }
.col-hek { width: 100px; }
.col-hvk { width: 100px; }
.col-zeitwert { width: 100px; }
.col-aktionen { width: 80px; }

/* Gutachten Tabelle Spaltenbreiten */
.col-typ { width: 60px; }
.col-dateiname { width: auto; min-width: 150px; }
.col-hek { width: 100px; }
.col-hvk { width: 100px; }
.col-zeitwert { width: 100px; }
.col-hochgeladen { width: 120px; }
.col-aktionen { width: 100px; }

/* Gutachten-Link Styling */
.gutachten-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.gutachten-link:hover {
    color: var(--primary-color-dark);
    border-bottom-color: var(--primary-color-dark);
    text-decoration: none;
}

.gutachten-link strong {
    color: inherit;
}

/* Gesamtzeile Styling */
.table-total-row {
    background-color: #f8f9fa !important;
    border-top: 2px solid #dee2e6 !important;
}

.table-total-row td {
    padding: 1rem !important;
    color: #000000 !important;
    font-weight: bold !important;
    font-size: inherit !important;
}

/* Grüne Hinterlegung für Zeilen mit Verwertungsstatus "Erledigt" */
.table-modern tbody tr.verwertung-erledigt-row {
    background-color: #d4edda !important;
}

.table-modern tbody tr.verwertung-erledigt-row:hover {
    background-color: #c3e6cb !important;
}

.verwertung-erledigt-row td {
    background-color: transparent !important;
}

/* Animationen für Abrechnung Liste */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-container {
    animation: fadeInUp 0.6s ease-out;
}

.table-modern tbody tr {
    animation: fadeInUp 0.6s ease-out;
}

.table-modern tbody tr:nth-child(even) {
    animation-delay: 0.1s;
}

/* Responsive Design für Abrechnung Liste */
@media (max-width: 768px) {
    .abrechnung-liste-container {
        padding: 1rem;
    }
    
    /* Vertragsdetails responsive */
    #vertragsdetails .info-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    #vertragsdetails .info-item {
        padding: 0.5rem 0 !important;
    }
    
    .liste-header {
        padding: 1.5rem;
    }
    
    .header-content {
        padding-right: 1.5rem;
    }
    
    .liste-title {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table-modern {
        min-width: 1000px;
    }
    
    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* =================================================================
   VERTRAG ANLEGEN - FORMULAR LAYOUT (wie Kosten hinzufügen)
   ================================================================= */

/* Card Header Styling */
.card-header {
    background: var(--gradient-primary);
    border: none;
}

/* Formular-Container */
.form-container .row {
    max-width: 100%;
}

.form-container .col-md-6 {
    max-width: 100%;
    flex: 0 0 100%;
}

.form-container .row .col-md-6:first-child {
    padding-right: 0.75rem;
}

.form-container .row .col-md-6:last-child {
    padding-left: 0.75rem;
}

/* Kompakteres Layout für größere Bildschirme */
@media (min-width: 768px) {
    .form-container .col-md-6 {
        max-width: 50%;
        flex: 0 0 50%;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Extra Large Screens (1920px und größer) */
@media (min-width: 1920px) {
    .container-fluid {
        max-width: 1800px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .main-content {
        padding: 6rem 0 3rem 0;
    }
    
    .section-header {
        padding: 1rem 1.5rem;
    }
    
    .section-body {
        padding: 1rem 1.5rem;
    }
    
    .tab-content {
        padding: 2.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
        padding: 20px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.375rem; }
}

/* Large Screens (1400px bis 1920px) - Standard Desktop */
@media (min-width: 1400px) and (max-width: 1919px) {
    .container-fluid {
        max-width: 1600px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .section-header {
        padding: 0.875rem 1.25rem;
    }
    
    .section-body {
        padding: 0.875rem 1.25rem;
    }
    
    .tab-content {
        padding: 2.25rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
        padding: 18px;
    }
}

/* Medium-Large Screens (1200px bis 1400px) - 15" Laptops */
@media (min-width: 1200px) and (max-width: 1399px) {
    .container-fluid {
        max-width: 1400px;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .section-header {
        padding: 0.75rem 1rem;
    }
    
    .section-body {
        padding: 0.75rem 1rem;
    }
    
    .tab-content {
        padding: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 16px;
    }
    
    .info-item {
        padding: 6px 0;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.75rem;
    }
    
    h1 { font-size: 2.125rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }
    h4 { font-size: 1.125rem; }
}

/* Spezifische Optimierungen für 15" Bildschirme */
/* 1366x768 (häufigste 15" Auflösung) */
@media (min-width: 1366px) and (max-width: 1366px) {
    .container-fluid {
        max-width: 1300px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        padding: 15px;
    }
    
    .section-header,
    .section-body {
        padding: 0.75rem 1rem;
    }
    
    .tab-content {
        padding: 1.75rem;
    }
}

/* 1920x1080 (Full HD 15" Laptops) */
@media (min-width: 1920px) and (max-width: 1920px) {
    .container-fluid {
        max-width: 1800px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 18px;
    }
    
    .section-header,
    .section-body {
        padding: 1rem 1.25rem;
    }
    
    .tab-content {
        padding: 2.25rem;
    }
}

/* Standard Laptop Screens (992px bis 1200px) - 13"/14" Laptops */
@media (min-width: 992px) and (max-width: 1199px) {
    .container-fluid {
        max-width: 1200px;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        gap: 0.125rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .section-header {
        padding: 0.75rem 1rem;
    }
    
    .section-body {
        padding: 0.75rem 1rem;
    }
    
    .tab-content {
        padding: 1.75rem;
    }
    
        .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 16px;
    }

    .info-item {
        padding: 6px 0;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.6rem;
    }
    
    .sidebar-header {
        padding: 0.875rem;
    }
    
    .global-sidebar {
        padding: 1.25rem;
    }
}

/* Tablet Screens (768px bis 992px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container-fluid {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-tabs .nav-link {
        border-radius: 0;
        margin-right: 0;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        text-align: left;
    }
    
    .section-header {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .section-body {
        padding: 0.875rem 1rem;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
        .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }

    .info-item {
        padding: 6px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-value {
        text-align: left;
    }
    
    .summary-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .global-sidebar {
        position: static;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    /* Grid anpassung bei Sidebar */
    .col-lg-3,
    .col-lg-8,
    .col-lg-9,
    .col-lg-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Bei fehlender Sidebar volle Breite nutzen */
    .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Mobile Landscape (576px bis 768px) */
@media (min-width: 576px) and (max-width: 767px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-tabs .nav-link {
        border-radius: 0;
        margin-right: 0;
        text-align: left;
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .section-header {
        padding: 0.75rem 0.875rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .section-body {
        padding: 0.75rem 0.875rem;
    }
    
    .tab-content {
        padding: 1.25rem;
    }
    
        .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .info-item {
        padding: 4px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-value {
        text-align: left;
        font-size: 0.95rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 1rem;
    }
    
    .summary-content {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .table th,
    .table td {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    .col-md-6,
    .col-lg-3,
    .col-lg-8,
    .col-lg-9,
    .col-lg-10 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .btn-lg {
        padding: 0.5rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
    }
    
    .global-sidebar {
        position: static;
        margin-top: 1.25rem;
        padding: 0.875rem;
    }
    
    .sidebar-content {
        gap: 0.5rem;
    }
    
    .sidebar-action-btn {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* iPhone 13 Pro und ähnliche Geräte (390px-430px) */
@media (max-width: 430px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Navigation optimiert für iPhone */
    .navbar {
        padding: 0.75rem 0;
        min-height: 60px;
    }
    
    .navbar-brand {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .navbar-toggler {
        padding: 0.5rem;
        border: none;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }
    
    /* Dropdown-Menü für Touch optimiert */
    .dropdown-menu {
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        border: none;
        margin-top: 0.5rem;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
        margin: 0.25rem;
    }
    
    .dropdown-item:hover {
        background-color: rgba(102, 126, 234, 0.1);
    }
    
    /* Buttons für Touch optimiert */
    .btn {
        min-height: 48px;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        border-radius: 12px;
        font-weight: 500;
        margin-bottom: 0.5rem;
    }
    
    .btn-sm {
        min-height: 44px;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        min-height: 52px;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    /* Tab-Navigation für Mobile */
    .nav-tabs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 0.5rem;
        padding: 0 0.75rem;
        margin: 0 -0.75rem;
    }
    
    .nav-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .nav-tabs .nav-link {
        white-space: nowrap;
        border-radius: 12px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        font-weight: 500;
        border: 2px solid transparent;
        background: rgba(102, 126, 234, 0.1);
        color: #667eea;
        margin-right: 0.5rem;
        flex-shrink: 0;
    }
    
    .nav-tabs .nav-link.active {
        background: #667eea;
        color: white;
        border-color: #667eea;
    }
    
    /* Cards und Sections */
    .card {
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border: none;
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .section-header {
        padding: 1rem 1.25rem;
        border-radius: 16px 16px 0 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        font-weight: 600;
        font-size: 1.1rem;
    }
    
    .section-body {
        padding: 1.25rem;
    }
    
    .tab-content {
        padding: 1.25rem;
    }
    
    /* Info Grid optimiert */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.25rem;
    }
    
    .info-item {
        padding: 1rem;
        background: rgba(102, 126, 234, 0.05);
        border-radius: 12px;
        border: 1px solid rgba(102, 126, 234, 0.1);
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .info-label {
        font-size: 0.875rem;
        color: #6c757d;
        font-weight: 500;
    }
    
    .info-value {
        font-size: 1rem;
        color: #333;
        font-weight: 600;
    }
    
    /* Summary Content */
    .summary-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-item {
        padding: 1.25rem;
        border-radius: 16px;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        border: 1px solid rgba(102, 126, 234, 0.2);
    }
    
    /* Tabellen für Mobile - Card-basierte Darstellung */
    .table-responsive {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
    
    /* Für sehr kleine Bildschirme: Tabellen als Cards darstellen */
    .table-mobile-cards {
        display: none;
    }
    
    .table-mobile-cards .table-card {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(102, 126, 234, 0.1);
    }
    
    .table-mobile-cards .table-card-header {
        font-weight: 600;
        color: #667eea;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    }
    
    .table-mobile-cards .table-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .table-mobile-cards .table-card-row:last-child {
        border-bottom: none;
    }
    
    .table-mobile-cards .table-card-label {
        font-size: 0.875rem;
        color: #6c757d;
        font-weight: 500;
    }
    
    .table-mobile-cards .table-card-value {
        font-size: 0.9rem;
        color: #333;
        font-weight: 600;
        text-align: right;
    }
    
    .table-mobile-cards .table-card-actions {
        margin-top: 1rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(102, 126, 234, 0.2);
        display: flex;
        gap: 0.5rem;
        justify-content: flex-end;
    }
    
    /* Standard-Tabellen für größere mobile Geräte */
    .table th,
    .table td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        border-color: rgba(0, 0, 0, 0.08);
    }
    
    .table th {
        background: rgba(102, 126, 234, 0.1);
        font-weight: 600;
        color: #667eea;
    }
    
    /* Verstecke normale Tabelle auf sehr kleinen Bildschirmen */
    .table-responsive .table {
        display: none;
    }
    
    .table-responsive .table-mobile-cards {
        display: block;
    }
    
    /* Action Buttons */
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    /* Button Groups für Mobile optimiert */
    .btn-group {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }
    
    .btn-group .btn {
        margin-bottom: 0;
        flex: 1;
        min-width: 44px;
    }
    
    .btn-group .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
    
    /* Spezielle Optimierungen für Edit/Delete Button Groups */
    .btn-group-sm {
        gap: 0.25rem;
    }
    
    .btn-group-sm .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-height: 40px;
        border-radius: 8px;
    }
    
    /* Touch-freundliche Button-Größen */
    .btn-outline-primary,
    .btn-outline-danger {
        min-height: 44px;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        border-width: 2px;
        border-radius: 10px;
    }
    
    .btn-outline-primary:hover,
    .btn-outline-danger:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    /* Sidebar für Mobile - Sticky am unteren Bildschirmrand */
    .global-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid rgba(102, 126, 234, 0.2);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 1rem 1.25rem;
        max-height: 50vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .sidebar-header {
        display: none; /* Header auf Mobile ausblenden */
    }
    
    .sidebar-content {
        gap: 0.5rem;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .sidebar-section {
        margin-bottom: 1rem;
    }
    
    .sidebar-section-title {
        font-size: 0.8rem;
        font-weight: 600;
        color: #667eea;
        margin-bottom: 0.5rem;
        padding: 0.25rem 0;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .sidebar-action-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        border-radius: 12px;
        font-weight: 500;
        min-height: 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
        text-align: center;
        background: rgba(102, 126, 234, 0.1);
        border: 1px solid rgba(102, 126, 234, 0.2);
        color: #667eea;
        transition: all 0.2s ease;
    }
    
    .sidebar-action-btn:hover {
        background: rgba(102, 126, 234, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }
    
    .sidebar-action-btn i {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .sidebar-action-btn span {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    /* Sidebar Summary Items für Mobile */
    .sidebar-summary-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(102, 126, 234, 0.1);
        font-size: 0.85rem;
    }
    
    .sidebar-summary-item:last-child {
        border-bottom: none;
    }
    
    .sidebar-summary-label {
        color: #6c757d;
        font-weight: 500;
    }
    
    .sidebar-summary-value {
        color: #667eea;
        font-weight: 600;
    }
    
    /* Main Content Padding für Sidebar */
    .main-content {
        padding-bottom: 200px; /* Platz für Sidebar */
    }
    
    /* Typography für iPhone */
    h1 { 
        font-size: 1.75rem; 
        font-weight: 700;
        line-height: 1.2;
    }
    h2 { 
        font-size: 1.5rem; 
        font-weight: 600;
        line-height: 1.3;
    }
    h3 { 
        font-size: 1.25rem; 
        font-weight: 600;
        line-height: 1.3;
    }
    h4 { 
        font-size: 1.1rem; 
        font-weight: 600;
    }
    h5 { 
        font-size: 1rem; 
        font-weight: 600;
    }
    h6 { 
        font-size: 0.95rem; 
        font-weight: 600;
    }
    
    /* Main Content */
    .main-content {
        padding: 1.5rem 0;
    }
    
    /* Form Controls */
    .form-control {
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 12px;
        border: 2px solid rgba(0, 0, 0, 0.1);
    }
    
    .form-control:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }
    
    .form-select {
        min-height: 48px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }
    
    /* Modal Optimierungen */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        border-radius: 16px;
        border: none;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
    
    .modal-header {
        border-radius: 16px 16px 0 0;
        padding: 1.25rem;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .modal-footer {
        padding: 1rem 1.25rem;
        border-radius: 0 0 16px 16px;
    }
}

/* Mobile Portrait (bis 576px) - Fallback für ältere Geräte */
@media (max-width: 575px) and (min-width: 431px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-tabs .nav-link {
        border-radius: 0;
        margin-right: 0;
        text-align: left;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .section-header {
        padding: 0.5rem 0.75rem;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .section-body {
        padding: 0.5rem 0.75rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
        .info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }

    .info-item {
        padding: 4px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .info-value {
        text-align: left;
        font-size: 0.875rem;
    }
    
    .summary-content {
        grid-template-columns: 1fr;
        gap: 0.375rem;
    }
    
    .summary-item {
        padding: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.25rem 0.375rem;
        font-size: 0.8rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.375rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.375rem;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        width: 100%;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .global-sidebar {
        position: static;
        margin-top: 1rem;
        padding: 0.75rem;
    }
    
    .sidebar-header {
        margin: -0.75rem -0.75rem 1rem;
        padding: 0.5rem;
    }
    
    .sidebar-content {
        gap: 0.375rem;
    }
    
    .sidebar-action-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Typography für sehr kleine Bildschirme */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1rem; }
    h5 { font-size: 0.95rem; }
    h6 { font-size: 0.875rem; }
    
    /* Navbar für Mobile */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.125rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.875rem;
    }
}

/* ========================================
   DARK MODE SUPPORT - DEAKTIVIERT
   ======================================== */
/* Dark Mode wurde deaktiviert - alle Geräte verwenden Light Mode */

/* ========================================
   SPECIAL EFFECTS
   ======================================== */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #dee2e6;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a5fd1;
}

/* ========================================
   ALLGEMEINE STYLES
   ======================================== */

/* Offene Raten Tabelle - Bootstrap-Klassen funktionieren standardmäßig */

/* ========================================
   ALLGEMEINE STYLES
   ======================================== */

/* ========================================
   ABRECHNUNGSLISTE - NEUE SPALTEN
   ======================================== */

/* Neue Spaltenbreiten für Notizen und Änderungen */
.col-notizen { width: 120px; }
.col-aufgaben { width: 120px; }

/* Status Column Styling - automatische Breite basierend auf Inhalt */
.col-status { 
    min-width: 200px; 
    max-width: 250px;
}

/* Inkasso Column Styling - automatische Breite basierend auf Inhalt */
.col-inkasso { 
    min-width: 150px; 
    max-width: 250px;
}
.col-insolvenz { 
    min-width: 200px; 
    max-width: 250px;
}

/* Risikoart Column Styling - automatische Breite basierend auf Inhalt */
.col-risikoart { 
    min-width: 100px; 
    max-width: 150px;
}
.col-aenderungen { width: 130px; }

/* Notizen-Badge Styling */
.notizen-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.notizen-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notizen-badge:hover {
    background: transparent;
    color: var(--primary-color-dark);
    transform: translateY(-1px);
}

.notizen-count {
    margin-left: 0.25rem;
    font-weight: 600;
}

/* Änderungen-Badge Styling */
.aenderungen-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.aenderungen-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border: 1px solid #ce93d8;
    border-radius: 1rem;
    color: #7b1fa2;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.aenderungen-badge:hover {
    background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(123, 31, 162, 0.3);
}

.aenderungen-count {
    margin-left: 0.25rem;
    font-weight: 600;
}

/* Erweiterte Aktionen Dropdown */
.btn-group .dropdown-toggle {
    border-left: 1px solid rgba(0, 0, 0, 0.125);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #333;
    transition: all 0.15s ease;
    border-radius: 0.25rem;
    margin: 0 0.25rem;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(2px);
}

.dropdown-item i {
    width: 1rem;
    margin-right: 0.5rem;
    text-align: center;
}

.dropdown-divider {
    margin: 0.5rem 0.75rem;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Responsive Anpassungen für neue Spalten */
@media (max-width: 1400px) {
    .col-notizen { width: 100px; }
    .col-aufgaben { width: 110px; }
    .col-aenderungen { width: 120px; }
}

@media (max-width: 1200px) {
    .col-notizen { width: 90px; }
    .col-aufgaben { width: 100px; }
    .col-aenderungen { width: 110px; }
    
    .notizen-badge,
    .aufgaben-badge,
    .status-badge,
    .inkasso-badge,
    .aenderungen-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    .col-notizen,
    .col-aufgaben,
    .col-aenderungen {
        display: none;
    }
    
    .table-modern thead th:nth-child(10),
    .table-modern thead th:nth-child(11),
    .table-modern tbody td:nth-child(10),
    .table-modern tbody td:nth-child(11) {
        display: none;
    }
}

/* Animationen für Badges */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.notizen-badge.important,
.aufgaben-badge.important,
.aenderungen-badge.recent {
    animation: pulse 2s infinite;
}

/* Hover-Effekte für Badges */
.notizen-badge:hover .notizen-count,
.aufgaben-badge:hover .aufgaben-count,
.aenderungen-badge:hover .aenderungen-count {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Tooltip-Styling */
.notizen-badge[title]:hover::after,
.aufgaben-badge[title]:hover::after,
.aenderungen-badge[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
}

/* Status-Indikatoren */
.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

/* Verbesserte Tabellen-Responsivität */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-modern {
        min-width: 800px;
    }
    
    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   ÄNDERUNGSHISTORIE - EINFACHE TEXTDARSTELLUNG
   ======================================== */

.wert-vergleich {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #000;
}

.wert-box {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    background: #fff;
}

.alter-wert-box {
    border-left: 3px solid #ccc;
}

.neuer-wert-box {
    border-left: 3px solid #999;
}

.wert-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #000;
}

.wert-inhalt {
    font-size: 0.875rem;
    color: #000;
    word-break: break-word;
    line-height: 1.4;
}

.alter-wert {
    color: #000;
}

.neuer-wert {
    color: #000;
}

.aenderung-zusammenfassung {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    color: #000;
}

.aenderung-arrow {
    font-size: 1rem;
    color: #000;
}

.aenderung-text {
    font-size: 0.875rem;
    color: #000;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .wert-vergleich {
        gap: 0.25rem;
    }
    
    .aenderung-zusammenfassung {
        padding: 0.5rem;
    }
}

/* ========================================
   TABELLEN - LINKSBÜNDIGE AUSRICHTUNG
   ======================================== */

/* Alle Tabellen-Spalten standardmäßig linksbündig */
.table th,
.table td {
    text-align: left !important;
}

/* Überschreibe Bootstrap-Klassen für linksbündige Ausrichtung */
.table th.text-start,
.table td.text-start {
    text-align: left !important;
}

/* Spezifische Überschreibungen für alle Tabellen */
.table thead th,
.table tbody td {
    text-align: left !important;
}

/* Überschreibe alle möglichen Bootstrap-Ausrichtungen */
.table th.text-center,
.table td.text-center,
.table th.text-end,
.table td.text-end {
    text-align: left !important;
}

/* Spezifisch für Änderungshistorie und Notizen */
#aenderungshistorie .table th,
#aenderungshistorie .table td,
#notizen .table th,
#notizen .table td {
    text-align: left !important;
}

/* ========================================
   NOTIZEN TABELLE SPALTEN-AUSRICHTUNG
   ======================================== */
/* Feste Spaltenbreiten für Notizen-Tabelle */
#notizen .table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

/* Alle Tabellen-Zellen erzwingen Textumbruch */
#notizen .table th,
#notizen .table td {
    word-wrap: break-word !important;
    word-break: break-word !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    max-width: 0; /* Erzwingt Textumbruch */
}

#notizen .table th:nth-child(1),  /* Erstellt am */
#notizen .table td:nth-child(1) {
    width: 10%;
    min-width: 80px;
}

#notizen .table th:nth-child(2),  /* Erstellt von */
#notizen .table td:nth-child(2) {
    width: 12%;
    min-width: 100px;
}

#notizen .table th:nth-child(3),  /* Titel */
#notizen .table td:nth-child(3) {
    width: 18%;
    min-width: 120px;
}

#notizen .table th:nth-child(4),  /* Inhalt */
#notizen .table td:nth-child(4) {
    width: 45%;
    min-width: 200px;
}

#notizen .table th:nth-child(5),  /* Wichtig */
#notizen .table td:nth-child(5) {
    width: 7%;
    min-width: 60px;
}

#notizen .table th:nth-child(6),  /* Aktionen */
#notizen .table td:nth-child(6) {
    width: 8%;
    min-width: 80px;
}

/* Zusätzliche Regeln für den Notizen-Sektor */
#notizen {
    max-width: 100%;
    overflow-x: hidden;
}

#notizen .card,
#notizen .card-body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   ÄNDERUNGSHISTORIE - TEMPLATES
   ======================================== */

/* Aenderungshistorie Übersicht */
.aenderungen-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.aenderungen-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-card);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.aenderungen-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.aenderungen-header .vertrag-info {
    margin-top: 1rem;
    opacity: 0.9;
}

.aenderungen-content {
    display: block;
    width: 100%;
    max-width: 100%;
    /* Gleiche Breite wie notizen-content */
    min-width: 100%;
}

.aenderungen-liste {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Sidebar wurde entfernt - nicht mehr benötigt */

.aenderung-item {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.aenderung-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-primary);
    transform: translateY(-2px);
}

.aenderung-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    border-radius: 0.75rem 0 0 0.75rem;
}

.aenderung-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.aenderung-typ {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.aenderung-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.aenderung-beschreibung {
    color: var(--text-color-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 500;
}

.aenderung-werte {
    background: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.aenderung-werte h6 {
    margin-bottom: 0.5rem;
    color: var(--text-color-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-aenderungen {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-aenderungen i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.filter-form {
    background: var(--light-bg);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-form h5 {
    margin-bottom: 1rem;
    color: var(--text-color-light);
}

.stats-card {
    background: linear-gradient(135deg, var(--light-bg) 0%, var(--light-color-hover) 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stats-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Aenderungshistorie Erstellen */
.aenderung-erstellen-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.aenderung-form-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.help-text {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #1976d2;
}

.help-text h6 {
    color: #1565c0;
    margin-bottom: 0.5rem;
}

.help-text ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.help-text li {
    margin-bottom: 0.25rem;
}

/* Responsive Anpassungen */
@media (max-width: 992px) {
    .aenderungen-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .aenderungen-container,
    .aenderung-erstellen-container {
        padding: 1rem;
    }
    
    .aenderungen-header,
    .aenderung-header {
        padding: 1.5rem;
    }
    
    .aenderungen-header h1,
    .aenderung-header h1 {
        font-size: 1.75rem;
    }
    
    .aenderungen-liste,
    .aenderung-form-container {
        padding: 1.5rem;
    }
    
    .wert-vergleich {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* ========================================
   NOTIZEN STYLES
   ======================================== */
.notizen-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.notizen-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-card);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.notizen-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.notizen-header .vertrag-info {
    margin-top: 1rem;
    opacity: 0.9;
    color: #2c3e50 !important;
}

.notizen-content {
    display: block;
    max-width: 100%;
}

.notizen-liste {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow-x: hidden;
}

.notiz-item {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.notiz-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-primary);
    transform: translateY(-2px);
}

.notiz-item.wichtig {
    border-left: 4px solid var(--warning-color);
    background: linear-gradient(135deg, var(--warning-bg) 0%, rgba(255, 243, 205, 0.8) 100%);
}

.notiz-item.aufgabe {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, var(--primary-bg) 0%, rgba(121, 174, 200, 0.05) 100%);
}

.notiz-item.aufgabe.erledigt {
    border-left: 4px solid var(--success-color);
    background: linear-gradient(135deg, var(--success-bg) 0%, rgba(40, 167, 69, 0.05) 100%);
    opacity: 0.7;
}

.notiz-item.aufgabe.erledigt .notiz-titel {
    text-decoration: line-through;
    color: var(--text-color-light);
}

.notiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.notiz-titel-container {
    flex: 1;
    margin-right: 1rem;
}

.notiz-titel {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.notiz-meta-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-color-light);
}

.notiz-meta-primary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    white-space: nowrap;
}

.notiz-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.notiz-meta-inline {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-color-light);
    white-space: nowrap;
    min-width: 200px;
    justify-content: flex-end;
}

.notiz-user,
.notiz-datum {
    white-space: nowrap;
}

.notiz-inhalt {
    color: var(--text-color-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Checklist Checkbox Styles */
.checklist-checkbox {
    margin-right: 8px;
    transform: scale(1.2);
    cursor: pointer;
}

.checklist-label {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.checklist-label:hover {
    color: var(--primary-color);
}

.checklist-checkbox:checked + .checklist-label {
    text-decoration: line-through;
    opacity: 0.6;
    color: var(--success-color);
}

/* Checklist Item Container */
.checklist-item {
    margin-bottom: 8px;
    padding: 4px 0;
}

.checklist-item:last-child {
    margin-bottom: 0;
}

.notiz-aktionen {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.wichtig-badge {
    background: #79aec8;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    border: 1px solid #417690;
}

.aufgabe-badge {
    background: #417690;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    border: 1px solid #2c5aa0;
}

.aufgabe-badge.erledigt {
    background: #79aec8;
    color: white;
    border: 1px solid #417690;
}

.faelligkeitsdatum-badge {
    background: #79aec8;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #417690;
}

.faelligkeitsdatum-badge.ueberfaellig {
    background: #ba2121;
    color: white;
    border: 1px solid #a41515;
}

.prioritaet-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.prioritaet-niedrig {
    background: #79aec8;
    border: 1px solid #417690;
}

.prioritaet-mittel {
    background: #417690;
    border: 1px solid #2c5aa0;
}

.prioritaet-hoch {
    background: #2c5aa0;
    border: 1px solid #1e3f7a;
}

.prioritaet-kritisch {
    background: #ba2121;
    border: 1px solid #a41515;
}

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

/* ========================================
   EINFACHER FILTER STYLING
   ======================================== */

.simple-filter {
    background: var(--light-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.filter-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.ueberfaellig-badge {
    background: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

/* Responsive Anpassungen für Filter */
@media (max-width: 768px) {
    .simple-filter .d-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .btn-group {
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1;
    }
}

.empty-notizen {
    text-align: center;
    padding: 3rem;
    color: var(--text-color-light);
}

.empty-notizen i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Mobile Styles für Notizen */
@media (max-width: 992px) {
    .notizen-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .notizen-container {
        padding: 1rem;
        max-width: 95%;
    }
    
    .notizen-header {
        padding: 1rem;
    }
    
    .notizen-header h1 {
        font-size: 1.75rem;
    }
    
    .notizen-liste {
        padding: 1.5rem;
    }
    
    .notiz-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .notiz-meta-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        min-width: auto;
        width: 100%;
    }
    
    .notiz-titel-container {
        margin-right: 0;
    }
}

/* Print Styles für Notizen */
@media print {
    /* Navbar ausblenden */
    .navbar,
    .global-sidebar,
    .sidebar-toggle {
        display: none !important;
    }
    
    /* Container anpassen */
    .notizen-container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 1rem !important;
    }
    
    /* Header für Druck optimieren */
    .notizen-header {
        background: #f8f9fa !important;
        color: #333 !important;
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Aktions-Buttons ausblenden */
    .notiz-aktionen,
    .btn,
    button[type="button"] {
        display: none !important;
    }
    
    /* Modal ausblenden */
    .modal,
    #neueNotizModal {
        display: none !important;
    }
    
    /* JavaScript ausblenden */
    script {
        display: none !important;
    }
    
    /* Notizen-Items für Druck optimieren */
    .notiz-item {
        border: 1px solid #dee2e6 !important;
        background: white !important;
        box-shadow: none !important;
        transform: none !important;
        page-break-inside: avoid;
    }
    
    .notiz-item.wichtig {
        border-left: 4px solid #ffc107 !important;
        background: #fff8e1 !important;
    }
    
    /* Wichtig-Badge für Druck anpassen */
    .wichtig-badge {
        background: #ffc107 !important;
        color: #212529 !important;
        border: 1px solid #dee2e6 !important;
    }
    
    /* Notiz-Header für Druck optimieren - Alle Elemente in einer Zeile */
    .notiz-header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        margin-bottom: 1rem !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
    
    .notiz-titel-container {
        flex: 0 1 auto !important;
        margin-right: 0.5rem !important;
        min-width: 0 !important;
        max-width: 60% !important;
    }
    
    .notiz-titel {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        color: #333 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    .notiz-meta-inline {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem !important;
        font-size: 0.7rem !important;
        color: #6c757d !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
        margin-left: 0.5rem !important;
    }
    
    .notiz-user,
    .notiz-datum {
        display: inline !important;
        white-space: nowrap !important;
        margin-right: 0.5rem !important;
    }
    
    .wichtig-badge {
        display: inline-block !important;
        white-space: nowrap !important;
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    /* Typografie für Druck optimieren */
    body {
        font-size: 12pt !important;
        line-height: 1.4 !important;
    }
    
    h1, h2, h3, h4 {
        color: #333 !important;
        page-break-after: avoid;
    }
    
    /* Seitenumbrüche vermeiden */
    .notiz-item {
        page-break-inside: avoid;
    }
    
    /* Container ohne Schatten */
    .notizen-liste {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    
    /* Zurück-Button ausblenden */
    .btn-light {
        display: none !important;
    }
    
    /* Neue Notiz und Änderungshistorie Buttons ausblenden */
    .d-flex.gap-2 {
        display: none !important;
    }
}

/* ========================================
   MIGRIERTE INLINE STYLES AUS TEMPLATES
   ======================================== */

/* ========================================
   NOTIZ BEARBEITEN TEMPLATE STYLES
   ======================================== */
.notiz-bearbeiten-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.notiz-bearbeiten-container .notiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.notiz-bearbeiten-container .notiz-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.notiz-bearbeiten-container .notiz-header .vertrag-info {
    margin-top: 1rem;
    opacity: 0.9;
}

.notiz-form-container {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

/* ========================================
   NOTIZ LÖSCHEN TEMPLATE STYLES
   ======================================== */
.notiz-loeschen-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    overflow-x: hidden;
}

.notiz-loeschen-container .notiz-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.notiz-loeschen-container .notiz-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.notiz-loeschen-container .notiz-header .vertrag-info {
    margin-top: 1rem;
    opacity: 0.9;
}

.notiz-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.notiz-warning i {
    font-size: 3rem;
    color: #f39c12;
    margin-bottom: 1rem;
}

.notiz-warning h4 {
    color: #d68910;
    margin-bottom: 1rem;
}

.notiz-details {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.notiz-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.info-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    order: 1;
}

.info-value {
    color: #212529;
    font-size: 1rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    hyphens: auto;
    order: 2;
}

/* ========================================
   VERTRAG BEARBEITEN TEMPLATE STYLES
   ======================================== */
.vertrag-bearbeiten-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.vertrag-bearbeiten-buttons .btn {
    flex: 0 0 auto;
    min-width: 220px;
    max-width: 220px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vertrag-bearbeiten-buttons .btn i {
    margin-right: 0.5rem;
}

/* ========================================
   ABRECHNUNG DETAILS TEMPLATE STYLES
   ======================================== */
/* Spezifische Spaltenbreiten für Änderungshistorie */
#aenderungshistorie .table th:nth-child(1),  /* Datum */
#aenderungshistorie .table td:nth-child(1) {
    width: 10%;
    min-width: 80px;
}

#aenderungshistorie .table th:nth-child(2),  /* Benutzer */
#aenderungshistorie .table td:nth-child(2) {
    width: 12%;
    min-width: 100px;
}

#aenderungshistorie .table th:nth-child(3),  /* Typ */
#aenderungshistorie .table td:nth-child(3) {
    width: 15%;
    min-width: 120px;
}

#aenderungshistorie .table th:nth-child(4),  /* Beschreibung */
#aenderungshistorie .table td:nth-child(4) {
    width: 55%;
    min-width: 200px;
}

#aenderungshistorie .table td:nth-child(5),  /* Aktionen */
#aenderungshistorie .table td:nth-child(5) {
    width: 8%;
    min-width: 80px;
}

/* Einnahmen-Styles nach zahlung_uebersicht.css migriert */

/* ========================================
   RESPONSIVE ANPASSUNGEN FÜR MIGRIERTE STYLES
   ======================================== */

/* Aktions-Buttons in Kosten-Tabelle */

/* Button-Gruppen in Kosten-Tabelle */


/* Spezifische Regeln für Offene Posten-Tabelle */
#offene-posten .table th:nth-child(2),  /* Typ */
#offene-posten .table td:nth-child(2) {
    white-space: nowrap !important;
    min-width: 120px;
}

/* ========================================
   BASE TEMPLATE STYLES
   ======================================== */
.logout-form {
    margin: 0;
}

.logout-button {
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    padding: 0.375rem 1rem;
}

/* ========================================
   RESPONSIVE ANPASSUNGEN FÜR MIGRIERTE STYLES
   ======================================== */
@media (max-width: 768px) {
    /* Notiz Bearbeiten Responsive */
    .notiz-bearbeiten-container {
        padding: 1rem;
    }
    
    .notiz-bearbeiten-container .notiz-header {
        padding: 1.5rem;
    }
    
    .notiz-bearbeiten-container .notiz-header h1 {
        font-size: 2rem;
    }
    
    .notiz-form-container {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    /* Notiz Löschen Responsive */
    .notiz-loeschen-container {
        padding: 1rem;
    }
    
    .notiz-loeschen-container .notiz-header {
        padding: 1.5rem;
    }
    
    .notiz-loeschen-container .notiz-header h1 {
        font-size: 2rem;
    }
    
    .notiz-details {
        padding: 1.5rem;
    }
    
    .notiz-info {
        grid-template-columns: 1fr;
    }
    
    /* Vertrag Bearbeiten Responsive */
    .vertrag-bearbeiten-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .vertrag-bearbeiten-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
}

/* ========================================
   FORFAITIERTE VERTRÄGE STYLES
   ======================================== */
.forfaitiert-refinanzierungspartner {
    background-color: #e3f2fd !important;
    border: 1px solid #90caf9 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    display: inline-block !important;
    color: #1976d2 !important;
    font-weight: 500 !important;
}

.forfaitiert-refinanzierungspartner .info-label {
    color: #1976d2 !important;
    font-weight: 600 !important;
}

.forfaitiert-refinanzierungspartner .info-value {
    color: #1565c0 !important;
    font-weight: 600 !important;
}

/* ========================================
   ABRECHNUNG LISTE ERWEITERUNGEN
   ======================================== */
/* Forfaitiert Status Badges */
.status-badge.forfaitiert {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border: 1px solid #90caf9;
}

.status-badge.nicht-forfaitiert {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #757575;
    border: 1px solid #bdbdbd;
}

/* Refinanzierungspartner Zelle */
.refinanzierungspartner-cell {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.refinanzierungspartner-cell.forfaitiert-refinanzierungspartner {
    background-color: #e3f2fd !important;
    border: 1px solid #90caf9 !important;
    color: #1976d2 !important;
    font-weight: 500 !important;
}

/* Verkaufserlös und Verkaufsdatum Spalten */
.col-verwertungserloes {
    min-width: 120px;
}

.col-verkaufsdatum {
    min-width: 100px;
}

.col-forfaitiert {
    min-width: 100px;
}

.col-refinanzierungspartner {
    min-width: 150px;
}

/* Aufgaben-Badge Styling */
.aufgaben-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.aufgaben-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.aufgaben-badge:hover {
    background: transparent;
    color: var(--primary-color-dark);
    transform: translateY(-1px);
}

.aufgaben-count {
    margin-left: 0.25rem;
    font-weight: 600;
}

/* Status Link Styling */
.status-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.status-link:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* Inkasso Link Styling */
.inkasso-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.inkasso-link:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* ========================================
   STATUS ÜBERSICHT
   ======================================== */

.status-uebersicht-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Status Header */
.status-header {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-card);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    color: white;
}

.status-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
    color: var(--text-color-dark);
}

.header-actions {
    margin-top: 1.5rem;
}

/* Status Sections */
.status-sections {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* Status Section mit stabiler Höhe */
.status-section {
    min-height: 200px; /* Verhindert Höhenschwankungen */
    transition: all 0.2s ease;
}

/* Loading-Spinner Animation */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bei großen Displays: Header soll breiter sein */
@media (min-width: 1200px) {
    .abrechnung-details-container {
        max-width: 1400px !important;
    }
}

.status-section {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
    width: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.status-section-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-description {
    color: var(--text-color-light);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Status Content */
.status-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.current-status h3,
.status-options h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: white;
    background: var(--primary-color);
    box-shadow: none;
}

/* Verwertung Status Badges */
/* All Status Badges use primary-color */
.verwertung-status-in_klaerung,
.verwertung-status-sicherstellung,
.verwertung-status-bewertung,
.verwertung-status-verwertung,
.verwertung-status-verkauft_unbezahlt,
.verwertung-status-verkauft_bezahlt,
.verwertung-status-abrechnung,
.verwertung-status-erledigt,
.inkasso-status-mahnbescheid,
.inkasso-status-vollstreckungsbescheid,
.inkasso-status-zwangsvollstreckung,
.inkasso-status-langzeitueberwachung,
.inkasso-status-erledigt,
.insolvenz-status-kein_verfahren,
.insolvenz-status-antrag_gestellt,
.insolvenz-status_eroeffnet,
.insolvenz-status_abgeschlossen,
.insolvenz-status_abgewiesen {
    background: var(--primary-color);
}

/* Insolvenz Status Badges - Spezielle Farben */
.insolvenz-status-antrag_gestellt {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ef6c00;
}

.insolvenz-status_eroeffnet {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

.insolvenz-status_abgeschlossen {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.insolvenz-status_abgewiesen {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

/* Status Forms */
.status-form {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    font-size: 1rem;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-bg);
}

/* Status Historie */
.status-historie {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.status-historie h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.historie-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.historie-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--border-radius);
    border-left: 2px solid var(--border-color);
}

.historie-icon {
    color: var(--text-color-light);
    font-size: 1rem;
    margin-top: 0.2rem;
}

.historie-details {
    flex: 1;
}

.historie-text {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.old-status {
    color: var(--primary-color-dark);
    font-weight: 600;
}

.new-status {
    color: var(--primary-color-dark);
    font-weight: 600;
}

.historie-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.historie-user,
.historie-datum {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.empty-historie {
    text-align: center;
    padding: 3rem;
    color: var(--text-color-light);
}

.empty-historie i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 1199px) and (min-width: 992px) {
    .status-sections {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .abrechnung-details-container {
        max-width: 1000px !important;
    }
}

@media (max-width: 992px) {
    .status-sections {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .abrechnung-details-container {
        max-width: 800px !important;
    }
    
    .status-uebersicht-container {
        padding: 1rem;
        max-width: 800px;
    }
    
    .status-header {
        padding: 1.5rem;
    }
    
    .status-title {
        font-size: 2rem;
    }
    
    .status-section {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .status-title {
        font-size: 1.8rem;
        flex-direction: column;
        text-align: center;
    }
    
    .status-section {
        padding: 1.5rem;
    }
    
    .historie-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Status Link Styling */
.status-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
.status-link:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}
/* Inkasso Link Styling */
.inkasso-link {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
.inkasso-link:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* Gutachten Management Styling */
.gutachten-header {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    color: white;
}

.gutachten-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gutachten-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Stat Cards für Gutachten */
.stat-card {
    background: white;
    border-radius: var(--border-radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-color-light);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Gutachten Liste */
.gutachten-liste {
    background: white;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.gutachten-row {
    transition: all 0.2s ease;
}

.gutachten-row:hover {
    background-color: var(--light-bg);
}

.gutachten-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.gutachten-icon {
    font-size: 1.5rem;
    color: var(--warning-color);
    margin-top: 0.25rem;
}

.gutachten-details {
    flex: 1;
}

.gutachten-titel {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Bewertung Info */
.bewertung-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bewertung-wert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

/* E-Mail Info */
.email-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.email-betreff {
    font-weight: 600;
    color: var(--text-color);
}

/* Datei Info */
.datei-info {
    text-align: center;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem;
}

.empty-icon {
    color: var(--text-color-light);
}

/* Gutachten Form Styling */
.gutachten-form-container {
    background: white;
    border-radius: var(--border-radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.gutachten-form-header {
    background: var(--gradient-primary);
    border-radius: var(--border-radius-card);
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
}

.gutachten-form-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gutachten-form-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* File Upload Styling */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    background: var(--light-bg);
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--primary-bg-light);
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.file-upload-text {
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

/* E-Mail Template Styling */
.email-template-section {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.email-template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.email-template-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0;
}

.email-placeholders {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.placeholder-item {
    display: inline-block;
    background: var(--primary-bg);
    color: var(--primary-color-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
    margin: 0.25rem;
}

/* Responsive Anpassungen für Gutachten */
@media (max-width: 768px) {
    .gutachten-header {
        padding: 1.5rem;
    }
    
    .gutachten-title {
        font-size: 2rem;
    }
    
    .gutachten-subtitle {
        font-size: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .gutachten-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gutachten-icon {
        align-self: center;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* Zusätzliche Styles für Gutachten Templates */
.gutachten-vorschau {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    border: 1px solid var(--border-color);
    height: 100%;
}

.info-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.confirmation-form {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.form-check-label {
    color: var(--text-color);
    line-height: 1.4;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:checked:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(121, 174, 200, 0.25);
}

/* Notiz Bearbeiten Checkbox Styles */
.notiz-bearbeiten-container .form-check-input {
    border-radius: 4px;
    border: 2px solid #ced4da;
    transition: all 0.2s ease;
}

.notiz-bearbeiten-container .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.notiz-bearbeiten-container .form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(121, 174, 200, 0.25);
}

.notiz-bearbeiten-container .form-check-label {
    color: var(--text-color);
    font-weight: 500;
    margin-left: 0.5rem;
    cursor: pointer;
}

/* E-Mail Form Section */
.email-form-section {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

/* Section Headers */
.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-title.text-primary {
    color: var(--primary-color) !important;
}

.section-title.text-danger {
    color: var(--danger-color) !important;
}

/* Gutachten Card Styling */
.gutachten-card {
    background: white;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gutachten-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.gutachten-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--light-bg);
    border-radius: var(--border-radius-card) var(--border-radius-card) 0 0;
}

.gutachten-icon {
    font-size: 1.5rem;
}

.gutachten-actions {
    display: flex;
    gap: 0.25rem;
}

.gutachten-card-body {
    padding: 1rem;
    flex-grow: 1;
}

.gutachten-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.gutachten-filename {
    color: var(--text-color-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    word-break: break-all;
}

.gutachten-meta {
    margin-bottom: 1rem;
}

.gutachten-werte {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 0.75rem;
}

.wert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.wert-item:last-child {
    margin-bottom: 0;
}

.wert-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.875rem;
}

.wert-value {
    font-weight: 700;
    font-size: 0.875rem;
}

.extraktion-status {
    text-align: center;
}

/* Werte-Anzeige für verschiedene Kombinationen */
.gutachten-werte .col-12 .wert-item {
    justify-content: center;
}

.gutachten-werte .col-12 .wert-label {
    margin-right: 0.5rem;
}

.gutachten-werte .col-4 .wert-item {
    justify-content: space-between;
}

.gutachten-werte .col-6 .wert-item {
    justify-content: space-between;
}

.extraktion-status .text-muted {
    font-size: 0.875rem;
}

.gutachten-card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--light-bg);
    border-radius: 0 0 var(--border-radius-card) var(--border-radius-card);
}

/* Drag & Drop Styling */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--light-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary-color);
    background: var(--primary-bg-light);
}

.file-upload-area.drag-over {
    border-width: 3px;
    background: var(--primary-bg);
}

.file-upload-content {
    pointer-events: none;
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

.file-upload-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.file-upload-text {
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
}

.file-item {
    background: white;
    transition: all 0.2s ease;
}

.file-item:hover {
    background: var(--light-bg);
}

/* Upload Progress */
.progress {
    height: 0.5rem;
    border-radius: var(--border-radius);
}

.progress-bar {
    background: var(--primary-color);
    transition: width 0.3s ease;
}

/* File Type Icons */
.gutachten-icon .fa-file-pdf {
    color: #dc3545;
}

.gutachten-icon .fa-file-word {
    color: #0d6efd;
}

.gutachten-icon .fa-file-excel {
    color: #198754;
}

.gutachten-icon .fa-file {
    color: #6c757d;
}

/* Responsive Anpassungen für Gutachten Cards */
@media (max-width: 768px) {
    .gutachten-card-header {
        padding: 0.75rem;
    }
    
    .gutachten-card-body {
        padding: 0.75rem;
    }
    
    .gutachten-card-footer {
        padding: 0.5rem 0.75rem;
    }
    
    .gutachten-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .gutachten-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .file-upload-icon {
        font-size: 2rem;
    }
}

/* Gutachten Header Styling */
.gutachten-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-card);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.gutachten-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.gutachten-header .vertrag-info {
    margin-top: 1rem;
    opacity: 0.9;
}

/* Gutachten Tabelle Styling */
.gutachten-tabelle .table {
    background: white;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.gutachten-tabelle .table th {
    border-top: none;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
    background: var(--light-bg);
}

.gutachten-tabelle .table td {
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
}

.gutachten-tabelle .table tbody tr:hover {
    background-color: var(--primary-bg-light);
}

.gutachten-tabelle .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

.gutachten-tabelle .btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Gutachten Vorschau Styling */
.gutachten-preview-container {
    padding: 1rem;
}

.preview-header {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.preview-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.preview-subtitle {
    color: var(--text-color-light);
    margin-bottom: 0;
}

.pdf-viewer {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.preview-actions {
    text-align: center;
}

.preview-actions .btn {
    margin: 0 0.25rem;
}

/* Office Preview Styling */
.office-preview {
    text-align: center;
}

.file-info-card {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.file-icon {
    margin-bottom: 1rem;
}

.file-name {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.file-type,
.file-size,
.file-upload {
    color: var(--text-color-light);
    margin-bottom: 0.25rem;
}

.extraktion-ergebnis {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.extraktion-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.wert-card {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1rem;
    border: 1px solid var(--border-color);
    height: 100%;
}

.wert-header {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.wert-body {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
}

.extraktion-hinweise {
    margin-top: 1rem;
}

/* Responsive Anpassungen für Vorschau */
@media (max-width: 768px) {
    .gutachten-preview-container {
        padding: 0.5rem;
    }
    
    .file-info-card {
        padding: 1rem;
    }
    
    .extraktion-ergebnis {
        padding: 1rem;
    }
    
    .preview-actions .btn {
        display: block;
        width: 100%;
        margin: 0.25rem 0;
    }
}

.col-gesamtschaden { width: 130px; }
.col-hek { width: 100px; }
.col-hvk { width: 100px; }
.col-zeitwert { width: 100px; }
.col-aktionen { width: 80px; }

/* Notiz Bearbeiten Checkbox Styles */
.notiz-bearbeiten-container .form-check-input {
    border-radius: 4px;
    border: 2px solid #ced4da;
    transition: all 0.2s ease;
}

.notiz-bearbeiten-container .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.notiz-bearbeiten-container .form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(121, 174, 200, 0.25);
}

.notiz-bearbeiten-container .form-check-label {
    color: var(--text-color);
    font-weight: 500;
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Notiz Bearbeiten Textarea Styles - Automatische Höhenanpassung */
.notiz-bearbeiten-container textarea {
    min-height: 150px;
    height: auto;
    resize: none;
    overflow: hidden;
    line-height: 1.5;
    padding: 12px;
}

.notiz-bearbeiten-container .form-group textarea {
    min-height: 150px;
    height: auto;
    resize: none;
    overflow: hidden;
    line-height: 1.5;
    padding: 12px;
}

/* Kosten-Tabelle spezifische Breite - nur für Kosten-Tabellen */

/* Für Kosten-Tabellen: Mehr Platz für alle Spalten */

/* Kosten-Tabelle Spaltenbreiten - nur für Kosten-Tabellen */

/* ========================================
   BEMERKUNGSSPALTE - LINKSBÜNDIG (nur für andere Tabellen)
   ======================================== */

/* Basis-Styling für Bemerkungsspalte */
.col-bemerkung {
    width: auto !important;
    min-width: 550px !important;
    text-align: left !important;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Spezifische Regeln für andere Tabellen */
table .col-bemerkung {
    min-width: 550px !important;
    text-align: left !important;
}

/* Überschreibt alle anderen Ausrichtungen */
th.col-bemerkung,
td.col-bemerkung {
    text-align: left !important;
}


/* Spezifische Regeln für Kosten-Tabelle in abrechnung_details.html */








/* Textausrichtung für Kosten-Tabelle */



/* ========================================
   FORCE BEMERKUNGSSPALTE LINKSBÜNDIG
   ======================================== */

/* Höchste Priorität - überschreibt wirklich alles */
html body div.container-fluid div.row div.col-12 div.tab-content div.tab-pane div.section-card div.section-body div.table-responsive table.table thead tr th.col-bemerkung,
html body div.container-fluid div.row div.col-12 div.tab-content div.tab-pane div.section-card div.section-body div.table-responsive table.table tbody tr td.col-bemerkung {
    text-align: left !important;
}

/* Einfacher Fallback */
.col-bemerkung {
    text-align: left !important;
}

/* Spaltenposition-basierte Regeln für andere Tabellen */
table th:nth-child(7),
table td:nth-child(7) {
    text-align: left !important;
}

/* ========================================
   DRAG & DROP STYLES
   ======================================== */

.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.drop-zone:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.drop-zone.drag-over {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.drop-zone-content {
    pointer-events: none;
}

.file-preview {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   FILE UPLOAD AREA STYLES
   ======================================== */

.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.file-upload-area:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.file-upload-area.drag-over {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.file-upload-content {
    pointer-events: none;
}

.file-upload-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.file-upload-title {
    color: #495057;
    margin-bottom: 0.5rem;
}

.file-upload-text {
    color: #6c757d;
    margin-bottom: 1rem;
}

.file-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* ========================================
   INLINE STATUS EDITING STYLES
   ======================================== */
.status-dropdown-container {
    position: relative;
    min-width: 160px;
}

.status-dropdown {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 1rem;
    background-color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 100%;
}

.status-dropdown:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.status-dropdown:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 0;
}

.status-dropdown:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading state für Status-Dropdowns */
.status-dropdown.loading {
    background-image: url("data:image/svg+xml,%3csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10 2a8 8 0 1 0 8 8 8 8 0 0 0-8-8zm0 14a6 6 0 1 1 6-6 6 6 0 0 1-6 6z' fill='%23007bff'/%3e%3canimateTransform attributeName='transform' type='rotate' values='0 10 10;360 10 10' dur='1s' repeatCount='indefinite'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px 16px;
    padding-right: 2rem;
}

/* Responsive Anpassungen für Status-Dropdowns */
@media (max-width: 768px) {
    .status-dropdown-container {
        min-width: 100px;
    }
    
    .status-dropdown {
        font-size: 0.9rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ========================================
   REFINANZIERUNGSART DROPDOWN STYLES
   ======================================== */
.refinanzierungsart-dropdown-container {
    position: relative;
    min-width: 40px;
}

.refinanzierungsart-dropdown {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    background-color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 100%;
    text-align: center;
}

.refinanzierungsart-dropdown:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.refinanzierungsart-dropdown:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 0;
}

.refinanzierungsart-dropdown:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading state für Refinanzierungsart-Dropdowns */
.refinanzierungsart-dropdown.loading {
    background-image: url("data:image/svg+xml,%3csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M10 2a8 8 0 1 0 8 8 8 8 0 0 0-8-8zm0 14a6 6 0 1 1 6-6 6 6 0 0 1-6 6z' fill='%23007bff'/%3e%3canimateTransform attributeName='transform' type='rotate' values='0 10 10;360 10 10' dur='1s' repeatCount='indefinite'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px 16px;
    padding-right: 2rem;
}

/* Responsive Anpassungen für Refinanzierungsart-Dropdowns */
@media (max-width: 768px) {
    .refinanzierungsart-dropdown-container {
        min-width: 60px;
    }
    
    .refinanzierungsart-dropdown {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Toast-Notification Styles (falls nicht vorhanden) */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    margin-bottom: 10px;
}

.toast.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.toast.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.toast.info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

    