/* MLA app UI — landlord portal login + dashboard.
   Accessibility-first: visible focus, adequate contrast, semantic states.
   Mobile-first with responsive collapse. Reuses tokens from styles.css. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-body [hidden], .auth-body [hidden] { display: none !important; }
.small { font-size: .85rem; } .tiny { font-size: .68rem; padding: .12rem .45rem; }

/* Chapter Links: URL input + enable/disable toggle on one row */
.cl-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cl-row input[type="url"] { flex: 1 1 260px; min-width: 200px; }
.cl-toggle { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; color: #475569; white-space: nowrap; cursor: pointer; margin: 0; }
.cl-toggle input { width: auto; margin: 0; }

/* Chips */
.chip { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: capitalize; }
.chip-blue { background: #e3eefb; color: #14568f; }
.chip-gold { background: #f6edd6; color: #6e5518; } /* darkened from #8a6a1f — measured 4.33:1, below the 4.5:1 AA minimum for normal text; #6e5518 measures ~6.05:1 */
.chip-green { background: #dcefe4; color: #1f6b47; }
.chip-red { background: #f7e0e0; color: #9e2f2f; }

/* ============ AUTH / LOGIN ============ */
.auth-body { margin: 0; background: #0b1b30; }
.auth-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-brand {
  position: relative; color: #e8eef7; padding: clamp(1.5rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; overflow: hidden;
  background:
    radial-gradient(circle at 85% 8%, rgba(200,162,75,.30), transparent 30rem),
    linear-gradient(150deg, #07182b 0%, #10243e 55%, #14568f 120%);
}
.auth-logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.auth-logo .mark { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #10243e, #1e6fb8); box-shadow: inset 0 0 0 2px rgba(200,162,75,.6); }
.auth-logo .name strong { display: block; color: #fff; font-size: 1.02rem; }
.auth-logo .name span { font-size: .72rem; color: #9fb2cc; text-transform: uppercase; letter-spacing: .07em; }
.auth-brand-body h1 { font-family: var(--serif); color: #fff; font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.02em; max-width: 15ch; }
.auth-brand-body p { color: #c4d2e6; font-size: 1.08rem; max-width: 46ch; }
.auth-features { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .6rem; }
.auth-features li { color: #dbe6f4; }
.auth-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.auth-stats strong { display: block; font-size: 1.7rem; color: var(--gold); font-family: var(--serif); }
.auth-stats span { font-size: .78rem; color: #9fb2cc; text-transform: uppercase; letter-spacing: .05em; }
.auth-brand-foot { color: #8ba0bd; font-size: .85rem; margin: 0; }

.auth-panel { display: grid; place-items: center; background: #f5f7fa; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: 0 18px 48px rgba(16,36,62,.12); }
.auth-back { font-size: .85rem; color: var(--muted); display: inline-block; margin-bottom: 1rem; }
.auth-card h2 { font-family: var(--serif); margin-bottom: .25rem; }
.auth-card form { margin-top: 1.25rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: .15rem; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: inline-grid; place-items: center; background: none; border: none; font-size: 1.1rem; cursor: pointer; padding: 0; border-radius: 8px; }
.pw-toggle:hover { background: var(--bg-soft); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: .9rem 0 1rem; font-size: .9rem; }
.checkline { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; color: var(--body); }
.checkline input { width: auto; }
.form-alert { background: #f7e0e0; color: #9e2f2f; padding: .7rem .9rem; border-radius: 8px; font-weight: 600; font-size: .9rem; margin-bottom: 1rem; }
.form-alert.form-ok { background: #e2f3e6; color: #1f6f36; }
.auth-dialog { border: none; border-radius: 16px; padding: 0; max-width: 440px; width: calc(100% - 2rem); box-shadow: 0 24px 60px rgba(11,27,48,.28); }
.auth-dialog::backdrop { background: rgba(11,27,48,.5); backdrop-filter: blur(2px); }
.auth-dialog form { padding: 1.75rem; margin: 0; }
.auth-dialog h2 { margin: 0 0 .35rem; }
.auth-dialog-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1rem; }
@media (max-width: 480px){ .auth-dialog-actions { flex-direction: column-reverse; } .auth-dialog-actions .btn { width: 100%; justify-content: center; } }
.auth-divider { text-align: center; margin: 1.5rem 0 1rem; position: relative; color: var(--muted); font-size: .85rem; }
.auth-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.auth-divider span { background: #fff; padding: 0 .8rem; position: relative; }
.auth-legal { font-size: .78rem; color: var(--muted); margin: 1.2rem 0 0; text-align: center; }

/* ============ DASHBOARD SHELL ============ */
.app-body { margin: 0; background: #eef2f7; color: var(--body); }
.app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

.app-sidebar { background: #0d1f37; color: #c4d2e6; display: flex; flex-direction: column; padding: 1.1rem .9rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.app-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; padding: .3rem .4rem 1rem; }
.app-brand .mark { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #10243e, #1e6fb8); box-shadow: inset 0 0 0 2px rgba(200,162,75,.6); }
.app-brand-name { color: #fff; font-weight: 700; }
.side-nav { display: flex; flex-direction: column; gap: .15rem; margin-top: .25rem; flex: 0 0 auto; }
.side-nav-section { padding-bottom: .55rem; }
.side-nav-section + .side-nav-section { border-top: 1px solid rgba(255,255,255,.12); padding-top: .65rem; }
.side-nav-section[hidden] { display: none; }
.side-nav-heading { color: #91a8c7; font-size: .7rem; font-weight: 800; letter-spacing: .08em; line-height: 1.4; padding: .35rem .8rem; text-transform: uppercase; }
.side-nav a, .side-foot a, .side-logout {
  display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 10px; color: #c4d2e6; text-decoration: none; font-weight: 600; font-size: .95rem; border: none; background: none; cursor: pointer; width: 100%; text-align: left;
}
.side-nav a:hover, .side-foot a:hover, .side-logout:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.active { background: linear-gradient(90deg, rgba(30,111,184,.35), rgba(30,111,184,.12)); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.side-nav .ni, .side-foot .ni { width: 1.4rem; text-align: center; }
.side-nav-toggle { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .7rem .8rem; border: 0; border-radius: 10px; color: #c4d2e6; background: transparent; font: inherit; font-size: .95rem; font-weight: 600; text-align: left; cursor: pointer; }
.side-nav-toggle:hover, .side-nav-toggle.active { background: rgba(255,255,255,.08); color: #fff; }
.side-nav-toggle.active { box-shadow: inset 3px 0 0 var(--gold); }
.side-nav-toggle .ni { width: 1.4rem; text-align: center; }
.side-nav-caret { margin-left: auto; transition: transform .18s ease; }
.side-nav-toggle[aria-expanded="true"] .side-nav-caret { transform: rotate(180deg); }
.side-subnav { display: grid; gap: .1rem; padding: .2rem 0 .35rem 1.4rem; }
.side-subnav[hidden] { display: none; }
.side-subnav a { padding: .52rem .65rem; font-size: .86rem; font-weight: 600; }
.side-subnav a .ni { width: 1.2rem; }
.finance-anchor { scroll-margin-top: 5rem; }
.finance-member-list { display: grid; gap: .8rem; }
.finance-member-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 1rem; box-shadow: 0 5px 16px rgba(16,36,62,.05); }
.finance-member-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.finance-member-identity { display: grid; gap: .3rem; min-width: 0; }
.finance-member-identity > strong { color: var(--ink); font-size: 1rem; overflow-wrap: anywhere; }
.finance-member-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.finance-member-actions .btn-link { border: 1px solid #c8d3e0; border-radius: 999px; background: #f8fafc; padding: .36rem .62rem; line-height: 1.2; }
.finance-member-actions .btn-link:hover { background: #eaf2fb; border-color: #91a8c7; }
.finance-account-state { display: grid; gap: .3rem; min-width: 130px; }
.finance-member-facts { display: grid; grid-template-columns: minmax(120px,.7fr) minmax(100px,.6fr) minmax(190px,1.4fr); gap: .75rem; margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.finance-member-facts > div { display: grid; gap: .25rem; align-content: start; }
.finance-member-facts strong { font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .finance-member-head { display: grid; }
  .finance-account-state { max-width: 220px; }
  .finance-member-facts { grid-template-columns: 1fr; }
}
.side-foot { margin-top: .4rem; padding-top: .7rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: .15rem; flex: 0 0 auto; }
.side-logout { color: #ffb4b4; }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .8rem; padding: .7rem 1.2rem; }
.app-nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.2rem; padding: .35rem .6rem; cursor: pointer; }
.topbar-spacer { flex: 1; }
.affiliation-badges { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.push-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .5rem .9rem; font-weight: 600; font-size: .88rem; cursor: pointer; }
.push-btn:hover { border-color: var(--blue); color: var(--blue-dark); }
.push-btn.on { background: #dcefe4; border-color: #bfe0cd; color: #1f6b47; }
.user-chip { display: flex; align-items: center; gap: .6rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #1e6fb8, #10243e); }

/* Account dropdown (topbar) */
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: .6rem; background: none; border: 1px solid transparent; border-radius: 12px; padding: .25rem .5rem; cursor: pointer; }
.account-btn:hover { background: var(--bg-soft, #f2f5f9); }
.account-btn .caret { color: var(--muted); font-size: .7rem; }
.account-menu { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 48px rgba(16,36,62,.18); padding: .4rem; z-index: 80; }
.account-menu[hidden] { display: none; }
.account-menu .am-head { padding: .55rem .7rem .5rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; }
.account-menu .am-head strong { display: block; font-size: .95rem; }
.account-menu .am-head span { font-size: .78rem; color: var(--muted); }
.account-menu button { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; background: none; border: none; padding: .6rem .7rem; border-radius: 9px; cursor: pointer; font-size: .92rem; color: var(--body); }
.account-menu button:hover { background: var(--bg-soft, #f2f5f9); }
.account-menu button.danger { color: #b23b3b; }
.user-meta { display: flex; flex-direction: column; line-height: 1.1; }

.app-content { padding: clamp(1.2rem, 3vw, 2rem); max-width: 1200px; width: 100%; }
.view-head { margin-bottom: 1.4rem; }
.view-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.view-head h1 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.1rem); }
.workspace-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; }
.workspace-head > div { min-width: 0; }
.workspace-kicker { display: block; margin-bottom: .25rem; color: var(--blue-dark); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.workflow-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 4px 16px rgba(16,36,62,.05); }
.workflow-steps > div { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: .1rem .65rem; padding: 1rem; }
.workflow-steps > div + div { border-left: 1px solid var(--line); }
.workflow-steps > div > span { grid-row: 1 / span 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e7f0fa; color: var(--blue-dark); font-size: .78rem; font-weight: 800; }
.workflow-steps strong { align-self: end; color: var(--ink); font-size: .9rem; }
.workflow-steps small { color: var(--muted); line-height: 1.35; }
.guidance-disclosure { margin-bottom: 1.25rem; border: 1px solid #c8d8e9; border-radius: 12px; background: #f7faff; }
.guidance-disclosure summary { padding: .8rem 1rem; color: var(--blue-dark); font-weight: 750; cursor: pointer; }
.guidance-disclosure p { margin: 0; padding: 0 1rem 1rem; max-width: 85ch; color: var(--body); line-height: 1.6; }
.workspace-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1rem; }
.workspace-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.workspace-summary strong { color: var(--ink); font-size: 1.25rem; }
.workspace-summary span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.history-panel { padding: 0; overflow: hidden; }
.history-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; cursor: pointer; list-style: none; }
.history-panel > summary::-webkit-details-marker { display: none; }
.history-panel > summary > span:first-child { display: grid; gap: .2rem; }
.history-panel > summary small { color: var(--muted); font-weight: 400; }
.history-timeline { position: relative; display: grid; gap: 0; max-height: 480px; overflow: auto; padding: .25rem 1.25rem 1.25rem 2.6rem; border-top: 1px solid var(--line); }
.history-event { position: relative; padding: 1rem 0 1rem .8rem; border-bottom: 1px solid var(--line); }
.history-event:last-child { border-bottom: 0; }
.history-event::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1rem; width: 2px; background: #d9e3ee; }
.history-dot { position: absolute; z-index: 1; top: 1.25rem; left: calc(-1rem - 4px); width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px #c6d7e9; }
.history-event p { margin: .2rem 0; color: var(--body); font-size: .88rem; }
.history-event time { display: block; margin-bottom: .55rem; color: var(--muted); font-size: .76rem; }
.task-composer { scroll-margin-top: 84px; animation: task-reveal .2s ease-out; }
@keyframes task-reveal { from { opacity: 0; transform: translateY(-8px); } }
.form-stage { margin: 0 0 1.1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.form-stage legend { padding: 0 .45rem; color: var(--ink); font-weight: 800; }
.form-stage legend span { display: inline-grid; place-items: center; width: 25px; height: 25px; margin-right: .35rem; border-radius: 50%; background: var(--blue-dark); color: #fff; font-size: .72rem; }
.form-stage-final { background: var(--bg-soft); }
.checklist { display: grid; gap: .7rem; padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 1.7rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: #1f6b47; font-weight: 900; }
.case-record-grid { display: grid; grid-template-columns: 1fr; }
.case-log-tools { align-items: end; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.case-log { display: grid; margin-top: .75rem; }
.upcoming-case-panel { border-top: 4px solid var(--gold); }
.upcoming-case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.upcoming-case-card { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.upcoming-case-card h3 { margin: .45rem 0 .65rem; }
.upcoming-case-card p { margin: .35rem 0; }
.case-log-item { padding: 1rem .25rem; }
.case-log-item .ann-head > span { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.record-disclosure { padding: 0; overflow: hidden; }
.record-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; cursor: pointer; list-style: none; }
.record-summary::-webkit-details-marker { display: none; }
.record-summary::after { content: "Open"; color: var(--blue); font-size: .78rem; font-weight: 800; }
.record-disclosure[open] .record-summary { border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.record-disclosure[open] .record-summary::after { content: "Close"; }
.record-summary > span:first-child { display: grid; gap: .2rem; min-width: 0; margin-right: auto; }
.record-summary strong { color: var(--ink); font-size: 1.03rem; }
.record-summary small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.record-body { padding: 1.25rem; }
.admin-control-surface { border-style: dashed; }

/* Private before/after damage documentation */
.damage-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.damage-compare > section { border: 1px solid var(--line); border-radius: 12px; padding: .9rem; background: var(--bg-soft, #f6f8fb); }
.damage-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
.damage-photo { position: relative; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.damage-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #dfe6ee; }
.damage-photo figcaption { padding: .55rem; font-size: .8rem; line-height: 1.35; }
.damage-photo .pg-del { top: .35rem; right: .35rem; }
.damage-items input, .damage-items textarea { min-width: 110px; width: 100%; }
.damage-items textarea { resize: vertical; }
.damage-items td:nth-child(2), .damage-items td:nth-child(3) { min-width: 190px; }
.damage-totals { margin: 1rem 0 0 auto; max-width: 430px; border-top: 2px solid var(--line); padding-top: .75rem; }
.damage-totals p, .damage-totals label { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .45rem 0; }
.damage-totals input { width: 145px; }
@media (max-width: 760px) {
  .damage-compare { grid-template-columns: 1fr; }
  .workspace-head { display: grid; }
  .workspace-head .btn { width: 100%; justify-content: center; }
  .workflow-steps { grid-template-columns: 1fr 1fr; }
  .workflow-steps > div + div { border-left: 0; }
  .workflow-steps > div:nth-child(even) { border-left: 1px solid var(--line); }
  .workflow-steps > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .workspace-summary { grid-template-columns: 1fr 1fr; }
  .record-summary { flex-wrap: wrap; }
}
.affiliation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; margin: -0.4rem 0 1.4rem; }
.affiliation-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; padding: .9rem 1rem; }
.affiliation-card span, .affiliation-card small { display: block; color: var(--muted); }
.affiliation-card span { font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.affiliation-card strong { display: block; margin: .18rem 0; }
.quick-start { position: relative; overflow: hidden; margin-bottom: 1.4rem; padding: clamp(1.1rem, 2.5vw, 1.6rem); border: 1px solid #cad8e8; border-radius: 18px; background: linear-gradient(135deg, #fff 0%, #f4f8fd 58%, #edf4fb 100%); box-shadow: 0 12px 30px rgba(16,36,62,.08); }
.quick-start::after { content: ""; position: absolute; right: -90px; top: -110px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(184,139,36,.18), transparent 68%); pointer-events: none; }
.quick-start-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.quick-start-head h2 { margin: .15rem 0 0; font-size: clamp(1.25rem, 2vw, 1.6rem); }
.quick-start-kicker { color: var(--blue-dark); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.quick-action-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.quick-action { position: relative; min-height: 144px; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto 1fr; gap: .25rem .55rem; padding: 1rem; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.92); color: var(--ink); text-decoration: none; box-shadow: 0 3px 10px rgba(16,36,62,.05); transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease; }
.quick-action:hover { transform: translateY(-3px); border-color: var(--blue); color: var(--ink); text-decoration: none; box-shadow: 0 12px 26px rgba(16,36,62,.14); }
.quick-action:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.quick-action-step { grid-column: 3; color: #8795a8; font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.quick-action-icon { grid-column: 1; grid-row: 1 / span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #e7f0fa; font-size: 1.15rem; }
.quick-action strong { grid-column: 2; align-self: center; font-size: .95rem; line-height: 1.25; }
.quick-action > span:nth-last-child(2) { grid-column: 1 / -1; align-self: end; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.quick-action-arrow { position: absolute; right: .85rem; bottom: .7rem; color: var(--blue); font-weight: 800; }
@media (max-width: 1000px) { .quick-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .quick-start-head { display: grid; }
  .quick-start-head .chip { justify-self: start; }
  .quick-action-grid { grid-template-columns: 1fr; }
  .quick-action { min-height: 118px; }
}
.membership-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.membership-facts > div { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: .8rem; }
.membership-facts span { display: block; color: var(--muted); font-size: .76rem; font-weight: 700; margin-bottom: .2rem; text-transform: uppercase; }

/* Panels & KPIs */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; box-shadow: 0 1px 2px rgba(16,36,62,.05); margin-bottom: 1.4rem; }
.panel h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.panel-head h2 { margin: 0; }
.grid-2col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1.4rem; align-items: start; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; box-shadow: 0 1px 2px rgba(16,36,62,.05); }
.kpi-link { color: inherit; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease; }
.kpi-link:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 10px 26px rgba(16,36,62,.12); }
.kpi-ico { font-size: 1.5rem; }
.kpi-val { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; color: var(--ink); margin-top: .3rem; }
.kpi-lbl { color: var(--muted); font-size: .85rem; }

/* Property cards */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.1rem; }
.prop-card { border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; background: #fff; }
.stack .prop-card { margin-bottom: 1rem; }
.prop-top { display: flex; justify-content: space-between; align-items: start; gap: .6rem; }
.prop-top h3 { font-size: 1.05rem; margin: 0; }
.prop-meta { color: var(--muted); font-size: .88rem; margin: .4rem 0; }
.prop-stats { display: flex; gap: 1rem; align-items: center; font-size: .9rem; margin: .5rem 0; }
.prop-stats .rent { margin-left: auto; font-weight: 800; color: var(--blue-dark); }
.prop-desc { font-size: .9rem; color: var(--body); margin: .5rem 0; }
.listing-public-state { margin: .75rem 0; padding: .7rem .8rem; border-left: 4px solid var(--blue); background: var(--blue-soft); color: var(--ink); font-size: .88rem; line-height: 1.45; }
.prop-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.secondary-actions { margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.secondary-actions summary { color: var(--blue); font-size: .8rem; font-weight: 750; cursor: pointer; }
.secondary-actions .btnrow { margin-top: .6rem; }
.compact-select { width: auto; min-width: 145px; padding: .45rem .65rem; }

/* Forms in app */
.app-form .field { margin-bottom: .9rem; }
.app-form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .3rem; color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.searchbar input { width: 100%; }
.app-brand { align-items: center; }
.app-brand-name { line-height: 1.2; max-width: 190px; }
.treasurer-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.treasurer-action { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
.treasurer-action .ni { grid-row: 1 / span 2; font-size: 1.35rem; }
.treasurer-action span:last-child { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.treasurer-action:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(16,36,62,.08); }
.finance-import { scroll-margin-top: 84px; margin-bottom: 1.25rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.reconciliation-summary { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: .75rem; margin-bottom: .75rem; border-left: 4px solid var(--gold); background: #fff; }
.reconciliation-table select { min-width: 250px; }
.money-in { color: #1f6b47; font-weight: 700; }
.money-out { color: #9e2f2f; font-weight: 700; }
@media (max-width: 1000px) { .treasurer-actions { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .treasurer-actions { grid-template-columns: 1fr; } }

/* Message board */
.board-panel { display: flex; flex-direction: column; }
.board-feed { max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; padding-right: .3rem; }
.msg { display: flex; gap: .8rem; }
.msg-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #6a7686, #384252); font-size: .85rem; }
.msg-body { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; flex: 1; }
.msg-head { display: flex; justify-content: space-between; gap: .8rem; margin-bottom: .2rem; }
.msg-body p { margin: 0; }
.board-composer { display: flex; gap: .7rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); align-items: end; }
.board-composer textarea { flex: 1; resize: vertical; }

/* Announcements */
.ann-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; }
.ann-card.pinned { border-left: 4px solid var(--gold); background: #fffdf6; }
.ann-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.ann-head h3 { margin: 0; font-size: 1.1rem; }
.ann-card p { margin: .5rem 0; }
.ann-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.ann-item { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.ann-item:last-child { border-bottom: none; }
.ann-item .ann-head { align-items: baseline; }

/* Admin table */
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table th, .admin-table td { padding: .8rem .9rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; }
.admin-table thead th { background: var(--bg-soft); font-weight: 700; color: var(--ink); }
.admin-table .actions { white-space: nowrap; }
.chapter-switch { display: inline-flex; align-items: center; gap: .5rem; min-width: 76px; padding: .25rem .4rem; border: 0; border-radius: 999px; background: transparent; color: #9e2f2f; font: inherit; font-weight: 700; cursor: pointer; }
.chapter-switch-track { position: relative; width: 40px; height: 22px; flex: none; border-radius: 999px; background: #b8c1cc; transition: background .18s ease; }
.chapter-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,36,62,.3); transition: transform .18s ease; }
.chapter-switch.on { color: #1f6b47; }
.chapter-switch.on .chapter-switch-track { background: #2f855a; }
.chapter-switch.on .chapter-switch-track::after { transform: translateX(18px); }
.chapter-switch:disabled { cursor: wait; opacity: .55; }

/* Structured website editor */
.site-editor-group { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.25rem; }
.site-editor-list { display: grid; gap: .75rem; }
.site-editor-row { align-items: end; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: .65rem; grid-template-columns: minmax(150px, 1.2fr) minmax(170px, 1.4fr) minmax(110px, .7fr) auto; padding: .85rem; }
.site-editor-row.block-row { align-items: start; grid-template-columns: 1fr 1.5fr minmax(110px, .6fr) auto; }
.site-editor-row .field { margin: 0; }
.site-editor-actions { display: flex; gap: .3rem; }
.site-editor-actions button { min-height: 40px; min-width: 40px; }
.site-hero-preview { border: 1px solid var(--line); border-radius: 10px; margin-bottom: .5rem; max-height: 150px; object-fit: cover; width: 100%; }
@media (max-width: 800px) {
  .site-editor-row, .site-editor-row.block-row { grid-template-columns: 1fr; }
  .site-editor-actions { justify-content: flex-end; }
}

/* Buttons/links */
.btn-link { background: none; border: none; color: var(--blue); font-weight: 600; cursor: pointer; padding: .2rem .3rem; font-size: .88rem; border-radius: 6px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: #b03a3a; }

/* Toast */
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translate(-50%, 200%); background: #10243e; color: #fff; padding: .8rem 1.2rem; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.25); z-index: 200; font-weight: 600; transition: transform .28s ease; max-width: 90vw; }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: #9e2f2f; }

/* Skeleton & error */
.skeleton { height: 66px; border-radius: 12px; margin-bottom: .8rem; background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 37%, #eef2f7 63%); background-size: 400% 100%; animation: shine 1.3s ease infinite; }
@keyframes shine { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.err-box { background: #f7e0e0; color: #9e2f2f; padding: 1rem; border-radius: 10px; font-weight: 600; }

/* Focus (a11y) */
.app-body :focus-visible, .auth-body :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .toast, .kpi-link, .chapter-switch-track, .chapter-switch-track::after { transition: none; } }

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) { .grid-2col { grid-template-columns: 1fr; } .kpi-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { min-height: auto; }
  .auth-features, .auth-stats { display: none; }
  .auth-brand-body h1 { font-size: 1.7rem; }
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 82%; max-width: 300px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: 12px 0 40px rgba(0,0,0,.3); }
  .app-sidebar.open { transform: translateX(0); }
  .app-nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .user-meta { display: none; }
  .board-composer { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { .app-sidebar { transition: none; } }

/* ============ DESIGN REFINEMENT PASS (frog + Fantasy) ============ */

/* Login: loading spinner + mobile form-first */
.btn[aria-busy="true"] { cursor: progress; opacity: .82; }
.btn[aria-busy="true"]::after {
  content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .5em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; vertical-align: -.15em;
}
@keyframes spin { to { transform: rotate(360deg); } }
input[aria-invalid="true"] { border-color: #b03a3a; box-shadow: 0 0 0 3px rgba(176,58,58,.15); }

/* Dashboard content hierarchy */
.app-content { margin: 0 auto; }
.view-head { margin-bottom: clamp(1.25rem, 2vw, 1.75rem); }
.view-head h1 { letter-spacing: -.035em; }
.view-head p { max-width: 68ch; }

/* Premium topbar + sidebar */
.app-topbar { min-height: 64px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(16,36,62,.06); }
.app-sidebar { background: radial-gradient(circle at 20% 0%, rgba(184,139,36,.16), transparent 18rem), linear-gradient(180deg, #0b1b30 0%, #10243e 100%); }
.side-nav a, .side-foot a, .side-logout { transition: background .18s ease, color .18s ease, transform .18s ease; }
.side-nav a:hover { transform: translateX(2px); }

/* KPI cards */
.kpi { position: relative; overflow: hidden; padding: 1.35rem; border-radius: 18px; box-shadow: 0 8px 24px rgba(16,36,62,.07); }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--blue), var(--gold)); }
.kpi-val { font-size: clamp(1.65rem, 2.4vw, 2.25rem); line-height: 1; }
.kpi-lbl { margin-top: .35rem; font-weight: 700; }

/* Property cards */
.prop-card { transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease; box-shadow: 0 4px 14px rgba(16,36,62,.06); }
.prop-card:hover { transform: translateY(-3px); border-color: rgba(30,111,184,.32); box-shadow: 0 16px 36px rgba(16,36,62,.12); }
.prop-meta { line-height: 1.45; }

/* Message board */
.msg-body { border-radius: 16px; box-shadow: 0 2px 8px rgba(16,36,62,.05); }
.board-composer { position: sticky; bottom: 0; background: #fff; margin-inline: -1.4rem; padding: 1rem 1.4rem 0; }
.board-composer textarea { min-height: 48px; max-height: 160px; }

/* Announcements */
.ann-card { box-shadow: 0 4px 14px rgba(16,36,62,.06); transition: box-shadow .2s ease, transform .18s ease; }
.ann-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(16,36,62,.11); }
.ann-card.pinned { border-left-width: 6px; background: linear-gradient(90deg, #fff8e6 0%, #fff 36%); }
.ann-foot { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); }

/* Admin table */
.table-scroll { border: 1px solid var(--line); border-radius: 14px; }
.admin-table tbody tr:hover { background: var(--bg-soft); }
.admin-table th:first-child, .admin-table td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.admin-table thead th:first-child { background: var(--bg-soft); }

/* Empty states */
.empty-state { border: 1px dashed #c8d3e0; border-radius: 14px; padding: 1.25rem; background: var(--bg-soft); color: var(--body); }

/* Sidebar drawer scrim */
.sidebar-scrim { position: fixed; inset: 0; background: rgba(11,27,48,.48); z-index: 55; backdrop-filter: blur(2px); }
body.nav-open { overflow: hidden; }
@media (min-width: 821px) { .sidebar-scrim { display: none !important; } }

/* Consistent focus for custom controls */
.side-nav a:focus-visible, .side-nav-toggle:focus-visible, .side-foot a:focus-visible, .side-logout:focus-visible,
.push-btn:focus-visible, .btn-link:focus-visible, .app-nav-toggle:focus-visible, .pw-toggle:focus-visible {
  outline: 3px solid var(--gold-dark); outline-offset: 3px; box-shadow: 0 0 0 4px rgba(184,139,36,.24);
}

/* Mobile: form-first login */
@media (max-width: 860px) {
  .auth-panel { order: -1; min-height: 100svh; padding: 1rem; }
  .auth-card { border-radius: 16px; padding: 1.35rem; }
  .auth-brand { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { .btn[aria-busy="true"]::after { animation: none; } .side-nav a:hover { transform: none; } }

/* ---------- Finance & My Dues ---------- */
.chip-slate{background:#e2e8f0;color:#334155}
.dues-hero{display:flex;flex-wrap:wrap;gap:2rem;align-items:center;justify-content:space-between}
.dues-balance{font-family:var(--font-display,serif);font-size:2.6rem;font-weight:700;line-height:1.1;margin:.2rem 0}
.dues-balance.owe{color:var(--red,#b91c1c)}
.dues-balance.clear{color:var(--green,#15803d)}
.dues-pay{max-width:420px}
.dues-pay h3{margin:0 0 .5rem}
.led-entry{border:1px solid var(--line,#e5e7eb);border-radius:10px;padding:.7rem .85rem;margin-bottom:.6rem;background:#fff}
.led-memo{font-weight:600;margin-bottom:.35rem}
.led-cols,.led-line{display:grid;grid-template-columns:1fr 90px 90px;gap:.5rem;align-items:center}
.led-line{padding:.15rem 0;border-top:1px dotted var(--line,#e5e7eb)}
.led-dr,.led-cr{text-align:right;font-variant-numeric:tabular-nums}
.notice-row{display:flex;justify-content:space-between;gap:1rem;padding:.5rem 0;border-bottom:1px dotted var(--line,#e5e7eb)}

/* Accessible modal dialog */
.app-modal{border:none;border-radius:16px;padding:0;max-width:520px;max-height:calc(100vh - 2rem);width:calc(100% - 2rem);box-shadow:0 30px 80px rgba(6,17,33,.35)}
.app-modal::backdrop{background:rgba(6,17,33,.5);backdrop-filter:blur(2px)}
.app-modal .app-form{display:flex;flex-direction:column;max-height:calc(100vh - 2rem);padding:1.4rem}
.modal-head{display:flex;flex:0 0 auto;justify-content:space-between;align-items:center;margin-bottom:1rem}
.modal-head h3{margin:0}
.modal-x{background:none;border:none;font-size:1.1rem;cursor:pointer;color:var(--muted,#64748b);line-height:1;padding:.25rem}
.modal-body{min-height:0;overflow:auto;padding:.15rem}
.modal-foot{display:flex;flex:0 0 auto;justify-content:flex-end;gap:.6rem;margin-top:1.25rem;padding-top:.75rem;border-top:1px solid var(--line,#e5e7eb);background:var(--surface,#fff)}
@media (max-width:560px){.dues-hero{flex-direction:column;align-items:flex-start}}

/* ---------- Listing photos ---------- */
.prop-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:.4rem;margin-bottom:.75rem}
.pg-item{position:relative;aspect-ratio:4/3;border-radius:8px;overflow:hidden;background:#eef2f7}
.pg-item.cover{grid-column:1 / -1;aspect-ratio:16/9}
.pg-item img{width:100%;height:100%;object-fit:cover;display:block}
.pg-del{position:absolute;top:4px;right:4px;border:none;background:rgba(6,17,33,.72);color:#fff;border-radius:50%;width:40px;height:40px;line-height:1;font-size:1rem;cursor:pointer}
.pg-del:hover{background:var(--red,#b91c1c)}
.pg-add{margin-bottom:.75rem}
.btn:disabled{cursor:not-allowed;opacity:.55}
input[type=file]{font:inherit;padding:.4rem;border:1px dashed var(--line,#cbd5e1);border-radius:8px;width:100%;background:#fff}

/* --- Profile photo + member directory (all-member features) --- */
.avatar-img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.dir-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem;margin-top:.75rem}
.dir-card{display:flex;gap:.85rem;align-items:flex-start;padding:1rem;border:1px solid var(--line,#e2e8f0);border-radius:14px;background:#fff}
.dir-avatar{flex:0 0 auto;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;font-weight:800;color:#fff;background:linear-gradient(135deg,#1e6fb8,#10243e);overflow:hidden}
.dir-avatar.lg{width:56px;height:56px}
.dir-avatar.xl{width:96px;height:96px;font-size:1.6rem}
.dir-body{min-width:0}
.dir-body strong{display:block}
.dir-contact{display:flex;flex-direction:column;gap:.15rem;margin-top:.4rem}
.dir-contact a{font-size:.9rem;text-decoration:none;word-break:break-all}
.dir-hidden{margin-top:.4rem;font-style:italic}
.profile-head{display:flex;gap:1.25rem;align-items:center;margin-bottom:1.25rem;flex-wrap:wrap}
.profile-photo-actions{display:flex;flex-direction:column;gap:.4rem}
.listing-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.9rem}
@media(max-width:900px){.listing-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.listing-filter-grid{grid-template-columns:1fr}}

/* ---------- Member command center ---------- */
.app-body {
  background: linear-gradient(180deg, var(--bg-softer) 0, var(--bg-soft) 26rem, var(--bg-soft) 100%);
}
.app-main { min-width: 0; }
.app-content {
  max-width: 1380px;
  padding: clamp(1.25rem, 2.4vw, 2.5rem);
}
.app-topbar {
  min-height: 72px;
  padding-inline: clamp(1rem, 2vw, 2rem);
}
.topbar-context {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
  line-height: 1.25;
}
.topbar-context strong { color: var(--ink); font-size: .95rem; }
.topbar-context span {
  overflow: hidden;
  color: var(--muted);
  font-size: .76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar { box-shadow: 10px 0 32px rgba(11,27,48,.12); }
.app-sidebar .app-brand {
  min-height: 72px;
  padding-block: .85rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.side-nav { padding: .25rem 0 1rem; }
.side-nav-heading {
  margin-top: .35rem;
  color: rgba(255,255,255,.55);
  font-size: .66rem;
  letter-spacing: .13em;
}
.side-nav a,
.side-nav-toggle {
  min-height: 42px;
  margin: .1rem 0;
  font-size: .86rem;
}
.side-nav a.active {
  background: rgba(255,255,255,.12);
  box-shadow: inset 3px 0 0 var(--gold);
}
.overview-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: end;
  overflow: hidden;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(1.75rem, 4vw, 3.75rem);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 12%, rgba(184,139,36,.28), transparent 22rem),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 68%, #1b4167 100%);
  box-shadow: 0 20px 54px rgba(16,36,62,.2);
  color: #dbe4f0;
}
.overview-hero::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  pointer-events: none;
}
.overview-hero-copy,
.overview-hero-status { position: relative; z-index: 1; }
.overview-eyebrow {
  margin: 0 0 .75rem;
  color: #e6c46d;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.overview-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 4.2vw, 4.35rem);
  letter-spacing: -.035em;
  line-height: 1.02;
}
.overview-hero-copy > p:not(.overview-eyebrow) {
  max-width: 62ch;
  margin: 1.15rem 0 0;
  color: #dbe4f0;
  font-size: clamp(1rem, 1.4vw, 1.16rem);
}
.overview-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}
.overview-hero-actions .btn { min-height: 46px; }
.overview-hero-status {
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(5,17,31,.32);
  backdrop-filter: blur(10px);
}
.overview-status-label {
  margin: 0 0 .75rem;
  color: #e6c46d;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.overview-status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
}
.overview-status-row span {
  color: #dbe4f0;
  font-size: .7rem;
  line-height: 1.3;
}
.overview-status-row strong {
  display: block;
  color: #fff;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
}
.overview-trust-note {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #dbe4f0;
  font-size: .76rem;
  line-height: 1.45;
}
.overview-trust-note strong { display: block; color: #fff; font-size: .82rem; }
.trust-mark {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-weight: 900;
}
.overview-section { margin-bottom: clamp(2rem, 3.5vw, 3.25rem); }
.overview-section-compact { margin-bottom: 2rem; }
.section-heading {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-heading .eyebrow { margin: 0 0 .35rem; }
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  letter-spacing: -.025em;
}
.section-context { color: var(--muted); font-size: .8rem; }
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.pulse-card {
  position: relative;
  display: flex;
  min-height: 215px;
  flex-direction: column;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(16,36,62,.065);
  color: var(--body);
  transition: transform .18s ease, border-color .18s ease, box-shadow .2s ease;
}
.pulse-card:hover {
  transform: translateY(-3px);
  border-color: rgba(30,111,184,.34);
  box-shadow: 0 16px 36px rgba(16,36,62,.11);
  color: var(--body);
  text-decoration: none;
}
.pulse-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: var(--blue);
}
.pulse-card-trust::before { background: var(--gold); }
.pulse-kicker {
  margin-bottom: .8rem;
  color: var(--blue-dark);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pulse-card strong {
  display: block;
  margin-bottom: .55rem;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.25;
}
.pulse-card > span:not(.pulse-kicker) { font-size: .86rem; line-height: 1.55; }
.pulse-card b {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--blue-dark);
  font-size: .8rem;
}
.quick-start {
  margin-bottom: 2rem;
  padding: clamp(1.25rem, 2vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(16,36,62,.055);
}
.quick-start-head { margin-bottom: 1.1rem; }
.quick-action {
  min-height: 152px;
  padding: 1.15rem;
  border-radius: 14px;
  box-shadow: none;
}
.quick-action-step {
  color: var(--muted);
  font-size: .64rem;
  letter-spacing: .12em;
}
.quick-action-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--bg-softer);
}
.affiliation-card {
  min-height: 104px;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(16,36,62,.05);
}
#overview .kpi-row { gap: .9rem; margin-bottom: 2rem; }
#overview .kpi {
  min-height: 138px;
  padding: 1.15rem;
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(16,36,62,.055);
}
#overview .kpi::before { height: 3px; background: var(--blue); }
#overview .kpi-val {
  margin-top: .6rem;
  font-family: var(--font);
  font-size: 1.75rem;
}
#overview .kpi-lbl { color: var(--muted); font-size: .76rem; }
#overview > .panel {
  padding: clamp(1.25rem, 2vw, 1.75rem);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(16,36,62,.055);
}
.panel-intro { margin: -.25rem 0 1rem; color: var(--muted); font-size: .84rem; }
#ovAnnouncements {
  position: relative;
  margin-top: .25rem;
  padding-left: 1.6rem;
}
#ovAnnouncements::before {
  content: "";
  position: absolute;
  top: .5rem;
  bottom: .5rem;
  left: .35rem;
  width: 2px;
  background: var(--line);
}
#ovAnnouncements .ann-item { position: relative; padding: .2rem 0 1.15rem .5rem; }
#ovAnnouncements .ann-item::before {
  content: "";
  position: absolute;
  top: .45rem;
  left: -1.48rem;
  width: 10px;
  height: 10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--line);
}
#ovAnnouncements .ann-item:last-child { padding-bottom: .2rem; }

@media (max-width: 1080px) {
  .overview-hero { grid-template-columns: 1fr; align-items: start; }
  .overview-hero-status { max-width: 600px; }
  .pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pulse-card:last-child { grid-column: 1 / -1; min-height: 180px; }
}
@media (max-width: 820px) {
  .topbar-context { display: none; }
  .app-content { padding: 1rem; }
  .overview-hero { border-radius: 18px; }
}
@media (max-width: 640px) {
  .overview-hero { padding: 1.35rem; }
  .overview-hero h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .overview-hero-actions { flex-direction: column; }
  .overview-hero-actions .btn { justify-content: center; width: 100%; }
  .overview-status-row { gap: .35rem; }
  .overview-status-row strong { font-size: 1.3rem; }
  .pulse-grid { grid-template-columns: 1fr; }
  .pulse-card:last-child { grid-column: auto; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-context { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse-card:hover { transform: none; }
}