html[data-design-variant="light_v32"] body { color: #111318; background: #f5f5f2; }
html[data-design-variant="light_v32"] h1,
html[data-design-variant="light_v32"] h2,
html[data-design-variant="light_v32"] h3,
html[data-design-variant="light_v32"] h4 { color: #111318; }
html[data-design-variant="light_v32"] .text-on-surface { color: #111318 !important; }
html[data-design-variant="light_v32"] .text-on-surface-variant { color: #5f6672 !important; }
html[data-design-variant="light_v32"] .text-primary { color: #315ef7 !important; }
html[data-design-variant="light_v32"] .api-cta-primary { color: #fff !important; }

/* Dark top bar stays dark. Light-theme leftover tokens must not turn this ink-on-black. */
.acct-topnav {
  background: #111318 !important;
  border-bottom: 1px solid #2a2e36 !important;
  box-shadow: none !important;
}
.acct-topnav a,
.acct-topnav .text-white,
.acct-topnav .text-gray-400,
.acct-topnav .text-on-surface,
.acct-topnav .text-on-surface-variant {
  color: #d7dbe2 !important;
  text-shadow: none !important;
}
.acct-topnav a:hover,
.acct-topnav a.is-current,
.acct-topnav a[aria-current="page"] {
  color: #fff !important;
}
.acct-topnav .acct-brand,
.acct-topnav .acct-brand span { color: #fff !important; }
.acct-topnav .acct-brand span.acct-brand-mark { color: #8ec8ff !important; }
#navCreditBadge,
.acct-topnav #navCreditBadge {
  background: #1d2430 !important;
  color: #e8f3ff !important;
  border: 1px solid #3b4658 !important;
}
html[data-design-variant="light_v32"] body > nav.acct-topnav {
  background: #111318 !important;
  border-bottom: 1px solid #2a2e36 !important;
}
html[data-design-variant="light_v32"] body > nav.acct-topnav a,
html[data-design-variant="light_v32"] body > nav.acct-topnav .text-white,
html[data-design-variant="light_v32"] body > nav.acct-topnav .text-gray-400,
html[data-design-variant="light_v32"] body > nav.acct-topnav .text-on-surface,
html[data-design-variant="light_v32"] body > nav.acct-topnav .text-on-surface-variant {
  color: #d7dbe2 !important;
}
html[data-design-variant="light_v32"] body > nav.acct-topnav a:hover,
html[data-design-variant="light_v32"] body > nav.acct-topnav a.is-current,
html[data-design-variant="light_v32"] body > nav.acct-topnav a[aria-current="page"] {
  color: #fff !important;
}
.acct-topnav #navCtaBtn,
html[data-design-variant="light_v32"] body > nav.acct-topnav #navCtaBtn {
  color: #fff !important;
}

.acct-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  max-width: 1180px;
  margin: 0 auto;
  min-height: calc(100vh - 4rem);
}
.acct-side {
  border-right: 1px solid #e6e8ed;
  padding: 1.25rem 0.85rem;
  background: #fff;
}
.acct-side-kicker {
  padding: 0 0.75rem 0.65rem;
  color: #5f6672;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.acct-nav a {
  display: block;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.2rem;
  color: #111318;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}
.acct-nav a:hover { background: #f3f4f6; }
.acct-nav a.is-active { background: #111318; color: #fff; }
.acct-main {
  padding: 1.35rem 1.5rem 3rem;
}
.acct-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.acct-title {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 800;
}
.acct-sub {
  margin: 0;
  max-width: 42rem;
  color: #5f6672;
  font-size: 0.88rem;
  line-height: 1.45;
}
.acct-card {
  background: #fff;
  border: 1px solid #d9dce2;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.acct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.acct-table th {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid #e6e8ed;
  color: #111318;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.acct-table td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid #f0f1f4;
  color: #111318;
  vertical-align: middle;
}
.api-cta-primary {
  background: #315ef7;
  color: #fff;
  box-shadow: 0 10px 24px rgba(49,94,247,0.22);
  border: 0;
  cursor: pointer;
}
.api-cta-primary:disabled { box-shadow: none; filter: grayscale(0.35); opacity: 0.55; cursor: wait; }
.api-cta-secondary {
  border: 1px solid #d9dce2;
  color: #111318;
  background: #fff;
  text-decoration: none;
  cursor: pointer;
}
.api-key-name-input,
.api-custom-input {
  width: 100%;
  border: 1px solid #d9dce2;
  border-radius: 10px;
  background: #fff;
  color: #111318;
  padding: 0.7rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.api-key-name-input::placeholder,
.api-custom-input::placeholder { color: #8a909b; font-weight: 500; }
.api-key-name-input:focus,
.api-custom-input:focus {
  outline: none;
  border-color: #315ef7;
  box-shadow: 0 0 0 3px rgba(49,94,247,0.14);
}
.api-key-create-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 0.85rem;
}
.api-key-create-row .api-key-name-input { flex: 1; min-width: 16rem; }
.api-key-masked { font-family: "JetBrains Mono", monospace; color: #111318; font-size: 0.82rem; }
.api-wallet-balance { color: #111318; font-size: 2rem; line-height: 1.1; font-weight: 800; }
.api-stat-label { margin-bottom: 0.2rem; color: #5f6672; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.api-stat-note { margin-top: 0.35rem; color: #5f6672; font-size: 0.78rem; line-height: 1.4; }
.api-empty-cell { color: #5f6672; }
.api-key-secret-box { display: flex; gap: 0.75rem; align-items: stretch; }
.api-key-secret { flex: 1; word-break: break-all; background: #0d1117; border: 1px solid #30363d; border-radius: 8px; padding: 0.875rem; font-family: "JetBrains Mono", monospace; font-size: 0.8125rem; color: #a5d6ff; }
.api-key-copy { flex: 0 0 auto; min-width: 5.5rem; border-radius: 8px; border: 1px solid #d9dce2; background: #fff; color: #111318; font-size: 0.8rem; font-weight: 800; padding: 0.75rem 1rem; cursor: pointer; }
.api-key-secret-wrap { border: 1px solid #f3b4b4; background: #fff7f7; box-shadow: 0 10px 24px rgba(180,35,24,0.08); border-radius: 12px; margin-bottom: 0.85rem; }
.api-key-secret-kicker { color: #b42318; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.api-key-secret-title { margin-top: 0.25rem; color: #7a150f; font-size: 1.05rem; font-weight: 800; }
.api-key-ack { margin-top: 0.85rem; width: 100%; border-radius: 10px; border: 1px solid #f3b4b4; background: #fff; color: #7a150f; font-size: 0.8rem; font-weight: 800; padding: 0.7rem 1rem; cursor: pointer; }
.api-pack-list { display: grid; gap: 0.45rem; margin: 0.75rem 0 1rem; }
.api-pack-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #d9dce2;
  border-radius: 10px;
  background: #fff;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}
.api-pack-row.is-selected { border-color: #315ef7; background: #eef2ff; }
.api-pack-row input { accent-color: #315ef7; }
.api-pack-name { color: #111318; font-weight: 800; }
.api-pack-copy { color: #5f6672; font-size: 0.8rem; }
.api-custom-hint { margin: 0.15rem 0 0; color: #5f6672; font-size: 0.75rem; line-height: 1.4; }
.api-custom-hint.is-error { color: #b42318; font-weight: 700; }
.api-status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 0.22rem 0.55rem; font-size: 0.72rem; font-weight: 800; border: 1px solid #d9dce2; background: #fff; color: #5f6672; }
.api-status-success { border-color: #86d6a8; background: #ecfdf3; color: #116149; }
.api-status-failed { border-color: #f3b4b4; background: #fef2f2; color: #b42318; }
.api-status-running { border-color: #b7c8ff; background: #eef2ff; color: #2456c8; }
.api-detail-line { color: #5f6672; font-size: 0.74rem; line-height: 1.45; }
.api-ledger-select { border: 1px solid #d9dce2; border-radius: 10px; background: #fff; color: #111318; padding: 0.55rem 0.75rem; font-size: 0.75rem; font-weight: 700; outline: none; }
.api-ledger-select:focus { border-color: #315ef7; box-shadow: 0 0 0 3px rgba(49,94,247,0.14); }
.api-ledger-img { width: 58px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid #d9dce2; background: #eef0f2; display: block; }
.api-cost-lines { min-width: 10rem; line-height: 1.5; }
.api-cost-warning { color: #b45309; }
.api-stat-card { min-height: 6.4rem; border-radius: 12px; border: 1px solid #d9dce2; background: #fff; padding: 0.9rem; }
.api-stat-value { color: #111318; font-size: 1.35rem; line-height: 1.08; font-weight: 800; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#guestLoginModal h3,
#guestLoginModal .text-white { color: #fff !important; }
#guestLoginModal .text-on-surface-variant { color: #b7bec9 !important; }
#guestLoginModal .text-on-surface,
#guestLoginModal .hover\:text-on-surface:hover { color: #f7f5fd !important; }
@media (max-width: 860px) {
  .acct-shell { grid-template-columns: 1fr; }
  .acct-side { border-right: 0; border-bottom: 1px solid #e6e8ed; padding-bottom: 0.75rem; }
  .acct-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .acct-nav a { margin: 0; }
}
