.credits-entry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #cbdccd;
  border-radius: 20px;
  background: #edf4eb;
  color: var(--sage-700);
  font-size: 12px;
  white-space: nowrap;
}
.credits-entry:hover { background: #e2eddf; border-color: var(--sage-500); }
.credits-entry i { font-style: normal; font-size: 17px; }
.credits-entry b { padding-left: 7px; border-left: 1px solid #cbdccd; font-variant-numeric: tabular-nums; }
.credit-dialog { width: min(1020px, 94vw); height: min(860px, 92dvh); background: #fff; color: var(--ink); }
.credit-dialog .workspace-dialog-head { padding: 23px 28px 20px; background: #fff; }
.credit-dialog .workspace-dialog-head strong { font-size: 24px; }
.credit-scroll-area { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; padding: 24px 28px; }
.credit-overview { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin-bottom: 25px; }
.credit-overview section { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 22px; border-radius: 14px; }
.credit-overview section > span { font-size: 12px; }
.credit-overview section > strong { margin: 9px 0; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.25; font-weight: 650; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.credit-overview section > small { font-size: 11px; line-height: 1.7; }
.credit-balance-card { color: #fff; background: linear-gradient(115deg, #214d3c, #3b7858); }
.credit-balance-card > span, .credit-balance-card > small { color: #d9e8dc; }
.credit-stat-card { border: 1px solid var(--line); background: #f7f9f5; }
.credit-stat-card > span, .credit-stat-card > small { color: var(--ink-soft); }
.credit-stat-card > strong { color: var(--forest); }
.credit-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.credit-tabs { display: flex; gap: 6px; }
.credit-tabs button { padding: 10px 16px; border: 0; border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 14px; }
.credit-tabs button[aria-selected="true"] { background: var(--sage-50); color: var(--sage-700); font-weight: 700; }
.credit-filters { display: flex; gap: 10px; margin-top: 20px; }
.credit-search { flex: 1; min-width: 0; }
.credit-search input, .credit-filters select { width: 100%; min-width: 0; height: 40px; border: 1px solid var(--line-strong); padding: 0 13px; border-radius: 8px; background: #fff; font-size: 13px; color: var(--ink); }
.credit-filters select { width: 135px; }
.credit-search .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.credit-record-note { margin: 14px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.credit-model-section { margin-top: 18px; }
.credit-model-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.credit-model-filter label { color: var(--ink); font-size: 13px; }
.credit-model-filter select { min-width: 190px; max-width: 100%; height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; }
.credit-model-filter > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.credit-ledger-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; padding: 16px; background: #f4f7f1; border-radius: 10px; }
.credit-ledger-summary span { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 11px; }
.credit-ledger-summary strong { color: var(--forest); font-size: 20px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.credit-ledger-summary small { margin-left: 5px; color: var(--muted); font-size: 11px; }
.credit-task-list { display: grid; gap: 10px; }
.credit-task-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(100px, auto) auto; align-items: center; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.credit-task-row:hover { border-color: var(--sage-300); background: #fafcf8; }
.credit-task-description strong { display: block; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.credit-task-description > small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); }
.credit-task-cost { text-align: right; font-variant-numeric: tabular-nums; }
.credit-task-cost > strong { display: block; color: var(--forest); font-size: 17px; }
.credit-task-cost strong small { font-size: 11px; font-weight: 400; color: var(--muted); }
.credit-task-cost > small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.credit-task-row .secondary-button { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
.credit-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.credit-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; line-height: 1.65; }
.credit-table th { padding: 12px 14px; color: var(--ink-soft); background: #f4f7f1; font-size: 11px; font-weight: 500; white-space: nowrap; }
.credit-table td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.credit-table td strong { display: block; font-size: 12px; }
.credit-table td small { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; max-width: 320px; }
.credit-date { color: var(--muted); white-space: nowrap; font-size: 11px; }
.credit-delta, .credit-number { font-weight: 600; white-space: nowrap; }
.credit-delta.is-positive { color: var(--sage-500); }
.credit-text-button { padding: 6px 0; border: 0; color: var(--sage-700); background: transparent; font-size: 12px; text-align: left; }
.credit-text-button:hover { text-decoration: underline; }
.credit-detail-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin: 14px 0 20px; }
.credit-detail-heading h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; }
.credit-detail-heading small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.credit-detail-heading .task-status-label { flex-shrink: 0; margin-top: 4px; }
.credit-detail-metrics { display: grid; grid-template-columns: 1.3fr 1fr 1fr; padding: 20px; gap: 24px; border-radius: 12px; background: #f1f6ef; }
.credit-detail-metrics > div { min-width: 0; }
.credit-detail-metrics span { font-size: 12px; color: var(--ink-soft); }
.credit-detail-metrics strong { display: block; margin-top: 7px; font-size: 25px; color: var(--forest); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.credit-detail-metrics small { font-size: 11px; font-weight: 400; color: var(--muted); }
.credit-detail h4 { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; font-size: 13px; }
.credit-detail h4 small { font-size: 11px; font-weight: 400; color: var(--muted); }
.credit-stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.credit-stage-grid > div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.credit-stage-grid span { font-size: 12px; color: var(--ink-soft); }
.credit-stage-grid strong { display: block; margin: 8px 0 4px; font-size: 17px; }
.credit-stage-grid small { color: var(--muted); font-size: 11px; font-weight: 400; }
.credit-call-status { color: var(--sage-700); white-space: nowrap; }
.credit-call-status.is-failed { color: #ae5d60; }
.credit-footnote { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 12px; }
.credit-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; padding: 25px; text-align: center; color: var(--ink-soft); }
.credit-empty b { font-size: 15px; font-weight: 500; }
.credit-empty p { font-size: 12px; color: var(--muted); line-height: 1.8; }
.credit-recharge { display: grid; gap: 18px; }
.credit-recharge-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.credit-recharge-toolbar strong, .credit-order-heading strong { display: block; color: var(--ink); font-size: 14px; }
.credit-recharge-toolbar small, .credit-order-heading small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.credit-payment-channels { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9f5; }
.credit-payment-channels button { min-width: 76px; padding: 8px 10px; border: 0; border-radius: 6px; color: var(--ink-soft); background: transparent; font-size: 12px; cursor: pointer; }
.credit-payment-channels button.is-selected { color: var(--sage-700); background: #fff; box-shadow: 0 1px 4px rgb(35 61 45 / 12%); font-weight: 700; }
.credit-package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.credit-package-card { display: flex; flex-direction: column; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.credit-package-card.is-recommended { border-color: var(--sage-400); box-shadow: 0 5px 18px rgb(45 95 68 / 10%); }
.credit-package-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 19px; }
.credit-package-type, .credit-package-recommended { color: var(--sage-700); font-size: 11px; }
.credit-package-recommended { padding: 3px 7px; border-radius: 999px; background: var(--sage-50); font-weight: 700; }
.credit-package-card h3 { margin: 11px 0 8px; color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.credit-package-card > strong { color: var(--forest); font-size: 23px; font-variant-numeric: tabular-nums; }
.credit-package-card > p { min-height: 39px; margin: 9px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.credit-package-meta { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: auto; margin-bottom: 14px; }
.credit-package-meta span { color: var(--ink-soft); font-size: 11px; }
.credit-package-meta b { color: var(--ink); font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.credit-package-buy { width: 100%; min-height: 38px; }
.credit-recharge-message { margin: 0; padding: 10px 12px; border: 1px solid #cbdccd; border-radius: 8px; color: var(--sage-700); background: #f1f6ef; font-size: 12px; line-height: 1.6; }
.credit-order-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-top: 5px; border-top: 1px solid var(--line); }
.credit-order-list { display: grid; gap: 8px; }
.credit-order-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(92px, auto) auto; align-items: center; gap: 15px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; }
.credit-order-row.is-highlighted { border-color: var(--sage-400); background: #fafcf8; }
.credit-order-row strong { display: block; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.credit-order-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.credit-order-status { white-space: nowrap; font-size: 11px; }
.credit-order-status.is-pending { color: #9a6a25; }
.credit-order-status.is-processing { color: #52769a; }
.credit-order-status.is-completed { color: var(--sage-700); }
.credit-order-status.is-failed { color: #ae5d60; }
.credit-order-amount { text-align: right; font-variant-numeric: tabular-nums; }
.credit-order-amount strong { font-size: 13px; }
.credit-order-empty { color: var(--muted); font-size: 12px; text-align: center; }
.credit-order-empty-state { min-height: 120px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 9px; }
.credit-footer { justify-content: space-between; background: #fff; border-top: 1px solid var(--line); padding: 14px 28px; }
.credit-footer > div { display: flex; align-items: center; gap: 10px; }
.credit-footer > span { font-size: 11px; text-align: left; }
.credit-footer .secondary-button { font-size: 12px; }
@media (max-width: 1100px) {
  .app-shell .user-session #userPhoneLabel { display: none; }
  .credits-entry { padding: 7px 9px; gap: 5px; }
}
@media (max-width: 700px) {
  .credit-dialog { width: calc(100vw - 20px); height: 94dvh; max-height: 94dvh; }
  .credit-dialog .workspace-dialog-head { padding: 18px; }
  .credit-scroll-area { padding: 18px; }
  .credit-overview { gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
  .credit-overview section { padding: 16px; }
  .credit-overview .credit-balance-card { grid-column: 1 / -1; }
  .credit-overview .credit-balance-card > strong { font-size: 30px; }
  .credit-task-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 15px; }
  .credit-task-cost { text-align: left; }
  .credit-task-row > button { justify-self: end; }
  .credit-filters { flex-wrap: wrap; }
  .credit-search { flex-basis: 100%; }
  .credit-filters select { flex: 1; }
  .credit-model-filter select { flex: 1; min-width: 0; width: 0; }
  .credit-model-filter > span { width: 100%; margin-left: 0; }
  .credit-ledger-summary { gap: 8px; padding: 12px; }
  .credit-ledger-summary strong { font-size: 18px; }
  .credit-recharge-toolbar, .credit-order-heading { align-items: start; flex-direction: column; }
  .credit-payment-channels { width: 100%; }
  .credit-payment-channels button { flex: 1; }
  .credit-order-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .credit-order-amount { text-align: left; }
  .credit-order-row > button, .credit-order-empty { justify-self: end; }
  .credit-detail-heading h3 { font-size: 17px; }
  .credit-detail-metrics { gap: 12px; padding: 15px; grid-template-columns: 1fr 1fr; }
  .credit-detail-metrics > div:first-child { grid-column: 1 / -1; }
  .credit-table { min-width: 540px; }
  .credit-footer { padding: 12px 16px; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .credit-footer > span { width: 100%; text-align: center; }
}
@media (max-width: 390px) {
  .credits-entry b { display: none; }
}
