:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #d8d9d5;
  --surface: #ffffff;
  --canvas: #f7f7f4;
  --accent: #e85f3a;
  --green: #203c34;
  --green-dark: #173029;
  --warning: #fff1c7;
  --warning-ink: #73581a;
  --focus: #1f6f8b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 65%, white); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; background: var(--ink); color: white; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.app-header { min-height: 96px; padding: 20px clamp(24px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: #fbfbf8; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand span { display: grid; gap: 2px; }
.brand strong { font-size: 22px; line-height: 1; }
.brand small { color: var(--muted); font-size: 14px; }
.account-actions { display: flex; align-items: center; gap: 12px; }
.account-initials { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: white; background: #1c2b4a; font-weight: 800; }

main { min-height: calc(100vh - 97px); }
main:focus { outline: none; }
.loading-view { min-height: 420px; display: grid; place-items: center; color: var(--muted); }

.auth-view { width: min(440px, calc(100% - 40px)); margin: 0 auto; padding: clamp(40px, 7vw, 88px) 0 56px; }
.eyebrow { color: #a33d2a; font-size: 13px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.page-heading h1 { margin: 12px 0 16px; font-size: clamp(42px, 6vw, 64px); line-height: 1.02; letter-spacing: 0; }
.auth-tool { border: 1px solid var(--line); background: var(--surface); }
.auth-tool form { padding: 32px; }
#workspaceErrorView .auth-tool { padding: 32px; }
#workspaceErrorView p { color: var(--muted); line-height: 1.5; }
.auth-tool h1 { margin-bottom: 28px; font-size: 28px; font-weight: 600; letter-spacing: -.6px; }
.auth-tool #codeEmail { overflow-wrap: anywhere; }
.auth-tool .check-field { margin-bottom: 0; }
.auth-switch { padding: 0 32px 24px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-switch p { margin: 0; }
.auth-switch button { min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-switch button:hover { color: var(--accent-hover); }
.auth-switch button:disabled { cursor: wait; opacity: .6; }
.auth-tool form > div > p, .auth-tool form > p { margin-bottom: 24px; color: var(--muted); line-height: 1.5; }
label:not(.check-field) { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 750; }
input[type="email"], input[type="text"] { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #aeb1ad; border-radius: 3px; background: white; color: var(--ink); }
.check-field { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin: 18px 0 24px; color: #414b5a; font-size: 14px; line-height: 1.45; }
.check-field input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.code-input { max-width: 210px; font-size: 24px; letter-spacing: 6px; }

.primary-button, .secondary-button, .danger-button, .quiet-button, .text-button, .close-button { min-height: 44px; border-radius: 3px; font-weight: 750; }
.primary-button { padding: 11px 18px; border: 1px solid var(--green); color: white; background: var(--green); }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { padding: 11px 18px; border: 1px solid #aeb1ad; color: var(--ink); background: white; }
.danger-button { padding: 11px 18px; border: 1px solid #9f2d25; color: white; background: #9f2d25; }
.danger-button:hover { background: #83221c; }
.quiet-button { padding: 8px 12px; border: 1px solid transparent; color: var(--muted); background: transparent; }
.text-button { min-height: 36px; padding: 6px 0; border: 0; color: #6f392d; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.close-button { width: 44px; padding: 0; border: 1px solid transparent; background: transparent; font-size: 30px; line-height: 1; }
.auth-tool .primary-button { width: 100%; margin-top: 20px; }
.auth-tool .text-button { margin-top: 16px; }
.field-error, .workspace-error { margin: 12px 0 !important; color: #a12620 !important; font-size: 14px; font-weight: 650; }

.rentals-view { padding: clamp(44px, 7vw, 88px) clamp(24px, 4vw, 64px); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 36px; margin-bottom: 52px; }
.page-heading h1 { margin-bottom: 14px; }
.page-heading p { color: var(--muted); }
.add-property-button { flex: 0 0 auto; min-width: 170px; }
.property-section { border: 1px solid var(--line); background: var(--surface); }
.section-heading { min-height: 132px; padding: 32px 42px; display: flex; align-items: end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin-bottom: 8px; font-size: 25px; }
.section-heading p { margin-bottom: 0; color: var(--muted); }
.section-count { text-align: right; }
.property-list { display: grid; gap: 14px; padding: 16px; background: #f4f3ef; }
.property-row { min-height: 86px; padding: 20px 26px; display: grid; grid-template-columns: minmax(240px, 1.3fr) minmax(125px, .5fr) minmax(190px, .8fr) 28px; align-items: center; gap: 24px; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: white; text-align: left; }
.property-row:last-child { border-bottom: 0; }
button.property-row { width: 100%; cursor: pointer; }
button.property-row:hover { background: #fafaf8; }
.property-row.setup-row { padding: 0; display: block; border: 1px solid var(--line); border-left: 4px solid #efbd4f; background: #fffdfa; }
.setup-row-main { width: 100%; min-width: 0; padding: 20px 26px; display: grid; grid-template-columns: minmax(240px, 1.3fr) minmax(125px, .5fr) 28px; align-items: center; gap: 24px; border: 0; color: inherit; background: transparent; text-align: left; }
.setup-row-main:hover { background: #faf8f2; }
.setup-state { color: var(--warning-ink); font-size: 12px; font-weight: 800; }
.property-row h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.property-row strong, .property-row small { display: block; }
.property-row small { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.property-row strong { font-size: 14px; }
.property-row .issue-copy { color: #8c3d21; }
.property-row .row-arrow { color: #b84a2c; font-size: 21px; text-align: right; }
.property-row.setup-row .row-arrow { color: var(--warning-ink); }
.status-label { display: inline-block; padding: 6px 12px; border-radius: 999px; color: var(--warning-ink); background: var(--warning); font-size: 12px; font-weight: 850; text-transform: uppercase; }
.reference-label { color: #4c5969; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.empty-properties { padding: 56px 42px; }
.empty-properties h3 { margin-bottom: 8px; font-size: 22px; }
.empty-properties p { margin-bottom: 0; color: var(--muted); }

dialog { width: min(620px, calc(100% - 32px)); padding: 0; border: 1px solid #b8bbb7; border-radius: 4px; color: var(--ink); background: white; box-shadow: 0 22px 70px rgb(16 24 40 / 22%); }
dialog::backdrop { background: rgb(17 24 39 / 42%); }
.dialog-heading { padding: 26px 28px 20px; display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { margin: 6px 0 0; font-size: 25px; }
.route-options { margin: 0; padding: 24px 28px; border: 0; display: grid; gap: 12px; }
.route-options legend { margin-bottom: 12px; font-size: 14px; font-weight: 750; }
.route-options label { min-height: 82px; padding: 16px; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 3px; }
.route-options label:has(input:checked) { border-color: var(--green); box-shadow: inset 4px 0 var(--green); }
.route-options input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); }
.route-options span { display: grid; gap: 5px; }
.route-options small { color: var(--muted); line-height: 1.4; }
.dialog-actions { padding: 20px 28px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); background: #fafaf8; }
#propertyDialogError { margin-inline: 28px !important; }

.setup-view { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 80px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 60px; }
.setup-progress { border-right: 1px solid var(--line); padding-right: 32px; }
.setup-progress h2 { margin: 26px 0 20px; font-size: 18px; }
.mobile-step-summary { display: none; }
.setup-progress ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.setup-progress li { min-height: 48px; padding: 9px 10px; display: grid; grid-template-columns: 34px 1fr; align-items: center; color: var(--muted); }
.setup-progress li.current { color: var(--ink); background: white; border-left: 3px solid var(--accent); }
.setup-progress li.complete { color: var(--green); }
.setup-progress li span { font-size: 12px; font-weight: 800; }
.setup-panel { max-width: 720px; }
.setup-panel h1 { margin: 10px 0 12px; font-size: 38px; }
.setup-panel > p { color: var(--muted); line-height: 1.55; }
.setup-summary { margin: 34px 0 24px; border-top: 1px solid var(--line); }
.setup-summary div { min-height: 62px; padding: 16px 0; display: grid; grid-template-columns: 190px 1fr; border-bottom: 1px solid var(--line); }
.setup-summary dt { color: var(--muted); }
.setup-summary dd { margin: 0; font-weight: 700; }
.property-view { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 80px; }
.back-button { min-height: 32px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 750; }
.property-workspace-heading { margin: 10px 0 18px; }
.property-workspace-heading h1 { margin: 7px 0 3px; font-size: 38px; line-height: 1.08; }
.property-workspace-heading p { margin: 0; color: var(--muted); font-size: 16px; }
.property-tabs { display: flex; gap: 26px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.property-tab { position: relative; min-height: 48px; padding: 0 1px; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 800; }
.property-tab::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: transparent; content: ""; }
.property-tab.active { color: var(--ink); }
.property-tab.active::after { background: var(--accent); }
.property-details-layout { display: grid; grid-template-columns: minmax(320px, .75fr) minmax(420px, 1.45fr); align-items: start; gap: 16px; }
.rent-tenancy-card, .rent-tracking-panel, .recent-payments, .outstanding-water-charges, .maintenance-panel, .tenancies-panel, .property-schedule, .report-controls, .rent-records, .property-history { border: 1px solid var(--line); border-radius: 5px; background: white; }
.rent-tenancy-card { grid-column: 1 / -1; }
.rent-tenancy-heading { min-height: 82px; padding: 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fbfaf7; }
.section-kicker { color: #a33d2a; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.rent-tenancy-heading h2 { margin: 6px 0 0; font-size: 25px; }
.rent-tenancy-heading h2 small { color: var(--muted); font-size: 10px; }
.tenant-summary { min-width: 0; max-width: 52%; display: grid; justify-items: end; gap: 2px; text-align: right; }
.tenant-summary strong { font-size: 13px; }
.tenant-summary small { max-width: 100%; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.rental-meta-grid { margin: 0; padding: 0 15px 11px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; background: #fbfaf7; }
.rental-meta-grid div { min-width: 0; padding-top: 9px; border-top: 1px solid var(--line); }
.rental-meta-grid dt { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.rental-meta-grid dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 11px; font-weight: 750; }
.rent-records header > span, .property-history header > span { color: var(--muted); font-size: 10px; }
.recent-payments { grid-column: 1 / -1; min-height: 50px; padding: 16px 22px; color: var(--muted); font-size: 11px; }
.outstanding-water-charges { grid-column: 1 / -1; overflow: hidden; }
.outstanding-water-charges > header { min-height: 68px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.outstanding-water-charges h2 { margin: 4px 0 0; font-size: 16px; }
.outstanding-water-charges header > span { color: var(--muted); font-size: 10px; }
.outstanding-charge-row { min-height: 76px; padding: 14px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.outstanding-charge-row:last-child { border-bottom: 0; }
.outstanding-charge-details, .outstanding-charge-status { min-width: 0; display: grid; gap: 3px; }
.outstanding-charge-details strong { font-size: 13px; }
.outstanding-charge-details span, .outstanding-charge-status small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.outstanding-charge-status { justify-items: end; text-align: right; }
.outstanding-charge-amount { font-size: 14px; }
.charge-state { padding: 4px 7px; border-radius: 999px; color: #8d2e26; background: #fde8e5; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.charge-state.disputed, .charge-delivery-failed { color: #8d2e26; }
.maintenance-panel, .tenancies-panel { grid-column: 1 / -1; overflow: hidden; }
.maintenance-panel > header, .tenancies-panel > header { min-height: 66px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.maintenance-panel h2, .tenancies-panel h2 { margin-bottom: 3px; font-size: 16px; }
.maintenance-panel header p, .tenancies-panel header p { margin: 0; color: var(--muted); font-size: 10px; }
.maintenance-panel header > span { color: var(--muted); font-size: 10px; }
.maintenance-list, .tenancy-list { display: grid; }
.maintenance-row, .tenancy-row { min-height: 68px; padding: 13px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.maintenance-row:last-child, .tenancy-row:last-child { border-bottom: 0; }
.maintenance-row h3 { margin: 0 0 3px; font-size: 13px; }
.maintenance-row p, .tenancy-row p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.maintenance-row .maintenance-summary { margin-top: 5px; color: #414b5a; }
.maintenance-labels { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.urgency-label, .maintenance-status, .current-tenancy-label, .previous-tenancy-label { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.urgency-label { color: #4b5563; background: #f0f1ef; }
.urgency-urgent, .urgency-emergency_review { color: #8d2e26; background: #fde8e5; }
.urgency-priority { color: #75520b; background: #fff2cf; }
.maintenance-status { color: #235347; background: #e7f1ed; }
.tenancy-row strong { font-size: 12px; }
.current-tenancy-label { color: #235347; background: #e7f1ed; }
.previous-tenancy-label { color: #4b5563; background: #eceeed; }
.panel-empty { margin: 0; padding: 22px 18px; color: var(--muted); font-size: 11px; }
.property-schedule { overflow: hidden; }
.property-schedule > header { min-height: 78px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.property-schedule > header h2 { margin: 0 0 4px; font-size: 20px; }
.property-schedule > header p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.property-schedule > header > span, .schedule-group-count { color: var(--muted); font-size: 10px; white-space: nowrap; }
.property-schedule-list { display: grid; gap: 26px; padding: 22px; }
.schedule-group { display: grid; gap: 12px; }
.schedule-group + .schedule-group { padding-top: 24px; border-top: 1px solid var(--line); }
.schedule-group > header { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.schedule-group h3 { margin: 0 0 4px; font-size: 16px; }
.schedule-group header p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.schedule-item-list { display: grid; gap: 9px; }
.schedule-item { min-height: 72px; padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; border: 1px solid var(--line); background: white; }
.schedule-item.schedule-action { border-left: 3px solid var(--accent); }
.schedule-item.schedule-waiting { border-left: 3px solid #d5a52d; }
.schedule-type { color: #a33d2a; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.schedule-item h4 { margin: 5px 0 3px; font-size: 14px; }
.schedule-item p { margin: 0; color: var(--muted); font-size: 10px; }
.schedule-status { padding: 6px 9px; border-radius: 999px; color: #235347; background: #e7f1ed; font-size: 9px; font-weight: 800; white-space: nowrap; }
.schedule-waiting .schedule-status { color: #75520b; background: #fff2cf; }
.schedule-empty { padding: 28px 4px; }
.schedule-empty strong { font-size: 15px; }
.schedule-empty p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.report-controls { margin-bottom: 18px; padding: 18px 20px; display: grid; grid-template-columns: 310px minmax(0, 1fr) auto; align-items: end; gap: 8px 20px; }
.report-controls > label { grid-column: 1; margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.report-controls select { grid-column: 1; min-height: 44px; padding: 0 12px; border: 1px solid #aeb1ad; border-radius: 3px; background: white; font: inherit; font-size: 12px; font-weight: 700; }
.report-actions { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: 8px; }
.rent-records, .property-history { overflow: hidden; }
.rent-records > header, .property-history > header { min-height: 88px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.rent-records h2, .property-history h2 { margin-bottom: 5px; font-size: 20px; }
.rent-records header p, .property-history header p { margin: 0; color: var(--muted); font-size: 11px; }
.records-empty { min-height: 165px; padding: 38px 24px; display: grid; place-content: center; text-align: center; }
.records-empty strong { font-size: 16px; }
.records-empty p { max-width: 430px; margin: 8px 0 0; color: var(--muted); }
.payment-table { width: 100%; border-collapse: collapse; }
.payment-table th, .payment-table td { padding: 13px 16px; border-top: 1px solid var(--line); text-align: left; font-size: 12px; }
.payment-table th { color: var(--muted); background: #fafaf8; font-size: 10px; text-transform: uppercase; }
.property-history ol { margin: 0; padding: 0 22px 16px; list-style: none; }
.property-history li { padding: 14px 0 14px 24px; position: relative; border-top: 1px solid #e8e9e6; font-size: 12px; line-height: 1.5; }
.property-history li::before { position: absolute; top: 18px; left: 2px; width: 8px; height: 8px; border: 2px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px #dfe8e3; content: ""; }
.property-history li time { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
@media (max-width: 760px) {
  .app-header { min-height: 76px; padding: 14px 18px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand strong { font-size: 19px; }
  .brand small { font-size: 12px; }
  .account-initials { width: 40px; height: 40px; }
  .quiet-button { min-height: 40px; padding: 4px 6px; font-size: 13px; white-space: nowrap; }
  .auth-view { width: min(440px, calc(100% - 32px)); padding: 36px 0 56px; }
  .auth-tool form { padding: 24px; }
  #workspaceErrorView .auth-tool { padding: 24px; }
  .auth-switch { padding: 0 24px 20px; }
  .page-heading h1 { font-size: 42px; }
  .rentals-view { padding: 36px 16px 60px; }
  .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 32px; }
  .add-property-button { width: 100%; }
  .section-heading { min-height: 0; padding: 24px 20px; align-items: start; flex-direction: column; }
  .section-count { text-align: left; }
  .property-row { min-height: 0; padding: 22px 18px; grid-template-columns: minmax(0, 1fr) 24px; gap: 18px; }
  .property-row.setup-row { display: block; }
  .setup-row-main { width: 100%; padding: 22px 18px 14px; grid-template-columns: minmax(0, 1fr) 24px; gap: 18px; }
  .setup-row-main .row-address, .setup-row-main .setup-state { grid-column: 1; }
  .setup-row-main .row-arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .property-row .row-address, .property-row .row-paid, .property-row .row-issues { grid-column: 1; }
  .property-row .row-arrow { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .empty-properties { padding: 40px 20px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions button { width: 100%; }
  .setup-view { width: min(100% - 32px, 680px); padding: 32px 0 60px; grid-template-columns: 1fr; gap: 30px; }
  .setup-progress { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 24px; }
  .setup-progress ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
  .setup-progress li { min-height: 58px; padding: 6px; display: flex; flex-direction: column; justify-content: center; gap: 4px; text-align: center; }
  .setup-progress li strong { font-size: 11px; }
  .setup-progress li.current { border-left: 0; border-bottom: 3px solid var(--accent); }
  .setup-panel h1 { font-size: 32px; }
  .setup-summary div { grid-template-columns: 1fr; gap: 6px; }
  .property-view { width: min(100% - 36px, 680px); padding: 28px 0 60px; }
  .property-workspace-heading h1 { font-size: 30px; }
  .property-tabs { gap: 24px; }
  .property-details-layout { grid-template-columns: 1fr; }
  .rent-tenancy-heading { align-items: start; }
  .rental-meta-grid { gap: 9px; }
  .recent-payments { grid-column: 1; }
  .outstanding-water-charges { grid-column: 1; }
  .outstanding-charge-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .outstanding-charge-row .text-button { grid-column: 1 / -1; justify-self: start; }
  .maintenance-panel, .tenancies-panel { grid-column: 1; }
  .maintenance-row { align-items: start; grid-template-columns: 1fr; gap: 9px; }
  .maintenance-labels { justify-content: flex-start; flex-wrap: wrap; }
  .property-schedule > header { align-items: flex-start; flex-direction: column; }
  .property-schedule-list { padding: 18px; }
  .schedule-group > header { align-items: flex-start; flex-direction: column; gap: 6px; }
  .schedule-item { align-items: flex-start; grid-template-columns: 1fr; gap: 10px; }
  .schedule-status { justify-self: start; }
  .report-controls { grid-template-columns: 1fr; padding: 20px; }
  .report-controls > label, .report-controls select, .report-actions { grid-column: 1; grid-row: auto; }
  .report-actions { display: grid; margin-top: 8px; }
  .report-actions button { width: 100%; }
}

@media (max-width: 360px) {
  .app-header { gap: 12px; }
  .account-actions { gap: 6px; }
  .account-initials { width: 36px; height: 36px; }
  .quiet-button { padding-inline: 0; font-size: 12px; }
  .mobile-step-summary { margin: -10px 0 14px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
  .mobile-step-summary strong { color: var(--ink); }
  .setup-progress li { min-height: 42px; }
  .setup-progress li strong { display: none; }
}

@media (max-width: 760px) and (max-height: 650px) {
  dialog { max-height: calc(100dvh - 24px); }
  .dialog-heading { padding: 16px 20px 14px; }
  .dialog-heading h2 { font-size: 22px; }
  .route-options { padding: 12px 20px; gap: 8px; }
  .route-options legend { margin-bottom: 8px; }
  .route-options label { min-height: 0; padding: 10px 12px; }
  .route-options strong { font-size: 14px; }
  .route-options small { font-size: 12px; }
  .dialog-actions { padding: 10px 20px; gap: 8px; }
  #propertyDialogError { margin-inline: 20px !important; }
}

/* The frozen portfolio is the interaction and layout contract for the hosted UI. */
.app-header { min-height: 74px; padding: 14px clamp(24px, 4vw, 54px); }
.brand-mark { width: 25px; height: 25px; }
.brand strong { font-size: 18px; }
.brand small { font-size: 9px; }
.account-initials { width: 44px; height: 44px; padding: 0; border: 0; }
.account-disclosure { position: relative; }
.account-popover { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: min(320px, calc(100vw - 32px)); border: 1px solid var(--line); background: white; box-shadow: 0 18px 46px rgb(17 24 39 / 16%); }
.account-popover header { padding: 18px; display: grid; gap: 4px; border-bottom: 1px solid var(--line); }
.account-popover header span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.account-option { width: 100%; padding: 16px 18px; border: 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--ink); background: white; text-align: left; }
.account-option:hover { background: #fbfaf7; }
.account-option > span:first-child { display: grid; gap: 4px; }
.account-option small { color: var(--muted); font-size: 10px; }
.rentals-view { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 80px; }
.section-heading { min-height: 86px; padding: 20px 26px; align-items: center; }
.section-heading h2 { margin: 0; font-size: 22px; }
.property-overview-card { overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: white; }
.property-overview-summary { width: 100%; min-height: 86px; padding: 20px 26px; display: grid; grid-template-columns: minmax(240px, 1.3fr) minmax(125px, .5fr) 28px; align-items: center; gap: 24px; border: 0; color: inherit; background: white; text-align: left; }
.property-overview-summary:hover { background: #fbfaf7; }
.property-overview-summary h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.property-overview-summary strong, .property-overview-summary small { display: block; }
.property-overview-summary small { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.property-overview-summary .row-arrow { color: #b84a2c; font-size: 21px; text-align: right; }
.work-queue { border-top: 1px solid var(--line); background: #f7f5f0; }
.work-queue-group { display: grid; grid-template-columns: 138px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.work-queue-group:last-child { border-bottom: 0; }
.work-queue-heading { margin: 0; padding: 17px 16px 17px 26px; color: var(--muted); font-size: 10px; line-height: 1.4; text-transform: uppercase; }
.work-queue-list { min-width: 0; border-left: 1px solid var(--line); }
.work-queue-item { width: 100%; min-height: 64px; padding: 13px 22px; display: grid; grid-template-columns: minmax(0, 1fr) 20px; align-items: center; gap: 18px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.work-queue-item:last-child { border-bottom: 0; }
.work-queue-item:hover { background: white; }
.work-queue-copy { min-width: 0; display: grid; gap: 4px; }
.work-queue-copy strong { font-size: 13px; line-height: 1.4; }
.work-queue-copy small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.property-row .work-queue-heading { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.property-row .work-queue-copy strong { font-size: 13px; line-height: 1.4; }
.property-row .work-queue-copy small { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.4; text-transform: none; }
.work-queue-arrow { color: #6f392d; font-size: 17px; text-align: right; }
.work-group-action { box-shadow: inset 3px 0 0 var(--accent); }
.work-group-waiting .work-queue-heading { color: #6d5a26; }
.work-group-coming .work-queue-heading { color: #506071; }
.compact-button { min-height: 36px; padding: 8px 13px; font-size: 11px; white-space: nowrap; }
.rent-tenancy-heading { min-height: 122px; padding: 22px; }
.rent-tenancy-heading h2 { font-size: 34px; }
.tenant-summary { max-width: 58%; gap: 3px; }
.tenant-label { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.tenant-summary strong { font-size: 14px; }
.tenant-contacts { display: grid; gap: 2px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.rental-meta-grid { padding: 0 22px 18px; }
.recent-payments { overflow: hidden; padding: 0; }
.latest-payment-empty { margin: 0; padding: 22px; }
.rent-period-table { width: 100%; border-collapse: collapse; color: var(--ink); }
.rent-period-table th, .rent-period-table td { padding: 15px 16px; border-top: 1px solid var(--line); text-align: left; font-size: 11px; }
.rent-period-table th { border-top: 0; color: var(--muted); background: #fafaf8; font-size: 9px; text-transform: uppercase; }
.schedule-item { min-height: 84px; padding: 16px; }
.schedule-actions { display: flex; justify-content: flex-end; gap: 8px; }
.reminder-fields { padding: 24px 28px; display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 16px; }
.reminder-fields label { margin: 0; }
.reminder-fields select, .reminder-fields input { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #aeb1ad; border-radius: 3px; background: white; }
.reminder-fields .field-error { grid-column: 1 / -1; }
.toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; max-width: min(390px, calc(100% - 32px)); padding: 13px 16px; color: white; background: var(--green); box-shadow: 0 12px 34px rgb(17 24 39 / 22%); font-size: 13px; font-weight: 700; }
.tenancy-context { width: min(100%, 560px); margin: -4px 0 6px; padding: 12px 0; }
.tenancy-context select { width: 100%; min-height: 42px; padding: 8px 34px 8px 11px; border: 1px solid #aeb1ad; border-radius: 3px; color: var(--ink); background: white; font: inherit; font-size: 12px; font-weight: 700; }
.rent-tracking-panel { grid-column: 1 / -1; overflow: hidden; }
.rent-tracking-heading { min-height: 68px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.rent-tracking-heading h2 { margin: 4px 0 0; font-size: 16px; }
.rent-tracking-status { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #cbd8d3; border-radius: 3px; color: #235347; background: #edf4f1; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.rent-tracking-status.manual { border-color: #d5d8dc; color: #4b5563; background: #f2f3f2; }
.rent-tracking-status.fallback { border-color: #ead49d; color: #75520b; background: #fff7df; }
.rent-tracking-body { min-height: 74px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.rent-tracking-copy, .rent-confirmation-action > div { min-width: 0; display: grid; gap: 4px; }
.rent-tracking-copy strong, .rent-confirmation-action strong { font-size: 13px; }
.rent-tracking-copy span, .rent-confirmation-action span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.rent-confirmation-action { min-height: 78px; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); background: #fbfaf7; }
.rent-confirmation-action .primary-button { flex: 0 0 auto; min-width: 170px; }
.rent-receipt-notice { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; font-size: 12px; color: var(--muted); }
.rent-receipt-notice .text-button { white-space: nowrap; }
.undo-rent-copy { padding: 24px; }
.undo-rent-copy h2 { margin: 0 0 16px; font-size: 22px; }
.undo-rent-copy p { line-height: 1.5; }
#undoRentDialog { width: min(480px, calc(100vw - 32px)); padding: 0; }
.rent-tracking-error { margin: 0 !important; padding: 0 20px 16px; }
.rent-tracking-dialog-body { padding: 22px 28px; }
.tracking-mode-options, .bank-connection-options { margin: 0; padding: 0; border: 0; }
.tracking-mode-options legend, .bank-connection-options legend { margin-bottom: 10px; font-size: 12px; font-weight: 800; }
.tracking-mode-options { display: grid; gap: 10px; }
.tracking-mode-options > label, .bank-connection-options label { min-height: 70px; margin: 0; padding: 13px 14px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; border: 1px solid var(--line); border-radius: 3px; }
.tracking-mode-options > label:has(input:checked), .bank-connection-options label:has(input:checked) { border-color: var(--green); box-shadow: inset 3px 0 var(--green); }
.tracking-mode-options input, .bank-connection-options input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--green); }
.tracking-mode-options span, .bank-connection-options span { min-width: 0; display: grid; gap: 3px; }
.tracking-mode-options small, .bank-connection-options small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.45; }
.cdr-education { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.cdr-education h3 { margin-bottom: 9px; font-size: 14px; }
.cdr-education ul { margin: 0 0 18px; padding-left: 20px; color: #414b5a; font-size: 11px; line-height: 1.55; }
.bank-connection-options label + label { margin-top: 8px; }
.connection-unavailable { margin: 12px 0 0; color: #75520b; font-size: 11px; line-height: 1.5; }

@media (max-width: 760px) {
  .rentals-view { width: min(100% - 34px, 680px); padding: 56px 0 60px; }
  .section-heading { min-height: 82px; padding: 18px; align-items: center; flex-direction: row; }
  .section-heading .add-property-button { width: auto; min-width: 0; }
  .property-overview-summary { min-height: 0; padding: 20px 18px; grid-template-columns: minmax(0, 1fr) 24px; gap: 18px; }
  .property-overview-summary .row-address, .property-overview-summary .row-paid { grid-column: 1; }
  .property-overview-summary .row-arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .work-queue-group { grid-template-columns: 1fr; }
  .work-queue-heading { padding: 14px 18px 8px; }
  .work-queue-list { border-left: 0; }
  .work-queue-item { padding: 12px 18px 15px; }
  .rent-tenancy-heading { align-items: start; flex-direction: column; }
  .tenant-summary { max-width: 100%; justify-items: start; text-align: left; }
  .schedule-actions { width: 100%; display: grid; justify-content: stretch; }
  .schedule-actions button { width: 100%; }
  .payment-table, .rent-period-table,
  .payment-table tbody, .rent-period-table tbody { display: block; width: 100%; }
  .payment-table thead, .rent-period-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .payment-table tr, .rent-period-table tr {
    display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "period amount" "received received";
    align-items: baseline; gap: 5px 12px; padding: 16px 18px; border-top: 1px solid var(--line);
  }
  .payment-table td, .rent-period-table td { display: block; min-width: 0; width: auto; padding: 0; border: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
  .payment-table td[data-label="Rent period"], .rent-period-table td[data-label="Rent period"] { grid-area: period; font-weight: 600; }
  .payment-table td[data-label="Amount"], .rent-period-table td[data-label="Amount"] { grid-area: amount; text-align: right; font-size: 14px; font-weight: 700; }
  .payment-table td[data-label="Received"], .rent-period-table td[data-label="Received"] { grid-area: received; color: var(--muted); font-size: 12px; }
  .payment-table td[data-label="Received"]::before, .rent-period-table td[data-label="Received"]::before { content: "Received "; }
  .payment-table td[data-label="Receipt"] { grid-column: 1 / -1; grid-row: 3; color: var(--muted); font-size: 11px; }
  .payment-table td[data-label="Receipt"]::before { content: "Receipt "; }
  .reminder-fields { grid-template-columns: 1fr; padding: 20px; gap: 8px; }
  .reminder-fields label:not(:first-child) { margin-top: 8px; }
  .tenancy-context { width: 100%; margin-bottom: 4px; }
  .rent-tracking-panel { grid-column: 1; }
  .rent-tracking-body, .rent-confirmation-action { align-items: stretch; flex-direction: column; gap: 12px; }
  .rent-tracking-body .secondary-button, .rent-confirmation-action .primary-button { width: 100%; }
  .rent-tracking-dialog-body { padding: 18px 20px; }
}

.water-review-view { width: min(1040px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 80px; }
.water-review-heading { margin: 12px 0 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.water-review-heading h1 { margin: 7px 0 5px; font-size: 38px; line-height: 1.08; }
.water-review-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.review-status { flex: 0 0 auto; padding: 7px 10px; border-radius: 999px; color: #8d2e26; background: #fde8e5; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.review-status.approved { color: #235347; background: #e7f1ed; }
.water-review-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .75fr); align-items: start; gap: 16px; }
.water-bill-summary, .water-charge-summary, .water-approval { border: 1px solid var(--line); border-radius: 5px; background: white; }
.water-bill-summary { overflow: hidden; }
.water-evidence-preview { margin-top: 20px; border-top: 1px solid var(--line); background: #f7f8f6; }
.water-evidence-preview > header { padding: 16px 20px 12px; }
.water-evidence-preview h3 { margin: 0 0 4px; font-size: 16px; }
.water-evidence-preview p { margin: 0; color: var(--muted); font-size: 14px; }
.water-evidence-preview img { display: block; width: 100%; height: auto; border-top: 1px solid var(--line); background: white; }
.water-evidence-status { padding: 0 20px 16px; }
.water-bill-summary > header { min-height: 72px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.water-bill-summary h2, .water-charge-summary h2 { margin: 0; font-size: 18px; }
.water-facts { margin: 0; padding: 18px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.water-facts dt, .water-charge-summary dt { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.water-facts dd, .water-charge-summary dd { margin: 4px 0 0; font-size: 12px; font-weight: 750; }
.water-usage-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.water-usage-table { width: 100%; border-collapse: collapse; }
.water-usage-table th, .water-usage-table td { padding: 13px 14px; border-bottom: 1px solid #e8e9e6; text-align: left; font-size: 11px; white-space: nowrap; }
.water-usage-table th { color: var(--muted); background: #fafaf8; font-size: 9px; text-transform: uppercase; }
.water-usage-table tbody tr:last-child td { border-bottom: 0; }
.water-charge-summary { padding: 20px; }
.water-charge-summary > dl { margin: 18px 0 0; }
.water-charge-summary > dl > div { padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #e8e9e6; }
.water-charge-summary dd { text-align: right; }
.water-charge-summary .water-total { border-top-color: var(--ink); }
.water-charge-summary .water-total dt, .water-charge-summary .water-total dd { color: var(--ink); font-size: 14px; font-weight: 850; }
.water-request-due { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.water-approval { margin-top: 16px; padding: 22px; }
.water-eligibility-summary, .water-delivery-status { display: grid; gap: 4px; }
.water-eligibility-summary strong, .water-delivery-status strong { font-size: 16px; }
.water-eligibility-summary span, .water-delivery-status span { color: var(--muted); line-height: 1.5; }
.water-eligibility-summary.blocked strong, .water-delivery-status.failed strong { color: #8d2e26; }
.water-approval .primary-button { margin-top: 10px; }
.water-request-records { margin-top: 24px; }

@media (max-width: 760px) {
  .water-review-view { width: min(100% - 36px, 680px); padding: 28px 0 60px; }
  .water-review-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .water-review-heading h1 { font-size: 30px; }
  .water-review-layout { grid-template-columns: 1fr; }
  .water-facts { grid-template-columns: 1fr; }
  .water-approval { padding: 18px; }
  .water-approval .primary-button { width: 100%; }
}

/* Settings security and records share the existing quiet section layout. */
.connection-row {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--border,#e5e7e5)}
.connection-row small {display:block;color:var(--muted,#66736c);margin-top:4px}
.record-actions {display:flex;gap:12px 24px;flex-wrap:wrap;margin-top:12px}
.security-dialog {max-width:440px;width:calc(100% - 32px);padding:24px;max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box}
.security-dialog form {display:grid;gap:14px}
.security-dialog h2,.security-dialog p {margin:0}
.auth-qr {width:190px;height:190px;justify-self:center}
.auth-key {display:block;overflow-wrap:anywhere;margin:8px 0}
[data-bank-select] {display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:16px}
[data-security-status] {overflow-wrap:anywhere}
@media(max-width:600px){.connection-row{align-items:flex-start}.record-actions{flex-direction:column;align-items:flex-start}}
[data-mfa-error]:empty {display:none}

.rent-received-date { display:grid; gap:5px; margin-left:auto; min-width:155px; }
.rent-received-date input { min-width:0; width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:6px; background:white; font:inherit; }
.rent-confirmation-action .rent-received-date span { font-size:12px; }
@media(max-width:760px){.rent-received-date {margin-left:0;width:100%;}}
