:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #202b30;
  background: #f6f8f9;
  font-synthesis: none;
  line-height: 1.5;
  font-size: 14px;
  --muted: #718087;
  --border: #e5eaec;
  --accent: #157b70;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 15px;
  background: white;
  color: #33464c;
  font-weight: 500;
  transition: background 0.15s;
}
button:hover {
  background: #f0f5f4;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #83c8c0;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
  font-weight: 650;
}
h2 {
  font-size: 17px;
  font-weight: 600;
}
strong {
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}
.topbar {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(28px, calc((100vw - 1184px) / 2));
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.6px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: white;
  background: #1b7167;
  border-radius: 9px;
  font-size: 20px;
  font-weight: 600;
}
.brand-caption {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 8px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quiet {
  padding: 7px 10px;
  background: transparent;
  border-color: transparent;
  font-size: 12px;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.primary:hover {
  background: #11665d;
}
.secondary span {
  margin-left: 8px;
  font-size: 17px;
}
main {
  max-width: 1240px;
  padding: 0 28px;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 42px 0 28px;
}
.page-heading .muted {
  margin-top: 8px;
  font-size: 13px;
}
select {
  background: white;
  color: #46585e;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 34px 10px 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.metric {
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  padding: 21px 23px;
}
.metric p {
  font-size: 12px;
  color: #5c6f76;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.metric-symbol {
  color: #81918f;
  border: 1px solid #edf0f0;
  border-radius: 5px;
  width: 22px;
  text-align: center;
  font-size: 13px;
}
.metric strong {
  display: block;
  font-size: 31px;
  line-height: 1.3;
  margin: 13px 0 9px;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.metric small {
  font-size: 11px;
  color: var(--muted);
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 24px;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  gap: 16px;
}
.panel-heading .muted {
  font-size: 12px;
  margin-top: 6px;
}
.section-tag {
  font-size: 9px;
  color: #93a0a5;
  letter-spacing: 1.4px;
  font-weight: 500;
  margin-left: 12px;
  vertical-align: middle;
}
.table-wrap {
  overflow: auto;
}
.table-hint {
  display: none;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
th {
  font-size: 11px;
  background: #f9fafb;
  color: #7c8b91;
  font-weight: 500;
  padding: 12px 24px;
  border-block: 1px solid #edf0f2;
}
td {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f3f4;
  font-variant-numeric: tabular-nums;
}
th:first-child,
td:first-child {
  text-align: left;
}
td strong {
  font-size: 12px;
}
td small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.usage-toggle {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.usage-toggle:hover {
  background: transparent;
}
.usage-toggle:hover strong,
.usage-toggle[aria-expanded="true"] strong {
  color: var(--accent);
}
.usage-toggle strong::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  color: var(--muted);
  transition: transform 0.15s;
}
.usage-toggle[aria-expanded="true"] strong::before {
  transform: rotate(90deg);
  color: var(--accent);
}
.usage-toggle small {
  padding-left: 14px;
}
.usage-row.expanded td {
  background: #fafcfb;
}
.usage-account-row td {
  padding-block: 12px;
  background: #f6faf9;
  color: #46585e;
}
.usage-account-row td:first-child {
  padding-left: 38px;
  box-shadow: inset 3px 0 0 #cfe4dc;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.panel-note {
  padding: 13px 24px;
  border-top: 1px solid var(--border);
  background: #fcfdfd;
  color: #859299;
  font-size: 11px;
}
.empty {
  padding: 38px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.count-badge,
.status {
  border-radius: 5px;
  background: #f1f5f5;
  color: #607277;
  padding: 4px 8px;
  font-size: 11px;
  white-space: nowrap;
}
.status.active {
  background: #e9f5f0;
  color: #39816c;
}
.status.unavailable,
.status.disabled {
  background: #fff2e4;
  color: #a27638;
}
.status.unknown {
  color: #7c8b91;
}
.provider {
  padding: 0 24px;
  border-top: 1px solid var(--border);
}
.provider-header {
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.provider-account {
  border-top: 1px solid var(--border);
}
.provider-account-header {
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}
.provider-icon {
  height: 38px;
  width: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid #e5eae9;
  background: #f6f8f8;
  color: #526a65;
  display: grid;
  place-items: center;
  font-size: 17px;
}
.provider-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.provider-label {
  min-width: 0;
  flex: 1;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.provider-info {
  min-width: 0;
  flex: 1;
}
.provider-account-header button {
  flex-shrink: 0;
  font-size: 12px;
}
.provider-actions {
  flex-shrink: 0;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.provider-actions button {
  white-space: nowrap;
}
.provider-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 18px;
  background: #f4f8f7;
  border-radius: 7px;
}
.order-label {
  font-size: 12px;
  color: #526a65;
}
.provider-order button {
  font-size: 12px;
  padding: 6px 10px;
}
.provider-order button:disabled {
  cursor: default;
}
.order-message {
  padding: 0 24px 18px;
  font-size: 12px;
  color: #526a65;
}
.provider-models {
  padding: 18px 0 20px;
  border-top: 1px solid var(--border);
}
.provider-models > p + p,
.model-list + p {
  margin-top: 8px;
}
.model-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.model-list li {
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f8faf9;
  color: #526a65;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.quota-content {
  padding-bottom: 20px;
}
.quota-content:empty {
  display: none;
}
.quota-note {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 0;
}
.quota-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.quota-bucket {
  background: #f8faf9;
  border: 1px solid #e8eeeb;
  border-radius: 7px;
  padding: 14px 16px;
}
.quota-bucket h3 {
  font-size: 12px;
  margin: 0;
  font-weight: 500;
  color: #576c65;
}
.quota-bucket strong {
  font-size: 24px;
  display: block;
  margin: 9px 0 6px;
  letter-spacing: -0.6px;
}
.quota-bucket small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.quota-bucket small + small {
  margin-top: 3px;
}
.quota-bucket button {
  margin-top: 12px;
}
.quota-bucket progress {
  appearance: none;
  width: 100%;
  height: 5px;
  border: 0;
  display: block;
  margin-bottom: 10px;
  border-radius: 4px;
  overflow: hidden;
  background: #e4eae7;
}
.quota-bucket progress::-webkit-progress-bar {
  background: #e4eae7;
}
.quota-bucket progress::-webkit-progress-value {
  background: #489c8b;
}
.quota-bucket progress::-moz-progress-bar {
  background: #489c8b;
}
.notice {
  background: #edf7f3;
  border: 1px solid #cfe4dc;
  border-radius: 7px;
  padding: 12px 18px;
  margin-top: 20px;
  font-size: 13px;
}
.error {
  color: #a4443f;
  font-size: 12px;
  line-height: 1.6;
}
.danger {
  color: #a4443f;
}
dialog {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  box-shadow: 0 16px 64px #20342f26;
}
dialog::backdrop {
  background: #182c3866;
}
dialog h2 {
  margin-bottom: 18px;
}
dialog p {
  font-size: 13px;
  overflow-wrap: anywhere;
}
dialog label {
  margin-top: 18px;
}
dialog select {
  width: 100%;
}
dialog fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
dialog fieldset > label:first-child {
  margin-top: 0;
}
dialog details {
  margin-top: 20px;
  font-size: 12px;
}
dialog summary {
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.oauth-step {
  margin: 22px 0 12px;
}
.oauth-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#oauth-form button,
#oauth-status,
#oauth-error {
  margin-top: 16px;
}
#key-secret {
  font-family: monospace;
}
#key-rows td:first-child {
  min-width: 150px;
  max-width: 250px;
  white-space: normal;
  overflow-wrap: anywhere;
}
#create-key {
  white-space: nowrap;
}
.auth-view {
  max-width: 430px;
  margin: 80px auto 40px;
  text-align: center;
}
.auth-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 34px 28px;
  box-shadow: 0 5px 24px #243b3605;
}
.key-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto 25px;
  color: var(--accent);
  background: #eff7f3;
  border: 1px solid #e1eee7;
  border-radius: 15px;
}
.key-mark svg {
  width: 32px;
  height: 32px;
}
.auth-card h1 {
  font-size: 24px;
  margin: 9px 0 12px;
}
.auth-card .muted {
  font-size: 13px;
  line-height: 1.8;
}
.auth-card .eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
}
#auth-form {
  margin-top: 28px;
}
label {
  display: block;
  text-align: left;
  font-size: 12px;
  margin-bottom: 9px;
}
label span {
  font-size: 10px;
  color: var(--muted);
  margin-left: 8px;
}
input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dce3e5;
  border-radius: 7px;
  color: #30434a;
  background: #fcfdfd;
  font-size: 12px;
}
.field-hint {
  text-align: left;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin: 8px 0 18px;
}
.auth-button {
  width: 100%;
  padding: 12px;
}
#auth-error {
  margin-top: 16px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 900px) {
  .brand-caption {
    display: none;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 17px;
  }
  .metric strong {
    font-size: 26px;
  }
  .quota-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  th,
  td {
    padding: 12px 16px;
  }
  .usage-account-row td:first-child {
    padding-left: 28px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 65px;
    padding: 0 18px;
  }
  .brand {
    font-size: 19px;
  }
  .actions {
    gap: 6px;
  }
  .quiet {
    padding: 6px;
  }
  .topbar .actions {
    gap: 3px;
  }
  main {
    padding: 0 16px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    margin: 28px 0 22px;
    gap: 18px;
  }
  h1 {
    font-size: 26px;
  }
  .page-heading .actions {
    width: 100%;
  }
  select {
    flex: 1;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }
  .metric {
    padding: 16px 13px;
  }
  .metric strong {
    font-size: 27px;
  }
  .metric small {
    font-size: 10px;
  }
  .panel-heading {
    padding: 18px 16px;
    align-items: flex-start;
  }
  #usage-count {
    flex-shrink: 0;
  }
  .providers-heading {
    flex-direction: column;
  }
  .provider-actions {
    justify-content: flex-start;
  }
  .section-tag {
    display: none;
  }
  .table-hint {
    display: table-caption;
    text-align: left;
    padding: 0 16px 12px;
    font-size: 11px;
    color: var(--muted);
  }
  .panel-note {
    padding: 12px 16px;
    line-height: 1.8;
  }
  .provider {
    padding: 0 16px;
  }
  .provider-account-header {
    flex-wrap: wrap;
    gap: 9px;
  }
  .provider-icon {
    width: 32px;
    height: 32px;
  }
  .provider-label {
    flex-basis: 100%;
  }
  .provider-account-header button {
    margin-left: auto;
  }
  .quota-grid {
    grid-template-columns: 1fr;
  }
  .auth-view {
    margin: 42px auto 30px;
  }
  .auth-card {
    padding: 30px 23px 24px;
  }
  .empty {
    padding: 30px 16px;
  }
}
