* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: system-ui, -apple-system, sans-serif; color: #e0e0e0; background: #121212; }

header { position: sticky; top: 0; z-index: 100; background: #1a1a2e; padding: 0.75rem 1.5rem; }
header h1 { font-size: 1.25rem; color: #fff; margin-bottom: 0.5rem; }
.logo-link { color: #fff; text-decoration: none; }

nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
nav ul { display: flex; list-style: none; gap: 1.5rem; }
nav a { color: #b0b0b0; text-decoration: none; font-size: 0.95rem; }
nav a:hover { color: #fff; }

/* Nav Login button */
.nav-login { display: inline-block; padding: 0.4rem 1.25rem; background: #4a7cff; color: #fff !important; border-radius: 6px; font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.nav-login:hover { background: #3a65d4; }

/* Nav Logout button */
.nav-logout { padding: 0.4rem 1.25rem; background: transparent; color: #b0b0b0; border: 1px solid #444; border-radius: 6px; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
.nav-logout:hover { color: #fff; border-color: #888; }

/* Dashboard welcome */
.dash-welcome { margin-bottom: 2rem; }
.dash-welcome h2 { margin-bottom: 0.25rem; }
.dash-user-email { font-size: 0.9rem; color: var(--text-muted); }

#pageMenu { margin-left: auto; padding: 0.4rem 0.6rem; background: #16213e; color: #e0e0e0; border: 1px solid #333; border-radius: 4px; font-size: 0.9rem; cursor: pointer; }
#pageMenu:focus { outline: 1px solid #4a7cff; }

main { padding: 2rem 1.5rem; }
section { min-height: 60vh; padding: 2rem 0; }
section h2 { font-size: 1.75rem; margin-bottom: 1rem; color: #fff; }

.hero { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.hero h2 { font-size: 2.25rem; margin-bottom: 1rem; }
.hero p { font-size: 1.05rem; line-height: 1.7; color: #aaa; }

.image-row { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.image-row img { width: 100%; max-width: 480px; height: auto; border-radius: 8px; object-fit: cover; }

.stats-row { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.savings-card { flex: 1; min-width: 200px; max-width: 360px; background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 12px; padding: 2rem; text-align: center; }
.savings-card h3 { font-size: 1.1rem; color: #aaa; margin-bottom: 0.75rem; }
#savingsNumber, #investorCount, #properties { font-size: 2.5rem; font-weight: 700; color: #4adf8a; }

.contract-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.contract-card { background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 12px; padding: 1.75rem; display: flex; flex-direction: column; }
.contract-card h4 { font-size: 1.15rem; color: #fff; margin-bottom: 0.75rem; }
.contract-card p { font-size: 0.95rem; line-height: 1.6; color: #aaa; flex: 1; margin-bottom: 1.25rem; }

.connect { padding: 0.6rem 1.25rem; background: #4a7cff; color: #fff; border: none; border-radius: 6px; font-size: 0.95rem; cursor: pointer; align-self: flex-start; transition: background 0.2s; }
.connect:hover { background: #3a65d4; }
.connect.connected { background: #2a9d5c; cursor: default; }

#about { background: #fff; color: #1a1a1a; padding: 3rem 2rem; border-radius: 8px; }
#about h3 { font-size: 1.75rem; color: #1a1a1a; margin-bottom: 1.25rem; }
#about p { font-size: 1rem; line-height: 1.7; color: #444; margin-bottom: 1rem; max-width: 720px; }

.team { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.team-member { text-align: center; min-width: 160px; }
.team-member img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; margin-bottom: 0.75rem; }
.team-member h4 { font-size: 1.1rem; color: #1a1a1a; margin-bottom: 0.25rem; }
.team-member p { font-size: 0.9rem; color: #666; }

.cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.cta-btn { display: inline-block; padding: 0.75rem 1.75rem; background: #4a7cff; color: #fff; text-decoration: none; border-radius: 6px; font-size: 1rem; font-weight: 600; transition: background 0.2s; }
.cta-btn:hover { background: #3a65d4; }
.cta-secondary { background: #2a9d5c; }
.cta-secondary:hover { background: #228a4e; }
.stat-number { font-size: 2.5rem; font-weight: 700; color: #4adf8a; }

footer { background: #1a1a2e; text-align: center; padding: 1.25rem; font-size: 0.85rem; color: #888; }

/* Landing Page Nav */
.lp-nav { position: sticky; top: 0; z-index: 100; background: #12122a; border-bottom: 1px solid #1e1e3a; }
.lp-nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 0 2rem; height: 64px; }
.lp-nav-logo { font-size: 1.2rem; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 0; line-height: 1; }
.lp-nav-logo-img { height: 44px; width: auto; margin-right: -12px; }
.lp-nav-links { display: flex; gap: 2rem; }
.lp-nav-links a { color: #888; text-decoration: none; font-size: 0.88rem; transition: color 0.15s; }
.lp-nav-links a:hover { color: #fff; }
.lp-nav-actions { display: flex; align-items: center; gap: 1.25rem; }
.lp-nav-login { color: #888; text-decoration: none; font-size: 0.88rem; }
.lp-nav-login:hover { color: #fff; }
.cta-btn--nav { padding: 0.45rem 1.1rem; font-size: 0.82rem; }
@media (max-width: 600px) {
  .lp-nav-inner { padding: 0 1rem; }
  .lp-nav-links { display: none; }
  .cta-btn--nav { padding: 0.35rem 0.8rem; font-size: 0.75rem; }
}

/* Landing Page */
.lp-hero { padding: 4rem 2rem 3rem; }
.lp-hero-content { display: flex; align-items: center; gap: 3rem; max-width: 1100px; margin: 0 auto; }
.lp-hero-text { flex: 1; }
.lp-headline { font-size: 2.5rem; font-weight: 700; color: #fff; line-height: 1.15; margin-bottom: 1.25rem; }
.lp-subheadline { font-size: 1.05rem; color: #aaa; line-height: 1.7; margin-bottom: 2rem; max-width: 520px; }
.lp-cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.lp-hero-visual { flex: 1; max-width: 480px; }

.lp-dashboard-preview { background: #0d0d1a; border: 1px solid #2a2a4a; border-radius: 12px; overflow: hidden; }
.lp-preview-header { background: #1a1a2e; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 0.4rem; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; }
.lp-dot--red { background: #e05050; }
.lp-dot--yellow { background: #e0a030; }
.lp-dot--green { background: #40b060; }
.lp-preview-title { font-size: 0.7rem; color: #666; margin-left: 0.5rem; }
.lp-preview-body { padding: 1rem; }
.lp-preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem; }
.lp-preview-card { background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 6px; padding: 0.6rem; text-align: center; }
.lp-pc-label { display: block; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em; color: #666; margin-bottom: 0.2rem; }
.lp-pc-value { font-size: 1.1rem; font-weight: 700; color: #fff; }
.lp-preview-bar { display: flex; align-items: center; gap: 0.5rem; margin: 0.4rem 0; font-size: 0.7rem; }
.lp-bar-label { color: #888; min-width: 120px; }
.lp-bar-track { flex: 1; height: 6px; background: #2a2a4a; border-radius: 3px; overflow: hidden; }
.lp-bar-fill { height: 100%; background: #40b060; border-radius: 3px; max-width: 100%; }
.lp-bar-fill--warn { background: #e0a030; }
.lp-bar-pct { color: #888; min-width: 30px; text-align: right; }
.lp-preview-status { margin-top: 0.6rem; font-size: 0.7rem; color: #888; display: flex; align-items: center; gap: 0.4rem; }
.lp-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #e0a030; }

/* Problem section */
.lp-problem { padding: 4rem 2rem; background: #0a0a16; text-align: center; }
.lp-problem-inner { max-width: 640px; margin: 0 auto; }
.lp-problem-headline { font-size: 1.75rem; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 0.5rem; }
.lp-problem-sub { font-size: 1.4rem; font-weight: 600; color: #e05050; margin-bottom: 2.5rem; }
.lp-problem-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2.5rem; }
.lp-problem-item { font-size: 1.1rem; color: #888; letter-spacing: 0.01em; }
.lp-problem-item--warn { color: #d0a030; }
.lp-problem-item--danger { color: #e05050; }
.lp-problem-closing { font-size: 1.15rem; font-weight: 600; color: #555; letter-spacing: 0.02em; }

/* Solution pillars */
.lp-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.lp-pillar { background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 8px; padding: 1.5rem; text-align: center; }
.lp-pillar-num { display: inline-block; width: 32px; height: 32px; line-height: 32px; border-radius: 50%; background: rgba(74, 124, 255, 0.15); color: var(--accent-blue); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.75rem; }
.lp-pillar h4 { font-size: 1rem; color: #fff; margin-bottom: 0.5rem; }
.lp-pillar p { font-size: 0.82rem; color: #888; line-height: 1.5; margin: 0; }
@media (max-width: 768px) { .lp-pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .lp-pillars { grid-template-columns: 1fr; } }

/* Product showcase */
.lp-product-block { display: flex; align-items: center; gap: 3rem; max-width: 900px; margin: 0 auto 3rem; }
.lp-product-block--reverse { flex-direction: row-reverse; }
.lp-product-caption { flex: 1; }
.lp-product-caption h3 { font-size: 1.35rem; color: #fff; margin-bottom: 0.6rem; line-height: 1.3; }
.lp-product-caption p { font-size: 0.9rem; color: #888; line-height: 1.6; }
.lp-product-mock { flex: 1; max-width: 420px; }
.lp-mock-card { background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 10px; padding: 1.25rem; }
.lp-mock-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: #666; margin-bottom: 0.75rem; }
.lp-mock-check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: #aaa; padding: 0.3rem 0; }
.lp-check { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }
.lp-check--pass { background: rgba(42,157,92,0.2); color: #40b060; }
.lp-check--fail { background: rgba(200,60,60,0.2); color: #e05050; }
.lp-mock-status { margin-top: 0.75rem; font-size: 0.8rem; color: #888; display: flex; align-items: center; gap: 0.5rem; }
.lp-mock-row { display: flex; justify-content: space-between; padding: 0.35rem 0; font-size: 0.82rem; color: #aaa; }
.lp-mock-row--expense { color: #888; }
.lp-mock-row--expense span:last-child { color: #e05050; }
.lp-mock-row--total { border-top: 1px solid #2a2a4a; padding-top: 0.5rem; margin-top: 0.25rem; font-weight: 600; color: #fff; }
.lp-mock-row--total span:last-child { color: #4adf8a; }
.lp-mock-result { font-size: 0.78rem; padding: 0.4rem 0.6rem; border-radius: 4px; margin-top: 0.4rem; }
.lp-mock-result--ok { background: rgba(60,180,80,0.08); border-left: 3px solid #40b060; color: #5fd080; }
.lp-mock-result--danger { background: rgba(200,60,60,0.08); border-left: 3px solid #e05050; color: #e07070; }
.lp-mock-reserve { margin-bottom: 0.75rem; }
.lp-mock-res-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; font-size: 0.82rem; color: #ccc; }
.lp-mock-res-meta { display: flex; justify-content: space-between; font-size: 0.7rem; color: #666; margin-top: 0.2rem; }
@media (max-width: 768px) { .lp-product-block, .lp-product-block--reverse { flex-direction: column; } .lp-product-mock { max-width: 100%; } }

.lp-section { padding: 3rem 2rem; max-width: 1100px; margin: 0 auto; }
.lp-section--dark { background: #0d0d1a; max-width: none; padding: 3rem 2rem; }
.lp-section--dark .lp-section-title { color: #fff; }
.lp-section-title { font-size: 1.5rem; color: #fff; margin-bottom: 1.5rem; text-align: center; }

.lp-flow { display: flex; align-items: flex-start; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.lp-flow-step { background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 8px; padding: 1.25rem; text-align: center; width: 180px; }
.lp-flow-num { display: inline-block; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; background: var(--accent-blue); color: #fff; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.lp-flow-step h4 { font-size: 0.95rem; color: #fff; margin-bottom: 0.3rem; }
.lp-flow-step p { font-size: 0.78rem; color: #888; line-height: 1.4; margin: 0; }
.lp-flow-arrow { color: #444; font-size: 1.5rem; padding-top: 1.5rem; }

/* How It Works steps */
/* Portfolio Dashboard */
/* Portfolio dropdown */
.pf-property-dropdown { position: relative; display: inline-block; }
.pf-dropdown-btn { cursor: pointer; }
.pf-dropdown-menu { position: absolute; top: 100%; right: 0; margin-top: 0.25rem; background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 6px; flex-direction: column; min-width: 220px; max-height: 400px; overflow-y: auto; z-index: 500; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.pf-dropdown-item { background: none; border: none; color: var(--text-muted); padding: 0.6rem 1rem; font-size: 0.85rem; cursor: pointer; text-align: left; width: 100%; border-bottom: 1px solid var(--border-card); }
.pf-dropdown-item:last-child { border-bottom: none; }
.pf-dropdown-item:hover { background: rgba(74,124,255,0.1); color: #fff; }
.pf-dropdown-item--active { color: var(--accent-blue) !important; font-weight: 600; }

.pf-search-input { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 4px; color: #e0e0e0; padding: 0.4rem 0.75rem; font-size: 0.85rem; width: 200px; }
.pf-search-input::placeholder { color: #555; }
.pf-search-input:focus { outline: 1px solid var(--accent-blue); }
.pf-sortable { cursor: pointer; user-select: none; }
.pf-sortable:hover { color: var(--accent-blue); }
.pf-row:hover { background: rgba(74, 124, 255, 0.04); }

/* Final CTA */
.lp-final-cta { text-align: center; padding: 5rem 2rem; background: #0a0a16; }
.lp-final-cta h2 { font-size: 2rem; font-weight: 700; color: #fff; max-width: 600px; margin: 0 auto 1rem; line-height: 1.25; }
.lp-final-cta p { font-size: 1.05rem; color: #888; margin-bottom: 2rem; }
.cta-btn--lg { padding: 0.85rem 2.5rem; font-size: 1.05rem; }

/* Who It's For */
.lp-audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 900px; margin: 0 auto; }
.lp-audience-card { background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 8px; padding: 1.5rem; }
.lp-audience-card h4 { font-size: 1.05rem; color: #fff; margin-bottom: 0.4rem; }
.lp-audience-card p { font-size: 0.85rem; color: #888; line-height: 1.5; margin: 0; }
@media (max-width: 768px) { .lp-audience { grid-template-columns: 1fr; } }

.lp-steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; max-width: 800px; margin: 0 auto; }
.lp-step { flex: 1; text-align: center; padding: 0 1rem; }
.lp-step-num { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent-blue); color: #fff; font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.lp-step h4 { font-size: 1.05rem; color: #fff; margin-bottom: 0.4rem; }
.lp-step p { font-size: 0.85rem; color: #888; line-height: 1.5; margin: 0; }
.lp-step-connector { width: 60px; height: 2px; background: #2a2a4a; margin-top: 24px; flex-shrink: 0; }

@media (max-width: 768px) {
  .lp-hero-content { flex-direction: column; }
  .lp-headline { font-size: 1.75rem; }
  .lp-hero-visual { max-width: 100%; }
  .lp-steps { flex-direction: column; align-items: center; }
  .lp-step-connector { width: 2px; height: 32px; }
}

/* Login page */
.login-wrapper { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 140px); padding: 2rem 1rem; }
.login-card { background: #1a1a2e; border: 1px solid #2a2a4a; border-radius: 12px; padding: 2.5rem; width: 100%; max-width: 420px; }
.login-card h2 { font-size: 1.5rem; color: #fff; margin-bottom: 0.25rem; }
.login-subtitle { font-size: 0.9rem; color: #aaa; margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; color: #aaa; margin-bottom: 0.4rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.form-group input { width: 100%; padding: 0.7rem 0.85rem; background: #121212; border: 1px solid #333; border-radius: 6px; color: #e0e0e0; font-size: 0.95rem; outline: none; transition: border-color 0.2s; }
.form-group input:focus { border-color: #4a7cff; }
.form-group input::placeholder { color: #555; }
.login-error { background: rgba(231,76,60,0.12); color: #e74c3c; padding: 0.6rem 0.85rem; border-radius: 6px; font-size: 0.85rem; margin-bottom: 1rem; }
.login-btn { width: 100%; padding: 0.75rem; background: #4a7cff; color: #fff; border: none; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.login-btn:hover { background: #3a65d4; }
.forgot-link { display: block; text-align: center; margin-top: 1rem; font-size: 0.85rem; color: #4a7cff; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
.role-selector { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.role-card { flex: 1; min-width: 120px; background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 8px; padding: 0.75rem; cursor: pointer; transition: border-color 0.2s; text-align: left; }
.role-card:hover { border-color: var(--accent-blue); }
.role-card--selected { border-color: var(--accent-blue); background: rgba(74, 124, 255, 0.08); }
.role-card strong { display: block; font-size: 0.9rem; color: #fff; margin-bottom: 0.2rem; }
.role-card span { font-size: 0.75rem; color: var(--text-muted); line-height: 1.3; }
/* Role switcher (in-app) */
.role-switcher { position: relative; display: inline-block; margin-right: 0.5rem; }
.role-switcher-btn { background: none; border: 1px solid var(--border-card); color: #ccc; padding: 0.3rem 0.6rem; border-radius: 4px; font-size: 0.8rem; cursor: pointer; }
.role-switcher-btn:hover { color: #fff; border-color: #666; }
.role-switcher-menu { position: absolute; top: 100%; right: 0; margin-top: 0.25rem; background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 6px; flex-direction: column; min-width: 140px; z-index: 500; box-shadow: 0 4px 12px rgba(0,0,0,0.4); overflow: hidden; }
.role-switcher-option { background: none; border: none; color: var(--text-muted); padding: 0.6rem 1rem; font-size: 0.85rem; cursor: pointer; text-align: left; width: 100%; }
.role-switcher-option:hover { background: rgba(74,124,255,0.1); color: #fff; }
.role-switcher-option--active { color: var(--accent-blue); font-weight: 600; }

.role-picker { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.role-picker-btn { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 8px; padding: 1rem 1.25rem; cursor: pointer; text-align: left; transition: border-color 0.2s, background 0.2s; width: 100%; }
.role-picker-btn:hover { border-color: var(--accent-blue); background: rgba(74, 124, 255, 0.06); }
.role-picker-btn strong { display: block; font-size: 1rem; color: #fff; margin-bottom: 0.2rem; }
.role-picker-btn span { font-size: 0.82rem; color: var(--text-muted); }
.login-links { text-align: center; margin-top: 1rem; }
.login-link { font-size: 0.85rem; color: #4a7cff; text-decoration: none; }
.login-link:hover { text-decoration: underline; }

/* Content pages */
.content-page { padding: 2rem 0; }
.content-page h2 { margin-bottom: 2rem; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.step-card { text-align: center; padding: 2rem 1.5rem; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(74,124,255,0.15); color: #4a7cff; font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; }
.step-card h4 { color: #fff; font-size: 1.15rem; margin-bottom: 0.75rem; }
.step-card p { color: #aaa; font-size: 0.95rem; line-height: 1.6; }
.contact-info { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-row { display: flex; justify-content: space-between; padding-bottom: 1rem; border-bottom: 1px solid #2a2a4a; }
.contact-row:last-child { border-bottom: none; padding-bottom: 0; }

/* === UX States === */

/* Loading Skeleton */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skel { background: linear-gradient(90deg, #1f1f3a 25%, #2a2a4a 50%, #1f1f3a 75%); background-size: 800px 100%; animation: shimmer 1.8s infinite linear; border-radius: 6px; }
.skel-heading { height: 28px; width: 60%; margin-bottom: 0.5rem; }
.skel-label { height: 14px; width: 40%; margin-bottom: 0.75rem; }
.skel-text { height: 18px; width: 80%; margin-bottom: 0.5rem; }
.skel-text--sm { width: 35%; }
.skel-text--lg { width: 95%; }
.skel-row { height: 40px; width: 100%; margin-bottom: 0.5rem; }

/* Error State */
.dash-state-msg { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 400px; padding: 3rem 2rem; }
.state-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(231,76,60,0.1); color: var(--accent-red); font-size: 1.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.dash-state-msg h3 { font-size: 1.15rem; color: #fff; margin-bottom: 0.5rem; }
.dash-state-msg p { font-size: 0.9rem; color: var(--text-muted); max-width: 380px; line-height: 1.5; margin-bottom: 1.5rem; }
.state-btn { padding: 0.55rem 1.5rem; background: var(--accent-blue); color: #fff; border: none; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.state-btn:hover { background: #3a65d4; }

/* Empty State */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 2rem; border: 1px dashed var(--border-card); border-radius: var(--radius); }
.empty-state-icon { font-size: 1.75rem; color: #333; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.88rem; color: var(--text-muted); max-width: 320px; line-height: 1.5; }

/* === Investor Dashboard === */
:root {
  --bg-body: #121212; --bg-header: #1a1a2e; --bg-header-border: transparent;
  --bg-card: #1a1a2e; --border-card: #2a2a4a; --bg-card-hover: #1f1f3a;
  --text-primary: #ffffff; --text-body: #e0e0e0; --text-muted: #888; --text-secondary: #aaa;
  --accent-green: #4adf8a; --accent-blue: #4a7cff;
  --accent-amber: #f5a623; --accent-red: #e74c3c; --radius: 10px;
  --bg-section-dark: #0d0d1a; --bg-problem: #0a0a16;
  --table-stripe: rgba(255,255,255,0.02); --badge-text: #fff;
}

[data-theme="light"] {
  --bg-body: #f5f6f8; --bg-header: #ffffff; --bg-header-border: #d0d2d8;
  --bg-card: #ffffff; --border-card: #d0d2d8; --bg-card-hover: #f0f1f5;
  --text-primary: #111; --text-body: #1a1a1a; --text-muted: #333; --text-secondary: #222;
  --accent-green: #1a7a42; --accent-blue: #2952b0;
  --accent-amber: #9e6d00; --accent-red: #a3261a;
  --bg-section-dark: #e8eaef; --bg-problem: #e2e4ea;
  --table-stripe: rgba(0,0,0,0.02); --badge-text: #fff;
}

[data-theme="light"] body,
[data-theme="light"] { background: var(--bg-body); color: var(--text-body); }
[data-theme="light"] header, [data-theme="light"] .mgr-header, [data-theme="light"] .lp-nav { background: var(--bg-header); border-bottom: 1px solid var(--bg-header-border); }
[data-theme="light"] header h1 a, [data-theme="light"] .lp-nav-logo, [data-theme="light"] .logo-link { color: var(--text-primary); }
[data-theme="light"] .mgr-subnav { background: var(--bg-header); border-bottom: 1px solid var(--bg-header-border); }
[data-theme="light"] .mgr-subnav-link { color: var(--text-muted); }
[data-theme="light"] .mgr-subnav--active { color: var(--text-primary) !important; border-bottom-color: var(--accent-blue); }
[data-theme="light"] .mgr-subnav-link:hover { color: var(--text-primary); }
[data-theme="light"] .property-tab--active { color: var(--text-primary) !important; }
[data-theme="light"] .pf-dropdown-btn { color: var(--text-body); }
[data-theme="light"] .cc-act-link { color: var(--accent-blue); }
[data-theme="light"] .sw-link { color: var(--accent-blue); }
[data-theme="light"] a { color: var(--accent-blue); }
[data-theme="light"] .section-action-link { color: var(--accent-blue) !important; }
[data-theme="light"] .login-link { color: var(--accent-blue); }
[data-theme="light"] .forgot-link { color: var(--accent-blue); }
[data-theme="light"] .activity-item { color: var(--text-body); }
[data-theme="light"] .activity-actor { color: var(--text-muted); }
[data-theme="light"] .timeline-item { color: var(--text-body); }
[data-theme="light"] .activity-list li { color: var(--text-body); }
[data-theme="light"] .dash-card, [data-theme="light"] .kpi-card { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .kpi-value { color: var(--text-primary); }
[data-theme="light"] .kpi-label { color: var(--text-muted); }
[data-theme="light"] section h2, [data-theme="light"] section h3, [data-theme="light"] .dash-header-bar h2 { color: var(--text-primary); }
[data-theme="light"] .dash-table th { color: var(--text-muted); background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .dash-table td { color: var(--text-body); border-color: var(--border-card); }
[data-theme="light"] .nav-logout, [data-theme="light"] .lp-nav-login { color: var(--text-muted); border-color: var(--border-card); }
[data-theme="light"] .property-tab { color: var(--text-muted); }
[data-theme="light"] .property-tab--active { color: var(--text-primary); }
[data-theme="light"] footer { background: var(--bg-header); color: var(--text-muted); border-top: 1px solid var(--border-card); }
[data-theme="light"] .cc-attention { background: rgba(200, 60, 60, 0.06); border-color: rgba(200, 60, 60, 0.15); }
[data-theme="light"] .cc-actions { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .cc-act-title { color: var(--text-primary); }
[data-theme="light"] .dist-status-card { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .reserve-card { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .contract-card, [data-theme="light"] .lp-pillar, [data-theme="light"] .lp-audience-card { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .contract-card h4, [data-theme="light"] .lp-pillar h4, [data-theme="light"] .lp-audience-card h4 { color: var(--text-primary); }
[data-theme="light"] .contract-card p, [data-theme="light"] .lp-pillar p, [data-theme="light"] .lp-audience-card p { color: var(--text-muted); }
[data-theme="light"] .lp-headline { color: var(--text-primary); }
[data-theme="light"] .lp-section--dark { background: var(--bg-section-dark); }
[data-theme="light"] .lp-problem { background: var(--bg-problem); }
[data-theme="light"] .lp-problem-headline { color: var(--text-primary); }
[data-theme="light"] .lp-problem-closing { color: var(--text-body); }
[data-theme="light"] .lp-problem-item { color: var(--text-body); }
[data-theme="light"] .lp-subheadline { color: var(--text-body); }
[data-theme="light"] .lp-product-caption p { color: var(--text-body); }
[data-theme="light"] .lp-flow-step p { color: var(--text-body); }
[data-theme="light"] .lp-step p { color: var(--text-body); }
[data-theme="light"] .lp-final-cta p { color: var(--text-body); }
[data-theme="light"] .lp-mock-check span { color: var(--text-body); }
[data-theme="light"] .lp-mock-row { color: var(--text-body); }
[data-theme="light"] .lp-mock-status { color: var(--text-body); }
[data-theme="light"] .lp-bar-label { color: var(--text-body); }
[data-theme="light"] .lp-bar-pct { color: var(--text-body); }
[data-theme="light"] .lp-preview-status span { color: var(--text-body); }
[data-theme="light"] .lp-mock-res-meta { color: var(--text-muted); }
[data-theme="light"] .td-muted { color: var(--text-muted); }
[data-theme="light"] .dash-header-sub { color: var(--text-muted); }
[data-theme="light"] .meta-label { color: var(--text-muted); }
[data-theme="light"] .meta-value { color: var(--text-primary); }
[data-theme="light"] .cc-att-text { color: var(--text-body); }
[data-theme="light"] .cc-act-detail { color: var(--text-body); }
[data-theme="light"] .section-action-link { color: var(--accent-blue); }
[data-theme="light"] .activity-date { color: var(--text-muted); }
[data-theme="light"] .activity-text { color: var(--text-body); }
[data-theme="light"] .sw-label { color: var(--text-muted); }
[data-theme="light"] .sw-value { color: var(--text-primary); }
[data-theme="light"] .eligibility-reason { color: var(--text-body); }
[data-theme="light"] .dist-last-run { color: var(--text-body); border-top-color: var(--border-card); }
[data-theme="light"] .form-hint { color: var(--text-muted); }
[data-theme="light"] .form-error { color: var(--accent-red); }
[data-theme="light"] .pf-search-input { color: var(--text-body); }
[data-theme="light"] .login-subtitle { color: var(--text-body); }
[data-theme="light"] .nav-login { color: var(--text-body); }
[data-theme="light"] .lp-nav-links a { color: var(--text-body); }
[data-theme="light"] .lp-section-title { color: var(--text-primary); }
[data-theme="light"] .lp-mock-title { color: var(--text-muted); }
[data-theme="light"] .lp-mock-row--total span { color: var(--text-primary); }
[data-theme="light"] .lp-mock-row--total span:last-child { color: var(--accent-green); }
[data-theme="light"] .lp-mock-res-header span { color: var(--text-primary); }
[data-theme="light"] .lp-preview-title { color: var(--text-muted); }
[data-theme="light"] .lp-pc-label { color: var(--text-muted); }
[data-theme="light"] .lp-pc-value { color: var(--text-primary); }
[data-theme="light"] h2, [data-theme="light"] h3, [data-theme="light"] h4 { color: var(--text-primary); }
[data-theme="light"] .contract-card p, [data-theme="light"] p { color: var(--text-body); }
[data-theme="light"] .reserve-card h4 { color: var(--text-primary); }
[data-theme="light"] .wf-row-label { color: var(--text-body); }
[data-theme="light"] .wf-row-value { color: var(--text-primary); }
[data-theme="light"] .modal-header h3 { color: var(--text-primary); }
[data-theme="light"] .login-card h2 { color: var(--text-primary); }
[data-theme="light"] label { color: var(--text-body); }
[data-theme="light"] .action-btn { color: #fff; }
[data-theme="light"] .cta-btn { color: #fff; }
[data-theme="light"] .login-btn { color: #fff; }
[data-theme="light"] .filter-tab { color: var(--text-body); border-color: var(--border-card); }
[data-theme="light"] .filter-tab--active { color: #fff; }
[data-theme="light"] .role-card strong { color: var(--text-primary); }
[data-theme="light"] .role-card span { color: var(--text-body); }
[data-theme="light"] .ae-cat-card h4 { color: var(--text-primary); }
[data-theme="light"] .ae-cat-card p { color: var(--text-body); }
[data-theme="light"] .role-picker-btn strong { color: var(--text-primary); }
[data-theme="light"] .role-picker-btn span { color: var(--text-body); }
[data-theme="light"] strong { color: var(--text-primary); }
[data-theme="light"] .dash-header-bar { border-color: var(--border-card); }
[data-theme="light"] .lp-step-connector { background: var(--border-card); }
[data-theme="light"] .lp-flow-arrow { color: var(--text-muted); }
[data-theme="light"] .demo-banner { color: #1a1a1a; }
[data-theme="light"] #about p { color: var(--text-body); }
[data-theme="light"] .team-member h4 { color: var(--text-primary); }
[data-theme="light"] .team-member p { color: var(--text-body); }
[data-theme="light"] .about-description { color: var(--text-body) !important; }
[data-theme="light"] .check-name { color: var(--text-primary) !important; }
[data-theme="light"] .check-detail { color: var(--text-body) !important; }
[data-theme="light"] .eligibility-check { color: var(--text-body); }
[data-theme="light"] .reserve-card { color: var(--text-body); }
[data-theme="light"] .reserve-card h4 { color: var(--text-primary) !important; }
[data-theme="light"] .reserve-meta { color: var(--text-body) !important; }
[data-theme="light"] .reserve-draw-info { color: var(--text-body) !important; }
[data-theme="light"] .cc-actions-title { color: var(--text-body) !important; }
[data-theme="light"] .cc-attention-title { color: var(--accent-red) !important; }
[data-theme="light"] .cc-kpi-row-sm { color: var(--text-body) !important; }
[data-theme="light"] .cc-kpi-sm .kpi-label { color: var(--text-muted) !important; }
[data-theme="light"] .dist-last-label { color: var(--text-body) !important; }
[data-theme="light"] .dist-eligibility-summary { color: var(--text-body) !important; }
[data-theme="light"] .impact-status-row { color: var(--text-body); }
[data-theme="light"] .maint-detail-meta { color: var(--text-body) !important; }
[data-theme="light"] .maint-detail-meta span { color: var(--text-body) !important; }
[data-theme="light"] .exp-lifecycle { color: var(--text-body); }
[data-theme="light"] .tenant-search { color: var(--text-body) !important; }
[data-theme="light"] .modal-header h3 { color: var(--text-primary) !important; }
[data-theme="light"] .pi-label { color: var(--text-muted) !important; }
[data-theme="light"] .pi-value { color: var(--text-primary) !important; }
[data-theme="light"] .pi-section h4 { color: var(--text-primary) !important; }
[data-theme="light"] .td-notes { color: var(--text-body) !important; }
[data-theme="light"] .form-optional { color: var(--text-muted) !important; }
[data-theme="light"] .file-upload-prompt span { color: var(--text-body) !important; }
[data-theme="light"] .dash-table-total td { color: var(--text-primary) !important; }
[data-theme="light"] .pf-att-count { color: var(--text-body) !important; }
[data-theme="light"] .admin-count { color: var(--text-body) !important; }
[data-theme="light"] .lp-final-cta { background: var(--bg-problem); }
[data-theme="light"] .lp-final-cta h2 { color: var(--text-primary); }
[data-theme="light"] .lp-dashboard-preview { background: #f0f1f5; border-color: var(--border-card); }
[data-theme="light"] .lp-preview-header { background: var(--bg-header); }
[data-theme="light"] .lp-preview-card { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .lp-pc-value { color: var(--text-primary); }
[data-theme="light"] .lp-mock-card { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .lp-flow-step { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .lp-flow-step h4 { color: var(--text-primary); }
[data-theme="light"] .modal, [data-theme="light"] .modal-overlay .modal { background: var(--bg-card); }
[data-theme="light"] .login-card { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] input, [data-theme="light"] select, [data-theme="light"] textarea { background: var(--bg-body); border-color: var(--border-card); color: var(--text-body); }
[data-theme="light"] .pf-dropdown-menu { background: var(--bg-card); border-color: var(--border-card); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
[data-theme="light"] .pf-dropdown-item { color: var(--text-body); border-bottom-color: var(--border-card); }
[data-theme="light"] .role-switcher-menu { background: var(--bg-card); border-color: var(--border-card); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
[data-theme="light"] .role-switcher-option { color: var(--text-body); }
[data-theme="light"] .wf-table td { color: var(--text-body); }
[data-theme="light"] .summary-widget { background: var(--bg-card); border-color: var(--border-card); }
[data-theme="light"] .summary-widget h4 { color: var(--text-primary); }

/* Tax export grid */
.tax-export-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.tax-export-card { cursor: pointer; padding: 1.25rem !important; transition: border-color 0.2s; }
.tax-export-card:hover { border-color: var(--accent-blue); }
.tax-export-card h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.tax-export-card p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.tax-export-card--disabled { opacity: 0.5; cursor: not-allowed; }
.tax-export-card--disabled:hover { border-color: var(--border-card); }
@media (max-width: 768px) { .tax-export-grid { grid-template-columns: 1fr; } }

/* File upload */
.file-upload-area { margin-top: 0.25rem; }
.file-upload-prompt { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; border: 2px dashed var(--border-card); border-radius: 8px; cursor: pointer; transition: border-color 0.2s; }
.file-upload-prompt:hover { border-color: var(--accent-blue); }
.file-upload-icon { font-size: 1.5rem; }
.file-upload-prompt span { font-size: 0.85rem; color: var(--text-muted); }
.file-upload-preview { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem; border: 1px solid var(--border-card); border-radius: 8px; position: relative; }
.file-upload-preview img { max-height: 120px; max-width: 200px; border-radius: 4px; object-fit: cover; }
.file-upload-remove { position: absolute; top: 0.25rem; right: 0.25rem; background: rgba(200,60,60,0.8); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 1rem; line-height: 1; }
.maint-receipt { margin-top: 0.75rem; }
.maint-receipt-img { max-height: 200px; max-width: 300px; border-radius: 6px; object-fit: cover; margin-top: 0.4rem; cursor: pointer; border: 1px solid var(--border-card); }
.maint-receipt-img:hover { opacity: 0.9; }

/* Theme toggle */
.theme-toggle { background: none; border: 1px solid var(--border-card); color: var(--text-muted); padding: 0.15rem 0.35rem; border-radius: 4px; cursor: pointer; font-size: 0.75rem; line-height: 1; }
.theme-toggle:hover { color: var(--text-primary); border-color: #666; }

.dash-main { max-width: 1100px; margin: 0 auto; }

/* Property Tabs */
.property-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border-card); margin-bottom: 0; }
.property-tab { padding: 0.7rem 1.25rem; background: none; border: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.property-tab:hover { color: #fff; }
.property-tab--active { color: #fff; border-bottom-color: var(--accent-blue); }

/* Dashboard Header Bar */
.dash-header-bar { display: flex; justify-content: space-between; align-items: flex-start; padding: 1.5rem 0 1rem; border-bottom: 1px solid var(--border-card); margin-bottom: 2rem; min-height: auto; }
.dash-header-bar h2 { font-size: 1.5rem; color: #fff; margin-bottom: 0.25rem; }
.dash-header-sub { font-size: 0.85rem; color: var(--text-muted); }
.dash-header-right { display: flex; gap: 2rem; text-align: right; }
.dash-header-meta { display: flex; flex-direction: column; gap: 0.15rem; }
.meta-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.meta-value { font-size: 1rem; color: #fff; font-weight: 600; }

/* Sections */
.dash-section { margin-bottom: 2.5rem; min-height: auto; padding: 0; }
.dash-section h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* Reusable Card */
.dash-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius); padding: 1.5rem; }

/* KPI Cards */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.kpi-row--3 { grid-template-columns: repeat(3, 1fr); }
.kpi-card { text-align: center; display: flex; flex-direction: column; gap: 0.4rem; padding: 1.25rem 1rem; }
.kpi-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.kpi-value { font-size: 1.75rem; font-weight: 700; color: #fff; }
.kpi-sub { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }

/* Badges */
.badge { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.badge--paid, .badge--healthy { background: rgba(42,157,92,0.12); color: var(--accent-green); }
.badge--scheduled, .badge--warning { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--paused { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--blocked, .badge--critical { background: rgba(231,76,60,0.12); color: var(--accent-red); }
.badge--completed { background: rgba(42,157,92,0.12); color: var(--accent-green); }
.badge--pending, .badge--processing { background: rgba(74,124,255,0.12); color: var(--accent-blue); }

/* Distribution Status Card */
.dist-status-card { display: flex; align-items: center; gap: 1.25rem; }
.dist-status-indicator { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dist-status--scheduled { background: var(--accent-green); }
.dist-status--paused { background: var(--accent-amber); }
.dist-status--blocked { background: var(--accent-red); }
.dist-status-card--scheduled { border-left: 4px solid var(--accent-green); }
.dist-status-card--paused { border-left: 4px solid var(--accent-amber); }
.dist-status-card--blocked { border-left: 4px solid var(--accent-red); }
.dist-status-label { font-size: 0.85rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.04em; }
.dist-status-message { font-size: 0.92rem; color: var(--text-secondary); margin-top: 0.25rem; line-height: 1.5; }
.dist-status-body { display: flex; flex-direction: column; }

/* Cash Flow Waterfall (vertical ledger) */
.waterfall-table { padding: 0; }
.wf-row { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1.5rem; border-bottom: 1px solid var(--border-card); }
.wf-row:last-child { border-bottom: none; }
.wf-row-label { font-size: 0.92rem; color: #e0e0e0; }
.wf-row-value { font-size: 0.95rem; font-weight: 600; font-family: 'SF Mono', 'Consolas', monospace; }
.wf-row--income .wf-row-value { color: var(--accent-green); }
.wf-row--expense .wf-row-value { color: var(--text-secondary); }
.wf-row--total { background: rgba(74,223,138,0.06); border-top: 2px solid var(--border-card); }
.wf-row--total .wf-row-label { font-weight: 700; color: #fff; }
.wf-row--total .wf-row-value { font-size: 1.1rem; font-weight: 700; color: var(--accent-green); }

/* Reserve Health Grid */
.reserve-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.reserve-card { display: flex; flex-direction: column; gap: 0.75rem; }
.reserve-card-header { display: flex; justify-content: space-between; align-items: center; }
.reserve-card-header h4 { font-size: 0.95rem; color: #fff; font-weight: 600; }
.reserve-bar { height: 10px; background: #2a2a4a; border-radius: 5px; overflow: hidden; }
.reserve-bar__fill { height: 100%; border-radius: 5px; transition: width 0.6s ease; }
.reserve-fill--healthy { background: var(--accent-green); }
.reserve-fill--warning { background: var(--accent-amber); }
.reserve-fill--critical { background: var(--accent-red); }
.reserve-meta { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }

/* Dashboard Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-card); }
.dash-table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
.dash-table th { text-align: left; padding: 0.75rem 1rem; color: var(--text-muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 2px solid var(--border-card); }
.dash-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-card); font-size: 0.9rem; }
.dash-table tbody tr:hover { background: var(--bg-card-hover); }
.dash-table tbody tr:last-child td { border-bottom: none; }
.td-notes { color: var(--text-muted); font-size: 0.85rem; }

/* Activity Log */
.activity-list { list-style: none; }
.activity-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-card); }
.activity-item:last-child { border-bottom: none; }
.activity-item--clickable { cursor: pointer; border-radius: 4px; padding-left: 0.5rem; padding-right: 0.5rem; margin: 0 -0.5rem; transition: background 0.15s; }
.activity-item--clickable:hover { background: rgba(74, 124, 255, 0.08); }
.activity-item--clickable:focus { outline: 1px solid var(--accent-blue); outline-offset: 2px; }
.activity-link { display: inline-block; margin-left: 0.5rem; font-size: 0.75rem; color: var(--accent-blue); font-weight: 500; }
.activity-actor { display: inline-block; margin-left: 0.4rem; font-size: 0.75rem; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 0.1rem 0.35rem; border-radius: 3px; }
.activity-date { flex-shrink: 0; width: 110px; font-size: 0.78rem; color: var(--text-muted); padding-top: 0.15rem; }
.activity-icon { flex-shrink: 0; font-size: 0.65rem; margin-top: 0.3rem; width: 16px; text-align: center; }
.activity-icon--income { color: var(--accent-green); }
.activity-icon--distribution { color: var(--accent-green); }
.activity-icon--reserve { color: var(--accent-amber); }
.activity-icon--debt { color: var(--accent-red); }
.activity-icon--document { color: var(--accent-blue); }
.activity-text { font-size: 0.88rem; color: #e0e0e0; line-height: 1.5; }

/* Document List */
.doc-list { list-style: none; border: 1px solid var(--border-card); border-radius: var(--radius); overflow: hidden; }
.doc-item { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border-card); transition: background 0.15s; }
.doc-item:hover { background: var(--bg-card-hover); }
.doc-item:last-child { border-bottom: none; }
.doc-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.doc-name { font-size: 0.92rem; color: #fff; text-decoration: none; font-weight: 500; }
.doc-name:hover { color: var(--accent-blue); }
.doc-type { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.doc-actions { display: flex; align-items: center; gap: 1.25rem; }
.doc-date { font-size: 0.78rem; color: var(--text-muted); }
.doc-download { font-size: 0.82rem; color: var(--accent-blue); text-decoration: none; font-weight: 600; }
.doc-download:hover { text-decoration: underline; }

/* Alert Bars */
.alert-bar { padding: 0.7rem 1rem; border-radius: 6px; font-size: 0.88rem; margin-bottom: 0.75rem; border-left: 4px solid; }
.alert-bar--warning { background: rgba(245,166,35,0.16); border-left-color: var(--accent-amber); color: var(--accent-amber); }
.alert-bar--critical { background: rgba(231,76,60,0.16); border-left-color: var(--accent-red); color: var(--accent-red); }
.alert-bar--info { background: rgba(74,124,255,0.16); border-left-color: var(--accent-blue); color: var(--accent-blue); }
@keyframes alert-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.85; } }
.alert-bar--pulse { animation: alert-pulse 3s ease-in-out infinite; }

/* Distribution Eligibility */
.dist-eligibility-grid { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; }
.eligibility-check { display: flex; align-items: flex-start; gap: 0.75rem; }
.check-icon { flex-shrink: 0; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.75rem; font-weight: 700; }
.check-icon--pass { background: rgba(42,157,92,0.15); color: var(--accent-green); }
.check-icon--fail { background: rgba(231,76,60,0.15); color: var(--accent-red); }
.check-body { display: flex; flex-direction: column; gap: 0.15rem; }
.check-name { font-size: 0.9rem; color: #fff; font-weight: 500; }
.check-detail { font-size: 0.78rem; color: var(--text-muted); }
.dist-eligibility-summary { display: flex; align-items: center; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--border-card); }
.eligibility-reason { font-size: 0.85rem; color: var(--text-secondary); }
.dist-last-run { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border-card); font-size: 0.85rem; color: var(--text-muted); }

/* Save error toast */
.save-error-toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: #c03030; color: #fff; padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.85rem; display: flex; align-items: center; gap: 0.75rem; z-index: 9999; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.save-error-toast button { background: none; border: none; color: #fff; font-size: 1.1rem; cursor: pointer; padding: 0 0.25rem; }

/* Demo banner */
.demo-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 10000; background: #d4a017; color: #1a1a1a; padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 1rem; }
.demo-reset-btn { background: rgba(0,0,0,0.15); border: 1px solid rgba(0,0,0,0.2); color: #1a1a1a; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; cursor: pointer; font-weight: 600; }
.demo-reset-btn:hover { background: rgba(0,0,0,0.25); }
.dist-last-label { color: var(--text-secondary); font-weight: 600; }

/* 2-column KPI row */
.kpi-row--2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

/* Recommended Action */
.recommended-action { padding: 0.7rem 1rem; border-radius: 6px; font-size: 0.88rem; margin-bottom: 0.75rem; background: rgba(42,157,92,0.08); border-left: 4px solid var(--accent-green); color: var(--accent-green); }
.rec-label { font-weight: 700; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; margin-right: 0.5rem; }

/* Reserve Draw Info */
.reserve-draw-info { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.35rem; font-style: italic; }

/* Reserve Trend Indicators */
.reserve-trend { font-size: 0.78rem; font-weight: 600; margin-left: 0.5rem; }
.trend--up { color: var(--accent-green); }
.trend--down { color: var(--accent-red); }
.trend--flat { color: var(--text-muted); }

/* Payment Impact Threshold */
.threshold-check { padding: 0.65rem 1rem; border-radius: 6px; font-size: 0.88rem; font-weight: 500; }
.threshold-check--pass { background: rgba(42,157,92,0.1); color: var(--accent-green); border-left: 4px solid var(--accent-green); }
.threshold-check--fail { background: rgba(231,76,60,0.12); color: var(--accent-red); border-left: 4px solid var(--accent-red); }

/* Recommended Action — clear state */
.recommended-action--clear { background: rgba(42,157,92,0.06); border-left-color: var(--accent-green); color: var(--text-muted); }

/* Semantic waterfall table */
.wf-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border-card); border-radius: var(--radius); }
.wf-table td { padding: 0.85rem 1.5rem; border-bottom: 1px solid var(--border-card); }
.wf-table tr:last-child td { border-bottom: none; }
.wf-table .wf-row-label { font-size: 0.92rem; color: #e0e0e0; }
.wf-table .wf-row-value { text-align: right; font-size: 0.95rem; font-weight: 600; font-family: 'SF Mono', 'Consolas', monospace; }
.wf-table .wf-row--income .wf-row-value { color: var(--accent-green); }
.wf-table .wf-row--expense .wf-row-value { color: var(--text-secondary); }
.wf-table .wf-row--total { background: rgba(74,223,138,0.06); border-top: 2px solid var(--border-card); }
.wf-table .wf-row--total .wf-row-label { font-weight: 700; color: #fff; }
.wf-table .wf-row--total .wf-row-value { font-size: 1.1rem; font-weight: 700; color: var(--accent-green); }

/* Payment Impact Status */
.impact-status-row { display: flex; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }

/* Activity Actor tag */
.activity-actor { display: inline-block; margin-left: 0.5rem; font-size: 0.72rem; color: var(--text-muted); background: rgba(255,255,255,0.05); padding: 0.1rem 0.5rem; border-radius: 3px; }

/* Extra badge variants for manager */
.badge--overdue, .badge--delinquent { background: rgba(231,76,60,0.12); color: var(--accent-red); }
.badge--late, .badge--expiring { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--unpaid { background: rgba(150,150,150,0.12); color: #999; }
.filter-count { font-size: 0.7rem; font-weight: 400; opacity: 0.6; margin-left: 0.15rem; }

/* Navigation feedback */
body.navigating { cursor: wait; }
body.navigating .dash-main { opacity: 0.6; pointer-events: none; transition: opacity 0.15s; }
.badge--active, .badge--paid { background: rgba(42,157,92,0.12); color: var(--accent-green); }
.badge--open, .badge--upcoming, .badge--submitted { background: rgba(74,124,255,0.12); color: var(--accent-blue); }
.badge--month-to-month { background: rgba(74,124,255,0.12); color: var(--accent-blue); }
.badge--in\ progress { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--high { background: rgba(231,76,60,0.12); color: var(--accent-red); }
.badge--medium { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--low { background: rgba(74,124,255,0.12); color: var(--accent-blue); }

/* Mobile */
@media (max-width: 720px) {
  main { padding: 1rem 16px; }
  nav { flex-direction: column; align-items: flex-start; }
  nav ul { flex-wrap: wrap; gap: 0.75rem; }
  .hero h2 { font-size: 1.5rem; }
  .image-row { flex-direction: column; align-items: center; }
  .stats-row { flex-direction: column; align-items: stretch; }
  .savings-card { max-width: 100%; min-width: 0; }
  .contract-grid { grid-template-columns: 1fr; }
  #savingsNumber, #investorCount, #properties { font-size: 1.75rem; }
  .team-member img { width: 120px; height: 120px; }
  .kpi-row, .kpi-row--3 { grid-template-columns: repeat(2, 1fr); }
  .kpi-value { font-size: 1.35rem; }
  .dash-header-bar { flex-direction: column; gap: 1rem; }
  .dash-header-right { text-align: left; }
  .reserve-grid { grid-template-columns: 1fr; }
  .doc-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .doc-actions { gap: 0.75rem; }
  .activity-date { width: 85px; }
}

/* Section header with action button */
.section-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.section-header-row h3 { margin-bottom: 0; }

/* Month Selector */
/* Command Center */
.cc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .cc-grid-2 { grid-template-columns: 1fr; } }

.cc-attention { background: rgba(200, 60, 60, 0.08); border: 1px solid rgba(200, 60, 60, 0.2); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; min-height: auto; }
.cc-attention-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: #e06060; margin-bottom: 0.75rem; }
.cc-att-item { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.35rem 0; font-size: 0.88rem; line-height: 1.4; }
.cc-att-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 0.3rem; flex-shrink: 0; }
.cc-att--critical .cc-att-dot { background: #e05050; }
.cc-att--warning .cc-att-dot { background: #e0a030; }
.cc-att--info .cc-att-dot { background: #5090d0; }
.cc-att-text { color: var(--text-muted); flex: 1; }
.cc-att-item--clickable { cursor: pointer; border-radius: 4px; padding: 0.4rem 0.5rem; margin: 0 -0.5rem; transition: background 0.15s; }
.cc-att-item--clickable:hover { background: rgba(255, 255, 255, 0.05); }
.cc-att-item--clickable:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
.cc-att-arrow { font-size: 0.72rem; color: var(--accent-blue); font-weight: 500; flex-shrink: 0; opacity: 0.6; transition: opacity 0.15s; }
.cc-att-item--clickable:hover .cc-att-arrow { opacity: 1; }

.cc-actions { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; overflow: hidden; min-height: auto; }
.cc-actions-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.75rem; }
.cc-act-item { padding: 0.6rem 0; border-bottom: 1px solid var(--border-card); }
.cc-act-item:last-child { border-bottom: none; }
.cc-act-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.cc-act-badge { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.15rem 0.45rem; border-radius: 3px; font-weight: 600; }
.cc-act--high .cc-act-badge { background: rgba(200, 60, 60, 0.15); color: #e06060; }
.cc-act--medium .cc-act-badge { background: rgba(200, 160, 40, 0.15); color: #d0a030; }
.cc-act--low .cc-act-badge { background: rgba(60, 160, 90, 0.15); color: #40b060; }
.cc-act--clear .cc-act-badge { background: rgba(60, 160, 90, 0.15); color: #40b060; }
.cc-act-title { font-size: 0.9rem; font-weight: 600; color: #fff; }
.cc-act-detail { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; margin: 0; }
.cc-act-link { color: var(--accent-blue); text-decoration: none; font-weight: 500; }
.cc-act-link:hover { text-decoration: underline; }

.cc-kpi-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.cc-kpi { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 8px; padding: 0.75rem; text-align: center; }
.cc-kpi .kpi-value { font-size: 1.3rem; }
.cc-kpi-row-sm { display: flex; gap: 1.5rem; margin-top: 0.75rem; color: var(--text-muted); font-size: 0.82rem; }
.cc-kpi-sm .kpi-label { color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }

.dash-table--compact th, .dash-table--compact td { padding: 0.5rem 0.6rem; font-size: 0.82rem; }

/* Add Property Steps */
.ap-steps { display: flex; gap: 0; padding: 0 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border-card); }
.ap-step { flex: 1; padding: 0.6rem 0; text-align: center; font-size: 0.78rem; color: var(--text-muted); border-bottom: 2px solid transparent; cursor: default; }
.ap-step--active { color: #fff; border-bottom-color: var(--accent-blue); font-weight: 600; }
.ap-step--done { color: #40b060; }
.ap-step-num { display: inline-block; width: 1.3rem; height: 1.3rem; line-height: 1.3rem; border-radius: 50%; background: var(--border-card); text-align: center; font-size: 0.7rem; margin-right: 0.3rem; }
.ap-step--active .ap-step-num { background: var(--accent-blue); color: #fff; }
.ap-step--done .ap-step-num { background: #40b060; color: #fff; }
.ap-step-content { padding: 0 1.25rem 1rem; }
.ap-step-intro { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.ap-units-scroll { max-height: 400px; overflow-y: auto; }
.ap-unit-row { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 6px; padding: 0.75rem; margin-bottom: 0.5rem; }
.ap-unit-row .form-row { margin-bottom: 0.4rem; }
.ap-unit-row .form-group { margin-bottom: 0.3rem; }
.ap-unit-row label { font-size: 0.7rem; }
.ap-unit-row input, .ap-unit-row select { font-size: 0.82rem; padding: 0.3rem 0.5rem; }
.ap-unit-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.ap-unit-label { font-weight: 600; font-size: 0.85rem; color: #fff; }
.ap-review { padding: 0; }
.ap-review-section { margin-bottom: 1.25rem; }
.ap-review-section h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.5rem; }
.ap-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 1.5rem; font-size: 0.88rem; }
.ap-review-label { color: var(--text-muted); }
.ap-review-value { color: #fff; font-weight: 500; }
.ap-review-units { max-height: 200px; overflow-y: auto; }

/* Payment Impact Modal */
.modal--lg { max-width: 700px; width: 90%; }
.pi-body { padding: 0 1.25rem 1rem; }
.pi-item-info { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.5rem; margin-bottom: 1.25rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 8px; }
.pi-field { display: flex; flex-direction: column; gap: 0.15rem; }
.pi-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.pi-value { font-size: 0.9rem; color: #fff; font-weight: 500; }
.pi-value--lg { font-size: 1.2rem; font-weight: 700; color: #4adf8a; }
.pi-section { margin-bottom: 1rem; }
.pi-section h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.5rem; border-bottom: 1px solid var(--border-card); padding-bottom: 0.3rem; }
/* Add Expense modal */
.ae-steps { display: flex; gap: 0.5rem; padding: 0 1.5rem; margin-bottom: 1rem; }
.ae-step-dot { font-size: 0.75rem; color: var(--text-muted); padding: 0.25rem 0.6rem; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border-card); }
.ae-step-dot--active { background: rgba(74, 124, 255, 0.1); border-color: rgba(74, 124, 255, 0.3); color: var(--accent-blue); }
.ae-step-dot--current { font-weight: 600; }
.ae-step-intro { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; padding: 0 1.5rem; }
.ae-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 0 1.5rem 1.5rem; }
.ae-cat-card { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 8px; padding: 1.25rem; text-align: left; cursor: pointer; transition: border-color 0.2s; }
.ae-cat-card:hover { border-color: var(--accent-blue); }
.ae-cat-card--selected { border-color: var(--accent-blue); background: rgba(74, 124, 255, 0.08); }
.ae-cat-card h4 { font-size: 1rem; color: #fff; margin-bottom: 0.35rem; }
.ae-cat-card p { font-size: 0.8rem; color: var(--text-muted); margin: 0; line-height: 1.4; }
.radio-label { display: block; padding: 0.5rem 0; font-size: 0.9rem; color: var(--text-muted); cursor: pointer; }
.radio-label input { margin-right: 0.5rem; }
@media (max-width: 600px) { .ae-cat-grid { grid-template-columns: 1fr; } }

.pi-reserve-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.3rem 0; font-size: 0.85rem; }
.pi-reserve-row span:first-child { flex: 1; }
.pi-result-item { padding: 0.5rem 0.75rem; border-radius: 6px; font-size: 0.88rem; font-weight: 500; margin-bottom: 0.4rem; }
.pi-result--ok { background: rgba(60, 180, 80, 0.1); border-left: 3px solid #40b060; color: #5fd080; }
.pi-result--warn { background: rgba(220, 60, 60, 0.1); border-left: 3px solid #d04040; color: #e07070; }
.action-btn--sm { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
.action-btn--danger { background: #c03030; }
.action-btn--danger:hover { background: #a02020; }
.dash-table-total td { border-top: 2px solid var(--border-card); padding-top: 0.5rem; }
.obl-preview-icon { cursor: pointer; font-size: 0.9rem; opacity: 0.5; transition: opacity 0.15s; padding: 0.2rem; }
.obl-preview-icon:hover { opacity: 1; }

/* Expense lifecycle bar */
.exp-lifecycle { display: flex; align-items: center; gap: 0; margin-bottom: 0.75rem; flex-wrap: wrap; }
.exp-lc-step { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.2rem 0.5rem; border-radius: 3px; font-weight: 600; }
.exp-lc-sep { color: var(--text-muted); font-size: 0.7rem; margin: 0 0.15rem; opacity: 0.4; }
.exp-lc--done { color: var(--accent-green); background: rgba(60, 180, 80, 0.1); }
.exp-lc--current { color: #fff; background: var(--accent-blue); }
.exp-lc--future { color: var(--text-muted); opacity: 0.4; }
.exp-lc--cancelled { color: var(--accent-red); background: rgba(231, 76, 60, 0.1); }

/* Expense detail row */
.exp-row:hover { background: rgba(74, 124, 255, 0.04); }
.exp-expand-hint { color: var(--text-muted); font-size: 0.7rem; margin-left: 0.3rem; opacity: 0.5; }
.exp-detail-row td { padding: 0 !important; border-top: none !important; }
.exp-detail-content { background: rgba(255, 255, 255, 0.02); border-top: 1px solid var(--border-card); padding: 0.75rem 1rem; }
.exp-detail-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.exp-detail-meta strong { color: #ccc; font-weight: 500; }

/* Maintenance timeline */
.maint-row:hover { background: rgba(74, 124, 255, 0.04); }
.maint-detail-row td { padding: 0 !important; border-top: none !important; }
.maint-detail-content { background: rgba(255, 255, 255, 0.02); border-top: 1px solid var(--border-card); padding: 0.75rem 1rem; }
.maint-detail-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.82rem; color: var(--text-muted); margin-top: 0.75rem; }
.maint-detail-meta strong { color: #ccc; font-weight: 500; }

.maint-timeline { position: relative; padding-left: 1.25rem; margin: 0.75rem 0; }
.maint-tl-item { position: relative; padding-bottom: 0.6rem; padding-left: 0.75rem; border-left: 2px solid var(--border-card); }
.maint-tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.maint-tl-dot { position: absolute; left: -6px; top: 0.25rem; width: 10px; height: 10px; border-radius: 50%; background: var(--border-card); border: 2px solid var(--bg-main); }
.maint-tl-item--current .maint-tl-dot { background: var(--accent-blue); box-shadow: 0 0 0 3px rgba(74, 124, 255, 0.2); }
.maint-tl-body { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; }
.maint-tl-status { font-weight: 600; color: #fff; min-width: 80px; }
.maint-tl-date { color: var(--text-muted); font-size: 0.75rem; }
.maint-tl-actor { color: var(--text-muted); font-size: 0.72rem; background: rgba(255,255,255,0.05); padding: 0.1rem 0.3rem; border-radius: 3px; }
.maint-tl-empty { color: var(--text-muted); font-size: 0.8rem; font-style: italic; }
.action-select--link { background: transparent; border-color: var(--accent-blue); color: var(--accent-blue); font-size: 0.75rem; padding: 0.2rem 0.4rem; }
.row-highlight { animation: row-flash 1.5s ease 2; }
@keyframes row-flash { 0%, 100% { background: transparent; } 50% { background: rgba(74, 124, 255, 0.15); } }

/* Property Settings Menu */
.prop-settings { position: relative; margin-left: 0.5rem; }
.prop-settings-btn { background: none; border: 1px solid var(--border-card); color: #ccc; padding: 0.3rem 0.5rem; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.prop-settings-btn:hover { color: #fff; border-color: #777; }
.prop-settings-menu { position: absolute; top: 100%; right: 0; background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 6px; min-width: 160px; z-index: 200; box-shadow: 0 4px 12px rgba(0,0,0,0.3); padding: 0.25rem 0; margin-top: 0.25rem; }
.prop-menu-item { display: block; width: 100%; text-align: left; padding: 0.5rem 0.75rem; background: none; border: none; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; }
.prop-menu-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.prop-menu-item--danger { color: #e06060; }
.prop-menu-item--danger:hover { background: rgba(200,60,60,0.1); color: #e06060; }
.arch-warning { margin-bottom: 1rem; }
.arch-property-name { font-size: 1.1rem; font-weight: 600; color: #fff; margin-bottom: 0.75rem; }
.arch-info { padding-left: 1.25rem; color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; }
.modal-btn-danger { padding: 0.6rem 1.25rem; background: #c03030; color: #fff; border: none; border-radius: 6px; font-size: 0.9rem; cursor: pointer; }
.modal-btn-danger:hover { background: #a02020; }

/* Archived Properties */
.property-tab--archived { color: var(--text-muted); font-style: italic; opacity: 0.7; border-bottom-color: transparent; }
.property-tab--archived:hover { opacity: 1; color: #ccc; }
#archived-panel { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 8px; margin-bottom: 1.5rem; overflow: hidden; min-height: auto; }
.arch-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-card); }
.arch-panel-header h4 { margin: 0; font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.arch-card { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-card); opacity: 0.75; }
.arch-card:last-child { border-bottom: none; }
.arch-card:hover { opacity: 1; }
.arch-card-info { display: flex; align-items: center; gap: 0.5rem; min-width: 200px; }
.arch-card-name { font-weight: 600; color: #fff; font-size: 0.9rem; }
.badge--archived { background: rgba(150,150,150,0.2); color: #999; font-size: 0.65rem; padding: 0.15rem 0.4rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
.arch-card-meta { flex: 1; display: flex; gap: 1.5rem; font-size: 0.8rem; color: var(--text-muted); }
.arch-card .action-btn--sm { flex-shrink: 0; }

.month-selector { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.35rem; }
.month-label { font-size: 0.9rem; color: var(--text-muted); min-width: 220px; text-align: center; }
.month-nav { background: var(--bg-card); border: 1px solid var(--border-card); color: var(--text-muted); padding: 0.25rem 0.6rem; border-radius: 4px; cursor: pointer; font-size: 0.85rem; transition: background 0.15s, color 0.15s; }
.month-nav:hover { background: var(--border-card); color: #fff; }
.action-btn { padding: 0.4rem 1rem; background: var(--accent-blue); color: #fff; border: none; border-radius: 6px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.action-btn:hover { background: #3a65d4; }
.section-action-btn { padding: 0.4rem 1rem; background: var(--accent-blue); color: #fff; border: none; border-radius: 6px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.section-action-btn:hover { background: #3a65d4; }

/* Filter Tabs */
.filter-tabs { display: flex; gap: 0.25rem; margin: 0.75rem 0 0.5rem; }
.filter-tab { padding: 0.35rem 0.85rem; background: transparent; border: 1px solid var(--border-card); border-radius: 4px; color: var(--text-muted); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.filter-tab:hover { color: #fff; border-color: #555; }
.filter-tab--active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }

/* Action Dropdown */
.action-select { padding: 0.3rem 0.5rem; background: #121212; border: 1px solid #444; border-radius: 4px; color: var(--text-muted); font-size: 0.78rem; cursor: pointer; outline: none; width: 110px; min-width: 110px; }
.action-select:hover { border-color: var(--accent-blue); color: #fff; }
.action-select:focus { border-color: var(--accent-blue); }
.td-muted { color: var(--text-muted); font-size: 0.82rem; }
.tenant-link { color: var(--accent-blue); text-decoration: none; font-weight: 500; }
.tenant-link:hover { text-decoration: underline; }
.td-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.td-empty { text-align: center; padding: 2rem !important; color: var(--text-muted); font-style: italic; }

/* Status Update Modal */
.modal--sm { max-width: 420px; }
.status-update-body { padding: 1.25rem 1.5rem; }
.status-update-item { font-size: 0.95rem; font-weight: 600; color: #fff; margin-bottom: 1rem; }
.status-transition { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; padding: 0.75rem; background: #121212; border-radius: 6px; }
.su-arrow { color: var(--text-muted); font-size: 1.1rem; }
.su-badge .badge { font-size: 0.85rem; padding: 0.3rem 0.75rem; }

/* Badge additions for new statuses */
.badge--draft { background: rgba(150,150,150,0.12); color: #999; }
.badge--approved { background: rgba(42,157,92,0.12); color: var(--accent-green); }
.badge--cancelled { background: rgba(150,150,150,0.15); color: #888; text-decoration: line-through; }
.badge--closed { background: rgba(150,150,150,0.12); color: #888; }
.badge--in_progress { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--waiting { background: rgba(74,124,255,0.12); color: var(--accent-blue); }
.badge--notice_given { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--renewal_pending { background: rgba(74,124,255,0.12); color: var(--accent-blue); }
.badge--occupied { background: rgba(42,157,92,0.12); color: var(--accent-green); }
.badge--vacant { background: rgba(150,150,150,0.12); color: #888; }
.badge--unpaid { background: rgba(231,76,60,0.12); color: var(--accent-red); }
.badge--partial { background: rgba(245,166,35,0.12); color: var(--accent-amber); }

/* Tenant section */
.tenant-controls { display: flex; align-items: center; gap: 1rem; margin: 0.75rem 0 0.5rem; flex-wrap: wrap; }
.tenant-controls .filter-tabs { margin: 0; }
.tenant-search { padding: 0.4rem 0.75rem; background: #121212; border: 1px solid #333; border-radius: 4px; color: #e0e0e0; font-size: 0.85rem; outline: none; width: 200px; transition: border-color 0.2s; }
.tenant-search:focus { border-color: var(--accent-blue); }
.tenant-search::placeholder { color: #555; }
.kpi-row--5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.kpi-value--warn { color: var(--accent-red) !important; }
/* Tenant urgency rows */
.row-delinquent { background: rgba(231, 76, 60, 0.06); }
.row-delinquent td:first-child { border-left: 3px solid var(--accent-red); }
.row-delinquent--severe { background: rgba(231, 76, 60, 0.12); }
.row-delinquent--severe td:first-child { border-left: 4px solid var(--accent-red); }

.row-lease-risk { background: rgba(230, 180, 40, 0.06); }
.row-lease-risk td:first-child { border-left: 3px solid #d0a030; }

.row-lease-expired { background: rgba(231, 76, 60, 0.06); }
.row-lease-expired td:first-child { border-left: 3px solid var(--accent-red); }

.row-vacant { opacity: 0.55; }
.row-vacant td:first-child { border-left: 3px solid #555; }

/* Delinquency cell */
.delinquency-cell { display: flex; flex-direction: column; gap: 0.15rem; }
.delinquency-amount { font-weight: 700; font-size: 0.9rem; }
.delinquency--severe { color: var(--accent-red); }
.delinquency--moderate { color: #e0a030; }
.delinquency-days { font-size: 0.72rem; color: var(--accent-red); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }

/* Manager Header */
.mgr-header { position: sticky; top: 0; z-index: 100; background: #1a1a2e; padding: 0; }
.mgr-header-top { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1.5rem; }
.mgr-header-right { display: flex; align-items: center; gap: 1.5rem; }
.mgr-header .property-tabs { margin: 0; border-bottom: none; }
.mgr-header .property-tab { font-size: 0.9rem; padding: 0.5rem 1rem; }
.mgr-subnav { display: flex; gap: 0; padding: 0 1.5rem; border-top: 1px solid rgba(255,255,255,0.06); background: #16213e; }
.mgr-subnav-link { padding: 0.6rem 1.1rem; color: #666; text-decoration: none; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.01em; border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.mgr-subnav-link:hover { color: #bbb; background: rgba(255,255,255,0.03); }
.mgr-subnav-link:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: -2px; }
.mgr-subnav--active { color: #fff !important; border-bottom-color: var(--accent-blue); background: rgba(74, 124, 255, 0.08); font-weight: 700; }
.mgr-subnav-link[href*="dashboard"] { font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; font-size: 0.75rem; padding: 0.6rem 1.25rem; }

/* Legacy mgr-nav (unused but safe) */
.mgr-nav { display: flex; list-style: none; gap: 1.25rem; }
.mgr-nav a { color: #b0b0b0; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.mgr-nav a:hover, .mgr-nav a.mgr-nav--active { color: #fff; }

@media (max-width: 720px) {
  .mgr-header-top { flex-wrap: wrap; gap: 0.5rem; }
  .mgr-subnav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mgr-subnav-link { white-space: nowrap; font-size: 0.78rem; padding: 0.5rem 0.7rem; }
  .mgr-subnav-link[href*="dashboard"] { font-size: 0.72rem; padding: 0.5rem 0.85rem; }
}

/* Summary Widgets */
.summary-widgets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0; }
.summary-widget { display: block; background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 10px; padding: 1.25rem 1.5rem; text-decoration: none; color: inherit; transition: border-color 0.2s, transform 0.15s; }
.summary-widget:hover { border-color: var(--accent-blue); transform: translateY(-1px); }
.summary-widget:focus { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
.summary-widget h4 { font-size: 0.95rem; color: #fff; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.sw-metrics { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.sw-metric { display: flex; flex-direction: column; gap: 0.15rem; }
.sw-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
.sw-value { font-size: 1.15rem; font-weight: 700; color: #e0e0e0; }
.sw-value--warn { color: var(--accent-red); }
.sw-link { font-size: 0.82rem; color: var(--accent-blue); font-weight: 600; }

@media (max-width: 720px) {
  .summary-widgets { grid-template-columns: 1fr; }
  .mgr-nav { flex-wrap: wrap; gap: 0.5rem; }
}

/* Section action link */
.section-action-link { color: var(--accent-blue); text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: color 0.2s; }
.section-action-link:hover { color: #6b9aff; }

/* Activity Log Page */
.activity-log-page { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.alog-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.alog-header h2 { font-size: 1.5rem; color: #fff; margin-bottom: 0.25rem; }
.alog-subtitle { font-size: 0.9rem; color: var(--text-muted); }
.alog-property-selector { display: flex; gap: 0; border-bottom: 2px solid var(--border-card); }

/* Filters */
.alog-filters { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.alog-filter-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.alog-filter-item { margin-bottom: 0; flex: 0 0 auto; }
.alog-filter-item label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; display: block; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.alog-filter-item select,
.alog-filter-item input { padding: 0.45rem 0.65rem; background: #121212; border: 1px solid #333; border-radius: 4px; color: #e0e0e0; font-size: 0.85rem; outline: none; }
.alog-filter-item select:focus,
.alog-filter-item input:focus { border-color: var(--accent-blue); }
.alog-filter-item--search { flex: 1; min-width: 180px; }
.alog-filter-item--search input { width: 100%; }
.alog-filter-summary { margin-top: 0.75rem; font-size: 0.82rem; color: var(--text-muted); }

/* Event table */
.alog-table { width: 100%; }
.alog-row { cursor: pointer; transition: background 0.15s; }
.alog-row:hover { background: rgba(74,124,255,0.06); }
.alog-row:focus { outline: 2px solid var(--accent-blue); outline-offset: -2px; }
.alog-ts { font-size: 0.82rem; color: var(--text-muted); white-space: nowrap; min-width: 130px; }
.alog-desc { max-width: 500px; }
.alog-actor { font-size: 0.82rem; color: var(--text-muted); }

/* Event detail expansion */
.alog-detail-row { background: rgba(26,26,46,0.8); }
.alog-detail-cell { padding: 0 !important; }
.alog-detail { padding: 1rem 1.5rem; border-left: 3px solid var(--accent-blue); margin: 0.25rem 0 0.25rem 1rem; }
.alog-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 2rem; }
.alog-detail-label { display: block; font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; margin-bottom: 0.15rem; }
.alog-detail-value { font-size: 0.88rem; color: #e0e0e0; }

/* Event type badge colors */
.badge--income { background: rgba(42,157,92,0.12); color: var(--accent-green); }
.badge--expense { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--maintenance { background: rgba(74,124,255,0.12); color: var(--accent-blue); }
.badge--reserve { background: rgba(150,100,200,0.12); color: #b080d0; }
.badge--distribution { background: rgba(42,157,92,0.12); color: var(--accent-green); }
.badge--debt { background: rgba(231,76,60,0.12); color: var(--accent-red); }
.badge--tenant { background: rgba(74,124,255,0.12); color: var(--accent-blue); }
.badge--correction { background: rgba(245,166,35,0.12); color: var(--accent-amber); }
.badge--document { background: rgba(150,150,150,0.12); color: #999; }

@media (max-width: 720px) {
  .alog-filter-row { flex-direction: column; }
  .alog-filter-item { width: 100%; }
  .alog-detail-grid { grid-template-columns: 1fr; }
}

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--bg-card); border: 1px solid var(--border-card); border-radius: 12px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-card); }
.modal-header h3 { font-size: 1.15rem; color: #fff; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 0 0.25rem; line-height: 1; }
.modal-close:hover { color: #fff; }
.modal form { padding: 1.5rem; }
.modal .form-group { margin-bottom: 1rem; }
.modal .form-group label { display: block; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.35rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.modal .form-group input,
.modal .form-group select { width: 100%; padding: 0.6rem 0.75rem; background: #121212; border: 1px solid #333; border-radius: 6px; color: #e0e0e0; font-size: 0.92rem; outline: none; transition: border-color 0.2s; }
.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus { border-color: var(--accent-blue); }
.modal .form-group textarea { width: 100%; padding: 0.6rem 0.75rem; background: #121212; border: 1px solid #333; border-radius: 6px; color: #e0e0e0; font-size: 0.92rem; outline: none; transition: border-color 0.2s; font-family: inherit; resize: vertical; }
.form-hint { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.3rem; font-style: italic; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-optional { font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.form-hint { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; line-height: 1.3; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; padding-top: 0.5rem; }
.modal-btn-primary { padding: 0.6rem 1.5rem; background: var(--accent-blue); color: #fff; border: none; border-radius: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.modal-btn-primary:hover { background: #3a65d4; }
.modal-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-btn-secondary { padding: 0.6rem 1.5rem; background: transparent; color: var(--text-muted); border: 1px solid #444; border-radius: 6px; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; }
.modal-btn-secondary:hover { color: #fff; border-color: #888; }
.modal-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 2rem; }
.modal-state p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.5rem; }
.state-icon--success { background: rgba(42,157,92,0.15); color: var(--accent-green); }
.state-icon--empty { background: rgba(100,100,140,0.15); color: var(--text-muted); }

@media (max-width: 720px) {
  .form-row { grid-template-columns: 1fr; }
  .modal { max-width: 100%; border-radius: 8px; }
}

/* Tablet */
@media (max-width: 1000px) and (min-width: 721px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .reserve-grid { grid-template-columns: 1fr; }
  .dash-header-bar { flex-direction: column; gap: 1rem; }
  .dash-header-right { text-align: left; }
}

/* Desktop */
@media (min-width: 1200px) {
  main { padding: 2rem 24px; }
  .contract-grid { grid-template-columns: repeat(2, 1fr); }
}
