
:root {
    /* Charte LANDLEX / SISPlatform — navy institutionnel + or, typographie Cambria/Calibri */
    --navy-950: #0B2340;
    --navy-900: #102C4F;
    --navy-800: #163D6B;
    --navy-700: #1D4E82;
    --navy-600: #2A5F99;
    --gold-500: #C9972B;
    --gold-300: #DCB35F;
    --gold-100: #F3E6C6;
    --teal-600: #0F9488;
    --teal-100: #E1F3F0;
    --rust-600: #A0472B;
    --rust-100: #F5E6DF;
    --paper-50: #F8F6EF;
    --paper-100: #F1EBDB;
    --paper-200: #E8E0CB;
    --ink-900: #1B2130;
    --ink-700: #2B3444;
    --ink-500: #5B6478;
    --line: #E1D9C4;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(11,35,64,.10);
    --font-heading: 'Segoe UI Semibold', 'Segoe UI', 'Inter', system-ui, Arial, sans-serif;
    --font-body: 'Segoe UI', 'Inter', system-ui, Calibri, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-700);
    background: var(--paper-100);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.serif {
    font-family: var(--font-heading);
}

.tabular {
    font-variant-numeric: tabular-nums;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--navy-800);
    border-radius: 4px;
}

/* ============ Pagination (PagedDataTable) ============ */
.btn-page {
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-700);
    border-radius: 6px;
    font-size: 11.5px;
    cursor: pointer;
}

    .btn-page:hover:not(:disabled) {
        border-color: var(--gold-500);
        color: var(--navy-800);
    }

    .btn-page.active {
        background: var(--navy-800);
        border-color: var(--navy-800);
        color: #fff;
        font-weight: 700;
    }

    .btn-page:disabled {
        opacity: .35;
        cursor: default;
    }

/* ============ LOGIN ============ */
#login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    z-index: 50;
    background: var(--navy-950);
}

.login-left {
    flex: 1.1;
    position: relative;
    background: linear-gradient(160deg,var(--navy-950) 0%,var(--navy-800) 60%,var(--navy-700) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px;
    color: var(--paper-50);
    overflow: hidden;
}

    .login-left svg.skyline {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        opacity: .16;
    }

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

    .login-brand .mark {
        width: 44px;
        height: 44px;
        border: 1.5px solid var(--gold-500);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: Georgia,serif;
        font-weight: 700;
        color: var(--gold-300);
        font-size: 20px;
    }

    .login-brand .name {
        font-weight: 700;
        letter-spacing: 1.5px;
        font-size: 19px;
    }

    .login-brand .tag {
        font-size: 10.5px;
        letter-spacing: 1.6px;
        color: var(--gold-300);
        text-transform: uppercase;
        margin-top: 2px;
    }

.login-quote {
    position: relative;
    z-index: 2;
    max-width: 460px;
}

    .login-quote .big {
        font-family: Georgia,serif;
        font-size: 34px;
        line-height: 1.28;
        font-weight: 700;
    }

    .login-quote .sub {
        margin-top: 14px;
        font-size: 13.5px;
        color: rgba(248,246,239,.65);
        line-height: 1.6;
    }

.login-stats {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 36px;
    margin-top: 36px;
}

    .login-stats div .n {
        font-family: Georgia,serif;
        font-size: 26px;
        font-weight: 700;
        color: var(--gold-300);
    }

    .login-stats div .l {
        font-size: 10.5px;
        letter-spacing: .8px;
        text-transform: uppercase;
        color: rgba(248,246,239,.55);
        margin-top: 3px;
    }

.login-right {
    flex: 1;
    background: var(--paper-50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-wrap {
    width: 100%;
    max-width: 380px;
}

    .login-form-wrap h1 {
        font-family: Georgia,serif;
        font-size: 24px;
        margin: 0 0 4px;
        color: var(--navy-950);
    }

    .login-form-wrap p.lead {
        margin: 0 0 28px;
        font-size: 13px;
        color: var(--ink-500);
    }

.role-tabs {
    display: flex;
    gap: 6px;
    background: var(--paper-100);
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 4px;
    margin-bottom: 22px;
}

.role-tab {
    flex: 1;
    text-align: center;
    padding: 9px 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    transition: all .15s;
}

    .role-tab.active {
        background: var(--navy-950);
        color: #fff;
        box-shadow: 0 3px 8px rgba(10,25,48,.25);
    }

.field select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 13.5px;
    background: #fff;
    outline: none;
}

    .field select:focus {
        border-color: var(--gold-500);
    }

.field {
    margin-bottom: 16px;
}

    .field label .required {
        color: var(--rust-600);
        margin-left: 2px;
        cursor: help;
    }

    .field input:required, .field select:required {
        border-left: 3px solid var(--gold-500);
    }

    .field input:invalid:not(:placeholder-shown) {
        border-color: var(--rust-600);
    }

    .field label {
        display: block;
        font-size: 11px;
        letter-spacing: .5px;
        text-transform: uppercase;
        color: var(--ink-500);
        margin-bottom: 6px;
        font-weight: 600;
    }

    .field input {
        width: 100%;
        padding: 11px 13px;
        border: 1px solid var(--line);
        border-radius: 7px;
        font-size: 14px;
        background: #fff;
        outline: none;
        transition: border-color .15s;
    }

        .field input:focus {
            border-color: var(--gold-500);
        }

.field-pass {
    position: relative;
}

    .field-pass button {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background: none;
        color: var(--ink-500);
        font-size: 11px;
        cursor: pointer;
    }

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0 22px;
    font-size: 12.5px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-500);
}

.btn-primary {
    width: 100%;
    background: var(--navy-950);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}

    .btn-primary:hover {
        background: var(--navy-800);
    }

.btn-gold {
    background: var(--gold-500);
    color: var(--navy-950);
    border: none;
    border-radius: 7px;
    font-weight: 700;
    cursor: pointer;
}

.demo-box {
    margin-top: 22px;
    background: var(--gold-100);
    border: 1px solid var(--gold-300);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 11.5px;
    color: #6b4f1f;
    line-height: 1.6;
}

    .demo-box b {
        color: var(--navy-950);
    }

.login-error {
    background: var(--rust-100);
    color: var(--rust-600);
    border: 1px solid #e3b39f;
    padding: 11px 14px;
    border-radius: 7px;
    font-size: 12.5px;
    margin-bottom: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .login-error::before {
        content: "⚠";
        font-size: 14px;
        flex-shrink: 0;
    }

.footer-note {
    margin-top: 26px;
    font-size: 11px;
    color: var(--ink-500);
    text-align: center;
}

/* ============ APP SHELL ============ */
#app-shell {
    display: none;
    height: 100vh;
}

.shell-flex {
    display: flex;
    height: 100%;
}

#sidebar {
    width: 262px;
    flex-shrink: 0;
    background: linear-gradient(180deg,var(--navy-950),var(--navy-900));
    color: var(--paper-50);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    transition: margin-left .2s;
    overflow-y: auto;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 6px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    margin-bottom: 14px;
}

    .side-brand .mark {
        width: 32px;
        height: 32px;
        border: 1.5px solid var(--gold-500);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: Georgia,serif;
        font-weight: 700;
        color: var(--gold-300);
        font-size: 14px;
    }

    .side-brand .name {
        font-weight: 700;
        letter-spacing: 1px;
        font-size: 14px;
    }

    .side-brand .tag {
        font-size: 9px;
        letter-spacing: 1.1px;
        color: var(--gold-300);
        text-transform: uppercase;
    }

.nav-group-label {
    font-size: 10px;
    letter-spacing: 1.3px;
    color: rgba(217,188,133,.65);
    text-transform: uppercase;
    margin: 13px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7.5px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(248,246,239,.78);
    margin-bottom: 1px;
    border-left: 3px solid transparent;
}

    .nav-item svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        opacity: .85;
    }

    .nav-item:hover {
        background: rgba(255,255,255,.05);
    }

    .nav-item.active {
        background: rgba(184,144,74,.16);
        color: var(--gold-300);
        border-left-color: var(--gold-500);
        font-weight: 600;
    }

        .nav-item.active svg {
            opacity: 1;
        }

.sidebar-footer {
    margin-top: auto;
    padding: 14px 10px 0;
    font-size: 10.5px;
    color: rgba(248,246,239,.35);
    border-top: 1px solid rgba(255,255,255,.08);
}

#main-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

#topbar {
    height: 64px;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
}

#page-title {
    font-family: Georgia,serif;
    font-size: 19px;
    color: var(--navy-950);
    font-weight: 700;
}

#page-sub {
    font-size: 11.5px;
    color: var(--ink-500);
    margin-top: 1px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--paper-100);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12.5px;
    color: var(--ink-500);
    width: 220px;
}

    .top-search input {
        border: none;
        background: transparent;
        outline: none;
        font-size: 12.5px;
        width: 100%;
    }

.icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--paper-100);
    cursor: pointer;
    border: 1px solid var(--line);
    color: var(--ink-700);
    padding: 0;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}

    .icon-btn:hover {
        background: var(--paper-200);
        border-color: var(--gold-500);
        color: var(--navy-950);
    }

    .icon-btn .dot {
        position: absolute;
        top: 6px;
        right: 7px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--rust-600);
        border: 1.5px solid #fff;
    }

.branch-select {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12.5px;
    background: #fff;
    color: var(--ink-700);
    cursor: pointer;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    padding: 5px 8px 5px 5px;
    border-radius: 20px;
    border: 1px solid var(--line);
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--navy-900);
    color: var(--gold-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    font-family: Georgia,serif;
}

.user-chip .u-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--navy-950);
}

.user-chip .u-role {
    font-size: 10.5px;
    color: var(--ink-500);
}

#view-container {
    flex: 1;
    overflow-y: auto;
    padding: 26px 30px 50px;
}

.view {
    display: none;
    animation: fade .25s ease;
}

    .view.active {
        display: block;
    }

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

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

/* shared components */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.kpi-card {
    padding: 18px 18px;
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--line);
}

    .kpi-card.accent-navy {
        border-top-color: var(--navy-950);
    }

    .kpi-card.accent-gold {
        border-top-color: var(--gold-500);
    }

    .kpi-card.accent-teal {
        border-top-color: var(--teal-600);
    }

    .kpi-card.accent-rust {
        border-top-color: var(--rust-600);
    }

    .kpi-card .k-label {
        font-size: 10.5px;
        letter-spacing: .6px;
        text-transform: uppercase;
        color: var(--ink-500);
        margin-bottom: 8px;
        font-weight: 700;
    }

    .kpi-card .k-value {
        font-family: Georgia,serif;
        font-size: 23px;
        font-weight: 700;
        color: var(--navy-950);
    }

    .kpi-card .k-delta {
        font-size: 11px;
        margin-top: 6px;
        font-weight: 600;
        color: var(--ink-500);
    }

.info-banner {
    background: var(--paper-100);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 18px;
    font-size: 12.5px;
    color: var(--ink-700);
    margin-bottom: 22px;
}

.btn-export {
    background: var(--gold-500);
    color: var(--navy-950);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-export:hover {
        background: var(--gold-300);
    }

.year-select {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 12.5px;
    color: var(--navy-950);
    font-weight: 600;
}

.k-delta.up {
    color: var(--teal-600);
}

.k-delta.down {
    color: var(--rust-600);
}

.kpi-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

    .section-title h3 {
        font-family: Georgia,serif;
        font-size: 15.5px;
        margin: 0;
        color: var(--navy-950);
    }

    .section-title .hint {
        font-size: 11.5px;
        color: var(--ink-500);
    }

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

    .toolbar input[type=text], .toolbar select {
        padding: 9px 12px;
        border: 1px solid var(--line);
        border-radius: 7px;
        font-size: 12.5px;
        background: #fff;
        outline: none;
    }

    .toolbar input[type=text] {
        flex: 1;
        min-width: 180px;
    }

.btn-cta {
    margin-left: auto;
    background: var(--navy-950);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .btn-cta:hover {
        background: var(--navy-800);
    }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.6px;
}

thead tr {
    background: var(--navy-950);
    color: var(--paper-50);
}

th {
    text-align: left;
    padding: 11px 14px;
    font-size: 10.3px;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-weight: 600;
}

td {
    padding: 11px 14px;
    border-top: 1px solid var(--line);
    vertical-align: middle;
}

tbody tr:nth-child(even) {
    background: var(--paper-100);
}

tbody tr:hover {
    background: var(--gold-100);
    cursor: pointer;
}

.badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: .2px;
}

.b-teal {
    background: var(--teal-100);
    color: var(--teal-600);
}

.b-gold {
    background: var(--gold-100);
    color: #8a6a2c;
}

.b-rust {
    background: var(--rust-100);
    color: var(--rust-600);
}

.b-navy {
    background: #E7EBF3;
    color: var(--navy-700);
}

.b-grey {
    background: #EDEBE4;
    color: #6b6455;
}

.chart-card {
    padding: 18px 20px;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 240px;
}

    .chart-wrap.sm {
        height: 190px;
    }

.grid-2 {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}

.grid-2b {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}

.prop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
    gap: 18px;
}

.prop-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .15s;
}

    .prop-card:hover {
        transform: translateY(-3px);
    }

.prop-img {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .prop-img .status-tag {
        position: absolute;
        top: 10px;
        left: 10px;
    }

.prop-body {
    padding: 14px 16px 16px;
}

    .prop-body .title {
        font-weight: 700;
        font-size: 13.5px;
        color: var(--navy-950);
        margin-bottom: 2px;
    }

    .prop-body .addr {
        font-size: 11.5px;
        color: var(--ink-500);
        margin-bottom: 10px;
    }

    .prop-body .row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
        color: var(--ink-700);
    }

    .prop-body .price {
        font-family: Georgia,serif;
        font-weight: 700;
        color: var(--gold-500);
        font-size: 14.5px;
    }

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .timeline li {
        display: flex;
        gap: 12px;
        padding: 10px 0;
        border-bottom: 1px dashed var(--line);
    }

        .timeline li:last-child {
            border-bottom: none;
        }

    .timeline .dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        margin-top: 5px;
        flex-shrink: 0;
    }

    .timeline .t-content .t-title {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ink-700);
    }

    .timeline .t-content .t-time {
        font-size: 10.5px;
        color: var(--ink-500);
        margin-top: 2px;
    }

/* modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,25,48,.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

    .modal-overlay.active {
        display: flex;
    }

.modal-box {
    background: var(--paper-50);
    border-radius: 12px;
    max-width: 760px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 30px 70px rgba(0,0,0,.4);
}

.modal-head {
    background: var(--navy-950);
    color: #fff;
    padding: 20px 26px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-radius: 12px 12px 0 0;
}

.modal-close {
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
}

.modal-body {
    padding: 22px 26px 28px;
}

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
}

.tab-btn {
    padding: 9px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

    .tab-btn.active {
        color: var(--navy-950);
        border-color: var(--gold-500);
    }

.tab-panel {
    display: none;
}

    .tab-panel.active {
        display: block;
    }

.kv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    font-size: 12.8px;
}

    .kv-grid .k {
        color: var(--ink-500);
    }

    .kv-grid .v {
        font-weight: 600;
        color: var(--ink-700);
    }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--navy-950);
    font-size: 18px;
}

@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 60;
        margin-left: -262px;
    }

        #sidebar.open {
            margin-left: 0;
            box-shadow: 0 0 40px rgba(0,0,0,.4);
        }

    .mobile-toggle {
        display: block;
    }

    .kpi-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .grid-2, .grid-2b {
        grid-template-columns: 1fr;
    }

    .login-left {
        display: none;
    }

    .top-search {
        display: none;
    }
}

@media print {
    #sidebar, #topbar, .no-print {
        display: none !important;
    }

    #app-shell, .shell-flex, #main-col, #view-container {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    body {
        background: #fff !important;
    }
}

#print-report-mount {
    display: none;
}

/* ===== Portails Propriétaire / Locataire ===== */
.portal-shell {
    display: none;
    min-height: 100vh;
    background: var(--paper-100);
}

.portal-topbar {
    background: var(--navy-950);
    padding: 16px 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 20;
}

.portal-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 30px 60px;
}

.owner-prop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 4px;
    border-bottom: 1px solid var(--line);
}

    .owner-prop-row:last-child {
        border-bottom: none;
    }

    .owner-prop-row .op-title {
        font-weight: 700;
        font-size: 13px;
        color: var(--navy-950);
    }

    .owner-prop-row .op-sub {
        font-size: 11px;
        color: var(--ink-500);
        margin-top: 2px;
    }

.due-amount {
    font-family: Georgia,serif;
    font-size: 38px;
    font-weight: 700;
}

.notif-panel {
    display: none;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    overflow: hidden;
}

    .notif-panel.open {
        display: block;
    }

.notif-row {
    display: flex;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
}

    .notif-row:last-child {
        border-bottom: none;
    }

    .notif-row .n-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
    }

    .notif-row .n-title {
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ink-700);
    }

    .notif-row .n-time {
        font-size: 10.5px;
        color: var(--ink-500);
        margin-top: 2px;
    }

.notif-dropdown {
    position: absolute;
    top: 60px;
    right: 26px;
    width: 340px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 20px 45px rgba(0,0,0,.25);
    z-index: 80;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}

    .notif-dropdown.open {
        display: block;
    }

.notif-dropdown-head {
    padding: 12px 16px;
    background: var(--navy-950);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 13.5px;
    background: #fff;
    outline: none;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
}

    .field textarea:focus {
        border-color: var(--gold-500);
    }

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--navy-950);
    color: #fff;
    padding: 13px 20px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 14px 34px rgba(0,0,0,.35);
    z-index: 300;
    opacity: 0;
    transform: translateY(12px);
    transition: all .25s ease;
    pointer-events: none;
}

    .toast.show {
        opacity: 1;
        transform: translateY(0);
    }

.link-action {
    color: var(--gold-500);
    font-weight: 700;
    cursor: pointer;
}

/* ===== Assistant de requêtes (chat) ===== */
.chat-row {
    display: flex;
    margin-bottom: 16px;
}

    .chat-row.user {
        justify-content: flex-end;
    }

.chat-bubble {
    max-width: 78%;
    padding: 11px 15px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
}

.chat-row.user .chat-bubble {
    background: var(--navy-950);
    color: #fff;
    border-bottom-right-radius: 3px;
}

.chat-row.bot .chat-bubble {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-700);
    border-bottom-left-radius: 3px;
    box-shadow: var(--shadow);
}

.chat-sql {
    background: var(--navy-950);
    color: #9fd8c9;
    font-family: 'Consolas','Monaco',monospace;
    font-size: 11px;
    padding: 9px 12px;
    border-radius: 6px;
    margin: 8px 0;
    overflow-x: auto;
    white-space: pre;
}

.chat-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    margin-top: 8px;
}

    .chat-result-table th {
        background: var(--paper-100);
        text-align: left;
        padding: 6px 9px;
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: .4px;
        color: var(--ink-500);
    }

    .chat-result-table td {
        padding: 6px 9px;
        border-top: 1px solid var(--line);
    }

.chat-answer-stat {
    font-family: Georgia,serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--navy-950);
    margin: 4px 0;
}

.suggestion-chip {
    background: var(--paper-100);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 6px 13px;
    font-size: 11.5px;
    color: var(--navy-700);
    cursor: pointer;
    transition: all .15s;
}

    .suggestion-chip:hover {
        background: var(--gold-100);
        border-color: var(--gold-500);
        color: #6b4f1f;
    }

.chat-typing {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
}

    .chat-typing span {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--ink-500);
        opacity: .4;
        animation: typingBounce 1s infinite;
    }

        .chat-typing span:nth-child(2) {
            animation-delay: .15s;
        }

        .chat-typing span:nth-child(3) {
            animation-delay: .3s;
        }

@keyframes typingBounce {
    0%,60%,100% {
        opacity: .3;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

body.printing-report #sidebar, body.printing-report #topbar, body.printing-report #view-container,
body.printing-report #owner-portal, body.printing-report #tenant-portal {
    display: none !important;
}

body.printing-report #print-report-mount {
    display: block !important;
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   ADAPTATIONS BLAZOR — le bloc ci-dessus est la reproduction EXACTE et
   intégrale du CSS du POC (landlex-immo-poc.html), non modifiée.
   Dans le POC, #login-screen et #app-shell étaient affichés/masqués en JS
   (display:none / display:block) au sein d'une seule page HTML. En Blazor,
   /login et le reste de l'application sont deux routes distinctes : ces
   quelques règles rétablissent donc simplement l'affichage par défaut,
   sans changer une seule valeur du CSS d'origine ci-dessus.
   ========================================================================== */
#app-shell {
    display: block;
}

#login-screen {
    position: static;
    min-height: 100vh;
}

/* ===== Notifications toast ===== */
.toast-container {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(11,35,64,.18);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    animation: toast-in .25s ease-out;
}

.toast-success {
    background: var(--teal-600);
}

.toast-error {
    background: var(--rust-600);
}

.toast-info {
    background: var(--navy-800);
}

.toast-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.toast-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    cursor: pointer;
    opacity: .75;
    flex-shrink: 0;
    font-size: 11px;
}

    .toast-close:hover {
        opacity: 1;
    }

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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