:root {
    color-scheme: light;
    --app-bg: #f4f7fb;
    --app-surface: #fff;
    --app-surface-soft: #f8fafc;
    --app-border: #dfe7f0;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --brand: #1d79f1;
    --brand-dark: #174fae;
    --brand-soft: #eaf5ff;
    --accent: #14b8a6;
    --danger: #be123c;
    --danger-soft: #fff1f2;
    --shadow: 0 24px 60px -36px rgba(15, 23, 42, .38);
    --radius: 1.25rem;
    font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root.dark {
    color-scheme: dark;
    --app-bg: #07101f;
    --app-surface: #0e1a2d;
    --app-surface-soft: #122138;
    --app-border: #263750;
    --app-text: #e8eef7;
    --app-muted: #93a4bb;
    --brand-soft: rgba(50, 152, 252, .13);
    --danger-soft: rgba(190, 18, 60, .14);
    --shadow: 0 24px 60px -32px rgba(0, 0, 0, .75);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--app-bg); color: var(--app-text); line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 5% 0, rgba(50, 152, 252, .08), transparent 25rem), radial-gradient(circle at 95% 100%, rgba(20, 184, 166, .07), transparent 28rem); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: .65rem; font-size: clamp(1.75rem, 7vw, 2.75rem); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: .4rem; font-size: 1.2rem; letter-spacing: -.02em; }
small { color: var(--app-muted); }
:focus-visible { outline: 3px solid rgba(50, 152, 252, .45); outline-offset: 2px; }

.page-eyebrow { margin-bottom: .55rem; color: var(--brand); font-size: .7rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.lead { margin-bottom: 1.5rem; color: var(--app-muted); font-size: .94rem; }
.app-brand { display: inline-flex; align-items: center; gap: .75rem; min-width: 0; }
.app-brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 2.7rem; height: 2.7rem; border-radius: .9rem; color: #fff; background: linear-gradient(135deg, #3298fc, #20c7b6); box-shadow: 0 12px 24px -14px #142b56; font-size: 1.35rem; }
.app-brand span:last-child { display: grid; }
.app-brand small { color: #60a5fa; font-size: .62rem; font-weight: 900; letter-spacing: .22em; }
.app-brand strong { color: var(--app-text); font-size: .95rem; }

.icon-button { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--app-border); border-radius: .85rem; color: var(--app-text); background: var(--app-surface); cursor: pointer; }
.icon-button:hover { border-color: #8ed4ff; background: var(--brand-soft); }

.btn { display: inline-flex; min-height: 2.8rem; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1rem; border: 1px solid transparent; border-radius: .85rem; font-weight: 800; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-success { color: #fff; background: linear-gradient(135deg, #1d79f1, #1762de); box-shadow: 0 14px 26px -16px rgba(29, 121, 241, .85); }
.btn-success:hover { background: linear-gradient(135deg, #1762de, #194fb4); }
.btn-danger { color: #fff; background: #be123c; }
.btn-danger:hover { background: #9f1239; }
.btn-link { border-color: var(--app-border); color: var(--app-muted); background: var(--app-surface); }
.btn-google { border-color: var(--app-border); color: var(--app-text); background: var(--app-surface); }
.btn-google:hover { border-color: #94a3b8; box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .6); }
.btn-google.is-disabled { cursor: not-allowed; opacity: .55; }
.btn-google.is-disabled:hover { transform: none; box-shadow: none; }
.google-mark { display: grid; width: 1.45rem; height: 1.45rem; place-items: center; border-radius: 50%; color: #fff; background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0); font-size: .72rem; font-weight: 900; }
.btn-block { width: 100%; }
.btn-sm { min-height: 2.25rem; padding: .4rem .65rem; font-size: .78rem; }

.form-stack { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: 1rem; }
.form-field { display: grid; align-content: start; gap: .4rem; }
.form-field label { font-size: .85rem; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 3rem; padding: .72rem .85rem; border: 1px solid var(--app-border); border-radius: .8rem; color: var(--app-text); background: var(--app-surface-soft); }
textarea { resize: vertical; }
input::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus { border-color: #59b9ff; outline: 3px solid rgba(89, 185, 255, .16); }
.form-card { position: relative; padding: clamp(1.15rem, 5vw, 2.25rem); border: 1px solid var(--app-border); border-radius: var(--radius); background: var(--app-surface); box-shadow: var(--shadow); }
.form-actions { display: grid; gap: .75rem; margin-top: 1.35rem; }
.form-message:empty { display: none; }
.alert { margin: 1rem 0; padding: .8rem .9rem; border: 1px solid; border-radius: .8rem; font-size: .85rem; }
.alert-danger { border-color: #fecdd3; color: var(--danger); background: var(--danger-soft); }
.alert-success { border-color: #99f6e4; color: #0f766e; background: #ecfdf5; }
.alert-info { border-color: #bae6fd; color: #075985; background: #f0f9ff; }
.diagnostic-detail { margin: .45rem 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; line-height: 1.55; }
.field-error { min-height: .25rem; color: var(--danger); font-size: .75rem; font-weight: 700; }
.field-error:empty { min-height: 0; }
.check-field { display: flex; align-items: flex-start; gap: .7rem; margin-top: 1.15rem; color: var(--app-muted); font-size: .8rem; }
.check-field input { flex: 0 0 auto; width: 1.2rem; min-height: 1.2rem; margin-top: .1rem; accent-color: var(--brand); }

.login-shell { position: relative; display: grid; min-height: 100svh; }
.login-visual { display: none; }
.login-panel { position: relative; display: grid; place-items: center; min-height: 100svh; padding: max(4.5rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
.theme-toggle { position: absolute; top: max(1rem, env(safe-area-inset-top)); right: 1rem; }
.login-card { width: min(100%, 27rem); padding: 1.3rem; }
.login-card > h1 { font-size: 2rem; }
.mobile-brand { display: flex; align-items: center; gap: .65rem; margin-bottom: 2rem; }
.mobile-brand .app-brand-mark { width: 2.35rem; height: 2.35rem; font-size: 1.1rem; }
.auth-switch { margin: 1.35rem 0 0; color: var(--app-muted); text-align: center; font-size: .88rem; }
.auth-switch a { color: var(--brand); font-weight: 800; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.15rem 0; }
.auth-divider span { height: 1px; flex: 1; background: var(--app-border); }
.integration-note { display: block; margin-top: .45rem; text-align: center; font-size: .68rem; }
.secure-divider { display: flex; align-items: center; gap: .75rem; margin-top: 1.5rem; }
.secure-divider span { height: 1px; flex: 1; background: var(--app-border); }
.secure-divider small { white-space: nowrap; font-size: .7rem; }

.auth-page { position: relative; min-height: 100svh; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom)); }
.auth-header { display: flex; align-items: center; justify-content: space-between; max-width: 58rem; margin: 0 auto 1rem; }
.auth-card { max-width: 58rem; margin: 0 auto; }
.auth-card-narrow { max-width: 42rem; }

.app-shell { position: relative; min-height: 100vh; }
.app-sidebar { display: none; }
.app-main { min-height: 100vh; }
.app-mobile-header { position: sticky; z-index: 20; top: 0; display: flex; height: 4rem; align-items: center; justify-content: space-between; padding: 0 1rem; border-bottom: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-bg) 88%, transparent); backdrop-filter: blur(18px); }
.mobile-logo { display: flex; align-items: center; gap: .55rem; }
.mobile-logo .app-brand-mark { width: 2rem; height: 2rem; border-radius: .7rem; font-size: .95rem; }
.app-topbar { display: none; }
.app-content { position: relative; width: min(100%, 88rem); margin: 0 auto; padding: 1rem 1rem calc(2rem + env(safe-area-inset-bottom)); }

.mobile-drawer { visibility: hidden; position: fixed; z-index: 50; inset: 0; opacity: 0; transition: opacity .2s, visibility .2s; }
.mobile-drawer.is-open { visibility: visible; opacity: 1; }
.mobile-drawer-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(2, 6, 23, .62); }
.mobile-drawer-panel { position: absolute; inset: 0 auto 0 0; display: flex; width: min(86vw, 20rem); flex-direction: column; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); background: var(--app-surface); box-shadow: 20px 0 50px rgba(2, 6, 23, .3); transform: translateX(-100%); transition: transform .22s ease-out; }
.mobile-drawer.is-open .mobile-drawer-panel { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; }
.drawer-logout { margin-top: auto; }

.app-nav { display: flex; flex: 1; flex-direction: column; gap: .35rem; margin-top: 1.6rem; }
.app-nav-label { margin: 1rem .8rem .3rem; color: #94a3b8; font-size: .62rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.app-nav-link { display: flex; min-height: 3.5rem; align-items: center; gap: .8rem; padding: .65rem .8rem; border-radius: .9rem; color: var(--app-muted); font-size: .85rem; }
.app-nav-link:hover, .app-nav-link[aria-current="page"] { color: var(--brand-dark); background: var(--brand-soft); }
.dark .app-nav-link:hover, .dark .app-nav-link[aria-current="page"] { color: #8ed4ff; }
.app-nav-link.is-disabled { cursor: not-allowed; opacity: .58; }
.app-nav-icon { display: grid; width: 2rem; height: 2rem; place-items: center; flex: 0 0 auto; border-radius: .65rem; background: var(--app-surface-soft); font-size: 1rem; }
.app-nav-link strong, .app-nav-link small { display: block; }
.app-nav-link small { margin-top: .08rem; font-size: .68rem; }

.welcome-card { overflow: hidden; position: relative; display: flex; min-height: 12rem; align-items: center; justify-content: space-between; padding: 1.35rem; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, #142b56, #1762de 62%, #14b8a6); box-shadow: 0 28px 60px -36px rgba(23, 98, 222, .8); }
.welcome-card::after { content: ""; position: absolute; width: 13rem; height: 13rem; right: -5rem; bottom: -7rem; border: 2.5rem solid rgba(255,255,255,.08); border-radius: 50%; }
.welcome-card > div { position: relative; z-index: 1; max-width: 42rem; }
.welcome-card .page-eyebrow { color: #5eead4; }
.welcome-card h1 { font-size: clamp(1.55rem, 6vw, 2.5rem); }
.welcome-card p:last-child { margin-bottom: 0; color: #dbeafe; font-size: .88rem; }
.welcome-icon { position: relative; z-index: 1; display: none; font-size: 5rem; opacity: .18; }

.stats-grid { display: grid; gap: .85rem; margin-top: 1rem; }
.stat-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--app-border); border-radius: 1rem; background: var(--app-surface); box-shadow: var(--shadow); }
.stat-icon { display: grid; width: 2.8rem; height: 2.8rem; place-items: center; flex: 0 0 auto; border-radius: .85rem; font-weight: 900; }
.stat-icon.blue { color: #1762de; background: #eaf5ff; }
.stat-icon.teal { color: #0f766e; background: #ccfbf1; }
.stat-icon.amber { color: #b45309; background: #fef3c7; }
.dark .stat-icon { background: rgba(255,255,255,.08); }
.stat-card small, .stat-card strong, .stat-card p { display: block; }
.stat-card strong { margin: .05rem 0; font-size: 1.35rem; }
.stat-card p { margin: 0; color: var(--app-muted); font-size: .72rem; }

.content-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.content-card { padding: 1.15rem; border: 1px solid var(--app-border); border-radius: var(--radius); background: var(--app-surface); box-shadow: var(--shadow); }
.approval-card { margin-top: 1rem; }
.approval-list { display: grid; gap: .65rem; margin-top: 1rem; }
.approval-item { display: grid; gap: .7rem; padding: .85rem; border: 1px solid var(--app-border); border-radius: .9rem; background: var(--app-surface-soft); }
.approval-item strong, .approval-item small { display: block; overflow-wrap: anywhere; }
.approval-item small { margin-top: .2rem; font-size: .7rem; }
.approval-item .btn { width: 100%; }
.empty-state { margin: 1rem 0 0; padding: 1rem; border-radius: .8rem; color: var(--app-muted); background: var(--app-surface-soft); font-size: .82rem; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.status-pill { padding: .3rem .55rem; border-radius: 999px; color: #0f766e; background: #ccfbf1; font-size: .68rem; font-weight: 900; white-space: nowrap; }
.status-pill-rented { color: #1d4ed8; background: #dbeafe; }
.status-pill-available { color: #0f766e; background: #ccfbf1; }
.dark .status-pill-rented { color: #bfdbfe; background: rgba(29,78,216,.25); }
.steps-list { display: grid; gap: 1rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.steps-list li { display: flex; gap: .85rem; align-items: flex-start; }
.steps-list li > span { display: grid; width: 2rem; height: 2rem; place-items: center; flex: 0 0 auto; border: 1px solid var(--app-border); border-radius: 50%; color: var(--app-muted); font-size: .75rem; font-weight: 900; }
.steps-list .is-done > span { border-color: #99f6e4; color: #0f766e; background: #ccfbf1; }
.steps-list strong { font-size: .85rem; }
.steps-list p { margin: .2rem 0 0; color: var(--app-muted); font-size: .75rem; }
.profile-card dl { margin: 1rem 0 0; }
.profile-card dl div { padding: .75rem 0; border-bottom: 1px solid var(--app-border); }
.profile-card dl div:last-child { border-bottom: 0; }
.profile-card dt { color: var(--app-muted); font-size: .7rem; }
.profile-card dd { margin: .15rem 0 0; overflow-wrap: anywhere; font-size: .86rem; font-weight: 800; }
.status-dot { display: inline-block; width: .55rem; height: .55rem; margin-right: .2rem; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 .2rem rgba(16,185,129,.13); }
.module-heading { margin: .5rem 0 1.25rem; }
.module-heading h1 { margin-bottom: 0; }
.module-heading > div > p:last-child { margin: .45rem 0 0; color: var(--app-muted); font-size: .85rem; }
.module-heading-actions { display: grid; gap: 1rem; }
.dashboard-section + .dashboard-section { margin-top: 1.5rem; }
.dashboard-property-grid { margin-top: .25rem; }
.empty-dashboard { display: grid; justify-items: start; gap: 1rem; align-items: center; }
.empty-dashboard .empty-icon { margin: 0; }
.empty-dashboard p { margin-bottom: 0; color: var(--app-muted); font-size: .8rem; }
.property-grid { display: grid; gap: 1rem; }
.property-card { overflow: hidden; display: grid; border: 1px solid var(--app-border); border-radius: var(--radius); background: var(--app-surface); box-shadow: var(--shadow); transition: transform .16s, border-color .16s; }
.property-card:hover { transform: translateY(-2px); border-color: #8ed4ff; }
.property-cover { position: relative; display: grid; min-height: 8.5rem; place-items: center; color: #fff; background: linear-gradient(145deg, #142b56, #1762de 68%, #14b8a6); }
.property-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.property-cover > span { font-size: 4rem; opacity: .2; }
.property-cover small { position: absolute; right: .75rem; bottom: .65rem; padding: .25rem .5rem; border-radius: 999px; color: #e0f2fe; background: rgba(2, 6, 23, .45); font-size: .65rem; }
.property-body { display: grid; gap: .45rem; padding: 1rem; }
.property-body > strong { margin-top: .15rem; font-size: 1.05rem; }
.property-body > small { line-height: 1.5; }
.property-body .status-pill { justify-self: start; }
.property-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.property-meta span { padding: .25rem .45rem; border-radius: .5rem; color: var(--app-muted); background: var(--app-surface-soft); font-size: .65rem; font-weight: 800; }
.empty-module { display: grid; justify-items: center; max-width: 38rem; margin: 3rem auto; text-align: center; }
.empty-module p { color: var(--app-muted); }
.empty-icon { display: grid; width: 5rem; height: 5rem; margin-bottom: 1rem; place-items: center; border-radius: 1.4rem; color: var(--brand); background: var(--brand-soft); font-size: 2.6rem; }

.form-field-wide { grid-column: 1 / -1; }
.form-row-compact { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.form-row-compact > div { display: grid; gap: .4rem; }

.property-page { position: relative; width: min(100%, 88rem); margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) 1rem max(2rem, env(safe-area-inset-bottom)); }
.property-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.property-header-actions { display: flex; gap: .5rem; }
.property-hero { position: relative; overflow: hidden; display: flex; min-height: 13rem; align-items: center; justify-content: space-between; padding: 1.35rem; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, #142b56, #1762de 62%, #14b8a6); box-shadow: 0 28px 60px -36px rgba(23, 98, 222, .8); }
.property-hero .page-eyebrow { color: #5eead4; }
.property-hero h1 { margin-bottom: .45rem; }
.property-hero p { margin-bottom: .7rem; color: #dbeafe; }
.property-facts { display: flex; flex-wrap: wrap; gap: .55rem; }
.property-facts span { padding: .35rem .55rem; border-radius: .55rem; background: rgba(255,255,255,.1); font-size: .72rem; }
.property-gallery { margin-top: 1rem; padding: 1rem; border: 1px solid var(--app-border); border-radius: var(--radius); background: var(--app-surface); box-shadow: var(--shadow); }
.gallery-heading { margin-bottom: 1rem; }
.property-gallery.is-collapsed .gallery-heading { margin-bottom: 0; }
.gallery-heading-actions { display: flex; align-items: center; gap: .5rem; }
.gallery-toggle { display: inline-flex; min-height: 2.25rem; align-items: center; gap: .35rem; padding: .4rem .65rem; border: 1px solid var(--app-border); border-radius: .7rem; color: var(--app-muted); background: var(--app-surface-soft); cursor: pointer; font-size: .68rem; font-weight: 800; }
.gallery-toggle:hover { border-color: #8ed4ff; color: var(--brand); }
.gallery-toggle-icon { font-size: .9rem; transition: transform .18s; }
.gallery-toggle[aria-expanded="false"] .gallery-toggle-icon { transform: rotate(180deg); }
.gallery-collapsible[hidden] { display: none; }
.gallery-filters { display: flex; gap: .45rem; margin-bottom: .8rem; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: thin; }
.gallery-filter { flex: 0 0 auto; padding: .45rem .65rem; border: 1px solid var(--app-border); border-radius: 999px; color: var(--app-muted); background: var(--app-surface-soft); cursor: pointer; font-size: .66rem; font-weight: 800; }
.gallery-filter.is-active { border-color: var(--brand); color: #fff; background: var(--brand); }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.gallery-sharing-summary { margin: 0 0 .75rem; padding: .65rem .75rem; border: 1px solid #bfdbfe; border-radius: .75rem; color: var(--app-muted); background: #eff6ff; font-size: .64rem; line-height: 1.5; }
.gallery-sharing-summary strong { color: var(--app-text); }
.dark .gallery-sharing-summary { border-color: #1e3a5f; background: #0c1e34; }
.photo-card[hidden] { display: none; }
.photo-card { overflow: hidden; min-width: 0; border: 1px solid var(--app-border); border-radius: 1rem; background: var(--app-surface-soft); }
.photo-preview { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; aspect-ratio: 4 / 3; border: 0; color: #fff; background: #0f172a; cursor: zoom-in; }
.photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s, opacity .2s; }
.photo-preview:hover img { transform: scale(1.035); opacity: .88; }
.photo-zoom { position: absolute; right: .55rem; bottom: .55rem; display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .65rem; background: rgba(2, 6, 23, .68); font-size: .9rem; }
.photo-main-badge { position: absolute; top: .55rem; left: .55rem; padding: .3rem .5rem; border-radius: .6rem; color: #fff; background: rgba(15,118,110,.9); font-size: .62rem; font-weight: 900; }
.photo-file-meta { display: flex; min-height: 2.45rem; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .7rem; border-top: 1px solid var(--app-border); color: var(--app-muted); font-size: .63rem; }
.photo-file-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-file-meta a, .archived-download { flex: 0 0 auto; color: var(--brand); font-weight: 900; }
.photo-tags { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 .7rem .55rem; }
.photo-tags span { padding: .2rem .4rem; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: .58rem; font-weight: 800; }
.photo-card-summary { display: grid; gap: .5rem; padding: 0 .7rem .7rem; }
.photo-card-summary .photo-caption { display: -webkit-box; overflow: hidden; padding: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.photo-card-summary .photo-tags { padding: 0; }
.photo-summary-status { display: flex; align-items: center; justify-content: space-between; gap: .45rem; }
.photo-summary-status .photo-visibility { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-edit-button { display: inline-flex; min-height: 2rem; flex: 0 0 auto; align-items: center; gap: .3rem; padding: .35rem .55rem; border: 1px solid var(--app-border); border-radius: .6rem; color: var(--brand); background: var(--app-surface); cursor: pointer; font-size: .63rem; font-weight: 900; }
.photo-edit-button:hover { border-color: var(--brand); background: var(--brand-soft); }
.photo-visibility { padding: .4rem .55rem; border-radius: .65rem; font-size: .63rem; font-weight: 900; text-align: center; }
.photo-visibility.is-public { color: #0f766e; background: #ccfbf1; }
.photo-visibility.is-private { color: #9a3412; background: #ffedd5; }
.photo-caption { margin: 0; padding: .7rem; color: var(--app-muted); font-size: .75rem; line-height: 1.5; }
.status-pill-muted { color: var(--app-muted); background: var(--app-surface-soft); }
.archived-photo-list { display: grid; gap: .6rem; margin-top: 1rem; }
.archived-photo-item { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: .65rem; align-items: center; padding: .55rem; border: 1px solid var(--app-border); border-radius: .8rem; background: var(--app-surface-soft); }
.archived-photo-item img { width: 3.5rem; height: 3.5rem; border-radius: .65rem; object-fit: cover; filter: saturate(.35); }
.archived-photo-item strong, .archived-photo-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archived-photo-item strong { font-size: .72rem; }
.archived-photo-item small { font-size: .62rem; }
.archived-photo-item form { grid-column: 1 / -1; }
.archived-photo-item .btn { width: 100%; }
.archived-actions { display: grid; grid-column: 1 / -1; gap: .45rem; }
.gallery-open { overflow: hidden; }
.photo-edit-modal[hidden] { display: none; }
.photo-edit-modal { position: fixed; z-index: 105; inset: 0; display: grid; place-items: end center; padding: max(.5rem, env(safe-area-inset-top)) max(.5rem, env(safe-area-inset-right)) max(.5rem, env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left)); }
.photo-edit-dialog { position: relative; width: min(100%, 44rem); max-height: calc(100svh - 1rem); overflow: auto; padding: 1rem; border: 1px solid rgba(255,255,255,.15); border-radius: 1rem; color: #fff; background: #07101f; box-shadow: 0 30px 90px rgba(0,0,0,.65); }
.photo-edit-overview { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .75rem; align-items: center; margin-top: .8rem; padding: .65rem; border-radius: .8rem; background: rgba(255,255,255,.06); }
.photo-edit-overview img { width: 5rem; height: 5rem; border-radius: .65rem; object-fit: cover; background: #020617; }
.photo-edit-overview strong, .photo-edit-overview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-edit-overview strong { font-size: .78rem; }
.photo-edit-overview small { margin: .15rem 0 .4rem; color: #94a3b8; font-size: .64rem; }
.photo-edit-overview a { display: inline-block; margin-top: .4rem; color: #5eead4; font-size: .65rem; font-weight: 800; }
.photo-edit-overview .photo-visibility { display: inline-flex; font-size: .58rem; }
.photo-edit-sections { display: grid; gap: .7rem; margin-top: .75rem; }
.photo-edit-section { display: grid; gap: .45rem; padding: .75rem; border: 1px solid rgba(255,255,255,.12); border-radius: .8rem; background: rgba(255,255,255,.04); }
.photo-edit-section label { color: #cbd5e1; font-size: .67rem; font-weight: 800; }
.photo-edit-section input, .photo-edit-section textarea { width: 100%; padding: .7rem; border: 1px solid #334155; border-radius: .7rem; color: #f8fafc; background: #0f172a; font: inherit; }
.photo-edit-section textarea { min-height: 5.5rem; resize: vertical; }
.photo-edit-section .btn { justify-self: stretch; }
.photo-edit-actions { display: grid; gap: .5rem; }
.photo-edit-actions form { display: grid; }
@media (min-width: 40rem) {
    .photo-edit-modal { place-items: center; padding: 1rem; }
    .photo-edit-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .photo-edit-actions { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left)); }
.gallery-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(2, 6, 23, .92); }
.gallery-dialog { position: relative; display: grid; width: min(100%, 78rem); max-height: calc(100svh - 1.5rem); overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 1rem; color: #fff; background: #07101f; box-shadow: 0 30px 90px rgba(0,0,0,.65); }
.gallery-toolbar { display: flex; min-height: 3rem; align-items: center; justify-content: space-between; padding: .4rem .5rem .4rem 1rem; color: #cbd5e1; font-size: .75rem; font-weight: 800; }
.gallery-toolbar-actions { display: flex; align-items: center; gap: .45rem; }
.gallery-toolbar-actions a { padding: .5rem .7rem; border-radius: .65rem; color: #fff; background: rgba(255,255,255,.1); }
.gallery-close { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; padding: 0; border: 0; border-radius: .7rem; color: #fff; background: rgba(255,255,255,.1); cursor: pointer; font-size: 1.65rem; line-height: 1; }
.gallery-stage { position: relative; display: grid; min-height: min(65svh, 40rem); place-items: center; overflow: hidden; background: #020617; touch-action: pan-y; }
.gallery-stage img { display: block; max-width: 100%; max-height: min(65svh, 40rem); object-fit: contain; }
.gallery-nav { position: absolute; z-index: 2; top: 50%; display: grid; width: 2.75rem; height: 3.5rem; place-items: center; padding: 0; border: 0; border-radius: .8rem; color: #fff; background: rgba(2,6,23,.68); cursor: pointer; transform: translateY(-50%); font-size: 2rem; }
.gallery-nav-prev { left: .5rem; }
.gallery-nav-next { right: .5rem; }
.gallery-copy { min-height: 4.3rem; padding: .85rem 1rem 1rem; }
.gallery-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.gallery-copy small { display: block; margin-top: .2rem; color: #5eead4; font-size: .66rem; }
.gallery-copy p { margin: .25rem 0 0; color: #94a3b8; font-size: .75rem; }
.cover-modal[hidden] { display: none; }
.cover-modal { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left)); }
.cover-dialog { position: relative; width: min(100%, 42rem); max-height: calc(100svh - 1.5rem); overflow: auto; padding: 1rem; border: 1px solid rgba(255,255,255,.15); border-radius: 1rem; color: #fff; background: #07101f; box-shadow: 0 30px 90px rgba(0,0,0,.65); }
.cover-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.cover-header h2 { margin-bottom: 0; }
.cover-help { margin: .8rem 0; color: #94a3b8; font-size: .75rem; }
.cover-source { position: relative; display: block; width: 100%; overflow: hidden; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: .8rem; background: #020617; cursor: crosshair; }
.cover-source img { display: block; width: auto; max-width: 100%; height: auto; max-height: 48svh; margin: 0 auto; object-fit: contain; }
.cover-focus { position: absolute; width: 1.4rem; height: 1.4rem; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px rgba(2,6,23,.7); pointer-events: none; transform: translate(-50%,-50%); }
.cover-focus::before, .cover-focus::after { content: ""; position: absolute; background: #fff; }
.cover-focus::before { width: .45rem; height: 2px; top: calc(50% - 1px); left: calc(50% - .225rem); }
.cover-focus::after { width: 2px; height: .45rem; top: calc(50% - .225rem); left: calc(50% - 1px); }
.cover-result { margin: .8rem 0; }
.cover-result > span { display: block; margin-bottom: .35rem; color: #94a3b8; font-size: .66rem; font-weight: 800; }
.cover-preview { overflow: hidden; aspect-ratio: 16 / 7; border-radius: .75rem; background: #020617; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.property-layout { display: grid; gap: 1rem; margin-top: 1rem; }
.property-main-column, .property-side-column { display: grid; align-content: start; gap: 1rem; }
.property-description { margin: .7rem 0 0; color: var(--app-muted); font-size: .82rem; line-height: 1.7; }
.people-list { display: grid; gap: .6rem; margin-top: 1rem; }
.person-item { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .7rem; padding: .7rem; border: 1px solid var(--app-border); border-radius: .85rem; background: var(--app-surface-soft); }
.person-item > div { min-width: 0; }
.person-item strong, .person-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-item strong { font-size: .78rem; }
.person-item small { font-size: .65rem; }
.person-item form { grid-column: 1 / -1; }
.person-item form .btn { width: 100%; }
.inline-add-form { display: grid; gap: .65rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--app-border); }
.equipment-list { display: grid; gap: .75rem; margin-top: 1rem; }
.equipment-section.is-collapsed .equipment-section-heading { margin-bottom: 0; }
.equipment-section-heading { display: grid; gap: .75rem; }
.equipment-heading-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: .45rem; }
.equipment-collapsible[hidden] { display: none; }
.equipment-list-item { display: grid; width: 100%; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .65rem; border: 1px solid var(--app-border); border-radius: .9rem; color: var(--app-text); background: var(--app-surface-soft); cursor: pointer; text-align: left; transition: border-color .15s, transform .15s, background .15s; }
.equipment-list-item:hover { border-color: #8ed4ff; background: var(--brand-soft); transform: translateY(-1px); }
.equipment-list-thumbnail { overflow: hidden; display: grid; width: 3.5rem; height: 3.5rem; place-items: center; border-radius: .75rem; color: var(--brand); background: var(--brand-soft); font-size: 1.4rem; }
.equipment-list-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.equipment-list-copy { min-width: 0; }
.equipment-list-copy strong, .equipment-list-copy small { display: block; overflow: hidden; text-overflow: ellipsis; }
.equipment-list-copy strong { white-space: nowrap; font-size: .8rem; }
.equipment-list-copy small { display: -webkit-box; margin-top: .15rem; color: var(--app-muted); font-size: .64rem; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.equipment-list-copy > span { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.equipment-list-copy em { padding: .18rem .38rem; border-radius: 999px; color: var(--app-muted); background: var(--app-surface); font-size: .56rem; font-style: normal; font-weight: 800; }
.equipment-list-action { display: inline-flex; align-items: center; gap: .25rem; color: var(--brand); font-size: .64rem; font-weight: 900; white-space: nowrap; }
.equipment-list-action b { font-size: 1.1rem; }
.equipment-item { padding: .8rem; border: 1px solid var(--app-border); border-radius: .9rem; background: var(--app-surface-soft); }
.equipment-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.equipment-heading strong, .equipment-heading small { display: block; }
.equipment-heading small { margin-top: .15rem; font-size: .65rem; }
.equipment-item > p { margin: .65rem 0 0; color: var(--app-muted); font-size: .74rem; }
.equipment-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem; margin-top: .7rem; }
.equipment-photos a { display: block; overflow: hidden; aspect-ratio: 1; border-radius: .65rem; background: var(--app-surface); }
.equipment-photos img { width: 100%; height: 100%; object-fit: cover; }
.equipment-photo-item { display: grid; gap: .35rem; align-content: start; }
.equipment-photo-item form { display: grid; gap: .3rem; }
.equipment-photo-item form label { display: flex; gap: .3rem; align-items: center; color: var(--app-muted); font-size: .6rem; font-weight: 800; }
.equipment-photo-item form input { width: auto; accent-color: var(--brand); }
.equipment-photo-item form .btn { justify-self: start; }
.equipment-actions { display: grid; gap: .7rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--app-border); }
.equipment-actions form { display: grid; gap: .45rem; }
.equipment-actions label, .purchase-documents > strong { color: var(--app-muted); font-size: .66rem; font-weight: 800; }
.equipment-actions form > small { color: var(--app-muted); font-size: .61rem; }
.purchase-documents { display: grid; gap: .45rem; }
.purchase-documents ul { display: grid; gap: .3rem; margin: 0; padding-left: 1rem; color: var(--brand); font-size: .67rem; }
.purchase-documents > small:not(.configuration-warning) { color: var(--app-muted); font-size: .66rem; }
.configuration-warning { display: block; padding: .55rem; border-radius: .65rem; color: #9a3412; background: #ffedd5; line-height: 1.5; }
.equipment-add-form, .handover-form { grid-template-columns: 1fr; }
.equipment-modal[hidden], [data-equipment-detail-store][hidden], .equipment-detail[hidden] { display: none; }
.equipment-modal { position: fixed; z-index: 108; inset: 0; display: grid; place-items: end center; padding: max(.5rem, env(safe-area-inset-top)) max(.5rem, env(safe-area-inset-right)) max(.5rem, env(safe-area-inset-bottom)) max(.5rem, env(safe-area-inset-left)); }
.equipment-dialog { position: relative; width: min(100%, 48rem); max-height: calc(100svh - 1rem); overflow: auto; padding: 1rem; border: 1px solid var(--app-border); border-radius: 1rem; color: var(--app-text); background: var(--app-surface); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.equipment-dialog .gallery-close { border: 1px solid var(--app-border); color: var(--app-text); background: var(--app-surface-soft); }
.equipment-modal-body { margin-top: .8rem; }
.equipment-add-form.modal-form { display: grid; gap: .8rem; margin-top: 1rem; }
.equipment-detail { display: grid; gap: .8rem; }
.equipment-detail-summary { display: grid; gap: .5rem; }
.equipment-detail-summary > div { padding: .7rem; border: 1px solid var(--app-border); border-radius: .75rem; background: var(--app-surface-soft); }
.equipment-detail-summary small, .equipment-detail-summary strong { display: block; }
.equipment-detail-summary small { font-size: .6rem; }
.equipment-detail-summary strong { margin-top: .12rem; font-size: .72rem; }
.equipment-detail-description, .equipment-detail-section { padding: .8rem; border: 1px solid var(--app-border); border-radius: .85rem; background: var(--app-surface-soft); }
.equipment-detail-description > strong, .equipment-detail-heading > strong { font-size: .73rem; }
.equipment-detail-description p { margin: .35rem 0 0; color: var(--app-muted); font-size: .72rem; line-height: 1.55; }
.equipment-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.equipment-detail-heading span { display: inline-grid; min-width: 1.6rem; min-height: 1.6rem; place-items: center; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: .62rem; font-weight: 900; }
.equipment-detail-section .empty-state { margin-top: .65rem; }
.valuation-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.valuation-fieldset legend { margin-bottom: .45rem; color: var(--app-text); font-size: .7rem; font-weight: 800; }
.valuation-options { display: grid; gap: .5rem; }
.valuation-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .55rem; align-items: start; padding: .7rem; border: 1px solid var(--app-border); border-radius: .75rem; background: var(--app-surface); cursor: pointer; }
.valuation-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.valuation-option input { margin-top: .15rem; accent-color: var(--brand); }
.valuation-option strong, .valuation-option small { display: block; }
.valuation-option strong { font-size: .72rem; }
.valuation-option small { margin-top: .12rem; color: var(--app-muted); font-size: .62rem; line-height: 1.45; }
.valuation-field[hidden] { display: none; }
.billing-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; align-items: start; margin-top: .85rem; padding: .75rem; border: 1px solid #bfdbfe; border-radius: .8rem; background: #eff6ff; }
.dark .billing-summary { border-color: #1e3a5f; background: #0c1e34; }
.billing-summary strong, .billing-summary small, .billing-summary em { display: block; }
.billing-summary strong { font-size: .76rem; }
.billing-summary small { margin-top: .15rem; color: var(--app-muted); font-size: .66rem; line-height: 1.5; }
.billing-summary em { margin-top: .35rem; color: #b45309; font-size: .65rem; font-style: normal; font-weight: 800; }
.billing-summary.is-incomplete { border-color: #fdba74; background: #fff7ed; }
.dark .billing-summary.is-incomplete { border-color: #7c2d12; background: #2b160d; }
.tenant-share { color: var(--brand) !important; font-weight: 800; }
.billing-form { display: grid; gap: .7rem; margin-top: 1rem; padding: .85rem; border: 1px solid var(--app-border); border-radius: .85rem; background: var(--app-surface-soft); }
.billing-form > div:first-child > strong, .billing-form > div:first-child > small { display: block; }
.billing-form > div:first-child > strong { font-size: .74rem; }
.billing-form > div:first-child > small { margin-top: .12rem; color: var(--app-muted); font-size: .63rem; }
.billing-add-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.billing-add-fieldset legend { margin-bottom: .45rem; font-size: .7rem; font-weight: 800; }
.billing-mode-options { display: grid; gap: .45rem; }
.billing-mode-option { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; align-items: start; padding: .65rem; border: 1px solid var(--app-border); border-radius: .7rem; background: var(--app-surface); cursor: pointer; }
.billing-mode-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.billing-mode-option input { margin-top: .12rem; accent-color: var(--brand); }
.billing-mode-option strong, .billing-mode-option small { display: block; }
.billing-mode-option strong { font-size: .68rem; }
.billing-mode-option small { margin-top: .1rem; color: var(--app-muted); font-size: .6rem; line-height: 1.4; }
.billing-shares { display: grid; gap: .45rem; padding: .65rem; border-radius: .7rem; background: var(--app-surface); }
.billing-shares[hidden] { display: none; }
.billing-shares > p { margin: 0 0 .15rem; color: var(--app-muted); font-size: .63rem; line-height: 1.45; }
.billing-shares label { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem auto; gap: .4rem; align-items: center; font-size: .66rem; font-weight: 700; }
.billing-shares input { min-width: 0; }
.billing-shares label > small { color: var(--app-muted); font-weight: 800; }
.tenant-add-form { grid-template-columns: 1fr !important; align-items: stretch !important; }
.property-tenants-card { padding: .85rem; }
.property-tenants-card .section-heading { margin-bottom: .45rem; }
.property-tenants-card .people-list { gap: .35rem; }
.property-tenants-card .person-item { padding: .45rem 0; }
.property-tenants-card .user-avatar { width: 2rem; height: 2rem; font-size: .62rem; }
.compact-empty { padding: .65rem 0; }
.tenant-billing-compact { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .45rem; align-items: center; margin-top: .55rem; padding: .5rem .6rem; border-radius: .65rem; color: var(--app-muted); background: var(--app-surface-soft); }
.tenant-billing-compact > span { display: grid; width: 1.55rem; height: 1.55rem; place-items: center; border-radius: .45rem; color: var(--brand); background: var(--brand-soft); font-weight: 900; }
.tenant-billing-compact strong, .tenant-billing-compact small { display: block; }
.tenant-billing-compact strong { color: var(--app-text); font-size: .65rem; }
.tenant-billing-compact small { margin-top: .08rem; color: #b45309; font-size: .57rem; }
.tenant-management { margin-top: .55rem; border-top: 1px solid var(--app-border); }
.tenant-management > summary { padding: .65rem 0 .1rem; color: var(--brand); font-size: .65rem; font-weight: 800; cursor: pointer; }
.tenant-management-content { display: grid; gap: .75rem; padding-top: .45rem; }
.tenant-management .billing-form, .tenant-management .tenant-add-form { margin-top: 0; padding: .65rem; }
.property-side-column .billing-shares label { grid-template-columns: minmax(0,1fr) 5.4rem auto; }
.property-document-list { display: grid; gap: .65rem; margin-top: .8rem; }
.property-document-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .65rem; padding: .75rem; border: 1px solid var(--app-border); border-radius: .8rem; background: var(--app-surface-soft); }
.document-icon { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .65rem; color: var(--brand); background: var(--brand-soft); font-weight: 900; }
.document-copy { min-width: 0; }
.document-copy > small, .document-copy > strong { display: block; }
.document-copy > small { color: var(--app-muted); font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.document-copy > strong { margin-top: .1rem; font-size: .73rem; overflow-wrap: anywhere; }
.document-copy > p { margin: .3rem 0; color: var(--app-muted); font-size: .65rem; line-height: 1.5; }
.document-copy > a { display: block; margin-top: .45rem; color: var(--brand); font-size: .65rem; font-weight: 800; }
.reminder-pill { display: inline-flex; margin-top: .4rem; padding: .22rem .42rem; border-radius: 999px; color: #166534; background: #dcfce7; font-size: .58rem; font-weight: 800; }
.reminder-pill.is-overdue { color: #991b1b; background: #fee2e2; }
.reminder-pill.is-empty { color: var(--app-muted); background: var(--app-surface); }
.document-reminder-form { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; align-items: end; padding-top: .55rem; border-top: 1px solid var(--app-border); }
.document-reminder-form label { display: grid; gap: .3rem; font-size: .62rem; font-weight: 800; }
.property-document-form { display: grid; gap: .6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--app-border); }
.dashboard-reminders { margin-top: 1rem; }
.dashboard-reminder-list { display: grid; gap: .55rem; margin-top: .8rem; }
.dashboard-reminder-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .65rem; align-items: center; padding: .7rem; border: 1px solid var(--app-border); border-radius: .75rem; color: inherit; background: var(--app-surface-soft); }
.dashboard-reminder-item:hover { border-color: var(--brand); }
.dashboard-reminder-item strong, .dashboard-reminder-item small { display: block; }
.dashboard-reminder-item strong { font-size: .7rem; }
.dashboard-reminder-item small { margin-top: .12rem; color: var(--app-muted); font-size: .61rem; }
.dashboard-reminder-date { color: var(--brand); font-size: .64rem; font-weight: 900; white-space: nowrap; }
.dashboard-reminder-date.is-overdue { color: #b91c1c; }
.handover-list { display: grid; gap: .25rem; margin-top: 1rem; }
.handover-item { display: flex; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--app-border); }
.handover-item:last-child { border-bottom: 0; }
.handover-item strong, .handover-item small { display: block; }
.handover-item strong { font-size: .76rem; }
.handover-item small { margin-top: .15rem; font-size: .64rem; }
.handover-item p { margin: .3rem 0 0; color: var(--app-muted); font-size: .68rem; }
.upload-button { margin-top: .65rem; }
.upload-progress { display: block; margin-bottom: .65rem; color: var(--brand); font-size: .75rem; font-weight: 800; }
.danger-zone { border-color: #fecdd3; }
.danger-zone p:last-of-type { color: var(--app-muted); font-size: .78rem; }
.history-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.history-list li { position: relative; display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px solid var(--app-border); }
.history-list li:last-child { border-bottom: 0; }
.history-dot { width: .7rem; height: .7rem; margin-top: .35rem; flex: 0 0 auto; border: 2px solid var(--app-surface); border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 .2rem var(--brand-soft); }
.history-list strong { font-size: .82rem; }
.history-list p { margin: .2rem 0 0; color: var(--app-muted); font-size: .7rem; }
.balance-card { margin-top: 1rem; }
.balance-card > strong { display: block; margin: .35rem 0; color: var(--brand); font-size: clamp(2rem, 8vw, 3.5rem); }
.balance-card > p:last-child { margin-bottom: 0; color: var(--app-muted); font-size: .78rem; }

.error-page { display: grid; min-height: 100svh; place-items: center; padding: 1rem; }
.error-card { width: min(100%, 30rem); text-align: center; }
.error-code { display: block; color: var(--brand); font-size: 3.5rem; font-weight: 900; }
.error-card p { color: var(--app-muted); }

@media (min-width: 40rem) {
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-actions { display: flex; justify-content: flex-end; }
    .form-field-empty { display: block; }
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .welcome-card { padding: 2rem; }
    .welcome-icon { display: block; }
    .approval-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .approval-item .btn { width: auto; }
    .module-heading-actions { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
    .empty-dashboard { grid-template-columns: auto minmax(0, 1fr) auto; }
    .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
    .property-gallery { padding: 1.25rem; }
    .archived-photo-item { grid-template-columns: 3.5rem minmax(0, 1fr); }
    .archived-actions { grid-template-columns: 1fr 1fr; }
    .person-item { grid-template-columns: auto minmax(0, 1fr) auto; }
    .person-item form { grid-column: auto; }
    .person-item form .btn { width: auto; }
    .inline-add-form:not(.vertical) { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
    .equipment-add-form.inline-add-form:not(.vertical) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .equipment-add-form .valuation-fieldset, .equipment-add-form .form-field:last-of-type { grid-column: 1 / -1; }
    .valuation-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .equipment-add-form > .btn { grid-column: 2; justify-self: end; }
    .equipment-modal { place-items: center; padding: 1rem; }
    .equipment-section-heading { display: flex; }
    .equipment-heading-actions { justify-content: flex-end; }
    .equipment-add-form.modal-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .equipment-add-form.modal-form .valuation-fieldset { grid-column: 1 / -1; }
    .equipment-detail-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .billing-mode-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .billing-form > .btn, .tenant-add-form > .btn { justify-self: end; }
    .property-document-item { grid-template-columns: auto minmax(0, 1fr); }
    .document-reminder-form { grid-column: 2; }
}

@media (max-width: 39.99rem) {
    .form-field-empty { display: none; }
    .form-actions .btn { width: 100%; }
}

@media (min-width: 64rem) {
    .login-shell { grid-template-columns: minmax(0, 1.2fr) minmax(27rem, .8fr); }
    .login-visual { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 3rem clamp(2rem, 5vw, 5rem); color: #fff; background: linear-gradient(145deg, rgba(7, 16, 31, .97), rgba(20, 43, 86, .95)), radial-gradient(circle at 75% 25%, #1d79f1, transparent 28rem); }
    .login-visual::after { content: "⌂"; position: absolute; right: -3rem; bottom: -10rem; color: rgba(255,255,255,.05); font-size: 31rem; line-height: 1; }
    .login-visual .app-brand strong { color: #fff; }
    .login-visual-copy { position: relative; z-index: 1; max-width: 43rem; }
    .login-visual-copy h1 { font-size: clamp(3rem, 4.4vw, 4.9rem); }
    .login-visual-copy > p:last-child { max-width: 36rem; color: #bfdbfe; font-size: 1.05rem; }
    .login-visual-footer { position: relative; z-index: 1; color: #94a3b8; font-size: .8rem; }
    .login-panel { padding: 3rem; }
    .mobile-brand { display: none; }
    .login-card { padding: 2rem; }

    .app-sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; width: 18rem; flex-direction: column; padding: 1.5rem 1rem; border-right: 1px solid var(--app-border); background: var(--app-surface); }
    .app-user-panel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; align-items: center; padding: .8rem; border: 1px solid var(--app-border); border-radius: 1rem; background: var(--app-surface-soft); }
    .app-user-panel > span:nth-child(2) { min-width: 0; }
    .app-user-panel strong, .app-user-panel small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-user-panel strong { font-size: .75rem; }
    .app-user-panel small { font-size: .65rem; }
    .app-user-panel form { grid-column: 1 / -1; }
    .user-avatar { display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: .8rem; color: #1762de; background: var(--brand-soft); font-size: .75rem; font-weight: 900; }
    .app-main { margin-left: 18rem; }
    .app-mobile-header { display: none; }
    .app-topbar { position: sticky; z-index: 20; top: 0; display: flex; height: 5rem; align-items: center; justify-content: space-between; padding: 0 2rem; border-bottom: 1px solid var(--app-border); background: color-mix(in srgb, var(--app-bg) 88%, transparent); backdrop-filter: blur(18px); }
    .app-topbar p { margin-bottom: .15rem; }
    .topbar-user { display: flex; align-items: center; gap: 1rem; text-align: right; }
    .topbar-user span strong, .topbar-user span small { display: block; }
    .topbar-user span strong { font-size: .78rem; }
    .topbar-user span small { font-size: .65rem; }
    .app-content { padding: 2rem; }
    .content-grid { grid-template-columns: minmax(0, 1.7fr) minmax(18rem, .8fr); }
    .content-card { padding: 1.5rem; }
    .stats-grid-large { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .property-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .property-page { padding: 1.5rem 2rem 3rem; }
    .property-hero { padding: 2rem; }
    .property-layout { grid-template-columns: minmax(0, 1.65fr) minmax(18rem, .75fr); }
}

.module-settings-form, .vault-form { display: grid; gap: .75rem; }
.module-settings-form > label { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; padding: .85rem; border: 1px solid var(--app-border); border-radius: .9rem; background: var(--app-surface-soft); cursor: pointer; }
.module-settings-form input, .vault-confirm input { width: 1.15rem; height: 1.15rem; margin-top: .12rem; accent-color: var(--accent); }
.module-settings-form span, .vault-confirm span { display: grid; gap: .2rem; }
.module-settings-form small, .document-vault-card small, .encrypted-upload-note { color: var(--app-muted); line-height: 1.45; }
.apartment-module-fieldset { margin: 1.25rem 0 0; padding: 1rem; border: 1px solid var(--app-border); border-radius: 1rem; }
.apartment-module-fieldset legend { padding: 0 .4rem; font-weight: 800; }
.apartment-module-fieldset > p { margin: 0 0 .25rem; color: var(--app-muted); line-height: 1.5; }
.apartment-archive-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--app-border); }
.apartment-archive-section h2 { margin: .15rem 0 .35rem; }
.apartment-archive-section form { margin-top: .85rem; }
.document-vault-card { border-color: color-mix(in srgb, var(--accent) 34%, var(--app-border)); }
.vault-settings-link { display: inline-block; margin-top: .8rem; color: var(--brand); font-size: .78rem; font-weight: 800; }
.vault-status { display: inline-flex; align-items: center; min-height: 1.8rem; padding: .25rem .65rem; border-radius: 999px; background: rgba(148, 163, 184, .14); color: var(--app-muted); font-size: .76rem; font-weight: 800; }
.vault-status.is-locked { background: rgba(245, 158, 11, .13); color: #d97706; }
.vault-status.is-unlocked { background: rgba(20, 184, 166, .14); color: var(--accent); }
.vault-confirm { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; color: var(--app-muted); font-size: .82rem; line-height: 1.45; }
.vault-recovery { margin-top: .8rem; border-top: 1px solid var(--app-border); padding-top: .8rem; }
.vault-recovery summary { color: var(--brand); font-weight: 750; cursor: pointer; }
.vault-recovery form { display: grid; gap: .65rem; margin-top: .75rem; }
.vault-recovery-result { display: grid; gap: .65rem; margin-top: 1rem; padding: .9rem; border: 1px solid rgba(245, 158, 11, .3); border-radius: .9rem; background: rgba(245, 158, 11, .08); }
.vault-recovery-result[hidden] { display: none; }
.vault-recovery-result code { display: block; max-width: 100%; padding: .75rem; border-radius: .65rem; background: rgba(15, 23, 42, .08); overflow-wrap: anywhere; user-select: all; }
.encrypted-upload-note { margin: .15rem 0; padding: .65rem .75rem; border-left: 3px solid var(--accent); border-radius: 0 .65rem .65rem 0; background: rgba(20, 184, 166, .07); font-size: .8rem; }
[data-encrypted-download][aria-disabled="true"] { color: var(--app-muted); text-decoration: underline dashed; }
.vault-unlock-dialog { width: min(100%, 30rem); }
.vault-unlock-dialog .vault-form { margin-top: .75rem; }
.vault-unlock-dialog .vault-settings-link { display: block; text-align: center; }

.finance-section.is-collapsed .finance-heading { margin-bottom: 0; }
.finance-heading, .finance-heading-actions, .finance-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.finance-heading { align-items: flex-start; justify-content: space-between; }
.finance-heading-actions { justify-content: flex-end; }
.finance-content[hidden] { display: none; }
.finance-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: 1rem; }
.finance-summary > div { min-width: 0; padding: .7rem; border: 1px solid var(--app-border); border-radius: .8rem; background: var(--app-surface-soft); }
.finance-summary > div small, .finance-summary > div strong, .finance-summary > div span { display: block; }
.finance-summary > div small { color: var(--app-muted); font-size: .58rem; font-weight: 800; }
.finance-summary > div strong { overflow: hidden; margin-top: .2rem; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.finance-summary > div span { margin-top: .15rem; color: var(--app-muted); font-size: .55rem; }
.finance-summary .finance-summary-primary { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--accent) 35%, var(--app-border)); background: color-mix(in srgb, var(--accent) 8%, var(--app-surface)); }
.finance-summary .finance-summary-primary strong { font-size: 1.3rem; }
.finance-summary .finance-summary-primary.is-due { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.06); }
.finance-actions { margin-top: .8rem; }
.finance-groups { display: grid; gap: .65rem; margin-top: .9rem; }
.finance-group { overflow: hidden; border: 1px solid var(--app-border); border-radius: .9rem; background: var(--app-surface-soft); }
.finance-group > summary { display: flex; gap: .65rem; align-items: center; justify-content: space-between; padding: .8rem; cursor: pointer; list-style: none; }
.finance-group > summary::-webkit-details-marker { display: none; }
.finance-group > summary span strong, .finance-group > summary span small { display: block; }
.finance-group > summary span strong { font-size: .76rem; }
.finance-group > summary span small { margin-top: .12rem; color: var(--app-muted); font-size: .58rem; }
.finance-group > summary b { display: grid; min-width: 1.65rem; min-height: 1.65rem; place-items: center; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: .62rem; }
.finance-group[open] > summary { border-bottom: 1px solid var(--app-border); }
.finance-list, .contract-list { display: grid; gap: .5rem; padding: .65rem; }
.finance-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .65rem; border: 1px solid var(--app-border); border-radius: .75rem; background: var(--app-surface); }
.finance-row.is-overdue { border-color: rgba(239,68,68,.28); }
.finance-row.is-cancelled { opacity: .62; }
.finance-row > div:nth-child(2) { min-width: 0; }
.finance-row > div:nth-child(2) strong, .finance-row > div:nth-child(2) small, .finance-row > div:nth-child(2) em { display: block; overflow: hidden; text-overflow: ellipsis; }
.finance-row > div:nth-child(2) strong { font-size: .7rem; white-space: nowrap; }
.finance-row > div:nth-child(2) small, .finance-row > div:nth-child(2) em { margin-top: .12rem; color: var(--app-muted); font-size: .56rem; line-height: 1.35; }
.finance-type-icon { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .6rem; color: var(--brand); background: var(--brand-soft); font-weight: 900; }
.finance-row-value { min-width: 5.4rem; text-align: right; }
.finance-row-value strong, .finance-row-value small { display: block; }
.finance-row-value strong { font-size: .68rem; }
.finance-row-value small { margin-top: .12rem; color: var(--app-muted); font-size: .53rem; }
.finance-cancel-form, .payment-review { grid-column: 1 / -1; display: grid; gap: .4rem; padding-top: .5rem; border-top: 1px solid var(--app-border); }
.finance-cancel-form { grid-template-columns: minmax(0, 1fr) auto; }
.finance-cancel-form input, .payment-review input { min-height: 2.25rem; padding: .45rem .6rem; }
.payment-review { grid-template-columns: 1fr; }
.payment-review form { display: grid; gap: .35rem; }
.contract-card { padding: .75rem; border: 1px solid var(--app-border); border-radius: .8rem; background: var(--app-surface); }
.contract-heading { display: flex; gap: .6rem; justify-content: space-between; }
.contract-heading strong, .contract-heading small { display: block; }
.contract-heading strong { font-size: .7rem; }
.contract-heading small { margin-top: .12rem; color: var(--app-muted); font-size: .57rem; }
.contract-facts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.contract-facts span { padding: .3rem .45rem; border-radius: .5rem; background: var(--app-surface-soft); color: var(--app-muted); font-size: .55rem; }
.rent-rate-list { display: grid; gap: .3rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.rent-rate-list li { display: flex; gap: .5rem; justify-content: space-between; padding: .4rem .5rem; border-radius: .55rem; background: var(--app-surface-soft); font-size: .58rem; }
.rent-rate-list li span { color: var(--app-muted); text-align: right; }
.rent-rate-form { display: grid; gap: .45rem; margin-top: .65rem; padding-top: .65rem; border-top: 1px solid var(--app-border); }
.rent-rate-form label { color: var(--app-muted); font-size: .57rem; font-weight: 800; }
.rent-rate-form input { margin-top: .2rem; }
.finance-attachments { grid-column: 1 / -1; margin-top: .25rem; padding-top: .55rem; border-top: 1px solid var(--app-border); }
.finance-attachments-heading { display: flex; gap: .5rem; align-items: center; justify-content: space-between; }
.finance-attachments-heading strong { font-size: .63rem; }
.finance-attachments-heading span { display: grid; min-width: 1.35rem; min-height: 1.35rem; place-items: center; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: .52rem; font-weight: 850; }
.finance-attachments > ul { display: grid; gap: .35rem; margin: .45rem 0 0; padding: 0; list-style: none; }
.finance-attachments > ul li { padding: .4rem .5rem; border-radius: .55rem; background: var(--app-surface-soft); font-size: .6rem; overflow-wrap: anywhere; }
.finance-attachments > small { display: block; margin-top: .35rem; color: var(--app-muted); font-size: .57rem; line-height: 1.4; }
.finance-attachment-form { display: grid; gap: .4rem; margin-top: .55rem; padding: .55rem; border: 1px dashed var(--app-border); border-radius: .65rem; }
.finance-attachment-form label { color: var(--app-muted); font-size: .58rem; font-weight: 800; }
.finance-attachment-form input { margin-top: .2rem; }
.finance-attachment-form .btn { justify-self: start; }
.finance-modal[hidden] { display: none; }
.finance-modal { position: fixed; z-index: 112; inset: 0; display: grid; place-items: end center; padding: max(.5rem,env(safe-area-inset-top)) max(.5rem,env(safe-area-inset-right)) max(.5rem,env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left)); }
.finance-dialog { position: relative; width: min(100%,46rem); max-height: calc(100svh - 1rem); overflow: auto; padding: 1rem; border: 1px solid var(--app-border); border-radius: 1rem; color: var(--app-text); background: var(--app-surface); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.finance-form { display: grid; gap: .75rem; margin-top: .8rem; }
.finance-form label, .finance-form legend { color: var(--app-muted); font-size: .67rem; font-weight: 800; }
.finance-form label > input, .finance-form label > select, .finance-form label > textarea { margin-top: .25rem; }
.finance-form fieldset { margin: 0; padding: .7rem; border: 1px solid var(--app-border); border-radius: .75rem; }
.tenant-check-list { display: grid; gap: .4rem; margin-top: .4rem; }
.tenant-check-list label { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: center; padding: .5rem; border-radius: .6rem; background: var(--app-surface-soft); }
.tenant-check-list input { width: auto; accent-color: var(--accent); }

@media (min-width: 40rem) {
    .finance-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .finance-summary .finance-summary-primary { grid-column: span 2; }
    .finance-row { grid-template-columns: auto minmax(0,1fr) auto; }
    .payment-review { grid-template-columns: auto minmax(12rem,1fr); justify-content: end; }
    .payment-review form { grid-template-columns: minmax(10rem,1fr) auto; }
    .payment-review form:first-child { grid-template-columns: auto; }
    .rent-rate-form { grid-template-columns: repeat(3,minmax(0,1fr)) auto; align-items: end; }
    .finance-modal { place-items: center; padding: 1rem; }
    .finance-form .form-row-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 39.99rem) {
    .module-settings-form > label { min-height: 3.75rem; }
    .document-vault-card .btn { width: 100%; }
}

@media (min-width: 64rem) {
    .account-settings-grid { grid-template-columns: minmax(0, 1.7fr) minmax(18rem, .8fr); }
}

.admin-user-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem; margin-bottom: 1rem; }
.admin-user-summary > div { padding: .8rem; border: 1px solid var(--app-border); border-radius: .85rem; background: var(--app-surface); }
.admin-user-summary small, .admin-user-summary strong { display: block; }
.admin-user-summary small { color: var(--app-muted); font-size: .62rem; font-weight: 800; }
.admin-user-summary strong { margin-top: .2rem; font-size: 1.25rem; }
.admin-user-filters { margin-bottom: 1rem; }
.admin-user-filters form { display: grid; gap: .6rem; }
.admin-user-filters label, .admin-user-form label { color: var(--app-muted); font-size: .66rem; font-weight: 800; }
.admin-user-filters input, .admin-user-filters select, .admin-user-form label > input, .admin-user-form label > select { margin-top: .22rem; }
.admin-user-list { display: grid; gap: .75rem; }
.admin-user-card { display: grid; gap: .7rem; }
.admin-user-main { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .65rem; align-items: center; min-width: 0; }
.admin-user-main > div { min-width: 0; }
.admin-user-main strong, .admin-user-main a, .admin-user-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-main strong { font-size: .78rem; }
.admin-user-main a { margin-top: .12rem; color: var(--brand); font-size: .65rem; }
.admin-user-main small { margin-top: .08rem; color: var(--app-muted); font-size: .6rem; }
.admin-user-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.admin-user-badges .status-pill { font-size: .54rem; }
.status-pill.status-zablokowany { color: #dc2626; background: rgba(239,68,68,.1); }
.status-pill.status-oczekujacy { color: #d97706; background: rgba(245,158,11,.11); }
.status-pill.role-administrator { color: #7c3aed; background: rgba(124,58,237,.1); }
.admin-user-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; margin: 0; }
.admin-user-facts div { min-width: 0; padding: .45rem .5rem; border-radius: .55rem; background: var(--app-surface-soft); }
.admin-user-facts dt { color: var(--app-muted); font-size: .52rem; }
.admin-user-facts dd { margin: .12rem 0 0; overflow: hidden; font-size: .62rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-actions { display: flex; justify-content: flex-end; padding-top: .55rem; border-top: 1px solid var(--app-border); }
.admin-list-note { margin: .85rem 0 0; color: var(--app-muted); font-size: .62rem; line-height: 1.5; }
.admin-user-modal[hidden] { display: none; }
.admin-user-modal { position: fixed; z-index: 118; inset: 0; display: grid; place-items: end center; padding: max(.5rem,env(safe-area-inset-top)) max(.5rem,env(safe-area-inset-right)) max(.5rem,env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left)); }
.admin-user-dialog { position: relative; width: min(100%,48rem); max-height: calc(100svh - 1rem); overflow: auto; padding: 1rem; border: 1px solid var(--app-border); border-radius: 1rem; color: var(--app-text); background: var(--app-surface); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.admin-user-form { display: grid; gap: .7rem; margin-top: .75rem; }
.admin-user-form .field-error { display: block; min-height: 0; margin-top: .15rem; color: #dc2626; font-size: .57rem; }
.admin-password-reset { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--app-border); }
.admin-password-reset summary { color: var(--brand); font-size: .72rem; font-weight: 800; cursor: pointer; }
.admin-self-note { margin: 0; padding: .65rem; border-radius: .65rem; color: var(--app-muted); background: var(--app-surface-soft); font-size: .62rem; line-height: 1.45; }

@media (min-width: 40rem) {
    .admin-user-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .admin-user-filters form { grid-template-columns: minmax(12rem,2fr) repeat(2,minmax(8rem,1fr)) auto auto; align-items: end; }
    .admin-user-card { grid-template-columns: minmax(14rem,1.2fr) minmax(9rem,.7fr) minmax(18rem,1.4fr) auto; align-items: center; }
    .admin-user-actions { padding: 0 0 0 .6rem; border-top: 0; border-left: 1px solid var(--app-border); }
    .admin-user-modal { place-items: center; padding: 1rem; }
    .admin-user-form .form-row-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
