/* 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; }
.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: .4rem; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 1.1rem; cursor: pointer; padding: .4rem; 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: hidden; }
.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: .5rem; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.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-foot { margin-top: 0; padding-top: 1rem; 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; }
.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); }

/* 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-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-fill, minmax(260px, 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; }
.prop-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }

/* 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%; }

/* 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; }

/* 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 { 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-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;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{padding:1.4rem}
.modal-head{display:flex;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-foot{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1.25rem}
@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:24px;height:24px;line-height:1;font-size:.75rem;cursor:pointer}
.pg-del:hover{background:var(--red,#b91c1c)}
.pg-add{margin-bottom:.75rem}
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}