/*
  关键样式兜底（2026-09-23）
  ============================================================================
  背景：生产环境出现「主 CSS 未加载」——Vant 基础样式与 styles/global.css
  打包在同一个主 CSS 文件（dist/assets 下的 index-[hash].css）里，
  该文件在某些部署环境下没被浏览器拿到，于是：
    · 字体退化成浏览器默认字体（--van-base-font 未定义）
    · 状态胶囊 / 列表实心按钮没有底色
    · 字段值不再是 12px、弹窗底部按钮不并排、返回箭头看不到
  而页面 scoped 样式与各 chunk CSS 仍正常（它们在别的文件里）。

  本文件放在 public/ 下、由 index.html 直接 link 引入（与 boot.css 同机制，
  路径不在 /assets 下），作为「关键规则」的兜底。
  ⚠️ 取值一律与 src/styles/global.css 保持一致，那边仍是唯一正式口径；
     主 CSS 正常加载时本文件几乎无副作用（同值，且加载顺序在主 CSS 之前）。
  ⚠️ 部署问题修好后，可整体删除本文件 + index.html 里对应的那一行 link。

  约定：本文件只用「纯兜底」规则，不写页面级样式；改动前请同步 global.css。
  ============================================================================
*/

/* 1) Vant 基础字体变量 —— 主 CSS 缺失时 body 的 font-family 会退化成默认字体 */
:root {
  --van-base-font: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
    'Segoe UI', Arial, Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
}
html,
body {
  font-family: var(--van-base-font);
}

/* 2) 状态胶囊 + 色板（同 global.css，管理端 .mgmt-page 下再紧一档） */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.35;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.mgmt-page .status-pill {
  padding: 2px 7px;
  font-size: 10px;
  border-radius: 9px;
}
.pill-green  { background: #16A34A; color: #ffffff; }
.pill-red    { background: #EF4444; color: #ffffff; }
.pill-blue   { background: #5B8FF9; color: #ffffff; }
.pill-orange { background: #F59E0B; color: #ffffff; }
.pill-gray   { background: #5C6470; color: #ffffff; }
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 5px;
  display: inline-block;
}
.pill-green .status-dot,
.pill-red .status-dot,
.pill-blue .status-dot,
.pill-orange .status-dot,
.pill-gray .status-dot {
  background: #ffffff;
}

/* 3) 列表实心操作按钮 */
.btn-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 11px;
}
.van-button.btn-list {
  border: none !important;
  border-radius: 13px !important;
  height: 26px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}
.van-button.btn-list .van-button__text {
  color: #ffffff !important;
  font-size: 11px !important;
}
.van-button.btn-list-primary { background-color: #2B6BFF !important; }
.van-button.btn-list-success { background-color: #16A34A !important; }
.van-button.btn-list-warning { background-color: #F59E0B !important; }
.van-button.btn-list-danger  { background-color: #EF4444 !important; }
.van-button.btn-list-neutral { background-color: #5C6470 !important; }
.van-button.btn-list-orange  { background-color: #F59E0B !important; }

/* 4) 字段值字号 + 名义本金 / 金额强调 */
.meta-value { font-size: 12px !important; }
.notional-value {
  color: #389E0D !important;
  font-weight: 700 !important;
  font-size: 15px !important;
}
.amount-value { color: #389E0D; font-weight: 700; font-size: 15px; }
.amount-currency {
  margin-left: 3px;
  font-size: 11px;
  font-weight: 400;
  color: #969799;
}

/* 5) 弹窗底部「取消 + 确认」并排 */
.form-actions-row {
  display: flex;
  gap: 12px;
}
.form-actions-row .van-button {
  flex: 1;
  margin: 0;
}

/* 6) 弹窗左上角返回箭头（位置/层级/隐藏内置 ✕；点击逻辑复用 Vant closeable） */
.admin-form-popup .van-popup__close-icon {
  left: 12px !important;
  right: auto !important;
  width: 26px !important;
  height: 26px !important;
  font-size: 0 !important;
  z-index: 10 !important;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M15%204.5L7.5%2012l7.5%207.5'%20fill='none'%20stroke='%23969799'%20stroke-width='2.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
}
.admin-form-popup.popup-full .van-popup__close-icon {
  /* fixed：避免弹窗内容滚动时箭头跟着移动、与吸顶标题栏错位（同 global.css） */
  position: fixed !important;
  top: calc(15px + env(safe-area-inset-top, 0px)) !important;
  left: 12px !important;
  color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M15%204.5L7.5%2012l7.5%207.5'%20fill='none'%20stroke='%23ffffff'%20stroke-width='2.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
