:root {
    --bg: #f5f7ff;
    --surface: #ffffff;
    --surface-soft: #f7f8ff;
    --surface-border: rgba(24, 33, 77, 0.08);
    --text: #18214d;
    --muted: #6d7598;
    --muted-soft: #9ca4c7;
    --sidebar: #0f1736;
    --sidebar-2: #101c46;
    --primary: #5a62ff;
    --primary-2: #6f76ff;
    --violet: #8c7cff;
    --green: #39c589;
    --amber: #f6a623;
    --rose: #ff6d7b;
    --indigo: #5e74ff;
    --orange: #ff9a56;
    --shadow: 0 28px 64px rgba(20, 30, 73, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-main: "Aptos", "Segoe UI Variable Text", "Segoe UI", Tahoma, sans-serif;
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-main);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(90, 98, 255, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(57, 197, 137, 0.08), transparent 26%),
        var(--bg);
}

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

button,
input {
    font: inherit;
}

select,
textarea {
    font: inherit;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
}

.auth-body {
    padding: 28px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 1.08fr) minmax(360px, 0.92fr);
    min-height: calc(100vh - 56px);
    gap: 26px;
}

.auth-panel {
    border-radius: 30px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-panel-brand {
    color: #fff;
    padding: 44px;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.16), transparent 22%),
        linear-gradient(150deg, #0f1736 0%, #182252 34%, #3649bc 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-mark {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 28px;
    font-weight: 800;
}

.auth-panel-brand h1 {
    margin: 0 0 18px;
    max-width: 520px;
    font-size: clamp(36px, 4vw, 58px);
    line-height: 1.02;
}

.auth-copy {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.75;
}

.auth-feature-grid {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.mini-feature {
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-feature strong,
.mini-feature span {
    display: block;
}

.mini-feature strong {
    margin-bottom: 6px;
}

.mini-feature span {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

.auth-panel-form {
    padding: 40px;
    display: flex;
    align-items: center;
}

.auth-card {
    width: 100%;
}

.auth-card h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.05;
}

.auth-subcopy,
.auth-hint {
    color: var(--muted);
    line-height: 1.7;
}

.stack-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 14px;
    font-weight: 700;
}

.field-hint {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.field input {
    width: 100%;
    border: 1px solid rgba(24, 33, 77, 0.12);
    border-radius: 16px;
    background: #fbfbff;
    padding: 15px 16px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus {
    border-color: rgba(90, 98, 255, 0.5);
    box-shadow: 0 0 0 5px rgba(90, 98, 255, 0.12);
    transform: translateY(-1px);
}

.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(24, 33, 77, 0.12);
    border-radius: 16px;
    background: #fbfbff;
    padding: 15px 16px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field select:focus,
.field textarea:focus {
    border-color: rgba(90, 98, 255, 0.5);
    box-shadow: 0 0 0 5px rgba(90, 98, 255, 0.12);
    transform: translateY(-1px);
}

.primary-button,
.ghost-button,
.toggle,
.quick-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-button:hover,
.ghost-button:hover,
.toggle:hover,
.quick-button:hover {
    transform: translateY(-1px);
}

.primary-button {
    padding: 14px 20px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 16px 30px rgba(90, 98, 255, 0.22);
}

.ghost-button {
    padding: 12px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(24, 33, 77, 0.08);
}

.full-width {
    width: 100%;
}

.setup-box {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8f8ff 0%, #eef1ff 100%);
    border: 1px solid rgba(24, 33, 77, 0.08);
}

.setup-box small {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
}

.setup-box strong,
.setup-box code {
    word-break: break-word;
}

.flash {
    border-radius: 16px;
    padding: 15px 16px;
    margin-bottom: 18px;
    font-weight: 600;
    line-height: 1.6;
}

.flash-success {
    color: #0c6d49;
    background: rgba(57, 197, 137, 0.12);
    border: 1px solid rgba(57, 197, 137, 0.2);
}

.flash-error {
    color: #a43e46;
    background: rgba(255, 109, 123, 0.12);
    border: 1px solid rgba(255, 109, 123, 0.2);
}

.flash-info {
    color: #3f4da3;
    background: rgba(90, 98, 255, 0.12);
    border: 1px solid rgba(90, 98, 255, 0.18);
}

.flash-inline {
    margin-bottom: 18px;
}

.flash-floating {
    max-width: 760px;
    margin: 0 auto 20px;
}

.recovery-shell {
    min-height: 100vh;
    padding: 40px 20px;
}

.recovery-card {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.recovery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.recovery-code {
    padding: 18px;
    border-radius: 18px;
    background: #f4f6ff;
    border: 1px dashed rgba(24, 33, 77, 0.2);
    font-size: 18px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.06em;
}

.recovery-actions {
    margin-top: 28px;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 18%),
        linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
    color: rgba(255, 255, 255, 0.92);
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(90, 98, 255, 0.92), rgba(139, 124, 255, 0.94));
    font-weight: 800;
}

.sidebar-brand span {
    display: block;
    color: rgba(255, 255, 255, 0.64);
    font-size: 13px;
    margin-top: 4px;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.78);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-link:hover {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, rgba(90, 98, 255, 0.95), rgba(121, 111, 255, 0.95));
    color: #fff;
    box-shadow: 0 14px 28px rgba(27, 39, 102, 0.38);
}

.sidebar-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.sidebar-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-label {
    flex: 1;
}

.sidebar-badge {
    min-width: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 109, 123, 0.95);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.shortcut-card,
.profile-card {
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.shortcut-card {
    padding: 18px;
}

.shortcut-card h3 {
    margin: 0 0 14px;
    font-size: 15px;
}

.shortcut-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.78);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.shortcut-link:first-of-type {
    border-top: 0;
}

.shortcut-link span {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 800;
}

.profile-card {
    margin-top: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    font-weight: 800;
}

.profile-card span {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
    margin-top: 4px;
}

.main-shell {
    padding: 26px 28px 32px;
}

.topbar,
.page-actions,
.panel-head,
.surface-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar {
    margin-bottom: 22px;
}

.topbar h1 {
    margin: 0;
    font-size: 38px;
    letter-spacing: -0.03em;
}

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

.search-shell input {
    width: min(460px, 48vw);
    border: 1px solid rgba(24, 33, 77, 0.08);
    border-radius: 18px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.78);
}

.topbar-chip {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(24, 33, 77, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(20, 30, 73, 0.06);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(24, 33, 77, 0.08);
    box-shadow: 0 12px 22px rgba(20, 30, 73, 0.06);
}

.user-pill-avatar {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(90, 98, 255, 0.92), rgba(139, 124, 255, 0.9));
    color: #fff;
    font-weight: 800;
}

.user-pill strong,
.user-pill span {
    display: block;
}

.user-pill span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.page-actions {
    margin-bottom: 18px;
}

.page-status {
    display: grid;
    gap: 4px;
}

.page-status-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}

.page-status strong {
    font-size: 28px;
    line-height: 1;
}

.page-status-copy {
    color: var(--muted);
}

.page-action-group {
    display: inline-flex;
    gap: 12px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.property-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card,
.surface-card,
.property-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: 0 16px 34px rgba(20, 30, 73, 0.06);
}

.metric-card {
    padding: 18px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}

.metric-card p,
.metric-card span {
    margin: 0;
    color: var(--muted);
}

.metric-card strong {
    display: block;
    margin: 4px 0 6px;
    font-size: 28px;
    line-height: 1;
}

.tone-violet .metric-icon {
    color: #684cf5;
    background: rgba(140, 124, 255, 0.16);
}

.tone-green .metric-icon {
    color: #1c9f66;
    background: rgba(57, 197, 137, 0.16);
}

.tone-amber .metric-icon {
    color: #c57c11;
    background: rgba(246, 166, 35, 0.18);
}

.tone-rose .metric-icon {
    color: #df4759;
    background: rgba(255, 109, 123, 0.16);
}

.tone-indigo .metric-icon {
    color: #4962ff;
    background: rgba(94, 116, 255, 0.16);
}

.tone-orange .metric-icon {
    color: #d96b0d;
    background: rgba(255, 154, 86, 0.2);
}

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.72fr);
    gap: 22px;
}

.portfolio-toolbar {
    align-items: flex-start;
}

.portfolio-toolbar-actions {
    display: grid;
    gap: 10px;
    justify-items: end;
}

.dashboard-portfolio-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.properties-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.8fr);
    gap: 22px;
}

.main-column,
.side-column {
    display: grid;
    gap: 22px;
}

.properties-main,
.properties-side {
    display: grid;
    gap: 22px;
}

.panel-head h2,
.surface-head h2,
.surface-head h3 {
    margin: 0;
}

.view-toggle {
    display: inline-flex;
    gap: 8px;
    background: rgba(90, 98, 255, 0.08);
    padding: 6px;
    border-radius: 14px;
}

.toggle {
    padding: 10px 12px;
    background: transparent;
    color: var(--muted);
}

.toggle.is-active {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
}

.property-grid,
.lower-grid {
    display: grid;
    gap: 18px;
}

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

.property-grid-catalog {
    align-items: start;
}

.property-card {
    overflow: hidden;
    border-radius: 26px;
}

.property-media {
    position: relative;
    min-height: 128px;
    background:
        linear-gradient(135deg, rgba(90, 98, 255, 0.16), rgba(57, 197, 137, 0.12)),
        linear-gradient(180deg, #f4f6ff 0%, #ecefff 100%);
}

.property-media.has-image {
    min-height: 152px;
    background-position: center;
    background-size: cover;
}

.property-health {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.56);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.property-health-good {
    color: #16865a;
}

.property-health-info {
    color: #4f61dc;
}

.property-health-warning {
    color: #c77d10;
}

.property-health-danger {
    color: #d34d5b;
}

.property-health-static {
    position: static;
    width: fit-content;
}

.property-body {
    padding: 22px;
}

.property-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.property-head h3 {
    margin: 0 0 6px;
    font-size: 24px;
}

.property-head p,
.property-tenant small,
.property-status-grid span,
.timeline-item span,
.list-item span {
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge-rented {
    color: #14855a;
    background: rgba(57, 197, 137, 0.16);
}

.badge-available {
    color: #5368ff;
    background: rgba(94, 116, 255, 0.14);
}

.property-tenant {
    margin-top: 16px;
    padding: 16px 0;
    border-top: 1px solid rgba(24, 33, 77, 0.08);
    border-bottom: 1px solid rgba(24, 33, 77, 0.08);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.property-tenant strong,
.property-status-grid strong,
.list-item strong,
.timeline-item strong {
    display: block;
}

.property-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.property-finance-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.finance-chip {
    padding: 14px 12px;
    border-radius: 18px;
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.finance-chip span,
.finance-chip strong {
    display: block;
}

.finance-chip span {
    color: var(--muted);
    font-size: 12px;
}

.finance-chip strong {
    margin-top: 8px;
    font-size: 18px;
}

.finance-chip-positive {
    background: rgba(57, 197, 137, 0.1);
}

.finance-chip-neutral {
    background: rgba(94, 116, 255, 0.08);
}

.finance-chip-accent {
    background: rgba(140, 124, 255, 0.11);
}

.status-pill {
    padding: 14px 12px;
    border-radius: 18px;
    background: #fafbff;
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.status-paid {
    background: rgba(57, 197, 137, 0.11);
}

.status-neutral {
    background: rgba(94, 116, 255, 0.08);
}

.status-purple {
    background: rgba(140, 124, 255, 0.1);
}

.status-amber {
    background: rgba(246, 166, 35, 0.12);
}

.property-next-step {
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fafbff 0%, #f3f6ff 100%);
    border: 1px solid rgba(24, 33, 77, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.property-next-step small,
.property-next-step span {
    display: block;
    color: var(--muted);
}

.property-next-step strong {
    display: block;
    margin-top: 6px;
}

.property-next-meta {
    text-align: right;
}

.property-note {
    margin: 16px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.card-link,
.surface-head a {
    color: var(--primary);
    font-weight: 700;
}

.card-link {
    display: inline-block;
    margin-top: 18px;
}

.lower-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.property-form-card {
    align-self: start;
}

.detail-page,
.detail-layout,
.detail-main-column,
.detail-side-column {
    display: grid;
    gap: 22px;
}

.property-tabs-shell {
    overflow-x: auto;
}

.property-tabs {
    display: inline-flex;
    gap: 10px;
    min-width: 100%;
    padding-bottom: 4px;
}

.property-tab {
    min-width: 160px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(90, 98, 255, 0.07);
    border: 1px solid rgba(24, 33, 77, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.property-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(20, 30, 73, 0.08);
}

.property-tab strong,
.property-tab span {
    display: block;
}

.property-tab span {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.property-tab.is-active {
    background: linear-gradient(135deg, rgba(90, 98, 255, 0.14), rgba(121, 111, 255, 0.12));
    border-color: rgba(90, 98, 255, 0.22);
    box-shadow: 0 14px 24px rgba(90, 98, 255, 0.1);
}

.detail-hero {
    overflow: hidden;
    padding: 0;
}

.detail-hero-media {
    position: relative;
    min-height: 180px;
    background:
        linear-gradient(135deg, rgba(90, 98, 255, 0.16), rgba(57, 197, 137, 0.12)),
        linear-gradient(180deg, #f4f6ff 0%, #ecefff 100%);
}

.detail-hero-media.has-image {
    background-position: center;
    background-size: cover;
}

.detail-hero-body {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.detail-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.detail-metric {
    padding: 14px 16px;
    border-radius: 18px;
    background: #f8f9ff;
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.detail-metric span,
.detail-metric strong {
    display: block;
}

.detail-metric span {
    color: var(--muted);
    font-size: 12px;
}

.detail-metric strong {
    margin-top: 8px;
    font-size: 20px;
}

.detail-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.78fr);
}

.detail-main-column,
.detail-side-column {
    align-content: start;
}

.detail-section {
    display: grid;
    gap: 18px;
}

.section-edit-toggle {
    min-width: 118px;
}

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

.checklist-card {
    padding: 16px;
    border-radius: 18px;
    background: #fbfbff;
    border: 1px solid rgba(24, 33, 77, 0.08);
}

.checklist-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.checklist-card-head strong {
    display: block;
    line-height: 1.5;
}

.checklist-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 109, 123, 0.12);
    color: #b54858;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.checklist-status.is-done {
    background: rgba(57, 197, 137, 0.12);
    color: #16865a;
}

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

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

.progress-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fbfbff;
    border: 1px solid rgba(24, 33, 77, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.progress-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(20, 30, 73, 0.08);
}

.progress-item strong,
.progress-item span {
    display: block;
}

.progress-item span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.progress-item.is-active {
    border-color: rgba(90, 98, 255, 0.22);
    background: linear-gradient(135deg, rgba(90, 98, 255, 0.08), rgba(121, 111, 255, 0.06));
}

.progress-badge {
    flex: 0 0 auto;
    min-width: 58px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(24, 33, 77, 0.06);
    text-align: center;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.detail-empty {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fafbff 0%, #f3f6ff 100%);
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.detail-empty p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.detail-list {
    display: grid;
    gap: 14px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-radius: 20px;
    background: #fbfbff;
    border: 1px solid rgba(24, 33, 77, 0.08);
}

.detail-item strong,
.detail-item span,
.detail-item p {
    display: block;
}

.detail-item span,
.detail-item p {
    color: var(--muted);
}

.detail-item p {
    margin: 8px 0 0;
    line-height: 1.7;
}

.detail-item-side {
    display: grid;
    justify-items: end;
    gap: 10px;
    min-width: 180px;
    text-align: right;
}

.insurance-alert {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.insurance-alert strong,
.insurance-alert span {
    display: block;
}

.insurance-alert span {
    color: var(--muted);
}

.insurance-alert-good {
    background: rgba(57, 197, 137, 0.1);
}

.insurance-alert-warning {
    background: rgba(246, 166, 35, 0.12);
}

.insurance-alert-danger {
    background: rgba(255, 109, 123, 0.12);
}

.insurance-alert-neutral {
    background: rgba(94, 116, 255, 0.08);
}

.property-form {
    display: grid;
    gap: 16px;
    margin-top: 10px;
}

.property-form-editable.is-locked [data-editable-control] {
    background: #f6f8ff;
    border-color: rgba(24, 33, 77, 0.08);
    box-shadow: none;
    color: var(--text);
    cursor: default;
}

.property-form-editable.is-locked [data-editable-control]:focus {
    transform: none;
    box-shadow: none;
    border-color: rgba(24, 33, 77, 0.08);
}

.property-form-editable.is-locked select[data-editable-control]:disabled,
.property-form-editable.is-locked textarea[data-editable-control][readonly],
.property-form-editable.is-locked input[data-editable-control][readonly] {
    opacity: 1;
    -webkit-text-fill-color: var(--text);
}

.property-form-editable.is-locked textarea[data-editable-control] {
    resize: none;
}

.property-form-editable.is-editing [data-editable-control] {
    background: #fbfbff;
}

.edit-form-actions[hidden] {
    display: none;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.empty-state-card {
    display: grid;
    gap: 16px;
    justify-items: start;
}

.empty-state-card h3,
.empty-state-card p {
    margin: 0;
}

.empty-state-card p {
    color: var(--muted);
    line-height: 1.7;
}

.property-list {
    display: grid;
    gap: 14px;
}

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

.tenant-card {
    display: grid;
    gap: 18px;
}

.tenant-card h3,
.tenant-card p,
.tenant-row-head h3,
.tenant-row-head p,
.tenant-row-side small,
.tenant-row-side strong {
    margin: 0;
}

.tenant-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tenant-avatar {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(90, 98, 255, 0.92), rgba(139, 124, 255, 0.9));
    color: #fff;
    font-size: 20px;
    font-weight: 800;
}

.tenant-card-head p {
    color: var(--muted);
}

.tenant-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

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

.tenant-detail {
    padding: 14px 14px 16px;
    border-radius: 18px;
    background: #f8f9ff;
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.tenant-detail span,
.tenant-detail strong {
    display: block;
}

.tenant-detail span {
    color: var(--muted);
    font-size: 12px;
}

.tenant-detail strong {
    margin-top: 8px;
}

.tenant-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.tenant-list {
    display: grid;
    gap: 14px;
}

.tenant-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
    gap: 18px;
    padding: 22px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: 0 16px 34px rgba(20, 30, 73, 0.06);
}

.tenant-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tenant-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.tenant-row-head p,
.tenant-row-meta span,
.tenant-row-side small {
    color: var(--muted);
}

.tenant-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 16px;
}

.tenant-row-side {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fafbff 0%, #f3f6ff 100%);
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.tenant-form-meta {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fafbff 0%, #f3f6ff 100%);
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.tenant-form-meta p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.tenant-form-meta strong,
.tenant-form-meta a {
    color: var(--text);
}

.archive-meta-card strong {
    color: var(--text);
}

.contract-preview-card {
    display: grid;
    gap: 18px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.modal-dismiss {
    position: absolute;
    inset: 0;
    background: rgba(12, 18, 44, 0.56);
    backdrop-filter: blur(8px);
}

.modal-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 24px;
    border-radius: 28px;
    background: var(--surface);
    border: 1px solid rgba(24, 33, 77, 0.08);
    box-shadow: 0 32px 80px rgba(10, 16, 41, 0.28);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.modal-head h3 {
    margin: 0;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(24, 33, 77, 0.06);
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    font-weight: 400;
}

.contract-modal {
    display: grid;
    gap: 16px;
}

.contract-preview-meta {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.contract-file-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.contract-file-chip {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #f8f9ff;
    border: 1px solid rgba(24, 33, 77, 0.08);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.contract-file-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(90, 98, 255, 0.24);
    box-shadow: 0 14px 28px rgba(20, 30, 73, 0.08);
}

.contract-file-chip strong,
.contract-file-chip span {
    display: block;
}

.contract-file-chip span {
    color: var(--muted);
    word-break: break-word;
}

.contract-file-chip.is-active {
    background: linear-gradient(180deg, rgba(90, 98, 255, 0.12) 0%, rgba(111, 118, 255, 0.08) 100%);
    border-color: rgba(90, 98, 255, 0.32);
    box-shadow: 0 16px 28px rgba(90, 98, 255, 0.12);
}

.contract-preview-frame {
    width: 100%;
    min-height: 760px;
    border: 1px solid rgba(24, 33, 77, 0.08);
    border-radius: 20px;
    background: #fff;
}

.contract-preview-image {
    width: 100%;
    border-radius: 20px;
    border: 1px solid rgba(24, 33, 77, 0.08);
    background: #fff;
}

.contract-preview-empty {
    padding: 22px;
    border-radius: 18px;
    background: #f8f9ff;
    border: 1px solid rgba(24, 33, 77, 0.08);
}

.contract-preview-empty p {
    margin: 0;
    color: var(--muted);
}

.property-row {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
    gap: 18px;
    padding: 22px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    box-shadow: 0 16px 34px rgba(20, 30, 73, 0.06);
}

.property-row-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.property-row-head h3,
.property-row-head p,
.property-row-side small,
.property-row-side strong {
    margin: 0;
}

.property-row-head h3 {
    font-size: 22px;
}

.property-row-head p,
.property-row-meta span,
.property-row-side small {
    color: var(--muted);
}

.property-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 16px;
}

.property-row-side {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 10px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fafbff 0%, #f3f6ff 100%);
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.surface-card {
    padding: 22px;
    border-radius: 24px;
}

.mini-filter {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(90, 98, 255, 0.08);
    color: var(--primary);
    font-weight: 700;
}

.list-stack {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(24, 33, 77, 0.08);
}

.list-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.list-side {
    text-align: right;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pill-success {
    color: #14855a;
    background: rgba(57, 197, 137, 0.12);
}

.pill-neutral {
    color: #4d5bcf;
    background: rgba(94, 116, 255, 0.11);
}

.pill-warning {
    color: #b36a00;
    background: rgba(246, 166, 35, 0.18);
}

.pill-archived {
    color: #6f5aa8;
    background: rgba(140, 124, 255, 0.16);
}

.chart-legend {
    display: flex;
    gap: 18px;
    margin-top: 12px;
    color: var(--muted);
    font-weight: 600;
}

.legend-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 999px;
    margin-right: 8px;
}

.legend-green {
    background: var(--green);
}

.legend-red {
    background: var(--rose);
}

.chart {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 18px;
    min-height: 220px;
    margin-top: 22px;
}

.chart-group {
    text-align: center;
    color: var(--muted);
}

.chart-bars {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 12px;
    min-height: 180px;
    margin-bottom: 10px;
}

.chart-bar {
    width: 28px;
    border-radius: 12px 12px 0 0;
}

.chart-bar-green {
    background: linear-gradient(180deg, #49d495 0%, #1fa966 100%);
}

.chart-bar-red {
    background: linear-gradient(180deg, #ff8792 0%, #ff5a69 100%);
}

.timeline {
    display: grid;
    gap: 16px;
    margin-top: 14px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
}

.timeline-item small {
    display: block;
    margin-top: 8px;
    color: var(--primary);
    font-weight: 700;
}

.timeline-date {
    padding: 10px 8px;
    border-radius: 18px;
    text-align: center;
    background: linear-gradient(180deg, #f6f7ff 0%, #ecefff 100%);
}

.timeline-date strong {
    font-size: 24px;
    line-height: 1;
}

.timeline-date span {
    display: block;
    margin-top: 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.quick-actions {
    align-self: start;
}

.pulse-card {
    align-self: start;
}

.pulse-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.pulse-item {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.pulse-item div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.pulse-item span,
.pulse-item strong,
.pulse-item p {
    display: block;
}

.pulse-item span,
.pulse-item p {
    color: var(--muted);
}

.pulse-item strong {
    font-size: 24px;
}

.pulse-item p {
    margin: 10px 0 0;
    line-height: 1.6;
}

.pulse-violet {
    background: rgba(140, 124, 255, 0.1);
}

.pulse-green {
    background: rgba(57, 197, 137, 0.1);
}

.pulse-rose {
    background: rgba(255, 109, 123, 0.1);
}

.pulse-amber {
    background: rgba(246, 166, 35, 0.12);
}

.pulse-indigo {
    background: rgba(94, 116, 255, 0.09);
}

.quick-button {
    width: 100%;
    padding: 14px 18px;
    margin-top: 12px;
    justify-content: flex-start;
    border: 1px solid rgba(24, 33, 77, 0.06);
}

.quick-violet {
    color: #514ee8;
    background: rgba(90, 98, 255, 0.1);
}

.quick-green {
    color: #14855a;
    background: rgba(57, 197, 137, 0.12);
}

.quick-amber {
    color: #c57c11;
    background: rgba(246, 166, 35, 0.14);
}

.quick-purple {
    color: #7a58f0;
    background: rgba(140, 124, 255, 0.13);
}

.not-found-card {
    max-width: 600px;
}

@media (max-width: 1280px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .property-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .property-grid,
    .tenant-grid,
    .lower-grid,
    .dashboard-columns,
    .properties-shell,
    .detail-layout,
    .checklist-grid,
    .property-row,
    .tenant-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .auth-shell,
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: auto;
    }

    .topbar,
    .topbar-actions,
    .page-actions,
    .page-action-group,
    .property-next-step,
    .dashboard-portfolio-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .portfolio-toolbar-actions {
        justify-items: stretch;
    }

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

    .property-finance-row,
    .field-row,
    .property-status-grid,
    .recovery-grid,
    .detail-metric-grid,
    .detail-tenant-grid,
    .checklist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .property-next-meta {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .auth-body,
    .main-shell {
        padding: 16px;
    }

    .auth-panel-brand,
    .auth-panel-form,
    .recovery-card {
        padding: 24px;
    }

    .metric-grid,
    .property-summary-grid,
    .property-finance-row,
    .tenant-detail-list,
    .detail-metric-grid,
    .detail-tenant-grid,
    .checklist-grid,
    .field-row,
    .property-status-grid,
    .recovery-grid {
        grid-template-columns: 1fr;
    }

    .metric-card,
    .surface-card,
    .property-card {
        border-radius: 20px;
    }

    .contract-preview-frame {
        min-height: 520px;
    }

    .modal-backdrop {
        padding: 14px;
    }

    .modal-shell {
        width: min(100vw - 16px, 1120px);
        max-height: calc(100vh - 16px);
        padding: 18px;
        border-radius: 22px;
    }

    .modal-head,
    .modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-item {
        flex-direction: column;
    }

    .detail-item-side {
        justify-items: start;
        min-width: 0;
        text-align: left;
    }

}
