/* ============================================================
 * finance.css  财务中心样式
 * 沿用平台设计语言：#2563EB 主色、12px 圆角、浅边框卡片、
 * pro-kpi 结构；仅新增财务专属类，不覆盖现有模块。
 * ============================================================ */

.page-content[id^="page-finance-"] { padding: 0; }

.fin-tabs { margin-bottom: 18px; }

.fin-body { min-height: 300px; }
.fin-loading,
.fin-empty,
.fin-error {
  padding: 40px 20px; text-align: center; color: #94A3B8; font-size: 14px;
}
.fin-error { color: #EF4444; }

/* KPI 区 */
.fin-kpi { margin-bottom: 18px; }
.fin-kpi .pro-kpi { background: #fff; }

/* 卡片 */
.fin-card { margin-bottom: 18px; }
.fin-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 18px; border-bottom: 1px solid #EEF2F7; flex-wrap: wrap;
}
.fin-card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: #1E293B; }
.fin-card-note { font-size: 12px; color: #94A3B8; }
.fin-card-actions { display: flex; gap: 8px; align-items: center; }

.fin-two-col {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-bottom: 18px;
}
@media (max-width: 1080px) { .fin-two-col { grid-template-columns: 1fr; } }

/* 表格 */
.fin-table-wrap { width: 100%; overflow-x: auto; }
.fin-ar { text-align: right; white-space: nowrap; }
.fin-sname { font-weight: 600; color: #1E293B; }
.fin-clickrow { cursor: pointer; }
.fin-clickrow:hover { background: #F8FAFC; }

.fin-out { color: #EF4444; }
.fin-link {
  color: #2563EB; cursor: pointer; margin-right: 12px; font-size: 13px;
}
.fin-link:hover { text-decoration: underline; }
.fin-link.danger, .fin-link.fin-danger { color: #EF4444; margin-right: 0; }
.fin-acts { white-space: nowrap; }

/* 徽标 */
.fin-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; background: #F1F5F9; color: #64748B;
}
.fin-badge.tone-green { background: #ECFDF5; color: #059669; }
.fin-badge.tone-blue { background: #EFF6FF; color: #2563EB; }
.fin-badge.tone-orange { background: #FFF7ED; color: #EA580C; }
.fin-badge.tone-amber { background: #FFFBEB; color: #D97706; }
.fin-badge.tone-gray { background: #F1F5F9; color: #64748B; }
.fin-badge.tone-red { background: #FEF2F2; color: #DC2626; }
.fin-red { color: #DC2626; }
.fin-amber { color: #D97706; }
.fin-green { color: #059669; }

.tone-red { color: #DC2626; }
.tone-green { color: #059669; }
.tone-blue { color: #2563EB; }
.tone-orange { color: #EA580C; }

/* 弹层 */
.fin-mask {
  position: fixed; inset: 0; z-index: 10002;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.fin-modal {
  background: #fff; border-radius: 14px; width: 560px; max-width: 100%;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .25);
  overflow: hidden;
}
.fin-modal-wide { width: 860px; }
.fin-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #EEF2F7;
}
.fin-modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; color: #1E293B; }
.fin-x {
  border: none; background: none; font-size: 24px; line-height: 1;
  color: #94A3B8; cursor: pointer; padding: 0 4px;
}
.fin-x:hover { color: #475569; }
.fin-modal-body { padding: 20px; overflow-y: auto; flex: 1; }

/* 表单对齐 pro-field */
.fin-modal .pro-form-grid { margin-bottom: 0; }

/* 学生选择下拉 */
.fin-stu-dd {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: #fff; border: 1px solid #E2E8F0; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12); z-index: 50; overflow: hidden;
}
.fin-stu-opt {
  display: flex; flex-direction: column; padding: 9px 14px; cursor: pointer;
}
.fin-stu-opt:hover { background: #F8FAFC; }
.fin-stu-opt span { font-size: 14px; color: #1E293B; }
.fin-stu-opt small { font-size: 12px; color: #94A3B8; }

/* chips */
.frf-label { font-size: 13px; color: #475569; margin: 14px 0 8px; }
.frf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fin-chip {
  border: 1px solid #E2E8F0; background: #fff; color: #475569;
  padding: 7px 12px; border-radius: 999px; font-size: 13px; cursor: pointer;
}
.fin-chip:hover { border-color: #2563EB; color: #2563EB; }
.fin-chip.active { background: #2563EB; border-color: #2563EB; color: #fff; }

/* 收费方案卡 */
.fin-plan-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.fin-plan-card {
  border: 1px solid #E8EDF4; border-radius: 12px; padding: 16px; background: #fff;
  display: flex; flex-direction: column;
}
.fin-plan-card .fpc-title { font-size: 15px; font-weight: 600; color: #1E293B; margin-bottom: 4px; }
.fin-plan-card .fpc-course { font-size: 12px; color: #94A3B8; margin-bottom: 12px; }
.fin-plan-card .fpc-price { font-size: 22px; font-weight: 700; color: #2563EB; }
.fin-plan-card .fpc-meta { font-size: 13px; color: #64748B; margin-top: 10px; flex: 1; }
.fin-plan-card .fpc-foot { margin-top: 12px; display: flex; gap: 8px; }

/* 课消学生表 */
.fcn-students { margin-top: 6px; }
.fcn-toolbar { margin: 6px 0 10px; display: flex; justify-content: flex-end; }
.fcn-disabled { color: #CBD5E1; background: #F8FAFC; }
.fcn-tip {
  background: #EFF6FF; color: #1D4ED8; font-size: 13px;
  border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
}
.fcn-h, .fcn-a, .fcn-atth {
  width: 100%; padding: 7px 10px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px;
}

/* 资金账户卡 */
.fin-fund-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
  padding: 18px;
}
.fin-fund-card {
  border: 1px solid #E8EDF4; border-radius: 12px; padding: 16px; background: #fff;
}
.ffc-top { display: flex; align-items: center; justify-content: space-between; }
.ffc-name { font-size: 14px; color: #475569; }
.ffc-edit { font-size: 12px; color: #2563EB; cursor: pointer; }
.ffc-bal { font-size: 22px; font-weight: 700; color: #1E293B; margin: 8px 0 2px; }
.ffc-sub { font-size: 12px; color: #94A3B8; }

/* 柱状图 */
.fin-chartbox { padding: 20px; }
.fin-bars {
  display: flex; align-items: flex-end; gap: 18px;
  height: 220px; border-bottom: 1px solid #EEF2F7; padding: 0 8px;
}
.fbar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.fbar-pair { display: flex; align-items: flex-end; gap: 6px; height: 180px; }
.fbar { width: 22px; border-radius: 6px 6px 0 0; min-height: 2px; }
.fbar-collect { background: #93C5FD; }
.fbar-consume { background: #2563EB; }
.fbar-label { font-size: 12px; color: #64748B; margin-top: 8px; }
.fin-legend { display: flex; gap: 18px; justify-content: center; margin-top: 12px; font-size: 12px; color: #64748B; }
.fin-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-collect { background: #93C5FD; }
.lg-consume { background: #2563EB; }

/* 收据 */
.fin-receipt {
  border: 1px solid #E2E8F0; border-radius: 10px; padding: 28px; position: relative;
}
.fin-receipt.is-void { opacity: .65; }
.rcp-title { text-align: center; font-size: 22px; letter-spacing: 8px; font-weight: 700; color: #1E293B; margin-bottom: 6px; }
.rcp-no { text-align: right; font-size: 12px; color: #94A3B8; margin-bottom: 14px; }
.rcp-table { width: 100%; border-collapse: collapse; }
.rcp-table th, .rcp-table td { border: 1px solid #E2E8F0; padding: 10px 12px; font-size: 14px; text-align: left; }
.rcp-table th { width: 120px; background: #F8FAFC; color: #475569; font-weight: 500; }
.rcp-sign { margin-top: 18px; font-size: 14px; color: #475569; text-align: right; }
.rcp-void {
  position: absolute; top: 40%; left: 50%; transform: translateX(-50%) rotate(-18deg);
  font-size: 40px; font-weight: 700; color: rgba(220, 38, 38, .35);
  border: 4px solid rgba(220, 38, 38, .35); border-radius: 10px; padding: 4px 20px;
}

/* 催缴历史 */
.far-history { margin-top: 16px; }
.far-item { border: 1px solid #EEF2F7; border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.far-item b { font-size: 13px; color: #1E293B; margin-right: 10px; }
.far-item span { font-size: 12px; color: #94A3B8; }
.far-item p { margin: 4px 0 0; font-size: 13px; color: #475569; }

/* ============================================================
 * 单卡内 Tab 分段控件（收费方案/缴费记录、资金账户/其他收支）
 * ============================================================ */
.fin-tabs-card .fin-card-head { align-items: center; }
.fin-seg {
  display: inline-flex; align-items: center; gap: 2px;
  background: #F1F5F9; border-radius: 10px; padding: 3px;
}
.fin-seg-btn {
  border: none; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 600; color: #64748B;
  padding: 7px 18px; border-radius: 8px; line-height: 1;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.fin-seg-btn:hover { color: #1E293B; }
.fin-seg-btn.active {
  background: #fff; color: #1E293B;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}
.fin-pane > .fin-table-wrap,
.fin-pane > .fin-fund-grid { border-radius: 0 0 12px 12px; }

/* ============================================================
 * 财务弹框表单统一排版（.pro-field 与系统 .form-group/.form-input 对齐）
 * ============================================================ */
.fin-modal .pro-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.fin-modal .pro-field { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.fin-modal .pro-field.span2 { grid-column: 1 / -1; }
.fin-modal .pro-field > label {
  display: block; font-size: 13px; font-weight: 600; color: #334155;
  margin: 0 0 6px; line-height: 1.4;
}
.fin-modal .pro-field > input,
.fin-modal .pro-field > select {
  width: 100%; height: 40px; box-sizing: border-box;
  padding: 0 12px; font-size: 14px; color: #1E293B;
  border: 1px solid #E2E8F0; border-radius: 8px; background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.fin-modal .pro-field > select { padding: 0 10px; cursor: pointer; }
.fin-modal .pro-field > input:focus,
.fin-modal .pro-field > select:focus {
  outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.fin-modal .pro-field > input[readonly] { background: #F8FAFC; color: #64748B; }
.fin-modal .pro-field > input::placeholder { color: #94A3B8; }
@media (max-width: 640px) {
  .fin-modal .pro-form-grid { grid-template-columns: 1fr; }
}

/* 弹框底部按钮：与系统其它弹框一致，带左右/底部内边距与顶部分隔线 */
.fin-modal .pro-form-footer {
  margin: 0; padding: 14px 20px 20px;
  border-top: 1px solid #EEF2F7; background: #fff;
}
.fin-modal .pro-form-footer .btn {
  min-width: 84px; height: 38px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============ acrud256：查询栏 / 分页 / 滑动开关 / 多选弹层 / 课消标识 ============ */

/* 查询工具栏 */
.fin-toolbar, .fin-filterbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 4px 0 14px;
}
.fin-filter-input { width: 240px; max-width: 100%; }
.fin-filter-select { width: 150px; }
/* 文字(label) + 控件 横向字段；整条筛选条件并排一行 */
.fin-filter-field { display: inline-flex; align-items: center; gap: 7px; }
.fin-filter-field > label { font-size: 13px; color: #475569; font-weight: 500; white-space: nowrap; margin: 0; }
.fin-filter-field .form-input { margin: 0; }
.fin-filterbar.align-end { justify-content: flex-start; }
.fin-card-sub { font-size: 12.5px; color: #94A3B8; font-weight: 400; margin-left: 10px; }
.fin-card-title { font-size: 15px; font-weight: 600; color: #1E293B; }
.fin-card .fin-filterbar, .fin-card .fin-table-wrap, .fin-card .fin-pager-wrap { margin-left: 18px; margin-right: 18px; }
.fin-card .fin-filterbar { margin-top: 14px; }
.fin-card .fin-pager-wrap { margin-bottom: 16px; }
.fin-table-wrap { width: 100%; overflow-x: auto; }
.fin-cell-names { max-width: 320px; color: #475569; font-size: 12.5px; line-height: 1.5; }
.fin-readonly {
  width: 100%; min-height: 38px; padding: 8px 12px;
  border: 1px solid #E2E8F0; border-radius: 8px; background: #F8FAFC;
  color: #0F172A; font-size: 14px; display: flex; align-items: center;
}
.fin-btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.fin-row-done { background: #F8FAFC; }
.fin-row-done td { color: #94A3B8; }
.fin-row-done .fin-cell-names { color: #94A3B8; }

/* 滑动开关（core switchHtml 输出 .fin-switch>.fin-slider>.fin-knob） */
.fin-switch { position: relative; display: inline-block; width: 42px; height: 23px; flex: none; cursor: pointer; vertical-align: middle; }
.fin-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.fin-slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: #CBD5E1; transition: background .18s ease; display: block;
}
.fin-knob {
  position: absolute; top: 3px; left: 3px;
  width: 17px; height: 17px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.28); transition: transform .18s ease; display: block;
}
.fin-switch input:checked ~ .fin-slider { background: #2563EB; }
.fin-switch input:checked ~ .fin-slider .fin-knob { transform: translateX(19px); }
.fin-switch input:focus-visible ~ .fin-slider { box-shadow: 0 0 0 3px rgba(37,99,235,.22); }

/* 分页（core pagerHtml 输出 .fin-pager>.fin-pager-total + .fin-pager-btns>.fin-pager-btn） */
.fin-pager-wrap { margin-top: 12px; }
.fin-pager {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  flex-wrap: wrap;
}
.fin-pager-total { font-size: 12.5px; color: #64748B; margin-right: 6px; }
.fin-pager-total b { color: #1E293B; }
.fin-pager-btns { display: inline-flex; gap: 6px; align-items: center; }
.fin-pager-btn {
  min-width: 30px; height: 30px; padding: 0 9px; border: 1px solid #E2E8F0;
  background: #fff; color: #334155; border-radius: 7px; font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.fin-pager-btn:hover:not(:disabled):not(.active) { border-color: #2563EB; color: #2563EB; }
.fin-pager-btn.active { background: #2563EB; border-color: #2563EB; color: #fff; font-weight: 600; }
.fin-pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.fin-pager-dots { color: #94A3B8; padding: 0 2px; }

/* 班级多选弹层（core openClassPicker 输出 .fcp-*） */
.fcp-search { margin-bottom: 12px; }
.fcp-list {
  border: 1px solid #E2E8F0; border-radius: 10px; overflow: hidden;
  max-height: 380px; overflow-y: auto; background: #fff;
}
.fcp-opt {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid #F1F5F9; cursor: pointer; font-size: 14px; color: #1E293B;
}
.fcp-opt:last-child { border-bottom: none; }
.fcp-opt:hover { background: #F8FAFC; }
.fcp-opt input[type="checkbox"], .fcp-opt input[type="radio"] { width: 16px; height: 16px; accent-color: #2563EB; flex: none; margin: 0; }
.fcp-opt-name { flex: 1; }
.fcp-opt-sub { font-size: 12px; color: #94A3B8; }
.fcp-empty { padding: 28px 14px; text-align: center; color: #94A3B8; font-size: 13px; }
.fcp-selected-note { font-size: 12.5px; color: #2563EB; margin-top: 10px; font-weight: 500; }
.fin-pickrow { display: flex; gap: 8px; align-items: center; }
.fin-pickrow .form-input { flex: 1; }

/* 可输入下拉候选 */
.fin-combo-dd { z-index: 10006; }

