: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; overflow-x: clip; }
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: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
html[lang="th"] body { font-family: "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: "Noto Sans SC", "Noto Sans Thai", "PingFang SC", sans-serif;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* ── 顶栏（与 LDM 官网一致：深黑 + 金色）── */
.top-bar { background: var(--dark); color: #fff; position: sticky; top: 0; z-index: 200; }
.top-bar .in {
  max-width: 1000px; margin: 0 auto; padding: 8px 20px;
  display: flex; align-items: center; justify-content: flex-end; gap: 18px;
  font-size: 13px;
}
.top-bar a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.top-bar a:hover { color: var(--gold); }
.tb-line { white-space: nowrap; font-size: 13px; font-weight: 500; }
.ic { width: 14px; height: 14px; flex: none; }
.tb-contact { display: inline-flex; align-items: center; gap: 16px; }
.lang-seg { display: inline-flex; align-items: center; gap: 2px;
  border: 1.5px solid var(--gold); border-radius: 999px; padding: 3px; flex: none; }
.lang-seg button { border: none; background: transparent; color: var(--gold);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); line-height: 1.4; }
.lang-seg button[aria-checked="true"] { background: var(--gold); color: var(--dark); }
.lang-seg button:not([aria-checked="true"]):hover { background: rgba(219,181,147,.18); }

/* ── 导航（白底 + logo，max-width 1000px 与官网一致）── */
.site-nav { background: #fff; border-bottom: 1px solid #e7e7e7; position: sticky; top: var(--ldm-tbh, 38px); z-index: 100; }
.site-nav .in { max-width: 1000px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img.logo { width: 150px; height: auto; display: block; padding: 4px 0 8px 0; }
.menu { display: flex; align-items: center; gap: 0; }
.menu a { font-family: var(--font-body); font-size: 14px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink); line-height: 50px; padding: 0 20px; white-space: nowrap; }
html[lang="zh-CN"] .menu a { font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 14px; }
html[lang="th"] .menu a { font-family: "Noto Sans Thai", "Tahoma", sans-serif; font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 14px; }
.menu a:hover { color: #606060; }
.menu a.joinus { color: var(--dark); background: var(--gold); font-weight: 700;
  border-radius: 999px; padding: 3px 14px; line-height: 1.25; letter-spacing: .06em; }
.menu a.joinus:hover { background: var(--gold-2); color: var(--dark); }
.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px 4px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--dark); margin: 5px 0; border-radius: 2px; }

/* ── 手机全屏菜单（与 LDM .m-nav 一致）── */
.m-nav { position: fixed; inset: 0; z-index: 2002;
  background: linear-gradient(160deg, #181818 0%, #0d0d0d 100%);
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 30px 48px; text-align: left;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s; }
.m-nav.open { opacity: 1; visibility: visible; pointer-events: auto; }
.m-nav-links { display: flex; flex-direction: column; max-height: 68vh; overflow-y: auto; }
.m-nav-links a { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400;
  letter-spacing: .03em; color: #fff; padding: 14px 4px;
  display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,.09); }
.m-nav-links a::before { content: ""; flex: none; width: 9px; height: 9px;
  border-radius: 2px; background: #DBB593; opacity: .85; }
html[lang="zh-CN"] .m-nav-links a, html[lang="th"] .m-nav-links a {
  font-family: "Noto Sans SC", "Noto Sans Thai", sans-serif; font-weight: 600; letter-spacing: 0; }
.m-nav-links a.joinus { color: var(--dark); background: var(--gold); border-bottom: none;
  border-radius: 999px; justify-content: center; margin-top: 18px; font-weight: 700; }
.m-nav-links a.joinus::before { display: none; }
.m-nav-close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px;
  background: none; border: none; cursor: pointer; z-index: 2001; padding: 0; }
.m-nav-close::before, .m-nav-close::after { content: ""; position: absolute; left: 50%; top: 50%;
  width: 28px; height: 2px; background: #fff; border-radius: 2px; }
.m-nav-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.m-nav-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ── 主体 ── */
.wrap { max-width: 1000px; margin: 0 auto; padding: 34px 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; }
.panel-title .dl-btn { 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; }
.panel-title .dl-btn:hover { background: var(--gold); color: var(--dark); }
.panel-title .dl-btn:disabled { opacity: .55; cursor: wait; }

/* ① 个人信息 + 房产 */
.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 { transform: rotate(45deg); }

/* 租约折叠头（全宽，覆盖 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; }
.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-card { background: #fafaf8; border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 12px; }
.bill-cat { font-family: var(--font-display); font-size: 19px; color: #b08a5a;
  letter-spacing: .04em; margin-bottom: 12px; }
html[lang="zh-CN"] .bill-cat, html[lang="th"] .bill-cat {
  font-family: "Noto Sans SC", "Noto Sans Thai", sans-serif; font-weight: 700; }
.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-total { margin-top: 12px; padding: 12px 4px; font-size: 16px; font-weight: 700;
  color: var(--ink); border-top: 2px solid var(--gold); }
.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; }
.excel-dl-btn { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 20px; border: 1px solid #1d7a40; color: #1d7a40; font-size: 13px; font-weight: 500; text-decoration: none; background: #f2faf5; white-space: nowrap; }
.excel-dl-btn:hover { background: #d8f0e4; }
.float-txns { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 6px; }
.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: 10px 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); word-break: break-word; flex: 1; min-width: 0; }
.float-txns .txn .t-amt { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.float-txns .txn .t-date { color: var(--muted); font-size: 12px; margin-right: 6px; 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: 5px; margin-top: 4px; 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; }

/* ── 页脚（深黑 + 金色 + 伦敦电话亭背景图，与官网一致）── */
.site-footer {
  background-color: var(--dark);
  background-image: url('/vvip/phonebox.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 400px 50%;
  color: #fff;
  margin-top: 30px;
}
.site-footer .in { max-width: 1000px; margin: 0 auto; padding: 38px 20px; }
.site-footer h2 { font-size: 30px; font-weight: 800; text-transform: uppercase; margin: 0 0 12px; color: var(--gold); font-family: "canada-type-gibson", "Helvetica Neue", Arial, "Noto Sans SC", "Noto Sans Thai", sans-serif; }
.site-footer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.site-footer p { margin: 5px 0; font-size: 14px; color: #cfcfcf; line-height: 1.7; font-family: "canada-type-gibson", "Helvetica Neue", Arial, "Noto Sans SC", "Noto Sans Thai", sans-serif; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.site-footer .legal { border-top: 1px solid var(--hairline); margin-top: 28px; padding-top: 18px;
  font-size: 11.5px; color: #9c9c9c; line-height: 1.8; text-align: center; }
.site-footer .copyright-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; font-size: 14px; font-family: "canada-type-gibson", "Helvetica Neue", Arial, "Noto Sans SC", "Noto Sans Thai", sans-serif; }
.site-footer .copyright-bar a { color: #fff; }
.site-footer .copyright-bar a:hover { color: var(--gold); }
.site-footer .bar-sep { color: #656565; }
.site-footer .foot-reg { margin: 12px auto 0; font-size: 14px; color: #9c9c9c; line-height: 1.7; }

.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) {
  .top-bar .in { justify-content: space-between; padding: 7px 12px; gap: 8px; flex-wrap: nowrap; }
  .top-bar .tb-line { font-size: 12px; }
  .tb-contact { flex-direction: column; align-items: flex-start; gap: 3px; }
  .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; }
  .top-bar .lang-seg { margin-left: auto; flex: none; }
  .top-bar .lang-seg button { padding: 3px 7px; font-size: 11px; }
  .menu { display: none; }
  .burger { display: block; }
  .info-grid { grid-template-columns: 1fr; }
  .tenancy-grid { grid-template-columns: 1fr 1fr; }
  .brand img.logo { width: 110px; }
  .auth-card { padding: 28px 22px; }
  .dash-head .hello h1 { font-size: 26px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 18px; }
  .float-balance .fb-val { font-size: 34px; }
}

/* 语言显隐 */
.en { display: inline; }
.zh { display: none; }
.th { display: none; }
html[lang="zh-CN"] .zh { display: inline; }
html[lang="zh-CN"] .en { display: none; }
html[lang="zh-CN"] .th { display: none; }
html[lang="th"] .th { display: inline; }
html[lang="th"] .en { display: none; }
html[lang="th"] .zh { display: none; }

/* 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}

/* 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}}

/* 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}}

/* 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-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-file-name{font-size:11px;overflow-wrap:anywhere;min-width:0;margin-left: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}

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

/* 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}
