/* 漢盛園區 台账系统 —— 界面样式（屏幕端） */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* hidden 属性必须压过 .login-wrap{display:flex} 这类作者样式，
   否则用 el.hidden 切换视图会失效（登录后登录卡片不消失） */
[hidden] { display: none !important; }

:root {
  --ink: #1f2430;
  --ink-2: #5b6474;
  --line: #dfe3ea;
  --line-2: #eef1f6;
  --bg: #f4f6f9;
  --brand: #1f4e79;
  --brand-2: #2e6da4;
  --gold: #b8860b;
  --red: #c0392b;
  --green: #1e7a46;
  --radius: 8px;
}

body {
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }
input, select { font-family: inherit; font-size: 14px; color: var(--ink); }

/* ================= 登录 ================= */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1f4e79 0%, #12304c 55%, #0d2235 100%);
}
.login-card {
  width: 360px;
  background: #fff;
  border-radius: 12px;
  padding: 34px 32px 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.login-card h1 {
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--brand);
  font-weight: 700;
}
.login-card h1 span {
  display: block;
  font-size: 14px;
  letter-spacing: 6px;
  color: var(--ink-2);
  font-weight: 400;
  margin-top: 6px;
}
.login-tip { font-size: 12px; color: #98a1b0; margin: 14px 0 22px; }
.login-card label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
.login-card label input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login-card label input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(46, 109, 164, .12); }
.login-err { color: var(--red); font-size: 13px; height: 18px; margin-top: 10px; text-align: center; }

/* ================= 布局 ================= */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 208px;
  flex: 0 0 208px;
  background: #12293f;
  color: #c7d3e0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 20px 18px 16px;
  font-size: 17px;
  letter-spacing: 2px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand small { display: block; font-size: 11px; letter-spacing: 4px; color: #7d93a8; margin-top: 5px; }

#nav { flex: 1; overflow-y: auto; padding: 10px 8px; }
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #c7d3e0;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: var(--brand-2); color: #fff; font-weight: 600; }
.nav-item .soon {
  font-size: 10px;
  color: #7d93a8;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1.4;
}
.nav-item.active .soon { color: #dbe8f5; border-color: rgba(255, 255, 255, .4); }
.nav-group {
  font-size: 11px;
  color: #63798d;
  letter-spacing: 2px;
  padding: 14px 12px 6px;
}
.sidebar-foot {
  padding: 12px 18px;
  font-size: 11px;
  color: #5d7286;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 54px;
  flex: 0 0 54px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.crumb { font-size: 15px; font-weight: 600; color: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); }
.who { color: var(--ink); }
button.link {
  background: none;
  border: none;
  color: var(--brand-2);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}
button.link:hover { text-decoration: underline; }

#view { padding: 18px 20px 40px; }

/* ================= 通用组件 ================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head h2 { font-size: 18px; font-weight: 600; }
.page-head .sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.toolbar label { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.toolbar input[type="month"], .toolbar input[type="text"], .toolbar select {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  background: #fff;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--brand-2); }
.toolbar .spacer { flex: 1; }

.btn {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}
.btn:hover { background: #f2f5f9; border-color: #c9d2de; }
.btn.primary { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.primary:hover { background: #275d8d; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #e8c3bf; }
.btn.block { width: 100%; padding: 11px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.chip {
  display: inline-block;
  font-size: 12px;
  padding: 1px 7px;
  border-radius: 10px;
  background: #eef2f7;
  color: var(--ink-2);
  line-height: 1.7;
}
.chip.ok { background: #e6f4ec; color: var(--green); }
.chip.warn { background: #fdf1e2; color: #a8680a; }
.chip.gray { background: #f0f2f5; color: #8b94a3; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat .k { font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.stat .v { font-size: 24px; font-weight: 700; font-family: "Times New Roman", Times, serif; letter-spacing: .5px; }
.stat .v small { font-size: 12px; font-weight: 400; color: var(--ink-2); margin-left: 4px; font-family: inherit; }
.stat.accent { border-left: 3px solid var(--brand-2); }

/* 空态 */
.empty {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 20px;
  text-align: center;
  color: #98a1b0;
}
.empty strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 8px; font-weight: 600; }

/* ================= 电费 / 水费录入 ================= */
.bill-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.bill-card.dirty { border-color: #f0c987; box-shadow: 0 0 0 3px rgba(240, 201, 135, .18); }

.bill-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line-2);
}
.bill-head .cust { flex: 1; min-width: 240px; }
.bill-head .cust input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
}
.bill-head .cust input:hover { border-color: var(--line); background: #fff; }
.bill-head .cust input:focus { border-color: var(--brand-2); background: #fff; outline: none; }
.bill-head .tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.bill-total {
  font-family: "Times New Roman", Times, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
  min-width: 110px;
  text-align: right;
}
.bill-total small { font-family: inherit; font-size: 11px; color: var(--ink-2); font-weight: 400; }

.bill-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bill-table th, .bill-table td {
  border-bottom: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  padding: 5px 8px;
  text-align: center;
  vertical-align: middle;
}
.bill-table th {
  background: #f7f9fc;
  font-weight: 600;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
}
.bill-table th .unit, .bill-table td .unit { display: block; font-size: 10px; color: #98a1b0; font-weight: 400; }
.bill-table td:first-child, .bill-table th:first-child { text-align: left; padding-left: 14px; width: 132px; white-space: nowrap; }
.bill-table tr:last-child td { border-bottom: none; }
.bill-table td:last-child, .bill-table th:last-child { border-right: none; }

.bill-table input.cell {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  text-align: center;
  padding: 4px 4px;
  border-radius: 4px;
  font-family: "Times New Roman", Times, serif;
  font-size: 13px;
}
.bill-table input.cell:hover { border-color: var(--line); background: #fff; }
.bill-table input.cell:focus { border-color: var(--brand-2); background: #fff; outline: none; box-shadow: 0 0 0 2px rgba(46, 109, 164, .1); }
.bill-table input.cell:read-only { color: #7a8494; }
.bill-table td.num { font-family: "Times New Roman", Times, serif; }
.bill-table td.ro { color: #7a8494; }
.bill-table .seg-tip { color: #b8860b; }
.bill-table td.money { text-align: right; padding-right: 14px; font-weight: 600; }

.param-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 14px;
  background: #fbfcfe;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--ink-2);
}
.param-row .p { display: flex; align-items: center; gap: 5px; }
.param-row input {
  width: 78px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  font-family: "Times New Roman", Times, serif;
}
.param-row input:focus { border-color: var(--brand-2); outline: none; }

.bill-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  flex-wrap: wrap;
  font-size: 13px;
}
.bill-foot .upper { color: var(--ink-2); font-size: 12px; }

/* ================= 档案表格 ================= */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
table.grid th { background: #f7f9fc; font-weight: 600; color: var(--ink-2); font-size: 12px; position: sticky; top: 0; }
table.grid tr:last-child td { border-bottom: none; }
table.grid td input, table.grid td select {
  width: 100%;
  min-width: 70px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
}
table.grid td input:hover, table.grid td select:hover { border-color: var(--line); background: #fff; }
table.grid td input:focus, table.grid td select:focus { border-color: var(--brand-2); background: #fff; outline: none; }
table.grid td.num { font-family: "Times New Roman", Times, serif; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 9px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  border-top: none; border-left: none; border-right: none;
}
.tab.active { color: var(--brand-2); border-bottom-color: var(--brand-2); font-weight: 600; }
.tab:hover { color: var(--brand); }

/* ================= Toast / Modal ================= */
#toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translate(-50%, 20px);
  background: rgba(23, 32, 46, .92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 999;
  max-width: 70vw;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: rgba(160, 40, 32, .94); }
#toast.ok { background: rgba(26, 106, 62, .94); }

.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 35, .5);
  z-index: 300;
  align-items: center;
  justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 10px;
  padding: 22px 24px;
  width: 340px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.modal label input {
  width: 100%;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
}
.modal label input:focus { border-color: var(--brand-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ================= 收据开具 ================= */
.rcpt-layout { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 14px; align-items: start; }
.rcpt-list { max-height: calc(100vh - 210px); }

.rcpt-grid tbody tr { cursor: pointer; }
.rcpt-grid tbody tr:hover td { background: #f7fafd; }
.rcpt-grid tbody tr.row-on td { background: #eaf2fa; box-shadow: inset 3px 0 0 var(--brand-2); }
.rcpt-grid .u1 { font-weight: 600; }
.rcpt-grid .u2 { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.rcpt-grid td.num { text-align: right; font-family: "Times New Roman", Times, serif; }
.rcpt-grid td.money { font-weight: 700; color: var(--red); }
.rcpt-grid .dim { color: #c3cad4; }

.rcpt-panel { min-width: 0; }
.panel-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 12px; }
.panel-head .p-title { font-size: 16px; font-weight: 600; }
.panel-head .p-sub { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.panel-head .grand { font-size: 13px; color: var(--ink-2); }
.panel-head .grand b { font-size: 20px; color: var(--red); font-family: "Times New Roman", Times, serif; margin: 0 2px; }
.panel-head .spacer, .slip-foot .spacer, .panel-foot .spacer { flex: 1; }

.line-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.line-row label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.line-row label.grow { flex: 1; min-width: 260px; }
.line-row input {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  min-width: 140px;
}
.line-row label.grow input { flex: 1; min-width: 0; width: 100%; }
.line-row input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(46, 109, 164, .1); }

.slip-block { border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; overflow: hidden; }
.slip-block.off { opacity: .72; border-style: dashed; }
.slip-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}
.slip-head .ck { display: flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.slip-off-tip { padding: 14px 12px; font-size: 12px; color: #98a1b0; }

.slip-items th, .slip-items td { padding: 5px 8px; }
.slip-items th:nth-child(1) { width: 30%; }
.slip-items th:nth-child(2) { width: 22%; }
.slip-items td input { padding: 5px 7px; }
.slip-items td input.num { font-family: "Times New Roman", Times, serif; text-align: right; }
.slip-items td.ops { width: 44px; text-align: center; }
.slip-items td.ops .btn { padding: 2px 8px; color: #98a1b0; }
.slip-items td.ops .btn:hover { color: var(--red); background: #fdf0ee; }

.slip-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fbfcfe; font-size: 13px; }
.slip-foot .tot b { font-family: "Times New Roman", Times, serif; font-size: 15px; margin: 0 2px; }

.panel-foot { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-foot .upper { font-size: 12px; color: var(--ink-2); }

/* ================= 租金 / 收银 / 电梯 / 税费 / 报表 ================= */
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
label.inline input, label.inline select { padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; background: #fff; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; }
.kpi .k-label { font-size: 12px; color: var(--ink-2); margin-bottom: 7px; }
.kpi .k-value { font-size: 21px; font-weight: 700; font-family: "Times New Roman", Times, serif; letter-spacing: .3px; }
.kpi .k-value.warn { color: #a8680a; }
.stat.accent-red { border-left: 3px solid var(--red); }
.pos { color: var(--green); }
.neg { color: var(--red); }
.owe { color: var(--red); }
.strong { font-weight: 700; }
.mono { font-family: Consolas, Menlo, monospace; font-size: 12.5px; }
.tiny { font-size: 11.5px; color: #7a8494; font-weight: 400; }
.ellipsis { max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.box-head strong { font-size: 14px; }
.table-wrap.inner { border: none; }
.empty.small { padding: 14px; font-size: 12.5px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; background: #f0f2f5; color: #8b94a3; white-space: nowrap; }
.tag.ok { background: #e6f4ec; color: var(--green); }
.tag.warn { background: #fdf1e2; color: #a8680a; }
.tag.danger { background: #fdeceb; color: var(--red); }

table.grid.compact th, table.grid.compact td { padding: 5px 7px; }
tr.bhead td { background: #f3f6fa; font-size: 12px; color: var(--ink-2); font-weight: 600; }
tr.bsum td { background: #fafbfd; font-weight: 600; }
tr.hl td { background: #f5f9ff; }
table.grid tfoot td { background: #fafbfd; font-weight: 600; }
table.grid td input.num { text-align: right; font-family: "Times New Roman", Times, serif; }

.btn.tiny { padding: 3px 9px; font-size: 12px; }
.link { background: none; border: none; color: var(--brand-2); cursor: pointer; font-size: 12.5px; padding: 0; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--red); }
.link-ok { color: var(--green) !important; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.form-grid label input, .form-grid label select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; background: #fff; color: var(--ink); }
.form-grid label input:focus, .form-grid label select:focus { border-color: var(--brand-2); outline: none; }
.form-grid label.full, .form-grid .full { grid-column: 1 / -1; }
.form-grid label.req { color: var(--ink); }
.form-grid label.req::first-line { font-weight: 600; }
.form-grid.form-inline { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin-bottom: 6px; }
.form-grid.form-inline label { flex: 1 1 130px; }

.calc-line { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.calc-line.total { border-bottom: none; border-top: 2px solid var(--line); margin-top: 6px; padding-top: 8px; font-size: 14px; }
.calc-line.total strong { font-family: "Times New Roman", Times, serif; font-size: 18px; color: var(--red); }

.bar-row { display: grid; grid-template-columns: 96px 1fr 96px; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 6px; }
.bar-label { color: var(--ink-2); }
.bar-track { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #5a9bd4, #2e6da4); }
.bar-fill.cost { background: linear-gradient(90deg, #d99b8c, #c0392b); }
.bar-value { text-align: right; font-family: "Times New Roman", Times, serif; }

.warn-box { margin-top: 10px; padding: 8px 10px; background: #fdf6e8; border: 1px solid #f0d9a8; border-radius: 5px; font-size: 12.5px; color: #8a6410; }

/* 顶部“别人改了数据”提示条：只提示，不自动刷新 */
.activity-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 22px; font-size: 12.5px; color: #8a6410;
  background: #fdf6e8; border-bottom: 1px solid #f0d9a8;
}
.activity-bar span:first-child { flex: 1; min-width: 200px; }
.activity-bar .link { color: #8a6410; }

/* 租金表：列多，给个最小宽度让内容不挤压；铺位名称允许换行 */
.rent-grid { min-width: 1020px; }
.rent-grid td.unit, .rent-grid td.tenant { white-space: normal; line-height: 1.35; }
.rent-grid td.tenant { color: var(--ink-2); }

/* ================= 响应式（手机端） ================= */
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: none;
    height: auto;
    position: static;
    flex-direction: column;
  }
  .brand { padding: 14px 16px; font-size: 15px; }
  #nav { display: flex; overflow-x: auto; padding: 8px; gap: 4px; }
  .nav-group { display: none; }
  .nav-item { margin-bottom: 0; white-space: nowrap; padding: 8px 12px; }
  .sidebar-foot { display: none; }
  #view { padding: 12px 12px 30px; }
  .bill-table { font-size: 12px; }
  .bill-table td:first-child, .bill-table th:first-child { padding-left: 8px; width: 96px; }
  .bill-table th, .bill-table td { padding: 4px 4px; }
  .param-row { gap: 6px 12px; }
  .rcpt-layout { grid-template-columns: 1fr; }
  .rcpt-list { max-height: none; }
  .line-row label.grow { min-width: 0; }
  .split-2 { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .bar-row { grid-template-columns: 76px 1fr 82px; }
  .ellipsis { max-width: 130px; }
}
