/* Design tokens live in tokens.css (loaded before this file via index.html). */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--pos-font-sans);
    color: var(--pos-ink);
    background-color: var(--pos-body-bg);
    min-height: 100vh;
    position: relative;
}

/* ── Ambient mesh background — multi-orb depth field for glass panels ── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 1100px 800px at  10%  10%, rgba( 29,110,249, 0.10) 0%, transparent 65%),
        radial-gradient(ellipse  800px 700px at  88%  22%, rgba(124, 58,237, 0.09) 0%, transparent 65%),
        radial-gradient(ellipse  700px 650px at  78%  82%, rgba(236, 72,153, 0.07) 0%, transparent 65%),
        radial-gradient(ellipse  600px 600px at  18%  80%, rgba( 14,165,233, 0.06) 0%, transparent 65%),
        radial-gradient(ellipse  400px 400px at  50%  48%, rgba(139, 92,246, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: ambientDrift 28s ease-in-out infinite alternate;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 500px 500px at 60% 20%, rgba(236, 72,153, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 25% 60%, rgba(124, 58,237, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: ambientDrift 20s ease-in-out infinite alternate-reverse;
    animation-delay: -6s;
}
[data-bs-theme="dark"] body::before {
    background:
        radial-gradient(ellipse 1100px 800px at  10%  10%, rgba( 29,110,249, 0.16) 0%, transparent 65%),
        radial-gradient(ellipse  800px 700px at  88%  22%, rgba(124, 58,237, 0.14) 0%, transparent 65%),
        radial-gradient(ellipse  700px 650px at  78%  82%, rgba(236, 72,153, 0.10) 0%, transparent 65%),
        radial-gradient(ellipse  600px 600px at  18%  80%, rgba( 14,165,233, 0.08) 0%, transparent 65%),
        radial-gradient(ellipse  400px 400px at  50%  48%, rgba(139, 92,246, 0.07) 0%, transparent 70%);
}
[data-bs-theme="dark"] body::after {
    background:
        radial-gradient(ellipse 500px 500px at 60% 20%, rgba(236,72,153,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 25% 60%, rgba(124,58,237,0.08) 0%, transparent 70%);
}
@keyframes ambientDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(24px, 16px) scale(1.04); }
}

/* Dark-mode readability: several components use hardcoded light utility backgrounds
   (.bg-white / .bg-light / .table-light) that stay light in dark mode and end up with
   light text on a light surface. Remap them to the theme surfaces so text stays readable. */
[data-bs-theme="dark"] .bg-white {
    background-color: var(--pos-card-bg) !important;
    color: var(--pos-ink);
}
[data-bs-theme="dark"] .bg-light {
    background-color: var(--pos-surface) !important;
    color: var(--pos-ink);
}
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light > th,
[data-bs-theme="dark"] .table-light > td {
    --bs-table-bg: var(--pos-surface);
    --bs-table-color: var(--pos-ink);
    --bs-table-border-color: var(--pos-border);
    color: var(--pos-ink);
}

/* Skip link + focus visibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0.75rem;
    z-index: 1200;
    padding: 0.5rem 1rem;
    background: var(--pos-primary);
    color: #fff;
    border-radius: 0 0 0.375rem 0.375rem;
    font-weight: 600;
}
.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
    outline: none;
    box-shadow: 0 0 0 3px var(--pos-focus-ring);
}

:focus-visible {
    outline: 2px solid var(--pos-primary);
    outline-offset: 2px;
}

.form-control:focus,
.btn:focus-visible {
    outline: 2px solid var(--pos-primary);
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.command-bar-result:focus-visible {
    box-shadow: 0 0 0 0.2rem var(--pos-focus-ring);
}

a {
    text-decoration: none;
}

.app-boot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 16px;
}
.app-boot .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

/* Buttons / brand */
.btn-primary {
    --bs-btn-bg: var(--pos-primary);
    --bs-btn-border-color: var(--pos-primary);
    --bs-btn-hover-bg: var(--pos-primary-dark);
    --bs-btn-hover-border-color: var(--pos-primary-dark);
    --bs-btn-active-bg: var(--pos-primary-dark);
}

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

/* Public / marketing */
.hero {
    position: relative;
    background: var(--pos-gradient-hero);
    background-size: 220% 220%;
    color: #fff;
    overflow: hidden;
    animation: gradientShift 12s ease-in-out infinite;
}
/* Floating orbs */
.hero::before {
    content: "";
    position: absolute;
    top: -120px; right: -80px;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.20) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    animation: liquidWave 14s ease-in-out infinite;
}
.hero::after {
    content: "";
    position: absolute;
    bottom: -140px; left: -60px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14,165,233,0.30) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    animation: liquidWave 18s ease-in-out infinite reverse;
}
.hero > * { position: relative; z-index: 1; }
.hero .badge.bg-light {
    background: rgba(255,255,255,0.18) !important;
    color: #fff !important;
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.25);
    font-weight: 600;
}
.hero .btn-light {
    color: var(--pos-primary); font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.6);
}
.hero .btn-light:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.25); }
.hero .btn-outline-light {
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border-width: 1.5px;
}
.hero .btn-outline-light:hover:not(:disabled) { transform: translateY(-2px); }

.feature-icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pos-radius-xl);
    background: var(--pos-gradient-primary);
    background-size: 200% 200%;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(29,110,249,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
    animation: gradientShift 5s ease-in-out infinite, float 5.5s ease-in-out infinite;
    transition: transform var(--pos-duration-base) var(--pos-ease-spring),
                box-shadow var(--pos-duration-base) var(--pos-ease-out);
}
.feature-icon:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 28px rgba(29,110,249,0.5), 0 0 24px rgba(124,58,237,0.3);
}

.public-navbar {
    background: var(--pos-topbar-bg);
}
.public-footer {
    background: var(--pos-sidebar-bg);
    color: #cfd8e3;
}
.public-footer a { color: #cfd8e3; }
.public-footer a:hover { color: #fff; }

/* ── Page transition ── */
.page-enter {
    animation: fadeIn var(--pos-duration-base) var(--pos-ease-out) both;
}

/* ── App shell ── */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}
.app-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ── Sidebar — deep liquid glass ── */
.app-sidebar {
    width: 260px;
    background: var(--pos-gradient-sidebar);
    color: rgba(255, 255, 255, 0.70);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    position: relative;
    overflow: hidden;
}
/* Animated top glow orb */
.app-sidebar::before {
    content: "";
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29,110,249,0.40) 0%, rgba(124,58,237,0.20) 40%, transparent 70%);
    filter: blur(32px);
    pointer-events: none;
    z-index: 0;
    animation: glowPulse 4s ease-in-out infinite;
}
/* Bottom accent + iridescent right edge */
.app-sidebar::after {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 160px;
    background: linear-gradient(to top, rgba(124,58,237,0.12) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}
/* Iridescent right border */
.app-sidebar > *:first-child::before {
    content: none;
}

.app-sidebar .nav-link {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.62);
    border-radius: var(--pos-radius-md);
    margin: 1px 10px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition:
        background   var(--pos-duration-fast) var(--pos-ease-out),
        color        var(--pos-duration-fast) var(--pos-ease-out),
        transform    var(--pos-duration-fast) var(--pos-ease-spring),
        box-shadow   var(--pos-duration-base) var(--pos-ease-out);
    overflow: hidden;
}
.app-sidebar .nav-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
    transform: translateX(-100%);
    pointer-events: none;
    border-radius: inherit;
    transition: transform 0.4s var(--pos-ease-out);
}
.app-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(3px);
}
.app-sidebar .nav-link:hover::after {
    transform: translateX(200%);
}
.app-sidebar .nav-link i {
    transition: transform var(--pos-duration-base) var(--pos-ease-spring),
                color     var(--pos-duration-fast) var(--pos-ease-out);
    font-size: 1rem;
    flex-shrink: 0;
}
.app-sidebar .nav-link:hover i {
    transform: scale(1.15);
    color: rgba(255,255,255,0.95);
}
.app-sidebar .nav-link.active {
    background: rgba(29, 110, 249, 0.20);
    color: #fff;
    border: 1px solid rgba(29, 110, 249, 0.44);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.10) inset,
        0 2px 12px rgba(29,110,249,0.30),
        0 0 24px rgba(29,110,249,0.18);
    font-weight: 600;
    backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
}
.app-sidebar .nav-link.active i {
    color: #93c5fd;
    filter: drop-shadow(0 0 6px rgba(147,197,253,0.7));
}
.app-sidebar .nav-link.active:hover { transform: none; }

.app-sidebar .brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.075rem;
    letter-spacing: -0.025em;
    color: #fff;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 8px;
}
.app-sidebar .brand::before {
    content: "\F588";
    font-family: "bootstrap-icons";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--pos-radius-md);
    background: var(--pos-gradient-primary);
    background-size: 200% 200%;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.25) inset,
        0 2px 12px rgba(29,110,249,0.55),
        0 0 24px rgba(124,58,237,0.30);
    animation: gradientShift 4s ease-in-out infinite;
}

/* ── Main content ── */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--pos-body-bg);
}
.app-content {
    padding: 1.5rem;
    flex: 1;
    /* Subtle inner luminosity — lets glass cards pop */
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 70%),
                var(--pos-body-bg);
}
[data-bs-theme="dark"] .app-content {
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(29,110,249,0.04) 0%, transparent 70%),
                var(--pos-body-bg);
}

/* ── TopBar — ultra liquid glass ── */
.app-topbar {
    background: var(--pos-topbar-bg);
    backdrop-filter: blur(40px) saturate(2.2) brightness(1.02);
    -webkit-backdrop-filter: blur(40px) saturate(2.2) brightness(1.02);
    border-bottom: 1px solid var(--pos-glass-border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow:
        0 0 0 0.5px rgba(255,255,255,0.70) inset,
        0 1px 0 rgba(255,255,255,0.40) inset,
        0 4px 20px rgba(0,0,0,0.06);
}
/* Animated gradient accent line */
.app-topbar::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--pos-gradient-rainbow);
    background-size: 300% 100%;
    animation: gradientShift 6s ease-in-out infinite;
    opacity: 0.55;
}
/* Subtle shine at top */
.app-topbar::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.12) 0%, transparent 100%);
    pointer-events: none;
}
[data-bs-theme="dark"] .app-topbar {
    backdrop-filter: blur(40px) saturate(2.0) brightness(0.96);
    -webkit-backdrop-filter: blur(40px) saturate(2.0) brightness(0.96);
    box-shadow:
        0 0 0 0.5px rgba(255,255,255,0.06) inset,
        0 4px 24px rgba(0,0,0,0.50);
}
[data-bs-theme="dark"] .app-topbar::after { display: none; }
.tenant-property-select {
    max-width: 280px;
    min-width: 160px;
}

.command-bar-trigger {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-width: 180px;
    max-width: 320px;
    justify-content: space-between;
}
.command-bar-trigger-label {
    flex: 1;
    text-align: left;
    color: var(--bs-secondary-color);
}
.command-bar-kbd {
    font-size: .7rem;
    padding: .1rem .35rem;
    border-radius: .25rem;
    border: 1px solid var(--pos-border);
    background: var(--pos-surface);
    color: var(--bs-secondary-color);
}
.command-bar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 20, 0.55);
    backdrop-filter: blur(8px) saturate(1.4);
    -webkit-backdrop-filter: blur(8px) saturate(1.4);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 1rem;
    animation: backdropFadeIn var(--pos-duration-base) var(--pos-ease-out) both;
}
.command-bar {
    width: min(640px, 100%);
    background: var(--pos-glass-bg-heavy);
    backdrop-filter: blur(var(--pos-blur-xl)) saturate(1.8);
    -webkit-backdrop-filter: blur(var(--pos-blur-xl)) saturate(1.8);
    border-radius: var(--pos-radius-xl);
    box-shadow: var(--pos-liquid-shadow);
    overflow: hidden;
    border: 1px solid var(--pos-glass-border);
    animation: modalSlideIn var(--pos-duration-slow) var(--pos-ease-spring) both;
}
.command-bar-input-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--pos-border);
}
.command-bar-input {
    flex: 1;
    border: 0;
    outline: none;
    font-size: 1rem;
    background: transparent;
}
.command-bar-results {
    max-height: 360px;
    overflow-y: auto;
}
.command-bar-empty {
    padding: 1.25rem 1rem;
    color: var(--bs-secondary-color);
    text-align: center;
}
.command-bar-result {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border: 0;
    background: transparent;
    text-align: left;
}
.command-bar-result:hover,
.command-bar-result.active {
    background: rgba(13, 110, 253, .08);
}
.command-bar-result-icon {
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    background: var(--pos-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-primary);
    flex-shrink: 0;
}
.command-bar-result-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.command-bar-result-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.command-bar-result-subtitle {
    font-size: .85rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.command-bar-result-type {
    font-size: .75rem;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: .03em;
    flex-shrink: 0;
}
.command-bar-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    padding: .65rem 1rem;
    border-top: 1px solid var(--pos-border);
    font-size: .75rem;
    color: var(--bs-secondary-color);
}
.command-bar-footer kbd {
    font-size: .7rem;
    padding: .05rem .3rem;
    border-radius: .2rem;
    border: 1px solid var(--pos-border);
    background: var(--pos-surface);
    margin-right: .25rem;
}

@media (max-width: 575.98px) {
    .command-bar-trigger-label,
    .command-bar-trigger .command-bar-kbd {
        display: none;
    }
    .command-bar-trigger {
        min-width: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Bootstrap component overrides — aligns Bootstrap HTML with the
   PropertyOS design token system so legacy pages look consistent.
   ═══════════════════════════════════════════════════════════════ */

/* ── Bootstrap cards — liquid glass ── */
.card {
    border: 1px solid var(--pos-glass-border);
    background-color: var(--pos-glass-bg);
    backdrop-filter: blur(40px) saturate(2.4) brightness(1.04);
    -webkit-backdrop-filter: blur(40px) saturate(2.4) brightness(1.04);
    border-radius: var(--pos-radius-lg);
    box-shadow: var(--pos-glass-shadow);
    position: relative;
    transition:
        box-shadow   var(--pos-duration-base) var(--pos-ease-out),
        transform    var(--pos-duration-base) var(--pos-ease-out),
        border-color var(--pos-duration-base) var(--pos-ease-out);
}
/* Specular top lip */
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1.5px;
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,255,255,0.90) 20%,
        rgba(255,255,255,1.0) 50%, rgba(255,255,255,0.90) 80%, transparent 100%);
    border-radius: var(--pos-radius-lg) var(--pos-radius-lg) 0 0;
    pointer-events: none;
    z-index: 1;
}
[data-bs-theme="dark"] .card::before {
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,255,255,0.16) 20%,
        rgba(255,255,255,0.26) 50%, rgba(255,255,255,0.16) 80%, transparent 100%);
}
.card:hover {
    box-shadow: var(--pos-liquid-shadow), var(--pos-glow-sm);
    border-color: rgba(29,110,249,0.22);
}
.card-header {
    background: transparent;
    border-bottom-color: var(--pos-border);
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    color: var(--pos-ink);
}
.card-footer {
    background: rgba(0,0,0,0.02);
    border-top-color: var(--pos-border);
}
[data-bs-theme="dark"] .card-footer {
    background: rgba(255,255,255,0.02);
}

/* ── Form labels ── */
.form-label, label.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pos-ink);
    letter-spacing: 0.01em;
    margin-bottom: 5px;
}

/* ── Form controls — liquid glass ── */
.form-control, .form-select {
    border: 1.5px solid var(--pos-border);
    border-radius: var(--pos-radius-lg);
    background-color: var(--pos-glass-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    color: var(--pos-ink);
    font-family: var(--pos-font-sans);
    font-size: 0.9rem;
    padding: 10px 14px;
    transition:
        border-color    var(--pos-duration-fast) var(--pos-ease-out),
        box-shadow      var(--pos-duration-base) var(--pos-ease-out),
        background      var(--pos-duration-fast) var(--pos-ease-out),
        backdrop-filter var(--pos-duration-base) var(--pos-ease-out);
}
.form-control::placeholder { color: var(--pos-muted); }
.form-control:hover:not(:disabled):not(:focus),
.form-select:hover:not(:disabled):not(:focus) {
    border-color: rgba(29, 110, 249, 0.35);
    box-shadow: var(--pos-glow-xs);
}
.form-control:focus, .form-select:focus {
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 3px var(--pos-focus-ring), var(--pos-glow-md);
    background-color: var(--pos-glass-bg-heavy);
    backdrop-filter: blur(32px) saturate(2.4);
    -webkit-backdrop-filter: blur(32px) saturate(2.4);
    color: var(--pos-ink);
}
/* Checkboxes / radios — accent + glow */
.form-check-input {
    border: 1.5px solid var(--pos-border);
    transition: box-shadow var(--pos-duration-fast) var(--pos-ease-out),
                background var(--pos-duration-fast) var(--pos-ease-out);
}
.form-check-input:checked {
    background-color: var(--pos-primary);
    border-color: var(--pos-primary);
    box-shadow: var(--pos-glow-sm);
}
.form-check-input:focus { box-shadow: 0 0 0 3px var(--pos-focus-ring); border-color: var(--pos-primary); }
/* Range / switch */
.form-switch .form-check-input:checked { background-color: var(--pos-primary); }
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--pos-glass-bg);
    color: var(--pos-ink);
    border-color: var(--pos-border);
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--pos-glass-bg-heavy);
    color: var(--pos-ink);
}

/* ── Buttons ── */
.btn {
    font-family: var(--pos-font-sans);
    font-weight: 600;
    border-radius: var(--pos-radius-full);
    transition:
        background var(--pos-duration-fast) var(--pos-ease-out),
        box-shadow  var(--pos-duration-base) var(--pos-ease-out),
        transform   var(--pos-duration-fast) var(--pos-ease-spring),
        border-color var(--pos-duration-fast) var(--pos-ease-out);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    --bs-btn-bg: var(--pos-primary);
    --bs-btn-border-color: var(--pos-primary);
    --bs-btn-hover-bg: var(--pos-primary-dark);
    --bs-btn-hover-border-color: var(--pos-primary-dark);
    --bs-btn-active-bg: var(--pos-primary-dark);
    box-shadow: 0 1px 3px rgba(13, 110, 253, 0.30);
}
.btn-primary:hover:not(:disabled) {
    box-shadow: var(--pos-shadow-md), var(--pos-shadow-glow);
    transform: translateY(-1px);
}

.btn-outline-primary {
    --bs-btn-color: var(--pos-primary);
    --bs-btn-border-color: var(--pos-primary);
    --bs-btn-hover-bg: var(--pos-primary-subtle);
    --bs-btn-hover-color: var(--pos-primary);
    --bs-btn-hover-border-color: var(--pos-primary);
    --bs-btn-active-bg: var(--pos-primary-subtle);
}
.btn-outline-primary:hover:not(:disabled) { transform: translateY(-1px); }

.btn-outline-secondary {
    --bs-btn-color: var(--pos-ink);
    --bs-btn-border-color: var(--pos-border);
    --bs-btn-hover-bg: var(--pos-surface);
    --bs-btn-hover-color: var(--pos-ink);
    --bs-btn-hover-border-color: rgba(13, 110, 253, 0.30);
}

.btn-outline-danger {
    --bs-btn-color: #dc3545;
    --bs-btn-border-color: #dc3545;
    --bs-btn-hover-bg: rgba(220, 53, 69, 0.06);
    --bs-btn-hover-color: #dc3545;
    --bs-btn-hover-border-color: #dc3545;
}

.btn-success {
    --bs-btn-bg: #198754;
    --bs-btn-border-color: #198754;
    --bs-btn-hover-bg: #146c43;
    --bs-btn-hover-border-color: #146c43;
    box-shadow: 0 1px 3px rgba(25, 135, 84, 0.30);
}
.btn-success:hover:not(:disabled) { transform: translateY(-1px); }

/* ── Tables ── */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--pos-ink);
    --bs-table-border-color: var(--pos-border);
    --bs-table-striped-bg: rgba(29,110,249,0.03);
    --bs-table-hover-bg: rgba(29,110,249,0.06);
    font-size: 0.9rem;
}
.table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pos-muted);
    border-bottom-width: 1.5px;
    background: transparent;
}
.table tbody tr {
    transition: background var(--pos-duration-fast) var(--pos-ease-out);
}
.table-hover > tbody > tr:hover > * {
    --bs-table-hover-bg: rgba(29,110,249,0.06);
}

/* ── List groups — glass rows ── */
.list-group-item {
    background-color: transparent;
    border-color: var(--pos-border);
    color: var(--pos-ink);
    transition: background var(--pos-duration-fast) var(--pos-ease-out),
                backdrop-filter var(--pos-duration-base) var(--pos-ease-out);
}
.list-group-item-action:hover {
    background-color: var(--pos-glass-bg);
    backdrop-filter: blur(16px) saturate(1.8);
    -webkit-backdrop-filter: blur(16px) saturate(1.8);
    color: var(--pos-ink);
}

/* ── Alerts — glass ── */
.alert {
    border-radius: var(--pos-radius-lg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-width: 1px;
    box-shadow: var(--pos-specular), var(--pos-shadow-xs);
}
.alert-info { background: rgba(13, 110, 253, 0.10); border-color: rgba(13, 110, 253, 0.24); color: var(--pos-ink); }
.alert-warning { background: rgba(255, 193, 7, 0.12); border-color: rgba(255, 193, 7, 0.32); color: var(--pos-ink); }
.alert-danger  { background: rgba(220, 53, 69, 0.10); border-color: rgba(220, 53, 69, 0.24); color: var(--pos-ink); }
.alert-success { background: rgba(25, 135, 84, 0.10); border-color: rgba(25, 135, 84, 0.24); color: var(--pos-ink); }

/* ── Progress — glass track + animated gradient ── */
.progress {
    background: var(--pos-glass-bg);
    border: 1px solid var(--pos-glass-border);
    border-radius: var(--pos-radius-full);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}
.progress-bar {
    background: var(--pos-gradient-primary);
    background-size: 200% 200%;
    border-radius: var(--pos-radius-full);
    box-shadow: 0 0 12px rgba(29,110,249,0.40);
    animation: gradientShift 3s ease-in-out infinite;
    transition: width var(--pos-duration-xslow) var(--pos-ease-decelerate);
}
.progress-bar.bg-warning { background: var(--pos-gradient-warm); box-shadow: 0 0 12px rgba(251,146,60,0.40); }
.progress-bar.bg-danger  { background: var(--pos-gradient-danger); box-shadow: 0 0 12px rgba(220,38,38,0.40); }
.progress-bar.bg-success { background: var(--pos-gradient-success); box-shadow: 0 0 12px rgba(5,150,105,0.40); }

/* ── Bootstrap modals — ultra liquid glass (ConfirmModal etc.) ── */
.modal-content {
    background: var(--pos-glass-bg-heavy);
    backdrop-filter: blur(72px) saturate(3.0) brightness(1.04);
    -webkit-backdrop-filter: blur(72px) saturate(3.0) brightness(1.04);
    border: 1px solid var(--pos-glass-border-strong);
    border-radius: var(--pos-radius-2xl);
    box-shadow:
        var(--pos-specular-strong),
        var(--pos-shadow-2xl),
        var(--pos-glow-lg);
    position: relative;
    overflow: hidden;
}
.modal-content::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1.5px;
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,255,255,0.95) 20%,
        rgba(255,255,255,1.0) 50%, rgba(255,255,255,0.95) 80%, transparent 100%);
    pointer-events: none;
    z-index: 1;
    animation: specularSweep 3.5s ease-in-out infinite;
}
[data-bs-theme="dark"] .modal-content::before {
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,255,255,0.20) 20%,
        rgba(255,255,255,0.32) 50%, rgba(255,255,255,0.20) 80%, transparent 100%);
}
.modal-header { border-bottom-color: var(--pos-border); padding: 20px 24px 16px; }
.modal-title { font-weight: 700; letter-spacing: -0.02em; color: var(--pos-ink); }
.modal-body { padding: 20px 24px; color: var(--pos-ink); }
.modal-footer { border-top-color: var(--pos-border); padding: 14px 24px 20px; }
.modal-backdrop.show { backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2); opacity: 1; background: rgba(10,14,24,0.35); }

/* ── Nav tabs — glass underline ── */
.nav-tabs {
    border-bottom: 1.5px solid var(--pos-border);
    gap: 2px;
}
.nav-tabs .nav-link {
    border: none;
    border-bottom: 2.5px solid transparent;
    color: var(--pos-muted);
    font-weight: 500;
    border-radius: var(--pos-radius-md) var(--pos-radius-md) 0 0;
    transition: color var(--pos-duration-fast) var(--pos-ease-out),
                background var(--pos-duration-fast) var(--pos-ease-out),
                border-color var(--pos-duration-fast) var(--pos-ease-out);
}
.nav-tabs .nav-link:hover {
    color: var(--pos-ink);
    background: var(--pos-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(29,110,249,0.30);
}
.nav-tabs .nav-link.active {
    color: var(--pos-primary);
    background: transparent;
    border-bottom-color: var(--pos-primary);
    font-weight: 700;
}

/* ── Badges ── */
.badge.text-bg-light {
    background-color: var(--pos-surface) !important;
    color: var(--pos-ink) !important;
    border: 1px solid var(--pos-border);
}
.badge.text-bg-warning { background-color: rgba(255, 193, 7, 0.15) !important; color: #997404 !important; }
.badge.text-bg-primary { background-color: var(--pos-primary-subtle) !important; color: var(--pos-primary) !important; }
.badge.text-bg-success { background-color: rgba(25, 135, 84, 0.12) !important; color: #198754 !important; }
.badge.text-bg-danger  { background-color: rgba(220, 53, 69, 0.12) !important; color: #dc3545 !important; }

/* ── HR divider ── */
hr { border-color: var(--pos-border); opacity: 1; }

/* ── Stat card (legacy) ── */
.stat-card .stat-value { font-size: 2rem; font-weight: 700; }

.onboarding-checklist {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.04), rgba(13, 110, 253, 0.01));
}
.onboarding-steps .list-group-item {
    border-color: var(--pos-border);
}
.onboarding-step-done {
    opacity: 0.85;
}

/* Off-canvas sidebar for mobile */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 16, 0.60);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    animation: backdropFadeIn var(--pos-duration-base) var(--pos-ease-out) both;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .2s ease-in-out;
    }
    .app-sidebar.open { transform: translateX(0); }
}

@media (min-width: 992px) {
    .menu-toggle { display: none; }
    .sidebar-backdrop { display: none; }
}

/* Loading / error UI from template */
#blazor-error-ui {
    background: rgba(220, 53, 69, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.15);
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(220, 53, 69, 0.30);
    display: none;
    left: 0;
    padding: 0.65rem 1.25rem 0.75rem;
    position: fixed;
    width: 100%;
    z-index: 1100;
    font-size: 0.9rem;
    font-weight: 500;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Product preview mock (public home) */
.product-preview {
    background: var(--pos-glass-bg-heavy);
    backdrop-filter: blur(40px) saturate(2.2);
    -webkit-backdrop-filter: blur(40px) saturate(2.2);
    border: 1px solid var(--pos-glass-border-strong);
    border-radius: var(--pos-radius-xl);
    overflow: hidden;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: var(--pos-liquid-shadow), 0 24px 64px rgba(0,0,0,0.25);
    animation: float 7s ease-in-out infinite;
}
.product-preview-bar {
    background: #e9ecef;
    padding: .5rem .75rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
[data-bs-theme="dark"] .product-preview-bar {
    background: var(--pos-surface);
}
.product-preview-bar .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #ced4da;
}
.product-preview-title {
    margin-left: .5rem;
    font-size: .75rem;
    color: var(--pos-muted);
}
.product-preview-body {
    display: flex;
    min-height: 260px;
}
.product-preview-sidebar {
    width: 48px;
    background: var(--pos-sidebar-bg);
}
.product-preview-content {
    flex: 1;
    padding: 1rem;
    background: var(--pos-surface);
}
.product-preview-stats {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}
.pps {
    flex: 1;
    background: var(--pos-card-bg);
    border-radius: 8px;
    padding: .5rem;
    border: 1px solid var(--pos-border);
}
.pps-label { display: block; font-size: .65rem; color: var(--pos-muted); }
.pps-value { font-weight: 700; font-size: .9rem; }
.product-preview-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 80px;
    margin-bottom: 1rem;
    padding: .5rem;
    background: var(--pos-card-bg);
    border-radius: 8px;
    border: 1px solid var(--pos-border);
}
.product-preview-chart .bar {
    flex: 1;
    background: var(--pos-gradient-primary);
    background-size: 200% 200%;
    opacity: 0.45;
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    transform-origin: bottom;
    animation: sparklineGrow 0.7s var(--pos-ease-spring) both;
}
.product-preview-chart .bar.active {
    opacity: 1;
    box-shadow: 0 -2px 12px rgba(29,110,249,0.5);
    animation: sparklineGrow 0.7s var(--pos-ease-spring) both, gradientShift 4s ease-in-out infinite;
}
.product-preview-timeline .ptl-item {
    font-size: .75rem;
    padding: .35rem 0;
    border-bottom: 1px solid var(--pos-border);
    color: var(--pos-muted);
}
.trust-strip {
    background: var(--pos-glass-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    font-size: .9rem; color: var(--pos-muted);
}
.testimonial-card {
    border-left: 3px solid transparent;
    border-image: var(--pos-gradient-primary) 1;
    background: var(--pos-glass-bg) !important;
    backdrop-filter: blur(32px) saturate(2.2) brightness(1.04);
    -webkit-backdrop-filter: blur(32px) saturate(2.2) brightness(1.04);
    box-shadow: var(--pos-glass-shadow) !important;
    transition: transform var(--pos-duration-base) var(--pos-ease-out),
                box-shadow var(--pos-duration-base) var(--pos-ease-out);
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--pos-liquid-shadow) !important; }

/* Marketing glass feature card */
.public-feature-card {
    height: 100%;
    padding: var(--pos-space-6);
    border-radius: var(--pos-radius-xl);
    background: var(--pos-glass-bg);
    backdrop-filter: blur(40px) saturate(2.4) brightness(1.04);
    -webkit-backdrop-filter: blur(40px) saturate(2.4) brightness(1.04);
    border: 1px solid var(--pos-glass-border);
    box-shadow: var(--pos-glass-shadow);
    position: relative;
    overflow: hidden;
    transition: transform var(--pos-duration-base) var(--pos-ease-spring),
                box-shadow var(--pos-duration-base) var(--pos-ease-out),
                border-color var(--pos-duration-slow) var(--pos-ease-out);
}
.public-feature-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9) 50%, transparent);
    pointer-events: none;
}
.public-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pos-liquid-shadow), var(--pos-glow-sm);
    border-color: rgba(29,110,249,0.30);
}
.public-feature-card h5 { font-weight: 700; letter-spacing: -0.01em; }

/* Marketing comparison panel */
.public-compare-card {
    height: 100%;
    padding: var(--pos-space-5);
    border-radius: var(--pos-radius-lg);
    background: var(--pos-glass-bg);
    backdrop-filter: blur(28px) saturate(2.0);
    -webkit-backdrop-filter: blur(28px) saturate(2.0);
    border: 1px solid var(--pos-glass-border);
    box-shadow: var(--pos-glass-shadow);
}
.public-compare-card--good { border-color: rgba(5,150,105,0.35); box-shadow: var(--pos-glass-shadow), 0 0 20px rgba(5,150,105,0.10); }

/* Pricing card */
.pricing-card {
    height: 100%;
    padding: var(--pos-space-8) var(--pos-space-6);
    border-radius: var(--pos-radius-2xl);
    background: var(--pos-glass-bg);
    backdrop-filter: blur(40px) saturate(2.4) brightness(1.04);
    -webkit-backdrop-filter: blur(40px) saturate(2.4) brightness(1.04);
    border: 1px solid var(--pos-glass-border);
    box-shadow: var(--pos-glass-shadow);
    position: relative;
    overflow: hidden;
    transition: transform var(--pos-duration-base) var(--pos-ease-spring),
                box-shadow var(--pos-duration-base) var(--pos-ease-out);
}
.pricing-card::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9) 50%, transparent);
    pointer-events: none;
}
.pricing-card:hover { transform: translateY(-6px); box-shadow: var(--pos-liquid-shadow), var(--pos-glow-sm); }
.pricing-card--featured {
    border-color: rgba(29,110,249,0.45);
    box-shadow: var(--pos-liquid-shadow), var(--pos-glow-md);
    animation: iridescent 5s ease-in-out infinite;
}
.pricing-card--featured::after {
    content: "★ " attr(data-badge);
    position: absolute; top: 14px; right: -34px;
    transform: rotate(45deg);
    background: var(--pos-gradient-primary);
    color: #fff; font-size: 0.7rem; font-weight: 700;
    padding: 4px 40px;
    box-shadow: 0 2px 8px rgba(29,110,249,0.4);
}
.pricing-card__price { font-size: 2.5rem; font-weight: 900; letter-spacing: -0.04em; color: var(--pos-ink); }
.pricing-card__period { font-size: 0.9rem; color: var(--pos-muted); }

/* Frosted glass panel on a colored hero */
.hero-glass-panel {
    padding: var(--pos-space-6);
    border-radius: var(--pos-radius-xl);
    color: #fff;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 16px 48px rgba(0,0,0,0.2);
    animation: float 7s ease-in-out infinite;
}
.hero-glass-panel .bi { color: rgba(255,255,255,0.95); }

.rent-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 100px;
    padding-top: .5rem;
}
.rent-sparkline-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}
.rent-sparkline-bar {
    width: 100%;
    background: var(--pos-primary);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    opacity: .85;
}
.rent-sparkline-label {
    font-size: .7rem;
    color: var(--pos-muted);
    margin-top: 4px;
}

/* Demo mode banner */
.demo-banner {
    background: var(--pos-gradient-primary);
    background-size: 200% 200%;
    color: #fff;
    font-size: .875rem;
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 2px 16px rgba(29, 110, 249, 0.30);
    animation: gradientShift 6s ease-in-out infinite;
}
.demo-banner .btn-light {
    color: var(--pos-primary);
    font-weight: 600;
    backdrop-filter: blur(8px);
}

/* Expiry calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.calendar-weekday {
    text-align: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--pos-muted);
    padding: .35rem 0;
}
.calendar-day {
    min-height: 88px;
    border: 1px solid var(--pos-border);
    border-radius: 8px;
    padding: .35rem;
    background: var(--pos-card-bg);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.calendar-day:hover {
    border-color: var(--pos-primary);
}
.calendar-day--muted {
    background: var(--pos-surface);
    opacity: .65;
}
.calendar-day--today .calendar-day-number {
    background: var(--pos-primary);
    color: #fff;
    border-radius: 999px;
    width: 1.6rem;
    height: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.calendar-day--selected {
    border-color: var(--pos-primary);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, .15);
}
.calendar-day-number {
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .2rem;
}
.calendar-day-events {
    list-style: none;
    padding: 0;
    margin: 0;
}
.calendar-event {
    font-size: .65rem;
    line-height: 1.2;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calendar-event a {
    color: inherit;
}
.calendar-event--ComplianceExpiry { color: #dc3545; }
.calendar-event--DocumentExpiry { color: #fd7e14; }
.calendar-event--LeaseAnniversary { color: #0d6efd; }
.calendar-event--LeaseEnd { color: #6f42c1; }
.calendar-event--IndexationDue { color: #198754; }
.calendar-event--RentDue { color: #20c997; }
.calendar-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: .4rem;
    vertical-align: middle;
}
.calendar-legend-dot.calendar-event--ComplianceExpiry { background: #dc3545; }
.calendar-legend-dot.calendar-event--DocumentExpiry { background: #fd7e14; }
.calendar-legend-dot.calendar-event--LeaseAnniversary { background: #0d6efd; }
.calendar-legend-dot.calendar-event--LeaseEnd { background: #6f42c1; }
.calendar-legend-dot.calendar-event--IndexationDue { background: #198754; }
.calendar-legend-dot.calendar-event--RentDue { background: #20c997; }
.calendar-badge {
    font-weight: 500;
}
.calendar-badge--ComplianceExpiry { background: #dc3545; }
.calendar-badge--DocumentExpiry { background: #fd7e14; }
.calendar-badge--LeaseAnniversary { background: #0d6efd; }
.calendar-badge--LeaseEnd { background: #6f42c1; }
.calendar-badge--IndexationDue { background: #198754; }
.calendar-badge--RentDue { background: #20c997; }

.feedback-widget-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1040;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pos-gradient-primary);
    border-radius: 50%;
    box-shadow: var(--pos-shadow-lg), var(--pos-glow-md);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform var(--pos-duration-fast) var(--pos-ease-spring), box-shadow var(--pos-duration-base) var(--pos-ease-out);
}
.feedback-widget-fab:hover {
    transform: scale(1.08);
    box-shadow: var(--pos-shadow-xl), var(--pos-glow-lg);
}
.feedback-widget-fab:active { transform: scale(0.95); }

.feedback-widget-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 16, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    animation: backdropFadeIn var(--pos-duration-base) var(--pos-ease-out) both;
}

.feedback-widget-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    width: min(22rem, calc(100vw - 2.5rem));
}

.property-map-container {
    height: min(420px, 50vh);
    min-height: 280px;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    z-index: 0;
}

.property-map-container .leaflet-container {
    height: 100%;
    width: 100%;
    font: inherit;
}

.property-map-tooltip {
    max-width: 14rem;
    line-height: 1.35;
}

/* Custom property map markers (replaces default Leaflet pin) */
.property-map-marker-wrap.leaflet-div-icon {
    background: transparent !important;
    border: none !important;
}

.property-map-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.property-map-marker:hover {
    transform: translateY(-3px) scale(1.06);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
    z-index: 1000 !important;
}

.property-map-marker__pin {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow:
        0 4px 14px rgba(15, 20, 25, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.property-map-marker__icon {
    transform: rotate(45deg);
    font-size: 1rem;
    line-height: 1;
    color: #fff;
}

.property-map-marker__shadow {
    flex: 0 0 auto;
    width: 1.125rem;
    height: 0.3125rem;
    margin-top: 0.2rem;
    border-radius: 50%;
    background: rgba(15, 20, 25, 0.24);
}

.property-map-marker--vacant {
    --property-marker-color: #0d6efd;
    --property-marker-color-dark: #0a58ca;
}

.property-map-marker--occupied {
    --property-marker-color: #198754;
    --property-marker-color-dark: #146c43;
}

.property-map-marker--pending {
    --property-marker-color: #fd7e14;
    --property-marker-color-dark: #ca6510;
}

.property-map-marker--default {
    --property-marker-color: var(--pos-primary);
    --property-marker-color-dark: var(--pos-primary-dark);
}

.property-map-marker--vacant .property-map-marker__pin,
.property-map-marker--occupied .property-map-marker__pin,
.property-map-marker--pending .property-map-marker__pin,
.property-map-marker--default .property-map-marker__pin {
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--property-marker-color) 88%, #fff 12%),
        var(--property-marker-color-dark)
    );
}

.leaflet-tooltip.property-map-tooltip-pane {
    padding: 0.45rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid var(--pos-border);
    background: var(--pos-card-bg);
    color: var(--pos-ink);
    box-shadow: 0 8px 24px rgba(15, 20, 25, 0.14);
}

.leaflet-tooltip.property-map-tooltip-pane::before {
    border-top-color: var(--pos-card-bg);
}

[data-bs-theme="dark"] .property-map-marker__pin {
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .property-map-marker__shadow {
    background: rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .leaflet-tooltip.property-map-tooltip-pane {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

/* ═══════════════════════════════════════════════════════════════
   MORE LIQUID GLASS — global amplification layer
   ═══════════════════════════════════════════════════════════════ */

/* ── Toasts — liquid glass with slide + glow ── */
.toast-container .toast {
    position: relative;
    border-radius: var(--pos-radius-lg) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    backdrop-filter: blur(40px) saturate(2.4) brightness(1.05);
    -webkit-backdrop-filter: blur(40px) saturate(2.4) brightness(1.05);
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.35),
        var(--pos-shadow-xl),
        var(--pos-glow-sm);
    animation: toastSlideIn 0.5s var(--pos-ease-spring) both;
}
.toast-container .toast::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 0 12px rgba(255,255,255,0.6);
}
.toast-container .toast::after {
    content: "";
    position: absolute; left: 0; bottom: 0; height: 2px;
    width: 100%;
    background: rgba(255,255,255,0.6);
    transform-origin: left;
    animation: toastProgress 4s linear both;
}
.toast-container .toast.bg-success {
    background: linear-gradient(135deg, rgba(5,150,105,0.82), rgba(2,132,132,0.82)) !important;
}
.toast-container .toast.bg-danger {
    background: linear-gradient(135deg, rgba(220,38,38,0.82), rgba(190,24,93,0.82)) !important;
}
.toast-container .toast.bg-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.85), rgba(239,68,68,0.80)) !important;
}
.toast-container .toast.bg-primary {
    background: linear-gradient(135deg, rgba(29,110,249,0.82), rgba(124,58,237,0.82)) !important;
}
.toast-container .toast .toast-body { font-weight: 600; letter-spacing: -0.01em; }
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(0.92); filter: blur(6px); }
    to   { opacity: 1; transform: translateX(0)    scale(1);    filter: blur(0); }
}
@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ── Custom glass scrollbar ── */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(29,110,249,0.35) transparent;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(29,110,249,0.45), rgba(124,58,237,0.45));
    border-radius: var(--pos-radius-full);
    border: 3px solid transparent;
    background-clip: padding-box;
    transition: background var(--pos-duration-base) var(--pos-ease-out);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(29,110,249,0.70), rgba(124,58,237,0.70));
    background-clip: padding-box;
}

/* ── Branded text selection ── */
::selection {
    background: rgba(124,58,237,0.28);
    color: var(--pos-ink);
}
[data-bs-theme="dark"] ::selection {
    background: rgba(124,58,237,0.45);
    color: #fff;
}

/* ── Dropdown menus — liquid glass ── */
.dropdown-menu {
    background: var(--pos-glass-bg-heavy);
    backdrop-filter: blur(48px) saturate(2.6) brightness(1.04);
    -webkit-backdrop-filter: blur(48px) saturate(2.6) brightness(1.04);
    border: 1px solid var(--pos-glass-border-strong);
    border-radius: var(--pos-radius-lg);
    box-shadow: var(--pos-specular), var(--pos-shadow-xl), var(--pos-glow-sm);
    padding: var(--pos-space-2);
    animation: dropdownPop 0.22s var(--pos-ease-spring) both;
}
.dropdown-item {
    border-radius: var(--pos-radius-md);
    padding: 8px 12px;
    transition: background var(--pos-duration-fast) var(--pos-ease-out),
                color var(--pos-duration-fast) var(--pos-ease-out),
                transform var(--pos-duration-fast) var(--pos-ease-spring);
}
.dropdown-item:hover, .dropdown-item:focus {
    background: var(--pos-primary-subtle);
    color: var(--pos-primary);
    transform: translateX(2px);
}
.dropdown-item.active, .dropdown-item:active {
    background: var(--pos-gradient-primary);
    color: #fff;
}
@keyframes dropdownPop {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── Global focus-visible glow ── */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--pos-primary);
    outline-offset: 2px;
    border-radius: var(--pos-radius-sm);
}

/* ── Page route transition — blur reveal ── */
.app-content > *, .pos-mobile-main > * {
    animation: pageReveal 0.42s var(--pos-ease-decelerate) both;
}
@keyframes pageReveal {
    from { opacity: 0; transform: translateY(10px); filter: blur(8px); }
    to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* ── Bootstrap accordion — glass (home FAQ) ── */
.accordion-item {
    background: var(--pos-glass-bg);
    backdrop-filter: blur(28px) saturate(2.0);
    -webkit-backdrop-filter: blur(28px) saturate(2.0);
    border: 1px solid var(--pos-glass-border);
    border-radius: var(--pos-radius-lg) !important;
    margin-bottom: var(--pos-space-2);
    overflow: hidden;
}
.accordion-button {
    background: transparent;
    font-weight: 600;
    color: var(--pos-ink);
    border-radius: var(--pos-radius-lg) !important;
}
.accordion-button:not(.collapsed) {
    background: var(--pos-primary-subtle);
    color: var(--pos-primary);
    box-shadow: none;
}
.accordion-button:focus { box-shadow: 0 0 0 3px var(--pos-focus-ring); }

/* ── Spinner glow ── */
.spinner-border, .spinner-grow {
    filter: drop-shadow(0 0 6px rgba(29,110,249,0.4));
}
