﻿/* Account-page-only SaaS dashboard and API Access UI. */
.tsl-account-entry,
.tsl-account-entry *,
.tsl-account-entry *::before,
.tsl-account-entry *::after {
  box-sizing: border-box;
}

.tsl-account-entry {
  width: 100%;
  max-width: 920px;
  margin: 0 0 72px;
}

.tsl-account-entry [hidden] {
  display: none !important;
}

.tsl-account-entry > .tsl-auth-card {
  margin-bottom: 0 !important;
}

.tsl-account-api-callout {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding: 13px 15px;
  border: 1px solid rgba(59, 130, 246, .3);
  border-radius: 14px;
  background: rgba(37, 99, 235, .07);
  color: var(--tsl-sub, #475569);
  font-size: 14px;
  line-height: 1.5;
}

.tsl-account-api-callout strong {
  flex: 0 0 auto;
  color: var(--tsl-ink, #0f172a);
}

.tsl-account-dashboard {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--tsl-border, #dbe3ef);
  border-radius: 22px;
  background: var(--tsl-surface, #fff);
  box-shadow: 0 18px 55px rgba(15, 23, 42, .09);
}

.tsl-account-dashboard__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 14px;
  border-right: 1px solid var(--tsl-border, #e2e8f0);
  background: var(--tsl-surface-soft, #f8fafc);
}

.tsl-account-dashboard__tab {
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--tsl-sub, #475569);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.tsl-account-dashboard__tab:hover {
  background: rgba(37, 99, 235, .07);
  color: var(--tsl-ink, #0f172a);
}

.tsl-account-dashboard__tab.is-active {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}

.tsl-account-dashboard__body {
  min-width: 0;
}

.tsl-account-dashboard__panel {
  min-width: 0;
  padding: clamp(22px, 4vw, 32px);
}

.tsl-account-dashboard__panel[hidden] {
  display: none !important;
}

.tsl-account-dashboard__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.tsl-account-dashboard__heading h2,
.tsl-api-access h3,
.tsl-account-dashboard__heading p,
.tsl-api-access p {
  margin-top: 0;
}

.tsl-account-dashboard__heading h2 {
  margin-bottom: 7px;
  color: var(--tsl-ink, #0f172a);
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.tsl-account-dashboard__heading p,
.tsl-api-access__panel p,
.tsl-api-access__example p,
.tsl-account-billing-card p {
  margin-bottom: 0;
  color: var(--tsl-sub, #64748b);
  line-height: 1.55;
}

.tsl-account-dashboard .tsl-account-grid {
  margin-top: 0;
}

.tsl-account-dashboard .tsl-auth-actions {
  margin-top: 20px;
}

.tsl-account-billing-card {
  max-width: 520px;
  padding: 20px;
  border: 1px solid var(--tsl-border, #e2e8f0);
  border-radius: 16px;
  background: var(--tsl-surface-soft, #f8fafc);
}

.tsl-account-billing-card > span {
  display: block;
  margin-bottom: 5px;
  color: var(--tsl-sub, #64748b);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tsl-account-billing-card > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--tsl-ink, #0f172a);
  font-size: 21px;
}

.tsl-account-billing-card .tsl-auth-primary {
  margin-top: 18px;
}

.tsl-api-access__heading {
  margin-bottom: 18px;
}

.tsl-api-access__badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.tsl-api-access__badge.is-enabled {
  background: #dcfce7;
  color: #166534;
}

.tsl-api-access__badge.is-disabled {
  background: #fef3c7;
  color: #92400e;
}

.tsl-api-access__notice {
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 14px;
  line-height: 1.5;
}

.tsl-api-access__notice.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.tsl-api-access__status-grid,
.tsl-api-access__usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tsl-api-access__status-grid > div,
.tsl-api-access__usage-grid > div {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--tsl-border, #e2e8f0);
  border-radius: 14px;
  background: var(--tsl-surface-soft, #f8fafc);
}

.tsl-api-access__status-grid span,
.tsl-api-access__usage-grid span,
.tsl-api-access__request-body span {
  display: block;
  margin-bottom: 5px;
  color: var(--tsl-sub, #64748b);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tsl-api-access__status-grid strong,
.tsl-api-access__usage-grid strong {
  display: block;
  color: var(--tsl-ink, #0f172a);
}

.tsl-api-access__status-grid small {
  display: block;
  margin-top: 4px;
  color: var(--tsl-sub, #64748b);
  font-size: 12px;
  line-height: 1.4;
}

.tsl-api-access__status-grid code {
  display: block;
  color: #2563eb;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.tsl-api-access__panel,
.tsl-api-access__example,
.tsl-api-access__secret {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--tsl-border, #e2e8f0);
  border-radius: 15px;
  background: var(--tsl-surface-soft, #f8fafc);
}

.tsl-api-access__panel-head,
.tsl-api-access__secret-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tsl-api-access h3 {
  margin-bottom: 4px;
  color: var(--tsl-ink, #0f172a);
  font-size: 17px;
}

.tsl-api-access__create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

.tsl-api-access__create-row label {
  color: var(--tsl-ink, #0f172a);
  font-size: 13px;
  font-weight: 750;
}

.tsl-api-access__create-row input {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid var(--tsl-border, #cbd5e1);
  border-radius: 11px;
  background: var(--tsl-surface, #fff);
  color: var(--tsl-ink, #0f172a);
  font: inherit;
}

.tsl-api-access__primary,
.tsl-api-access__secondary,
.tsl-api-access__danger {
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tsl-api-access__primary {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
}

.tsl-api-access__secondary {
  border: 1px solid var(--tsl-border, #cbd5e1);
  background: var(--tsl-surface, #fff);
  color: var(--tsl-ink, #0f172a);
}

.tsl-api-access__danger {
  border: 1px solid #fecaca;
  background: var(--tsl-surface, #fff);
  color: #b91c1c;
}

.tsl-api-access button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.tsl-api-access__secret {
  border-color: #93c5fd;
  background: #eff6ff;
}

.tsl-api-access__secret-label {
  display: block;
  margin-bottom: 4px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tsl-api-access__secret-row {
  align-items: center;
  margin-top: 12px;
}

.tsl-api-access__secret-row code {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 11px;
  background: #fff;
  color: #0f172a;
  overflow-wrap: anywhere;
  user-select: all;
}

.tsl-api-access__inline-message {
  margin: 8px 0 0;
  color: var(--tsl-sub, #64748b);
  font-size: 13px;
}

.tsl-api-access__inline-message:empty {
  display: none;
}

.tsl-api-access__inline-message.is-error {
  color: #b91c1c;
}

.tsl-api-access__inline-message.is-success {
  color: #15803d;
}

.tsl-api-access__key-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.tsl-api-access__key {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(130px, .8fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--tsl-border, #e2e8f0);
  border-radius: 12px;
  background: var(--tsl-surface, #fff);
}

.tsl-api-access__key.is-revoked {
  background: transparent;
  opacity: .68;
}

.tsl-api-access__key-name {
  display: block;
  margin-bottom: 4px;
  color: var(--tsl-ink, #0f172a);
}

.tsl-api-access__key code {
  color: var(--tsl-sub, #64748b);
  overflow-wrap: anywhere;
}

.tsl-api-access__key-meta {
  color: var(--tsl-sub, #64748b);
  font-size: 12px;
  line-height: 1.45;
}

.tsl-api-access__key-status {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize;
}

.tsl-api-access__key-status.is-revoked {
  background: #e2e8f0;
  color: #475569;
}

.tsl-api-access__empty {
  margin: 10px 0 0;
  color: var(--tsl-sub, #64748b);
  line-height: 1.5;
}

.tsl-api-access__revoked {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--tsl-border, #e2e8f0);
}

.tsl-api-access__revoked summary,
.tsl-api-access__curl summary {
  width: max-content;
  max-width: 100%;
  color: var(--tsl-sub, #64748b);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.tsl-api-access__usage-grid {
  margin-top: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tsl-api-access__request-body {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.tsl-api-access__request-body code {
  color: var(--tsl-ink, #0f172a);
  overflow-wrap: anywhere;
}

.tsl-api-access__curl {
  margin-top: 12px;
}

.tsl-api-access__curl pre {
  margin: 10px 0 0;
  padding: 13px;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
}

html[data-tsl-theme="dark"] .tsl-account-dashboard,
html[data-tsl-theme="dark"] .tsl-api-access__secret-row code,
html[data-tsl-theme="dark"] .tsl-api-access__secondary,
html[data-tsl-theme="dark"] .tsl-api-access__danger,
html[data-tsl-theme="dark"] .tsl-api-access__create-row input,
html[data-tsl-theme="dark"] .tsl-api-access__key {
  background: #111827;
  color: #e5e7eb;
  border-color: #334155;
}

html[data-tsl-theme="dark"] .tsl-account-dashboard__nav,
html[data-tsl-theme="dark"] .tsl-api-access__panel,
html[data-tsl-theme="dark"] .tsl-api-access__example,
html[data-tsl-theme="dark"] .tsl-api-access__status-grid > div,
html[data-tsl-theme="dark"] .tsl-api-access__usage-grid > div,
html[data-tsl-theme="dark"] .tsl-account-billing-card {
  background: #0f172a;
  border-color: #334155;
}

html[data-tsl-theme="dark"] .tsl-account-api-callout {
  background: rgba(37, 99, 235, .12);
  border-color: rgba(96, 165, 250, .35);
}

html[data-tsl-theme="dark"] .tsl-api-access__secret {
  background: #172554;
  border-color: #1d4ed8;
}

html[data-tsl-theme="dark"] .tsl-account-dashboard__heading h2,
html[data-tsl-theme="dark"] .tsl-account-api-callout strong,
html[data-tsl-theme="dark"] .tsl-api-access h3,
html[data-tsl-theme="dark"] .tsl-api-access__status-grid strong,
html[data-tsl-theme="dark"] .tsl-api-access__usage-grid strong,
html[data-tsl-theme="dark"] .tsl-api-access__key-name,
html[data-tsl-theme="dark"] .tsl-api-access__request-body code,
html[data-tsl-theme="dark"] .tsl-api-access__create-row label,
html[data-tsl-theme="dark"] .tsl-account-billing-card > strong {
  color: #f8fafc;
}

@media (max-width: 760px) {
  .tsl-account-entry {
    margin-bottom: 56px;
  }

  .tsl-account-dashboard {
    display: block;
    border-radius: 18px;
  }

  .tsl-account-dashboard__nav {
    flex-direction: row;
    gap: 5px;
    overflow-x: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--tsl-border, #e2e8f0);
    scrollbar-width: none;
  }

  .tsl-account-dashboard__nav::-webkit-scrollbar {
    display: none;
  }

  .tsl-account-dashboard__tab {
    flex: 0 0 auto;
    width: auto;
    padding: 9px 12px;
    text-align: center;
  }

  .tsl-account-dashboard__panel {
    padding: 20px 18px;
  }

  .tsl-account-dashboard__heading,
  .tsl-api-access__panel-head,
  .tsl-api-access__secret-row {
    align-items: stretch;
    flex-direction: column;
  }

  .tsl-api-access__badge {
    align-self: flex-start;
  }

  .tsl-api-access__status-grid,
  .tsl-api-access__create-row,
  .tsl-api-access__key,
  .tsl-api-access__request-body {
    grid-template-columns: 1fr;
  }

  .tsl-api-access__usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tsl-api-access__primary,
  .tsl-api-access__secondary,
  .tsl-api-access__danger {
    width: 100%;
  }

  .tsl-account-api-callout {
    display: block;
  }

  .tsl-account-api-callout strong {
    display: block;
    margin-bottom: 3px;
  }
}

/* V2.9 FIX1: fast account hero, no loading state */
.tsl-account-fast-hero-signed-in,
.tsl-account-fast-deck-signed-in {
  display: none;
}

html.tsl-user-signed-in .tsl-account-fast-hero-signed-out,
html.tsl-user-signed-in .tsl-account-fast-deck-signed-out,
html.tsl-account-fast-signed-in .tsl-account-fast-hero-signed-out,
html.tsl-account-fast-signed-in .tsl-account-fast-deck-signed-out {
  display: none !important;
}

html.tsl-user-signed-in .tsl-account-fast-hero-signed-in,
html.tsl-user-signed-in .tsl-account-fast-deck-signed-in,
html.tsl-account-fast-signed-in .tsl-account-fast-hero-signed-in,
html.tsl-account-fast-signed-in .tsl-account-fast-deck-signed-in {
  display: block !important;
}

/* Hide the injected watchlist promo for signed-in users. It can remain for signed-out visitors only. */
html.tsl-user-signed-in #tsl-auth-watchlist-promise,
html.tsl-account-fast-signed-in #tsl-auth-watchlist-promise,
html.tsl-user-signed-in .tsl-auth-watchlist-promise,
html.tsl-account-fast-signed-in .tsl-auth-watchlist-promise {
  display: none !important;
}

/* Respect native hidden even when dashboard panels use grid/flex. */
.tsl-account-entry [hidden],
.tsl-account-dashboard[hidden],
.tsl-account-dashboard__panel[hidden],
.tsl-api-access__secret[hidden],
.tsl-api-access__usage-grid[hidden],
.tsl-api-access__revoked[hidden] {
  display: none !important;
}

.tsl-api-access__curl + .tsl-api-access__curl {
  margin-top: 10px;
}

.tsl-api-access__curl pre {
  max-height: 280px;
  overflow: auto;
}


/* V2.10 register split account note */
.tsl-register-split-account-note {
  display: grid;
  gap: 6px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.06);
  color: #334155;
}
.tsl-register-split-account-note strong {
  color: #0f172a;
}
.tsl-register-split-account-note a {
  width: fit-content;
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
}
[data-tsl-theme="dark"] .tsl-register-split-account-note {
  background: rgba(96, 165, 250, 0.10);
  border-color: rgba(147, 197, 253, 0.20);
  color: #cbd5e1;
}
[data-tsl-theme="dark"] .tsl-register-split-account-note strong {
  color: #e5edff;
}
