﻿/* ========================================
   Property Lease Tab / Mietverträge
   Skyblue / White Masterdata Stil
   Flat Sections + KPI Padding Fix
   ======================================== */

.property-lease-tab {
    width: 100%;
    max-width: none;
    padding-top: 18px;
    animation: propertyLeaseFadeUp 240ms ease-out;
}

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

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

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

.property-lease-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 22px;
}

.property-lease-title {
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.25;
    margin-bottom: 4px;
}

.property-lease-muted {
    color: var(--rr-text-secondary, #64748b);
    line-height: 1.45;
    font-size: 0.9rem;
}

.property-lease-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.property-lease-select {
    min-width: 220px;
}

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

.property-lease-primary-btn,
.property-lease-tab ::deep .property-lease-primary-btn {
    border-radius: 12px;
    text-transform: none;
    font-weight: 700;
    min-height: 40px;
    box-shadow: none;
    width: auto;
    white-space: nowrap;
    padding-left: 18px;
    padding-right: 18px;
}

/* ---------- Loading / Empty ---------- */

.property-lease-state-card,
.property-lease-empty-card,
.property-lease-tab ::deep .property-lease-state-card,
.property-lease-tab ::deep .property-lease-empty-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.88));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
    padding: 24px;
}

.property-lease-empty-card,
.property-lease-tab ::deep .property-lease-empty-card {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- KPI Cards wie Reports ---------- */

.property-lease-kpi-grid {
    margin-top: 0 !important;
    margin-bottom: 26px !important;
}

.property-lease-kpi-card,
.property-lease-tab ::deep .property-lease-kpi-card {
    height: 100%;
    min-height: 96px;
    border-radius: 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-lease-kpi-card:hover,
    .property-lease-tab ::deep .property-lease-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-lease-kpi-label,
.property-lease-tab ::deep .property-lease-kpi-label {
    color: var(--rr-text-secondary, #64748b);
    line-height: 1.4;
    margin: 0;
}

.property-lease-kpi-value,
.property-lease-tab ::deep .property-lease-kpi-value {
    font-weight: 900;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.15;
    margin: 0;
}

.property-lease-kpi-highlight,
.property-lease-tab ::deep .property-lease-kpi-highlight {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.86));
}

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

.property-lease-section {
    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.84));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
    padding: 24px 26px;
    margin-top: 20px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

    .property-lease-section:hover {
        border-color: rgba(0, 0, 0, 0.26);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
    }

.property-lease-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.property-lease-section-title {
    font-weight: 800;
    letter-spacing: 0.25px;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.25;
    font-size: 1rem;
}

/* ---------- Info Grid ---------- */

.property-lease-info-grid,
.property-lease-tab ::deep .property-lease-info-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
    margin: 0 !important;
}

    .property-lease-info-grid > *,
    .property-lease-tab ::deep .property-lease-info-grid > * {
        width: auto !important;
        max-width: none !important;
        flex: unset !important;
        flex-basis: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        min-width: 0 !important;
    }

/* ---------- Flat Content statt innerer Boxen ---------- */

.property-lease-inline-item,
.property-lease-tab ::deep .property-lease-inline-item {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.property-lease-small-title {
    font-weight: 800;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.3;
    font-size: 0.98rem;
    margin: 0 !important;
}

.property-lease-small-text {
    margin-top: 10px;
    font-weight: 700;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.4;
    font-size: 1rem;
}

/* ---------- File Row ---------- */

.property-lease-file-row,
.property-lease-tab ::deep .property-lease-file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.property-lease-file-info {
    min-width: 0;
    flex: 1 1 auto;
}

.property-lease-file-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ---------- Table ---------- */

.property-lease-table,
.property-lease-tab ::deep .property-lease-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.92);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

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

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

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

        .property-lease-tab ::deep .property-lease-table tbody tr:hover {
            background: rgba(250, 250, 250, 0.92);
        }

.property-lease-num {
    text-align: right;
    white-space: nowrap;
}

.property-lease-actions-col {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.property-lease-row-current {
    background: rgba(245, 245, 245, 0.68);
}

/* ---------- Bottom Actions ---------- */

.property-lease-bottom-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

/* ---------- MudBlazor Polish ---------- */

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

.property-lease-tab ::deep .mud-button-filled {
    box-shadow: none;
}

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

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

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

.property-lease-tab ::deep .mud-alert {
    border-radius: var(--rr-radius-lg, 18px);
    border-color: rgba(0, 0, 0, 0.18);
}

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

/* ---------- Chips / Badges ---------- */

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

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

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

@media (max-width: 1200px) {
    .property-lease-info-grid,
    .property-lease-tab ::deep .property-lease-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 960px) {
    .property-lease-tab {
        padding-top: 14px;
    }

    .property-lease-header,
    .property-lease-section-head,
    .property-lease-file-row {
        flex-direction: column;
        align-items: stretch;
    }

    .property-lease-actions {
        width: 100%;
        justify-content: stretch;
        margin-left: 0;
    }

    .property-lease-select {
        min-width: 0;
        width: 100%;
    }

    .property-lease-tab ::deep .property-lease-primary-btn {
        width: 100%;
        justify-content: center;
    }

    .property-lease-file-actions {
        width: 100%;
        justify-content: stretch;
    }

        .property-lease-file-actions .mud-button-root,
        .property-lease-tab ::deep .property-lease-file-actions .mud-button-root {
            width: 100%;
            justify-content: center;
        }

    .property-lease-bottom-actions {
        justify-content: stretch;
        flex-direction: column;
        align-items: stretch;
    }

        .property-lease-bottom-actions .mud-button-root,
        .property-lease-tab ::deep .property-lease-bottom-actions .mud-button-root {
            width: 100%;
            justify-content: center;
        }
}

@media (max-width: 700px) {
    .property-lease-info-grid,
    .property-lease-tab ::deep .property-lease-info-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .property-lease-section,
    .property-lease-state-card,
    .property-lease-empty-card {
        padding: 18px 20px !important;
    }

    .property-lease-kpi-card,
    .property-lease-tab ::deep .property-lease-kpi-card {
        border-radius: 16px;
    }

    .property-lease-kpi-value {
        font-size: 1.12rem;
    }

    .property-lease-small-text {
        font-size: 0.95rem;
    }

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