:root {
  --brand: #173ded;
  --brand-700: #1129b8;
  --brand-600: #1433d4;
  --brand-100: #dfe5fd;
  --brand-50: #f0f3fe;
  --ink: #0e1630;
  --ink-2: #3c4663;
  --muted: #6b7591;
  --line: #e4e8f1;
  --line-2: #eef1f6;
  --bg: #f5f7fb;
  --card: #ffffff;
  --good: #0f7a55;
  --good-bg: #e6f5ee;
  --warn: #9a5800;
  --warn-bg: #fff3dc;
  --bad: #be1e2d;
  --bad-bg: #fdeced;
  --track: #e7ebf3;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(14, 22, 48, 0.05), 0 4px 16px rgba(14, 22, 48, 0.05);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
small, .small { font-size: 12.5px; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--brand);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand { padding: 4px 10px 22px; }
.sidebar .brand img { height: 30px; display: block; }
.nav {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin: 0 -6px; padding: 0 6px 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 99px; }
.nav a { flex: none; }
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.82);
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.9; }
.nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav a.active { background: #fff; color: var(--brand); }
.nav .badge { margin-left: auto; background: #fff; color: var(--brand); border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.nav a.active .badge { background: var(--brand); color: #fff; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.55); padding: 16px 12px 6px; font-weight: 700; }
.sidebar .brand { flex: none; }
.sidebar .me {
  flex: none;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: none;
}
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; color: rgba(255, 255, 255, 0.7); }
.me button { background: none; border: 0; color: rgba(255, 255, 255, 0.8); cursor: pointer; padding: 6px; border-radius: 8px; }
.me button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.main { min-width: 0; padding: 28px 32px 60px; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- Cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 15.5px; }
.card-body { padding: 16px 20px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 8px; }

/* ---------- Stat tiles ---------- */
.stat { padding: 18px 20px; }
.stat .label { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.meter { height: 6px; border-radius: 99px; background: var(--track); margin-top: 12px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--bg); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fff;
}
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.check input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.check > span { flex: 1; }
.form-error { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfd;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--brand-50); }
.table .r { text-align: right; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2);
}
.pill svg { width: 12px; height: 12px; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.brand { background: var(--brand-50); color: var(--brand); }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list li .grow { flex: 1; min-width: 0; }
.list li .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list a.li-link { color: inherit; text-decoration: none; display: contents; }
.list li.link:hover { background: var(--brand-50); cursor: pointer; }
.icon-dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand); }
.icon-dot svg { width: 17px; height: 17px; }
.icon-dot.good { background: var(--good-bg); color: var(--good); }
.icon-dot.bad { background: var(--bad-bg); color: var(--bad); }
.icon-dot.warn { background: var(--warn-bg); color: var(--warn); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 34px; height: 34px; color: var(--brand-100); margin-bottom: 6px; }

/* ---------- Tabs ---------- */
.tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.tabs button.active { background: var(--brand); color: #fff; }
.tabs button .count { opacity: 0.75; margin-left: 4px; }

/* ---------- Property cards ---------- */
.prop-card { padding: 18px 20px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; display: block; color: inherit; }
.prop-card:hover { border-color: var(--brand); text-decoration: none; }
.prop-card .kind { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.05em; }
.prop-card h3 { margin-top: 6px; font-size: 16.5px; }
.prop-card .addr { color: var(--muted); font-size: 13px; margin-top: 2px; }
.prop-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.prop-stats b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.prop-stats span { font-size: 12px; color: var(--muted); }

/* ---------- Chart ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line-2); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar-track { fill: var(--track); }
.chart .bar { fill: var(--brand); }
.chart .col:hover .bar { fill: var(--brand-700); }
.chart .col:hover .bar-track { fill: #dce2ee; }
.chart .hit { fill: transparent; cursor: default; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 9px 12px;
  font-size: 12.5px; line-height: 1.45; white-space: nowrap; transform: translate(-50%, -100%);
  box-shadow: 0 6px 20px rgba(14, 22, 48, 0.25);
}
.tooltip b { font-size: 13px; }
.tooltip .t-muted { color: #b8c0d6; }

/* ---------- Tickets ---------- */
.stepper { display: flex; align-items: center; gap: 0; margin: 4px 0 2px; }
.stepper .step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stepper .dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: #fff; font-size: 11px; }
.stepper .dot svg { width: 13px; height: 13px; }
.stepper .bar { flex: 1; height: 2px; background: var(--line); margin: 0 10px; min-width: 24px; }
.stepper .step.done { color: var(--ink); }
.stepper .step.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper .step.current { color: var(--brand); }
.stepper .step.current .dot { border-color: var(--brand); color: var(--brand); }
.stepper .bar.done { background: var(--brand); }

.thread { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg .avatar { background: var(--brand-50); color: var(--brand); width: 32px; height: 32px; font-size: 12px; }
.msg .bubble { background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 10px 14px; }
.msg .meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg .meta b { color: var(--ink); }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 14px 4px 14px 14px; }
.msg.mine .meta, .msg.mine .meta b { color: rgba(255, 255, 255, 0.85); }
.msg.mine .avatar { background: var(--brand); color: #fff; }
.event { align-self: center; font-size: 12.5px; color: var(--muted); background: var(--line-2); padding: 5px 12px; border-radius: 99px; text-align: center; }
.event b { color: var(--ink-2); }
.photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.photos a { display: block; }
.photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); background: var(--line-2); }
.composer { border-top: 1px solid var(--line); padding: 14px 20px; display: flex; flex-direction: column; gap: 10px; background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }
.attach-preview { display: flex; gap: 6px; flex-wrap: wrap; }
.attach-preview span { position: relative; }
.attach-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.attach-preview button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 12px; cursor: pointer; line-height: 1; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Tenant home ---------- */
.balance-card { background: var(--brand); color: #fff; border: 0; padding: 24px; position: relative; overflow: hidden; }
.balance-card::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  background: url('/assets/rentrexa-mark-white.png') no-repeat center / contain; opacity: 0.08;
}
.balance-card .label { font-size: 13px; font-weight: 600; opacity: 0.85; }
.balance-card .amount { font-size: 38px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.balance-card .btn { background: #fff; color: var(--brand); border-color: #fff; }
.balance-card .btn:hover { background: var(--brand-50); }
.balance-card .note { font-size: 13px; opacity: 0.85; }

.pay-method { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-method label { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: block; }
.pay-method input { display: none; }
.pay-method label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.pay-method b { display: block; font-size: 14px; }
.pay-method span { font-size: 12px; color: var(--muted); }
.breakdown { background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.breakdown div { display: flex; justify-content: space-between; padding: 3px 0; }
.breakdown .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 15px; }

/* ---------- Checkout (sandbox gateway) ---------- */
.gateway { max-width: 440px; margin: 20px auto; }
.gateway .gw-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.gateway .lock { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--good); font-weight: 700; }
.gateway .gw-amount { font-size: 34px; font-weight: 700; text-align: center; margin: 8px 0; font-variant-numeric: tabular-nums; }
.sandbox-flag { background: var(--warn-bg); color: var(--warn); font-size: 12.5px; padding: 8px 12px; border-radius: 10px; font-weight: 600; }

/* ---------- Proof of Payment ---------- */
.pop { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.pop-head { background: var(--brand); color: #fff; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pop-head img { height: 30px; }
.pop-head .t { text-align: right; }
.pop-head .t b { font-size: 18px; display: block; }
.pop-head .t span { font-size: 12.5px; opacity: 0.85; }
.pop-body { padding: 26px 28px; }
.pop-amount { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.pop-amount .v { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; padding: 20px 0; }
.pop-grid dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; }
.pop-grid dd { margin: 3px 0 0; font-weight: 600; }
.pop-verify { display: flex; gap: 12px; align-items: flex-start; background: var(--good-bg); color: var(--good); border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.pop-verify.bad { background: var(--bad-bg); color: var(--bad); }
.pop-verify svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.pop-verify code { font-size: 11px; word-break: break-all; color: var(--ink-2); }
.pop-foot { padding: 14px 28px; background: #fafbfd; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Plans ---------- */
.plan { padding: 18px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.plan.current { border-color: var(--brand); background: var(--brand-50); }
.plan .price { font-size: 24px; font-weight: 700; margin-top: 6px; }
.plan .price span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- Banner, toast, modal ---------- */
.banner { display: flex; align-items: center; gap: 12px; background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-weight: 600; font-size: 13.5px; }
.banner.info { background: var(--brand-50); color: var(--brand-700); }
.banner svg { width: 18px; height: 18px; flex: none; }
.banner .grow { flex: 1; }

#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 11px; font-weight: 600; font-size: 13.5px; box-shadow: 0 8px 28px rgba(14, 22, 48, 0.25); animation: rise 0.2s ease-out; max-width: 380px; }
.toast.error { background: var(--bad); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

.modal-back { position: fixed; inset: 0; background: rgba(14, 22, 48, 0.45); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(14, 22, 48, 0.3); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head button { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.modal-body { padding: 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.secret { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; font-weight: 600; user-select: all; }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-hero { background: var(--brand); color: #fff; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-hero::after {
  content: ''; position: absolute; right: -120px; bottom: -120px; width: 520px; height: 520px;
  background: url('/assets/rentrexa-mark-white.png') no-repeat center / contain; opacity: 0.07;
}
.auth-hero img.logo { height: 40px; align-self: flex-start; }
.auth-hero .pitch { margin: auto 0; max-width: 460px; position: relative; z-index: 1; }
.auth-hero h1 { font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; }
.auth-hero p { font-size: 16px; opacity: 0.88; margin-top: 14px; }
.auth-hero ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; }
.auth-hero li { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.auth-hero li span { width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, 0.15); display: grid; place-items: center; flex: none; }
.auth-hero li svg { width: 16px; height: 16px; }
.auth-hero .foot { font-size: 12.5px; opacity: 0.7; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form h2 { font-size: 24px; }
.auth-form form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.demo { margin-top: 22px; padding: 14px; border-radius: 12px; background: var(--brand-50); font-size: 13px; }
.demo b { color: var(--brand-700); }
.demo .row { margin-top: 8px; }

/* ---------- Messaging ---------- */
.icon-only { width: 40px; padding: 0; flex: none; }
.avatar.room { background: var(--good-bg); color: var(--good); }
.avatar.big { width: 46px; height: 46px; font-size: 16px; background: var(--brand-50); color: var(--brand); }
.messenger { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 170px); min-height: 480px; overflow: hidden; }
.conv-list { border-right: 1px solid var(--line); overflow-y: auto; }
.conv-section { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding: 14px 16px 6px; }
.conv { display: flex; gap: 11px; align-items: center; padding: 11px 16px; color: inherit; text-decoration: none; border-left: 3px solid transparent; }
.conv:hover { background: var(--bg); text-decoration: none; }
.conv.active { background: var(--brand-50); border-left-color: var(--brand); }
.conv .avatar { background: var(--brand-50); color: var(--brand); }
.conv .grow { min-width: 0; flex: 1; }
.conv-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.conv-last { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.unread-dot { background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 7px; flex: none; }
.conv-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.conv-pane > .empty { margin: auto; }
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 11px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.chat-head .avatar { background: var(--brand-50); color: var(--brand); }
.chat-head .avatar.room { background: var(--good-bg); color: var(--good); }
.chat-head .grow { min-width: 0; }
.chat-head .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-back { display: none; color: var(--ink); padding: 4px; }
.chat-back svg { width: 20px; height: 20px; }
.chat-note { font-size: 12px; color: var(--ink-2); background: var(--brand-50); padding: 7px 18px; display: flex; gap: 6px; align-items: center; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; background: #fafbfd; min-height: 0; }
.chat-scroll .msg { max-width: 78%; }
.chat-scroll .msg .bubble { padding: 8px 12px; }
.chat-scroll .msg .meta { margin-bottom: 1px; }
.msg .time { font-size: 11px; color: var(--muted); margin-top: 3px; text-align: right; }
.msg.mine .time { color: rgba(255, 255, 255, 0.75); }
.msg .del { font-size: 11px; color: inherit; opacity: 0.8; font-weight: 600; }
.msg .bubble.deleted { opacity: 0.6; }
.role-tag { font-size: 10.5px; font-weight: 700; background: var(--brand-50); color: var(--brand); padding: 1px 6px; border-radius: 99px; }
.day-sep { text-align: center; font-size: 11.5px; color: var(--muted); margin: 8px 0 2px; }
.day-sep span { background: var(--line-2); padding: 3px 10px; border-radius: 99px; font-weight: 600; }
.chat-composer { border-top: 1px solid var(--line); padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.chat-composer textarea.input { min-height: 40px; height: 40px; padding: 9px 12px; resize: none; }

/* ---------- Tenant screening ---------- */
.bullets { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.result { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.result:last-child { border-bottom: 0; }
.result:hover { background: var(--brand-50); text-decoration: none; }
.result .grow { min-width: 0; flex: 1; }
.record-head { padding: 22px; border-top: 4px solid var(--line); }
.record-head.standing-good { border-top-color: var(--good); }
.record-head.standing-caution { border-top-color: #e0a100; }
.record-head.standing-adverse { border-top-color: var(--bad); }
.record-head .pill { font-size: 13.5px; padding: 6px 12px; }
.record-head .pill svg { width: 15px; height: 15px; }
.record-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.record-stats > div { background: var(--bg); border-radius: 12px; padding: 12px 14px; }
.record-stats b { display: block; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.record-stats span { font-size: 12px; color: var(--muted); }
.report { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.report p { white-space: pre-wrap; }
.response { margin-top: 10px; background: var(--bg); border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0; padding: 9px 12px; font-size: 13.5px; }
.response p { margin-top: 3px; }
.stars { display: inline-flex; gap: 1px; vertical-align: -2px; }
.stars svg { fill: var(--track); }
.stars svg.on { fill: #f2a900; }
.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; line-height: 0; }
.star-input svg { fill: var(--track); transition: fill 0.1s; }
.star-input input:checked ~ label svg, .star-input label:hover svg, .star-input label:hover ~ label svg { fill: #f2a900; }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.file-list { display: flex; flex-direction: column; gap: 4px; }
.file-row { display: flex; align-items: center; gap: 8px; font-size: 13px; background: var(--bg); border-radius: 8px; padding: 6px 10px; }
.platform-check { background: var(--good-bg); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.platform-check.mismatch { background: var(--warn-bg); }
.banner a, a.banner { color: inherit; text-decoration: none; }

/* ---------- Phase 2: applications ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.pipeline > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; position: relative; }
.pipeline span { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; margin-bottom: 6px; }
.pipeline b { display: block; font-size: 13.5px; }
.pipeline small { color: var(--muted); font-size: 12px; }
.credit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.credit-grid > div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.credit-grid span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.credit-grid b { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.credit-grid small { color: var(--muted); font-size: 12px; }
.score-ring { width: 62px; height: 62px; border-radius: 50%; border: 5px solid var(--track); display: grid; place-content: center; text-align: center; flex: none; }
.score-ring.good { border-color: var(--good); }
.score-ring.warn { border-color: #e0a100; }
.score-ring.bad { border-color: var(--bad); }
.score-ring b { font-size: 17px; line-height: 1; }
.score-ring span { font-size: 10px; color: var(--muted); }

/* ---------- Phase 2: lease agreement document ---------- */
.lease-doc { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 36px 44px; box-shadow: var(--shadow); max-width: 860px; margin: 0 auto; font-size: 14px; line-height: 1.65; }
.lease-doc header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 2px solid var(--brand); }
.lease-doc .doc-logo { height: 24px; }
.lease-doc .doc-ref { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; }
.lease-doc h1 { font-size: 22px; text-align: center; margin: 22px 0 18px; }
.lease-doc h2 { font-size: 14.5px; margin: 20px 0 6px; }
.lease-doc p { margin: 0 0 8px; color: var(--ink-2); }
.doc-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; background: var(--brand-50); border-radius: 12px; padding: 14px 16px; }
.doc-summary span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.doc-summary b { font-size: 13.5px; }
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 28px 0 18px; }
.sig-block img { height: 70px; max-width: 100%; display: block; margin-top: 6px; }
.sig-empty { height: 70px; display: grid; place-items: center; color: var(--muted); font-size: 13px; background: repeating-linear-gradient(45deg, #fafbfd, #fafbfd 8px, #f2f4f9 8px, #f2f4f9 16px); border-radius: 8px; margin-top: 6px; }
.sig-line { border-top: 1px solid var(--ink); margin: 4px 0 6px; }
.sig-canvas { width: 100%; height: 150px; border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.sign-bar { position: sticky; bottom: 76px; margin-top: 16px; z-index: 5; }
.banner.todo { margin-bottom: 12px; }

/* ---------- Phase 2: inspections ---------- */
.insp-room { margin-bottom: 14px; }
.insp-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.insp-item:last-of-type { border-bottom: 0; }
.insp-item.worse { background: #fff8f8; }
.insp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.insp-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cond-picker { display: flex; flex-wrap: wrap; gap: 5px; }
.cond-picker button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 11px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.cond-picker button:hover { border-color: var(--brand); }
.cond-picker button.on { background: var(--line-2); border-color: var(--ink-2); color: var(--ink); }
.cond-picker button.on.good { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.cond-picker button.on.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.cond-picker button.on.bad { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.input-sm { height: 34px; font-size: 13.5px; }
textarea.input-sm { min-height: 54px; height: auto; }
.insp-before { background: var(--bg); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; color: var(--ink-2); }
.insp-before .photos img { width: 56px; height: 56px; }
.insp-add { padding: 10px 20px 14px; }
.photos .ph { position: relative; display: inline-block; }
.photos .ph button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 12px; cursor: pointer; line-height: 1; }
.ph-tag { position: absolute; left: 4px; bottom: 4px; background: var(--warn); color: #fff; font-size: 10px; font-style: normal; font-weight: 700; padding: 1px 5px; border-radius: 4px; }

/* ---------- Public application ---------- */
.apply-unit { display: flex; align-items: center; gap: 12px; }

@media print {
  .lease-doc { border: 0; box-shadow: none; padding: 0; }
  .banner, .page-head .actions, .t-header, .t-tabs-bottom, .t-back, .sign-bar { display: none !important; }
  .insp-item { break-inside: avoid; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform 0.2s; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(14, 22, 48, 0.4); }
  .topbar { display: flex; align-items: center; justify-content: space-between; background: var(--brand); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 30; }
  .topbar img { height: 24px; }
  .topbar button { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
  .topbar svg { width: 24px; height: 24px; }
  .main { padding: 20px 16px 48px; }
  .grid-3, .grid-2, .form-grid, .pop-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 24px; }
  .auth-hero .pitch { margin: 28px 0 8px; }
  .auth-hero h1 { font-size: 26px; }
  .auth-hero ul, .auth-hero .foot { display: none; }
  .msg { max-width: 100%; }
  .record-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .credit-grid, .doc-summary { grid-template-columns: 1fr 1fr; }
  .lease-doc { padding: 22px 18px; }
  .sig-grid { grid-template-columns: 1fr; }
  .insp-item { padding: 12px 14px; }
  .messenger { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .messenger.has-active .conv-list { display: none; }
  .messenger:not(.has-active) .conv-pane { display: none; }
  .chat-back { display: block; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .pay-method { grid-template-columns: 1fr; }
  .stat .value { font-size: 22px; }
  h1 { font-size: 21px; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, #toasts { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  .pop { border: 0; box-shadow: none; }
  .pop-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Sign-in card ---------- */
.login-page {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(12px, 4vh, 32px) 16px;
  background: linear-gradient(180deg, #cfe0ff 0%, #b8d0ff 100%);
}
.login-card {
  /* Sized to its content; the page only scrolls if that ever outgrows the screen (e.g. a long error). */
  width: 100%; max-width: 1040px; flex: none; display: grid; grid-template-columns: 1.08fr 1fr;
  border-radius: 30px; overflow: hidden; background: var(--brand);
  box-shadow: 0 18px 44px rgba(23, 61, 237, 0.12), 0 2px 6px rgba(23, 61, 237, 0.06);
}
.login-art { position: relative; min-height: 100%; background: #e9eeff; }
.login-logo { height: 30px; align-self: flex-start; position: relative; }
.login-info {
  display: flex; flex-direction: column; padding: 40px 130px 32px 48px; overflow: hidden;
  background: #fff;
  color: #000;
}
.login-pitch { margin: auto 0; position: relative; z-index: 1; padding: 28px 0; }
.login-pitch h2 { font-size: 33px; line-height: 1.15; letter-spacing: -0.02em; color: #000; }
.login-pitch p { font-size: 15.5px; color: #111; margin-top: 14px; max-width: 440px; }
.login-pitch ul { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; }
.login-pitch li { display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 14.5px; color: #000; }
.login-pitch li span { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 4px 12px rgba(23, 61, 237, 0.25); }
.login-pitch li svg { width: 17px; height: 17px; }
.login-info-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #111; }
.login-info-foot svg { color: var(--brand); }
.login-panel { position: relative; z-index: 3; color: #fff; display: flex; align-items: center; min-height: 640px; }
.login-wave { position: absolute; top: 0; bottom: 0; left: -99px; width: 100px; height: 100%; fill: var(--brand); }
.login-inner { position: relative; width: 100%; padding: 44px 48px 36px 34px; }
.login-inner h1 { font-size: 27px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.login-inner h1 span { font-weight: 600; color: #dfe6ff; }
.login-sub { color: #c9d4ff; margin-top: 8px; font-size: 14px; }
.login-demos-label { margin-top: 24px; font-size: 12.5px; font-weight: 600; color: #b8c6ff; padding-left: 4px; }
.login-demos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.login-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 18px; border-radius: 99px;
  border: 1.5px solid rgba(255, 255, 255, 0.55); background: transparent; color: #fff;
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.login-pill:first-child { background: #dfe6ff; border-color: #dfe6ff; color: var(--brand-700); }
.login-pill:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }
.login-pill:first-child:hover { background: #fff; }
.login-or { display: flex; align-items: center; gap: 14px; margin: 24px 0 4px; color: #c9d4ff; font-size: 13px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.4); }
.login-form { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.lf { display: flex; flex-direction: column; gap: 7px; }
.lf.full { grid-column: 1 / -1; }
.lf label { font-size: 13.5px; font-weight: 600; color: #e3e9ff; padding-left: 14px; }
.lf label span { font-weight: 500; color: #b8c6ff; }
.lf input {
  height: 46px; border-radius: 99px; padding: 0 20px; font: inherit; font-size: 14.5px; color: #fff;
  background: rgba(255, 255, 255, 0.06); border: 1.5px solid rgba(255, 255, 255, 0.5); outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.lf input::placeholder { color: rgba(255, 255, 255, 0.55); }
.lf input:focus { border-color: #fff; background: rgba(255, 255, 255, 0.13); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16); }
.lf input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #2b4ef0 inset; caret-color: #fff; }
.login-check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: #dfe6ff; cursor: pointer; line-height: 1.5; }
.login-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.login-check .box { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid rgba(255, 255, 255, 0.6); display: grid; place-items: center; transition: background 0.15s; }
.login-check input:checked + .box { background: #fff; border-color: #fff; }
.login-check input:checked + .box::after { content: ''; width: 7px; height: 12px; border: solid var(--brand); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.login-check input:focus-visible + .box { outline: 2px solid #fff; outline-offset: 2px; }
.login-check b, .login-check a { color: #fff; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.login-btn {
  align-self: flex-start; min-width: 190px; height: 48px; padding: 0 30px; border: 0; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, #ffffff, #cfd9ff); color: var(--brand-700); font: inherit; font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 22px rgba(10, 25, 120, 0.3); transition: transform 0.15s, box-shadow 0.15s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(10, 25, 120, 0.36); }
.login-btn[disabled] { opacity: 0.7; cursor: wait; transform: none; }
.login-inner .form-error { position: relative; background: #fff; color: var(--bad); border-radius: 14px; padding-right: 40px; }
.form-error-x {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: none; color: inherit; cursor: pointer;
}
.form-error-x:hover { background: var(--bad-bg); }
.login-switch { margin-top: 22px; font-size: 13.5px; color: #c9d4ff; }
.login-switch a, .login-link { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.login-foot { margin-top: 20px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; text-align: center; }
.login-foot code { background: #fff; padding: 1px 6px; border-radius: 6px; color: var(--ink-2); }

@media (max-width: 860px) {
  .login-page { padding: 0; justify-content: flex-start; background: var(--brand); }
  .login-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; flex: 1 0 auto; border-radius: 0; box-shadow: none; }
  .login-info { padding: 26px 22px 54px; }
  .login-pitch { padding: 18px 0 0; }
  .login-pitch h2 { font-size: 24px; }
  .login-pitch p { font-size: 14px; }
  .login-pitch ul, .login-info-foot { display: none; }
  .login-wave { display: none; }
  .login-panel { min-height: 0; margin-top: -30px; border-radius: 30px 30px 0 0; background: var(--brand); align-items: flex-start; }
  .login-inner { padding: 30px 22px 28px; }
  .login-inner h1 { font-size: 23px; }
  .login-foot { color: #c9d4ff; padding: 0 16px 24px; margin: 0; background: var(--brand); width: 100%; }
  .login-foot code { background: rgba(255, 255, 255, 0.15); color: #fff; }
}
/* Short screens (most laptops): tighten the spacing so the whole card fits without scrolling. */
@media (min-width: 861px) and (max-height: 800px) {
  .login-panel { min-height: 0; }
  .login-info { padding: 28px 120px 22px 44px; }
  .login-pitch { padding: 14px 0; }
  .login-pitch h2 { font-size: 28px; }
  .login-pitch p { font-size: 14.5px; margin-top: 10px; }
  .login-pitch ul { margin-top: 18px; gap: 8px; }
  .login-pitch li span { width: 30px; height: 30px; }
  .login-inner { padding: 26px 44px 22px 34px; }
  .login-inner h1 { font-size: 25px; }
  .login-demos-label { margin-top: 16px; }
  .login-or { margin: 16px 0 2px; }
  .login-form { gap: 14px; margin-top: 14px; }
  .login-grid { gap: 12px 16px; }
  .lf { gap: 5px; }
  .lf input { height: 42px; }
  .login-btn { height: 44px; }
  .login-switch { margin-top: 16px; }
  .login-foot { margin-top: 10px; }
}
@media (min-width: 861px) and (max-height: 660px) {
  .login-page { padding-top: 12px; padding-bottom: 12px; }
  .login-pitch p { display: none; }
  .login-sub { font-size: 13px; margin-top: 4px; }
  .login-inner { padding-top: 20px; padding-bottom: 18px; }
  .login-demos-label { margin-top: 12px; }
  .login-or { margin-top: 12px; }
  .login-switch { margin-top: 12px; }
  .login-check { line-height: 1.4; }
}
@media (max-width: 520px) {
  .login-grid { grid-template-columns: 1fr; }
  .login-btn { align-self: stretch; }
  .login-pill { flex: 1; justify-content: center; padding: 0 12px; }
}

/* ---------- Coming soon ---------- */
.soon { padding: 28px; max-width: 760px; }
.soon h2 { font-size: 22px; margin: 12px 0 6px; }
.soon-points { list-style: none; padding: 0; margin: 20px 0 16px; display: flex; flex-direction: column; gap: 14px; }
.soon-points li { display: flex; gap: 12px; align-items: flex-start; }
.nav .soon-badge { background: rgba(255, 255, 255, 0.2); color: #fff; font-size: 10.5px; }
.nav a.active .soon-badge { background: var(--brand-50); color: var(--brand); }

.demo-only[hidden] { display: none !important; }
.login-forgot { margin: -6px 0 0; text-align: center; font-size: 13.5px; }
.dev-link { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.14); border: 1px dashed rgba(255, 255, 255, 0.5); color: #fff; font-size: 13.5px; line-height: 1.5; }
.dev-link a { color: #fff; font-weight: 700; text-decoration: underline; }
.modal .dev-link, .card .dev-link { background: var(--bg, #f4f6fb); border-color: var(--line, #ccd); color: inherit; }
.modal .dev-link a, .card .dev-link a { color: var(--brand, #173ded); }

/* ---------- Interactive dashboard (public/dashboard.js) ---------- */
.dz-in { animation: dz-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; animation-delay: var(--d, 0ms); }
@keyframes dz-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } }

.dz-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.dz-welcome { flex: 1 1 320px; }
.dz-welcome h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0; }
.dz-welcome p { margin: 4px 0 0; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.dz-search { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 16px; width: min(420px, 100%); border-bottom: 1px solid var(--line); padding: 6px 2px; color: var(--muted); }
.dz-search:focus-within { border-color: var(--brand); color: var(--brand); }
.dz-search input { border: 0; background: transparent; outline: 0; font: inherit; font-size: 14px; flex: 1; min-width: 0; color: var(--ink); }
.dz-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20; list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(14, 22, 48, 0.14); }
.dz-results a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.dz-results a:hover, .dz-results a:focus { background: var(--brand-50); }
.dz-results small { display: block; color: var(--muted); font-size: 12px; }
.dz-none { padding: 8px 10px; color: var(--muted); font-size: 13px; }
.dz-head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.dz-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dz-stats { display: flex; gap: 28px; }
.dz-stat { color: inherit; text-decoration: none; }
.dz-stat-label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.dz-stat-row { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.dz-stat-row b { font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dz-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(14, 22, 48, 0.1); font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }

.dz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dz-card { border-radius: 22px; padding: 20px 22px; position: relative; }
.dz-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dz-card-head h2 { font-size: 16px; margin: 0; }
.dz-hint { font-size: 12px; color: var(--muted); text-align: right; }
.dz-select { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: #fff; }
.dz-select select { border: 0; background: transparent; font: inherit; color: inherit; outline: 0; cursor: pointer; }
.dz-select:focus-within { border-color: var(--brand); }

/* Gauge */
.dz-gauge-body { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); gap: 22px; align-items: center; }
.dz-gauge { position: relative; }
.dz-gauge svg { width: 100%; display: block; }
.dz-arc-track, .dz-arc { fill: none; stroke-width: 12; stroke-linecap: round; }
.dz-arc-track { stroke: var(--track); }
.dz-arc { stroke-dasharray: 100; transition: stroke-dashoffset 1.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.dz-gauge-center { position: absolute; inset: 0 0 16% 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.dz-gauge-center b { font-size: 25px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dz-gauge-center span { font-size: 12px; color: var(--muted); }
.dz-gauge-center em { font-style: normal; }
.dz-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.dz-legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.dz-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dz-legend a { flex: 0 1 auto; min-width: 0; color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-legend a:hover { color: var(--brand); }
.dz-dots { flex: 1; min-width: 14px; border-bottom: 1.5px dashed var(--line); transform: translateY(3px); }
.dz-legend b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dz-legend small { color: var(--muted); width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* Heat map */
.dz-heat-body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; min-height: 190px; }
.dz-zoom { display: flex; flex-direction: column; gap: 8px; }
.dz-zoom button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--line-2); font-size: 18px; line-height: 1; color: var(--ink-2); cursor: pointer; transition: background 0.15s, color 0.15s; }
.dz-zoom button:hover, .dz-zoom button:focus-visible { background: var(--brand-100); color: var(--brand); }
.dz-heat-grid { --tile: 46px; display: flex; flex-direction: column; gap: 12px; max-height: 270px; overflow: auto; padding: 6px; }
.dz-heat-name { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.dz-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-tile {
  width: var(--tile); height: var(--tile); border-radius: 11px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, width 0.25s, height 0.25s;
  animation: dz-pop 0.45s cubic-bezier(0.3, 1.4, 0.5, 1) backwards; animation-delay: calc(300ms + var(--n) * 35ms);
}
.dz-tile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90%; }
.dz-tile:hover, .dz-tile:focus-visible { transform: scale(1.12); box-shadow: 0 8px 18px rgba(14, 22, 48, 0.2); position: relative; z-index: 1; }
@keyframes dz-pop { from { opacity: 0; transform: scale(0.4); } }
.dz-tile.paid, .dz-heat-legend i.paid { background: #35b85a; }
.dz-tile.due, .dz-heat-legend i.due { background: #f5a524; }
.dz-tile.arrears, .dz-heat-legend i.arrears { background: #ef4b36; }
.dz-tile.vacant { background: repeating-linear-gradient(135deg, #e3e7ef 0 6px, #f1f3f8 6px 12px); color: var(--muted); }
.dz-heat-legend i.vacant { background: #dfe3ec; }
.dz-heat-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.dz-heat-legend li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.dz-heat-legend i { width: 10px; height: 10px; border-radius: 50%; }
.dz-heat-legend b { margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums; }
.dz-tip {
  position: absolute; z-index: 30; pointer-events: none; display: flex; flex-direction: column; gap: 2px; min-width: 170px;
  background: rgba(14, 16, 24, 0.92); backdrop-filter: blur(6px); color: #fff; border-radius: 14px; padding: 10px 14px; font-size: 12.5px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}
.dz-tip b { font-size: 13.5px; }
.dz-tip span { color: #c9cede; }
.dz-tip em { font-style: normal; font-weight: 700; }
.dz-tip em.good, .dz-bubble em.good { color: #6ee08a; }
.dz-tip em.mid { color: #ffc75a; }
.dz-tip em.bad, .dz-bubble em.bad { color: #ff8b7a; }

/* Collection flow */
.dz-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 6px; }
.dz-figures span { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.dz-figures b { font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dz-figures em { font-style: normal; }
.dz-flow { position: relative; height: 236px; margin: 0 -22px -20px; overflow: hidden; border-radius: 0 0 22px 22px; }
.dz-flow svg { position: absolute; left: 0; right: 0; top: 34px; width: 100%; height: calc(100% - 68px); clip-path: inset(0 100% 0 0); animation: dz-reveal 1.4s 0.4s cubic-bezier(0.4, 0.1, 0.2, 1) forwards; }
@keyframes dz-reveal { to { clip-path: inset(0 0 0 0); } }
.dz-mark { position: absolute; top: 6px; bottom: 8px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; justify-content: space-between; pointer-events: none; }
.dz-mark::before { content: ""; position: absolute; top: 28px; bottom: 28px; left: 50%; border-left: 1.5px dashed rgba(14, 22, 48, 0.45); }
.dz-mark .dz-pill { position: relative; background: rgba(240, 243, 248, 0.95); box-shadow: none; transition: transform 0.2s, background 0.2s, color 0.2s; }
.dz-mark.on .dz-pill { background: var(--ink); color: #fff; transform: scale(1.08); }
.dz-mark em { font-style: normal; }

/* Collection trend */
.dz-trend { position: relative; aspect-ratio: 600 / 250; touch-action: pan-y; cursor: ew-resize; user-select: none; }
.dz-trend svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dz-line { fill: none; stroke: #c3c9d6; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke 0.25s, stroke-width 0.25s; }
.dz-trend.drawn .dz-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(0.4, 0.1, 0.2, 1), stroke 0.25s, stroke-width 0.25s; }
.dz-line.on { stroke: var(--brand); stroke-width: 3.5; filter: drop-shadow(0 6px 10px rgba(23, 61, 237, 0.25)); }
.dz-end {
  position: absolute; transform: translateY(-50%); border: 0; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  background: #d5dae4; color: #fff; cursor: pointer; transition: background 0.2s, box-shadow 0.2s;
}
.dz-end:hover { background: #bcc3d1; }
.dz-end.on { background: linear-gradient(90deg, var(--brand), #4f6cff); box-shadow: 0 8px 22px rgba(23, 61, 237, 0.35); }
.dz-scrub { position: absolute; width: 16px; transform: translateX(-50%); outline: none; transition: left 0.2s ease; }
.dz-scrub::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1.5px dashed var(--ink); }
.dz-scrub:focus-visible { background: var(--brand-50); border-radius: 8px; }
.dz-tri { position: absolute; left: 2px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; }
.dz-tri.up { top: -2px; border-top: 8px solid var(--ink); }
.dz-tri.down { bottom: -2px; border-bottom: 8px solid var(--ink); }
.dz-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); transform: translate(-50%, -50%); transition: left 0.2s ease, top 0.2s ease; pointer-events: none; }
.dz-bubble {
  position: absolute; transform: translate(-50%, calc(-100% - 14px)); display: flex; gap: 6px; align-items: baseline; white-space: nowrap; pointer-events: none;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; transition: left 0.2s ease, top 0.2s ease;
}
.dz-bubble em { font-style: normal; font-size: 11.5px; color: #c9cede; }

@media (max-width: 1100px) { .dz-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .dz-welcome h1 { font-size: 24px; }
  .dz-head-side { align-items: stretch; width: 100%; min-width: 0; }
  .dz-stats { gap: 16px 22px; flex-wrap: wrap; }
  /* Lists under the widgets: let long lines wrap/ellipsis instead of widening the page. */
  .dash-lists { grid-template-columns: minmax(0, 1fr); }
  .dz-stat-row b { font-size: 20px; }
  .dz-card { padding: 16px; }
  .dz-flow { margin: 0 -16px -16px; }
  .dz-gauge-body { grid-template-columns: minmax(0, 1fr); }
  .dz-gauge { max-width: 240px; margin: 0 auto; width: 100%; }
  .dz-heat-body { grid-template-columns: auto minmax(0, 1fr); }
  .dz-heat-legend { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .dz-figures b { font-size: 16px; }
  .dz-mark .dz-pill { font-size: 10.5px; padding: 2px 6px; }
  .dz-end { font-size: 10px; padding: 3px 7px; }
  .dz-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dz-in, .dz-tile { animation: none; }
  .dz-flow svg { animation: none; clip-path: none; }
  .dz-line, .dz-trend.drawn .dz-line { stroke-dashoffset: 0; transition: none; }
  .dz-arc, .dz-scrub, .dz-dot, .dz-bubble { transition: none; }
}

/* Dashboard lists: each card is only as tall as its content (no stretching to match the tallest in the row). */
.dash-lists { align-items: start; }

/* Free trial: banner above every landlord page, and the subscription box in Settings & plan */
.trial-banner, .sub-box { display: flex; align-items: center; gap: 12px; border-radius: 14px; border: 1px solid; font-size: 13.5px; line-height: 1.45; }
.trial-banner { margin: 20px 32px 0; padding: 12px 16px; }
.sub-box { padding: 14px 16px; }
.trial-banner > svg, .sub-box > svg { flex: none; }
.trial-banner > .grow, .sub-box > .grow { flex: 1; min-width: 0; }
.trial-banner.info, .sub-box.info { background: var(--brand-50); border-color: var(--brand-100); color: var(--ink-2); }
.trial-banner.info > svg, .sub-box.info > svg { color: var(--brand); }
.trial-banner.warn, .sub-box.warn { background: var(--warn-bg); border-color: #f3d39b; color: #6b4200; }
.trial-banner.bad, .sub-box.bad { background: var(--bad-bg); border-color: #f3c0c5; color: #8f1622; }
.sub-box.good { background: var(--good-bg); border-color: #b9e3cf; color: var(--good); }
.trial-banner .btn, .sub-box .btn { flex: none; }
@media (max-width: 860px) { .trial-banner { margin: 12px 16px 0; flex-wrap: wrap; } .sub-box { flex-wrap: wrap; } }

/* Installable app: "Install the Rentrexa app" card */
.install-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.install-card[hidden] { display: none; }
.install-card > img { border-radius: 11px; flex: none; }
.install-card .grow { flex: 1; min-width: 0; }
.install-card .icon-btn { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.install-card .icon-btn:hover { background: var(--line-2); color: var(--ink); }
