﻿/* ========================================
   Leases / Mietverträge Page
   Angepasst an Masterdata Skyblue / White Stil
   ======================================== */

.leases-page {
    position: relative;
    padding-bottom: 48px;
}

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

.leases-header {
    align-items: flex-start;
    gap: 16px;
}

.leases-title {
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--rr-text-strong, #0f172a);
    margin-bottom: 2px;
}

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

.leases-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.leases-create-btn,
.leases-reset-btn {
    border-radius: 12px;
    text-transform: none;
    font-weight: 700;
    min-height: 40px;
    box-shadow: none;
}

.leases-info-btn {
    border-radius: var(--rr-radius-pill, 999px);
    color: #374151;
    background: rgba(250, 250, 250, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.18);
}

    .leases-info-btn:hover {
        background: rgba(245, 245, 245, 0.95);
    }

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

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

.leases-kpi-card {
    height: 100%;
    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;
}

    .leases-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);
    }

.leases-kpi-value {
    font-weight: 800;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.2;
}

.leases-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    background: rgba(250, 250, 250, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.20);
    flex-shrink: 0;
}

    .leases-kpi-icon.success {
        color: #374151;
        background: rgba(245, 245, 245, 0.95);
        border-color: rgba(0, 0, 0, 0.26);
    }

    .leases-kpi-icon.info {
        color: #111111;
        background: rgba(250, 250, 250, 0.98);
        border-color: rgba(0, 0, 0, 0.28);
    }

    .leases-kpi-icon.muted {
        color: #64748b;
        background: rgba(248, 250, 252, 0.95);
        border-color: rgba(148, 163, 184, 0.22);
    }

/* ---------- Filters ---------- */

.leases-filter-card {
    position: relative;
    border-radius: var(--rr-radius-lg, 18px);
    border: 1px solid rgba(0, 0, 0, 0.22);
    background: linear-gradient( 135deg, rgba(250, 250, 250, 0.98), rgba(245, 245, 245, 0.78), rgba(255, 255, 255, 0.95) );
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.leases-filter-grid {
    position: relative;
    z-index: 1;
}

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

.leases-reset-btn {
    height: 40px;
    border-color: rgba(0, 0, 0, 0.35) !important;
    color: #374151 !important;
    background: rgba(250, 250, 250, 0.65);
}

    .leases-reset-btn:hover {
        background: rgba(245, 245, 245, 0.95);
    }

/* ---------- State ---------- */

.leases-state-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 10px 26px rgba(0, 0, 0, 0.10);
}

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

.leases-table-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.82) );
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.leases-table-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.16);
    background: linear-gradient( 135deg, rgba(250, 250, 250, 0.98), rgba(245, 245, 245, 0.72), rgba(255, 255, 255, 0.95) );
}

.leases-table-title {
    font-weight: 800;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.25;
}

.leases-page ::deep .leases-table {
    overflow: hidden;
}

    .leases-page ::deep .leases-table .mud-table-head {
        background: rgba(250, 250, 250, 0.95);
    }

        .leases-page ::deep .leases-table .mud-table-head .mud-table-cell {
            font-weight: 800;
            color: var(--rr-text-strong, #0f172a);
            white-space: nowrap;
            border-bottom: 1px solid rgba(0, 0, 0, 0.18);
        }

    .leases-page ::deep .leases-table .mud-table-body .mud-table-row {
        transition: background 0.2s ease;
    }

        .leases-page ::deep .leases-table .mud-table-body .mud-table-row:hover {
            background: rgba(245, 245, 245, 0.48);
        }

    .leases-page ::deep .leases-table .mud-table-cell {
        border-bottom: 1px solid rgba(0, 0, 0, 0.10);
        vertical-align: middle;
    }

.leases-property-name {
    font-weight: 700;
    color: var(--rr-text-strong, #0f172a);
    line-height: 1.25;
}

.leases-address-text {
    color: var(--rr-text-secondary, #64748b);
    line-height: 1.35;
}

.leases-money {
    font-weight: 700;
    color: var(--rr-text-strong, #0f172a);
    white-space: nowrap;
}

.leases-chip {
    width: fit-content;
    border-radius: var(--rr-radius-pill, 999px);
    font-weight: 700;
    border-color: rgba(0, 0, 0, 0.35) !important;
    color: #374151 !important;
    background: rgba(250, 250, 250, 0.78) !important;
}

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

.leases-page .mud-button-root {
    text-transform: none;
}

.leases-page .mud-alert {
    border-radius: var(--rr-radius-md, 14px);
}

.leases-page .mud-progress-circular {
    color: #111111;
}

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

@media (max-width: 960px) {
    .leases-header {
        flex-direction: column;
        align-items: stretch;
    }

    .leases-header-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .leases-create-btn {
        flex: 1;
        justify-content: center;
    }

    .leases-reset-btn {
        margin-top: 2px;
    }

    .leases-table-card {
        overflow-x: auto;
    }

    .leases-page ::deep .leases-table {
        min-width: 980px;
    }
}

@media (max-width: 600px) {
    .leases-page {
        padding-bottom: 32px;
    }

    .leases-header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .leases-info-btn {
        align-self: flex-start;
    }

    .leases-create-btn {
        width: 100%;
    }

    .leases-kpi-card {
        padding: 14px !important;
    }

    .leases-filter-card {
        padding: 14px !important;
    }

    .leases-table-header {
        padding: 14px;
    }
}
