/* 金房管家 iguanjia 全局样式（适配 iPad Chrome） */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 淡青蓝主题：主色取略深的青蓝（保证白字对比度），浅色调用于背景与悬停 */
  --primary: #0d8196;
  --primary-dark: #0a6170;
  --primary-soft: #e3f5f9;
  --primary-outline: #a9e0ea;
  --danger: #d93025;
  --text: #1f2733;
  --text-light: #6b7280;
  --border: #d7e3e6;
  --bg: #f0f7f9;
  --card: #ffffff;
  --radius: 10px;
  /* 控件档微圆角：输入框/按钮/下拉/标签等（比卡片档更利落，与表格更协调） */
  --radius-sm: 6px;
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.mono { font-family: Consolas, Menlo, monospace; }
.strong { font-weight: 600; }

/* 顶栏 */
.topbar { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 28px; height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
.brand-logo { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.brand-logo svg { width: 62%; height: 62%; display: block; }
.brand-name { font-size: 19px; font-weight: 700; }
.brand-en { font-size: 12px; color: var(--text-light); letter-spacing: 1px; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav-item { padding: 6px 14px; border-radius: var(--radius-sm); color: var(--text-light); text-decoration: none; font-size: 14px; display: inline-flex; align-items: center; line-height: 1.4; }
.nav-item:hover:not(.disabled) { background: var(--primary-soft); color: var(--primary); }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item.disabled { opacity: .45; cursor: not-allowed; }

/* 下拉菜单（基础信息等） */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; }
.nav-dropdown-toggle[data-active="1"] { background: var(--primary); color: #fff; }
.nav-dropdown-toggle::after { content: "▾"; font-size: 11px; margin-left: 4px; opacity: .7; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 130px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 12px rgba(0,0,0,.1);
  padding: 4px 0; z-index: 20; flex-direction: column; gap: 0; }
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu-right { left: auto; right: 0; }
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; flex-shrink: 0; }
.nav-sub-item { display: block; padding: 7px 16px; color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav-sub-item:hover { background: var(--primary-soft); color: var(--primary); }
.nav-sub-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-sub-item.disabled { opacity: .45; cursor: not-allowed; }
.nav-sub-item.disabled:hover { background: none; color: var(--text); }
.nav-sub-sep { height: 0; margin: 5px 12px; border-top: 1px solid var(--border); }

/* 布局 */
.container { max-width: 1280px; width: 100%; margin: 0 auto; padding: 22px 20px 40px; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; }
.footer { text-align: center; color: var(--text-light); font-size: 12px; padding: 16px; }
.footer-sep { margin: 0 8px; opacity: 0.5; }
.footer-icp { color: inherit; text-decoration: none; }
.footer-icp:hover { text-decoration: underline; }

/* 提示条 */
.flash-area { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- 提醒看板：三行三列统一网格 ---------- */
.reminder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 行高随视口自适应：三行基本占满首屏（扣除页头/说明/页脚约 240px）；
     上限 260px 限定大屏下的最大卡高，下限 130px 兜底小窗口 */
  grid-auto-rows: clamp(130px, calc((100vh - 240px) / 3), 260px);
  gap: 16px;
}
.reminder-grid .grid-cell {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 网格内不允许卡片外边距：所有卡片等高填满行轨
    （否则 .card:last-child 的 margin 清零会让右下角卡比其余高 14px） */
  margin-bottom: 0;
}
/* 看板页收窄底部留白：页脚上移，三行网格 + 页脚恰好一屏（无纵向滚动条） */
.container:has(.reminder-grid) { padding-bottom: 12px; }
/* 列表区内容超出时内部滚动，不破坏统一格高 */
.reminder-grid .cell-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
/* 空态提示在格内垂直居中 */
.reminder-grid .empty-tip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}
/* 预留空位：与实体板块同宽同高 */
.grid-placeholder {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
}

/* ---- 证照到期提醒：底部固定滚动条 ---- */
.license-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card); border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 0;
  z-index: 15; height: 34px; overflow: hidden;
}
.license-bar-label {
  flex-shrink: 0; padding: 0 12px; font-size: 12px; font-weight: 600;
  color: var(--primary); white-space: nowrap;
  border-right: 1px solid var(--border);
  display: flex; align-items: center; height: 100%;
}
.license-scroll {
  flex: 1; overflow: hidden; height: 100%; display: flex; align-items: center;
}
.license-inner {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  animation: license-scroll 30s linear infinite;
}
.license-inner:hover { animation-play-state: paused; }
@keyframes license-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.license-item {
  text-decoration: none; font-size: 12px; padding: 2px 10px;
  border-radius: 4px; flex-shrink: 0;
}
.license-item.license-warn { color: #e65100; background: #fff3e0; }
.license-item.license-warn:hover { background: #ffe0b2; }
.license-item.license-danger { color: var(--danger); background: #fdecea; }
.license-item.license-danger:hover { background: #fcc9c5; }
.license-sep { color: var(--border); font-size: 12px; flex-shrink: 0; }

/* ---- 提醒看板：邮箱图标 + 悬停面板 ---- */
.mail-box {
  position: relative; display: inline-flex; align-items: center;
  margin-right: 8px; cursor: default;
}
.mail-icon { font-size: 20px; line-height: 1; }
.mail-icon.has-mail { cursor: pointer; }
.mail-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--danger); color: #fff; font-size: 10px;
  min-width: 16px; height: 16px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; font-weight: 600; line-height: 1;
}
.mail-panel {
  display: none; position: absolute; top: 100%; right: -4px; margin-top: 8px;
  min-width: 320px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 30;
  padding: 10px 0; text-align: left;
}
.mail-box:hover .mail-panel { display: block; }
.mail-panel-title {
  padding: 0 14px 6px; font-size: 12px; color: var(--text-light);
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.mail-panel-body { max-height: 420px; overflow-y: auto; }
.mail-section-title {
  padding: 6px 14px 2px; font-size: 11px; font-weight: 600;
  color: var(--text-light);
}
.mail-section-title:not(:first-child) {
  border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px;
}
.mail-panel-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px; text-decoration: none; font-size: 13px;
  color: var(--text);
}
.mail-panel-item:hover { background: var(--primary-soft); }
.mail-item-name { font-weight: 600; }
.mail-item-code { color: var(--text-light); font-size: 12px; }
.mail-item-label { margin-left: auto; font-size: 12px; }
.mail-panel-item.mail-warn .mail-item-label { color: #e65100; }
.mail-panel-item.mail-danger .mail-item-label { color: var(--danger); font-weight: 600; }

/* 本月付款汇总卡（竖排三段） */
.mp-card {
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
}
.mp-card:hover { border-color: var(--primary); }
.mp-card .mp-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}
.mp-card .mp-num {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  white-space: nowrap;
}
.mp-card .mp-num strong { font-size: 20px; margin: 0 2px; }
.mp-card .mp-link {
  text-align: center;
  color: var(--text-light);
  font-size: 13px;
}
/* 备用金余额为负时数字标红 */
.mp-card.mp-neg .mp-num strong { color: var(--danger, #c5221f); }
/* 待租房产统计卡 */
.reminder-stat-card {
  text-decoration: none;
  color: var(--text);
}
.reminder-stat-card:hover { border-color: var(--primary); }
.reminder-stat-card .stat-num {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.reminder-stat-card .stat-num strong {
  font-size: 44px;
  line-height: 1;
  color: var(--danger, #c5221f);
}
.reminder-stat-card .stat-num span { font-size: 15px; color: var(--text-light); }
.reminder-stat-card .stat-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}
@media (max-width: 900px) {
  .reminder-grid { grid-template-columns: 1fr; grid-auto-rows: minmax(180px, auto); }
}
.flash { padding: 10px 16px; border-radius: var(--radius); font-size: 14px; }
.flash-success { background: #e6f6ec; color: #1e7a3c; border: 1px solid #b7e3c6; }
.flash-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c2bc; }
.flash-warn { background: #fff6e0; color: #8a5a00; border: 1px solid #ecd28a; }

/* 按钮 */
.btn { display: inline-block; padding: 8px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: var(--text); font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: #b9c0ca; background: #f7f8fa; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { color: var(--danger); border-color: #f0c1bd; }
.btn-danger:hover { background: #fdecea; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-light); }
.btn-ghost:hover { background: #e9edf2; }
.btn-small { padding: 5px 12px; font-size: 13px; }

/* 搜索 */
.search-bar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.search-bar input[type="search"],
.search-bar input[type="text"],
.search-bar input.input { flex: 1; min-width: 220px; padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; background: #fff; }
.search-bar select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; background: #fff; }
.search-bar input:focus, .search-bar select:focus { outline: 2px solid var(--primary-outline); border-color: var(--primary); }

/* 支出筛选栏 */
.filter-bar { padding: 14px 16px; margin-bottom: 14px; }
/* 筛选固定两行 4 列网格：行1 年份/归属/类目/不动产，行2 方式/日期(占2格)/按钮 */
.filter-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px; align-items: end; }
.filter-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.filter-item.span-2 { grid-column: span 2; }
.filter-item label { font-size: 12.5px; color: var(--text-light); }
.filter-item select, .filter-item input { width: 100%; min-width: 0;
  padding: 7px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; background: #fff; }
.filter-actions { flex-direction: row; align-items: center; gap: 8px; }
/* 日期区间：起止两个日期输入并排 */
.filter-item .date-range { display: flex; align-items: center; gap: 6px; }
.filter-item .date-range input { flex: 1 1 0; min-width: 0; padding: 7px 6px; }
.filter-item .range-sep { flex: 0 0 auto; font-size: 13px; color: var(--text-light); }
@media (max-width: 860px) {
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-item.span-2 { grid-column: span 2; }
}

/* 支出合计横幅 */
.sum-banner { padding: 12px 18px; margin-bottom: 14px; background: #f0f7f9;
  border: 1px solid #b8e7ef; border-radius: var(--radius-sm); font-size: 15px; color: var(--text); }
.sum-banner strong { color: var(--primary-dark); }
.sum-banner .sum-amount { font-size: 19px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.sum-banner strong.neg, .sum-banner strong.neg * { color: var(--danger, #c5221f); }

/* 卡片 / 表格 */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.card:last-child { margin-bottom: 0; }
.table-card { padding: 0; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.data-table th, .data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  white-space: nowrap;
  line-height: 1.5;
  height: 44px;
  box-sizing: border-box;
}
.data-table th { background: #f4fafb; color: var(--text-light); font-weight: 600; }
.data-table tbody tr:hover { background: #effafc; }
.data-table .col-actions { text-align: right; }
/* 操作列：表头文字居中，按钮靠右 */
.data-table th.col-actions { text-align: center; }
.data-table .col-owner { min-width: 240px; }
/* 合同列表：承租人列加宽、不换行（兼容公司/机构长名称） */
.data-table .col-tenant { min-width: 300px; white-space: nowrap; }
/* 当事人列表：取消识别号/角色/类型列后，腾出的宽度归名称列 */
.data-table .col-party-name { min-width: 320px; }
.empty-tip { text-align: center; color: var(--text-light); padding: 40px 0; white-space: normal; }

/* 邮件设置页：测试发送——左列当前发件邮箱状态，右列收件输入＋按钮，同行两列 */
.email-test-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.email-test-row .form-item { margin: 0; }
.email-test-controls { display: flex; gap: 14px; }
.email-test-controls input { flex: 1 1 auto; min-width: 0; }
.email-test-btn { flex: 0 0 auto; min-width: 0; padding: 9px 26px; }
@media (max-width: 760px) {
  .email-test-row { grid-template-columns: 1fr; }
  .email-test-controls { flex-direction: column; }
  .email-test-btn { width: 100%; }
}

/* 邮件设置页：SMTP 参数速查表 */
.rcd-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rcd-table th, .rcd-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.rcd-table th { background: #f4fafb; color: var(--text-light); font-weight: 600; }
.rcd-table .rcd-mono { font-family: Consolas, Menlo, monospace; font-size: 13px; }
.rcd-table th.num, .rcd-table td.num { text-align: center; }
/* 列宽：邮箱 / SMTP服务器 / 端口 / 加密方式 / 授权码获取 */
.rcd-table th:nth-child(1), .rcd-table td:nth-child(1) { width: 18%; }
.rcd-table th:nth-child(2), .rcd-table td:nth-child(2) { width: 24%; }
.rcd-table th:nth-child(3), .rcd-table td:nth-child(3) { width: 9%; }
.rcd-table th:nth-child(4), .rcd-table td:nth-child(4) { width: 13%; }
.rcd-table th:nth-child(5), .rcd-table td:nth-child(5) { width: 36%; }
.list-count { color: var(--text-light); font-size: 13px; margin-top: 10px; }
.inline-form { display: inline; }

/* 表单 */
.auto-code-bar { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.code-chip { background: #e6f7fa; border: 1px dashed #8fd3df; border-radius: var(--radius-sm); padding: 8px 14px; display: flex; align-items: center; gap: 10px; }
.code-label { color: var(--text-light); font-size: 13px; }
.code-value { font-size: 16px; font-weight: 700; color: var(--primary); }
.code-auto { font-size: 13px; font-weight: 400; color: var(--text-light); }

.tenant-form { padding: 20px; }
.form-section { border: none; margin-bottom: 22px; }
.form-section legend { font-size: 15px; font-weight: 700; color: var(--primary-dark); padding: 4px 10px; border-left: 4px solid var(--primary); margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.form-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-item label { font-size: 13.5px; color: #374151; font-weight: 600; }
.req { color: var(--danger); margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea,
.form-item .multiselect-toggle {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; background: #fff; color: var(--text);
  box-sizing: border-box; height: auto; line-height: 1.5;
}
.form-item textarea { resize: vertical; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus,
.form-item .multiselect-toggle:focus {
  outline: 2px solid var(--primary-outline); border-color: var(--primary);
}
/* iOS Safari：日期控件默认按系统样式渲染，比其他输入框更高更宽，强制与文本框一致 */
input[type="date"], input[type="datetime-local"],
input[type="time"], input[type="month"] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  box-sizing: border-box;
  line-height: 1.5;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value {
  margin: 0; padding: 0; text-align: left;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  margin: 0; padding: 0;
}
/* iOS Safari：下拉框同样按系统外观渲染，高度与内边距和文本框不一致，统一自绘箭头 */
.form-item select, .search-bar select, .filter-item select,
select.cell-input {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  line-height: 1.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
}
.form-item select, .search-bar select, .filter-item select { padding-right: 30px; }
select.cell-input {
  padding-right: 18px;
  background-position: right 5px center;
  background-size: 9px 6px;
}
/* 备注占满整行（仅多行文本框） */
.form-item:has(textarea) { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.form-actions .btn-primary { min-width: 120px; }

/* 顶栏用户区 */
.user-box { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-name { font-size: 14px; font-weight: 600; }
.user-role { font-size: 12px; color: #fff; background: var(--primary); border-radius: 10px; padding: 1px 10px; }

/* 登录页 */
.login-body {
  margin: 0; min-height: 100vh;
  background: url('../img/login-bg-4.jpg') center center/cover no-repeat;
  position: relative;
}
.login-wrap {
  position: absolute;
  right: 120px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 18px;
  padding: 38px 40px 30px;
  width: 410px;
  box-sizing: border-box;
  box-shadow: 0 20px 50px rgba(13,129,150,.16);
}
@media (max-width: 600px) {
  .login-wrap {
    right: 50%; transform: translate(50%, -50%);
    width: calc(100% - 48px);
    padding: 30px 24px 24px;
  }
}
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.login-logo { width: 48px; height: 48px; border-radius: 12px; font-size: 25px; flex-shrink: 0; }
.login-brand-text { flex: 0 0 auto; min-width: 0; }
.login-title { font-size: 23px; font-weight: 700; line-height: 1.25; text-align: justify; text-align-last: justify; -moz-text-align-last: justify; }
.login-subtitle { font-size: 12.5px; font-weight: 400; color: var(--text-light); line-height: 1; margin-top: 6px; white-space: nowrap; }
.login-form { display: flex; flex-direction: column; gap: 7px; }
.login-label { font-size: 13.5px; font-weight: 600; color: #374151; margin-top: 9px; }
.login-form input { padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 16px; }
.login-form input:focus { outline: 2px solid var(--primary-outline); border-color: var(--primary); }
.login-btn { margin-top: 19px; width: 100%; padding: 11px; font-size: 16px; letter-spacing: 6px; }
.login-hint { text-align: center; color: var(--text-light); font-size: 12px; margin-top: 12px; }
/* 登录页提示浮层：固定顶部居中，不挤占登录卡布局 */
.login-flash { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 50; box-shadow: 0 6px 18px rgba(31,39,51,.10); min-width: 280px; text-align: center; }

/* 页面顶部操作区与导出路径 */
.page-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-disabled { opacity: .5; cursor: not-allowed; background: #f1f3f4; color: var(--text-light); }
.export-path-bar { background: #e8f7fa; border: 1px solid #b8e7ef; border-radius: var(--radius-sm);
  padding: 8px 14px; margin-bottom: 14px; font-size: 13px; color: var(--primary-dark);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap; word-break: break-all; }
.export-path-bar code { font-family: Consolas, Menlo, monospace; color: #0a6170; }
.card-export-error { flex-basis: 100%; margin-top: 8px; background: #fdecea; color: #c5221f;
  border: 1px solid #f3b9b4; border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13.5px; }

/* 证照编号校对提示 */
.id-check-tip { display: none; font-size: 13px; margin-top: 2px; }
.id-check-tip.show { display: block; }
.id-check-tip.ok { color: #1e7a3c; }
.id-check-tip.error { color: var(--danger); }
.id-check-tip.info { color: var(--text-light); }
.id-check-tip a { color: var(--primary); }
/* 证照编号校对提示：标签 + 提示在同一行（field-head），输入框在下一行 */
.form-item--inline-tip { display: flex; flex-direction: column; gap: 5px; }
.form-item--inline-tip > .field-head {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.form-item--inline-tip > .field-head > label {
  flex: 0 0 auto; margin: 0; white-space: nowrap;
}
.form-item--inline-tip > .field-head > .id-check-tip {
  flex: 1 1 auto; min-width: 0; margin: 0;
  font-size: 12.5px; font-weight: 400; line-height: 1.4;
  word-break: break-all;
}
.form-item--inline-tip > .id-confirm-box { margin-top: 2px; }
.id-confirm-box { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: #b45309; margin-top: 4px; }
.field-hint { font-size: 12px; color: var(--text-light); margin-top: 2px; min-height: 0; }

/* 物业服务机构 -> 管家信息联动展示（与物业费/供暖费核算卡片统一等高、字体一致） */
.company-manager-info { display: none; margin-top: 6px; padding: 10px 12px;
  background: #f0f7f9; border: 1px solid #b8e7ef; border-radius: var(--radius-sm); font-size: 13px;
  min-height: 86px; box-sizing: border-box; }
.company-manager-info .cmi-title { font-size: 12.5px; color: var(--primary-dark);
  font-weight: 600; margin-bottom: 6px; }
.company-manager-info .cmi-grid { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.company-manager-info .cmi-label { color: var(--text-light); }
.company-manager-info .cmi-val { color: var(--text); }

/* 物业机构 -> 负责管家 下拉 */
.manager-select-wrap { margin-top: 10px; }
.manager-select-wrap label { display: block; font-size: 13.5px; font-weight: 600;
  color: var(--text); margin-bottom: 4px; }
.muted { color: var(--text-light); font-size: 12.5px; font-weight: normal; }

/* 机构类型标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12.5px;
  line-height: 1.6; }
.tag-utility { background: #e8f6f9; color: var(--primary-dark); border: 1px solid #b8e7ef; }
/* 收据邮件推送状态 */
.tag-ok { background: #eaf7ee; color: #1e7e34; border: 1px solid #bfe5c8; }
.tag-danger { background: #fdecec; color: #c0392b; border: 1px solid #f5c6c6; }
.tag-warn { background: #fdf6e4; color: #9a6b00; border: 1px solid #f0dfae; }
.tag-muted { background: #f2f3f5; color: #888; border: 1px solid #e0e2e6; }

/* 房屋状态筛选标签 */
.status-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.status-tab { padding: 6px 14px; border-radius: 16px; border: 1px solid var(--border); background: #fff;
  color: var(--text-light); font-size: 13.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.status-tab:hover { border-color: var(--primary); color: var(--primary); }
.status-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.tab-count { background: rgba(0,0,0,.08); border-radius: 10px; padding: 0 8px; font-size: 12px; }
.status-tab.active .tab-count { background: rgba(255,255,255,.25); }

/* 房屋状态徽标 */
.house-status { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12.5px; white-space: nowrap; }
.status-vacant { background: #fdecea; color: #c5221f; }       /* 空置：醒目红 */
.status-rented { background: #e6f6ec; color: #1e7a3c; }       /* 在租：绿 */
.status-pending { background: #dff5fa; color: #0b6f84; }      /* 待租洽谈：青蓝 */
.status-self_use { background: #f1f3f4; color: #5f6368; }     /* 业主自用：灰 */
.status-paused { background: #e9edf2; color: #3c4043; }       /* 暂停出租：深灰 */

/* 证照照片 */
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.photo-box { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.photo-title { font-weight: 600; font-size: 14px; }
.photo-img { width: 100%; aspect-ratio: 85.6 / 54; object-fit: cover; border-radius: 3.8% / 6%; border: 1px solid var(--border); display: block; }
.photo-empty { color: var(--text-light); font-size: 13px; border: 1px dashed var(--border); border-radius: 3.8% / 6%; aspect-ratio: 85.6 / 54; display: flex; align-items: center; justify-content: center; padding: 0; }
/* 营业执照等竖向整页截图：完整显示，不铺满裁切，浅圆角 */
.photo-grid--doc .photo-img { aspect-ratio: 3 / 4; object-fit: contain; background: #f4fafb; border-radius: 10px; }
.photo-grid--doc .photo-empty { aspect-ratio: 3 / 4; border-radius: 10px; }
.photo-clear { font-size: 13px; color: var(--danger); display: flex; align-items: center; gap: 5px; }
.photo-hint { font-size: 12px; color: var(--text-light); }
.photo-input { font-size: 13px; }
/* 删除照片按钮：默认描边红字，激活后实心红；图片同步置灰 */
.photo-clear-btn { align-self: flex-start; }
.photo-clear-btn--on { background: var(--danger); border-color: var(--danger); color: #fff; }
.photo-clear-btn--on:hover { background: #d4483e; }
.photo-box.is-deleting .photo-img {
  opacity: .35; filter: grayscale(.8); outline: 2px dashed var(--danger); outline-offset: 2px;
}

.row-name-link { color: var(--text); text-decoration: none; }
.row-name-link:hover { color: var(--primary); text-decoration: underline; }

/* 承租人详情页（只读） */
.risk-banner { background: #fdecea; color: #b3261e; border: 1px solid #f3b9b4;
  border-radius: var(--radius); padding: 10px 16px; margin-bottom: 14px; font-size: 14.5px; }
.detail-summary { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-name-box { display: flex; flex-direction: column; gap: 4px; }
.detail-name { font-size: 24px; font-weight: 700; line-height: 1.2; }
.detail-sub { color: var(--text-light); font-size: 14px; }
.detail-chips { display: flex; gap: 10px; flex-wrap: wrap; }
/* 详情页顶部摘要卡片：等宽栅格（配合 chips-n2~n6 指定每行卡片数；
   卡片内标签在上、值在下，长数字/日期在过窄时可断行，不溢出） */
.chips-equal { display: grid; gap: 10px; flex: 1 1 auto; min-width: 0; }
.chips-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chips-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chips-n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chips-n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.chips-n7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.chips-equal .code-chip { flex-direction: column; align-items: flex-start;
  gap: 2px; min-width: 0; }
.chips-equal .code-value { overflow-wrap: anywhere; }
@media (max-width: 980px) {
  .chips-equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.detail-card { margin-bottom: 14px; }
.detail-section-title { font-size: 15px; color: var(--primary-dark);
  border-left: 4px solid var(--primary); padding-left: 10px; margin-bottom: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px; margin: 0; }

/* 详情页字段行：统一行高与间距 */
.detail-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f1f3;
  min-height: 20px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
  flex-shrink: 0;
  min-width: 120px;
  font-size: 13.5px;
  color: var(--text-light);
  white-space: nowrap;
}
.detail-label::after {
  content: "：";
  color: var(--text-light);
}
.detail-value {
  font-size: 14px;
  color: var(--primary);
  word-break: break-all;
}
.detail-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.detail-item-full { grid-column: 1 / -1; }
.detail-item dt { font-size: 12.5px; color: var(--text-light); font-weight: 400; }
.detail-item dd { font-size: 14.5px; word-break: break-all; }
.detail-empty { color: #b6bdc6; }
.detail-path { font-size: 13.5px; color: var(--primary-dark); }
.detail-text { white-space: pre-wrap; }

/* iPad 竖屏及窄屏适配 */
@media (max-width: 820px) {
  .topbar-inner { height: auto; padding: 10px 16px; gap: 10px; }
  .mainnav { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav-item { white-space: nowrap; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; border-radius: 0;
    padding: 0; margin-left: 14px; }
  .nav-dropdown-menu .nav-sub-item { padding: 4px 14px; }
  .container { padding: 16px 14px 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-item:has(textarea) { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item-full { grid-column: auto; }
  .photo-grid { grid-template-columns: 1fr; }
  .user-box { margin-left: 0; }
  .page-head h1 { font-size: 19px; }
}

/* 角色标签（列表页） */
.role-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px 2px 0 0;
  font-size: 12px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid var(--primary-outline);
  white-space: nowrap;
}
.role-tag--recv { background: #e6f6ec; color: #1e7a3c; border-color: #b7e3c4; }  /* 收款：绿 */
.role-tag--pay  { background: #fdf3e2; color: #b06a00; border-color: #f2d9a8; }  /* 付款：橙 */

/* 多选 checkbox 组 */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 0;
}
.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 14px;
}
.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* 只读字段（如自动生成的完整坐落） */
.readonly-field {
  background: #f3f4f6;
  color: #555;
  cursor: not-allowed;
}

/* 权利人列表 / 公共服务列表 */
.owners-table input, .owners-table select {
  width: 100%;
  padding: 5px 8px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-sizing: border-box;
}
.owners-table input[readonly] {
  background: #f9fafb;
  color: #555;
}
/* 紧凑表格：稍小字号与内边距，用于宽列表避免横向滚动 */
.table-compact th, .table-compact td {
  font-size: 13px;
  padding: 7px 8px;
}
.table-compact .btn-small {
  padding: 2px 8px;
  font-size: 12px;
}
/* 份额输入框去掉数字步进箭头，保证 100% 完整显示 */
.owners-table input.owner-share::-webkit-outer-spin-button,
.owners-table input.owner-share::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.owners-table input.owner-share {
  -moz-appearance: textfield;
  appearance: textfield;
  text-align: center;
  padding-right: 20px;  /* 给右侧 % 后缀留位 */
}
/* 份额输入框 % 后缀（静态装饰，不参与提交） */
.share-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.share-wrap .share-suffix {
  position: absolute;
  right: 9px;
  font-size: 12px;
  color: #6b7280;
  pointer-events: none;
}
.btn-small {
  padding: 3px 10px;
  font-size: 13px;
  color: #0d8196;
  border-color: #b8e7ef;
  background: #f0f7f9;
}
.btn-small:hover {
  background: #e0f2f6;
  color: #0a6b7d;
}

/* 支出凭证：付款明细动态行 */
.form-hint { margin: 4px 0 10px; font-size: 13px; color: #6b7280; }
.table-scroll { overflow-x: auto; }
/* 资产登记列表：表格按页宽自适应折行，不出现横向滚动条（仅作用于该页） */
.table-scroll.asset-table-scroll { overflow-x: visible; }
.data-table.asset-table { min-width: 0; }
.data-table.asset-table th { white-space: nowrap; padding: 10px 8px; }
.data-table.asset-table td { white-space: normal; padding: 10px 8px; }
.data-table.asset-table .col-actions { width: 205px; white-space: normal; }
.data-table.asset-table .table-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.data-table.asset-table .table-actions .btn { white-space: nowrap; }
/* iPad 竖屏等窄窗口：紧凑排版，保证 9 列不撑出横向滚动 */
@media (max-width: 980px) {
  .data-table.asset-table th, .data-table.asset-table td { padding: 8px 4px; font-size: 13px; }
  .data-table.asset-table .col-actions { width: 118px; }
}
.expense-items-table { table-layout: fixed; min-width: 0; }  /* 列宽由表头百分比决定，随容器缩放 */
.expense-items-table input,
.expense-items-table select {
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-sizing: border-box;
}
.expense-items-table input[readonly] {
  background: #f3f4f6;
  color: #555;
  cursor: not-allowed;
}
.expense-items-table td input[type="date"] {
  margin-bottom: 2px;
}
/* 用款申报明细：控件宽度与字号统一 */
.fund-items-note { margin: 0 0 8px; font-size: 13px; color: #6b7280; }
.expense-items-table .cell-input-code { max-width: 90px; }
.expense-items-table .cell-input-amount { text-align: right; }
.expense-items-table select.cell-select { font-size: 13px; }
.expense-items-table input.cell-input { font-size: 13px; }
/* 明细行文字统一 13px，坐落等长文本自动换行，不再溢出遮挡相邻列 */
.expense-items-table td {
  font-size: 13px;
  white-space: normal;
  word-break: break-all;
  vertical-align: middle;
}
/* 合同内嵌编辑子表（应收款计划 / 共同居住人）：统一行高与输入框高度，垂直居中 */
#cohabitants-table { table-layout: fixed; }
#receivables-table th,
#cohabitants-table th { height: 36px; padding: 5px 8px; }
#receivables-table td,
#cohabitants-table td {
  height: 38px;
  padding: 4px 8px;
  vertical-align: middle;
}
#receivables-table .cell-input,
#cohabitants-table .cell-input {
  width: 100%; min-width: 0; min-height: 28px; box-sizing: border-box;
}
/* 应收款计划：凭证编号已由收据核定 → 只读灰底，与可手填行区分 */
#receivables-table input.cell-input[readonly] {
  background: #f2f3f5; color: var(--text-light); cursor: default;
}
/* 买卖合同附件五付款明细表：统一行高与输入框高度，覆盖全局 min-width */
#pay-table { min-width: 0; }
#pay-table th, #pay-table td {
  height: 44px; padding: 6px 6px; vertical-align: middle;
  white-space: nowrap; overflow: hidden;
}
#pay-table .cell-input {
  width: 100%; min-width: 0; height: 32px; box-sizing: border-box;
  padding: 4px 8px; font-size: 14px;
}
#pay-table select.cell-input { padding: 4px 18px 4px 6px; font-size: 13px; }
#pay-table td.line-no { text-align: center; font-weight: 600; }
#pay-table td:last-child { text-align: center; padding-left: 4px; padding-right: 4px; }
#pay-table .btn-pay-del { padding: 4px 10px; font-size: 13px; }

/* 工商登记明细：输入框铺满单元格，企业名称列随剩余空间放宽 */
#biz-regs-table { min-width: 0; }
#biz-regs-table th, #biz-regs-table td {
  height: 40px; padding: 5px 6px; vertical-align: middle;
}
#biz-regs-table .cell-input {
  width: 100%; min-width: 0; height: 32px; box-sizing: border-box;
  padding: 4px 8px; font-size: 14px;
}
#biz-regs-table td.line-no { text-align: center; font-weight: 600; }
#biz-regs-table td:last-child { text-align: center; padding-left: 4px; padding-right: 4px; }

/* 税费负担预设列表：长文本换行，无横向滚动条 */
#tax-burden-table th, #tax-burden-table td {
  height: auto; min-height: 0; padding: 8px 10px;
  vertical-align: middle;
}
#tax-burden-table th { white-space: nowrap; }

/* 所持证照下拉含「港澳居民来往内地通行证」等长选项，字号略缩配合 5.5cm 列宽 */
#cohabitants-table select.cell-input { font-size: 13px; }
/* 操作列仅放「移除」按钮：收窄后居中 */
#cohabitants-table th:last-child,
#cohabitants-table td:last-child { text-align: center; padding-left: 4px; padding-right: 4px; }
.multiselect { position: relative; }
.multiselect-toggle {
  width: 100%; text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: #fff; color: var(--text);
}
.multiselect-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 30;
  min-width: 100%; padding: 6px 0; margin-top: 4px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: 0 6px 18px rgba(13, 129, 150, 0.12);
}
.multiselect.open .multiselect-menu { display: block; }
.multiselect-option {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap;
  text-align: left; line-height: 1.5;
}
.multiselect-option:hover { background: #f0f7f9; }
.multiselect-option input[type="checkbox"] {
  flex: 0 0 auto; width: 15px; height: 15px; margin: 0;
  accent-color: var(--primary);
}
/* 备用金领用表单：编号录入带出提示 */
.pick-msg { font-size: 13px; }
.pick-msg .pick-ok { color: #1e8449; font-weight: 600; }
.pick-msg .pick-err { color: #d93025; font-weight: 600; }
/* 备用金领用表单内嵌明细表：随容器宽度固定布局，不出现横向滚动 */
.fr-items-table, .expense-pick-table {
  min-width: 0; table-layout: fixed; width: calc(100% - 2px);
}
.fr-items-table th, .fr-items-table td,
.expense-pick-table th, .expense-pick-table td {
  font-size: 13px; white-space: normal; word-break: break-all;
  vertical-align: middle;
}
/* 表单内「带出只读」信息表：跟随卡片宽度，不撑横向滚动条 */
.inline-info-table {
  min-width: 0; table-layout: fixed; width: calc(100% - 2px);
}
.inline-info-table td {
  white-space: normal; word-break: break-all; height: auto;
}
.inline-info-table td.k {
  white-space: nowrap; font-weight: 500; color: var(--text-light);
  background: #f4fafb;
}
.inline-info-table td.prop-addr-cell {
  white-space: nowrap; word-break: normal;
  overflow: hidden; text-overflow: ellipsis;
}
.inline-info-table td:first-child {
  white-space: nowrap; font-weight: 500; color: var(--text-light);
  background: #f4fafb;
}
/* 两列版只读信息表：标签14% 值36% × 2 组 */
.info-grid-2col td.k {
  width: 14%; white-space: nowrap; font-weight: 500;
  color: var(--text-light); background: #f4fafb;
}
.info-grid-2col td.v { width: 36%; }
.info-more > summary {
  padding: 8px 14px; font-size: 13px; color: var(--primary);
  background: #f4fafb; border-top: 1px solid var(--border);
  cursor: pointer; user-select: none; list-style-position: inside;
}
.info-more[open] > summary { border-bottom: 1px solid var(--border); }
/* 承租人/出租人半宽卡：字号与房屋卡统一 15px，标签20% */
.party-2col td { font-size: 15px; padding: 7px 10px; height: auto; }
.party-2col td.k {
  width: 20%; white-space: nowrap; font-weight: 500;
  color: var(--text-light); background: #f4fafb;
}
.multiselect-option .opt-text,
.multiselect-option {
  font-size: 13.5px; font-weight: 400; color: var(--text);
}
.row-del {
  padding: 3px 10px;
  font-size: 13px;
  color: #0d8196;
  border: 1px solid #b8e7ef;
  border-radius: 4px;
  background: #f0f7f9;
  cursor: pointer;
}
.row-del:hover {
  background: #e0f2f6;
  color: #0a6b7d;
}

/* 户型选择器 X室X厅X卫X厨 */
.layout-picker {
  display: flex;
  align-items: center;
  gap: 6px;
}
.layout-picker select {
  width: 56px;
  padding: 6px 4px;
  text-align: center;
}
.layout-unit {
  font-size: 14px;
  color: #374151;
  margin-right: 6px;
}

/* ---- 业主/承租人外部账号：只读界面，隐藏所有写操作入口 ---- */
.external-user main .col-actions,
.external-user main .inline-form,
.external-user main a[href*="/edit"],
.external-user main a[href*="/new"],
.external-user main .btn-danger { display: none !important; }

/* ---------- 托管套餐：房屋套数配额 ---------- */
.page-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quota-chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  color: var(--primary-dark); background: var(--primary-soft); border: 1px solid var(--primary-outline); }
.quota-chip.quota-near { color: #9a6700; background: #fef7e0; border-color: #f0d48a; }
.quota-chip.quota-reach { color: #b3261e; background: #fdecea; border-color: #f3b9b4; }
.quota-banner { border-radius: var(--radius-sm); padding: 10px 14px; margin: 0 0 14px; font-size: 13.5px; line-height: 1.6; }
.quota-banner-near { color: #9a6700; background: #fef7e0; border: 1px solid #f0d48a; }
.quota-banner-reach { color: #b3261e; background: #fdecea; border: 1px solid #f3b9b4; }
