/* ==========================================================================
   ui-modern.css — 2026 新版视觉（浅色统一 · 卡片化 · 现代感）
   --------------------------------------------------------------------------
   加载顺序（index.html）：
       style.css → tokens.css → ui-refresh.css → ui-modern.css
   回滚方式：删掉 index.html 里 ui-modern.css 那一行 <link> 即可，
             业务与其它样式完全不受影响。

   本层只做视觉，不碰任何业务逻辑与业务语义色：
     · 房态四色 / 渠道三色 / 财务红绿 一律不动（老板靠这个认房）
     · 只改「外壳」：侧边栏配色、留白节奏、卡片语言、字体栈
   ========================================================================== */

/* ---- 1. 统一字体栈（和客人端 H5 一致） ---- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* ---- 2. 侧边栏：深色 Navy(#1B2434) → 浅色统一外壳 ----
   旧版深色侧栏是"老气"的主因，且和手机端浅色底栏是两套色。
   这里统一成：白底 + 浅分隔线 + 品牌蓝激活条，和手机底部栏同语言。 */
.sidebar {
  background: var(--surface) !important;
  color: var(--ink-1) !important;
  border-right: 1px solid var(--line);
}
.sidebar-logo {
  border-bottom: 1px solid var(--line) !important;
  color: var(--ink-1) !important;
}
.sidebar-menu a {
  color: var(--ink-2) !important;
  border-left: 3px solid transparent;
  margin: 2px 10px 2px 0;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  transition:
    background-color var(--dur) var(--ease),
    color            var(--dur) var(--ease);
}
.sidebar-menu a:hover {
  background: var(--canvas) !important;
  color: var(--ink-1) !important;
}
.sidebar-menu a.active {
  background: var(--brand-soft) !important;
  color: var(--brand-ink) !important;
  border-left-color: var(--brand);
  font-weight: 600;
}
.sidebar-footer {
  border-top: 1px solid var(--line) !important;
  color: var(--ink-3) !important;
}
.sidebar-user {
  border-top: 1px solid var(--line) !important;
  color: var(--ink-2) !important;
}
.sidebar-user .user-name { color: var(--ink-1) !important; }
.sidebar-user .logout-link { color: var(--c-danger-ink) !important; }

/* ---- 3. 主内容区：更透气（借鉴客人端 H5 的留白节奏） ---- */
@media (min-width: 769px) {
  .main { padding: var(--sp-6) var(--sp-6) var(--sp-8) !important; }
  .topbar { margin-bottom: var(--sp-3); }
}

/* ---- 4. 卡片语言：白卡 + 圆角 + 内部发丝分隔线 ---- */
.room-group,
.board-top,
.settlement-panel,
.settings-section,
.fin-chart-section,
.empty-tip {
  border-radius: var(--r-lg);
}
.room-group { padding: var(--sp-4) !important; }
.room-group + .room-group { margin-top: var(--sp-3); }

/* 房卡内信息区加一条发丝分隔线，让"房号价 / 客人信息"两块分得清
   （客人端 H5 的 .g-info-row 就是这么切子区域的） */
@media (min-width: 769px) {
  .room-card .rc-info {
    border-top: 1px solid var(--line);
    padding-top: var(--sp-2);
    margin-top: var(--sp-2);
  }
}

/* ---- 5. 统计卡：数字更突出 ---- */
.stat-card .num { letter-spacing: -.02em; }

/* ==========================================================================
   6. 办理入住弹窗 —— 区域分组 + 摘要卡 + 紧凑选项
   --------------------------------------------------------------------------
   解决三个老问题：
     1. 信息平铺没分区 —— 4 个浅色 ci-section 卡（客人 / 客源 / 价格 / 收款）
     2. 顶部没摘要  —— ci-summary 横排：房号·房价·天数·预计房费
     3. 大 emoji + 2px 粗描边 —— 图标缩小到 16px，描边 1.5px，inline 排版
   ========================================================================== */

/* 6.1 弹窗头部：左侧色条 + 房间号徽章（不动 HTML，只改 h2 内 span 字号） */
.modal-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  position: relative;
}
.modal-header::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--brand);
  border-radius: 2px;
  flex-shrink: 0;
}
.modal-header h2 {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink-2);
}
.modal-header h2 > span {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--brand);
  font-feature-settings: "tnum";
  letter-spacing: -.01em;
}

/* 6.2 摘要卡：开房前一眼看到房价/天数/预计 */
.ci-summary {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--brand-soft);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.ci-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ci-summary-item-label {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.2;
}
.ci-summary-item-value {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.3;
  font-feature-settings: "tnum";
}
.ci-summary-item-value.is-price { color: var(--c-danger); }
.ci-summary-item-value.is-room  { color: var(--brand); }
.ci-summary-divider {
  width: 1px;
  height: 22px;
  background: var(--line-strong);
  flex-shrink: 0;
}

/* 6.3 分区分隔：参考轻量分隔式 —— 白底 + 发丝线 + 居中小标题（不再用灰色大卡） */
.ci-section {
  background: transparent;
  padding: 0 0 var(--sp-4);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.ci-section:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.ci-section-title {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: .08em;
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}
.ci-section-title::before { content: none; }
.ci-section .form-group { margin-bottom: var(--sp-3); }
.ci-section .form-group:last-child { margin-bottom: 0; }
.ci-section .form-group > label {
  font-size: var(--fs-xs);
  color: var(--ink-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.ci-section .form-group > label > .req {
  color: var(--c-danger);
  font-weight: 700;
  margin-left: 2px;
}
/* 分段控件组的标签居中（参考图动线：渠道/类型组标题居中） */
.ci-seg-group > label { text-align: center; display: block; }

/* 6.4 通栏分段控件（参考 segmented control：选中实心品牌蓝白字） */
.ci-section .pay-methods {
  display: flex;
  gap: 0;
  padding: 3px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.ci-section .pay-method {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
  padding: var(--sp-1) var(--sp-2);
  border: none;
  border-radius: calc(var(--r-md) - 3px);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  text-align: center;
  cursor: pointer;
}
.ci-section .pay-method .icon { font-size: 15px; line-height: 1; }
.ci-section .pay-method.selected {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

/* 6.5 同住人：标题行右侧放「添加同住人」链接（参考图动线）+ 浅灰卡片 */
.ci-companion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}
.ci-companion-row > label { margin-bottom: 0; }
.ci-link-btn {
  background: transparent;
  border: none;
  color: var(--brand-ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 4px 8px;
  min-height: 32px;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background-color var(--dur) var(--ease);
}
.ci-link-btn:hover { background: var(--brand-soft); }
.ci-companion {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.ci-companion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-1);
}
.ci-companion-del {
  font-size: var(--fs-xs);
  color: var(--c-danger-ink);
  background: var(--c-danger-soft);
  padding: 2px 10px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  min-height: 28px;
  font-weight: 500;
}
.ci-companion-del:hover { background: var(--c-danger); color: #fff; }

/* 6.6 弹窗底部：主按钮全宽 + 取消按钮 ghost */
.ci-checkin-footer { gap: var(--sp-2); }
.ci-checkin-footer .btn-primary {
  flex: 1;
  min-height: 44px;
  font-weight: 600;
  font-size: var(--fs-base);
}
.ci-checkin-footer .btn-default {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  padding: var(--sp-2) var(--sp-4);
  min-height: 44px;
}
.ci-checkin-footer .btn-default:hover {
  color: var(--ink-1);
  background: var(--canvas);
}

/* 6.7 手机端：摘要更紧凑，分区/分段微调 */
@media (max-width: 768px) {
  .ci-summary { padding: var(--sp-2) var(--sp-3); gap: var(--sp-2); margin-bottom: var(--sp-3); }
  .ci-summary-item-value { font-size: var(--fs-sm); }
  .ci-summary-item-label { font-size: 10px; }
  .ci-summary-divider { height: 18px; }
  .ci-section { padding: 0 0 var(--sp-3); margin-bottom: var(--sp-3); }
  .ci-section .pay-method { min-height: 38px; padding: 4px 6px; font-size: 13px; }
  .ci-section .pay-method .icon { font-size: 14px; }
}

/* ==========================================================================
   7. 手机端所有弹窗加固 —— 治「弹窗要左右/上下滑才能看全」
   --------------------------------------------------------------------------
   现象：X5 系内核（QQ浏览器等）有时把 fixed 弹窗当普通文档流渲染，
   页面能滑、弹窗跟着滑、宽度还可能超屏。
   三层防御：
     ① 弹窗内 pay-methods 全部通栏分段化（和办理入住同款，天然窄屏友好）
     ② .modal overflow-x:hidden，内部内容再宽也只裁剪、不撑宽文档
     ③ html.modal-open 滚动锁：弹窗开着时冻结页面滚动（JS 在 app.js init）
   ========================================================================== */
@media (max-width: 768px) {
  .modal { overflow-x: hidden; }
  .modal .pay-methods {
    display: flex;
    gap: 0;
    padding: 3px;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
  }
  .modal .pay-method {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 38px;
    padding: 4px 6px;
    border: none;
    border-radius: calc(var(--r-md) - 3px);
    background: transparent;
    color: var(--ink-2);
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
  }
  .modal .pay-method .icon { font-size: 14px; display: inline; margin: 0; }
  .modal .pay-method.selected {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
  }
  .modal .pay-method.selected .pm-sub { color: rgba(255,255,255,.85); }
  /* 滚动锁：弹窗开着时页面不许滑（配合 app.js 的 modal-open 类） */
  html.modal-open, html.modal-open body { overflow: hidden !important; }
}

/* ==========================================================================
   8. 手机房态日历一屏铺满 —— 治「日历要左右滑才能看全 5 天」
   --------------------------------------------------------------------------
   根因：.cal-table 是 table-layout:auto，预订胶囊/客人名的最小内容宽度
   把日期列撑到 ~75px，5 列 + 房间列 ≈ 435px > 390px 屏宽 → 出横向滚动。
   改 table-layout:fixed：房间列定宽 50px，5 个日期列均分剩余宽度
   （390 屏 ≈ 68px/列），内容超宽时在格内裁剪省略，表格永远正好一屏。
   ========================================================================== */
@media (max-width: 768px) {
  .cal-table { table-layout: fixed; }
  .cal-room-col { width: 50px !important; min-width: 50px !important; max-width: 50px !important; }
  .cal-date-col { min-width: 0; width: auto; }
  .cal-cell-body, .cal-guest { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .cal-cell-body .pill {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: top;
    padding: 2px 2px;        /* 均分列 (~63px) 里也能放下 ¥58.06 整价 */
    letter-spacing: -.3px;   /* 再挤出 2-3px，订¥87.4 这类长胶囊也不截断 */
  }
}

/* ==========================================================================
   9. 添加消费弹窗（需求4）+ 中行码手续费（需求5）
   --------------------------------------------------------------------------
   移动端分段控件复用 §7 的 .modal .pay-methods 全栏样式（添加消费弹窗就在
   .modal 里，天然继承）；这里只补 PC 端分段外观、7 个选项的换行、
   已收开关、以及"实际到账"输入框的 PC-only / mobile-only 控制。
   ========================================================================== */

/* 9.1 添加消费弹窗：PC 端分段控件外观（与 §6.4 办理入住同款语言） */
@media (min-width: 769px) {
  .modal .bill-pay-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 3px;
    background: var(--canvas);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
  }
  .modal .bill-pay-methods .pay-method {
    flex: 1 1 13%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 36px;
    padding: var(--sp-1) var(--sp-2);
    border: none;
    border-radius: calc(var(--r-md) - 3px);
    background: transparent;
    color: var(--ink-2);
    font-size: var(--fs-sm);
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
  }
  .modal .bill-pay-methods .pay-method .icon { font-size: 15px; line-height: 1; }
  .modal .bill-pay-methods .pay-method.selected {
    background: var(--brand);
    color: #fff;
    font-weight: 600;
  }
}
/* 手机端 7 个选项允许换行（两行各 4+3），避免一行塞 7 个被压扁 */
@media (max-width: 768px) {
  .modal .bill-pay-methods { flex-wrap: wrap; }
  .modal .bill-pay-methods .pay-method { flex: 1 1 24%; }
}

/* 9.2 已收开关：放大触达面积（老板手指点） */
.bill-paid-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink-1);
  cursor: pointer;
  min-height: 36px;
  margin-bottom: 0;
}
.bill-paid-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  flex-shrink: 0;
}

/* 9.3 对账页"实际到账"列：仅 PC 显示，手机隐藏（手机在金额列只读展示手续费） */
.pc-only { display: table-cell; }
.mobile-only { display: none; }
@media (max-width: 768px) {
  .pc-only { display: none !important; }
  .mobile-only { display: table-cell; }
}
.actual-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 110px;
}
.actual-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-feature-settings: "tnum";
}
.actual-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
/* 手续费红色小标签（对账行 + 月报通用） */
.fee-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-danger);
  white-space: nowrap;
}

/* ==========================================================================
   10. 今日退房（需求2）：看板卡片 + 列表弹窗 + 分级提醒
   --------------------------------------------------------------------------
   复用 .rent-reminder-bar / .rent-reminder-chip 的骨架（与收租提醒同一语言），
   这里只补：红色左边条、红点、紧急高亮、列表条目排版、手机横幅色。
   ========================================================================== */

/* 10.1 看板卡片：红色左边条提示"要处理人"，无超时时用中性色 */
.checkout-reminder-bar { border-left: 4px solid var(--c-danger); }
.checkout-reminder-bar.co-lv-none,
.checkout-reminder-bar.co-lv-upcoming { border-left-color: var(--line-strong); }

/* 10.2 红点（已自动退房未已知悉的计数，常驻直到点已知悉） */
.co-red-dot {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 9px;
  background: var(--c-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}

/* 10.3 urgent/final 的到期 chip 高亮（红底白字，一眼看到该赶人了） */
.rent-reminder-chip.co-chip-urgent {
  background: var(--c-danger);
  border-color: var(--c-danger);
}
.rent-reminder-chip.co-chip-urgent b,
.rent-reminder-chip.co-chip-urgent > span { color: #fff !important; }

/* 10.4 列表弹窗条目 */
.co-item {
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
}
.co-item.co-urgent { border-left: 4px solid var(--c-danger); background: #fffafa; }
.co-item.co-done { opacity: .62; background: var(--canvas); }
.co-item-main {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.co-item-main .co-room {
  font-size: var(--fs-lg);
  color: var(--brand);
  font-feature-settings: "tnum";
}
.co-item-main .co-guest { font-weight: 600; color: var(--ink-1); }
.co-item-main .co-src { font-size: var(--fs-xs); color: var(--ink-3); }
.co-badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: var(--r-sm);
  background: var(--canvas);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.co-badge-month { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.co-item-sub {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin: 6px 0;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.co-item-btns {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* 10.5 手机横幅：退房超时用红底（区别于新订单的深色） */
.order-alert-bar.checkout-alert-banner {
  background: var(--c-danger);
  color: #fff;
}

/* ==========================================================================
   11. 物品损坏费拍照留证（需求3）
   ========================================================================== */

/* 11.1 缩略图网格（退房弹窗内预览，可删） */
.damage-photos {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
}
.damage-photo-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--canvas);
}
.damage-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.damage-photo-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.damage-photo-del:hover { background: var(--c-danger); }

/* 11.2 大图查看器（操作记录 / 弹窗预览共用，深色沉浸底） */
.photo-viewer-overlay {
  /* 2026-09-29 晚：1000 → 1500。原来和 .modal-overlay 同为 1000，而查看器模板在 DOM 里
     排在档案弹窗之前 ⇒ 同层级后者盖前者，从档案弹窗里点缩略图，查看器被弹窗整个盖住
     （老板手机实测"点了没反应"）。1500 > 弹窗 1000、< toast 2000。 */
  z-index: 1500;
  background: rgba(0, 0, 0, .82);
}
.photo-viewer {
  position: relative;
  max-width: min(92vw, 860px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-viewer img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--r-md);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}
.photo-viewer-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--ink-1);
  font-size: 18px;
  line-height: 30px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.photo-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--ink-1);
  font-size: 22px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
}
.photo-viewer-prev { left: -50px; }
.photo-viewer-next { right: -50px; }
.photo-viewer-count {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .85);
  font-size: 12px;
  font-feature-settings: "tnum";
}
@media (max-width: 768px) {
  .photo-viewer-prev { left: 8px; }
  .photo-viewer-next { right: 8px; }
}

/* ===== 第12节：ICP 备案页脚（2026-09-11 备案通过） ===== */
.icp-footer { padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); text-align: center; font-size: 12px; color: #8a94a6; }
.icp-footer a { color: inherit; text-decoration: none; margin-right: 8px; }

/* ===== 第13节：今天空白格二选一浮层（办理入住/挂为今日预订） ===== */
.plus-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  min-width: 220px;
  max-width: calc(100vw - 16px);
}
.plus-menu-title {
  font-size: 12px;
  color: var(--text-tertiary, #8a94a6);
  padding: 0 2px 2px;
}
.plus-opt-btn {
  padding: 10px 12px;
  min-height: 40px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  background: var(--canvas, #f7f8fa);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: all .12s;
  white-space: nowrap;
}
.plus-opt-btn:hover { background: #eef3ff; border-color: var(--brand, #2F6BFF); color: var(--brand, #2F6BFF); }
.plus-opt-btn.plus-opt-cancel { background: transparent; border-style: dashed; color: var(--text-tertiary, #8a94a6); font-weight: 400; }
.plus-opt-btn.plus-opt-cancel:hover { background: #f5f5f5; color: #666; border-color: #d9d9d9; }

/* ===== 第14节：日历状态字标（住/退/预，2026-09-11 由颜色圆点改为文字）
   2026-10-04 批42h：老板要求从右上移到【右下角】——右上会遮挡格子内容。
   只挪定位一行，尺寸/配色不动；图例区同名 span 靠内联 position:static 覆盖。 */
.st-tag {
  position: absolute; bottom: 1px; right: 1px;
  z-index: 2;
  min-width: 13px; height: 13px; padding: 0 2px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  font-size: 9px; font-weight: 700; line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
}
.st-tag.st-in  { background: #e6f4ec; color: #1f9d61; border: 1px solid #b7e2cc; }  /* 住=绿 */
.st-tag.st-out { background: #eef0f3; color: #8a94a6; border: 1px solid #d9dee6; }  /* 退=灰 */
.st-tag.st-res { background: #fff3e0; color: #e8890c; border: 1px solid #ffd9a0; }  /* 预=橙 */

/* ============ 【2026-09-29 收银页重做】统计卡可点 + 平台卡周期/提醒 ============ */
/* 统计卡可点：hover 提亮 + 「点击看明细 ›」小字 */
.stat-card.clickable { cursor: pointer; transition: box-shadow .15s; }
.stat-card.clickable:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.stat-card .card-hint { font-size: 11px; color: #b0b6c0; margin-top: 2px; }
/* 平台卡可点 */
.settlement-platform-card { cursor: pointer; }
/* 结算周期说明小字（每周一结 / 履约+6天 / 次日到账） */
.sp-cycle { font-size: 11px; color: var(--ink-3, #999); margin-top: 2px; }
/* 提醒条：warn=今天该对账（橙）、info=有逾期可确认（蓝） */
.sp-remind-warn, .sp-remind-info {
  margin-top: 6px; padding: 6px 8px; border-radius: 8px;
  font-size: 12px; line-height: 1.5; word-break: break-all;
}
.sp-remind-warn { background: #fff3e0; color: #b25e00; border: 1px solid #ffd699; font-weight: 600; }
.sp-remind-info { background: #eef4ff; color: #2f5cc4; border: 1px solid #c9d9ff; }

/* ============ 【2026-09-30 收银明细弹窗修订】PC 表格不横滚 + 手机卡片化（两端信息一致） ============ */
/* PC：7 列全信息，弹窗加宽 880px；项目列限宽换行，其余列不折行 ⇒ 不出现横向滚动条 */
.bd-modal table { width: 100%; table-layout: auto; }
.bd-modal th { white-space: nowrap; }
.bd-modal .bd-item { max-width: 240px; word-break: break-all; }
.bd-modal .bd-time { white-space: nowrap; color: #667; }
.bd-muted { color: #b8bec8; }
.bd-warn { color: var(--warning, #e8890c); }
.bd-ok   { color: var(--success, #1f9d61); }
.bd-bad  { color: var(--danger, #e5484d); }
/* 手机端隐藏 PC 表格、显示卡片列表 */
.bd-mobile { display: none; }
@media (max-width: 768px) {
  .bd-pc { display: none !important; }
  .bd-mobile { display: block; }
  /* 手机弹窗左右贴边收窄内边距，可视面积最大化 */
  .bd-modal { padding: 0 !important; }
  .bd-modal .modal-body { padding: 12px 12px 16px; }
}
/* 手机明细卡片：三行布局 = 房号+项目+金额 ｜ 客人·收款方式 ｜ 时间·到账情况 */
.bd-card {
  background: #fff; border: 1px solid #eef0f4; border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.bd-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bd-card-room { font-weight: 700; font-size: 14px; color: #222; white-space: nowrap; }
.bd-card-item { color: #667; font-size: 13px; margin-left: 6px; word-break: break-all; }
.bd-card-amt { font-weight: 700; font-size: 16px; color: var(--danger, #e5484d); white-space: nowrap; }
.bd-card-mid { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font-size: 12px; color: #556; }
.bd-card-bot { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 12px; color: #99a; }
/* 🔴 .modal 基础 width:520px（style.css）是 PC 横滚根因：7 列内容 600px 挤在 520 里。
   只在桌面端加宽到 880；用 min-width 媒体查询，避免覆盖 ui-refresh 手机端 width:100vw */
@media (min-width: 769px) {
  .bd-modal { width: 880px; max-width: 94vw; }
}

/* ============ 【2026-09-30 弹窗处理入口】勾选 + 底部结算/确认条 ============ */
/* 弹窗底部处理条：flex 换行，手机也能放下 */
.bd-footer { flex-wrap: wrap; gap: 8px; }
.bd-footer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; justify-content: flex-end; }
.bd-picked { font-size: 13px; color: #556; }
.bd-hint { font-size: 11px; color: #99a; font-weight: 400; margin-left: 4px; }
.bd-select { padding: 8px; border: 1px solid #d9d9d9; border-radius: 8px; max-width: 46vw; }

/* ============ 【批42j】收银台两条「结算条」重复 ============
   老板 10-04 13:55 截图：账单明细弹窗打开 + 勾了未付款账单时，屏幕上同时出现
   ①弹窗内 .bd-footer（💰 结算收款）②收银列表页的固定底栏（结算/取消）→ 重复。
   修法：底栏模板条件加 !billDetail.show（弹窗开着就不渲染底栏）。
   下面把原本写在该 div 上的内联样式抽成 class，并补手机端适配。
   （x-show 走内联 display，优先级高于本 class，不受影响） */
.bulk-settle-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; z-index: 1500;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: #fff; border: 1px solid #e6e6e6; border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.2); padding: 12px 18px; max-width: calc(100vw - 32px);
}
@media (max-width: 768px) {
  /* 手机：贴屏幕底、左右留白收窄，避开浏览器底栏 */
  .bulk-settle-bar {
    left: 0; right: 0; transform: none; bottom: 0; max-width: 100vw;
    border-radius: 14px 14px 0 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    justify-content: space-between;
  }
  /* 手机端弹窗内处理条：竖排三层 —— ①已选 N 笔 ②收款方式 ③主按钮拉满整行。
     🔴 ui-refresh.css:1240 已用 `!important` 把 .modal-footer .btn 定成 flex:1 1 auto
        （设计系统要求「手机端按钮均分拉满」，不要对抗它）⇒ 这里只排顺序、让按钮独占一行，
        不再去改它的 flex。DOM 顺序为 picked → select → button，靠 order 重排，无需改模板。 */
  .bd-footer-row { justify-content: stretch; gap: 8px; }
  .bd-picked { order: 1; flex: 1 1 100%; }
  .bd-select { order: 2; flex: 1 1 100%; max-width: 100%; min-width: 0; }
  .bd-footer-row .btn { order: 3; }
}
/* 中行码实际到账行内输入 */
.bd-actual { margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.bd-actual input { width: 110px; padding: 4px 6px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 13px; }
.bd-actual-hint { font-size: 11px; color: #99a; }
/* 手机卡片带勾选：卡内左勾选右内容 */
.bd-card { display: flex; gap: 8px; align-items: flex-start; }
.bd-card-main { flex: 1; min-width: 0; }
.bd-check { padding-top: 3px; flex-shrink: 0; }
.bd-check input { width: 18px; height: 18px; accent-color: var(--brand, #2F6BFF); }
.bd-modal input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand, #2F6BFF); }

/* ============================================================================
   【批42k 2026-10-04】收银页「对账清单」手机端卡片化
   老板：「对账清单在手机上看不全，还需左右滑动才能看全，这样感觉很麻烦」
   原因＝待到账明细/账单列表都是 9 列大表，390px 装不下 ⇒ .table{overflow-x:auto} 只能横滑。
   作法＝双渲染：.cf-pc 原表格（PC 端逐字节未动）／.cf-mobile 卡片（手机端）。
   🔴 类名不能复用 .pc-only/.mobile-only —— 那两个是 `display:table-cell` 语义，给 div 用会塌。
   ============================================================================ */
.cf-pc { display: block; }
.cf-mobile { display: none; }

.cf-block .cf-head {
  padding: 10px 16px; display: flex; justify-content: space-between;
  align-items: center; gap: 8px; border-bottom: 1px solid var(--line);
}
.cf-count { font-weight: 400; font-size: 12px; color: #99a; }

/* 手机卡片：与账单明细弹窗的 .bd-card 同一套视觉语言（左勾选 + 右内容，三行信息） */
.cf-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--card-bg);
}
.cf-card:last-child { border-bottom: none; }
.cf-card.overdue { background: #fffdf5; }          /* 到期可确认：浅黄底，与表格 tr.overdue 同色系 */
.cf-check { display: flex; padding-top: 2px; flex: 0 0 auto; }
.cf-check input { width: 20px; height: 20px; accent-color: var(--brand, #2F6BFF); }
.cf-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.cf-top { display: flex; align-items: baseline; gap: 6px; }
.cf-room { font-weight: 700; font-size: 15px; color: var(--ink-1, #222); white-space: nowrap; flex: 0 0 auto; }
.cf-item {
  flex: 1 1 auto; min-width: 0; font-size: 13px; color: #667;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cf-amt {
  flex: 0 0 auto; font-weight: 700; font-size: 16px;
  color: var(--danger, #e5484d); white-space: nowrap;
}
.cf-mid {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 5px; font-size: 12px; color: #556;
}
.cf-method { color: #556; white-space: nowrap; flex: 0 0 auto; }
.cf-bot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.cf-tag {
  font-size: 11px; line-height: 1.6; padding: 2px 8px; border-radius: 999px;
  background: #f2f4f7; color: #667; white-space: nowrap;
}
.cf-tag.warn { background: #fff7e6; color: #b26a00; border: 1px solid #ffd591; }
.cf-tag.ok   { background: #e8f8ee; color: #1f9d61; border: 1px solid #a8e0bd; }
.cf-tag.bad  { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.cf-tag.fee  { background: #f0f5ff; color: #2F6BFF; border: 1px solid #adc6ff; }
.cf-empty { text-align: center; color: #999; padding: 18px 0; font-size: 13px; margin: 0; }

@media (max-width: 768px) {
  .cf-pc { display: none !important; }
  .cf-mobile { display: block; }
  /* 手机端卡片容器不再横滑（卡片本来就一屏宽） */
  .cf-block { overflow: visible; }
  .cf-block .cf-head { padding: 10px 12px; }
}

/* ============================================================
   【批42N 2026-10-04】财务页重做（经营视角）
   老板要的三件事：①赚没赚 ②钱在哪 ③哪最赚
   配色沿用后台：品牌蓝 #2F6BFF / 收入绿 #16a34a / 支出红 #dc2626
   ============================================================ */

/* ---------- 小节标题 ---------- */
.sec-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 20px 0 10px; }
.sec-h h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink, #1f2329); }
.sec-h .hint { font-size: 12px; color: var(--ink-3, #8a9099); }

/* ---------- ① 一眼看清：净利 ---------- */
.fin-hero {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between;
  background: linear-gradient(135deg, #f4f8ff, #eef3ff);
  border: 1px solid #d8e4ff; border-radius: 14px; padding: 16px 18px;
}
.fin-hero .fh-main { min-width: 220px; flex: 1 1 240px; }
.fin-hero .fh-cap { font-size: 12.5px; color: var(--ink-2, #5a6270); }
.fin-hero .fh-num { font-size: 30px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.fin-hero .fh-num.pos { color: #16a34a; }
.fin-hero .fh-num.neg { color: #dc2626; }
.fin-hero .fh-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fin-hero .fr-txt { font-size: 12.5px; color: var(--ink-2, #5a6270); }
.fin-hero .fh-side { min-width: 210px; flex: 0 1 260px; display: flex; flex-direction: column; gap: 7px; justify-content: center; }
.fin-hero .fh-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.fin-hero .fh-row .k { color: var(--ink-2, #5a6270); }
.fin-hero .fh-row b { font-variant-numeric: tabular-nums; }
.fin-hero .fh-row b.pos { color: #16a34a; }
.fin-hero .fh-row b.neg { color: #dc2626; }
.fin-hero .fh-row .v { color: var(--ink, #1f2329); }

/* 成本完整度提醒 */
.fin-warn {
  margin-top: 10px; padding: 10px 14px; border-radius: 10px;
  background: #fff8e6; border: 1px solid #ffe0a3; color: #8a5a00; font-size: 12.5px; line-height: 1.6;
}
.fin-warn b { color: #a35b00; }

/* ---------- ② 经营指标 ---------- */
.fk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fk-card {
  background: #fff; border: 1px solid var(--line, #e8eaed); border-radius: 12px; padding: 13px 14px;
}
.fk-card .fk-num { font-size: 24px; font-weight: 800; color: var(--brand, #2F6BFF); line-height: 1.2; font-variant-numeric: tabular-nums; }
.fk-card .fk-cap { font-size: 12.5px; color: var(--ink, #1f2329); margin-top: 3px; font-weight: 600; }
.fk-card .fk-sub { font-size: 11.5px; color: var(--ink-3, #8a9099); margin-top: 3px; }
.fk-note { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: #f5f7fb; border: 1px solid var(--line, #e8eaed); color: var(--ink-2, #5a6270); font-size: 12px; line-height: 1.7; }
.fk-note b { color: var(--ink, #1f2329); }

.fin-src { margin-top: 12px; background: #fff; border: 1px solid var(--line, #e8eaed); border-radius: 12px; padding: 12px 14px; }
.fin-src .fs-cap { font-size: 12px; color: var(--ink-2, #5a6270); margin-bottom: 8px; }
.fs-row { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.fs-row:last-child { margin-bottom: 0; }
.fs-name { flex: 0 0 92px; font-size: 12.5px; color: var(--ink, #1f2329); }
.fs-bar { flex: 1 1 auto; height: 8px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.fs-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6f9bff, #2F6BFF); border-radius: 999px; }
.fs-num { flex: 0 0 auto; font-size: 12px; color: var(--ink-2, #5a6270); font-variant-numeric: tabular-nums; }

/* ---------- ③ 钱在哪 ---------- */
.fa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fa-card {
  position: relative; background: #fff; border: 1px solid var(--line, #e8eaed);
  border-radius: 12px; padding: 14px 16px 13px 19px; overflow: hidden;
}
.fa-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.fa-card.fa-bank::before { background: linear-gradient(180deg, #4E86FF, #2F6BFF); }
.fa-card.fa-wx::before { background: linear-gradient(180deg, #34d399, #059669); }
.fa-card .fa-name { font-size: 13.5px; font-weight: 700; color: var(--ink, #1f2329); }
.fa-card .fa-desc { font-size: 11.5px; color: var(--ink-3, #8a9099); margin-top: 2px; }
.fa-card .fa-bal { font-size: 23px; font-weight: 800; margin: 7px 0 5px; font-variant-numeric: tabular-nums; color: var(--ink, #1f2329); }
.fa-card .fa-line { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2, #5a6270); }

/* 现金折叠条 */
.fa-cash { margin-top: 10px; background: #fff; border: 1px solid var(--line, #e8eaed); border-radius: 10px; overflow: hidden; }
.fa-cash-h { display: flex; align-items: center; gap: 9px; padding: 10px 14px; cursor: pointer; font-size: 12.5px; }
.fa-cash-h .n { font-weight: 600; color: var(--ink, #1f2329); }
.fa-cash-h .note { color: var(--ink-3, #8a9099); font-size: 11.5px; }
.fa-cash-h .amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.fa-cash-h .tog { color: var(--ink-3, #8a9099); }
.fa-cash-b { padding: 0 14px 12px; font-size: 12px; color: var(--ink-2, #5a6270); }
.fa-cash-b .fc-line { padding-top: 2px; }
.fa-cash-b .fc-tip { margin-top: 5px; color: var(--ink-3, #8a9099); font-size: 11.5px; }

/* ---------- ④ 布草洗涤 ---------- */
.la-card { background: #fff; border: 1px solid var(--line, #e8eaed); border-radius: 12px; padding: 14px; }
.la-month { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.la-month .lm-cur { font-size: 14px; font-weight: 700; color: var(--ink, #1f2329); font-variant-numeric: tabular-nums; }
.la-box { border: 1px solid #eef0f3; border-radius: 10px; padding: 12px; margin-bottom: 12px; background: #fcfdff; }
.la-box-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--ink, #1f2329); }
.la-box-h small { font-weight: 400; font-size: 11.5px; color: var(--ink-3, #8a9099); }
.la-edit-act { display: inline-flex; gap: 6px; }
.la-units { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.la-unit { position: relative; background: #fff; border: 1px solid var(--line, #e8eaed); border-radius: 9px; padding: 8px 10px; }
.la-unit.editing { border-color: var(--brand, #2F6BFF); box-shadow: 0 0 0 2px rgba(47, 107, 255, .12); }
.la-unit .lu-name { font-size: 11.5px; color: var(--ink-2, #5a6270); }
.la-unit .lu-price { display: flex; align-items: center; gap: 3px; margin-top: 3px; }
.la-unit .lu-price span { color: var(--ink-3, #8a9099); font-size: 11.5px; font-weight: 700; }
.la-unit .lu-price input {
  border: 0; outline: 0; width: 100%; font-size: 14px; font-weight: 800; font-family: inherit;
  color: var(--brand, #2F6BFF); background: transparent; -moz-appearance: textfield;
}
.la-unit .lu-price input:read-only { color: var(--ink, #1f2329); }
.la-unit .lu-del {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  border: 0; background: #ff4d4f; color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: none;
}
.la-unit.editing .lu-del { display: block; }
.la-unit.add {
  display: flex; align-items: center; justify-content: center; border-style: dashed;
  color: var(--ink-3, #8a9099); font-size: 12.5px; cursor: pointer; min-height: 52px;
}
.la-unit.add:hover { border-color: var(--brand, #2F6BFF); color: var(--brand, #2F6BFF); background: #f4f8ff; }
.la-newitem { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.la-newitem input { border: 1px solid var(--line-strong, #d9d9d9); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; }
.la-newitem input[type="text"] { flex: 1 1 150px; }
.la-newitem input[type="number"] { flex: 0 0 100px; }
.la-tip { margin-top: 10px; font-size: 11.5px; color: var(--ink-3, #8a9099); line-height: 1.6; }
.la-tip b { color: #8a5a00; }

.la-empty { padding: 14px; text-align: center; color: var(--ink-3, #8a9099); font-size: 12.5px; background: #fafbfc; border-radius: 9px; }
.la-rec { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid #eef0f3; border-radius: 9px; margin-bottom: 7px; font-size: 13px; }
.la-rec .lr-date { font-variant-numeric: tabular-nums; color: var(--ink, #1f2329); }
.la-rec .lr-amt { font-weight: 700; font-variant-numeric: tabular-nums; color: #dc2626; }
.la-rec .lr-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.la-rec .lr-tag.ok { background: #e8f7ee; color: #16a34a; }
.la-rec .lr-tag.wait { background: #fff4e6; color: #d97706; }
/* 【批50 2026-10-11】「改」按钮：记录行原来只有删除，现在加一个「改」。margin-left:auto 从 .lr-del 转移到 .lr-edit，两个按钮才会靠右排一起。 */
.la-rec .lr-edit { margin-left: auto; border: 0; background: transparent; color: #9aa3af; font-size: 12px; cursor: pointer; line-height: 1; padding: 6px 8px; }
.la-rec .lr-edit:hover { color: #2563eb; }
.la-rec .lr-del { border: 0; background: transparent; color: #c0c4cc; font-size: 16px; cursor: pointer; line-height: 1; margin-left: 8px; }
.la-rec .lr-del:hover { color: #dc2626; }

.la-settle { background: linear-gradient(135deg, #f2fbf6, #eaf6ff); border: 2px solid #a8e0bd; border-radius: 12px; padding: 13px 14px; }
.la-settle .ls-h { font-size: 13px; font-weight: 700; color: var(--ink, #1f2329); margin-bottom: 9px; }
.ls-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; color: var(--ink-2, #5a6270); }
.ls-row .v { font-variant-numeric: tabular-nums; }
.ls-row.total { border-top: 1px dashed #b7dcc7; margin-top: 6px; padding-top: 8px; font-size: 14px; font-weight: 700; color: var(--ink, #1f2329); }
.ls-row.total .v { color: #dc2626; }
.ls-row.unpaid .v { color: #d97706; font-weight: 700; }
.la-pay { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 12px 0 10px; }
.la-pay .lp-cap { font-size: 12.5px; color: var(--ink-2, #5a6270); }
.lp-btn {
  border: 1px solid var(--line-strong, #d9d9d9); background: #fff; border-radius: 8px;
  padding: 6px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit; color: var(--ink-2, #5a6270);
}
.lp-btn.on { border-color: var(--brand, #2F6BFF); background: #f2f6ff; color: var(--brand, #2F6BFF); font-weight: 700; }
.la-pay-btn { width: 100%; }

/* 布草收送弹窗 */
.la-qty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; margin: 4px 0 10px; }
.la-qty-grid .lq { background: #fafbfc; border: 1px solid #eef0f3; border-radius: 9px; padding: 8px 9px; }
.la-qty-grid .lq-name { font-size: 11.5px; color: var(--ink-2, #5a6270); }
.la-qty-grid .lq input { width: 100%; border: 0; border-bottom: 1px solid #dfe3e8; background: transparent; font-size: 15px; font-weight: 700; font-family: inherit; padding: 3px 0; outline: 0; }
.la-qty-grid .lq-price { font-size: 11px; color: var(--ink-3, #8a9099); margin-top: 3px; }
.lq-total { font-size: 13px; color: var(--ink-2, #5a6270); margin-bottom: 10px; }
.lq-total b { color: #dc2626; font-size: 16px; }
.lq-total .lq-cnt { color: var(--ink-3, #8a9099); font-size: 11.5px; }

/* ---------- ⑤ 记一笔支出 ---------- */
.qe-card { background: #fff; border: 1px solid var(--line, #e8eaed); border-radius: 12px; padding: 14px; }
.qe-cats { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.qe-cat {
  border: 1px solid var(--line-strong, #d9d9d9); background: #fff; border-radius: 999px;
  padding: 6px 13px; font-size: 12.5px; cursor: pointer; font-family: inherit; color: var(--ink-2, #5a6270);
}
.qe-cat.on { border-color: var(--brand, #2F6BFF); background: var(--brand, #2F6BFF); color: #fff; font-weight: 700; }
.qe-cat.add { border-style: dashed; color: var(--ink-3, #8a9099); }
.qe-newcat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.qe-newcat input { border: 1px solid var(--line-strong, #d9d9d9); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; flex: 0 1 190px; }
.qe-custom-tag { display: inline-flex; align-items: center; gap: 4px; background: #f2f6ff; border: 1px solid #c9daff; border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 12px; color: var(--brand, #2F6BFF); }
.qe-custom-tag button { border: 0; background: transparent; color: #9db4e8; cursor: pointer; font-size: 14px; line-height: 1; }
.qe-subs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.qe-cap { font-size: 12.5px; color: var(--ink-2, #5a6270); }
.qe-sub { border: 1px solid var(--line, #e8eaed); background: #fafbfc; border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--ink-2, #5a6270); }
.qe-sub.on { border-color: var(--brand, #2F6BFF); background: #f2f6ff; color: var(--brand, #2F6BFF); font-weight: 700; }
.qe-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.qe-amt { display: flex; align-items: center; gap: 5px; background: #fff; border: 1px solid var(--line-strong, #d9d9d9); border-radius: 9px; padding: 8px 11px; }
.qe-amt > span { color: var(--ink-3, #8a9099); font-weight: 700; }
.qe-amt input { border: 0; outline: 0; width: 110px; font-size: 16px; font-weight: 800; font-family: inherit; }
.qe-date { border: 1px solid var(--line-strong, #d9d9d9); border-radius: 9px; padding: 8px 11px; font-size: 13.5px; font-family: inherit; }
.qe-note { flex: 1 1 200px; border: 1px solid var(--line-strong, #d9d9d9); border-radius: 9px; padding: 8px 11px; font-size: 13.5px; font-family: inherit; }
.qe-photos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.qe-photo-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line-strong, #d9d9d9);
  border-radius: 9px; padding: 8px 13px; font-size: 12.5px; color: var(--ink-2, #5a6270); cursor: pointer;
}
.qe-photo-btn:hover { border-color: var(--brand, #2F6BFF); color: var(--brand, #2F6BFF); }
.qe-photo-btn input { display: none; }
.qe-thumb { position: relative; display: inline-block; }
.qe-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #e8eaed); display: block; }
.qe-thumb button {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%;
  border: 0; background: #ff4d4f; color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
}
.qe-photo-tip { font-size: 11.5px; color: var(--ink-3, #8a9099); }
.qe-save { width: 100%; }

/* ---------- ⑥ 支出都花哪了 ---------- */
.fin-expcat { background: #fff; border: 1px solid var(--line, #e8eaed); border-radius: 12px; padding: 13px 14px; }
.ec-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ec-row:last-child { margin-bottom: 0; }
.ec-name { flex: 0 0 96px; font-size: 12.5px; color: var(--ink, #1f2329); }
.ec-bar { flex: 1 1 auto; height: 9px; background: #f2f4f7; border-radius: 999px; overflow: hidden; }
.ec-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb27a, #f0653a); border-radius: 999px; }
.ec-num { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; color: #dc2626; font-variant-numeric: tabular-nums; }

/* ---------- 详细分析折叠 ---------- */
.fin-detail-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer;
  margin: 20px 0 12px; padding: 11px 14px; background: #f7f9fc;
  border: 1px solid #e6ebf2; border-radius: 10px;
}
.fin-detail-head .fdh-t { font-size: 13.5px; font-weight: 700; color: var(--ink, #1f2329); }
.fin-detail-head .fdh-s { font-size: 11.5px; color: var(--ink-3, #8a9099); }
.fin-detail-head .fdh-tog { margin-left: auto; font-size: 12.5px; color: var(--brand, #2F6BFF); }

/* ---------- ⑦ 明细（电脑表格 / 手机卡片） ---------- */
.txn-pc { display: block; }
.txn-mb { display: none; }
.txn-more { margin-top: 12px; text-align: center; }
.txn-count { margin-top: 8px; font-size: 12px; color: var(--ink-3, #8a9099); text-align: right; }

.tx-card { background: #fff; border: 1px solid var(--line, #e8eaed); border-radius: 11px; padding: 11px 13px; margin-bottom: 9px; }
.tx-card .tc-r1 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tx-card .tc-cat { font-size: 13.5px; font-weight: 700; color: var(--ink, #1f2329); }
.tx-card .tc-amt { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tx-card.income .tc-amt { color: #16a34a; }
.tx-card.expense .tc-amt { color: #dc2626; }
.tx-card .tc-r2 { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3, #8a9099); margin-top: 4px; }
.tx-card .tc-r3 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.tx-card .tc-note { font-size: 11.5px; color: var(--ink-2, #5a6270); flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-btn { border: 1px solid var(--line-strong, #d9d9d9); background: #fff; border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--ink-2, #5a6270); }
.tc-btn.danger { color: #dc2626; border-color: #ffc9c9; }
.tx-empty { padding: 30px; text-align: center; color: var(--ink-3, #8a9099); font-size: 13px; }

/* ---------- 手机端 ---------- */
@media (max-width: 768px) {
  /* 🔴 手机端竖排后，横排时的 flex-basis 会变成高度，把块硬撑高 ⇒ 卡片内部一片空白（真机截图抓到） */
  .fin-hero { flex-direction: column; justify-content: flex-start; gap: 12px; padding: 14px; }
  .fin-hero .fh-main { flex: 0 0 auto; min-width: 0; }
  .fin-hero .fh-side { flex: 0 0 auto; min-width: 0; width: 100%; justify-content: flex-start; gap: 6px; }
  .fin-hero .fh-num { font-size: 26px; }
  /* 省空：日期文字独占一行，两个按钮并排 */
  .fin-hero .fh-range { margin-top: 8px; }
  .fin-hero .fh-range .fr-txt { flex: 1 1 100%; }
  .fin-hero .fh-range .btn { flex: 0 0 auto; }
  .fk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .fk-card { padding: 11px 12px; }
  .fk-card .fk-num { font-size: 20px; }
  .fa-grid { grid-template-columns: 1fr; gap: 9px; }
  .la-units { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .la-card { padding: 11px; }
  .ls-row.total { font-size: 13px; }
  .qe-cats { gap: 6px; }
  .qe-cat { padding: 6px 11px; font-size: 12px; }
  .ec-name { flex: 0 0 78px; font-size: 12px; }
  .txn-pc { display: none; }
  .txn-mb { display: block; }
}

/* ============================================================
   【批42Q 2026-10-04】顶部「改时间段」就地展开面板
   🔴 根因：42N 重做财务页时按钮错绑成 finDetailOpen（详细分析开关），
      真正的时间段选择器被收在折叠区里 ⇒ 老板点「改时间段」看不到任何变化。
   面板复用老报表已有的类（fin-period-btn / fin-date-input / fin-date-sep）保持视觉一致。
   🔴 order:99 —— 面板在 DOM 上插在 .fh-main 之后、.fh-side 之前（见 index.html），
      但 .fin-hero 是 flex-wrap:wrap，若不重排会插到两列中间 ⇒ 用 order 排到最后一行。
   🔴 手机端（.fin-hero 变 column）复位 flex —— **防御性写法**：
      竖排下 flex-basis 会变成高度（42N 在净利卡上踩过：flex:1 1 240px 撑出 240px 高）。
      注意本面板用的是**百分比**（flex:1 1 100%），而 .fin-hero 高度是 auto
      ⇒ 百分比基值解析为 auto，实测不会撑高（slack≈1px，拆掉这条也绿）。
      保留理由：将来若给 .fin-hero 设了确定高度/min-height，这条立刻变必需。
   ============================================================ */
.fin-period-pop {
  order: 99;
  flex: 1 1 100%;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line, #e8eaed);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 2px 10px rgba(31, 35, 41, .04);
}
.fpp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fpp-cap { flex: 0 0 auto; font-size: 12.5px; color: var(--ink-2, #5a6270); font-weight: 600; }
.fpp-quick { gap: 6px; }
.fpp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  border-top: 1px dashed var(--line, #e8eaed); padding-top: 9px; margin-top: 2px;
}
.fpp-cur { font-size: 12.5px; color: var(--ink-2, #5a6270); }
.fpp-cur b { color: var(--brand, #2F6BFF); font-variant-numeric: tabular-nums; }

@media (max-width: 768px) {
  /* 🔴 竖排下必须复位 flex（否则 flex-basis 100% 变成高度，面板被撑高一大截） */
  .fin-period-pop { flex: 0 0 auto; width: 100%; padding: 11px; gap: 8px; }
  .fpp-row { gap: 6px; }
  .fpp-row .fin-date-input { flex: 1 1 120px; min-width: 0; }
  .fpp-foot { justify-content: stretch; gap: 8px; }
  .fpp-foot .btn { width: 100%; }
}
