:root {
  --dark: #181818;
  --dark-2: #0d0d0d;
  --gold: #DBB593;
  --gold-2: #E7C9AB;
  --ink: #181818;
  --ink-soft: #403f3e;
  --muted: #5A5551;
  --hairline: #453E38;
  --bg: #efefef;
  --card: #ffffff;
  --line: #e3e8ec;
  --ok: #2e7d32;
  --danger: #b42318;
  --radius: 10px;
  --font-display: "bebas-neue", "Bebas Neue", "Oswald", "Arial Narrow", sans-serif;
  --font-body: "canada-type-gibson", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans Thai", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
html[lang="zh-CN"] body { font-family: "canada-type-gibson","Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
html[lang="th"] body { font-family: "canada-type-gibson","Noto Sans Thai", "Tahoma", sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .03em;
}
html[lang="zh-CN"] h1, html[lang="zh-CN"] h2, html[lang="zh-CN"] h3, html[lang="zh-CN"] .display,
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3, html[lang="th"] .display {
  font-family: "canada-type-gibson","Noto Sans SC", "Noto Sans Thai", "PingFang SC", sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* ── 主体 ── */
.wrap { max-width: var(--shell-max); margin: 0 auto; padding: 34px var(--shell-pad, 20px) 60px; }

/* 登录 */
.auth-holder { max-width: 440px; margin: 20px auto 0; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; box-shadow: 0 6px 30px rgba(0,0,0,.06); }
.auth-card .kicker { color: var(--gold); text-transform: uppercase; letter-spacing: .16em;
  font-size: 12px; font-weight: 600; margin-bottom: 8px; font-family: var(--font-body); }
.auth-card h1 { font-size: 34px; margin: 0 0 8px; color: var(--ink); }
.auth-card .lead { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #3a3a3a; }
.field input { width: 100%; height: 46px; border: 1px solid #d8d2c8; border-radius: 8px;
  padding: 0 14px; font-size: 15px; color: var(--ink); background: #fff; }
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(219,181,147,.2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: var(--dark); font-size: 15px; font-weight: 700; }
.btn:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid #cfcfcf; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; text-align: center; }
.err { font-size: 13px; color: var(--danger); margin: 12px 0 0; text-align: center; }
.otp-row { display: flex; gap: 10px; }
.otp-row input { flex: 1; letter-spacing: 6px; font-size: 20px; font-weight: 700; text-align: center; }

/* ── 仪表盘 ── */
.dash-head { display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.dash-head .hello h1 { font-size: 30px; margin: 0; color: var(--ink); }
.dash-head .hello p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.logout { background: none; border: 1px solid #cfcfcf; color: var(--muted);
  border-radius: 999px; padding: 7px 16px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.logout:hover { color: var(--danger); border-color: var(--danger); }
.dash-actions { display: flex; align-items: center; gap: 10px; }

/* 数据更新时间（来自数据文件 retrieved_at，非服务器当前时间） */
.data-updated { font-size: 12.5px; color: var(--muted); margin: -8px 0 14px; }

/* 管理员 dashboard：房东卡片列表 */
.ll-card { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer; text-align: left;
  font-size: 14px; color: var(--ink); transition: border-color .15s; }
.ll-card:hover { border-color: var(--gold); }
.ll-card .ll-name { font-weight: 600; font-size: 15px; flex: none; }
.ll-card .ll-meta { color: var(--muted); font-size: 12.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ll-card .ll-count { font-weight: 700; color: var(--gold); font-size: 15px; flex: none; }
.ll-card .ll-codes { color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: .02em; flex-basis: 100%; order: 10; }
.ll-card .ll-arrow { color: var(--muted); font-size: 20px; flex: none; }

/* 四大区块面板 */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 18px; }
.panel-title { font-size: 22px; color: var(--ink); margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px; }
.panel-title::before { content: ""; width: 5px; height: 20px; background: var(--gold); border-radius: 2px; flex: none; }
.dl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  box-sizing: border-box; height: 40px; flex-shrink: 0;
  background: #fff; color: #167347;
  border: 1px solid #167347; border-radius: 999px; padding: 0 14px;
  font-family: "canada-type-gibson", "Noto Sans", sans-serif;
  font-size: 14px; font-weight: 400; line-height: 1; letter-spacing: normal;
  text-transform: none; cursor: pointer; white-space: nowrap; text-decoration: none; }
.dl-btn::before { content: ""; display: block; width: 20px; height: 20px; flex: 0 0 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='8' y='2' width='14' height='20' rx='2' fill='%2321a366'/%3E%3Cpath d='M13 7h6M13 11h6M13 15h6M13 19h6' stroke='white' opacity='.65'/%3E%3Crect x='1' y='6' width='13' height='14' rx='1' fill='%2310733f'/%3E%3Cpath d='m5 10 5 6m0-6-5 6' stroke='white' stroke-width='1.8'/%3E%3C/svg%3E") center / contain no-repeat; }
.dl-btn:hover { background: #eaf5ef; color: #10733f; }
.dl-btn:disabled { opacity: .55; cursor: wait; }
.panel-title .dl-btn { margin-left: auto; }

/* ① 个人信息 + 房产 */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-card { background: #fafaf8; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.info-card h3 { font-size: 15px; color: #b08a5a; margin: 0 0 10px; }
.info-card .kv { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; }
.info-card .kv .k { color: var(--muted); }
.info-card .kv .v { color: var(--ink); font-weight: 600; word-break: break-word; }
.bank-line { display: block; white-space: nowrap; }
.rent-line + .rent-line::before { content: ' · '; }
.rent-label-m { display: none; }
.prop-list { display: flex; flex-direction: column; gap: 10px; }
.prop-item { background: #fafaf8; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.prop-item .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prop-item .code { font-family: var(--font-display); font-size: 20px; color: var(--ink); letter-spacing: .04em; }
.prop-item .addr { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.45; }
.badge { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.active { color: var(--ok); border-color: #cfe3cf; background: #f0f7f0; }
.badge.occupied { color: var(--gold); border-color: #e3d3bf; background: #faf5ef; }

/* ② 租约卡片 */
.tenancy-card { background: #fafaf8; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 12px; }
.tenancy-card .tc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tenancy-card .tc-title { font-family: var(--font-display); font-size: 20px; color: var(--ink); letter-spacing: .03em; }
.tenancy-card .tc-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.tenancy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; margin-top: 14px; }
.tenancy-grid .tg { }
.tenancy-grid .tg .k { font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.tenancy-grid .tg .v { font-size: 15px; color: var(--ink); font-weight: 600; margin-top: 2px; }
.tc-docs { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.doc { font-size: 12.5px; color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 11px; background: #fff; display: inline-flex; align-items: center; gap: 6px; }
.doc:hover { border-color: var(--gold); background: #fbf4ec; }
.doc .ic { color: #b08a5a; font-weight: 700; width: auto; height: auto; }

/* ② 房产 + 租约（房产 → 租约 → remittance 三级嵌套） */
.prop-block { background: #fafaf8; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.prop-block .pb-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prop-block .pb-code { font-family: var(--font-display); font-size: 22px; color: var(--ink); letter-spacing: .04em; }
.prop-block .pb-addr { color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.45; }
.tenancy-card.nested { background: #fff; border-left: 3px solid var(--gold); margin: 14px 0 0; }
.tenancy-card.nested .tc-title { font-size: 18px; }

/* delegated 分组（薛 10 套 → 5 组） */
.group-block { border-left: 3px solid var(--gold); padding-left: 16px; margin-bottom: 24px; }
.group-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
#groupHeadBar { margin-bottom: 16px; }
.group-title { font-family: var(--font-display); font-size: 20px; color: var(--ink); letter-spacing: .03em; }
.group-head .group-dl { margin-left: auto; background: var(--dark); color: var(--gold);
  border: 1px solid var(--gold); border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.group-head .group-dl:hover { background: var(--gold); color: var(--dark); }
.bank-card { background: #fafaf8; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 10px; font-size: 13px; }

/* delegated 分组选择卡片（先选组，再展示） */
.group-picker { display: flex; flex-direction: column; gap: 12px; }
.gp-hint { color: var(--muted); font-size: 13px; margin-bottom: 2px; }
.group-pick-card { display: flex; align-items: center; gap: 14px; width: 100%;
  background: #fafaf8; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s; }
.group-pick-card:hover { border-color: var(--gold); background: #fbf4ec; }
.gpc-title { font-family: var(--font-display); font-size: 20px; color: var(--ink);
  letter-spacing: .03em; white-space: nowrap; flex: none; }
.gpc-codes { color: var(--muted); font-size: 13px; letter-spacing: .04em; flex: 1; }
.gpc-arrow { color: #b08a5a; font-size: 22px; font-weight: 700; flex: none; }
.group-back { background: var(--gold); border: 1px solid var(--gold); border-radius: 999px;
  color: var(--dark); font-size: 14px; font-weight: 700; padding: 9px 18px;
  cursor: pointer; flex: none; white-space: nowrap; }
.group-back:hover { background: var(--dark); color: var(--gold); }

/* 展开 + 按钮 */
.expand-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font-size: 13px; font-weight: 600; padding: 7px 14px; }
.expand-btn:hover { border-color: var(--gold); }
.expand-btn .plus { font-family: var(--font-display); font-size: 18px; line-height: 1; color: #b08a5a; width: 18px; text-align: center; }
.expand-btn[aria-expanded="true"] .plus { }

/* 租约折叠头（全宽，覆盖 expand-btn 的胶囊外观） */
.expand-btn.tenancy-head { width: 100%; justify-content: flex-start; text-align: left;
  border: none; border-radius: 0; padding: 0; gap: 10px; }
.tenancy-head .plus { font-size: 20px; width: 22px; }
.tenancy-head .th-title { font-family: var(--font-display); font-size: 18px; color: var(--ink); letter-spacing: .03em; }
.tenancy-head .th-status { color: var(--muted); font-size: 13px; margin-left: auto; white-space: nowrap; }
.tenancy-body { margin-top: 14px; }
.tenancy-body .tenancy-grid { margin-top: 0; }

/* remittance 左右列展开（标签左、金额右，与 remit PDF 一致） */
.remit-wrap { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 14px; }
.remit-list { display: flex; flex-direction: column; gap: 10px; overflow-x: auto; min-width: 600px; }
.remit-line { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.rl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #f0ede7; }
.rl-period { font-weight: 700; color: var(--ink); font-size: 14px; }
.rl-left { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rl-status { color: #2e7d32; background: #e8f5e9; font-size: 11.5px; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.rl-date { color: var(--muted); font-size: 11.5px; }
.rl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 5px 0; font-size: 13.5px; }
.rl-k { color: var(--muted); min-width: 0; word-break: break-word; }
.rl-v { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-row .rl-v.neg { color: #b08a5a; }
.rl-row .rl-v.dim { color: var(--muted); font-weight: 500; }
.rl-row.total { border-top: 1px solid #f0ede7; margin-top: 2px; padding-top: 8px; font-size: 15px; }
.rl-row.total .rl-k { color: var(--ink); font-weight: 700; }
.rl-row.total .rl-v { font-weight: 700; }
.rl-doc { margin-top: 10px; }

/* ③ 账单（Bills AI 付款信息格式） */
.bill-fields { display: flex; flex-direction: column; }
.bf { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0;
  border-bottom: 1px solid #f0ede7; font-size: 13.5px; }
.bf:last-child { border-bottom: none; }
.bf-k { color: var(--muted); flex: none; }
.bf-v { color: var(--ink); font-weight: 600; text-align: right; word-break: break-word;
  font-variant-numeric: tabular-nums; }
.bill-warning { margin-top: 8px; font-size: 13px; color: #b08a5a; line-height: 1.6; }
.empty { color: var(--muted); font-size: 14px; padding: 10px 2px; }

/* ④ 备用金 */
.float-section-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.float-balance { display: flex; align-items: baseline; gap: 14px; }
.float-balance .fb-val { font-family: var(--font-display); font-size: 42px; color: var(--ink); }
.float-balance .fb-sub { color: var(--muted); font-size: 13px; }
.float-txns { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 6px; overflow-x: auto; min-width: 600px; }
.txn-header { display: flex; justify-content: space-between; padding: 4px 4px 6px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.txn-header .th-right { flex: none; }
.float-txns .txn { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid #f0ede7; font-size: 13.5px; }
.float-txns .txn:last-child { border-bottom: none; }
.float-txns .txn .t-ref { color: var(--ink); flex: 1; min-width: 0; display: flex; gap: 12px; align-items: flex-start; }
.float-txns .txn .t-date { color: var(--muted); font-size: 12px; flex: 0 0 76px; padding-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.float-txns .txn .t-desc-wrap { flex: 1; min-width: 0; word-break: break-word; }
.float-txns .txn .t-amt { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.float-txns .txn .t-right { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.float-txns .txn .t-bal { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-tags { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.t-tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.t-tag.apt { background: #f0ede7; color: #7a6a52; }
.t-tag.type { background: #eef3f8; color: #3a6080; }

/* 建设中链接 */
.wip { display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: 13px; margin-top: 12px; }
.wip .ic { color: #b08a5a; }


.hidden { display: none !important; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.3);
  border-top-color: var(--dark); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ── 移动端 ── */
@media (max-width: 768px) {
  .info-card .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .info-card .kv .v { word-break: normal; overflow-wrap: normal; }
  .rent-tg { grid-column: 1 / -1; }
  .rent-tg .k { display: none; }
  .rent-label-m { display: inline; }
  .rent-line { display: block; white-space: nowrap; }
  .rent-line + .rent-line::before { content: ''; }
  .data-updated { margin: -4px 0 12px; }
  .info-grid { grid-template-columns: 1fr; }
  .tenancy-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 28px 22px; }
  .dash-head .hello h1 { font-size: 26px; }
  .float-balance .fb-val { font-size: 34px; }
}


/* Personal details: separators must not consume a single label/value grid cell. */
.info-card .kv .personal-divider { grid-column: 1 / -1; height: 1px; background: var(--hairline, #ded8d0); margin: 8px 0; }
.info-card .kv > .k, .info-card .kv > .v { min-width: 0; }
.info-card .kv .v { overflow-wrap: anywhere; }
.info-card .kv .v .bank-line { white-space: normal; overflow-wrap: anywhere; }
.info-card .kv .bank-group + .bank-group { margin-top: 12px; }

/* One owner per full-width card, including repeated shared bank details. */
.personal-cards { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.personal-cards > .personal-card { min-width: 0; }

/* Yield overview: compact, matching the portal's neutral/gold palette. */
.yield-overview{margin-bottom:18px;padding:14px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);color:var(--ink-soft)}
.yield-overview h2{font-size:20px;margin:0 0 4px}.yield-overview>p{font-size:12px;color:var(--muted);margin:0 0 10px}
.yield-overview select{max-width:100%;padding:7px 10px;min-height:40px;font:inherit;font-size:14px;border:1px solid var(--gold);border-radius:6px;background:var(--card);color:var(--ink)}
.yield-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}
.yield-cards>div{padding:12px 14px;background:#faf8f5;border:1px solid #e9dfd4;border-radius:8px;min-width:0}
.yield-cards>div+div{background:#f4eee7;color:var(--ink)}
.yield-cards>div>span{font-size:13px}.yield-cards strong{display:block;font-size:27px;margin:6px 0;line-height:1.25;overflow-wrap:normal}
.yield-cards>div+div strong{font-size:19px;line-height:1.5}
.yield-overview small{display:block;font-size:12px;line-height:1.5;color:var(--muted)}
.yield-cost{padding:12px 14px;background:var(--card);border:1px solid var(--line);border-radius:8px}
.yield-cost h3{font-size:16px;margin:0 0 8px}
.yield-chart{display:flex;align-items:center;gap:22px;margin:6px 0 6px}
.yield-chart>div+div{min-width:0;font-size:13px}.yield-chart p{margin:5px 0}
.yield-ring{width:130px;height:130px;border:17px solid #e9dfd4;border-radius:50%;display:grid;place-items:center;flex-shrink:0;text-align:center;font-size:12px}
.yield-ring b{display:block;margin-top:5px;font-size:14px;line-height:1.4}
@media(max-width:650px){.yield-overview{padding:12px}.yield-cards{gap:8px}.yield-cards>div{padding:10px}.yield-cards strong{font-size:25px}.yield-cards>div+div strong{font-size:17px}.yield-cost{padding:10px}.yield-chart{gap:12px}.yield-ring{width:104px;height:104px;border-width:13px}.yield-ring b{font-size:12px}.yield-ring{font-size:11px}.yield-chart>div+div{font-size:12px}.yield-overview small{font-size:11px}}

/* Compact AI attribution; larger chart, quieter cost labels. */
.yield-title{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;margin-bottom:4px}.yield-title h2{margin:0;white-space:nowrap}.yield-ai{font-family:var(--font-body);font-size:10px;font-weight:500;line-height:1.4;letter-spacing:.02em;color:var(--muted);border:1px solid #e9dfd4;border-radius:4px;padding:3px 6px;background:#faf8f5;white-space:nowrap}
.yield-ring{width:154px;height:154px;border-width:20px}.yield-chart>div+div{font-size:12px}.yield-chart>div+div small{font-size:10px}
@media(max-width:650px){.yield-title{gap:8px}.yield-ai{font-size:9px}.yield-ring{width:122px;height:122px;border-width:16px}.yield-chart{gap:10px}.yield-chart>div+div{font-size:11px;line-height:1.45}.yield-chart>div+div small{font-size:10px}.yield-cost>small{font-size:10px}}

/* Data painting only: preserve approved ring dimensions and palette. */
.yield-ring-data{border:0;padding:20px}.yield-ring-data>span{background:#fff;border-radius:50%;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.yield-cost-total{font-size:13px!important}.yield-chart small[class^="yield-cost-"]{display:block}
@media(max-width:650px){.yield-ring-data{padding:16px}.yield-cost-total{font-size:11px!important}}

.yield-gross-only .yield-cards{grid-template-columns:repeat(3,1fr)}.yield-gross-only .yield-cards>div{background:#faf8f5}.yield-gross-only .yield-cards>div+div{background:#faf8f5}.yield-gross-only .yield-card{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:16px;min-width:0;height:100%}.yield-gross-only .yield-cards strong{margin:0}.yield-card-label{font-size:13px;color:var(--muted);font-weight:600}.yield-card-note{font-size:12px;color:var(--muted);line-height:1.55;margin-top:auto;padding-top:8px}.yield-card-note b{color:var(--ink);font-weight:600}.yield-void{display:block;font-size:11px;opacity:.75;margin-top:4px}.yield-card-soon{justify-content:center}.yield-chart-svg{width:100%;max-width:120px;height:auto;margin:8px auto}.yield-card-badge{font-size:11px;color:var(--muted);background:#f2eadf;border-radius:999px;padding:3px 11px;display:inline-block;margin-top:auto}@media(max-width:820px){.yield-gross-only .yield-cards{grid-template-columns:1fr}.yield-gross-only .yield-card{padding:12px 16px;gap:6px;min-height:205px}.yield-card-note{margin-top:auto;padding-top:6px}.yield-card-badge{margin-top:auto}.yield-chart-svg{max-width:120px;margin:2px auto}}

/* Receipt/refund composition is subordinate to the main financial rows. */
.receipt-breakdown { margin: 2px 0 8px 12px; font-size: 12px; }
.receipt-breakdown > summary { cursor: pointer; font-size: 12px; line-height: 1.5; color: var(--muted); }
.receipt-breakdown .rl-row { font-size: 12px; padding: 4px 0; }

/* Bills reuse tenancy cards, expansion buttons and PDF links. */
.bill-head .th-title{min-width:0;overflow-wrap:anywhere}
.bill-level-1 .th-title{font-size:22px}
.bill-level-2 .th-title{font-size:17px}
.bill-level-3 .th-title{font-family:inherit;font-size:14px;display:flex;align-items:center;gap:8px;letter-spacing:0}
.bill-level-4 .th-title{font-family:inherit;font-size:12.5px;display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex:1;letter-spacing:0}
.bill-count{font-size:12px;font-weight:400;color:var(--muted)}
.bill-amount{margin-left:auto;font-variant-numeric:tabular-nums}
.bill-entry-status{font-size:11px;border-radius:999px;padding:2px 7px;background:#f0ede7}
.bill-status.unpaid,.bill-entry.unpaid .bill-date,.bill-entry.unpaid .bill-amount,.bill-entry-status.unpaid{color:#b42318}
.bill-entry-status.unpaid{background:#fef0ee}
.bill-entry.unpaid{border-left:3px solid #b42318}
.bill-name{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.bill-entry .bf{font-size:12px}
.bill-property .bill-category{padding:14px 16px}
.bill-status-group:first-child{margin-top:0;border-top:0;padding-top:0}
@media(max-width:600px){
 .bill-property{padding:14px 12px}
 .bill-property .bill-category{padding:12px 10px}
 .bill-entry{padding:10px 8px}
 .bill-entry .bf{gap:8px;flex-wrap:wrap}
 .bill-entry .bf-v{overflow-wrap:anywhere}
}

/* Shared dashboard typography: section > property > nested title > detail > metadata. */
.prop-block .pb-code,.bill-level-1 .th-title{font-size:20px}
.tenancy-head:not(.bill-head) .th-title,.bill-level-2 .th-title{font-size:17px;line-height:1.45}
.data-updated,.bill-snapshot{font-size:11.5px;font-weight:400;line-height:1.5;color:var(--muted)}
.bill-snapshot{margin:-8px 0 14px}
.bill-head{min-height:32px}
.bill-entry .tc-docs{display:flex;flex-wrap:wrap;gap:8px}


.bill-payment{margin-top:8px;padding-top:6px;border-top:1px solid var(--line)}
.bill-payment .bill-head .th-title{font-size:12px;color:var(--muted);font-weight:500}

/* Bill overview: status counts and direct property shortcuts. */
.bill-overview{margin:0 0 18px;padding:12px 14px;background:var(--bg);border:1px solid var(--line);border-radius:8px}
.bill-overview-row{display:flex;align-items:baseline;gap:10px;font-size:12px;line-height:1.6}
.bill-overview-row + .bill-overview-row{margin-top:8px}
.bill-overview-row strong{font-size:13px;white-space:nowrap;min-width:72px}
.bill-overview-row.unpaid{color:#b42318}
.bill-overview-links{display:flex;flex-wrap:wrap;gap:4px 10px;min-width:0}
.bill-jump{font:inherit;color:inherit;border:0;background:none;padding:3px 0;cursor:pointer;text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere}
.bill-jump span{color:var(--muted);text-decoration:none}
.bill-property{scroll-margin-top:160px}
@media(max-width:600px){.bill-overview-row{align-items:flex-start;gap:8px}.bill-overview-row strong{min-width:65px}.bill-overview{padding:10px}}


.bill-range{font-size:11.5px;font-weight:400;line-height:1.5;color:var(--muted);margin:0 0 4px}
.bill-range + .bill-snapshot{margin-top:0}


.bill-range{margin-bottom:14px}.bill-range .bill-snapshot{margin:0;font:inherit;color:inherit}


/* Portal data typography: preserve business data and source identifiers. */
.wrap.ldm-content{--portal-font:"canada-type-gibson","Helvetica Neue",Arial,sans-serif;--font-display:var(--portal-font);--font-body:var(--portal-font)}
html[lang="zh-CN"] .wrap.ldm-content{--portal-font:"canada-type-gibson","Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif}
html[lang="th"] .wrap.ldm-content{--portal-font:"canada-type-gibson","Noto Sans Thai",Thonburi,"Leelawadee UI",sans-serif}
.wrap.ldm-content,.wrap.ldm-content :is(h1,h2,h3,h4,p,button,.kv,.bank-line,.pb-code,.code,.tc-title,.th-title,.gpc-title,.group-title){font-family:var(--portal-font)!important}
.wrap.ldm-content :is(h1,h2,h3,h4,button,.panel-title,.gpc-title,.th-title) span{font-family:inherit!important}
.wrap.ldm-content .panel-title{font-size:20px!important;font-weight:400!important;line-height:1.45!important;text-transform:none!important;letter-spacing:0}
.wrap.ldm-content .info-card h3{font-size:16px!important;font-weight:600!important;line-height:1.5!important;text-transform:none!important}
.wrap.ldm-content .info-card .kv{font-size:15px;line-height:1.65}
.wrap.ldm-content .info-card .kv :is(.k,.v,.bank-line){font-size:15px;font-weight:400;line-height:1.65}
.wrap.ldm-content .bank-line{white-space:normal;overflow-wrap:anywhere}
.wrap.ldm-content :is(.prop-block .pb-code,.prop-item .code){font-size:18px!important;font-weight:600!important;line-height:1.5;letter-spacing:0}
.wrap.ldm-content :is(.tc-title,.th-title,.gpc-title,.group-title){font-size:16px!important;font-weight:600!important;line-height:1.5!important;letter-spacing:0;text-transform:none!important}
.wrap.ldm-content :is(.prop-item .addr,.pb-addr,.tc-sub){font-size:15px;line-height:1.65}
.wrap.ldm-content .tenancy-grid .tg .k{font-size:13px;line-height:1.5;text-transform:none;letter-spacing:0}
.wrap.ldm-content .tenancy-grid .tg .v{font-size:15px;font-weight:400;line-height:1.65}
.wrap.ldm-content .badge{font-size:13px;font-weight:400;line-height:1.5;text-transform:none;letter-spacing:0}

/* Keep Latin glyphs identical across language modes throughout portal data. */
.wrap.ldm-content,.wrap.ldm-content *{font-family:var(--portal-font)!important}

/* Match bill summary roles across desktop, mobile and language modes. */
.wrap.ldm-content .bill-overview-row{font-size:15px;line-height:1.6;align-items:baseline}
.wrap.ldm-content .bill-overview-row strong{font-size:15px!important;font-weight:600!important;line-height:1.6;min-width:0;flex:0 0 auto}
.wrap.ldm-content .bill-jump{font-size:15px!important;font-weight:400!important;line-height:1.6!important}
.wrap.ldm-content .bill-range{font-size:13px!important;font-weight:400!important;line-height:1.6!important}


/* Bills: independent filters and a flat, responsive record list. */
.bill-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.bill-filter-label{display:flex;flex-direction:column;gap:6px;font-size:13px;min-width:0}
.bill-filter-label select{width:100%;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:6px;padding:8px;background:#fff;color:var(--ink);font:inherit;font-size:16px}
.bill-filter-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;font-size:13px}
.bill-filter-reset,.bill-status-filter{background:none;border:0;color:inherit;cursor:pointer;padding:5px 0;font:inherit}
.bill-status-filter{font-size:15px;font-weight:600;white-space:nowrap;flex-shrink:0}
.bill-status-filter[aria-pressed=true]{text-decoration:underline;text-underline-offset:4px}
.bill-filter-reset{text-decoration:underline}
.bill-record[hidden]{display:none!important}

/* Administrator landlord picker: consistent text roles, not bold button labels. */
.wrap.ldm-content .ll-card{font-weight:400;line-height:1.6}
.wrap.ldm-content .ll-card .ll-name{font-size:15px!important;font-weight:600!important;letter-spacing:0;max-width:100%;overflow-wrap:anywhere}
.wrap.ldm-content .ll-card :is(.ll-meta,.ll-codes){font-size:13px!important;font-weight:400!important;line-height:1.6;letter-spacing:0}
.wrap.ldm-content .ll-card .ll-codes{overflow-wrap:anywhere}
.wrap.ldm-content .ll-card .ll-count{font-size:15px;font-weight:400}


.bill-show-more{display:block;margin:18px auto 0;padding:10px 22px;border:1px solid var(--line);border-radius:6px;background:white;color:var(--ink);font:inherit;cursor:pointer;min-height:44px}
.bill-show-more[hidden]{display:none!important}

/* Match the button-based tenancy export to the Float download link. */
.wrap.ldm-content .dl-btn{background:#fff!important;color:#167347!important;border:1px solid #167347!important;font-size:14px!important;font-weight:400!important;line-height:1!important;padding:0 14px!important;height:40px;border-radius:999px!important;box-shadow:none!important}
.wrap.ldm-content .dl-btn:hover{background:#eaf5ef!important;color:#10733f!important}
.wrap.ldm-content .dl-btn span{font-size:inherit!important;font-weight:inherit!important;color:inherit!important}

/* Page-level return actions share one predictable row above the heading. */
.portal-return-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 20px;}
.portal-return-row .ldm-back{flex:0 0 auto;margin:0;}
@media(max-width:600px){.portal-return-row{gap:8px;margin-bottom:16px;}}

/* Shared portal action and data freshness presentation, 2026-10-30. */
#auth #sendBtn,#auth #verifyBtn{min-height:44px;padding:10px 18px;border:1px solid #181818;border-radius:8px;background:#181818;color:#fff;font:inherit;font-size:15px;font-weight:400;line-height:1.4;box-shadow:none}
#auth #sendBtn:hover:not(:disabled),#auth #verifyBtn:hover:not(:disabled){background:#333;border-color:#333}
#auth #backBtn{min-height:44px;padding:10px 18px;border:1px solid #d8d8d3;border-radius:8px;background:#fff;color:#181818;font:inherit;font-size:15px;font-weight:400;line-height:1.4}
#auth #backBtn:hover{background:#f5f5f2;border-color:#aaa}
#auth button:focus-visible{outline:2px solid #b49a70;outline-offset:3px}
.portal-status-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 28px;min-width:0}
.portal-status-row .portal-return-row{margin:0;flex-shrink:0}
.portal-status-row .data-updated{margin:0 0 0 auto;font-size:13px;line-height:1.5;text-align:right;color:#746c62;font-weight:400}
@media(max-width:600px){.portal-status-row{align-items:flex-start;flex-wrap:wrap;gap:12px}.portal-status-row .data-updated{font-size:12px;max-width:100%}}

/* Michael 2026-11-11: data update time sits on the same line as the email, compact */
.hello .hello-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:6px 0 0}
.hello .hello-meta .data-updated{margin:0!important;font-size:12.5px;line-height:1.5;color:#8a8278;text-align:left;font-weight:400}
.hello .hello-meta .data-updated:not(:empty)::before{content:"·";margin-right:14px;color:#c9c1b5}
.hello .hello-meta .data-updated:empty{display:none}
@media(max-width:600px){.hello .hello-meta .data-updated{font-size:12px}}

/* ══ UI pass 2026-11-18 (Michael approved) ═══════════════════════════════════════════
   Type scale 13 / 15 / 16 / 20 / 28–36 · weights 400 / 600 · radii 6 / 10 / 999
   Buttons 36px desktop / 44px phone · pills 22px · ink #181818 / secondary #5a5551 / muted #746c62
   Visual only — markup hooks, filters and data rules are unchanged. */
:root{--ink:#181818;--ink-soft:#181818;--muted:#5a5551;--muted-2:#746c62;--btn-h:36px;--pill-h:22px}
@media(max-width:650px){:root{--btn-h:44px}}
body{color:var(--ink)}

/* ── Weights: 400 / 600 only ── */
.wrap.ldm-content :is(.btn,.otp-row input,.ll-count,.gpc-arrow,.group-back,.rl-period,.rl-status,.rl-row.total .rl-k,.rl-row.total .rl-v,.float-section-title,.txn-header,.doc .ic,.yield-ai,.rl-v.dim,.bill-payment .bill-head .th-title,.auth-card .kicker){font-weight:600}
.wrap.ldm-content :is(.yield-ai,.rl-v.dim,.bill-payment .bill-head .th-title){font-weight:400}

/* ── Radii: 6 / 10 / 999 only ── */
.wrap.ldm-content :is(.info-card,.prop-item,.remit-line,.bill-overview,.bank-card,.yield-cards>div,.yield-cost){border-radius:10px}
.wrap.ldm-content :is(.field input,#auth #sendBtn,#auth #verifyBtn,#auth #backBtn,.yield-ai,.yield-overview select){border-radius:6px}
.panel-title::before{border-radius:999px}
.wrap.ldm-content .t-tag{border-radius:999px}

/* ── Header / meta ── */
.dash-head .hello p,.hello .hello-meta{font-size:13px}
.hello .hello-meta .data-updated,.portal-status-row .data-updated{font-size:13px!important;color:var(--muted-2)}
.wrap.ldm-content :is(.logout,.group-dl,.group-back,.dl-btn,.expand-btn:not(.tenancy-head),.bill-show-more){min-height:var(--btn-h);height:auto!important;padding-top:0!important;padding-bottom:0!important;display:inline-flex;align-items:center;font-size:13px!important}
.wrap.ldm-content .dl-btn{height:var(--btn-h)!important}
.wrap.ldm-content .logout{padding:0 16px}
.wrap.ldm-content .expand-btn.tenancy-head{min-height:var(--btn-h)}
.wrap.ldm-content .expand-btn .plus{font-size:16px}
.wrap.ldm-content .tenancy-head .plus{font-size:20px}

/* ── Pills 22px ── */
.wrap.ldm-content :is(.badge,.rl-status,.t-tag,.yield-card-badge,.bill-pill){display:inline-flex;align-items:center;height:var(--pill-h);padding:0 10px;font-size:13px!important;line-height:1;border-radius:999px;white-space:nowrap}

/* ── Property & tenancy ── */
.wrap.ldm-content :is(.prop-block .pb-code,.prop-item .code){font-size:16px!important}
.wrap.ldm-content .doc{font-size:13px;border-radius:999px;min-height:var(--btn-h);padding:0 14px}
.wrap.ldm-content .doc .ic{color:#8a6a3f}
.wrap.ldm-content .rl-period{font-size:15px}
.wrap.ldm-content :is(.rl-date){font-size:13px;color:var(--muted-2)}
.wrap.ldm-content .rl-row{font-size:15px}
.wrap.ldm-content .rl-row.total{font-size:16px}
.wrap.ldm-content .rl-row.total .rl-v{font-size:20px}
.wrap.ldm-content .rl-row .rl-v.neg{color:#8a6a3f}
.wrap.ldm-content :is(.receipt-breakdown,.receipt-breakdown>summary,.receipt-breakdown .rl-row){font-size:13px}
.wrap.ldm-content .remit-line{border-radius:10px}

/* ── Rental yield (wording incl. the GPT‑6 Astra line unchanged) ── */
.wrap.ldm-content .yield-ai{font-size:13px!important;line-height:1.5;padding:1px 8px;color:var(--muted)}
.wrap.ldm-content .yield-overview>p{font-size:13px;color:var(--muted-2)}
.wrap.ldm-content .yield-overview select{font-size:15px;min-height:var(--btn-h);padding:0 10px}
.wrap.ldm-content .yield-gross-only .yield-cards strong{font-size:32px;line-height:1.2;font-weight:600}
.wrap.ldm-content .yield-card-note{font-size:13px;width:100%;color:var(--muted)}
.wrap.ldm-content .yield-card-note .yn-row{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.wrap.ldm-content .yield-card-note .yn-row b{font-size:20px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.wrap.ldm-content .yield-void{font-size:13px;opacity:1;color:var(--muted-2);margin-top:6px}
.wrap.ldm-content .yield-card-badge{background:#f2eadf;color:var(--muted)}
@media(max-width:820px){.wrap.ldm-content .yield-gross-only .yield-card{min-height:205px}}
@media(max-width:650px){.wrap.ldm-content .yield-gross-only .yield-cards strong{font-size:28px}}

/* ── Bills: list rows ── */
.wrap.ldm-content .bill-overview{background:#f6f5f2}
.wrap.ldm-content :is(.bill-status-filter,.bill-filter-reset,.bill-jump){min-height:var(--btn-h);display:inline-flex;align-items:center;padding-top:0;padding-bottom:0}
.wrap.ldm-content .bill-filter-label{font-size:13px;color:var(--muted)}
.wrap.ldm-content .bill-filter-label select{min-height:var(--btn-h);padding:0 8px;font-size:15px}
.wrap.ldm-content .bill-filter-toolbar{font-size:13px;margin-bottom:4px}
.wrap.ldm-content .bill-warning{font-size:13px;color:#7a5a1e}
.bill-list{border-top:1px solid var(--line)}
.wrap.ldm-content .bill-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 20px;margin:0;padding:12px 0 12px 12px;border:0;border-bottom:1px solid var(--line);border-left:3px solid transparent;border-radius:0;min-width:0}
.wrap.ldm-content .bill-row[hidden]{display:none!important}
.wrap.ldm-content .bill-row[data-status=unpaid]{border-left-color:#b42318}
.bill-row-main{min-width:0}
.bill-row-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 6px;font-size:15px;line-height:1.5;color:var(--ink)}
.bill-row-title strong{font-weight:600}
.bill-row-title .bill-sep{color:var(--muted-2)}
.bill-row-payee{margin-top:2px;font-size:13px;line-height:1.5;color:var(--muted-2);overflow-wrap:anywhere}
.bill-row-side{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:nowrap}
.bill-row-amount{min-width:92px;text-align:right;font-size:16px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
.bill-row-amount.unpaid{color:#b42318}
.wrap.ldm-content .bill-pill{background:#f0ede7;color:var(--muted)}
.wrap.ldm-content .bill-pill.unpaid{background:#fef0ee;color:#b42318}
.bill-row-docs{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.bill-dl{display:inline-flex;align-items:center;min-height:var(--btn-h);padding:0 14px;border:1px solid #d8d2c8;border-radius:999px;background:#fff;color:var(--ink);font-size:13px;line-height:1;white-space:nowrap;text-decoration:none}
.bill-dl:hover,.bill-dl:focus-visible{border-color:var(--gold);background:#fbf7f2}
.bill-nodoc{font-size:13px;color:var(--muted-2);white-space:nowrap}
.wrap.ldm-content .bill-row .bill-payment{grid-column:1/-1;margin:2px 0 0;padding-top:4px;border-top:0}
.wrap.ldm-content .bill-row .bill-head .th-title{font-size:13px!important;color:var(--muted)}
.wrap.ldm-content .bill-row .bf{font-size:15px}
.wrap.ldm-content .bill-show-more{border-radius:999px;padding:0 22px;margin-top:16px}
@media(max-width:650px){
  .wrap.ldm-content .bill-filters{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
  .wrap.ldm-content .bill-filter-label select{font-size:16px}
  .wrap.ldm-content .bill-row{grid-template-columns:minmax(0,1fr);padding:10px 0 10px 10px}
  .bill-row-side{justify-content:flex-start;gap:10px;flex-wrap:wrap}
  .bill-row-amount{min-width:0;text-align:left}
  .bill-row-docs{margin-left:auto}
}

/* ── Float ── */
.wrap.ldm-content .float-balance .fb-val{font-size:36px}
.wrap.ldm-content .float-balance .fb-sub{font-size:13px;color:var(--muted-2)}
.wrap.ldm-content .txn-header{font-size:13px;letter-spacing:0;text-transform:none}
.wrap.ldm-content .float-txns .txn{font-size:15px}
.wrap.ldm-content .float-txns .txn :is(.t-date,.t-bal){font-size:13px}
.wrap.ldm-content .t-tag{font-weight:400}
@media(max-width:768px){.wrap.ldm-content .float-balance .fb-val{font-size:32px}}

/* ── Admin picker / misc sizes on the scale ── */
.wrap.ldm-content :is(.ll-card .ll-codes,.ll-card .ll-meta,.gp-hint,.gpc-codes,.bank-card,.wip,.hint,.err,.auth-card .kicker){font-size:13px!important}
.wrap.ldm-content :is(.gpc-title,.group-title,.ll-card .ll-arrow,.gpc-arrow){font-size:20px!important}
.wrap.ldm-content .auth-card .lead{font-size:15px}
.wrap.ldm-content .otp-row input{font-size:20px}

/* ── Personal: phone shows names only; tap to reveal UTR / bank ── */
.personal-toggle{display:none}
@media(max-width:650px){
  .wrap.ldm-content .personal-cards{gap:8px}
  .wrap.ldm-content .personal-card{padding:0 14px}
  .personal-toggle{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;margin:0;padding:0;border:0;background:none;color:var(--ink);font-size:15px;text-align:left;cursor:pointer}
  .personal-toggle .plus{width:16px;text-align:center;font-size:20px;line-height:1;color:#8a6a3f}
  .personal-toggle .pt-name{font-weight:600;min-width:0;overflow-wrap:anywhere}
  .personal-toggle .pt-hint{margin-left:auto;font-size:13px;color:var(--muted-2);white-space:nowrap}
  .personal-card .kv{display:none!important}
  .personal-card.open .kv{display:grid!important;padding:0 0 12px}
  .personal-card .pn-row{display:none}
}
@media(min-width:651px){.bill-row-docs{min-width:204px}}
@media(max-width:650px){.bill-row-title .bill-sep-period{display:none}.bill-row-title .bill-period{flex-basis:100%}}
/* Phone header: Sign out sits beside the greeting instead of on its own row. */
@media(max-width:650px){
  .wrap.ldm-content #dash .dash-head{flex-wrap:nowrap;align-items:flex-start;gap:12px;margin-bottom:16px}
  .wrap.ldm-content #dash .dash-head .hello{min-width:0;flex:1}
  .wrap.ldm-content #dash .dash-head .hello h1{font-size:28px!important;line-height:1.25}
  .wrap.ldm-content #dash .dash-actions{flex:none}
}

/* 2026-11-18 Michael: bills go back to the original card grid (the one-row list was too long); fonts/tokens stay. */
.doc { font-size: 12.5px; color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 11px; background: #fff; display: inline-flex; align-items: center; gap: 6px; }
.doc:hover { border-color: var(--gold); background: #fbf4ec; }
.doc .ic { color: #b08a5a; font-weight: 700; width: auto; height: auto; }
.remit-line { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.bill-fields { display: flex; flex-direction: column; }
/* Bills reuse tenancy cards, expansion buttons and PDF links. */
.bill-head .th-title{min-width:0;overflow-wrap:anywhere}
.bill-entry-status{font-size:11px;border-radius:999px;padding:2px 7px;background:#f0ede7}
.bill-status.unpaid,.bill-entry.unpaid .bill-date,.bill-entry.unpaid .bill-amount,.bill-entry-status.unpaid{color:#b42318}
.bill-entry-status.unpaid{background:#fef0ee}
.bill-entry.unpaid{border-left:3px solid #b42318}
.bill-name{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.bill-entry .bf{font-size:12px}
@media(max-width:600px){
 .bill-property{padding:14px 12px}
 .bill-property .bill-category{padding:12px 10px}
 .bill-entry{padding:10px 8px}
 .bill-entry .bf{gap:8px;flex-wrap:wrap}
 .bill-entry .bf-v{overflow-wrap:anywhere}
}
.tenancy-head:not(.bill-head) .th-title,.bill-level-2 .th-title{font-size:17px;line-height:1.45}
.bill-head{min-height:32px}
.bill-entry .tc-docs{display:flex;flex-wrap:wrap;gap:8px}
/* Paid bills: one compact record line, no nested card or disclosure. */
.bill-paid-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:12.5px;min-width:0}
.bill-paid-row:last-child{border-bottom:0}
.bill-paid-date{white-space:nowrap}
.bill-paid-amount{margin-left:auto;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:600}
.bill-paid-docs{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.bill-paid-docs .doc{padding:4px 6px;margin:0;font-size:11px;min-height:28px;display:inline-flex;align-items:center}
@media(max-width:600px){.bill-paid-row{gap:5px;font-size:11.5px}.bill-paid-row .bill-entry-status{font-size:10px;padding:2px 5px}}
.bill-summary{display:flex;align-items:center;gap:8px;font-size:12.5px;flex-wrap:wrap}
.bill-summary .bill-name{margin:0;font-size:12px}
.bill-summary .bill-date{white-space:nowrap}
.bill-summary-docs{display:flex;gap:4px;flex-wrap:wrap}
.bill-summary-docs .doc{margin:0;padding:4px 6px;min-height:28px;display:inline-flex;align-items:center;font-size:11px}
.bill-payment{margin-top:8px;padding-top:6px;border-top:1px solid var(--line)}
.bill-payment .bill-head .th-title{font-size:12px;color:var(--muted);font-weight:500}
@media(max-width:600px){.bill-summary .bill-name{order:5;flex-basis:100%;font-size:11.5px}.bill-summary{font-size:11.5px;gap:5px}}
/* Keep paid invoice subitem names visible, including on narrow screens. */
.bill-paid-name{min-width:0;overflow-wrap:anywhere;font-size:12px}
@media(max-width:600px){.bill-paid-row{flex-wrap:wrap}.bill-paid-name{order:5;flex-basis:100%;font-size:11.5px}}
.bill-paid-docs,.bill-summary-docs{min-width:0;max-width:100%}
.bill-paid-docs .doc,.bill-summary-docs .doc{max-width:100%;white-space:normal}
.bill-paid-row{flex-wrap:wrap}
/* Keep sibling bill summaries aligned regardless of payment-details disclosure. */
.bill-status-group .bill-entry{position:relative;padding:8px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}
.bill-status-group .bill-entry:last-child{border-bottom:0}
.bill-status-group .bill-entry.unpaid::before{content:"";position:absolute;left:-7px;top:8px;bottom:8px;width:3px;border-radius:2px;background:#b42318}
.bill-status-group .bill-payment{margin-left:12px}
.wrap.ldm-content .bill-property :is(.tenancy-body,.bill-paid-row,.bill-summary,.bill-entry){min-width:0;max-width:100%}
.wrap.ldm-content :is(.bill-paid-docs,.bill-summary-docs){min-width:0;max-width:100%;flex:0 1 100%;justify-content:flex-start}
.wrap.ldm-content :is(.bill-paid-docs,.bill-summary-docs) .doc{min-width:0;max-width:100%;white-space:normal}
.wrap.ldm-content :is(.bill-paid-row,.bill-summary,.bill-paid-name,.bill-summary .bill-name){font-size:13px;line-height:1.6}
.bill-record{padding:14px;margin:12px 0;border:1px solid var(--line);border-radius:8px;min-width:0;overflow-wrap:anywhere}
.bill-record[hidden]{display:none!important}
.bill-record-heading{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:15px;line-height:1.6;margin-bottom:8px}
.bill-record-heading strong{font-weight:600}
.bill-record .bill-entry{border:0;padding:0;border-radius:0}
.bill-record[data-status=unpaid]{border-left:3px solid #b42318}
.bill-record .bill-paid-row{border:0;padding:0}
.bill-record .bill-payment{margin-left:0;margin-top:10px}
.bill-record .bill-name,.bill-record .bill-paid-name{flex-basis:100%;order:0}
.bill-record .bill-entry-status{font-size:13px!important}
.bill-record .bill-fields{min-width:0}
.bill-record .bf-v{overflow-wrap:anywhere;min-width:0}
@media(max-width:600px){.bill-filters{grid-template-columns:1fr;gap:10px}.bill-record{padding:12px}}
/* Bill cards: three columns desktop, two tablet, one phone. */
.bill-record-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}
.bill-record-grid .bill-record{margin:0;min-width:0}
.bill-record-grid .bill-entry,.bill-record-grid .bill-summary,.bill-record-grid .bill-paid-row{min-width:0;max-width:100%}
@media(max-width:1000px){.bill-record-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.bill-record-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.bill-record-grid{gap:10px}.bill-record-grid .bill-record{padding:10px 12px}.bill-record-heading{margin-bottom:5px}.bill-record .bill-payment{margin-top:6px}.bill-record .bill-paid-amount,.bill-record .bill-amount{font-size:15px;font-weight:600}}
/* Michael 2026-11-11: amount on the type line; date line = billing period */
.bill-record-heading{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
.bill-record-heading .bill-head-amount{margin-left:auto;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;color:#181818}
.bill-record-heading .bill-head-amount.unpaid{color:#b42318}
.bill-period{white-space:normal!important}
.bill-summary .bill-name,.bill-paid-row .bill-paid-name{flex-basis:100%;order:5}

/* 19/11/2026 Michael: phone = the two "In progress" cards swipe sideways (desktop unchanged: wrapper is display:contents) */
.yield-soon-row{display:contents}
.yield-soon-row>.yield-card{padding:16px;background:#faf8f5;border:1px solid #e9dfd4;border-radius:10px;min-width:0}
@media(max-width:820px){
.yield-gross-only .yield-cards>.yield-soon-row{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding:0 0 4px;margin:0;background:none;border:0;border-radius:0;scrollbar-width:none}
.yield-soon-row::-webkit-scrollbar{display:none}
.yield-soon-row>.yield-card{flex:0 0 78%;scroll-snap-align:start;min-height:0!important;padding:12px 16px}
.wrap.ldm-content .yield-gross-only .yield-soon-row .yield-card{min-height:0}
.yield-soon-row .yield-chart-svg{max-width:84px}
}

/* Login audit log (2026-11-21): desktop = table; phones = one card per login */
.log-table{width:100%;border-collapse:collapse;font-size:13px}
.log-table th{text-align:left;padding:6px 8px;border-bottom:2px solid #ddd}
.log-table td{padding:6px 8px;border-bottom:1px solid #eee;word-break:break-word;vertical-align:top}
.log-table .lg-ipmeta{color:#666;font-size:13px}
@media(max-width:700px){
  .log-table,.log-table tbody{display:block;width:100%}
  .log-table thead{display:none}
  .log-table tr{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin:0 0 8px;background:#fff}
  .log-table td{display:block;padding:0;border:0;word-break:normal;overflow-wrap:anywhere;line-height:1.45}
  .log-table td.lg-empty{display:none}
  .log-table .lg-time{order:1;flex:1 1 auto;font-weight:600}
  .log-table .lg-result{order:2;font-weight:600}
  .log-table .lg-email{order:3;width:100%}
  .log-table .lg-role{order:4;color:var(--muted);font-size:12px}
  .log-table .lg-method{order:5;color:var(--muted);font-size:12px}
  .log-table .lg-method::before{content:"·";margin-right:6px}
  .log-table .lg-reason{order:6;width:100%;color:#b42318;font-size:12px}
  .log-table .lg-ip{order:7;width:100%;font-size:12px;color:var(--muted)}
  .log-table .lg-ip>br{display:none}
  .log-table .lg-ip .lg-ipmeta{font-size:12px}
  .log-table .lg-ipmeta::before{content:" · "}
}
