/**
 * 云付通统一 UI — 浅色金融台风格（青绿主色，扁平，自适应）
 * 覆盖管理端 / 商户端公共组件；小程序不引用
 */
:root {
  --yft-bg: #f4f6f8;
  --yft-surface: #ffffff;
  --yft-line: #e8edf3;
  --yft-border: #d5dee8;
  --yft-text: #0f172a;
  --yft-muted: #64748b;
  --yft-faint: #94a3b8;
  --yft-accent: #0f766e;
  --yft-accent-hover: #0d9488;
  --yft-accent-soft: #ccfbf1;
  --yft-danger: #b91c1c;
  --yft-ok: #15803d;
  --yft-radius: 10px;
  --yft-radius-sm: 8px;
  --yft-font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --yft-side-w: 232px;
  --yft-side-w-collapsed: 72px;
}

/* ===== 页面壳 ===== */
.admin-page-shell,
.admin-layout .container-fluid.admin-page-shell {
  max-width: none;
  margin: 0;
  padding: 0 !important;
  float: none !important;
  width: 100%;
}

.admin-page-card,
.mu-page-card,
.admin-inner-card {
  background: var(--yft-surface) !important;
  border: 1px solid var(--yft-line) !important;
  border-radius: var(--yft-radius) !important;
  box-shadow: none !important;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 顶栏已有标题时，隐藏页内重复标题 */
.yft-page-toolbar ~ .admin-page-shell .admin-page-head,
.yft-page-toolbar ~ .admin-page-card > .admin-page-head,
.yft-page-toolbar ~ .mu-page-card > .mu-page-head,
.yft-page-toolbar ~ .container-fluid .admin-page-head {
  display: none !important;
}

/* 商户主区：禁止旧 app.css 再叠一层 margin，避免左右错位 */
body.yft-merchant .mu-main,
body.jeepay-merchant .mu-main {
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}
body.yft-merchant .mu-main > .app-content,
body.jeepay-merchant .mu-main > .app-content,
body.yft-merchant .mu-main > .app-footer,
body.jeepay-merchant .mu-main > .app-footer,
body.yft-merchant .app-content-body,
body.jeepay-merchant .app-content-body {
  margin-left: 0 !important;
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.admin-layout .admin-content {
  padding: 14px 18px 28px !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

body.yft-merchant .app-content,
body.jeepay-merchant .app-content {
  padding: 14px 18px 28px !important;
}

/* ===== 顶栏返回 ===== */
.yft-page-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  min-height: 36px;
}
.yft-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px 6px 8px;
  border: 1px solid var(--yft-border);
  border-radius: var(--yft-radius-sm);
  background: #fff;
  color: #334155;
  font-size: 13px;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.yft-back-btn:hover,
.yft-back-btn:focus {
  border-color: var(--yft-accent);
  color: var(--yft-accent);
}
.yft-page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--yft-text);
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 按钮 ===== */
.admin-layout .btn,
body.yft-merchant .btn,
body.jeepay-merchant .btn,
body.premium-admin-login .btn,
body.premium-user-login .btn {
  border-radius: var(--yft-radius-sm) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  min-height: 34px;
}

.admin-layout .btn-primary,
body.yft-merchant .btn-primary,
body.jeepay-merchant .btn-primary,
body.premium-admin-login .btn-primary,
body.premium-user-login .btn-primary,
.auth-submit {
  background: var(--yft-accent) !important;
  border-color: var(--yft-accent) !important;
  color: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}

.admin-layout .btn-primary:hover,
.admin-layout .btn-primary:focus,
body.yft-merchant .btn-primary:hover,
body.jeepay-merchant .btn-primary:hover,
body.premium-admin-login .btn-primary:hover,
body.premium-user-login .btn-primary:hover,
.auth-submit:hover,
.auth-submit:focus {
  background: var(--yft-accent-hover) !important;
  border-color: var(--yft-accent-hover) !important;
  color: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}

.admin-layout .btn-default,
body.yft-merchant .btn-default,
body.jeepay-merchant .btn-default {
  background: #fff !important;
  border-color: var(--yft-border) !important;
  color: #334155 !important;
}
.admin-layout .btn-default:hover,
body.yft-merchant .btn-default:hover {
  border-color: var(--yft-accent) !important;
  color: var(--yft-accent) !important;
}

/* ===== 表单控件 ===== */
.admin-layout .form-control,
body.yft-merchant .form-control,
body.jeepay-merchant .form-control,
body.premium-admin-login .form-control,
body.premium-user-login .form-control {
  height: 36px !important;
  border-radius: var(--yft-radius-sm) !important;
  border: 1px solid var(--yft-border) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  color: var(--yft-text) !important;
  background: #fff !important;
}
.admin-layout .form-control:focus,
body.yft-merchant .form-control:focus,
body.jeepay-merchant .form-control:focus,
body.premium-admin-login .form-control:focus,
body.premium-user-login .form-control:focus {
  border-color: var(--yft-accent) !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12) !important;
}

textarea.form-control {
  height: auto !important;
  min-height: 88px;
}

/* ===== 筛选条（横向一行，标签在左） ===== */
.admin-filter-compact.admin-filter-form {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 12px !important;
  padding: 12px 16px !important;
  background: #fff !important;
  border-bottom: 1px solid var(--yft-line) !important;
  box-sizing: border-box;
  width: 100%;
}

.admin-filter-compact .admin-filter-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 14px !important;
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
}

.admin-filter-compact .admin-filter-item {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  width: auto !important;
  max-width: none !important;
}

.admin-filter-compact .admin-filter-item label {
  display: inline-block !important;
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--yft-muted) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

.admin-filter-compact .admin-filter-item .form-control {
  width: auto !important;
  min-width: 120px !important;
  max-width: 220px !important;
  flex: 0 0 auto;
}

.admin-filter-compact .admin-filter-item.admin-filter-span-2 {
  flex: 1 1 260px !important;
  min-width: 220px !important;
  max-width: 420px !important;
}
.admin-filter-compact .admin-filter-item.admin-filter-span-2 .form-control,
.admin-filter-compact .admin-filter-item.admin-filter-span-2 .dates,
.admin-filter-compact .admin-filter-item.admin-filter-span-2 .input-daterange {
  max-width: none !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 auto;
}

.admin-filter-actions {
  display: inline-flex !important;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 !important;
  flex: 0 0 auto;
}

/* ===== 表格 ===== */
.admin-table-panel,
.mu-table-panel {
  background: #fff;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.bootstrap-table,
.fixed-table-container,
.fixed-table-body {
  width: 100% !important;
  max-width: 100%;
}

.fixed-table-body {
  overflow-x: auto !important;
}

.bootstrap-table .table,
.admin-layout .table,
body.yft-merchant .table,
.jeepay-table {
  background: #fff !important;
  table-layout: auto;
  width: 100% !important;
  margin: 0 !important;
}

.bootstrap-table .table > thead > tr > th,
.admin-layout .table > thead > tr > th,
body.yft-merchant .table > thead > tr > th {
  background: #f8fafc !important;
  border-bottom: 1px solid var(--yft-line) !important;
  color: var(--yft-muted) !important;
  font-weight: 550 !important;
  font-size: 12px !important;
  white-space: nowrap;
}

.bootstrap-table .table > tbody > tr > td,
.admin-layout .table > tbody > tr > td,
body.yft-merchant .table > tbody > tr > td {
  border-top: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
  color: #334155;
  font-size: 13px;
}

.bootstrap-table .fixed-table-pagination,
.bootstrap-table .fixed-table-toolbar {
  padding: 10px 14px !important;
  background: #fff;
}

/* ===== 内页卡片头 ===== */
.admin-inner-card-head,
.admin-table-card-head,
.panel-heading {
  background: #fafbfc !important;
  border-bottom: 1px solid var(--yft-line) !important;
  padding: 12px 16px !important;
}
.admin-inner-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--yft-text);
}
.admin-inner-card-body,
.panel-body {
  padding: 16px !important;
}

/* ===== Tabs ===== */
.tab-container > .nav-tabs {
  border-bottom: 1px solid var(--yft-line) !important;
  padding: 0 12px;
  background: #fff;
}
.tab-container > .nav-tabs > li > a {
  color: var(--yft-muted) !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  margin: 0 4px !important;
  padding: 12px 10px !important;
}
.tab-container > .nav-tabs > li.active > a,
.tab-container > .nav-tabs > li.active > a:hover,
.tab-container > .nav-tabs > li.active > a:focus {
  color: var(--yft-accent) !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid var(--yft-accent) !important;
  font-weight: 600 !important;
}

/* ===== 登录页 ===== */
body.premium-admin-login,
body.premium-user-login {
  min-height: 100vh;
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(15, 118, 110, 0.10), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(15, 23, 42, 0.05), transparent 50%),
    var(--yft-bg) !important;
  font-family: var(--yft-font) !important;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff !important;
  border: 1px solid var(--yft-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  padding: 36px 32px 30px !important;
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo {
  width: 56px !important;
  height: 56px !important;
  margin: 0 auto 14px !important;
  border-radius: 12px !important;
  overflow: hidden;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.auth-brand h1 {
  margin: 0 0 6px !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--yft-text) !important;
  letter-spacing: -0.02em;
}
.auth-brand p {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--yft-muted) !important;
}

.auth-field {
  margin-bottom: 14px;
}
.auth-field .form-control {
  height: 42px !important;
}
.auth-captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.auth-captcha-row img {
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--yft-line);
  cursor: pointer;
}
.auth-submit {
  width: 100%;
  margin-top: 8px;
  min-height: 42px !important;
  font-size: 15px !important;
}

/* ===== 侧栏激活色（深色侧栏高对比） ===== */
.admin-sidebar-nav .nav-group-menu > li.active > a,
.admin-sidebar-nav .nav-group-menu > li.active > a:hover,
body.yft-merchant .navi .nav > li.active > a,
body.jeepay-merchant .navi .nav > li.active > a {
  background: rgba(45, 212, 191, 0.18) !important;
  color: #5eead4 !important;
}
.admin-sidebar-nav .nav-group-menu > li.active > a i,
.nav-section-toggle:hover,
body.yft-merchant .navi .nav > li.active > a i,
body.jeepay-merchant .navi .nav > li.active > a i {
  color: #5eead4 !important;
  background: rgba(45, 212, 191, 0.2);
}

.admin-layout .admin-page-head h3::after,
.mu-page-head h3::after,
.yft-metric-v.em {
  color: var(--yft-accent) !important;
}

/* ===== 响应式 ===== */
@media (max-width: 991px) {
  .admin-layout .admin-content,
  body.yft-merchant .app-content,
  body.jeepay-merchant .app-content {
    padding: 12px !important;
  }
  .yft-page-title { font-size: 16px; }
  .admin-filter-actions { margin-left: 0; }
  .admin-filter-compact .admin-filter-item .form-control {
    min-width: 110px !important;
    max-width: 180px !important;
  }
  .auth-card { padding: 28px 22px 24px !important; }
}

@media (max-width: 560px) {
  .admin-filter-compact .admin-filter-item {
    flex: 1 1 100% !important;
  }
  .admin-filter-compact .admin-filter-item .form-control,
  .admin-filter-compact .admin-filter-item.admin-filter-span-2,
  .admin-filter-compact .admin-filter-item.admin-filter-span-2 .form-control {
    max-width: none !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  .admin-filter-actions {
    width: 100%;
  }
}

/* ===== 表单页 ===== */
.mu-form-body,
.admin-inner-card-body .form-horizontal,
.form-horizontal.devform {
  padding: 18px 16px 8px;
  max-width: 720px;
}
.form-horizontal .control-label {
  color: var(--yft-muted) !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  padding-top: 10px !important;
}
.form-horizontal .form-group {
  margin-bottom: 16px !important;
}
.form-horizontal .help-block,
.form-horizontal .text-muted {
  font-size: 12px;
  color: var(--yft-faint);
}

.alert {
  border-radius: var(--yft-radius-sm) !important;
  border-width: 1px !important;
  box-shadow: none !important;
}
.alert-success {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #065f46 !important;
}
.alert-danger,
.alert-warning {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #991b1b !important;
}
.alert-info {
  background: #f0fdfa !important;
  border-color: #99f6e4 !important;
  color: #115e59 !important;
}

/* 状态标签：保证字色对比度（避免青绿底 + 深绿字看不见） */
.label,
.badge {
  display: inline-block;
  font-weight: 600 !important;
  text-shadow: none !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  line-height: 1.3 !important;
}
.label-success,
.badge-success,
.app-content .label-success,
.admin-layout .label-success {
  background: #dcfce7 !important;
  color: #15803d !important;
}
.label-primary,
.badge-primary,
.app-content .label-primary,
.admin-layout .label-primary {
  background: #ccfbf1 !important;
  color: #0f766e !important;
}
.label-warning,
.badge-warning,
.app-content .label-warning,
.admin-layout .label-warning {
  background: #ffedd5 !important;
  color: #c2410c !important;
}
.label-danger,
.badge-danger,
.app-content .label-danger,
.admin-layout .label-danger {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}
.label-info,
.badge-info,
.app-content .label-info,
.admin-layout .label-info {
  background: #e0f2fe !important;
  color: #0369a1 !important;
}
.label-default,
.badge-default,
.app-content .label-default,
.admin-layout .label-default {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

.pay-platform-cell,
.pay-type-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.pay-type-cell--icon {
  justify-content: center;
}
.pay-platform-cell .pay-type-ico,
.pay-type-cell .pay-type-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}
.pay-platform-cell .pay-type-name,
.pay-type-cell .pay-type-name {
  color: #334155;
  font-size: 13px;
}

.mu-channel-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mu-channel-cell .pay-type-cell--icon {
  flex-shrink: 0;
}
.mu-channel-cell .pay-type-ico {
  width: 22px !important;
  height: 22px !important;
}
.mu-channel-meta {
  min-width: 0;
  line-height: 1.35;
}
.mu-channel-id code,
.mu-channel-id-only {
  font-size: 13px;
  background: transparent;
  padding: 0;
  color: #0f172a;
}
.mu-channel-id-only {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.mu-channel-name {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

/* 状态开关/标签常见色 */
.text-success { color: var(--yft-ok) !important; }
.text-danger { color: var(--yft-danger) !important; }

/* 内容区表格响应：防止横向撑破 */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* code 标签不要用 Bootstrap 默认红字（像报错） */
code,
.admin-layout code,
body.yft-merchant code,
body.jeepay-merchant code {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.mu-subcell {
  line-height: 1.35;
}
.mu-subcell-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #334155;
  word-break: break-all;
}
.mu-subcell-name {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
}

/* 订单状态色：不用纯红绿裸字 */
.mu-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}
.mu-status-ok { color: #15803d; }
.mu-status-wait { color: #64748b; }
.mu-status-warn { color: #b45309; }
.mu-status-bad { color: #b91c1c; }

