﻿/* ========================================
   Property Finance Tab / Finanzen
   Skyblue / White Masterdata Stil
   Chips behalten Razor-Farben
   ======================================== */

.property-finance-tab {
    width: 100%;
    max-width: none;
    animation: propertyFinanceFadeUp 240ms ease-out;
}

@keyframes propertyFinanceFadeUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Main Card ---------- */

.property-finance-card {
    border-radius: var(--rr-radius-lg, 18px);
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86) );
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 22px;
    overflow: hidden;
}

/* ---------- Header ---------- */

.property-finance-header {
    gap: 16px;
}

.property-finance-title {
    display: flex;
    align-items: center;
    font-weight: 900;
    letter-spacing: 0.25px;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.25;
}

.property-finance-muted {
    color: var(--rr-text-secondary, #64748b);
    line-height: 1.4;
}

.property-finance-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.property-finance-year-select {
    min-width: 120px;
}

.property-finance-tab ::deep .property-finance-year-select .mud-input-root {
    border-radius: var(--rr-radius-md, 14px);
    background: rgba(255, 255, 255, 0.9);
}

/* ---------- KPI Cards ---------- */

.property-finance-kpi-grid {
    margin-top: 0 !important;
}

.property-finance-kpi-card {
    height: 100%;
    min-height: 112px;
    border-radius: var(--rr-radius-lg, 18px);
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: linear-gradient( 135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86) );
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

    .property-finance-kpi-card:hover {
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
        transform: translateY(-3px);
        border-color: rgba(0, 0, 0, 0.34);
    }

    .property-finance-kpi-card .mud-typography-h6 {
        margin-top: 6px;
        font-weight: 900;
        color: var(--rr-text-strong, #0f172a);
        line-height: 1.15;
    }

/* ---------- Sections ---------- */

.property-finance-section-head {
    gap: 16px;
    flex-wrap: wrap;
}

.property-finance-section-title {
    display: flex;
    align-items: center;
    font-weight: 850;
    letter-spacing: 0.25px;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.25;
}

/* ---------- Tables ---------- */

.property-finance-table {
    width: 100%;
    border-radius: var(--rr-radius-lg, 18px);
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10);
    overflow: hidden;
}

.property-finance-tab ::deep .property-finance-table thead {
    background: rgba(250, 250, 250, 0.95);
}

.property-finance-tab ::deep .property-finance-table th {
    font-weight: 800;
    color: var(--rr-text-strong, #0f172a);
    white-space: nowrap;
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.property-finance-tab ::deep .property-finance-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    vertical-align: middle;
}

.property-finance-tab ::deep .property-finance-table tbody tr {
    transition: background 0.18s ease;
}

    .property-finance-tab ::deep .property-finance-table tbody tr:hover {
        background: rgba(245, 245, 245, 0.48);
    }

/* ---------- Buttons / Inputs ---------- */

.property-finance-tab ::deep .mud-input-root {
    border-radius: var(--rr-radius-md, 14px);
}

.property-finance-tab ::deep .mud-button-root,
.property-finance-tab ::deep .mud-icon-button {
    border-radius: 12px;
    text-transform: none;
    font-weight: 700;
    min-height: 38px;
    box-shadow: none;
}

.property-finance-tab ::deep .mud-button-outlined {
    border-color: rgba(0, 0, 0, 0.35);
}

    .property-finance-tab ::deep .mud-button-outlined:hover {
        background: rgba(245, 245, 245, 0.55);
    }

.property-finance-tab ::deep .mud-icon-button {
    color: #374151;
    background: rgba(250, 250, 250, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.18);
}

    .property-finance-tab ::deep .mud-icon-button:hover {
        background: rgba(245, 245, 245, 0.95);
    }

/* ---------- Chips / Badges ----------
   Keine Farben überschreiben.
   Razor Color="..." bleibt erhalten.
*/

.property-finance-tab ::deep .mud-chip {
    width: fit-content;
    border-radius: var(--rr-radius-pill, 999px);
    font-weight: 700;
}

.property-finance-tab ::deep .mud-chip-content {
    font-weight: 700;
}

/* ---------- Alerts / Progress / Divider ---------- */

.property-finance-tab ::deep .mud-alert {
    border-radius: var(--rr-radius-md, 14px);
}

.property-finance-tab ::deep .mud-progress-linear {
    border-radius: var(--rr-radius-pill, 999px);
    overflow: hidden;
}

.property-finance-tab ::deep .mud-divider {
    border-color: rgba(0, 0, 0, 0.14);
}

/* ---------- Menus ---------- */

.property-finance-tab ::deep .mud-menu .mud-list-item {
    font-weight: 600;
}

    .property-finance-tab ::deep .mud-menu .mud-list-item:hover {
        background: rgba(245, 245, 245, 0.55);
    }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .property-finance-card {
        padding: 18px;
    }

    .property-finance-header,
    .property-finance-section-head {
        flex-direction: column;
        align-items: stretch !important;
    }

    .property-finance-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .property-finance-year-select {
        width: 100%;
    }

    .property-finance-section-head .mud-button-root {
        width: 100%;
        justify-content: center;
    }

    .property-finance-table {
        min-width: 760px;
    }
}

@media (max-width: 600px) {
    .property-finance-card {
        padding: 14px;
        border-radius: 16px;
    }

    .property-finance-kpi-card {
        padding: 14px !important;
        border-radius: 16px;
    }

    .property-finance-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .property-finance-tab ::deep .mud-button-root {
        width: 100%;
        justify-content: center;
    }
}
