/* V4: form hierarchy and operational readability. No business logic changes. */
.form-grid input, .form-grid select { min-height: 40px; width: 100%; margin-top: 7px; padding: 9px 11px; line-height: 1.5; }
.form-grid label { line-height: 1.65; }
.payment-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.payment-settings-card { padding: 0 !important; min-width: 0; }
.payment-settings-card > .payment-save-head { position: sticky; top: -1px; z-index: 4; padding: 17px 23px; background: #fff; border-bottom: 1px solid #e4ece8; border-radius: 8px 8px 0 0; gap: 15px; }
.payment-save-head h4 { margin: 0; font-size: 15px; }
.payment-save-head button { min-height: 36px; padding: 8px 14px; background: #087c70; color: #fff; border: 1px solid #087c70; white-space: nowrap; }
.payment-settings-card > p { margin: 0 !important; padding: 18px 23px 0; font-size: 12px !important; color: #83928d !important; line-height: 1.8; }
.payment-section-links { display: flex; flex-wrap: wrap; gap: 7px; padding: 14px 23px 22px; border-bottom: 1px solid #edf1ef; }
.payment-section-links button { background: #f5f8f6; border: 1px solid #e5ece8; color: #6c8479; font-weight: 400; font-size: 11px; padding: 6px 10px; border-radius: 5px; }
.payment-section-links button:hover { color: #087c70; background: #eaf4ee; border-color: #cfe3d7; }
.payment-group { margin: 0; padding: 22px 23px 25px; border: 0; border-bottom: 1px solid #e9efec; }
.payment-group-heading { display: flex; align-items: center; gap: 8px; color: #34594b; font-size: 13px; font-weight: 600; list-style: none; }
.payment-group-heading > .lucide { width: 16px; height: 16px; color: #668c7d; }
.payment-group-help { color: #8a9892; font-size: 11px; margin: 8px 0 19px; line-height: 1.8; }
.payment-group .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.payment-group label { font-size: 12px; color: #63776d; font-weight: 500; }
.payment-group input, .payment-group select { background: #fcfdfc; border-color: #dfe7e2; font-size: 12px; }
.payment-group input:focus, .payment-group select:focus { background: #fff; border-color: #6ba38b; }
.payment-group .field-wide { grid-column: 1 / -1; }
.field-required { color: #a97855; padding: 0 2px; font-weight: 500; }
#lakala_key_status { display: inline-block; color: #83958b !important; font-size: 10px !important; font-weight: 400; }
.group-count { margin-left: auto; font-size: 10px; font-weight: 400; color: #98a69e; }
.payment-group-heading .group-chevron { width: 14px; height: 14px; margin-left: 3px; color: #98a69e; transition: transform .16s; }
summary.payment-group-heading { cursor: pointer; }
summary.payment-group-heading::-webkit-details-marker { display: none; }
details.payment-group:not([open]) { padding-top: 19px; padding-bottom: 19px; background: #fcfdfc; }
details.payment-group[open] .group-chevron { transform: rotate(180deg); }
.payment-group:focus-visible { outline: 2px solid #82b39d; outline-offset: -4px; }
.payment-settings-card > .payment-form-footnote { padding: 15px 23px !important; font-size: 10px !important; background: #fcfdfc; border-radius: 0 0 8px 8px; }
.payment-commission-card { position: sticky; top: 15px; padding: 21px !important; background: #f8fbf9; border-color: #dce9e1; }
.payment-commission-card .card-head { align-items: center; padding-bottom: 15px; border-bottom: 1px solid #e4ece7; margin-bottom: 15px; }
.payment-commission-card h4 { margin: 0; font-size: 13px; }
.payment-commission-card p { font-size: 11px !important; line-height: 1.85; color: #83938b !important; }
.payment-commission-card .commission-input-row { flex-wrap: wrap; gap: 9px !important; padding: 16px 0; margin: 0 !important; color: #547263; font-size: 12px; }
#commissionRateInput { text-align: right; font-variant-numeric: tabular-nums; min-height: 42px; background: #fff; }
.payment-commission-card #commissionPreviewText { padding: 12px; background: #edf5ef; color: #457357 !important; font-weight: 500; border: 1px solid #deebe2; border-radius: 6px; font-size: 11px !important; }
.payment-withdrawals { margin-top: 28px !important; }
.payment-withdrawals .panel-title { margin-bottom: 7px; display: flex; align-items: center; }
.payment-withdrawals h4 { margin: 0; color: #355246; font-size: 16px; }
.payment-withdrawals > p { font-size: 11px !important; color: #89988f !important; }
.panel-title > div:has(> select) { display: flex; align-items: center; gap: 8px; }
.panel-title > div:has(> select) select { width: auto; min-height: 36px; font-size: 12px; }
.table-wrap th, .panel > div:has(> table) th { position: sticky; top: 0; z-index: 1; background: #f8faf9; }
.content-grid .editor-card textarea { min-height: 180px; }
.rules-tabs { gap: 5px; padding: 4px; background: #f4f7f5; border: 1px solid #e4ece7; border-radius: 7px; }
.rules-tab { flex: 1 1 auto; border-radius: 4px; border: 0; background: transparent; color: #72887b; padding: 9px 12px; }
.rules-tab.active { background: #fff; color: #0d785e; box-shadow: 0 1px 3px #173b2620 !important; }
.rules-tabs + textarea { margin-top: 7px; }
@media (max-width: 1190px) {
  .payment-layout { grid-template-columns: minmax(0, 1fr); }
  .payment-commission-card { position: static; }
  .payment-commission-card .commission-input-row { padding: 10px 0; }
}
@media (max-width: 600px) {
  .payment-settings-card > .payment-save-head { padding: 14px 16px; }
  .payment-save-head h4 { font-size: 13px; }
  .payment-save-head button { min-height: 44px; font-size: 11px; padding: 8px 10px; }
  .payment-settings-card > p { padding: 15px 16px 0; }
  .payment-section-links { display: grid; grid-template-columns: repeat(2, 1fr); padding: 12px 16px 18px; gap: 7px; }
  .payment-section-links button { min-height: 44px; font-size: 12px; }
  .payment-group { padding: 20px 16px; }
  .payment-group .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .payment-group input, .payment-group select { min-height: 44px; }
  .payment-group-help { font-size: 11px; }
  .payment-settings-card > .payment-form-footnote { padding: 14px 16px !important; }
  .panel-title > div:has(> select) { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .group-chevron { transition: none; } }

/* 贴合内容滚动区的内边距，避免旧字段从固定操作栏上方透出。 */
.payment-settings-card > .payment-save-head { top: -26px; }
@media (max-width: 1100px) { .payment-settings-card > .payment-save-head { top: -22px; } }
@media (max-width: 760px) { .payment-settings-card > .payment-save-head { top: -20px; } }
