/* Scoped credits UI: reuses WaviFlow buttons, cards, tables and page headers. */
.credit-page {max-width:1450px}
.credit-tabs {display:flex;gap:6px;border-bottom:1px solid var(--line);margin-bottom:22px;overflow-x:auto;padding-bottom:0}
.credit-tab {background:none;border:0;border-bottom:3px solid transparent;color:var(--muted);padding:12px 17px;font-weight:750;font-size:12px;white-space:nowrap}
.credit-tab:hover {color:var(--text)}
.credit-tab.active {color:var(--green-dark);border-bottom-color:var(--green)}
.credit-metrics {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0 0 20px}
.credit-metric {min-width:0;padding:21px}
.credit-metric-label {display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:var(--muted);font-weight:650}
.credit-metric-value {margin:10px 0 8px;font-size:26px;line-height:1.2;font-weight:800;letter-spacing:-.05em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.credit-metric p {margin:0;color:var(--muted);font-size:11px}
.credit-panel {margin-bottom:18px;overflow:hidden}
.credit-panel .card-head {flex-wrap:wrap}
.credit-panel .card-head h3 {font-size:15px}
.credit-panel .card-body {padding-top:21px}
.credit-main-amount {font-size:32px;font-weight:800;letter-spacing:-.04em}
.credit-action-layout {display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.credit-action-layout p {margin:5px 0}
.credit-separator {padding:0 8px;color:var(--muted)}
.credit-pricing-row {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.credit-pricing-row>div {display:grid;align-content:start;gap:5px}
.credit-pricing-row strong {font-size:23px;color:var(--text)}
.credit-pricing-row strong.credit-mode {font-size:17px}
.credit-pricing-row small {font-size:11px;color:var(--muted)}
.credit-form-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}
.credit-field {display:grid;align-content:start;gap:7px;font-size:12px;font-weight:700;color:#4c5e74;min-width:0}
.credit-field .input {width:100%;margin:0;font-size:13px;min-height:41px}
.credit-field textarea.input {min-height:83px;resize:vertical}
.credit-form-footer {margin-top:18px;display:flex;justify-content:flex-end}
.credit-actions {display:flex;gap:7px;flex-wrap:wrap}
.credit-panel th {padding:13px 16px}
.credit-panel td {padding:13px 16px}
.credit-panel td .btn {min-height:33px;padding:6px 10px}
.credit-empty {padding:26px;text-align:center;color:var(--muted);white-space:normal}
.credit-loading {padding:26px;color:var(--muted)}
.credit-warning {color:#97471b;background:#fff8e7;border:1px solid #f6dfae;padding:11px 14px;border-radius:10px;font-size:12px;line-height:1.5}
.credit-warning .btn {margin:0 0 0 12px}
.credit-filter {display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:20px}
.credit-filter .credit-field {min-width:160px}
.credit-filter .btn {min-height:41px}
.credit-panel .table-scroll {overflow-x:auto}
.credit-panel table {min-width:680px}
@media(max-width:1100px){.credit-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){
 .credit-metrics{grid-template-columns:1fr;gap:12px}
 .credit-form-grid,.credit-pricing-row{grid-template-columns:1fr}
 .credit-metric{padding:17px}
 .credit-metric-value{font-size:24px}
 .credit-tabs{gap:0}
 .credit-tab{padding:11px 12px}
 .credit-filter{display:grid;grid-template-columns:1fr}
 .credit-filter .credit-field{min-width:0}
 .credit-action-layout>.btn{width:100%}
}
