﻿:root {
    --primary-color: #0f5260;
    --secondary-color: #2aa889;
    --success-color: #1ea672;
    --danger-color: #d94848;
    --warning-color: #f2b636;
    --info-color: #2d8fa1;
    --ink: #0b2c36;
    --ink-soft: #3f5660;
    --surface: #ffffff;
    --surface-alt: #f4fbf8;
    --border: rgba(15, 47, 58, 0.12);
    --shadow-soft: 0 12px 30px rgba(11, 44, 54, 0.12);
    --shadow-strong: 0 18px 44px rgba(11, 44, 54, 0.18);
}

body {
    font-family: 'Sora', 'Segoe UI', sans-serif;
    color: var(--ink);
    background: radial-gradient(1200px circle at 10% 10%, #e3f3ee 0%, #f7faf9 45%, #eef5f6 100%);
    overflow-x: hidden;
}

.public-login-footer {
    text-align: center;
    padding: 8px 16px 20px;
    color: #516872;
    font-size: 0.86rem;
}

.public-login-footer a {
    color: #0f5260;
    text-decoration: none;
    font-weight: 600;
}

.login-demo-card {
    padding: 1rem;
    border: 1px solid rgba(42, 168, 137, 0.34);
    border-radius: 14px;
    background: rgba(42, 168, 137, 0.08);
}

.login-demo-card p:first-child {
    color: #0f5260;
}

.demo-account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}

.demo-account-actions .btn {
    font-size: .82rem;
}

@media (max-width: 768px) {
    body.manager-mobile .app-shell { min-height: 100dvh; }
    body.manager-mobile .sidebar,
    body.manager-mobile .sidebar-overlay,
    body.manager-mobile .main-header,
    body.manager-mobile .global-search-panel { display: none; }

    body.manager-mobile .manager-mobile-header {
        position: sticky;
        top: 0;
        z-index: 110;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 72px;
        padding: max(14px, env(safe-area-inset-top, 0px)) 18px 14px;
        border-bottom: 1px solid var(--border);
        background: rgba(255, 255, 255, .95);
        backdrop-filter: blur(14px);
    }
    body.theme-dark.manager-mobile .manager-mobile-header { background: rgba(10, 26, 32, .96); }
    body.manager-mobile .manager-mobile-identity {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        padding: 0;
        border: 0;
        color: var(--ink);
        background: transparent;
        text-align: left;
    }
    body.manager-mobile .manager-mobile-avatar {
        display: grid;
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        place-items: center;
        border-radius: 50%;
        color: #fff;
        background: linear-gradient(135deg, #225f9e, #0f5260);
        font-weight: 700;
    }
    body.manager-mobile .manager-mobile-greeting { display: block; color: var(--ink-soft); font-size: .75rem; }
    body.manager-mobile #manager-mobile-name { display: block; max-width: 190px; overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
    body.manager-mobile .manager-mobile-notifications {
        position: relative;
        display: grid;
        width: 44px;
        height: 44px;
        flex: 0 0 auto;
        place-items: center;
        border: 0;
        border-radius: 50%;
        color: var(--primary-color);
        background: var(--surface-alt);
        font-size: 1.15rem;
    }
    body.manager-mobile .manager-mobile-tabbar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 120;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: 66px;
        padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border);
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -10px 28px rgba(15, 74, 86, .1);
    }
    body.theme-dark.manager-mobile .manager-mobile-tabbar { background: rgba(10, 26, 32, .98); box-shadow: 0 -10px 28px rgba(0, 0, 0, .25); }
    body.manager-mobile .manager-mobile-tab {
        display: grid;
        min-height: 52px;
        place-items: center;
        gap: 3px;
        border: 0;
        border-radius: 12px;
        color: var(--ink-soft);
        background: transparent;
        font-size: .67rem;
        white-space: nowrap;
    }
    body.manager-mobile .manager-mobile-tab i { font-size: 1.1rem; }
    body.manager-mobile .manager-mobile-tab.is-active { color: var(--primary-color); background: rgba(42, 168, 137, .14); font-weight: 700; }
    body.manager-mobile .view-container { padding: 18px 16px calc(94px + env(safe-area-inset-bottom, 0px)); overflow: visible; }
    body.manager-mobile .content-grid,
    body.manager-mobile .stat-grid { grid-template-columns: 1fr; gap: 14px; }
    body.manager-mobile .panel { height: auto; }
    body.manager-mobile .dashboard-hero { padding: 20px; gap: 16px; }
    body.manager-mobile .dashboard-hero h3 { font-size: 1.3rem; }
    body.manager-mobile .dashboard-hero-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
    body.manager-mobile .hero-pill { min-height: 52px; justify-content: center; text-align: center; }
    body.manager-mobile .form-control,
    body.manager-mobile .form-select { min-height: 46px; font-size: 16px; }
    body.manager-mobile .form-actions .btn { width: 100%; min-height: 48px; }

    body.manager-mobile .manager-mobile-sheet.is-open,
    body.manager-mobile .manager-mobile-account-sheet.is-open {
        position: fixed;
        inset: 0;
        z-index: 210;
        display: flex;
        align-items: flex-end;
    }
    body.manager-mobile .manager-mobile-account-sheet.is-open { z-index: 220; }
    body.manager-mobile .manager-mobile-sheet-backdrop { position: absolute; inset: 0; border: 0; background: rgba(3, 16, 20, .62); }
    body.manager-mobile .manager-mobile-sheet-panel,
    body.manager-mobile .manager-mobile-account-sheet-panel {
        position: relative;
        width: 100%;
        max-height: min(78dvh, 640px);
        overflow-y: auto;
        padding: 8px 18px calc(24px + env(safe-area-inset-bottom, 0px));
        border-radius: 24px 24px 0 0;
        color: var(--ink);
        background: var(--surface);
        box-shadow: 0 -18px 42px rgba(0, 0, 0, .24);
    }
    body.theme-dark.manager-mobile .manager-mobile-sheet-panel,
    body.theme-dark.manager-mobile .manager-mobile-account-sheet-panel { background: #10252d; }
    body.manager-mobile .manager-mobile-sheet-handle { width: 42px; height: 4px; margin: 0 auto 14px; border-radius: 999px; background: var(--border); }
    body.manager-mobile .manager-mobile-sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    body.manager-mobile .manager-mobile-sheet-heading p { margin: 0; color: var(--ink-soft); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
    body.manager-mobile .manager-mobile-sheet-heading h2 { margin: 2px 0 0; font-size: 1.35rem; }
    body.manager-mobile .manager-mobile-sheet-actions { display: grid; gap: 8px; }
    body.manager-mobile .manager-mobile-sheet-actions button { display: grid; grid-template-columns: 38px 1fr; column-gap: 10px; align-items: center; width: 100%; min-height: 64px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; color: var(--ink); background: var(--surface-alt); text-align: left; }
    body.manager-mobile .manager-mobile-sheet-actions i { grid-row: span 2; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #fff; background: var(--primary-color); }
    body.manager-mobile .manager-mobile-sheet-actions span { font-weight: 700; }
    body.manager-mobile .manager-mobile-sheet-actions small { color: var(--ink-soft); }
    body.manager-mobile .manager-mobile-account-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-alt); }
    body.manager-mobile .manager-mobile-account-avatar { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #225f9e, #0f5260); font-weight: 700; }
    body.manager-mobile .manager-mobile-account-card strong,
    body.manager-mobile .manager-mobile-account-card span,
    body.manager-mobile .manager-mobile-account-card small { display: block; }
    body.manager-mobile .manager-mobile-account-card span,
    body.manager-mobile .manager-mobile-account-card small { overflow: hidden; color: var(--ink-soft); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
    body.manager-mobile .manager-mobile-account-actions { display: grid; gap: 8px; margin-top: 10px; }
    body.manager-mobile .manager-mobile-account-actions button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; color: var(--ink); background: var(--surface-alt); text-align: left; font-weight: 700; }
    body.manager-mobile .manager-mobile-account-actions .is-danger { color: #bf4141; }
}

@media (max-width: 390px) {
    .demo-account-actions {
        grid-template-columns: 1fr;
    }
}

h1, h2, h3, h4, h5 {
    font-family: 'Fraunces', serif;
    letter-spacing: 0.01em;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.card {
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.btn {
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
}

.btn.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-group > .btn {
    border-radius: 0;
}

.btn-group > .btn:first-child {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

.btn-group > .btn:last-child {
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

.btn-primary {
    background: linear-gradient(135deg, #0f5260, #2aa889);
    border: none;
    box-shadow: 0 10px 20px rgba(42, 168, 137, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #0b3f4a, #239a7a);
    box-shadow: 0 12px 24px rgba(42, 168, 137, 0.32);
}

.btn-outline-primary {
    border-color: rgba(15, 82, 96, 0.35);
    color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: rgba(15, 82, 96, 0.08);
    border-color: rgba(15, 82, 96, 0.5);
    color: var(--ink);
}

.btn-outline-danger {
    border-color: rgba(217, 72, 72, 0.45);
    color: var(--danger-color);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: rgba(217, 72, 72, 0.08);
    border-color: rgba(217, 72, 72, 0.7);
    color: #9f2a2a;
}

.btn-outline-secondary {
    border-color: rgba(15, 82, 96, 0.25);
    color: var(--ink);
}

.btn-outline-secondary:hover {
    background: rgba(15, 82, 96, 0.08);
    border-color: rgba(15, 82, 96, 0.35);
    color: var(--ink);
}

.btn-light {
    background: #ffffff;
    border: 1px solid rgba(15, 82, 96, 0.12);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

.list-group-item {
    border-radius: 8px !important;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.text-primary {
    color: var(--primary-color) !important;
}

.navbar-brand {
    font-size: 1.5rem;
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: radial-gradient(1000px circle at 90% 10%, #e2f5ef 0%, #f4fbf8 45%, #eef5f6 100%);
    min-width: 0;
}

.sidebar {
    width: 260px;
    background: linear-gradient(160deg, #0b2c36 0%, #0f4a56 55%, #0f5260 100%);
    color: #e6f5f0;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Fraunces', serif;
    letter-spacing: 0.02em;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
}

.brand-text {
    display: none;
}

.login-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 18px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    margin-bottom: 16px;
}

.user-block {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-weight: 600;
    color: #f8fffd;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2aa889, #0f5260);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
}

.avatar-small {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

.role-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background-color: rgba(42, 168, 137, 0.2);
    color: #d6fff3;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

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

.nav-button {
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(230, 245, 240, 0.8);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 500;
    text-align: left;
    transition: background-color 0.2s, color 0.2s;
    min-width: 0;
}

.nav-button i {
    font-size: 1.1rem;
}

.nav-button span {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.nav-label {
    flex: 1;
}

.nav-badge {
    margin-left: auto;
    font-size: 0.7rem;
    line-height: 1;
    background: rgba(42, 168, 137, 0.2);
    color: #c7f4e7;
    border: 1px solid rgba(42, 168, 137, 0.4);
    padding: 4px 8px;
    border-radius: 999px;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-button.active {
    background: linear-gradient(135deg, rgba(42, 168, 137, 0.35), rgba(15, 82, 96, 0.6));
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.main-header {
    background-color: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.main-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    font-family: 'Fraunces', serif;
}

.main-header p {
    font-size: 0.95rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-toggle {
    display: none;
    border: 1px solid rgba(15, 82, 96, 0.2);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 24, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 95;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-box input {
    border: 1px solid rgba(15, 82, 96, 0.18);
    border-radius: 10px;
    padding: 8px 14px 8px 36px;
    width: 220px;
    font-size: 0.9rem;
    background-color: #ffffff;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background-color: rgba(15, 82, 96, 0.08);
    position: relative;
}

.header-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d94848;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
}

.notification-badge.is-visible {
    display: inline-flex;
}

.dropdown-panel {
    position: absolute;
    top: 52px;
    right: 0;
    min-width: 280px;
    max-width: 360px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 20;
}

#notifications-panel {
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    min-width: 320px;
    max-width: 420px;
    border-color: rgba(15, 82, 96, 0.18);
    box-shadow: var(--shadow-strong);
}

#notifications-panel .dropdown-header span {
    font-weight: 700;
    color: var(--ink);
}

#notifications-panel .dropdown-list {
    gap: 10px;
}

#notifications-panel .notification-item {
    border: 1px solid rgba(15, 82, 96, 0.12);
    background: var(--surface-alt);
}

#notifications-panel .notification-item .text-muted {
    color: var(--ink-soft);
}

.dropdown-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

.dropdown-footer {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-item {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(15, 82, 96, 0.08);
}

.dropdown-panel .panel-item {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
}

button.avatar {
    border: none;
    cursor: pointer;
    padding: 0;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.plan-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    background: var(--surface-alt);
    position: relative;
}

.plan-card.featured {
    grid-column: span 2;
    padding: 24px;
    min-height: 100%;
    border-color: rgba(42, 168, 137, 0.5);
    box-shadow: var(--shadow-soft);
}

.plan-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(42, 168, 137, 0.2);
    color: var(--secondary-color);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.plan-title {
    font-weight: 700;
    font-size: 1rem;
}

.plan-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ink);
}

.plan-price span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.plan-setup {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 6px;
    margin-bottom: 10px;
}

.plan-card.featured .plan-title {
    font-size: 1.1rem;
}

.plan-card.featured .plan-price {
    font-size: 1.8rem;
}

.plan-card.featured .plan-setup,
.plan-card.featured .plan-price span {
    font-size: 0.9rem;
}

.plan-card.featured .plan-list {
    gap: 8px;
}

@media (max-width: 1024px) {
    .plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plan-card.featured {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .plan-grid {
        grid-template-columns: 1fr;
    }

    .plan-card.featured {
        grid-column: span 1;
    }
}

.plan-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.plan-list li::before {
    content: '•';
    color: var(--secondary-color);
    margin-right: 6px;
}

.view-container {
    padding: 24px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    min-width: 0;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    min-width: 0;
}

.stat-card {
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    overflow-wrap: anywhere;
}

.stat-card h4 {
    margin: 8px 0 4px;
    font-weight: 700;
    color: var(--ink);
}

.broker-stat-card,
.dashboard-stat-card {
    width: 100%;
    color: var(--ink);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.broker-stat-card:hover,
.dashboard-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(42, 168, 137, .58);
    box-shadow: 0 10px 22px rgba(15, 82, 96, .12);
}

.broker-stat-card:focus-visible,
.dashboard-stat-card:focus-visible {
    outline: 3px solid rgba(42, 168, 137, .5);
    outline-offset: 2px;
}


.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
}

.panel {
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    height: 100%;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.panel.panel-compact {
    padding: 8px 12px;
    gap: 6px;
}

.panel.panel-compact h5 {
    margin-bottom: 4px;
}

.tenant-dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.tenant-mobile-header,
.tenant-mobile-tabbar,
.owner-mobile-header,
.owner-mobile-tabbar,
.broker-mobile-header,
.broker-mobile-tabbar,
.broker-mobile-sheet,
.broker-mobile-account-sheet,
.manager-mobile-header,
.manager-mobile-tabbar,
.manager-mobile-sheet,
.manager-mobile-account-sheet {
    display: none;
}

.tenant-rent-hero {
    border-radius: 22px;
    padding: 22px;
    color: #effff9;
    background: linear-gradient(135deg, #0d5360, #19785f);
    box-shadow: 0 16px 32px rgba(15, 82, 96, 0.2);
}

@media (max-width: 768px) {
    body.broker-mobile .app-shell {
        min-height: 100dvh;
    }

    body.broker-mobile .sidebar,
    body.broker-mobile .sidebar-overlay,
    body.broker-mobile .main-header,
    body.broker-mobile .global-search-panel {
        display: none;
    }

    body.broker-mobile .broker-mobile-header {
        position: sticky;
        top: 0;
        z-index: 110;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 72px;
        padding: max(14px, env(safe-area-inset-top, 0px)) 18px 14px;
        border-bottom: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(14px);
    }

    body.theme-dark.broker-mobile .broker-mobile-header {
        background: rgba(10, 26, 32, 0.96);
    }

    body.broker-mobile .broker-mobile-identity {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        border: 0;
        padding: 0;
        color: var(--ink);
        background: transparent;
        text-align: left;
    }

    body.broker-mobile .broker-mobile-avatar {
        display: grid;
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        place-items: center;
        border-radius: 50%;
        color: #ffffff;
        background: linear-gradient(135deg, #2aa889, #0f5260);
        font-weight: 700;
    }

    body.broker-mobile .broker-mobile-greeting {
        display: block;
        color: var(--ink-soft);
        font-size: .75rem;
    }

    body.broker-mobile #broker-mobile-name {
        display: block;
        max-width: 190px;
        overflow: hidden;
        font-size: .95rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.broker-mobile .broker-mobile-notifications {
        position: relative;
        display: grid;
        width: 44px;
        height: 44px;
        flex: 0 0 auto;
        place-items: center;
        border: 0;
        border-radius: 50%;
        color: var(--primary-color);
        background: var(--surface-alt);
        font-size: 1.15rem;
    }

    body.broker-mobile .broker-mobile-tabbar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 120;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: 66px;
        padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -10px 28px rgba(15, 74, 86, .1);
    }

    body.theme-dark.broker-mobile .broker-mobile-tabbar {
        background: rgba(10, 26, 32, .98);
        box-shadow: 0 -10px 28px rgba(0, 0, 0, .25);
    }

    body.broker-mobile .broker-mobile-tab {
        display: grid;
        min-height: 52px;
        place-items: center;
        gap: 3px;
        border: 0;
        border-radius: 12px;
        color: var(--ink-soft);
        background: transparent;
        font-size: .67rem;
        white-space: nowrap;
    }

    body.broker-mobile .broker-mobile-tab i { font-size: 1.1rem; }
    body.broker-mobile .broker-mobile-tab.is-active { color: var(--primary-color); background: rgba(42, 168, 137, .14); font-weight: 700; }
    body.broker-mobile .view-container { padding: 18px 16px calc(94px + env(safe-area-inset-bottom, 0px)); overflow: visible; }
    body.broker-mobile .content-grid { grid-template-columns: 1fr; gap: 14px; }
    body.broker-mobile .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    body.broker-mobile .stat-card { min-height: 132px; padding: 14px; }
    body.broker-mobile .stat-card h4 { font-size: 1.4rem; }
    body.broker-mobile .broker-stat-card { min-height: 132px; }
    body.broker-mobile .stat-icon { width: 36px; height: 36px; font-size: 1rem; }
    body.broker-mobile .panel { height: auto; }
    body.broker-mobile .dashboard-hero { padding: 20px; gap: 16px; }
    body.broker-mobile .dashboard-hero h3 { font-size: 1.3rem; }
    body.broker-mobile .dashboard-hero-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
    body.broker-mobile .hero-pill { min-height: 52px; justify-content: center; text-align: center; }
    body.broker-mobile .form-control,
    body.broker-mobile .form-select { min-height: 46px; font-size: 16px; }
    body.broker-mobile .form-actions .btn { width: 100%; min-height: 48px; }
    body.broker-mobile .panel-list .btn { min-height: 42px; }
    body.broker-mobile .panel-item { gap: 10px; }
    body.broker-mobile .panel-item .text-muted { overflow-wrap: anywhere; }
    body.broker-mobile .broker-opportunity-stage,
    body.broker-mobile .broker-opportunity-mandate { width: 100%; }

    body.broker-mobile .broker-mobile-form-step {
        order: -1;
        padding: 14px;
        scroll-margin-top: 90px;
    }

    body.broker-mobile .broker-mobile-form-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 48px;
        padding: 10px 12px;
        border: 1px solid rgba(42, 168, 137, .32);
        border-radius: 13px;
        color: var(--primary-color);
        background: rgba(42, 168, 137, .08);
        font-weight: 700;
        text-align: left;
    }

    body.broker-mobile .broker-mobile-form-toggle .broker-mobile-form-chevron {
        margin-left: auto;
        transition: transform .2s ease;
    }

    body.broker-mobile .broker-mobile-form-step.is-mobile-form-open .broker-mobile-form-chevron {
        transform: rotate(180deg);
    }

    body.broker-mobile .broker-mobile-form-step:not(.is-mobile-form-open) form,
    body.broker-mobile .broker-mobile-form-step:not(.is-mobile-form-open) .form-message,
    body.broker-mobile .broker-mobile-form-step:not(.is-mobile-form-open) .form-hint {
        display: none;
    }

    body.broker-mobile .broker-mobile-form-step.is-mobile-form-open .broker-mobile-form-toggle {
        margin-bottom: 14px;
    }

    body.theme-dark.broker-mobile .broker-mobile-form-toggle {
        border-color: rgba(91, 212, 177, .34);
        background: rgba(42, 168, 137, .14);
    }

    body.broker-mobile .broker-mobile-sheet.is-open {
        position: fixed;
        inset: 0;
        z-index: 210;
        display: flex;
        align-items: flex-end;
    }

    body.broker-mobile .broker-mobile-account-sheet.is-open {
        position: fixed;
        inset: 0;
        z-index: 220;
        display: flex;
        align-items: flex-end;
    }

    body.broker-mobile .broker-mobile-sheet-backdrop {
        position: absolute;
        inset: 0;
        border: 0;
        background: rgba(3, 16, 20, .62);
    }

    body.broker-mobile .broker-mobile-sheet-panel {
        position: relative;
        width: 100%;
        max-height: min(78dvh, 640px);
        overflow-y: auto;
        padding: 8px 18px calc(24px + env(safe-area-inset-bottom, 0px));
        border-radius: 24px 24px 0 0;
        color: var(--ink);
        background: var(--surface);
        box-shadow: 0 -18px 42px rgba(0, 0, 0, .24);
    }

    body.broker-mobile .broker-mobile-account-sheet-panel {
        position: relative;
        width: 100%;
        padding: 8px 18px calc(24px + env(safe-area-inset-bottom, 0px));
        border-radius: 24px 24px 0 0;
        color: var(--ink);
        background: var(--surface);
        box-shadow: 0 -18px 42px rgba(0, 0, 0, .24);
    }

    body.theme-dark.broker-mobile .broker-mobile-sheet-panel { background: #10252d; }
    body.theme-dark.broker-mobile .broker-mobile-account-sheet-panel { background: #10252d; }
    body.broker-mobile .broker-mobile-sheet-handle { width: 42px; height: 4px; margin: 0 auto 14px; border-radius: 999px; background: var(--border); }
    body.broker-mobile .broker-mobile-sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    body.broker-mobile .broker-mobile-sheet-heading p { margin: 0; color: var(--ink-soft); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
    body.broker-mobile .broker-mobile-sheet-heading h2 { margin: 2px 0 0; font-size: 1.35rem; }
    body.broker-mobile .broker-mobile-sheet-actions { display: grid; gap: 8px; }
    body.broker-mobile .broker-mobile-sheet-actions button { display: grid; grid-template-columns: 38px 1fr; column-gap: 10px; align-items: center; width: 100%; min-height: 64px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; color: var(--ink); background: var(--surface-alt); text-align: left; }
    body.broker-mobile .broker-mobile-sheet-actions i { grid-row: span 2; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #ffffff; background: var(--primary-color); }
    body.broker-mobile .broker-mobile-sheet-actions span { font-weight: 700; }
    body.broker-mobile .broker-mobile-sheet-actions small { color: var(--ink-soft); }
    body.broker-mobile .broker-mobile-account-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-alt); }
    body.broker-mobile .broker-mobile-account-avatar { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #ffffff; background: linear-gradient(135deg, #2aa889, #0f5260); font-weight: 700; }
    body.broker-mobile .broker-mobile-account-card strong,
    body.broker-mobile .broker-mobile-account-card span,
    body.broker-mobile .broker-mobile-account-card small { display: block; }
    body.broker-mobile .broker-mobile-account-card span,
    body.broker-mobile .broker-mobile-account-card small { color: var(--ink-soft); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    body.broker-mobile .broker-mobile-account-plan { display: flex; align-items: center; gap: 8px; margin: 10px 0; padding: 10px 4px; color: var(--primary-color); font-size: .86rem; font-weight: 700; }
    body.broker-mobile .broker-mobile-account-actions { display: grid; gap: 8px; }
    body.broker-mobile .broker-mobile-account-actions button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; color: var(--ink); background: var(--surface-alt); text-align: left; font-weight: 700; }
    body.broker-mobile .broker-mobile-account-actions .is-danger { color: #bf4141; }
}

@media (max-width: 390px) {
    body.broker-mobile .broker-mobile-tab {
        font-size: .61rem;
    }
}

.tenant-rent-hero-head,
.tenant-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tenant-rent-hero-head p,
.tenant-profile-hero p,
.tenant-section-heading span {
    margin: 0 0 5px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tenant-rent-hero-head h3,
.tenant-section-heading h5 {
    margin: 0;
}

.tenant-rent-hero-head > i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.2rem;
}

.tenant-rent-summary {
    margin: 18px 0;
}

.tenant-rent-hero .panel-item {
    padding: 10px 0;
    border-color: rgba(255, 255, 255, 0.22);
    color: inherit;
    background: transparent;
}

.tenant-rent-hero .panel-item .text-muted {
    color: rgba(239, 255, 249, 0.76) !important;
}

.tenant-primary-action {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    color: #0d4c53;
    background: #ffffff;
    font-weight: 700;
}

.tenant-primary-action i {
    margin-right: 8px;
}

.tenant-section-heading {
    align-items: center;
}

.tenant-section-heading > i {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.tenant-section-heading span {
    color: var(--ink-soft);
}

.tenant-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tenant-quick-action {
    min-height: 116px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 10px;
    color: var(--ink);
    background: var(--surface-alt);
    text-align: left;
}

.tenant-quick-action i {
    display: block;
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-size: 1.25rem;
}

.tenant-quick-action span {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
}

.tenant-profile-view {
    max-width: 680px;
    margin: 0 auto;
}

.tenant-profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    margin-bottom: 18px;
    border-radius: 22px;
    color: #effff9;
    background: linear-gradient(135deg, #0d5360, #19785f);
}

.tenant-profile-hero p { color: rgba(239, 255, 249, 0.72); }
.tenant-profile-hero h3 { margin: 0 0 4px; }
.tenant-profile-hero span { font-size: 0.9rem; color: rgba(239, 255, 249, 0.82); }

.tenant-profile-avatar {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border-radius: 50%;
    color: #0d5360;
    background: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
}

.tenant-profile-panel { gap: 0; }
.tenant-profile-panel h5 { margin-bottom: 10px; }

.tenant-profile-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    min-height: 56px;
    border: 0;
    border-top: 1px solid var(--border);
    color: var(--ink);
    background: transparent;
    text-align: left;
}

.tenant-profile-row > i:first-child { color: var(--secondary-color); }
.tenant-profile-row > i:last-child { color: var(--ink-soft); }
.tenant-profile-logout { color: #b84040; }
.tenant-profile-logout > i:first-child { color: currentColor; }

@media (max-width: 768px) {
    body.owner-mobile .app-shell {
        min-height: 100dvh;
    }

    body.tenant-mobile .app-shell {
        min-height: 100dvh;
    }

    body.tenant-mobile .sidebar,
    body.tenant-mobile .sidebar-overlay,
    body.tenant-mobile .main-header,
    body.tenant-mobile .global-search-panel {
        display: none;
    }

    body.tenant-mobile .tenant-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 72px;
        padding: max(14px, env(safe-area-inset-top, 0px)) 18px 14px;
        border-bottom: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.95);
    }

    body.theme-dark.tenant-mobile .tenant-mobile-header {
        background: rgba(10, 26, 32, 0.96);
    }

    body.tenant-mobile .tenant-mobile-identity {
        display: flex;
        align-items: center;
        gap: 10px;
        border: 0;
        padding: 0;
        color: var(--ink);
        background: transparent;
        text-align: left;
    }

    body.tenant-mobile .tenant-mobile-avatar {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        border-radius: 50%;
        color: #ffffff;
        background: linear-gradient(135deg, #2aa889, #0f5260);
        font-weight: 700;
    }

    body.tenant-mobile .tenant-mobile-greeting {
        display: block;
        color: var(--ink-soft);
        font-size: 0.75rem;
    }

    body.tenant-mobile #tenant-mobile-name {
        display: block;
        max-width: 190px;
        overflow: hidden;
        font-size: 0.95rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.tenant-mobile .tenant-mobile-notifications {
        position: relative;
        display: grid;
        width: 44px;
        height: 44px;
        place-items: center;
        border: 0;
        border-radius: 50%;
        color: var(--primary-color);
        background: var(--surface-alt);
        font-size: 1.15rem;
    }

    body.tenant-mobile .tenant-mobile-tabbar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 120;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: 66px;
        padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -10px 28px rgba(15, 74, 86, 0.1);
    }

    body.theme-dark.tenant-mobile .tenant-mobile-tabbar {
        background: rgba(10, 26, 32, 0.98);
        box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.25);
    }

    body.tenant-mobile .tenant-mobile-tab {
        display: grid;
        min-height: 52px;
        place-items: center;
        gap: 3px;
        border: 0;
        border-radius: 12px;
        color: var(--ink-soft);
        background: transparent;
        font-size: 0.67rem;
    }

    body.tenant-mobile .tenant-mobile-tab i { font-size: 1.1rem; }
    body.tenant-mobile .tenant-mobile-tab.is-active { color: var(--primary-color); background: rgba(42, 168, 137, 0.14); font-weight: 700; }
    body.tenant-mobile .view-container { padding: 18px 16px calc(94px + env(safe-area-inset-bottom, 0px)); overflow: visible; }
    body.tenant-mobile .tenant-stat-grid { display: none; }
    body.tenant-mobile .tenant-dashboard { gap: 16px; }
    body.tenant-mobile .tenant-dashboard-grid { grid-template-columns: 1fr; gap: 14px; }
    body.tenant-mobile .tenant-rent-hero { padding: 20px; }
    body.tenant-mobile .tenant-rent-hero-head h3 { font-size: 1.2rem; }
    body.tenant-mobile .tenant-quick-actions { grid-template-columns: 1fr; }
    body.tenant-mobile .tenant-quick-action { min-height: 64px; display: flex; align-items: center; gap: 12px; text-align: left; }
    body.tenant-mobile .tenant-quick-action i { display: inline; margin: 0; }
    body.tenant-mobile .tenant-payments-layout,
    body.tenant-mobile .content-grid { grid-template-columns: 1fr; }
    body.tenant-mobile .panel { height: auto; }

    body.owner-mobile .sidebar,
    body.owner-mobile .sidebar-overlay,
    body.owner-mobile .main-header,
    body.owner-mobile .global-search-panel {
        display: none;
    }

    body.owner-mobile .owner-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 72px;
        padding: max(14px, env(safe-area-inset-top, 0px)) 18px 14px;
        border-bottom: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.95);
    }

    body.theme-dark.owner-mobile .owner-mobile-header {
        background: rgba(10, 26, 32, 0.96);
    }

    body.owner-mobile .owner-mobile-identity {
        display: flex;
        align-items: center;
        gap: 10px;
        border: 0;
        padding: 0;
        color: var(--ink);
        background: transparent;
        text-align: left;
    }

    body.owner-mobile .owner-mobile-avatar {
        display: grid;
        width: 42px;
        height: 42px;
        place-items: center;
        border-radius: 50%;
        color: #ffffff;
        background: linear-gradient(135deg, #2aa889, #0f5260);
        font-weight: 700;
    }

    body.owner-mobile .owner-mobile-greeting {
        display: block;
        color: var(--ink-soft);
        font-size: 0.75rem;
    }

    body.owner-mobile #owner-mobile-name {
        display: block;
        max-width: 190px;
        overflow: hidden;
        font-size: 0.95rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.owner-mobile .owner-mobile-notifications {
        position: relative;
        display: grid;
        width: 44px;
        height: 44px;
        place-items: center;
        border: 0;
        border-radius: 50%;
        color: var(--primary-color);
        background: var(--surface-alt);
        font-size: 1.15rem;
    }

    body.owner-mobile .owner-mobile-tabbar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 120;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        min-height: 66px;
        padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -10px 28px rgba(15, 74, 86, 0.1);
    }

    body.theme-dark.owner-mobile .owner-mobile-tabbar {
        background: rgba(10, 26, 32, 0.98);
        box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.25);
    }

    body.owner-mobile .owner-mobile-tab {
        display: grid;
        min-height: 52px;
        place-items: center;
        gap: 3px;
        border: 0;
        border-radius: 12px;
        color: var(--ink-soft);
        background: transparent;
        font-size: 0.67rem;
    }

    body.owner-mobile .owner-mobile-tab i { font-size: 1.1rem; }
    body.owner-mobile .owner-mobile-tab.is-active { color: var(--primary-color); background: rgba(42, 168, 137, 0.14); font-weight: 700; }
    body.owner-mobile .view-container { padding: 18px 16px calc(94px + env(safe-area-inset-bottom, 0px)); overflow: visible; }
    body.owner-mobile .content-grid,
    body.owner-mobile .stat-grid { grid-template-columns: 1fr; }
    body.owner-mobile .panel { height: auto; }
}

.tenant-stat-grid .stat-card {
    background: linear-gradient(145deg, rgba(15, 82, 96, 0.08), rgba(42, 168, 137, 0.12));
    border: 1px solid rgba(15, 82, 96, 0.18);
    box-shadow: 0 14px 28px rgba(15, 82, 96, 0.12);
}

.tenant-dashboard-grid .panel {
    border-radius: 16px;
}

.tenant-info-panel {
    background: linear-gradient(160deg, #f2fbf8, #ffffff);
    border: 1px solid rgba(42, 168, 137, 0.2);
    box-shadow: 0 16px 34px rgba(15, 82, 96, 0.12);
}

.tenant-info-panel h5 {
    color: var(--primary-color);
}

.tenant-info-panel .panel-list {
    gap: 10px;
}

.tenant-info-panel .tenant-lease-card {
    background: #ffffff;
    border: 1px solid rgba(15, 82, 96, 0.12);
    box-shadow: 0 10px 20px rgba(15, 82, 96, 0.08);
}

.tenant-info-panel .tenant-lease-card.success {
    border-left: 4px solid var(--success-color);
}

.tenant-info-panel .tenant-lease-card.warning {
    border-left: 4px solid var(--warning-color);
}

.tenant-info-panel .tenant-lease-card.info {
    border-left: 4px solid var(--info-color);
}

.tenant-info-panel .tenant-lease-card.danger {
    border-left: 4px solid var(--danger-color);
}

.tenant-info-panel .status-pill {
    font-size: 0.7rem;
    letter-spacing: 0.01em;
}

.tenant-lease-card .status-pill.icon-only {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tenant-lease-card .status-pill.icon-only .bi {
    font-size: 1rem;
}

.tenant-payment-panel {
    background: linear-gradient(160deg, #ffffff, #f5f9fb);
    border: 1px solid rgba(15, 82, 96, 0.16);
}

.tenant-actions-panel {
    background: linear-gradient(160deg, #f8fbfa, #ffffff);
    border: 1px dashed rgba(15, 82, 96, 0.22);
}

body.theme-dark .tenant-stat-grid .stat-card {
    background: linear-gradient(145deg, rgba(28, 40, 45, 0.9), rgba(22, 30, 35, 0.9));
    border-color: rgba(42, 168, 137, 0.35);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

body.theme-dark .tenant-info-panel {
    background: linear-gradient(160deg, rgba(18, 26, 30, 0.95), rgba(14, 20, 24, 0.95));
    border-color: rgba(42, 168, 137, 0.35);
}

body.theme-dark .tenant-info-panel h5 {
    color: #e4f1ee;
}

body.theme-dark .tenant-info-panel .tenant-lease-card {
    background: rgba(10, 16, 20, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

body.theme-dark .tenant-payment-panel {
    background: linear-gradient(160deg, rgba(16, 22, 26, 0.95), rgba(12, 18, 22, 0.95));
    border-color: rgba(42, 168, 137, 0.28);
}

body.theme-dark .tenant-actions-panel {
    background: linear-gradient(160deg, rgba(14, 20, 24, 0.95), rgba(10, 16, 20, 0.95));
    border-color: rgba(255, 255, 255, 0.15);
}

#ai-forecast-filters {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px;
    margin-bottom: 0;
}

#ai-forecast-filters .form-group {
    gap: 2px;
}

#ai-forecast-filters label {
    font-size: 0.8rem;
    line-height: 1.1;
}

#ai-forecast-filters .text-muted.small {
    display: none;
}

#ai-forecast-filters .form-actions {
    justify-content: flex-start;
    align-items: flex-end;
}

.forecast-block {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.forecast-block .panel-list {
    max-height: 48vh;
}

.ai-forecast {
    display: grid;
    gap: 18px;
}

.ai-hero {
    background: linear-gradient(135deg, #0f5260 0%, #0f5260 40%, #2aa889 100%);
    color: #ffffff;
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 16px 40px rgba(15, 82, 96, 0.18);
}

.ai-hero-grid {
    display: grid;
    grid-template-columns: minmax(200px, 1.2fr) minmax(220px, 1fr);
    gap: 16px;
    align-items: center;
}

.ai-hero-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.ai-hero-subtitle {
    margin-top: 4px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.ai-hero-note {
    margin-top: 8px;
    font-size: 0.8rem;
    opacity: 0.75;
}

.ai-hero-actions {
    display: grid;
    gap: 10px;
}

.ai-hero .form-control,
.ai-hero .form-select {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.ai-hero .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.ai-hero .form-select option {
    color: #0b2c36;
}

.ai-hero .form-actions {
    justify-content: flex-end;
}

.ai-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.15);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.ai-kpi-grid .stat-card {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: none;
}

.ai-kpi-grid .stat-icon {
    filter: saturate(1.1);
}

.ai-signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.ai-signal-panel h5 {
    margin-bottom: 8px;
}

.ai-signal-list {
    display: grid;
    gap: 10px;
}

.ai-signal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background-color: var(--surface-alt);
    font-size: 0.88rem;
}

.ai-signal-item.warning {
    border-color: rgba(242, 182, 54, 0.35);
    background-color: rgba(242, 182, 54, 0.12);
}

.ai-signal-item.success {
    border-color: rgba(30, 166, 114, 0.35);
    background-color: rgba(30, 166, 114, 0.12);
}

.ai-signal-item.info {
    border-color: rgba(45, 143, 161, 0.35);
    background-color: rgba(45, 143, 161, 0.1);
}

.ai-signal-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.ai-forecast-grid .panel h5 {
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .ai-hero-grid {
        grid-template-columns: 1fr;
    }
    .ai-hero .form-actions {
        justify-content: flex-start;
    }
}

.panel.panel-highlight {
    box-shadow: 0 0 0 3px rgba(42, 168, 137, 0.25);
}

.panel h5 {
    font-weight: 600;
    margin-bottom: 16px;
}

.panel-list {
    display: grid;
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
    overflow-x: hidden;
    min-width: 0;
    content-visibility: auto;
    contain: content;
}

.permissions-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #ffffff;
}

.permissions-table th,
.permissions-table td {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    vertical-align: top;
}

.permissions-table .permission-cell {
    min-width: 240px;
}

.permissions-table .permission-label {
    font-weight: 600;
    color: var(--ink);
}

.permissions-table .text-muted.small {
    font-size: 0.75rem;
}

.permissions-table thead th {
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.08), rgba(42, 168, 137, 0.12));
    color: var(--ink);
    font-weight: 600;
    border-bottom: 1px solid rgba(15, 82, 96, 0.18);
}

.permissions-table th:first-child,
.permissions-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: 6px 0 12px rgba(11, 44, 54, 0.06);
}

.permissions-table thead th:first-child {
    z-index: 3;
}

.permissions-table tbody tr:nth-child(even) td {
    background: rgba(15, 82, 96, 0.02);
}

.permissions-table tbody tr:hover td {
    background: rgba(42, 168, 137, 0.08);
}

.permissions-table .permission-toggle {
    accent-color: var(--secondary-color);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permissions-table .permission-toggle:focus-visible {
    outline: 2px solid rgba(42, 168, 137, 0.5);
    outline-offset: 2px;
    border-radius: 6px;
}

.list-footer {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.list-panel .panel-list {
    max-height: 68vh;
}

.panel-item {
    padding: 12px;
    border-radius: 10px;
    background-color: var(--surface-alt);
    border: 1px solid rgba(15, 82, 96, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.report-preview-document {
    display: grid;
    gap: 8px;
}

.report-file-preview {
    width: 100%;
    min-height: 420px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    border-radius: 10px;
    background: #ffffff;
}

.report-image-preview {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    border: 1px solid rgba(15, 82, 96, 0.12);
    border-radius: 10px;
    background: #ffffff;
}

.report-preview-actions {
    justify-content: flex-end;
}

.backup-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notification-item {
    align-items: flex-start;
}

.maintenance-item {
    align-items: flex-start;
}

.maintenance-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.maintenance-actions .btn {
    white-space: nowrap;
}

.status-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.panel-item.clickable {
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.panel-item.clickable:hover {
    background-color: rgba(42, 168, 137, 0.12);
    border-color: rgba(42, 168, 137, 0.35);
    transform: translateY(-1px);
}

button.panel-item {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background-color: var(--surface-alt);
}

button.panel-item:focus-visible {
    outline: 3px solid rgba(42, 168, 137, 0.35);
    outline-offset: 2px;
}

button.panel-item .bi {
    font-size: 1.1rem;
    color: #94a3b8;
}

.user-item.active {
    background-color: rgba(42, 168, 137, 0.12);
    border-color: rgba(42, 168, 137, 0.4);
}

.booking-request-item.active {
    background-color: rgba(42, 168, 137, 0.12);
    border-color: rgba(42, 168, 137, 0.4);
}

.lead-item.active {
    background-color: rgba(42, 168, 137, 0.12);
    border-color: rgba(42, 168, 137, 0.4);
}

.document-item a {
    white-space: nowrap;
}

.document-format-section {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background: rgba(255, 255, 255, 0.64);
    display: grid;
    gap: 12px;
}

.document-format-section + .document-format-section {
    margin-top: 12px;
}

.document-format-section.pdf {
    border-color: rgba(231, 76, 60, 0.2);
    box-shadow: inset 0 0 0 1px rgba(231, 76, 60, 0.04);
}

.document-format-section.image {
    border-color: rgba(46, 204, 113, 0.2);
    box-shadow: inset 0 0 0 1px rgba(46, 204, 113, 0.04);
}

.document-format-section.video {
    border-color: rgba(155, 89, 182, 0.2);
    box-shadow: inset 0 0 0 1px rgba(155, 89, 182, 0.04);
}

.document-format-section.office {
    border-color: rgba(52, 152, 219, 0.2);
    box-shadow: inset 0 0 0 1px rgba(52, 152, 219, 0.04);
}

.document-format-section.archive {
    border-color: rgba(241, 196, 15, 0.22);
    box-shadow: inset 0 0 0 1px rgba(241, 196, 15, 0.04);
}

.document-format-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.document-format-copy {
    min-width: 0;
}

.document-format-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--ink);
}

.document-format-title .bi {
    color: var(--secondary-color);
}

.document-format-hint {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.document-format-list {
    display: grid;
    gap: 10px;
}

.document-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background: rgba(255, 255, 255, 0.92);
}

.document-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 82, 96, 0.08);
    color: var(--secondary-color);
    font-size: 1.1rem;
    flex: 0 0 auto;
}

.document-item-icon-pdf {
    background: rgba(231, 76, 60, 0.12);
    color: #c0392b;
}

.document-item-icon-image {
    background: rgba(46, 204, 113, 0.12);
    color: #1e9b57;
}

.document-item-icon-video {
    background: rgba(155, 89, 182, 0.12);
    color: #7d3cb0;
}

.document-item-icon-office {
    background: rgba(52, 152, 219, 0.12);
    color: #2471a3;
}

.document-item-icon-archive {
    background: rgba(241, 196, 15, 0.14);
    color: #b9770e;
}

.document-item-body {
    min-width: 0;
}

.document-item-title {
    font-weight: 700;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.document-item-meta {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.document-item-badge {
    display: flex;
    justify-content: flex-end;
}

.document-item .status-pill {
    max-width: none;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.audit-list .panel-item {
    padding: 10px;
    font-size: 0.88rem;
}

.audit-list .fw-semibold {
    font-size: 0.95rem;
}

.audit-list .status-pill {
    font-size: 0.7rem;
    padding: 3px 8px;
}

.status-pill.success {
    background-color: rgba(30, 166, 114, 0.15);
    color: #0f6c4e;
}

.status-pill.warning {
    background-color: rgba(242, 182, 54, 0.18);
    color: #8a5a12;
}

.status-pill.info {
    background-color: rgba(45, 143, 161, 0.15);
    color: #0f5260;
}

.status-pill.danger {
    background-color: rgba(217, 72, 72, 0.18);
    color: #9f2a2a;
}

.status-pill.pdf {
    background-color: rgba(231, 76, 60, 0.15);
    color: #b3392a;
}

.status-pill.image {
    background-color: rgba(46, 204, 113, 0.15);
    color: #1e8449;
}

.status-pill.video {
    background-color: rgba(155, 89, 182, 0.15);
    color: #7d3cb0;
}

.status-pill.office {
    background-color: rgba(52, 152, 219, 0.15);
    color: #2471a3;
}

.status-pill.archive {
    background-color: rgba(241, 196, 15, 0.18);
    color: #8a5a00;
}

.status-pill.other {
    background-color: rgba(94, 109, 132, 0.14);
    color: #4b5563;
}

#notifications-panel .status-pill {
    max-width: 140px;
}

#notifications-panel .notification-item,
#notifications-list .notification-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

#notifications-panel .notification-item .status-pill,
#notifications-list .notification-item .status-pill {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    align-self: flex-start;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    min-width: 0;
}

.form-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.form-grid.compact .form-actions {
    justify-content: flex-start;
}

.global-search-panel {
    padding: 16px 24px 0;
    display: none;
}

.global-search-panel.is-open {
    display: block;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-header h5 {
    margin: 0;
}

.result-group {
    margin-top: 14px;
}

.result-group h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5b6c75;
    margin-bottom: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.property-building-toggle,
.property-building-panel {
    grid-column: 1 / -1;
}

.property-building-panel {
    border: 1px solid rgba(15, 82, 96, 0.18);
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.06), rgba(42, 168, 137, 0.06));
}

.property-building-header {
    margin-bottom: 10px;
}

.property-building-hint {
    margin: 0;
    font-size: 0.8rem;
    color: #54707a;
}

.property-building-units {
    display: grid;
    gap: 10px;
}

.property-building-unit {
    border: 1px dashed rgba(15, 82, 96, 0.25);
    border-radius: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
}

.property-building-unit-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 10px;
}

.property-building-unit-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #2b4e59;
}

.property-building-actions {
    margin-top: 10px;
    justify-content: flex-start;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.form-message {
    grid-column: 1 / -1;
    min-height: 1.2rem;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.form-message.success {
    color: #15803d;
}

.form-message.error {
    color: #b91c1c;
}

.form-control.is-invalid,
.form-select.is-invalid,
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: rgba(217, 72, 72, 0.7);
    box-shadow: 0 0 0 3px rgba(217, 72, 72, 0.15);
}

.form-error {
    display: none;
    font-size: 0.75rem;
    color: #b91c1c;
}

.form-control.is-invalid ~ .form-error,
.form-select.is-invalid ~ .form-error {
    display: block;
}

.info-hint {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 6px;
    border: none;
    background: transparent;
    color: var(--info-color);
    cursor: pointer;
    padding: 0;
}

.info-hint i {
    font-size: 0.95rem;
}

.info-hint::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 135%;
    transform: translate(-50%, 4px);
    opacity: 0;
    pointer-events: none;
    padding: 8px 10px;
    border-radius: 10px;
    background: #0b2c36;
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1.3;
    width: max-content;
    max-width: 240px;
    white-space: normal;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
    z-index: 20;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.info-hint::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 118%;
    width: 8px;
    height: 8px;
    background: #0b2c36;
    transform: translateX(-50%) rotate(45deg);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 19;
}

.info-hint:hover::after,
.info-hint:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, -4px);
}

.info-hint:hover::before,
.info-hint:focus-visible::before {
    opacity: 1;
}

.info-hint:focus-visible {
    outline: 2px solid rgba(45, 143, 161, 0.4);
    outline-offset: 2px;
    border-radius: 999px;
}

.lease-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lease-form .form-section {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.2);
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.08), rgba(42, 168, 137, 0.08));
}

.lease-form .form-section-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.lease-form .form-hint {
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 6px;
}

.lease-form .form-actions {
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.lease-form .form-actions-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.finance-hero {
    align-items: center;
}

.finance-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.finance-period-select {
    min-width: 220px;
}

.finance-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.finance-stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.14);
    background: var(--surface-alt);
    min-width: 0;
    overflow: hidden;
}

.finance-stat-copy {
    min-width: 0;
}

.finance-stat-title {
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.finance-stat-value {
    margin-top: 8px;
    color: var(--ink);
    font-size: 1.4rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.finance-stat-subtitle {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.8rem;
}

.finance-stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #ffffff;
    font-size: 1.25rem;
}

.finance-stat-icon.success {
    background: linear-gradient(135deg, #27b36a, #1d8e53);
}

.finance-stat-icon.danger {
    background: linear-gradient(135deg, #ef6b5a, #d8433a);
}

.finance-stat-icon.info {
    background: linear-gradient(135deg, #4d8de8, #2f68c9);
}

.finance-stat-icon.purple {
    background: linear-gradient(135deg, #7e64d8, #5d48b0);
}

.finance-layout {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.finance-chart-panel,
.finance-ledger-panel,
.finance-statement-panel,
.finance-quick-panel {
    min-width: 0;
}

.finance-chart-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.finance-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.finance-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.finance-chart-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.finance-chart-legend .dot.payments {
    background: #48cb86;
}

.finance-chart-legend .dot.charges {
    background: #57a0ff;
}

.finance-chart-legend .dot.unpaid {
    background: #ef6b5a;
}

.finance-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.finance-chart-grid {
    stroke: rgba(15, 82, 96, 0.12);
    stroke-width: 1;
}

.finance-chart-axis-label {
    fill: var(--ink-soft);
    font-size: 10px;
}

.finance-chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.finance-chart-line.payments {
    stroke: #48cb86;
}

.finance-chart-line.charges {
    stroke: #57a0ff;
}

.finance-chart-line.unpaid {
    stroke: #ef6b5a;
}

.finance-chart-area {
    fill: rgba(72, 203, 134, 0.14);
}

.finance-chart-dot {
    stroke: #ffffff;
    stroke-width: 2;
}

.finance-chart-dot.payments {
    fill: #48cb86;
}

.finance-chart-point-label {
    fill: var(--ink);
    font-size: 9px;
    font-weight: 700;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 3px;
    pointer-events: none;
}

.finance-ledger {
    display: grid;
    gap: 8px;
}

.finance-ledger-head,
.finance-ledger-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1.6fr) 100px 150px 100px;
    gap: 12px;
    align-items: center;
}

.finance-ledger-head {
    padding: 0 12px 2px;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.finance-ledger-row {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background: var(--surface-alt);
}

.booking-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.booking-date-grid label {
    min-width: 0;
}

.booking-availability {
    min-height: 20px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
}

.booking-availability.is-info {
    background: rgba(15, 82, 96, 0.08);
    border-color: rgba(15, 82, 96, 0.14);
    color: var(--ink);
}

.booking-availability.is-success {
    background: rgba(42, 168, 137, 0.12);
    border-color: rgba(42, 168, 137, 0.24);
    color: #137a5e;
}

.booking-availability.is-warning {
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.24);
    color: #8a5a00;
}

.booking-availability.is-error {
    background: rgba(237, 87, 87, 0.12);
    border-color: rgba(237, 87, 87, 0.24);
    color: #a03636;
}

.finance-ledger-date {
    font-weight: 600;
    color: var(--ink);
}

.finance-ledger-description {
    min-width: 0;
}

.finance-ledger-title {
    font-weight: 700;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.finance-ledger-meta {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.finance-ledger-amount {
    font-weight: 700;
    color: var(--ink);
}

.finance-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background: rgba(15, 82, 96, 0.06);
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 600;
}

.finance-chip.success {
    background: rgba(42, 168, 137, 0.12);
    color: #2a8c64;
}

.finance-chip.warning {
    background: rgba(230, 170, 56, 0.14);
    color: #946000;
}

.finance-chip.danger {
    background: rgba(215, 74, 60, 0.14);
    color: #b23b31;
}

.finance-chip.info {
    background: rgba(87, 160, 255, 0.14);
    color: #2f68c9;
}

.finance-lower-grid {
    margin-top: 16px;
}

.finance-payment-toolbar {
    min-width: 280px;
    max-width: 420px;
    width: 100%;
}

.finance-payment-select {
    width: 100%;
}

.finance-statement-result {
    min-height: 0;
}

.maintenance-hero,
.booking-hero {
    align-items: center;
}

.maintenance-layout,
.booking-layout {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.95fr);
    align-items: start;
}

.maintenance-side,
.booking-side {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.maintenance-board,
.booking-board {
    min-width: 0;
}

.maintenance-list,
.booking-list {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.maintenance-card,
.booking-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: flex-start;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
}

.maintenance-card-main,
.booking-card-main {
    min-width: 0;
}

.maintenance-card-top,
.booking-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.maintenance-card-extra {
    margin-top: 8px;
}

.booking-card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.booking-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 82, 96, 0.06);
    border: 1px solid rgba(15, 82, 96, 0.12);
    color: var(--ink-soft);
    font-size: 0.74rem;
    font-weight: 600;
}

.booking-filter {
    min-width: 180px;
}

.booking-detail {
    display: grid;
    gap: 10px;
}

.booking-detail .panel-item {
    background: rgba(15, 82, 96, 0.04);
}

.maintenance-card.active,
.booking-card.active {
    background-color: rgba(42, 168, 137, 0.12);
    border-color: rgba(42, 168, 137, 0.38);
}

.maintenance-card .status-stack {
    align-items: flex-end;
}

.maintenance-card .maintenance-actions {
    align-items: flex-end;
}

.maintenance-card,
.booking-card {
    min-width: 0;
}

.maintenance-card .status-pill,
.booking-card .status-pill {
    align-self: flex-start;
}

.leases-hero {
    gap: 18px;
}

.lease-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.95fr);
    align-items: start;
}

.lease-board,
.lease-detail-panel,
.lease-documents-panel,
.lease-receipts-panel,
.lease-form-panel {
    min-width: 0;
}

.lease-board,
.lease-detail-panel,
.lease-documents-panel {
    scroll-margin-top: 18px;
}

.maintenance-board,
.maintenance-side > .panel,
.booking-board,
.booking-side > .panel {
    scroll-margin-top: 18px;
}

.lease-grid {
    display: grid;
    gap: 12px;
    max-height: 68vh;
    overflow: auto;
    padding-right: 4px;
}

.lease-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.14);
    background: var(--surface-alt);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.lease-card:hover,
.lease-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(42, 168, 137, 0.35);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    outline: none;
}

.lease-card.active {
    border-color: rgba(42, 168, 137, 0.45);
    background: linear-gradient(135deg, rgba(42, 168, 137, 0.12), rgba(15, 82, 96, 0.08));
}

.lease-card-avatar,
.lease-detail-avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.16), rgba(42, 168, 137, 0.16));
    color: var(--primary-color);
    font-weight: 700;
}

.lease-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.lease-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.lease-card-title,
.lease-detail-title {
    font-weight: 700;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.lease-card-subtitle,
.lease-detail-subtitle {
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.lease-card-rent {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
}

.lease-card-meta {
    color: var(--ink-soft);
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.lease-detail-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.lease-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.lease-detail-actions .btn {
    white-space: nowrap;
}

.lease-detail-avatar {
    width: 56px;
    height: 56px;
    font-size: 1rem;
}

.lease-detail-main {
    min-width: 0;
    flex: 1 1 auto;
}

.lease-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.lease-summary-item {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background: rgba(15, 82, 96, 0.04);
    min-width: 0;
}

.lease-notes {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background: rgba(15, 82, 96, 0.04);
}

.lease-document-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.12);
    background: rgba(15, 82, 96, 0.04);
}

.lease-document-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(42, 168, 137, 0.12);
    color: var(--secondary-color);
}

.lease-document-title {
    font-weight: 600;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.lease-document-meta {
    font-size: 0.76rem;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.lease-documents-list,
.lease-receipts-list {
    display: grid;
    gap: 10px;
}

.lease-form-panel {
    grid-column: span 2;
}

.property-photos,
.property-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.property-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(15, 82, 96, 0.18);
    background: #f1f7f6;
}

.property-photo.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #6b7b83;
    border-style: dashed;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
    align-items: start;
    min-width: 0;
}

.content-grid.dense {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
}

.content-grid.dense .panel.span-2 {
    grid-column: span 2;
}

.content-grid.dense .panel.tall {
    grid-row: span 2;
}

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(42, 168, 137, 0.18);
    background: linear-gradient(135deg, rgba(6, 18, 23, 0.98), rgba(8, 30, 37, 0.95));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.dashboard-kicker {
    margin: 0 0 6px;
    color: #58d1b1;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-hero h3 {
    margin: 0;
    color: #f2fffb;
    font-size: 1.3rem;
    font-weight: 700;
}

.dashboard-hero-text {
    margin: 8px 0 0;
    max-width: 68ch;
    color: #cfe3e8;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e6f5f0;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hero-pill .bi {
    color: #58d1b1;
}

.hero-pill:hover,
.hero-pill:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(88, 209, 177, 0.28);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

.panel-header-tight {
    align-items: flex-start;
    margin-bottom: 12px;
}

.panel-header-tight h5 {
    margin-bottom: 4px;
}

.property-board {
    min-width: 0;
}

.property-grid {
    display: grid;
    gap: 12px;
    max-height: 68vh;
    overflow: auto;
    padding-right: 4px;
}

.property-card {
    display: grid;
    grid-template-columns: minmax(168px, 172px) minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 82, 96, 0.14);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: none;
    min-width: 0;
}

.property-card-media {
    position: relative;
    min-height: 128px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.12), rgba(42, 168, 137, 0.12));
}

.property-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-card-media.empty {
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.16), rgba(42, 168, 137, 0.18));
}

.property-card-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 600;
}

.property-card-placeholder .bi {
    font-size: 2rem;
    color: var(--secondary-color);
}

.property-card-media .status-pill {
    position: absolute;
    top: 10px;
    right: 10px;
    max-width: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.property-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.property-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.property-card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.property-card-subtitle {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.property-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.property-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.property-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 82, 96, 0.06);
    border: 1px solid rgba(15, 82, 96, 0.12);
    color: var(--ink-soft);
    font-size: 0.75rem;
}

.property-card-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.property-status-control {
    min-width: 160px;
    flex: 1 1 180px;
}

.property-status-control .property-status {
    width: 100%;
    min-width: 0;
}

.property-card .property-actions {
    min-width: 0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.property-card .icon-button {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.property-card .icon-button .bi {
    font-size: 1rem;
}

.list-count {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.property-form-panel {
    min-width: 0;
}

.property-form-panel .form-hint {
    margin-top: -2px;
}

.property-form-panel .form-grid {
    margin-top: 2px;
}

.property-form-panel .form-actions {
    justify-content: flex-start;
}

.dashboard-availability-wrap {
    margin-top: 4px;
}

.availability-panel {
    min-width: 0;
}

.availability-filters {
    margin-top: 2px;
}

.availability-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 12px;
}

.availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.availability-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(15, 82, 96, 0.14);
    background: var(--surface-alt);
}

.availability-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.16), rgba(42, 168, 137, 0.12));
}

.availability-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.availability-card-media.empty {
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.18), rgba(42, 168, 137, 0.16));
}

.availability-card-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 600;
}

.availability-card-placeholder .bi {
    color: var(--secondary-color);
    font-size: 1.9rem;
}

.availability-card-media .status-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.availability-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 12px;
}

.availability-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.availability-card-subtitle {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.availability-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}

.availability-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.availability-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 82, 96, 0.06);
    border: 1px solid rgba(15, 82, 96, 0.12);
    color: var(--ink-soft);
    font-size: 0.75rem;
}

.availability-card-foot {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
}

.availability-card .btn {
    min-width: 96px;
}

.sale-status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed rgba(15, 82, 96, 0.3);
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.9);
}

.property-item {
    align-items: center;
}

.property-actions {
    min-width: 150px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
}

.lease-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(14px, 3vw, 28px) clamp(12px, 4vw, 24px);
    z-index: 1200;
    overflow-y: auto;
}

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

.modal-content {
    background: #ffffff;
    border-radius: 18px;
    width: min(720px, 100%);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h5 {
    margin: 0;
    font-weight: 600;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

@media (max-width: 960px) {
    .dashboard-hero {
        flex-direction: column;
    }

    .dashboard-hero-actions {
        justify-content: flex-start;
    }

    .property-card {
        grid-template-columns: 1fr;
    }

    .property-card-media {
        min-height: 180px;
    }

    .property-card-footer {
        align-items: flex-start;
    }

    .property-status-control,
    .property-card .property-actions {
        width: 100%;
    }

    .property-card .property-actions {
        justify-content: flex-start;
    }

    .availability-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .availability-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .modal-content {
        border-radius: 14px;
        max-height: calc(100dvh - 24px);
    }

    .modal-body {
        padding: 16px;
    }
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.conversation-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
    gap: 16px;
    min-width: 0;
}

.conversation-list {
    display: grid;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
    overflow-x: hidden;
}

.conversation-item {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    overflow-wrap: anywhere;
}

.conversation-item:hover {
    border-color: rgba(42, 168, 137, 0.4);
    background: rgba(42, 168, 137, 0.12);
}

.conversation-item.active {
    border-color: #2aa889;
    background: rgba(42, 168, 137, 0.18);
}

.conversation-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
}

.message-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
    margin-bottom: 16px;
    padding-right: 4px;
    overflow-x: hidden;
}

.conversation-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 82, 96, 0.12);
    color: #0f5260;
    font-size: 0.72rem;
    font-weight: 600;
}

.message-bubble {
    padding: 10px 12px;
    border-radius: 12px;
    background: #eef6f4;
    border: 1px solid rgba(15, 82, 96, 0.12);
    border-left: 4px solid rgba(15, 82, 96, 0.35);
    color: #0f172a;
    max-width: 80%;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.message-bubble.me {
    background: linear-gradient(135deg, #0f5260, #2aa889);
    border: none;
    color: #ffffff;
    align-self: flex-end;
}

.message-meta {
    margin-top: 6px;
    font-size: 0.72rem;
    color: rgba(15, 23, 42, 0.6);
}

.message-bubble.me .message-meta {
    color: rgba(255, 255, 255, 0.7);
}

.message-bubble.me .meta-chip {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.maintenance-item.is-focused {
    border: 1px solid rgba(42, 168, 137, 0.6);
    box-shadow: 0 0 0 3px rgba(42, 168, 137, 0.2);
}

.message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.message-attachment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(15, 82, 96, 0.2);
    background: rgba(15, 82, 96, 0.08);
    color: inherit;
    text-decoration: none;
    max-width: 220px;
}

.message-attachment span {
    font-size: 0.75rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-attachment.image {
    padding: 0;
    border: none;
    background: transparent;
}

.message-attachment.image img {
    display: block;
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(15, 82, 96, 0.25);
}

.message-bubble.me .message-attachment {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        width: min(82vw, 320px);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        z-index: 100;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .sidebar-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .user-block {
        margin-top: 0;
    }

    .sidebar-nav {
        padding: 12px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .nav-list {
        display: block;
    }

    .sidebar-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .content-grid.dense {
        grid-template-columns: 1fr;
    }

    .content-grid.dense .panel.span-2,
    .content-grid.dense .panel.tall {
        grid-column: auto;
        grid-row: auto;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        padding-right: 70px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .sidebar-toggle {
        position: absolute;
        right: 20px;
        top: 20px;
    }

    .header-actions .search-box {
        order: 1;
        flex: 1 1 100%;
    }

    .header-actions .header-dropdown {
        order: 2;
    }

    .search-box input {
        width: 100%;
    }

    .conversation-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 16px 18px;
        gap: 14px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-box {
        flex: 1 1 100%;
    }

    .icon-button,
    .avatar.avatar-small {
        flex: 0 0 auto;
    }

    .dropdown-panel {
        right: 0;
        left: auto;
        width: min(92vw, 340px);
    }

    .view-container {
        padding: 18px;
    }

    .stat-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .panel-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-item .status-pill {
        margin-top: 8px;
    }

    .status-stack {
        align-items: flex-start;
    }

    .property-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .maintenance-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .maintenance-actions .btn {
        white-space: normal;
    }

    .lease-actions {
        flex-wrap: wrap;
    }

    .lease-layout {
        grid-template-columns: 1fr;
    }

    .lease-form-panel {
        grid-column: span 1;
    }

    .lease-card {
        grid-template-columns: 1fr;
    }

    .lease-card-avatar {
        margin-bottom: 2px;
    }

    .lease-detail-head {
        align-items: flex-start;
    }

    .lease-document-item {
        grid-template-columns: 1fr;
    }

    .maintenance-layout,
    .booking-layout {
        grid-template-columns: 1fr;
    }

    .maintenance-card,
    .booking-card {
        grid-template-columns: 1fr;
    }

    .maintenance-card-top,
    .booking-card-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .booking-filter {
        width: 100%;
        min-width: 0;
    }

    .booking-card-foot {
        width: 100%;
    }

    .booking-date-grid {
        grid-template-columns: 1fr;
    }

    .document-item {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .document-item-badge {
        justify-content: flex-start;
    }

    .document-item a {
        grid-column: 2;
        justify-self: start;
    }

    .finance-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-ledger-head {
        display: none;
    }

    .finance-ledger-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .finance-ledger-row > * {
        width: 100%;
    }

    .finance-toolbar {
        width: 100%;
        justify-content: flex-start;
    }

    .finance-period-select {
        flex: 1 1 100%;
        min-width: 0;
    }

}

@media (max-width: 576px) {
    .sidebar-header {
        padding: 18px 16px;
    }

    .nav-list {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .main-header {
        padding: 14px 16px;
    }

    .view-container {
        padding: 16px;
    }

    .panel {
        padding: 16px;
    }

    .panel-list {
        max-height: 50vh;
    }

}

@media (prefers-color-scheme: dark) {
    body:not(.theme-light):not(.theme-dark) {
        background: radial-gradient(1200px circle at 12% 12%, #0b242b 0%, #07161b 45%, #061114 100%);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .app-shell {
        background: #061114;
    }

    body:not(.theme-light):not(.theme-dark) .card,
    body:not(.theme-light):not(.theme-dark) .panel,
    body:not(.theme-light):not(.theme-dark) .stat-card,
    body:not(.theme-light):not(.theme-dark) .modal-content {
        background-color: #0d1f26;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    }

    body:not(.theme-light):not(.theme-dark) .main-header {
        background-color: rgba(10, 26, 32, 0.92);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    body:not(.theme-light):not(.theme-dark) .main-header h2,
    body:not(.theme-light):not(.theme-dark) .stat-card h4,
    body:not(.theme-light):not(.theme-dark) .panel h5 {
        color: #f2fffb;
    }

    body:not(.theme-light):not(.theme-dark) .text-muted {
        color: #9bb6be !important;
    }

    body:not(.theme-light):not(.theme-dark) .text-primary {
        color: #58d1b1 !important;
    }

    body:not(.theme-light):not(.theme-dark) .card-title {
        color: #f2fffb;
    }

    body:not(.theme-light):not(.theme-dark) .search-box input {
        background-color: #0b1b21;
        border-color: rgba(255, 255, 255, 0.12);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .form-control,
    body:not(.theme-light):not(.theme-dark) .form-select {
        background-color: #0b1b21;
        border-color: rgba(255, 255, 255, 0.12);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .form-control::placeholder {
        color: #9bb6be;
    }

    body:not(.theme-light):not(.theme-dark) .form-label {
        color: #cfe3e8;
    }

    body:not(.theme-light):not(.theme-dark) .property-photo {
        border-color: rgba(255, 255, 255, 0.12);
        background: #0b1b21;
    }

    body:not(.theme-light):not(.theme-dark) .property-photo.empty {
        color: #9bb6be;
    }

    body:not(.theme-light):not(.theme-dark) .result-group h6 {
        color: #9bb6be;
    }

    body:not(.theme-light):not(.theme-dark) .icon-button {
        background-color: rgba(255, 255, 255, 0.06);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .btn-light {
        background-color: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .btn-outline-primary {
        color: #e6f5f0;
        border-color: rgba(255, 255, 255, 0.2);
    }

    body:not(.theme-light):not(.theme-dark) .btn-outline-primary:hover {
        background: rgba(42, 168, 137, 0.18);
        border-color: rgba(42, 168, 137, 0.5);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .btn-outline-secondary {
        color: #e6f5f0;
        border-color: rgba(255, 255, 255, 0.2);
    }

    body:not(.theme-light):not(.theme-dark) .btn-outline-secondary:hover {
        background: rgba(42, 168, 137, 0.18);
        border-color: rgba(42, 168, 137, 0.5);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .btn-outline-light {
        border-color: rgba(255, 255, 255, 0.35);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .panel-item,
    body:not(.theme-light):not(.theme-dark) button.panel-item,
    body:not(.theme-light):not(.theme-dark) .conversation-item,
    body:not(.theme-light):not(.theme-dark) .message-bubble,
    body:not(.theme-light):not(.theme-dark) .list-group-item {
        background-color: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.1);
        color: #dfecea;
    }

    body:not(.theme-light):not(.theme-dark) .conversation-item:hover,
    body:not(.theme-light):not(.theme-dark) .panel-item.clickable:hover {
        background-color: rgba(42, 168, 137, 0.18);
        border-color: rgba(42, 168, 137, 0.4);
    }

body:not(.theme-light):not(.theme-dark) .conversation-item.active {
    background-color: rgba(42, 168, 137, 0.24);
    border-color: rgba(42, 168, 137, 0.55);
}

body:not(.theme-light):not(.theme-dark) .message-bubble {
    background-color: rgba(15, 82, 96, 0.18);
    border-color: rgba(42, 168, 137, 0.2);
    border-left-color: rgba(42, 168, 137, 0.55);
    color: #e6f5f0;
}

body:not(.theme-light):not(.theme-dark) .message-bubble.me {
    border: none;
    color: #ffffff;
}

body:not(.theme-light):not(.theme-dark) .message-meta {
    color: rgba(230, 245, 240, 0.7);
}

    body:not(.theme-light):not(.theme-dark) .dropdown-panel {
        background: #0d1f26;
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    }

    body:not(.theme-light):not(.theme-dark) .dropdown-item {
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) .dropdown-item:hover,
    body:not(.theme-light):not(.theme-dark) .dropdown-item:focus {
        background: rgba(42, 168, 137, 0.18);
    }

    body:not(.theme-light):not(.theme-dark) .dropdown-panel .panel-item {
        background-color: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.1);
        color: #dfecea;
    }

    body:not(.theme-light):not(.theme-dark) #notifications-panel {
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
    }

    body:not(.theme-light):not(.theme-dark) #notifications-panel .dropdown-header span {
        color: #f2fffb;
    }

    body:not(.theme-light):not(.theme-dark) #notifications-panel .notification-item {
        background: rgba(255, 255, 255, 0.03);
        border-color: rgba(255, 255, 255, 0.12);
        color: #e6f5f0;
    }

    body:not(.theme-light):not(.theme-dark) #notifications-panel .notification-item .text-muted {
        color: #9bb6be;
    }

    body:not(.theme-light):not(.theme-dark) .empty-state {
        background-color: rgba(13, 31, 38, 0.9);
        border-color: rgba(255, 255, 255, 0.12);
        color: #dfecea;
    }
}

body.theme-dark {
    background: radial-gradient(1200px circle at 12% 12%, #0b242b 0%, #07161b 45%, #061114 100%);
    color: #e6f5f0;
}

body.theme-dark .app-shell {
    background: #061114;
}

body.theme-dark .card,
body.theme-dark .panel,
body.theme-dark .stat-card,
body.theme-dark .modal-content {
    background-color: #0d1f26;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

body.theme-dark .main-header {
    background-color: rgba(10, 26, 32, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .main-header h2,
body.theme-dark .stat-card h4,
body.theme-dark .panel h5 {
    color: #f2fffb;
}

body.theme-dark .text-muted {
    color: #9bb6be !important;
}

body.theme-dark .login-demo-card {
    border-color: rgba(73, 204, 164, 0.34);
    background: rgba(42, 168, 137, 0.12);
}

body.theme-dark .login-demo-card p:first-child {
    color: #d8fff2;
}

body.theme-dark .permissions-table {
    color: #e6f5f0;
    background: rgba(7, 20, 25, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .permissions-table .permission-label {
    color: #f2fffb;
}

body.theme-dark .permissions-table .text-muted.small {
    color: #9bb6be;
}

body.theme-dark .permissions-table th {
    background: linear-gradient(135deg, rgba(42, 168, 137, 0.2), rgba(15, 82, 96, 0.3));
    color: #f2fffb;
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .permissions-table td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .permissions-table th:first-child,
body.theme-dark .permissions-table td:first-child {
    background: rgba(7, 20, 25, 0.95);
    box-shadow: 6px 0 12px rgba(0, 0, 0, 0.3);
}

body.theme-dark .permissions-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
}

body.theme-dark .permissions-table tbody tr:hover td {
    background: rgba(42, 168, 137, 0.15);
}

body.theme-dark .text-primary {
    color: #58d1b1 !important;
}

body.theme-dark .card-title {
    color: #f2fffb;
}

body.theme-dark .dashboard-hero {
    background: linear-gradient(135deg, rgba(6, 18, 23, 0.98), rgba(9, 31, 39, 0.96));
    border-color: rgba(88, 209, 177, 0.2);
}

body.theme-dark .dashboard-hero h3,
body.theme-dark .property-card-title {
    color: #f2fffb;
}

body.theme-dark .dashboard-hero-text,
body.theme-dark .property-card-subtitle,
body.theme-dark .list-count {
    color: #9bb6be;
}

body.theme-dark .hero-pill {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e6f5f0;
}

body.theme-dark .hero-pill .bi {
    color: #58d1b1;
}

body.theme-dark .hero-pill:hover,
body.theme-dark .hero-pill:focus-visible {
    border-color: rgba(88, 209, 177, 0.36);
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .property-card {
    background: rgba(13, 31, 38, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .property-card-media {
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.24), rgba(42, 168, 137, 0.18));
}

body.theme-dark .property-card-media.empty {
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.22), rgba(42, 168, 137, 0.14));
}

body.theme-dark .property-card-placeholder {
    color: #9bb6be;
}

body.theme-dark .property-card-placeholder .bi {
    color: #58d1b1;
}

body.theme-dark .property-card-price {
    color: #f2fffb;
}

body.theme-dark .property-card-meta span {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cfe3e8;
}

body.theme-dark .property-status-control .property-status {
    background-color: #0b1b21;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e6f5f0;
}

body.theme-dark .finance-hero {
    background: linear-gradient(135deg, rgba(6, 18, 23, 0.98), rgba(8, 30, 37, 0.95));
    border-color: rgba(42, 168, 137, 0.18);
}

body.theme-dark .finance-stat-card,
body.theme-dark .finance-ledger-row {
    background: rgba(13, 31, 38, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .finance-stat-title,
body.theme-dark .finance-stat-subtitle,
body.theme-dark .finance-ledger-meta,
body.theme-dark .finance-ledger-head,
body.theme-dark .finance-chart-axis-label {
    color: #9bb6be;
}

body.theme-dark .finance-stat-value,
body.theme-dark .finance-ledger-date,
body.theme-dark .finance-ledger-title,
body.theme-dark .finance-ledger-amount {
    color: #f2fffb;
}

body.theme-dark .finance-chart-grid {
    stroke: rgba(255, 255, 255, 0.08);
}

body.theme-dark .finance-chart-point-label {
    fill: #f2fffb;
    stroke: rgba(6, 18, 23, 0.9);
}

body.theme-dark .finance-chart-area {
    fill: rgba(72, 203, 134, 0.16);
}

body.theme-dark .finance-chip {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cfe3e8;
}

body.theme-dark .booking-availability.is-info {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #d7e6ea;
}

body.theme-dark .booking-availability.is-success {
    background: rgba(72, 203, 134, 0.12);
    border-color: rgba(72, 203, 134, 0.2);
    color: #8ff0bf;
}

body.theme-dark .booking-availability.is-warning {
    background: rgba(245, 166, 35, 0.12);
    border-color: rgba(245, 166, 35, 0.22);
    color: #ffd98b;
}

body.theme-dark .booking-availability.is-error {
    background: rgba(237, 87, 87, 0.12);
    border-color: rgba(237, 87, 87, 0.22);
    color: #ffb0b0;
}

body.theme-dark .document-format-section {
    background: rgba(13, 31, 38, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .document-format-title,
body.theme-dark .document-item-title {
    color: #f2fffb;
}

body.theme-dark .document-format-hint,
body.theme-dark .document-item-meta {
    color: #9bb6be;
}

body.theme-dark .document-item {
    background: rgba(9, 22, 28, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .document-item-icon {
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .finance-chip.success {
    background: rgba(42, 168, 137, 0.14);
    color: #7ff0bc;
}

body.theme-dark .finance-chip.warning {
    background: rgba(230, 170, 56, 0.14);
    color: #ffd27a;
}

body.theme-dark .finance-chip.danger {
    background: rgba(215, 74, 60, 0.16);
    color: #ff9a92;
}

body.theme-dark .finance-chip.info {
    background: rgba(87, 160, 255, 0.16);
    color: #9fc2ff;
}

body.theme-dark .maintenance-hero,
body.theme-dark .booking-hero {
    background: linear-gradient(135deg, rgba(6, 18, 23, 0.98), rgba(8, 30, 37, 0.95));
    border-color: rgba(42, 168, 137, 0.18);
}

body.theme-dark .maintenance-card,
body.theme-dark .booking-card,
body.theme-dark .booking-detail .panel-item {
    background: rgba(13, 31, 38, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .booking-chip {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cfe3e8;
}

body.theme-dark .maintenance-card.active,
body.theme-dark .booking-card.active {
    background: rgba(42, 168, 137, 0.14);
    border-color: rgba(88, 209, 177, 0.34);
}

body.theme-dark .maintenance-card .text-muted.small,
body.theme-dark .booking-card .text-muted.small {
    color: #9bb6be;
}

body.theme-dark .maintenance-card .status-pill.success,
body.theme-dark .booking-card .status-pill.success {
    background: rgba(42, 168, 137, 0.16);
    color: #7ff0bc;
}

body.theme-dark .maintenance-card .status-pill.warning,
body.theme-dark .booking-card .status-pill.warning {
    background: rgba(230, 170, 56, 0.16);
    color: #ffd27a;
}

body.theme-dark .maintenance-card .status-pill.info,
body.theme-dark .booking-card .status-pill.info {
    background: rgba(87, 160, 255, 0.16);
    color: #9fc2ff;
}

body.theme-dark .status-pill.pdf {
    background-color: rgba(231, 76, 60, 0.18);
    color: #ffb0b0;
}

body.theme-dark .status-pill.image {
    background-color: rgba(46, 204, 113, 0.18);
    color: #b6f5d0;
}

body.theme-dark .status-pill.video {
    background-color: rgba(155, 89, 182, 0.18);
    color: #e1c0f0;
}

body.theme-dark .status-pill.office {
    background-color: rgba(52, 152, 219, 0.18);
    color: #cbe7fb;
}

body.theme-dark .status-pill.archive {
    background-color: rgba(241, 196, 15, 0.18);
    color: #ffe8a1;
}

body.theme-dark .status-pill.other {
    background-color: rgba(94, 109, 132, 0.18);
    color: #c6d0db;
}

body.theme-dark .maintenance-card .maintenance-actions .btn,
body.theme-dark .booking-card .btn,
body.theme-dark .booking-filter .form-select {
    border-color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .availability-card {
    background: rgba(13, 31, 38, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .availability-card-media {
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.22), rgba(42, 168, 137, 0.16));
}

body.theme-dark .availability-card-media.empty {
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.2), rgba(42, 168, 137, 0.12));
}

body.theme-dark .availability-card-placeholder {
    color: #9bb6be;
}

body.theme-dark .availability-card-placeholder .bi {
    color: #58d1b1;
}

body.theme-dark .availability-card-title,
body.theme-dark .availability-card-price {
    color: #f2fffb;
}

body.theme-dark .availability-card-subtitle {
    color: #9bb6be;
}

body.theme-dark .availability-card-meta span {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #cfe3e8;
}

body.theme-dark .leases-hero {
    background: linear-gradient(135deg, rgba(6, 18, 23, 0.98), rgba(8, 30, 37, 0.95));
    border-color: rgba(42, 168, 137, 0.18);
}

body.theme-dark .lease-card,
body.theme-dark .lease-summary-item,
body.theme-dark .lease-notes,
body.theme-dark .lease-document-item {
    background: rgba(13, 31, 38, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .lease-card:hover,
body.theme-dark .lease-card:focus-visible {
    border-color: rgba(88, 209, 177, 0.32);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
}

body.theme-dark .lease-card.active {
    background: linear-gradient(135deg, rgba(42, 168, 137, 0.14), rgba(15, 82, 96, 0.1));
}

body.theme-dark .lease-card-avatar,
body.theme-dark .lease-detail-avatar,
body.theme-dark .lease-document-icon {
    background: linear-gradient(135deg, rgba(15, 82, 96, 0.28), rgba(42, 168, 137, 0.22));
    color: #58d1b1;
}

body.theme-dark .lease-card-title,
body.theme-dark .lease-card-rent,
body.theme-dark .lease-detail-title,
body.theme-dark .lease-document-title {
    color: #f2fffb;
}

body.theme-dark .lease-card-subtitle,
body.theme-dark .lease-card-meta,
body.theme-dark .lease-detail-subtitle,
body.theme-dark .lease-document-meta,
body.theme-dark .lease-summary-item .text-muted,
body.theme-dark .lease-notes .text-muted {
    color: #9bb6be;
}

body.theme-dark .search-box input {
    background-color: #0b1b21;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e6f5f0;
}

body.theme-dark .form-control,
body.theme-dark .form-select {
    background-color: #0b1b21;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e6f5f0;
}

body.theme-dark .property-building-panel {
    background: linear-gradient(135deg, rgba(12, 30, 36, 0.95), rgba(16, 42, 50, 0.95));
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .property-building-unit {
    background: rgba(7, 20, 25, 0.9);
    border-color: rgba(255, 255, 255, 0.14);
}

body.theme-dark .property-building-unit-title {
    color: #d6fff3;
}

body.theme-dark .property-building-hint {
    color: #9bb6be;
}

body.theme-dark .form-control::placeholder {
    color: #9bb6be;
}

body.theme-dark .form-label {
    color: #cfe3e8;
}

body.theme-dark .property-photo {
    border-color: rgba(255, 255, 255, 0.12);
    background: #0b1b21;
}

body.theme-dark .property-photo.empty {
    color: #9bb6be;
}

body.theme-dark .result-group h6 {
    color: #9bb6be;
}

body.theme-dark .icon-button {
    background-color: rgba(255, 255, 255, 0.06);
    color: #e6f5f0;
}

body.theme-dark .btn-light {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e6f5f0;
}

body.theme-dark .btn-outline-primary {
    color: #e6f5f0;
    border-color: rgba(255, 255, 255, 0.2);
}

body.theme-dark .btn-outline-primary:hover {
    background: rgba(42, 168, 137, 0.18);
    border-color: rgba(42, 168, 137, 0.5);
    color: #e6f5f0;
}

body.theme-dark .btn-outline-secondary {
    color: #e6f5f0;
    border-color: rgba(255, 255, 255, 0.2);
}

body.theme-dark .btn-outline-secondary:hover {
    background: rgba(42, 168, 137, 0.18);
    border-color: rgba(42, 168, 137, 0.5);
    color: #e6f5f0;
}

body.theme-dark .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.35);
    color: #e6f5f0;
}

body.theme-dark .panel-item,
body.theme-dark button.panel-item,
body.theme-dark .conversation-item,
body.theme-dark .message-bubble,
body.theme-dark .list-group-item {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #dfecea;
}

body.theme-dark .conversation-item:hover,
body.theme-dark .panel-item.clickable:hover {
    background-color: rgba(42, 168, 137, 0.18);
    border-color: rgba(42, 168, 137, 0.4);
}

body.theme-dark .conversation-item.active {
    background-color: rgba(42, 168, 137, 0.24);
    border-color: rgba(42, 168, 137, 0.55);
}

body.theme-dark .lead-item.active {
    background-color: rgba(42, 168, 137, 0.24);
    border-color: rgba(42, 168, 137, 0.55);
}

body.theme-dark .message-bubble {
    background-color: rgba(15, 82, 96, 0.18);
    border-color: rgba(42, 168, 137, 0.2);
    border-left-color: rgba(42, 168, 137, 0.55);
    color: #e6f5f0;
}

body.theme-dark .message-bubble.me {
    border: none;
    color: #ffffff;
}

body.theme-dark .message-meta {
    color: rgba(230, 245, 240, 0.7);
}

body.theme-dark .dropdown-panel {
    background: #0d1f26;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

body.theme-dark .dropdown-item {
    color: #e6f5f0;
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
    background: rgba(42, 168, 137, 0.18);
}

body.theme-dark .dropdown-panel .panel-item {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #dfecea;
}

body.theme-dark #notifications-panel {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

body.theme-dark #notifications-panel .dropdown-header span {
    color: #f2fffb;
}

body.theme-dark #notifications-panel .notification-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e6f5f0;
}

body.theme-dark #notifications-panel .notification-item .text-muted {
    color: #9bb6be;
}

body.theme-dark .empty-state {
    background-color: rgba(13, 31, 38, 0.9);
    border-color: rgba(255, 255, 255, 0.12);
    color: #dfecea;
}

body.theme-dark .plan-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .plan-badge {
    background: rgba(42, 168, 137, 0.2);
    color: #58d1b1;
}

body.theme-dark .plan-price {
    color: #f2fffb;
}

body.theme-dark .plan-price span,
body.theme-dark .plan-setup {
    color: #9bb6be;
}

body.theme-dark .info-hint {
    color: #7dd3e2;
}

