:root {
    --primary-color: #6d77b8; 
    --secondary-color: #333333; 
    --accent-color: #28a745;
    --background-color: #fcfcfc;
    --text-color: #333333;
    --light-gray: #f4f4f4;
    --border-radius: 8px; 
    --box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: transparent;
    color: var(--text-color);
    margin: 0;
    padding: 10px;
    overflow-x: hidden;
}

.container-dashboard { max-width: 100%; margin: 0 auto; }

h2 {
    font-size: 1.1em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}
h3 { font-size: 0.9em; margin: 0 0 10px 0; color: #666; text-transform: uppercase; }

/* Grid */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Breiter für mehr Platz */
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: #fff; border-radius: var(--border-radius);
    padding: 20px; box-shadow: var(--box-shadow);
    border: 1px solid #eee; transition: var(--transition);
    display: flex; flex-direction: column;
}
.card.wide-card { grid-column: span 2; }
@media (max-width: 900px) { .card.wide-card { grid-column: span 1; } }

/* UPLOAD BEREICH - OPTIMIERT */
.jme-upload-section { background-color: #f8f9fa; border: 1px dashed #ccc; }

.jme-controls {
    display: flex; align-items: center; gap: 15px; margin-bottom: 20px;
    background: #fff; padding: 10px; border-radius: 4px; border: 1px solid #eee;
}

input[type="file"] { display: none; }
.custom-file-upload {
    border: 1px solid var(--primary-color);
    display: inline-block;
    padding: 8px 16px;
    cursor: pointer;
    background: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    font-size: 0.95em;
    transition: all 0.2s;
    font-weight: 600;
}
.custom-file-upload:hover { background: #5a629b; }
.file-name-display { font-size: 0.9em; color: #333; font-weight: 600; }

.jme-content-row { 
    display: flex; gap: 20px; align-items: flex-start; flex-grow: 1;
}

/* LISTE & BILD - GRÖSSER */
#jmeItemListe { 
    flex: 1; 
    font-size: 0.9em; 
    color: #444; 
    max-height: 400px; /* Viel mehr Platz */
    overflow-y: auto; 
    line-height: 1.5;
    padding-right: 10px;
}
#jmeItemListe ul { padding-left: 20px; margin: 0; }
#jmeItemListe li { margin-bottom: 6px; border-bottom: 1px solid #f0f0f0; padding-bottom: 2px; }

#jmeImageContainer {
    flex: 1;
    display: none; 
    justify-content: center;
    align-items: flex-start;
}
#jmeMainImage { 
    height: auto; 
    width: 100%; 
    max-height: 300px; /* Viel größeres Bild */
    object-fit: contain;
    border-radius: 4px; 
    border: 1px solid #ddd; 
    background: #fff; 
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Formulare */
.form-group { margin-bottom: 12px; }
.form-group label { 
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.9em; font-weight: 600; margin-bottom: 5px; color: #555; 
}
input[type="number"], select { 
    width: 100%; padding: 10px; border: 1px solid #ccc; /* Größere Inputs */
    border-radius: 4px; font-size: 1em; background: #fafafa; font-family: inherit;
}
input:focus { background: #fff; border-color: var(--primary-color); outline: none; }

/* Financing Split */
.financing-split { display: flex; gap: 30px; } /* Mehr Abstand */
.financing-col { flex: 1; }
.financing-col.separator { border-left: 1px solid #eee; padding-left: 30px; }
.financing-header { font-weight: bold; font-size: 1em; margin-bottom: 15px; text-transform: uppercase; border-bottom: 2px solid transparent; display: inline-block; }

/* Ergebnisse */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }
.result-card { 
    background: #fff; border-radius: var(--border-radius); padding: 25px; 
    box-shadow: var(--box-shadow); border-top: 5px solid var(--primary-color); position: relative; 
}
.result-card.leasing { border-top-color: #007bff; }

.kpi-row { display: flex; gap: 20px; margin-bottom: 30px; }
.kpi-box { 
    flex: 1; background: #f8f9fa; padding: 15px; border-radius: 8px; 
    text-align: center; border: 1px solid #e9ecef; 
}
.kpi-box h3 { font-size: 0.85em; margin-bottom: 8px; color: #666; }
.kpi-value { font-size: 1.6em; font-weight: 700; color: var(--secondary-color); }

.chart-container { height: 250px; width: 100%; margin-bottom: 30px; position: relative; }

/* Tabelle */
.cashflow-table { width: 100%; border-collapse: collapse; font-size: 0.85em; margin-top: 15px; }
.cashflow-table th { background: #f0f0f0; text-align: right; padding: 8px; position: sticky; top: 0; font-weight: 600; border-bottom: 2px solid #ddd; }
.cashflow-table td { text-align: right; padding: 8px; border-bottom: 1px solid #eee; }
.cashflow-table tr:hover { background-color: #f9f9f9; }

/* Empfehlung */
#empfehlung { margin-bottom: 20px; }
.btn-print { position: absolute; top: 20px; right: 20px; border: 1px solid #ccc; background: #fff; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.9em; transition: all 0.2s; }
.btn-print:hover { background: #eee; border-color: #999; }
.tooltip { display: inline-flex; justify-content: center; align-items: center; width: 18px; height: 18px; background: #ddd; color: #fff; border-radius: 50%; font-size: 11px; cursor: help; margin-left: 6px; font-weight: bold; }
.tooltip:hover { background: var(--primary-color); }
.tooltip:hover::after { content: attr(data-tooltip); position: absolute; right: 20px; background: #333; color: #fff; padding: 8px 12px; border-radius: 4px; font-size: 12px; white-space: pre-wrap; width: 240px; z-index: 100; font-weight: normal; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }