/* Live payment alerts, report-card settings and the installable app. Kept apart from app.css. */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 10px; max-width: min(360px, calc(100vw - 32px)); }
.toast {
  display: grid; gap: 2px; padding: 12px 16px; border-radius: 12px; text-decoration: none;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  box-shadow: var(--shadow-lg); animation: toast-in .25s ease-out;
}
.toast:hover { text-decoration: none; border-color: var(--brand); }
.toast strong { color: var(--brand); }
.toast span { font-size: 13px; color: var(--text-2); }
.toast-out { opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.live-updated { animation: live-flash 1.6s ease-out; border-radius: var(--radius); }
@keyframes live-flash { 0% { box-shadow: 0 0 0 3px var(--brand-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }

.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  .toast, .live-updated, .live-dot::before { animation: none; }
}

/* Installable app */
.nav-install { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--brand); font: 500 14px/1.4 var(--font); cursor: pointer; text-align: left; }
.nav-install:hover { background: var(--brand-soft); }
.nav-install svg { width: 18px; height: 18px; }
.nav-install[hidden], .install-card[hidden], .install-hint[hidden] { display: none; }
.install-hint { margin: 4px 10px 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.install-hint svg { width: 14px; height: 14px; vertical-align: -2px; }
.install-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--brand-soft); border: 1px solid var(--border); cursor: pointer; font-size: 14px; }
.install-card span:first-of-type { flex: 1; }

/* --- Rent-day ring (dashboard) ----------------------------------------------------------- */
.rentday { display: flex; align-items: center; gap: 22px; padding: 18px 22px; }
.rentday-ring { position: relative; width: 112px; height: 112px; flex: none; }
.rentday-ring svg { width: 100%; height: 100%; }
.ring-track, .ring-fill { fill: none; stroke-width: 11; }
.ring-track { stroke: var(--brand-soft); }
.ring-fill { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.ring-fill[stroke-dashoffset="100"] { stroke-linecap: butt; }  /* no dot at 0% */
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center strong { font-size: 24px; line-height: 1; }
.ring-center span { font-size: 12px; color: var(--muted); margin-top: 3px; }
.rentday-text .label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rentday-headline { font-size: 22px; font-weight: 700; margin: 2px 0 4px; }
.rentday-text p { margin: 0; }
@media (max-width: 520px) {
  .rentday { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .ring-fill { transition: none; } }

/* --- Settings page ------------------------------------------------------------------------- */
.settings-list { display: grid; gap: 12px; max-width: 760px; }
.settings-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); }
a.settings-item:hover { text-decoration: none; border-color: var(--brand); }
.settings-item > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.settings-icon { display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.settings-icon svg { width: 20px; height: 20px; }
.settings-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-item .theme-switch { flex: none; }
@media (max-width: 520px) {
  .settings-item { flex-wrap: wrap; }
  .settings-item .theme-switch, .settings-item form { width: 100%; }
  .settings-item .theme-switch button, .settings-item form .btn { flex: 1; width: 100%; justify-content: center; }
}

.settings-group { padding: 0; }
.settings-group > .settings-item { border-bottom: 1px solid var(--border); }
.settings-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px 14px 72px; }
.settings-row + .settings-row { border-top: 1px solid var(--border); }
.settings-row .settings-text strong { font-weight: 600; font-size: 14px; }

/* On/off switch */
.switch { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 0; border: 0; background: none;
  color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.switch-knob { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--border);
  transition: background .2s ease; }
.switch-knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s ease; }
.switch[aria-checked="true"] .switch-knob { background: var(--brand); }
.switch[aria-checked="true"] .switch-knob::after { transform: translateX(18px); }
.switch:focus-visible .switch-knob { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-label { min-width: 22px; }
@media (max-width: 520px) {
  .settings-row { padding-left: 18px; }
}
@media (prefers-reduced-motion: reduce) { .switch-knob, .switch-knob::after { transition: none; } }

a.settings-link { color: var(--text); }
a.settings-link:hover { text-decoration: none; background: var(--surface-2); }
.settings-link > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.settings-group .settings-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.settings-avatar { width: 40px; height: 40px; font-size: 15px; flex: none; }

/* --- Staff area (caretakers, mostly on phones) ---------------------------------------------- */
.staff-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 64px;
  padding: 0 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.staff-bar .brand { padding: 0; }
.staff-bar .logo { height: 44px; }
.staff-who { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.staff-tabs { display: flex; gap: 4px; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--border);
  overflow-x: auto; }
.staff-tabs a, .staff-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border: 0;
  border-radius: 10px; background: none; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 500;
  white-space: nowrap; cursor: pointer; }
.staff-tabs a:hover, .staff-tabs button:hover { background: var(--surface-2); text-decoration: none; }
.staff-tabs a.active { background: var(--brand-soft); color: var(--brand); }
.staff-tabs svg { width: 17px; height: 17px; }
.staff-tabs form { margin-left: auto; }
.staff-main { max-width: 680px; margin: 0 auto; padding: 18px 16px 48px; }
.staff-main > .messages, .staff-main > .alert { margin-bottom: 14px; }
.staff-head { margin-bottom: 14px; }
.staff-head h1 { font-size: 24px; margin: 4px 0 2px; }
.staff-search { display: flex; gap: 8px; margin-bottom: 10px; }
.staff-search input { flex: 1; min-width: 0; }
.staff-filter { margin-bottom: 14px; }
.staff-list { display: grid; gap: 12px; }
.staff-card { display: grid; gap: 10px; padding: 16px; }
a.staff-card-link { color: var(--text); }
a.staff-card-link:hover { text-decoration: none; border-color: var(--brand); }
.staff-card-head { display: flex; align-items: center; gap: 12px; }
.staff-card-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.staff-owes { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); }
.staff-owes strong { font-size: 17px; color: var(--danger); text-transform: none; letter-spacing: 0; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-actions > .btn, .staff-actions > form { flex: 1 1 auto; }
.staff-actions .btn { justify-content: center; }
.staff-prompt { display: flex; gap: 8px; flex: 1 1 100%; }
.staff-prompt input { width: 120px; flex: none; }
.staff-prompt .btn { flex: 1; }

.prompt-card { padding: 28px 20px; text-align: center; }
.prompt-card h2 { font-size: 20px; margin: 14px 0 6px; }
.prompt-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  font-size: 30px; font-weight: 700; background: var(--surface-2); }
.prompt-icon > span { display: none; }
.prompt-waiting .prompt-spinner { display: block; width: 34px; height: 34px; border-radius: 50%;
  border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: prompt-spin .9s linear infinite; }
.prompt-paid .prompt-icon { background: var(--brand); color: #fff; }
.prompt-paid .prompt-tick { display: block; }
.prompt-paid h2 { color: var(--brand); }
.prompt-failed .prompt-icon { background: var(--danger); color: #fff; }
.prompt-failed .prompt-cross { display: block; }
@keyframes prompt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .prompt-spinner { animation-duration: 3s; } }
@media (max-width: 420px) { .staff-name { display: none; } }

/* --- Vacancy listings ------------------------------------------------------------------------- */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-row input { flex: 1 1 260px; min-width: 0; font-size: 14px; }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: #073b1c; }
.btn-whatsapp:hover { background: #1fbe5a; border-color: #1fbe5a; color: #052a14; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.photo-grid figure { position: relative; margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.photo-grid form { position: absolute; top: 4px; right: 4px; }
.photo-grid .btn { background: var(--surface); padding: 4px; min-height: 0; }
.listing-page h1 { font-size: 26px; margin: 0 0 4px; }
.listing-photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 14px;
  -webkit-overflow-scrolling: touch; }
.listing-photos img { flex: 0 0 100%; height: min(62vw, 380px); object-fit: cover; scroll-snap-align: start;
  border-radius: 14px; }
.listing-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; }
.listing-facts > div { display: flex; flex-direction: column; gap: 2px; }
.listing-facts .label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.listing-facts strong { font-size: 18px; }

/* --- Pop-ups (SweetAlert2), in the app's own colours and dark mode ------------------------------ */
.swal2-container { z-index: 2000; }
.swal2-popup.swal-popup { background: var(--surface); color: var(--text); border-radius: 16px; font-family: inherit;
  border: 1px solid var(--border); }
.swal-popup .swal2-title { color: var(--text); font-size: 20px; }
.swal-popup .swal2-html-container { color: var(--text-2); font-size: 15px; }
.swal-popup .swal2-actions { gap: 10px; }
.swal-popup .swal2-actions .btn { margin: 0; }
.swal2-popup.swal-toast { box-shadow: 0 8px 30px rgb(0 0 0 / .18); }
.swal-toast .swal2-title { font-size: 14px; margin: 0 6px; }
.swal-toast .swal2-timer-progress-bar { background: var(--brand); }

/* --- Set rents table ---------------------------------------------------------------------------- */
.rents-table input { width: 100%; min-width: 0; }
.rents-table .input-narrow { max-width: 80px; }
.rents-table .input-rent { max-width: 140px; text-align: right; margin-left: auto; display: block; }
.table tr.row-error td { background: color-mix(in srgb, var(--danger) 8%, transparent); }

/* --- Two-step login ---------------------------------------------------------------------------- */
.code-input { font-size: 20px; letter-spacing: .15em; font-variant-numeric: tabular-nums; }
.qr { width: 200px; max-width: 100%; margin: 10px 0; padding: 8px; background: #fff; border-radius: 12px; }
.qr svg { display: block; width: 100%; height: auto; }
.manual-key { word-break: break-all; }
.setup-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin: 0; padding-left: 22px; }
.recovery-codes code { font-size: 15px; }

/* Home page header on narrow phones: logo, Log in and Get started on one line (the theme switch is in the app). */
@media (max-width: 430px) {
  .site-nav .theme-switch { display: none; }
}

/* --- Logo with its tagline as real text (sharp and readable at any size; follows light/dark) ------------ */
.logo-lockup { display: inline-flex; flex-direction: column; align-items: center; gap: 5px; }
.logo-tagline { font-size: 11.5px; font-weight: 500; letter-spacing: .02em; line-height: 1.2; color: var(--muted);
  white-space: nowrap; }
.logo-lockup-lg .logo-tagline { font-size: 13.5px; }
@media (max-width: 900px) { .sidebar .logo-tagline { display: none; } }  /* phone top bar: logo only */

/* --- Login, sign-up and other card pages ---------------------------------------------------------- */
/* Heading and intro line centred under the centred logo. */
.auth-card > h1, .auth-card > h1 + p { text-align: center; }
@media (max-width: 520px) {
  /* Room on both sides instead of touching the screen edges. */
  .auth-card { margin: 3vh 16px 0; padding: 26px 20px; }
  /* The card shows the big logo, so skip the small one in the top bar (one logo on screen). */
  body:has(.auth-logo) .topbar > .brand { display: none; }
}

/* --- Payment plans ------------------------------------------------------------------------------- */
.plan-card .card-header { gap: 10px; }
.plan-table td { padding-top: 6px; padding-bottom: 6px; }
.plan-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; }

/* --- M-Pesa setup ------------------------------------------------------------------------------------ */
details.daraja > summary { cursor: pointer; list-style: none; }
details.daraja > summary::-webkit-details-marker { display: none; }
details.daraja > summary h2::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--text-2); transition: transform .15s; }
details.daraja[open] > summary h2::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { details.daraja > summary h2::before { transition: none; } }

/* --- Billing ------------------------------------------------------------------------------------------ */
.switch-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.switch-dot.on { background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }

/* --- Help page ----------------------------------------------------------------------------------------- */
.help details { border-bottom: 1px solid var(--border); }
.help details > summary { cursor: pointer; padding: 12px 28px 12px 0; font-weight: 600; list-style: none; position: relative; }
.help details > summary::-webkit-details-marker { display: none; }
.help details > summary::after { content: '+'; position: absolute; right: 4px; top: 10px; font-size: 20px; color: var(--muted); font-weight: 400; }
.help details[open] > summary::after { content: '−'; }
.help details > p { margin: 0 0 14px; }
.help h2 { margin-top: 28px; }
.help-contact { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 10px; }

/* --- Cash with staff ---------------------------------------------------------------------------------- */
.text-warn { color: var(--warn); }
.cash-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cash-card .amount { font-size: 22px; font-weight: 700; }
.staff-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.staff-quick .btn { flex: 1; min-width: 140px; justify-content: center; }
.staff-note { background: var(--surface-2); border-radius: 8px; padding: 6px 10px; }

/* --- What's unpaid ------------------------------------------------------------------------------------- */
.unpaid-table td { padding-top: 6px; padding-bottom: 6px; }
.unpaid-table tr.overdue td:first-child { border-left: 3px solid var(--danger); padding-left: 8px; }
.unpaid-table tr.unpaid-total td { border-top: 2px solid var(--border); }

/* --- Expenses on the trend chart --------------------------------------------------------------------- */
.sw-spent, .bar.spent { background: var(--warn); }
.trend .bar { width: 26%; }
.owe-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; }

/* --- Dashboard highlights: celebrations, scorecard, suggestions, year in review ------------------------------- */
.celebrate { font-weight: 600; font-size: 1.02rem; }
.score-big { font-size: 2.4rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.streak { margin-top: 10px; font-weight: 600; }
.score-bars { display: flex; align-items: flex-end; gap: 8px; height: 90px; margin-top: 16px; }
.score-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.score-bar span { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--brand) 35%, transparent); }
.score-bar.now span { background: var(--brand); }
.score-bar small { color: var(--muted); font-size: 0.72rem; }
.nudges { list-style: none; margin: 0; padding: 0; }
.nudges li { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); }
.nudges li:first-child { border-top: 0; }
.nudge-actions { display: flex; gap: 6px; align-items: center; }
.year-card { max-width: 560px; margin: 0 auto; border-radius: 18px; padding: 28px 24px; color: #fff;
  background: linear-gradient(140deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #0b1f33)); }
.year-card h1 { color: #fff; font-size: 1.6rem; margin: 0 0 4px; }
.year-card .big { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.year-card .muted-light { color: rgba(255, 255, 255, 0.78); }
.year-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.year-stats div { background: rgba(255, 255, 255, 0.12); border-radius: 12px; padding: 12px; }
.year-stats strong { display: block; font-size: 1.15rem; }
.year-stats span { color: rgba(255, 255, 255, 0.8); font-size: 0.85rem; }
.year-brand { margin-top: 20px; font-size: 0.8rem; color: rgba(255, 255, 255, 0.7); }

/* --- Tenant payment record and rewards -------------------------------------------------------------------------- */
.record-big { font-size: 1.25rem; font-weight: 700; }
.reward-box { border: 1px dashed color-mix(in srgb, var(--brand) 50%, transparent); border-radius: 10px; padding: 12px 14px;
  display: grid; gap: 8px; background: var(--brand-soft); }

/* --- Building noticeboard and repair ratings ------------------------------------------------------------------- */
.good-to-know { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.good-to-know p { margin: 4px 0 0; }
.board-post { border-left: 3px solid var(--brand); padding: 2px 0 2px 10px; }
.board-post p { margin: 0 0 2px; }
.inline-form { display: inline; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.rate { display: flex; gap: 4px; align-items: center; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }
.rate-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 2px 9px; cursor: pointer; font-size: 1rem; line-height: 1.4; }
.rate-btn.on { border-color: var(--brand); background: var(--brand-soft); }

/* --- Tenant history timeline ------------------------------------------------------------------------------------ */
.history-list { list-style: none; margin: 0; padding: 4px 0; }
.history-day { padding: 14px 16px 4px; font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.history-item { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: start; padding: 8px 16px; }
.history-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--border); }
.history-item.payment .history-dot { background: var(--brand); }
.history-item.repair .history-dot { background: var(--warn); }
.history-item.note .history-dot, .history-item.message .history-dot { background: #6172f3; }
.history-item.tenancy .history-dot { background: var(--text); }
.history-item.bad .history-dot { background: var(--danger, #d92d20); }

/* --- Bulk actions on lists ------------------------------------------------------------------------------------- */
.bulk-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.bulk-bar label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.bulk-bar input[type="checkbox"], .check-col input[type="checkbox"] { width: 18px; height: 18px; padding: 0; margin: 0; flex: none; accent-color: var(--brand); }
.check-col { width: 34px; }

/* Phones: the bar is one compact line, and each row's tick box sits in the top-right corner of its card, so the
   repair (or tenant) stays the card's title. */
@media (max-width: 640px) {
  .bulk-bar { padding: 10px 14px; gap: 8px 12px; }
  .bulk-bar .bulk-hint { display: none; }
  .bulk-bar .btn { margin-left: auto; }
  table.table.stack tr:has(> td.check-col) { position: relative; }
  table.table.stack td.check-col { position: absolute; top: 12px; right: 16px; width: auto; padding: 0; display: block; }
  table.table.stack td.check-col::before { content: none; }
  table.table.stack td.check-col + td { display: block; text-align: left; padding: 0 34px 6px 0; }
  table.table.stack td.check-col + td::before { content: none; }
  table.table.stack td.check-col.blank + td { padding-right: 0; }
}

/* --- Landlord branding on receipts and statements -------------------------------------------------------------- */
.doc-logo { max-height: 56px; max-width: 220px; object-fit: contain; }
.doc.branded .doc-head { border-bottom-color: var(--doc-accent); }
.doc.branded .doc-title h1, .doc.branded .doc-title { color: var(--doc-accent); }
.doc.branded .doc-total { box-shadow: inset 4px 0 0 var(--doc-accent); }

/* --- KRA tax page ---------------------------------------------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } }

/* --- Inspections ---------------------------------------------------------------------------------------------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-grid figure, .compare-side figure { margin: 0; }
.photo-grid img, .compare-side img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.photo-grid figcaption, .compare-side figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 3px; }
.compare-head, .compare-row { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 12px; align-items: start; }
.compare-head { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.compare-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.compare-row h3 { font-size: 0.95rem; margin: 0; }
.compare-side { display: grid; gap: 8px; }
@media (max-width: 640px) {
  .compare-head { grid-template-columns: 1fr 1fr; } .compare-head span { display: none; }
  .compare-row { grid-template-columns: 1fr 1fr; } .compare-row h3 { grid-column: 1 / -1; }
}

/* --- Tenancy agreement and documents --------------------------------------------------------------------------- */
.agreement h2 { font-size: 1rem; margin: 18px 0 6px; }
.agreement p, .agreement li { line-height: 1.55; }
.agreement ol { padding-left: 22px; }
.agreement .parties { list-style: none; padding-left: 0; }
.signatures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.sign-line { border-bottom: 1px solid #101828; height: 40px; margin-bottom: 6px; }
@media print { .agreement h2 { break-after: avoid; } .signatures { break-inside: avoid; } }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.doc-list a { display: inline-flex; gap: 6px; align-items: center; }

/* --- Tenants' "I've paid" -------------------------------------------------------------------------------------- */
.claim-body { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.claim-photo img { width: 140px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); display: block; }
.claim-info { flex: 1; min-width: 220px; }
.claim-amount { font-size: 1.5rem; font-weight: 700; }
.claim-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.claim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.paid-box summary { list-style: none; cursor: pointer; justify-content: center; }
.paid-box summary::-webkit-details-marker { display: none; }
.paid-box[open] summary { background: var(--surface-2); }

/* Home page header when logged in: "Log out" next to "Open dashboard"; just the icon on phones. */
.site-nav form { margin: 0; }
@media (max-width: 640px) { .site-nav .nav-logout-label { display: none; } }
