.xh-client-billing {
  display: grid;
  gap: 18px;
  color: #1d2939;
}

.xh-client-billing * {
  box-sizing: border-box;
}

.xh-client-billing__header,
.xh-client-billing__overview,
.xh-client-billing__section-head,
.xh-client-billing__filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.xh-client-billing__eyebrow,
.xh-client-billing__title,
.xh-client-billing__section-head h2,
.xh-client-billing__section-head p {
  margin: 0;
}

.xh-client-billing__eyebrow,
.xh-client-billing__section-head p,
.xh-client-billing__overview span,
.xh-client-billing__overview small,
.xh-client-billing__limit span {
  color: #667085;
}

.xh-client-billing__title {
  margin-top: 5px;
  color: #172b4d;
  font-size: 26px;
  line-height: 1.25;
}

.xh-client-billing__button {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  color: #344054;
  background: #fff;
  cursor: pointer;
}

.xh-client-billing__button:hover {
  border-color: #8eb7df;
  color: #1769aa;
}

.xh-client-billing__button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.xh-client-billing__overview {
  padding: 24px;
  border: 1px solid #dce7f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(33, 68, 103, 0.07);
}

.xh-client-billing__overview span,
.xh-client-billing__overview strong,
.xh-client-billing__overview small {
  display: block;
}

.xh-client-billing__overview strong {
  margin: 7px 0;
  color: #172b4d;
  font-size: 28px;
}

.xh-client-billing__balance {
  min-width: 220px;
  padding: 16px 20px;
  border: 1px solid #d8e7f7;
  border-radius: 10px;
  background: #f7fbff;
}

.xh-client-billing__tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  width: max-content;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f5f8fb;
}

.xh-client-billing__tab {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  color: #667085;
  background: transparent;
  cursor: pointer;
}

.xh-client-billing__tab.is-active {
  color: #1769aa;
  background: #fff;
  box-shadow: 0 3px 10px rgba(35, 74, 112, 0.1);
}

.xh-client-billing__panel {
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.xh-client-billing__section-head {
  margin-bottom: 20px;
}

.xh-client-billing__section-head h2 {
  color: #172b4d;
  font-size: 20px;
}

.xh-client-billing__status {
  padding: 4px 10px;
  border-radius: 999px;
  color: #1769aa;
  background: #eaf4ff;
  font-size: 12px;
}

.xh-client-billing__limits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.xh-client-billing__limit {
  padding: 18px;
  border: 1px solid #e5edf5;
  border-radius: 9px;
  background: #f8fafc;
}

.xh-client-billing__limit strong {
  display: block;
  margin-top: 8px;
  color: #172b4d;
  font-size: 20px;
}

.xh-client-billing__filters {
  justify-content: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.xh-client-billing__filters select,
.xh-client-billing__filters input {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  color: #344054;
  background: #fff;
}

.xh-client-billing__table-wrap {
  overflow-x: auto;
}

.xh-client-billing__table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.xh-client-billing__table th,
.xh-client-billing__table td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  font-size: 14px;
}

.xh-client-billing__table th {
  color: #667085;
  background: #f8fafc;
  font-weight: 600;
}

.xh-client-billing__table td:last-child,
.xh-client-billing__table th:last-child {
  text-align: right;
}

.xh-client-billing__consume {
  color: #d14b64;
}

.xh-client-billing__recharge {
  color: #147a55;
}

.xh-client-billing__empty,
.xh-client-billing__loading,
.xh-client-billing__error {
  padding: 44px 20px;
  color: #667085;
  text-align: center;
}

.xh-client-billing__error {
  color: #b42318;
}

.xh-client-billing__pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  color: #667085;
  font-size: 13px;
}

@media (max-width: 900px) {
  .xh-client-billing__limits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .xh-client-billing__header,
  .xh-client-billing__overview {
    align-items: stretch;
    flex-direction: column;
  }

  .xh-client-billing__balance {
    min-width: 0;
  }

  .xh-client-billing__limits {
    grid-template-columns: 1fr;
  }

  .xh-client-billing__tabs {
    width: 100%;
  }

  .xh-client-billing__tab {
    flex: 1;
    padding: 0 8px;
  }
}
