/* ============================================================
   财务中心 · 新版外壳（2026-11-30）
   只覆盖余额头部 + 标签页/表格观感，业务列与逻辑不动
   ============================================================ */
.fn-page {
  max-width: 1240px;
  min-width: 0;
  margin: 0 auto;
  padding-bottom: 24px;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

/* ---------- 页面标题 ---------- */
.fn-head { margin-bottom: 14px; }
.fn-title { margin: 0; font-size: 22px; font-weight: 700; color: #111827; }

/* ---------- 余额卡片 ---------- */
.fn-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
  padding: 20px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2f54eb 0%, #4f76f5 55%, #6d90f8 100%);
  color: #fff;
  box-shadow: 0 12px 28px -18px rgba(47, 84, 235, .65);
}
.fn-hero-left { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.fn-hero-label {
  font-size: 13px;
  color: rgba(255, 255, 255, .82);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.fn-hero-pending { font-size: 12px; color: rgba(255, 255, 255, .9); }
.fn-hero-pending b { font-weight: 600; }
.fn-hero-num {
  margin-top: 6px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .3px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  word-break: break-all;
}
.fn-hero-cur { font-size: 17px; font-weight: 600; opacity: .92; }
.fn-hero-actions { margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fn-hero-actions .el-button.fn-btn {
  height: 34px;
  padding: 0 18px;
  margin: 0;
  border-radius: 8px;
  font-size: 13px;
  line-height: 32px;
}
.fn-hero-actions .el-button.fn-btn--main {
  background: #fff;
  border-color: #fff;
  color: #2f54eb;
  font-weight: 600;
}
.fn-hero-actions .el-button.fn-btn--main:hover { background: #ecf0ff; border-color: #ecf0ff; color: #1d39c4; }
.fn-hero-actions .el-button.fn-btn:not(.fn-btn--main) {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .42);
  color: #fff;
}
.fn-hero-actions .el-button.fn-btn:not(.fn-btn--main):hover { background: rgba(255, 255, 255, .28); }
.fn-link {
  font-size: 13px;
  color: #fff;
  text-decoration: none;
  opacity: .9;
  cursor: pointer;
}
.fn-link:hover { opacity: 1; text-decoration: underline; }

.fn-hero-stats {
  flex: 0 1 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.fn-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
}
.fn-stat-name { font-size: 12px; color: rgba(255, 255, 255, .85); display: flex; align-items: center; gap: 4px; }
.fn-stat-help { cursor: pointer; opacity: .8; }
.fn-stat-val { font-size: 16px; font-weight: 600; color: #fff; word-break: break-all; }
.fn-stat-link { font-size: 12px; color: rgba(255, 255, 255, .88); cursor: pointer; text-decoration: underline; }

/* ---------- 标签页 ---------- */
.fn-page .content_box { margin-top: 18px; background: #fff; border: 1px solid #e8edf5; border-radius: 14px; padding: 4px 18px 14px; }
.fn-page .content_tab .el-tabs__header { margin-bottom: 10px; }
.fn-page .content_tab .el-tabs__nav-wrap::after { height: 1px; background: #eef1f6; }
.fn-page .content_tab .el-tabs__item { height: 46px; line-height: 46px; font-size: 14px; color: #6b7280; }
.fn-page .content_tab .el-tabs__item.is-active { color: #2f54eb; font-weight: 600; }
.fn-page .content_tab .el-tabs__active-bar { background: #2f54eb; height: 2px; border-radius: 2px; }

/* ---------- 工具栏 ---------- */
.fn-page .content_searchbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 14px;
}
.fn-page .content_searchbar .left_tips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fn-page .content_searchbar .left_tips .el-button { height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13px; margin: 0; }
.fn-page .content_searchbar .tips_item { font-size: 12px; color: #6b7280; display: flex; align-items: center; gap: 5px; }
.fn-page .content_searchbar .tips_item .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.fn-page .content_searchbar .searchbar.com-search { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fn-page .content_searchbar .searchbar .el-input__inner { height: 32px; line-height: 32px; border-radius: 8px; }

/* ---------- 表格 ---------- */
.fn-page .tabledata .el-table th.el-table__cell {
  background: #f7f9fc;
  color: #6b7280;
  font-weight: 600;
  font-size: 13px;
  height: 42px;
  padding: 0;
}
.fn-page .tabledata .el-table td.el-table__cell { height: 52px; padding: 0; font-size: 13px; color: #374151; }
.fn-page .tabledata .el-table::before { height: 0; }
.fn-page .tabledata .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell { background: #f8faff; }
.fn-page .tabledata .el-tag { border-radius: 999px; height: 24px; line-height: 22px; padding: 0 10px; border: none; font-size: 12px; }
.fn-page .tabledata .a-text { color: #2f54eb; cursor: pointer; }
.fn-page .tabledata .a-text:hover { text-decoration: underline; }
.fn-page .tabledata .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.fn-page .tabledata .more-operation,
.fn-page .tabledata .operation-item { color: #2f54eb; cursor: pointer; }
.fn-page .tabledata .operation-box { display: flex; align-items: center; gap: 8px; }

/* 分页 */
.fn-page .tabledata .el-pagination { justify-content: flex-end; margin-top: 14px; }

/* ============================================================
   移动端：表格→卡片列表（2026-11-30）
   ============================================================ */
@media screen and (max-width: 768px) {
  .fn-title { font-size: 20px; }
  .fn-page { padding-bottom: 16px; }
  .fn-hero { padding: 16px; border-radius: 12px; gap: 12px; }
  .fn-hero-num { font-size: 28px; }
  .fn-hero-actions { margin-top: 12px; }
  .fn-hero-actions .el-button.fn-btn { height: 32px; padding: 0 14px; }
  .fn-hero-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .fn-page .content_box { margin-top: 14px; padding: 0 12px 12px; border-radius: 12px; }

  /* 有移动卡片的标签页：隐藏表格，显示卡片 */
  .fn-page .content_table.fn-has-mob .tabledata { display: none; }
  .fn-page .content_table.fn-has-mob .mobel { display: block; margin-top: 0; }

  /* 顶部工具栏收成两行 */
  .fn-page .content_searchbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0; }
  .fn-page .content_searchbar .left_tips { width: 100%; order: 2; }
  .fn-page .content_searchbar .left_tips .el-button { height: 30px; padding: 0 12px; font-size: 12px; }
  .fn-page .content_searchbar .left_tips .tips_item { font-size: 11px; }
  .fn-page .content_searchbar .searchbar.com-search { width: 100%; order: 1; flex-direction: column; gap: 8px; }
  .fn-page .content_searchbar .searchbar.com-search .el-select,
  .fn-page .content_searchbar .searchbar.com-search .el-input { width: 100% !important; margin-left: 0 !important; }
  .fn-page .content_searchbar .searchbar.com-search .el-input__inner { height: 36px; line-height: 36px; }

  /* 移动端不再单独放一个搜索框（已在工具栏里） */
  .fn-page .mob-searchbar { display: none; }

  /* 卡片 */
  .fn-page .mob-tabledata { display: flex; flex-direction: column; gap: 10px; border: 0; border-radius: 0; }
  .fn-page .mob-tabledata-item {
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 13px;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    background: #fff;
  }
  .fn-page .mob-tabledata-item + .mob-tabledata-item { border-top: 1px solid #e8edf5; }
  .fn-page .mob-item-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 0; min-width: 0; }
  .fn-page .mob-item-row1 { font-size: 12px; color: #9ca3af; }
  .fn-page .mob-item-row2 { font-size: 14px; font-weight: 600; color: #111827; }
  .fn-page .mob-item-row2-name { flex: 1 1 auto; min-width: 0; width: auto; }
  .fn-page .mob-item-row2 .row2-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
  .fn-page .mob-item-row3 { font-size: 12px; color: #6b7280; flex-wrap: wrap; }
  .fn-page .mob-item-row-notes { font-size: 12px; color: #9ca3af; }
  .fn-page .mob-item-row-child { background: transparent; display: block; margin: 0; }
  .fn-page .child-row { font-size: 12px; margin: 0; line-height: 1.6; color: #6b7280; }
  .fn-page .child-row:nth-child(1) { margin-top: 0; }
  .fn-page .child-row-name { width: auto; max-width: 60%; }
  .fn-page .mob-tabledata-item .el-tag { height: 22px; line-height: 20px; padding: 0 9px; font-size: 11px; border-radius: 999px; }

  /* 卡片底部操作行 */
  .fn-page .mob-ops {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 9px;
    border-top: 1px dashed #eef1f6;
  }
  .fn-page .mob-op {
    font-size: 12px;
    color: #2f54eb;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 10px;
    border: 1px solid #d5e0f5;
    border-radius: 7px;
    line-height: 1.3;
    white-space: nowrap;
  }
  .fn-page .mob-op:active { background: #eff4ff; }
  .fn-page .mob-op--main { background: #2f54eb; border-color: #2f54eb; color: #fff; }
  .fn-page .mob-op--link { border: 0; padding: 4px 2px; color: #6b7280; }

  .fn-page .back-top-img { width: 44px; right: 12px; bottom: 24px; }
  .fn-page .bottom-text { display: none; }
  .fn-page .tabledata .el-pagination { justify-content: center; }
}

/* 非 mobel 的标签页（代金券/合同等）在手机上也别横撑 */
@media screen and (max-width: 768px) {
  .fn-page .content_table:not(.fn-has-mob) .tabledata { display: block; }
}
