/* VOLLSTÄNDIG ÜBERARBEITETE STYLES.CSS - Source Sans Pro & Responsive Layout */

/* Google Fonts Import - Source Sans Pro */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;500;600;700&display=swap');

/* Reset und Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300;
    font-size: 13px; /* 2px kleiner als Standard 15px */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container */
.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
    margin: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    font-size: 26px; /* 2px kleiner */
}

.header p {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 200;
    font-size: 13px; /* 2px kleiner */
}

/* Content Areas */
.login-form, .main-content {
    padding: 30px;
}

/* NEUE RESPONSIVE FORM-LAYOUTS */

/* Desktop: 2-3 Spalten Layout für Dateneingabe */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row-1 {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 20px;
}

/* Fallback für alte .form-row Klasse */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

/* Labels - Source Sans Pro */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 400;
    font-size: 13px; /* 2px kleiner */
    color: #2c3e50 !important;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Inputs - Source Sans Pro */
input[type="text"], 
input[type="number"], 
input[type="date"], 
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px; /* 2px kleiner */
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    transition: border-color 0.3s;
    color: #2c3e50 !important;
    background: white !important;
}

input[type="text"]:focus, 
input[type="number"]:focus, 
input[type="date"]:focus, 
input[type="password"]:focus {
    outline: none;
    border-color: #3498db !important;
    color: #2c3e50 !important;
}

/* Berechnete/ReadOnly Felder */
.calculated-field,
.readonly,
input[readonly] {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #e9ecef !important;
    cursor: not-allowed;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
}

.calculated-field:focus,
.readonly:focus,
input[readonly]:focus {
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

/* BUTTONS - Source Sans Pro */
.btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white !important;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px; /* 2px kleiner */
    font-weight: 400;
    font-family: 'Source Sans Pro', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    color: white !important;
}

.btn:active {
    transform: translateY(0);
    color: white !important;
}

.btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    color: white !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white !important;
}

.btn-secondary:hover {
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
    color: white !important;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white !important;
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    color: white !important;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white !important;
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    color: white !important;
}

/* Form Buttons Container */
.form-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 20px;
}

/* Disabled Button States */
.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    color: white !important;
}

.btn:disabled:hover,
.btn[disabled]:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Button mit Icons */
.btn span {
    color: inherit !important;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Tabs - Source Sans Pro */
.tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    font-size: 13px; /* 2px kleiner */
}

.tab.active {
    background-color: white;
    border-bottom-color: #3498db;
    color: #3498db;
    font-weight: 500;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 30px;
}

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

/* Typography - Source Sans Pro */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    color: #000;
}

h1 { font-size: 26px; } /* 2px kleiner */
h2 { font-size: 22px; } /* 2px kleiner */
h3 { font-size: 18px; } /* 2px kleiner */
h4 { font-size: 16px; } /* 2px kleiner */
h5 { font-size: 14px; } /* 2px kleiner */
h6 { font-size: 12px; } /* 2px kleiner */

p, span, div, ul, li, small {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    font-size: 13px; /* 2px kleiner */
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.summary-card h3 {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    font-size: 14px; /* 2px kleiner */
    margin-bottom: 10px;
}

.summary-value {
    font-size: 22px; /* 2px kleiner */
    font-weight: 600;
    color: #2c3e50;
    margin-top: 10px;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Tables - Source Sans Pro */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-family: 'Source Sans Pro', sans-serif;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 13px; /* 2px kleiner */
}

th {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: 500;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Select Dropdown Styles - Source Sans Pro */
.form-select, select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 13px; /* 2px kleiner */
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    background-color: white !important;
    color: #2c3e50 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-select:focus, select:focus {
    outline: none;
    border-color: #3498db !important;
    color: #2c3e50 !important;
}

/* Checkbox Styles */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    position: relative;
    appearance: none;
    transition: all 0.3s;
    accent-color: #3498db;
}

input[type="checkbox"]:checked {
    background-color: #3498db;
    border-color: #3498db;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    font-family: 'Source Sans Pro', sans-serif;
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Checkbox Labels */
label input[type="checkbox"], 
label input[type="radio"] {
    margin-right: 8px;
    accent-color: #3498db;
}

/* Utility Classes */
.hidden {
    display: none;
}

.error {
    color: #e74c3c;
    font-size: 12px; /* 2px kleiner */
    margin-top: 5px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
}

.success {
    color: #27ae60;
    font-size: 12px; /* 2px kleiner */
    margin-top: 5px;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
}

/* Logout Button */
.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
    font-size: 12px; /* 2px kleiner */
}

/* Modal Styles - Source Sans Pro */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    font-family: 'Source Sans Pro', sans-serif;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
    font-size: 22px; /* 2px kleiner */
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    font-family: 'Source Sans Pro', sans-serif;
}

.close:hover,
.close:focus {
    color: #e74c3c;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* BERICHTE SEKTION - Source Sans Pro */
.reports-config-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.reports-options-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}

.reports-quick-actions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.report-progress-section {
    background: #e8f6ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #3498db;
}

/* Report Option Cards */
.report-option-card {
    transition: all 0.3s ease;
}

.report-card-content {
    background: #ffffff !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.report-option-card:hover .report-card-content {
    border-color: #3498db !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.report-option-card.selected .report-card-content {
    border-color: #3498db !important;
    background: #f8fcff !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.report-card-content h4 {
    color: #2c3e50 !important;
    font-size: 16px; /* 2px kleiner */
    font-weight: 500;
    font-family: 'Source Sans Pro', sans-serif;
    margin-bottom: 10px;
}

.report-card-content p {
    color: #6c757d !important;
    font-size: 12px; /* 2px kleiner */
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Jahr-Auswahl Grid */
.year-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* Jahr-Checkbox Styling */
.year-checkbox,
#year_checkboxes label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #ffffff !important;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 13px; /* 2px kleiner */
    color: #2c3e50 !important;
    margin-bottom: 0;
}

.year-checkbox:hover,
#year_checkboxes label:hover {
    background: #f8f9fa !important;
    border-color: #3498db;
    color: #3498db !important;
    transform: translateY(-1px);
}

.year-checkbox input[type="checkbox"],
#year_checkboxes label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #3498db;
}

.year-checkbox input[type="checkbox"]:checked + span,
#year_checkboxes label input[type="checkbox"]:checked + span {
    color: #3498db !important;
    font-weight: 500;
}

/* Report Display Container */
.report-display-section {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    background: #ffffff;
}

.report-display-container {
    background: #ffffff !important;
    min-height: 300px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: #2c3e50 !important;
    font-size: 13px; /* 2px kleiner */
    font-weight: 300;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Report Headers */
.report-display-container h1 {
    font-size: 22px; /* 2px kleiner */
    font-weight: 500;
    font-family: 'Source Sans Pro', sans-serif;
    color: #2c3e50 !important;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    border-bottom: 3px solid #3182ce;
    padding-bottom: 12px;
}

.report-display-container h2 {
    font-size: 18px; /* 2px kleiner */
    font-weight: 500;
    font-family: 'Source Sans Pro', sans-serif;
    color: #2d3748 !important;
    margin: 30px 0 16px 0;
    border-left: 4px solid #3182ce;
    padding-left: 16px;
}

.report-display-container h3 {
    font-size: 16px; /* 2px kleiner */
    font-weight: 500;
    font-family: 'Source Sans Pro', sans-serif;
    color: #2d3748 !important;
    margin: 24px 0 12px 0;
}

.report-display-container h4 {
    font-size: 14px; /* 2px kleiner */
    font-weight: 500;
    font-family: 'Source Sans Pro', sans-serif;
    color: #4a5568 !important;
    margin: 20px 0 10px 0;
}

.report-display-container p {
    color: #4a5568 !important;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    font-size: 13px; /* 2px kleiner */
    margin-bottom: 12px;
    text-align: justify;
}

/* MOBILE RESPONSIVE - WICHTIGSTE ÄNDERUNG */
@media (max-width: 768px) {
    /* Hauptcontainer */
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    /* Content Padding */
    .main-content, .login-form {
        padding: 20px 15px;
    }
    
    .tab-content {
        padding: 20px 15px;
    }
    
    /* MOBILE FORM LAYOUT - Ein Feld pro Zeile */
    .form-row-2,
    .form-row-3,
    .form-row,
    .form-buttons {
        grid-template-columns: 1fr !important;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    /* Inputs für Mobile optimiert */
    input[type="text"], 
    input[type="number"], 
    input[type="date"], 
    input[type="password"],
    .form-select,
    select {
        padding: 15px 12px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
        border-radius: 6px;
    }
    
    /* Buttons für Mobile */
    .btn {
        padding: 15px 20px;
        font-size: 16px;
        width: 100%;
        margin-bottom: 10px;
        border-radius: 6px;
        min-height: 48px;
    }
    
    /* Form Groups */
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Labels für Mobile */
    label {
        font-size: 14px;
        margin-bottom: 8px;
        color: #2c3e50;
        font-weight: 400;
    }
    
    /* Tabs für Mobile */
    .tabs {
        flex-direction: column;
        background: none;
        border-bottom: none;
    }
    
    .tab {
        padding: 12px 15px;
        border-bottom: 1px solid #e9ecef;
        border-left: 3px solid transparent;
        text-align: left;
        width: 100%;
        font-size: 14px;
    }
    
    .tab.active {
        border-left-color: #3498db;
        border-bottom-color: transparent;
        background-color: #f8f9fa;
    }
    
    /* Summary Grid für Mobile */
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }
    
    .summary-card {
        padding: 15px;
        border-radius: 8px;
    }
    
    .summary-value {
        font-size: 20px;
        margin-top: 8px;
    }
    
    /* Table für Mobile */
    .table-container {
        margin-top: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    table {
        min-width: 600px;
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    /* Header für Mobile */
    .header {
        padding: 15px;
        text-align: left;
    }
    
    .header h1 {
        font-size: 22px;
        margin-bottom: 5px;
    }
    
    .header p {
        font-size: 13px;
        margin: 0;
    }
    
    .logout-btn {
        position: static;
        display: block;
        width: auto;
        margin-top: 10px;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Modal für Mobile */
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        padding: 20px 15px;
        border-radius: 10px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .close {
        font-size: 24px;
    }
    
    .modal-buttons {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .modal-buttons .btn {
        margin-bottom: 0;
    }
    
    /* Typography für Mobile */
    h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    h3 {
        font-size: 16px;
        margin-bottom: 12px;
        margin-top: 25px;
    }
    
    h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* Berichte für Mobile */
    .reports-config-section,
    .reports-options-section {
        padding: 15px !important;
        margin-bottom: 15px !important;
        border-radius: 6px !important;
    }
    
    .report-card-content {
        padding: 15px;
    }
    
    .year-checkbox {
        padding: 12px 15px;
        margin-bottom: 8px;
    }
    
    .year-selection-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Report Display für Mobile */
    .report-display-container {
        padding: 15px;
        font-size: 13px;
        max-height: 400px;
    }
    
    .report-display-container h1 {
        font-size: 18px;
    }
    
    .report-display-container h2 {
        font-size: 16px;
    }
    
    .report-display-container table {
        font-size: 12px;
        min-width: 500px;
    }
    
    .report-display-container th,
    .report-display-container td {
        padding: 6px 8px;
    }
}

/* Extra kleine Bildschirme (Smartphones im Hochformat) */
@media (max-width: 480px) {
    .container {
        margin: 5px;
        border-radius: 8px;
    }
    
    .main-content, .login-form {
        padding: 15px 10px;
    }
    
    .modal-content {
        margin: 5px;
        width: calc(100% - 10px);
        padding: 15px 10px;
    }
    
    .btn {
        padding: 18px 15px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 50px;
    }
    
    input[type="text"], 
    input[type="number"], 
    input[type="date"], 
    input[type="password"] {
        padding: 18px 15px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .header {
        padding: 12px 10px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .tab-content {
        padding: 15px 10px;
    }
    
    .summary-card {
        padding: 12px;
    }
    
    .summary-value {
        font-size: 18px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 6px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    h2 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    h3 {
        font-size: 14px;
        margin-bottom: 10px;
        margin-top: 20px;
    }
}

/* Landscape Orientation für kleine Tablets */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    
    .tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
        border-bottom: 3px solid transparent;
        border-left: none;
    }
    
    .tab.active {
        border-bottom-color: #3498db;
        border-left-color: transparent;
        background-color: white;
    }
}

/* Touch-Optimierungen für alle mobilen Geräte */
@media (hover: none) and (pointer: coarse) {
    .btn, input, .tab, .close {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .close:hover {
        color: #e74c3c;
        transform: scale(1.1);
    }
    
    .btn:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    .tab:active {
        background-color: #f0f0f0;
    }
}

/* Metric Cards für Reports */
.preview-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 24px 0;
    padding: 0;
}

.preview-metric-card {
    background: #f7fafc !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    transition: all 0.2s ease;
    border-left: 4px solid #3182ce;
    font-family: 'Source Sans Pro', sans-serif;
}

.preview-metric-card.positive {
    border-left-color: #38a169;
    background: #f0fff4 !important;
}

.preview-metric-card.negative {
    border-left-color: #e53e3e;
    background: #fffafa !important;
}

.preview-metric-card.warning {
    border-left-color: #d69e2e;
    background: #fffbf0 !important;
}

.preview-metric-value {
    font-size: 20px; /* 2px kleiner */
    font-weight: 600;
    font-family: 'Source Sans Pro', sans-serif;
    color: #1a365d !important;
    margin-bottom: 4px;
    font-feature-settings: 'tnum';
}

.preview-metric-label {
    font-size: 11px; /* 2px kleiner */
    font-weight: 400;
    font-family: 'Source Sans Pro', sans-serif;
    color: #718096 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Report Tables */
.report-display-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    font-size: 12px; /* 2px kleiner */
    font-family: 'Source Sans Pro', sans-serif;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.report-display-container th {
    background: linear-gradient(180deg, #f7fafc 0%, #edf2f7 100%);
    color: #2d3748 !important;
    font-weight: 500;
    font-family: 'Source Sans Pro', sans-serif;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    font-size: 11px; /* 2px kleiner */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.report-display-container td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #4a5568 !important;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
    vertical-align: middle;
}

.report-display-container tr:hover {
    background: #f8fafc !important;
}

.report-display-container tr:last-child td {
    border-bottom: none;
}

.report-display-container tbody tr:nth-child(even) {
    background: #fafbfc !important;
}

/* Summary Boxes */
.preview-summary {
    background: linear-gradient(135deg, #f6f9fc 0%, #f1f5f9 100%) !important;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3182ce;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-family: 'Source Sans Pro', sans-serif;
}

.preview-summary h3 {
    color: #1a365d !important;
    font-size: 16px; /* 2px kleiner */
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 500;
    margin-bottom: 16px;
}

.preview-summary p {
    color: #4a5568 !important;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
    font-size: 13px; /* 2px kleiner */
    line-height: 1.7;
    margin-bottom: 12px;
}

.preview-summary strong {
    color: #2d3748 !important;
    font-weight: 500;
    font-family: 'Source Sans Pro', sans-serif;
}

/* Status Boxes */
.preview-warning {
    background: linear-gradient(135deg, #fffbf0 0%, #fef5e7 100%) !important;
    border-left-color: #d69e2e;
    color: #744210 !important;
}

.preview-warning strong {
    color: #744210 !important;
}

.preview-success {
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%) !important;
    border-left-color: #38a169;
    color: #22543d !important;
}

.preview-success strong {
    color: #22543d !important;
}

.preview-danger {
    background: linear-gradient(135deg, #fffafa 0%, #fed7d7 100%) !important;
    border-left-color: #e53e3e;
    color: #742a2a !important;
}

.preview-danger strong {
    color: #742a2a !important;
}

/* Progress Bar */
#report-progress {
    border-left: 4px solid #3498db;
}

#progress-bar {
    transition: width 0.5s ease-in-out;
    background: #3498db;
    height: 100%;
    width: 0%;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

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

/* Status Messages */
.status-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    font-weight: 400;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 13px; /* 2px kleiner */
}

.status-message.info {
    background: #e8f6ff;
    color: #2c3e50;
    border-left: 4px solid #3498db;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.status-message.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Quick Action Buttons */
.quick-action-btn {
    padding: 8px 15px;
    font-size: 13px; /* 2px kleiner */
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 400;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
    background: white;
    color: #2c3e50 !important;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db !important;
    transform: translateY(-1px);
}

/* Mobile Anpassungen für Report Components */
@media (max-width: 768px) {
    .preview-metrics {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .preview-metric-card {
        padding: 16px 12px;
    }
    
    .preview-metric-value {
        font-size: 18px;
    }
    
    .preview-summary {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .report-display-container {
        box-shadow: none;
        border: none;
        padding: 0;
        font-size: 11px; /* 2px kleiner */
        max-height: none;
        overflow: visible;
    }
    
    .preview-metric-card {
        break-inside: avoid;
        box-shadow: none;
    }
    
    .preview-summary {
        break-inside: avoid;
        box-shadow: none;
    }
    
    .report-display-container table {
        break-inside: avoid;
        box-shadow: none;
    }
    
    .no-print {
        display: none;
    }
}

/* Accessibility */
.btn:focus,
input:focus,
select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.tab:focus {
    outline: 2px solid #3498db;
    outline-offset: -2px;
}

.report-option-card:focus-within .report-card-content {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid;
    }
    
    .preview-metric-card {
        border-width: 2px;
    }
    
    .report-card-content {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-spinner {
        animation: none;
        border: 3px solid #3498db;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Scrollbar Styling */
.report-display-container::-webkit-scrollbar {
    width: 8px;
}

.report-display-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.report-display-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.report-display-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* CSS Custom Properties */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --secondary-color: #95a5a6;
    --text-color: #2c3e50;
    --text-muted: #6c757d;
    --border-color: #e1e5e9;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    --transition: all 0.3s ease;
    --font-family: 'Source Sans Pro', sans-serif;
    --font-size-small: 13px;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-weight-bold { font-weight: 500; }
.font-weight-normal { font-weight: 300; }
.margin-bottom-10 { margin-bottom: 10px; }
.margin-bottom-20 { margin-bottom: 20px; }
.padding-10 { padding: 10px; }
.padding-20 { padding: 20px; }

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Focus States */
.form-group:focus-within label {
    color: var(--primary-color);
}

.year-checkbox:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* BUTTON COLOR FIX - Alle Buttons haben weiße Schrift */
button.btn,
input.btn,
a.btn,
.btn,
button[class*="btn"],
input[class*="btn"],
a[class*="btn"] {
    color: white !important;
    text-decoration: none !important;
}

button.btn:hover,
button.btn:focus,
button.btn:active,
button.btn:visited,
input.btn:hover,
input.btn:focus,
input.btn:active,
input.btn:visited,
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited,
.btn:hover,
.btn:focus,
.btn:active,
.btn:visited {
    color: white !important;
    text-decoration: none !important;
}

.btn span,
.btn i,
.btn em,
.btn strong,
.btn small,
button.btn span,
button.btn i,
button.btn em,
button.btn strong,
button.btn small {
    color: white !important;
}

.btn * {
    color: white !important;
}

/* Quick Action Buttons sind eine Ausnahme - dunkle Schrift */
.quick-action-btn {
    color: #2c3e50 !important;
    background: white !important;
}

.quick-action-btn:hover {
    color: #3498db !important;
    background: #f8f9fa !important;
}

/* Performance Optimierungen */
.btn,
.report-option-card,
.year-checkbox,
.preview-metric-card {
    will-change: transform;
}

/* Source Sans Pro Font Loading Optimization */
@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 200;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/sourcesanspro/v22/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2') format('woff2');
}

@font-face {
    font-family: 'Source Sans Pro';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/sourcesanspro/v22/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu.woff2') format('woff2');
}