/* ========== Bank Account ========== */
/* ========== 银行账号管理页面 ========== */

/* 面包屑 */
.ba-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400, #999);
  margin-bottom: 20px;
}
.ba-breadcrumb a {
  color: var(--gray-400, #999);
  text-decoration: none;
  transition: color .2s;
}
.ba-breadcrumb a:hover { color: var(--primary, #e2383e); }
.ba-breadcrumb .sep { color: var(--gray-300, #ccc); }
.ba-breadcrumb .current { color: var(--gray-600, #555); font-weight: 500; }

/* 页面头部 */
.ba-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.ba-page-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-700, #333);
  margin: 0;
}
.ba-page-header .ba-desc {
  font-size: 13px;
  color: var(--gray-400, #999);
  margin-top: 4px;
}

/* 统计卡片 */
.ba-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.ba-stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}
.ba-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.ba-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ba-stat-icon svg { width: 24px; height: 24px; }
.ba-stat-icon.blue { background: #eff6ff; color: #3b82f6; }
.ba-stat-icon.green { background: #ecfdf5; color: #10b981; }
.ba-stat-icon.orange { background: #fff7ed; color: #f59e0b; }
.ba-stat-icon.red { background: #fef2f2; color: #ef4444; }
.ba-stat-info {}
.ba-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-700, #333);
  line-height: 1.2;
}
.ba-stat-label {
  font-size: 13px;
  color: var(--gray-400, #999);
  margin-top: 2px;
}

/* 工具栏 */
.ba-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.ba-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ba-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ba-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.ba-btn svg { width: 16px; height: 16px; }
.ba-btn-primary {
  background: var(--primary, #e2383e);
  color: #fff;
  border-color: var(--primary, #e2383e);
}
.ba-btn-primary:hover {
  background: #c62d32;
  border-color: #c62d32;
}
.ba-btn-outline {
  background: #fff;
  color: var(--gray-600, #555);
  border-color: var(--gray-200, #ddd);
}
.ba-btn-outline:hover {
  border-color: var(--primary, #e2383e);
  color: var(--primary, #e2383e);
}
.ba-btn-danger {
  background: #fff;
  color: #ef4444;
  border-color: #fecaca;
}
.ba-btn-danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
}
.ba-search {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--gray-200, #ddd);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.ba-search:focus-within {
  border-color: var(--primary, #e2383e);
  box-shadow: 0 0 0 3px rgba(226,56,62,.1);
}
.ba-search input {
  border: none;
  outline: none;
  padding: 7px 12px;
  font-size: 13px;
  width: 220px;
  color: var(--gray-700, #333);
}
.ba-search input::placeholder { color: var(--gray-300, #bbb); }
.ba-search-btn {
  padding: 7px 14px;
  background: var(--primary, #e2383e);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background .2s;
}
.ba-search-btn:hover { background: #c62d32; }
.ba-search-btn svg { width: 16px; height: 16px; }

/* 提示条 */
.ba-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
}
.ba-tip svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: #f59e0b; }
.ba-tip strong { color: #78350f; }

/* 银行账号列表 */
.ba-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 单个银行卡片 */
.ba-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid transparent;
}
.ba-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.ba-card.default {
  border-color: var(--primary, #e2383e);
}
.ba-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  position: relative;
}

/* 默认卡片顶部 */
.ba-card.default .ba-card-top {
  background: linear-gradient(135deg, #fef2f2, #fff5f5);
}

/* 默认标签角标 */
.ba-default-tag {
  position: absolute;
  top: 0;
  right: 24px;
  background: var(--primary, #e2383e);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 12px 4px;
  border-radius: 0 0 6px 6px;
  letter-spacing: 1px;
}

.ba-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ba-bank-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.ba-bank-logo.icbc { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.ba-bank-logo.ccb { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.ba-bank-logo.abc { background: linear-gradient(135deg, #059669, #047857); }
.ba-bank-logo.boc { background: linear-gradient(135deg, #dc2626, #991b1b); }
.ba-bank-logo.comm { background: linear-gradient(135deg, #0891b2, #0e7490); }
.ba-bank-logo.cmb { background: linear-gradient(135deg, #dc2626, #9333ea); }
.ba-bank-logo.spdb { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.ba-bank-logo.ceb { background: linear-gradient(135deg, #f59e0b, #d97706); }

.ba-bank-info {}
.ba-bank-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700, #333);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ba-bank-name .ba-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 3px;
  letter-spacing: .5px;
}
.ba-tag-corp { background: #eff6ff; color: #3b82f6; }
.ba-tag-private { background: #ecfdf5; color: #10b981; }
.ba-branch {
  font-size: 13px;
  color: var(--gray-400, #999);
  margin-top: 3px;
}
.ba-account-number {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-600, #555);
  margin-top: 4px;
  letter-spacing: 1.5px;
  font-family: 'Courier New', monospace;
}

.ba-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 卡片底部信息行 */
.ba-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #fafafa;
  border-top: 1px solid var(--gray-100, #f0f0f0);
  font-size: 12px;
  color: var(--gray-400, #999);
}
.ba-card-meta {
  display: flex;
  align-items: center;
  gap: 20px;
}
.ba-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ba-card-meta svg { width: 14px; height: 14px; }
.ba-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.ba-card-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.ba-card-status .dot.green { background: #10b981; }
.ba-card-status .dot.orange { background: #f59e0b; }
.ba-card-status .dot.gray { background: #9ca3af; }
.ba-card-status.verified { color: #10b981; }
.ba-card-status.pending { color: #f59e0b; }
.ba-card-status.disabled { color: #9ca3af; }

/* 空状态 */
.ba-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400, #999);
}
.ba-empty svg { width: 64px; height: 64px; margin-bottom: 16px; color: var(--gray-300, #ccc); }
.ba-empty p { font-size: 14px; margin-bottom: 16px; }

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
  .ba-stats { grid-template-columns: repeat(2, 1fr); }
  .ba-bank-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .ba-stats { grid-template-columns: 1fr; }
  .ba-card-top { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ba-card-right { width: 100%; justify-content: flex-end; }
  .ba-toolbar { flex-direction: column; align-items: stretch; }
  .ba-toolbar-left, .ba-toolbar-right { flex-wrap: wrap; }
  .ba-bank-grid { grid-template-columns: repeat(2, 1fr); }
  .ba-modal { width: 95vw; }
  .ba-card-meta { flex-wrap: wrap; gap: 10px; }
}


/* ============================================
   银行账号管理 样式 (Business Accounts)
   ============================================ */

/* ----- 面包屑 ----- */
.ba-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}
.ba-breadcrumb a { color: #4b5563; text-decoration: none; }
.ba-breadcrumb a:hover { color: #1a73e8; }
.ba-breadcrumb .sep { color: #d1d5db; }
.ba-breadcrumb .current { color: #1f2937; font-weight: 500; }

/* ----- 页面头部 ----- */
.ba-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ba-page-header h2 { font-size: 20px; font-weight: 600; color: #1f2937; margin: 0; }
.ba-desc { font-size: 13px; color: #9ca3af; margin-top: 4px; }

/* ----- 统计卡片 ----- */
.ba-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.ba-stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}
.ba-stat-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ba-stat-icon svg { width: 20px; height: 20px; }
.ba-stat-icon.blue   { background: #eff6ff; color: #3b82f6; }
.ba-stat-icon.green  { background: #ecfdf5; color: #10b981; }
.ba-stat-icon.orange { background: #fffbeb; color: #f59e0b; }
.ba-stat-icon.red    { background: #fef2f2; color: #ef4444; }
.ba-stat-value { font-size: 22px; font-weight: 700; color: #1f2937; line-height: 1.2; }
.ba-stat-label { font-size: 12px; color: #9ca3af; margin-top: 2px; }

/* ----- 提示条 ----- */
.ba-tip {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #374151;
  margin-bottom: 16px;
}
.ba-tip svg { width: 18px; height: 18px; color: #3b82f6; flex-shrink: 0; margin-top: 1px; }
.ba-tip strong { color: #1e40af; }

/* ----- 工具栏 ----- */
.ba-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.ba-toolbar-left { display: flex; gap: 10px; align-items: center; }
.ba-toolbar-right { display: flex; gap: 10px; }

/* ----- Buttons ----- */
.ba-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
  font-family: inherit;
}
.ba-btn svg { width: 15px; height: 15px; }
.ba-btn-primary { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.ba-btn-primary:hover { background: #1557b0; border-color: #1557b0; }
.ba-btn-outline { background: #fff; color: #374151; border-color: #d1d5db; }
.ba-btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }
.ba-btn-danger { background: #fff; color: #ef4444; border-color: #fecaca; }
.ba-btn-danger:hover { background: #fef2f2; border-color: #ef4444; }

/* ----- 搜索 ----- */
.ba-search {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ba-search:focus-within { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
.ba-search input {
  border: none;
  outline: none;
  background: transparent;
  padding: 7px 12px;
  font-size: 13px;
  width: 240px;
  color: #374151;
}
.ba-search input::placeholder { color: #9ca3af; }
.ba-search-btn {
  border: none;
  background: transparent;
  padding: 7px 10px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
}
.ba-search-btn:hover { color: #1a73e8; }
.ba-search-btn svg { width: 16px; height: 16px; }

/* ----- 列表容器 ----- */
.ba-list { display: flex; flex-direction: column; gap: 12px; }

/* ----- 账号卡片 ----- */
.ba-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.ba-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); border-color: #d1d5db; }
.ba-card.default { border-color: #bfdbfe; background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%); }

.ba-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  position: relative;
}
.ba-card-left { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.ba-card-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.ba-default-tag {
  position: absolute;
  top: -1px;
  left: -1px;
  background: linear-gradient(135deg, #1a73e8, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 14px 4px 20px;
  border-radius: 0 0 10px 0;
  letter-spacing: 0.5px;
}

/* 银行 Logo */
.ba-bank-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 1px;
}
.ba-bank-logo.icbc { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.ba-bank-logo.ccb  { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.ba-bank-logo.abc  { background: linear-gradient(135deg, #16a34a, #047857); }
.ba-bank-logo.boc  { background: linear-gradient(135deg, #dc2626, #991b1b); }
.ba-bank-logo.comm { background: linear-gradient(135deg, #0891b2, #0e7490); }
.ba-bank-logo.cmb  { background: linear-gradient(135deg, #dc2626, #9333ea); }
.ba-bank-logo.spdb { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.ba-bank-logo.ceb  { background: linear-gradient(135deg, #f59e0b, #d97706); }

.ba-bank-info { min-width: 0; }
.ba-bank-name { font-size: 15px; font-weight: 600; color: #1f2937; display: flex; align-items: center; gap: 8px; }
.ba-branch { font-size: 12px; color: #6b7280; margin-top: 2px; }
.ba-account-number { font-size: 13px; color: #374151; font-family: "SF Mono", "Menlo", monospace; margin-top: 3px; letter-spacing: 0.5px; }

/* 类型标签 */
.ba-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}
.ba-tag-corp { background: #ecfdf5; color: #059669; }
.ba-tag-private { background: #fef3c7; color: #b45309; }

/* 卡片底部 */
.ba-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f3f4f6;
  padding: 10px 20px;
  background: #fafbfc;
}
.ba-card-meta {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: #6b7280;
}
.ba-card-meta span { display: flex; align-items: center; gap: 5px; }
.ba-card-meta svg { width: 14px; height: 14px; color: #9ca3af; }

/* 状态标签 */
.ba-card-status { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 5px; }
.ba-card-status.verified { color: #059669; }
.ba-card-status.pending { color: #d97706; }
.ba-card-status.disabled { color: #9ca3af; }
.ba-card-status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.dot.green { background: #10b981; }
.dot.orange { background: #f59e0b; }
.dot.gray { background: #9ca3af; }

/* ----- 表单容器 ----- */
.ba-form-container { margin-top: 8px; }

/* ----- 表单样式 ----- */
.ba-form-group {
  margin-bottom: 20px;
}
.ba-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}
.ba-form-label .required { color: #ef4444; margin-left: 2px; }
.ba-form-input {
  width: 100%;
  padding: 9px 13px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #1f2937;
  background: #fff;
  box-sizing: border-box;
}
.ba-form-input:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
.ba-form-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
  display: none;
}
.ba-form-group.has-error .ba-form-input { border-color: #ef4444; }
.ba-form-group.has-error .ba-form-error { display: block; }

/* 银行选择网格 */
.ba-bank-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ba-bank-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: all 0.2s;
  user-select: none;
}
.ba-bank-option:hover { border-color: #93c5fd; background: #f8faff; }
.ba-bank-option.selected,
.ba-bank-option:has(input:checked) { border-color: #1a73e8; background: #eff6ff; }
.ba-bank-option .mini-logo {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* 单选框 */
.ba-radio-group {
  display: flex;
  gap: 16px;
}
.ba-radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  padding: 8px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s;
}
.ba-radio-item:has(input:checked) { border-color: #1a73e8; background: #eff6ff; }

/* 开关 */
.ba-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 4px;
}
.ba-switch-label { font-size: 14px; font-weight: 500; color: #1f2937; }
.ba-switch-desc { font-size: 12px; color: #6b7280; margin-top: 2px; }
.ba-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
  flex-shrink: 0;
}
.ba-switch input { display: none; }
.ba-switch-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.ba-switch-slider::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}
.ba-switch input:checked + .ba-switch-slider { background: #1a73e8; }
.ba-switch input:checked + .ba-switch-slider::before { transform: translateX(20px); }

/* ----- 响应式 ----- */
@media (max-width: 1024px) {
  .ba-stats { grid-template-columns: repeat(2, 1fr); }
  .ba-bank-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ba-stats { grid-template-columns: 1fr; }
  .ba-bank-grid { grid-template-columns: 1fr 1fr; }
  .ba-toolbar { flex-direction: column; align-items: stretch; }
  .ba-card-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ba-card-right { align-self: flex-end; }
  .ba-card-bottom { flex-direction: column; gap: 8px; }
  .ba-card-meta { flex-direction: column; gap: 4px; }
  .ba-search input { width: 100%; }
}
