/* RTC Rentals — Ryno-Tec brand: navy + electric blue on cool slate */
:root {
  --navy: #0f172a;
  --navy-2: #1e293b;
  --blue: #1d4ed8;
  --blue-2: #1e40af;
  --blue-soft: #eff4ff;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1f2937;
  --muted: #64748b;
  --green: #15803d;  --green-soft: #ecfdf3;
  --amber: #b45309;  --amber-soft: #fff7e6;
  --red: #b91c1c;    --red-soft: #fef2f2;
  --violet: #6d28d9; --violet-soft: #f3efff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--navy); margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Brand mark ---------- */
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark svg { width: 18px; height: 18px; }
.brand small { display: block; font-weight: 450; font-size: 11px; color: #94a3b8; letter-spacing: .02em; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #cbd5e1; padding: 18px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #cbd5e1; font-size: 13.5px; }
.nav a:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.nav a[aria-current="page"] { background: var(--navy-2); color: #fff; box-shadow: inset 2px 0 0 var(--blue); }
.nav svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav .soon { color: #64748b; cursor: default; }
.nav .soon em { margin-left: auto; font-style: normal; font-size: 10.5px; border: 1px solid #334155; border-radius: 99px; padding: 0 7px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 10px 10px 4px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #1e293b; padding-top: 12px; font-size: 12.5px; }
.sidebar-foot .who { color: #fff; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot button { margin-top: 8px; }

.main { min-width: 0; }
.topbar { display: none; }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 28px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

.demo-banner { background: var(--amber-soft); color: var(--amber); border-bottom: 1px solid #fde4b8; padding: 8px 28px; font-size: 13px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demo-banner button { margin-left: auto; }

/* ---------- Buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 550; font-size: 13.5px; border-radius: 8px; padding: 8px 14px; border: 1px solid transparent; cursor: pointer; background: var(--blue); color: #fff; white-space: nowrap; min-height: 36px; }
.btn:hover { background: var(--blue-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--surface); color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; min-height: 30px; }
.btn-icon { padding: 6px; min-height: 30px; width: 30px; }
.btn-link { background: none; border: 0; color: var(--blue); padding: 0; min-height: 0; font-weight: 550; }
.btn-link:hover { background: none; text-decoration: underline; }
.sidebar .btn-ghost { background: transparent; color: #cbd5e1; border-color: #334155; width: 100%; }
.sidebar .btn-ghost:hover { background: var(--navy-2); color: #fff; }

label { display: block; font-size: 12.5px; font-weight: 550; color: #334155; margin-bottom: 5px; }
input, select, textarea { width: 100%; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; min-height: 38px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 78, 216, .15); }
textarea { resize: vertical; min-height: 72px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 450; font-size: 13.5px; margin: 0; }
.check input { width: 16px; height: 16px; min-height: 0; margin: 0; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13.5px; pointer-events: none; }
.input-prefix input { padding-left: 24px; }

/* ---------- Cards, KPIs ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 650; color: var(--navy); margin-top: 4px; letter-spacing: -.02em; }
.kpi .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.meter { height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; display: flex; }
.meter > span { display: block; height: 100%; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 9px 20px; background: #fbfcfe; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 20px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
td.actions { text-align: right; white-space: nowrap; width: 1%; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.s-occupied { background: var(--green-soft); color: var(--green); }
.s-vacant { background: var(--red-soft); color: var(--red); }
.s-notice { background: var(--amber-soft); color: var(--amber); }
.s-maintenance { background: var(--violet-soft); color: var(--violet); }
.tag { background: #f1f5f9; color: #475569; }

/* ---------- Properties ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input { max-width: 280px; }
.toolbar select { width: auto; }
.plan-usage { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.plan-usage .meter { width: 110px; }
.prop { margin-bottom: 16px; }
.prop-head { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.prop-head .meta { flex: 1; min-width: 0; }
.prop-head .addr { color: var(--muted); font-size: 13px; margin-top: 2px; }
.prop-head .stats { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.prop-head .stats b { color: var(--text); font-weight: 600; }
.prop-actions { display: flex; gap: 6px; flex-shrink: 0; }
.unit-label { font-weight: 600; color: var(--navy); }
.unit-sub { font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h2 { margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }
.units-empty { padding: 18px 20px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.form-error { background: var(--red-soft); color: var(--red); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(15, 23, 42, .25); max-width: 340px; }
.toast.error { background: var(--red); }

/* ---------- Auth page ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--navy); color: #cbd5e1; padding: 40px 48px; display: flex; flex-direction: column; }
.auth-side h1 { color: #fff; font-size: 30px; margin-top: auto; max-width: 420px; letter-spacing: -.02em; }
.auth-side p { max-width: 420px; font-size: 15px; }
.auth-side ul { padding: 0; list-style: none; margin: 20px 0 auto; display: grid; gap: 10px; max-width: 420px; }
.auth-side li { display: flex; gap: 10px; align-items: flex-start; }
.auth-side li svg { width: 18px; height: 18px; color: #60a5fa; flex-shrink: 0; margin-top: 2px; }
.auth-side .foot { font-size: 12px; color: #64748b; margin-top: 32px; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 20px; margin-bottom: 4px; }
.auth-box .tabs { display: flex; gap: 4px; background: #eef2f7; padding: 4px; border-radius: 9px; margin: 20px 0; }
.auth-box .tabs button { flex: 1; border: 0; background: none; font: inherit; font-weight: 550; padding: 7px; border-radius: 6px; color: var(--muted); cursor: pointer; }
.auth-box .tabs button[aria-selected="true"] { background: var(--surface); color: var(--navy); box-shadow: var(--shadow); }
.auth-box .btn { width: 100%; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.notice { background: var(--blue-soft); color: var(--blue-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .4); }
  .topbar { display: flex; align-items: center; gap: 12px; background: var(--navy); padding: 10px 16px; position: sticky; top: 0; z-index: 30; }
  .topbar button { background: none; border: 0; color: #fff; padding: 4px; cursor: pointer; display: grid; }
  .topbar svg { width: 22px; height: 22px; }
  .page { padding: 20px 16px 48px; }
  .demo-banner { padding: 8px 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { gap: 0 10px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 20px; }
  .auth-side h1 { font-size: 24px; margin-top: 28px; }
  .auth-side ul, .auth-side .foot { display: none; }
  .prop-head { flex-direction: column; }
  .plan-usage { margin-left: 0; width: 100%; }
  .toolbar input { max-width: none; flex: 1; }
  th, td { padding-left: 14px; padding-right: 14px; }
  .hide-sm { display: none; }
  .toasts { left: 16px; right: 16px; }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 21px; }
}

/* Amounts never break across lines */
td.num, .num { white-space: nowrap; }

/* Units list on phones: two-line rows instead of a squeezed table */
@media (max-width: 760px) {
  .prop table, .prop tbody { display: block; }
  .prop thead { display: none; }
  .prop tr { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid #f1f5f9; }
  .prop tr:last-child { border-bottom: 0; }
  .prop td { display: block; padding: 0; border: 0; }
  .prop td.hide-sm { display: none; }
  .prop td.right { text-align: right; font-weight: 600; color: var(--navy); }
  .prop td.actions { width: auto; }
}

/* ======================================================================
   Tenant portal — phone first: tenants mostly open it from WhatsApp links
   ====================================================================== */
.demo-switch { font-weight: 600; color: var(--amber); white-space: nowrap; }
.demo-banner .demo-switch { margin-left: auto; }

.tenant-body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.t-header { background: var(--navy); color: #cbd5e1; position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px); }
.t-header-inner { max-width: 820px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px)); }
.t-who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #fff; min-width: 0; }
.t-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-who .btn-ghost { background: transparent; color: #cbd5e1; border-color: #334155; }
.t-who .btn-ghost:hover { background: var(--navy-2); color: #fff; }

.t-tabs { max-width: 820px; margin: 0 auto; display: flex; gap: 4px; padding: 0 max(12px, env(safe-area-inset-left, 0px)); }
.t-tabs a { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px 14px 12px; color: #94a3b8; font-weight: 550; font-size: 13.5px; border-bottom: 2px solid transparent; }
.t-tabs a:hover { color: #fff; text-decoration: none; }
.t-tabs a[aria-current="page"] { color: #fff; border-bottom-color: #60a5fa; }
.t-tabs svg { width: 18px; height: 18px; }
.t-dot { position: absolute; top: 9px; left: 26px; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 2px var(--navy); }

.t-page { max-width: 820px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.t-hello { margin-bottom: 16px; }
.t-hello p { margin: 2px 0 0; }
.t-hello-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.t-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.t-grid > .rent-card, .t-grid > .t-wide { grid-column: 1 / -1; }
.t-grid > * { min-width: 0; }

/* Rent card: the one thing a tenant opens the app for */
.rent-card { padding: 20px; display: grid; gap: 4px; border-width: 1px 1px 1px 4px; }
.rent-ok { border-left-color: var(--green); }
.rent-soon { border-left-color: #f59e0b; }
.rent-late { border-left-color: var(--red); }
.rent-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rent-amount { font-size: 38px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1.15; margin-top: 6px; }
.btn-pay { margin-top: 14px; min-height: 46px; font-size: 15px; justify-self: start; padding: 10px 22px; }
.rent-card .btn-ghost { margin-top: 12px; justify-self: start; }
.rent-eft { font-size: 13px; color: var(--muted); margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.pill svg { width: 13px; height: 13px; }
.pill-ok { background: var(--green-soft); color: var(--green); }
.pill-soon { background: var(--amber-soft); color: var(--amber); }
.pill-late { background: var(--red-soft); color: var(--red); }
.pill-info { background: var(--blue-soft); color: var(--blue-2); }
.pill-muted { background: #f1f5f9; color: #475569; }

code.ref { font-family: var(--mono); font-size: 13px; background: #f1f5f9; color: var(--navy); padding: 2px 7px; border-radius: 6px; letter-spacing: .02em; user-select: all; }
.btn-copy { border: 0; background: none; color: var(--muted); padding: 4px; border-radius: 6px; cursor: pointer; display: inline-grid; vertical-align: middle; }
.btn-copy:hover { background: #f1f5f9; color: var(--blue); }
.btn-copy svg { width: 16px; height: 16px; }

.t-addr { margin: 8px 0 12px; line-height: 1.5; }
.kv { margin: 10px 0 0; display: grid; gap: 0; }
.kv > div { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid #f1f5f9; font-size: 13.5px; }
.kv > div:first-child { border-top: 0; }
.kv dt { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.kv dt svg { width: 14px; height: 14px; color: #f59e0b; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.t-contact { display: flex; align-items: center; gap: 4px; margin: 0 0 12px; color: var(--text); }
.card-pad .btn-ghost { display: inline-flex; }

.t-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid #f1f5f9; color: inherit; }
.t-row:first-of-type { border-top: 0; }
.t-row:hover { background: #fbfcfe; text-decoration: none; }
.t-preview { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 2px; }

.t-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.t-stats .label { font-size: 12.5px; color: var(--muted); }
.t-stats .value { font-size: 22px; font-weight: 650; color: var(--navy); }

/* Repairs */
.req { padding: 16px 20px; margin-bottom: 12px; }
.req-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.req-desc { margin: 10px 0 0; }
.timeline { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; font-size: 13.5px; position: relative; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; margin-top: 4px; box-shadow: 0 0 0 3px var(--surface); }
.tl-ll { background: var(--blue); }
.tl-ok { background: var(--green); }
.form-note { background: var(--red-soft); color: var(--red); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin: 14px 0 0; }

/* Messages */
.chat-card { display: flex; flex-direction: column; height: min(62vh, 560px); }
.chat { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; background: #f8fafc; border-radius: var(--radius) var(--radius) 0 0; }
.chat-day { align-self: center; font-size: 11.5px; color: var(--muted); background: #eef2f7; padding: 2px 10px; border-radius: 99px; margin: 8px 0 4px; }
.bubble { max-width: 78%; padding: 8px 12px 6px; border-radius: 14px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.bubble time { display: block; font-size: 10.5px; opacity: .7; text-align: right; margin-top: 2px; }
.bubble.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.composer { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 120px; resize: none; }
.composer .btn { min-height: 42px; width: 46px; padding: 0; }

/* Receipt */
.receipt-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--navy); margin: -18px -20px 14px; padding: 14px 20px; }
.receipt-amount { font-size: 30px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }

@media (max-width: 760px) {
  .t-grid { grid-template-columns: 1fr; }
  .t-tabs { position: fixed; bottom: 0; left: 0; right: 0; max-width: none; background: var(--surface); border-top: 1px solid var(--border);
    padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
    justify-content: space-around; gap: 0; z-index: 30; box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); }
  .t-tabs a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11.5px; color: var(--muted); border: 0; border-radius: 10px; }
  .t-tabs a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
  .t-tabs a:hover { color: var(--blue); }
  .t-tabs svg { width: 22px; height: 22px; }
  .t-dot { top: 4px; left: calc(50% + 6px); box-shadow: 0 0 0 2px var(--surface); }
  .t-who span { display: none; }
  .t-page { padding-top: 16px; }
  .rent-amount { font-size: 34px; }
  .btn-pay { justify-self: stretch; }
  .t-hello-row .btn { width: 100%; }
  .t-table td, .t-table th { padding-left: 14px; padding-right: 14px; }
  .chat-card { height: calc(100vh - 250px); min-height: 360px; }
  .t-row { padding: 12px 16px; }
}
@media (max-width: 760px) {
  .tenant-body .demo-banner { padding-top: 6px; padding-bottom: 6px; flex-wrap: nowrap; }
  .tenant-body .demo-banner span { display: none; }
  .chat-card { height: calc(100dvh - 290px); min-height: 320px; }
}

/* Tenants & rent */
.form-section { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; font-weight: 650; }
.form-section:first-child { margin-top: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--bg, #f1f5f9); padding: 1px 6px; border-radius: 6px; }
.prop table th[scope="row"] { font-weight: 550; color: var(--muted); width: 1%; white-space: nowrap; }
.setup { border-top: 1px solid var(--border); }
