/* ========================================
   FINANZPLANUNG TAB STYLES
   ======================================== */

/* Finanzplanung Card */
.finanzplanung-card {
    margin-bottom: 20px;
}

.finanzplanung-card .info-badge {
    background: #ecfdf5;
    color: #047857;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.finanzplanung-card .info-badge.simulator {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Liquiditäts-Dashboard */
.liquiditaet-dashboard {
    padding: 20px;
}

.liquiditaet-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.liquiditaet-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
    font-size: 14px;
    color: #475569;
}

.liquiditaet-label.bold {
    font-weight: 600;
    color: #1e293b;
}

.liquiditaet-label svg {
    color: #64748b;
    flex-shrink: 0;
}

.liquiditaet-bar-container {
    flex: 1;
    height: 24px;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

.liquiditaet-bar {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
}

.liquiditaet-bar.einnahmen {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.liquiditaet-bar.ausgaben {
    background: linear-gradient(90deg, #f87171 0%, #ef4444 100%);
}

.liquiditaet-bar.ergebnis {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.liquiditaet-value {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
    font-size: 15px;
}

.liquiditaet-value.positive {
    color: #059669;
}

.liquiditaet-value.negative {
    color: #ef4444;
}

.liquiditaet-value.result {
    color: #2563eb;
    font-size: 18px;
}

.liquiditaet-divider {
    border-bottom: 1px dashed #e2e8f0;
    margin: 8px 0;
}

.liquiditaet-divider.thick {
    border-bottom: 2px solid #cbd5e1;
    margin: 12px 0;
}

.liquiditaet-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 16px;
    background: #f0fdf4;
    border-radius: 10px;
    border-left: 4px solid #10b981;
    font-size: 13px;
    color: #166534;
}

.liquiditaet-insight svg {
    flex-shrink: 0;
    color: #10b981;
}

/* Sparziele */
.sparziele-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sparziel-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.sparziel-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sparziel-item.highlight {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border-color: #fbbf24;
}

.sparziel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.sparziel-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sparziel-icon.auto {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.sparziel-icon.immo {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.sparziel-icon.rente {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.sparziel-title {
    flex: 1;
}

.sparziel-title h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.sparziel-date {
    font-size: 13px;
    color: #64748b;
}

.sparziel-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.sparziel-status.on-track {
    background: #dcfce7;
    color: #166534;
}

.sparziel-status.warning {
    background: #fef3c7;
    color: #92400e;
}

.sparziel-progress {
    margin-bottom: 16px;
}

.progress-bar-container {
    position: relative;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: visible;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-bar.warning {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.progress-marker {
    position: absolute;
    top: -3px;
    width: 16px;
    height: 16px;
    background: white;
    border: 3px solid #059669;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.progress-bar.warning + .progress-marker {
    border-color: #f59e0b;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
}

.sparziel-details {
    display: flex;
    gap: 24px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.detail-value.success {
    color: #059669;
}

.detail-value.warning {
    color: #d97706;
}

.sparziel-recommendation {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef9c3;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}

.btn-detail-analysis {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-detail-analysis:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.btn-add-goal {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-goal:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Rentenlücken-Simulator */
.renten-simulator {
    padding: 20px;
}

.simulator-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.simulator-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.simulator-input-group label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.slider-value {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.simulator-visualization {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 24px;
}

.renten-vergleich {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.renten-bar-group {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 40px;
    height: 200px;
    padding: 20px 0;
}

.renten-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
}

.renten-bar .bar-fill {
    width: 60px;
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
    border-radius: 8px 8px 0 0;
    transition: height 0.5s ease;
}

.renten-bar.gesetzlich .bar-fill {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
}

.renten-bar.wunsch .bar-fill {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.renten-bar .bar-label {
    margin-top: 10px;
    font-size: 11px;
    color: #64748b;
    text-align: center;
}

.renten-bar .bar-value {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.renten-luecke {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    border: 2px dashed #f59e0b;
}

.luecke-label {
    font-size: 11px;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.luecke-value {
    font-size: 18px;
    font-weight: 700;
    color: #d97706;
}

.simulator-ergebnis {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.ergebnis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ergebnis-item.highlight {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.ergebnis-label {
    font-size: 13px;
    color: #64748b;
}

.ergebnis-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.ergebnis-item.highlight .ergebnis-value {
    color: #1d4ed8;
}

.simulator-empfehlung {
    padding: 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    border: 1px solid #86efac;
}

.empfehlung-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.empfehlung-header svg {
    color: #16a34a;
}

.empfehlung-header h4 {
    margin: 0;
    font-size: 15px;
    color: #166534;
}

.empfehlung-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.empfehlung-produkt {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.produkt-name {
    font-size: 16px;
    font-weight: 600;
    color: #166534;
}

.produkt-vorteile {
    font-size: 13px;
    color: #15803d;
}

.empfehlung-actions {
    display: flex;
    gap: 10px;
}

/* Szenario-Vergleich */
.szenario-vergleich {
    padding: 20px;
}

.szenario-vergleich canvas {
    margin-bottom: 20px;
    max-height: 280px !important;
    height: 280px !important;
}

.szenario-legende {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legende-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legende-item.konservativ .legende-color {
    background: #94a3b8;
}

.legende-item.moderat .legende-color {
    background: #3b82f6;
}

.legende-item.optimistisch .legende-color {
    background: #10b981;
}

.legende-label {
    font-size: 13px;
    color: #64748b;
}

.legende-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* Vertriebsimpuls Finanzplanung */
.impuls-card .kunden-card-header.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.impuls-card .kunden-card-header.highlight h2 {
    color: #92400e;
}

.finanz-impuls-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

.impuls-situation h4,
.impuls-empfehlungen h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.impuls-situation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.impuls-situation li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #64748b;
}

.impuls-situation li:last-child {
    border-bottom: none;
}

.empfehlung-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empfehlung-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid;
}

.empfehlung-item.prio-high {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.empfehlung-item.prio-medium {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.empfehlung-item.prio-low {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.prio-badge {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.prio-high .prio-badge {
    background: #ef4444;
}

.prio-medium .prio-badge {
    background: #f59e0b;
}

.prio-low .prio-badge {
    background: #10b981;
}

.empfehlung-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.empfehlung-text strong {
    font-size: 14px;
    color: #1e293b;
}

.empfehlung-text span {
    font-size: 12px;
    color: #64748b;
}

.impuls-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .liquiditaet-dashboard {
        padding: 16px;
    }

    .liquiditaet-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .liquiditaet-label {
        min-width: unset;
        width: 100%;
    }

    .liquiditaet-value {
        min-width: unset;
        text-align: left;
        font-size: 14px;
    }

    .liquiditaet-bar-container {
        height: 20px;
    }

    .simulator-inputs {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .simulator-visualization {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .renten-bar-group {
        gap: 20px;
        height: 160px;
    }

    .renten-bar {
        width: 80px;
    }

    .renten-bar .bar-fill {
        width: 50px;
    }

    .finanz-impuls-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sparziel-details {
        flex-wrap: wrap;
        gap: 12px;
    }

    .detail-item {
        min-width: calc(50% - 6px);
    }

    .szenario-legende {
        flex-wrap: wrap;
        gap: 16px;
    }

    .empfehlung-content {
        flex-direction: column;
        gap: 16px;
    }

    .empfehlung-actions {
        width: 100%;
        justify-content: stretch;
    }

    .empfehlung-actions button {
        flex: 1;
    }

    .slider-value {
        min-width: 80px;
        font-size: 13px;
    }
}

/* Phone (480px and below) */
@media (max-width: 480px) {
    .liquiditaet-dashboard {
        padding: 12px;
    }

    .liquiditaet-row {
        padding: 8px 0;
    }

    .liquiditaet-label {
        font-size: 13px;
        gap: 6px;
    }

    .liquiditaet-value {
        font-size: 13px;
    }

    .liquiditaet-value.result {
        font-size: 15px;
    }

    .liquiditaet-insight {
        padding: 12px;
        font-size: 12px;
    }

    .sparziele-container {
        padding: 12px;
        gap: 12px;
    }

    .sparziel-item {
        padding: 14px;
    }

    .sparziel-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .sparziel-icon {
        width: 36px;
        height: 36px;
    }

    .sparziel-title h4 {
        font-size: 14px;
    }

    .sparziel-status {
        padding: 4px 10px;
        font-size: 11px;
    }

    .sparziel-details {
        flex-direction: column;
        gap: 10px;
        padding: 10px 12px;
    }

    .detail-item {
        min-width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .renten-simulator {
        padding: 12px;
    }

    .renten-bar-group {
        gap: 16px;
        height: 140px;
        padding: 10px 0;
    }

    .renten-bar {
        width: 70px;
    }

    .renten-bar .bar-fill {
        width: 40px;
    }

    .renten-bar .bar-value {
        font-size: 14px;
    }

    .renten-bar .bar-label {
        font-size: 10px;
    }

    .luecke-value {
        font-size: 16px;
    }

    .ergebnis-item {
        padding: 10px 12px;
    }

    .ergebnis-label {
        font-size: 12px;
    }

    .ergebnis-value {
        font-size: 15px;
    }

    .simulator-empfehlung {
        padding: 14px;
    }

    .empfehlung-header h4 {
        font-size: 14px;
    }

    .produkt-name {
        font-size: 14px;
    }

    .produkt-vorteile {
        font-size: 12px;
    }

    .szenario-vergleich {
        padding: 12px;
    }

    .szenario-vergleich canvas {
        max-height: 200px !important;
        height: 200px !important;
    }

    .szenario-legende {
        gap: 10px;
        justify-content: flex-start;
    }

    .legende-item {
        gap: 6px;
    }

    .legende-color {
        width: 12px;
        height: 12px;
    }

    .legende-label {
        font-size: 11px;
    }

    .legende-value {
        font-size: 12px;
    }

    .impuls-situation li {
        font-size: 13px;
        padding: 6px 0;
    }

    .empfehlung-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .prio-badge {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .empfehlung-text strong {
        font-size: 13px;
    }

    .empfehlung-text span {
        font-size: 11px;
    }

    .impuls-actions {
        flex-direction: column;
        gap: 8px;
    }

    .impuls-actions button {
        width: 100%;
        justify-content: center;
    }

    .btn-detail-analysis,
    .btn-add-goal {
        width: 100%;
        justify-content: center;
    }

    .slider-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .slider-value {
        text-align: left;
        min-width: unset;
    }
}
