:root {
  --bg: #fbfbf7;
  --surface: #ffffff;
  --surface-strong: #111111;
  --text: #111111;
  --muted: #686864;
  --line: #e2e2dc;
  --accent: #0b6b60;
  --accent-2: #8b5a2b;
  --code: #171717;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(251, 251, 247, 0) 34%),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid rgba(222, 222, 214, 0.84);
  background: rgba(251, 251, 247, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
}

.header-cta,
.primary-action,
.secondary-action,
.preview-header button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-weight: 650;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.header-cta,
.primary-action,
.preview-header button {
  border: 1px solid var(--surface-strong);
  background: var(--surface-strong);
  color: #ffffff;
}

.header-cta {
  padding: 0 16px;
  font-size: 14px;
  white-space: nowrap;
}

.primary-action {
  padding: 0 20px;
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  padding: 0 18px;
}

.header-cta:hover,
.primary-action:hover,
.secondary-action:hover,
.preview-header button:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 1.02fr);
  gap: clamp(34px, 6vw, 74px);
  align-items: center;
  min-height: 650px;
  padding: clamp(42px, 6vw, 72px) clamp(20px, 6vw, 80px) clamp(38px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 800px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 640px;
  margin-bottom: 24px;
  font-size: 4.25rem;
  font-weight: 620;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 span {
  display: block;
  white-space: nowrap;
}

.hero-subtitle {
  max-width: 620px;
  margin-bottom: 28px;
  color: #343431;
  font-size: 1.22rem;
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.terminal-panel {
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.92);
  border-radius: var(--radius);
  background: var(--code);
  box-shadow: 0 18px 54px rgba(20, 20, 20, 0.12);
  justify-self: end;
}

.terminal-topbar {
  display: flex;
  gap: 7px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-topbar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b4b4aa;
}

.terminal-panel pre {
  margin: 0;
  overflow-x: auto;
  padding: clamp(20px, 4vw, 34px);
  color: #f4f4ee;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--line);
}

.trust-strip span {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-weight: 650;
  text-align: center;
}

.trust-strip span:last-child {
  border-right: 0;
}

.section {
  padding: clamp(62px, 8vw, 104px) clamp(20px, 6vw, 80px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 0.66fr);
  gap: 36px;
  margin-bottom: clamp(38px, 5vw, 68px);
}

.section-heading h2,
.workflow-copy h2,
.final-cta h2 {
  margin-bottom: 0;
  font-size: 3.65rem;
  font-weight: 610;
  line-height: 1.04;
  letter-spacing: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature-card {
  min-height: 264px;
  padding: 28px 24px 26px;
  border-right: 1px solid var(--line);
}

.feature-card:last-child {
  border-right: 0;
}

.feature-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f8f3;
  color: var(--accent);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.feature-card h3 {
  margin-bottom: 14px;
  font-size: 1.2rem;
  line-height: 1.1;
}

.feature-card p,
.workflow-copy p,
.final-cta p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.workflow {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: center;
  padding: clamp(62px, 8vw, 104px) clamp(20px, 6vw, 80px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #efefe8;
}

.workflow-copy p {
  max-width: 560px;
  margin-top: 22px;
}

.dashboard-preview {
  overflow: hidden;
  border: 1px solid #d1d1c8;
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.metric-row div {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.metric-row div:last-child {
  border-right: 0;
}

.metric-row span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-transform: uppercase;
}

.metric-row strong {
  font-size: 2.05rem;
  line-height: 1;
}

.preview-panel {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  font-weight: 700;
}

.preview-header button {
  min-height: 34px;
  padding: 0 14px;
  cursor: pointer;
}

.prompt-line,
.result-line {
  border-radius: var(--radius);
  padding: 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.prompt-line {
  margin-bottom: 10px;
  background: #f5f5ef;
}

.result-line {
  color: #ffffff;
  background: var(--accent);
}

.log-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.log-list div:last-child {
  border-bottom: 0;
}

.log-list span {
  color: #3e3e39;
}

.log-list strong {
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(26px, 5vw, 72px);
  padding: clamp(62px, 8vw, 96px) clamp(20px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.setup-step {
  min-width: 0;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.step-number {
  display: inline-flex;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #edf4ee;
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 700;
}

.step-heading h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.08;
}

.setup-step p {
  max-width: 390px;
  min-height: 82px;
  margin-bottom: 34px;
  color: #6d6d74;
  font-size: 1.12rem;
  line-height: 1.45;
}

.step-visual {
  min-height: 152px;
  color: var(--accent);
}

.step-visual svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.user-line,
.credit-title,
.key-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-line span,
.credit-title span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #dce8de;
}

.user-line span:first-of-type {
  width: 48px;
}

.user-line span:last-of-type {
  width: 96px;
}

.login-options {
  display: flex;
  gap: 14px;
  margin-top: 30px;
}

.login-options div {
  display: flex;
  width: 70px;
  height: 70px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: #f2f3ee;
  color: #111111;
  font-size: 1.5rem;
  font-weight: 800;
}

.credit-title span:first-of-type {
  width: 48px;
}

.credit-title span:last-of-type {
  width: 86px;
}

.credit-row {
  display: flex;
  max-width: 360px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  border-radius: var(--radius);
  background: #f3f5ef;
  padding: 11px 14px;
  color: #6d6d74;
  font-size: 1.05rem;
}

.credit-row strong {
  color: #111111;
}

.key-title {
  margin-bottom: 18px;
}

.key-title span,
.key-visual code,
.secret-dots {
  display: block;
  max-width: 370px;
  border-radius: var(--radius);
  background: #f3f5ef;
  padding: 12px 16px;
  color: #6d6d74;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.key-visual code {
  margin-bottom: 12px;
  color: #111111;
}

.secret-dots {
  color: #111111;
  letter-spacing: 0.08em;
}

.final-cta {
  display: grid;
  justify-items: center;
  padding: clamp(70px, 11vw, 136px) 20px;
  text-align: center;
}

.final-cta img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  margin-bottom: 24px;
}

.final-cta p {
  max-width: 540px;
  margin: 18px 0 28px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer span:first-child {
  color: var(--text);
  font-weight: 700;
}

.app-header {
  position: sticky;
}

.compact-action {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.auth-page,
.dashboard-page {
  background: #f7f7f2;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 0.58fr);
  gap: clamp(42px, 7vw, 104px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(48px, 8vw, 108px) clamp(20px, 6vw, 80px);
}

.auth-copy h1,
.dashboard-hero h1 {
  max-width: 720px;
  margin-bottom: 24px;
  font-size: 4rem;
  font-weight: 620;
  line-height: 1.02;
}

.auth-copy p,
.dashboard-hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
}

.auth-panel,
.dashboard-card,
.dashboard-metrics article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.auth-panel {
  padding: 30px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8f8f3;
  padding: 4px;
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 6px rgba(17, 17, 17, 0.08);
}

.auth-mode[hidden] {
  display: none;
}

.auth-panel h2 {
  margin-bottom: 10px;
  font-size: 2rem;
}

.auth-panel > p {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.5;
}

.oauth-button,
.login-form input,
.test-form select,
.test-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf7;
  color: var(--text);
  font: inherit;
}

.oauth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}

.oauth-button span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-strong);
  color: #ffffff;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.login-form,
.test-form {
  display: grid;
  gap: 12px;
}

.login-form label,
.test-form label {
  color: #3e3e39;
  font-size: 0.9rem;
  font-weight: 700;
}

.login-form input,
.test-form select,
.test-form textarea {
  padding: 0 14px;
}

.test-form textarea {
  min-height: 104px;
  padding-top: 12px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
}

.auth-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.form-error {
  margin: 2px 0 0;
  color: #a33a1f;
  font-size: 0.9rem;
  font-weight: 700;
}

.dashboard-shell {
  padding: clamp(38px, 6vw, 78px) clamp(20px, 6vw, 80px) clamp(68px, 8vw, 108px);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
  margin-bottom: 32px;
}

.dashboard-hero-compact h1 {
  max-width: 760px;
  font-size: 3.2rem;
}

.account-pill {
  min-width: 280px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 20px;
}

.account-pill span,
.dashboard-metrics span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  text-transform: uppercase;
}

.account-pill strong {
  overflow-wrap: anywhere;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-metrics article {
  min-height: 150px;
  padding: 22px;
}

.dashboard-metrics strong {
  display: block;
  margin-bottom: 16px;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-metrics p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.metric-button,
.metric-link {
  width: 100%;
  margin-bottom: 14px;
  text-align: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-grid-wide {
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
}

.dashboard-card {
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.card-header h2 {
  margin: 0;
  font-size: 1.75rem;
}

.card-header .eyebrow {
  margin-bottom: 8px;
}

.card-header code {
  border-radius: var(--radius);
  background: #f3f5ef;
  padding: 10px 12px;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.small-action {
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.key-create-form,
.recharge-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
}

.recharge-form {
  grid-template-columns: 1fr;
  gap: 12px;
}

.key-create-form label,
.recharge-form label {
  color: #3e3e39;
  font-size: 0.88rem;
  font-weight: 750;
}

.key-create-form input,
.key-create-form select,
.recharge-form input,
.recharge-form select,
.recharge-form textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf7;
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}

.recharge-form textarea {
  min-height: 104px;
  padding-top: 12px;
  resize: vertical;
}

.key-create-form .form-submit {
  margin-top: 8px;
}

.generated-key {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f3f5ef;
  padding: 14px;
}

.generated-key span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.generated-key code {
  overflow-wrap: anywhere;
}

.base-url-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.base-url-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f3f5ef;
  padding: 12px;
}

.base-url-box code {
  overflow-wrap: anywhere;
}

.key-list,
.usage-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.key-row,
.usage-table div {
  display: grid;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.key-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.key-row:last-child,
.usage-table div:last-child {
  border-bottom: 0;
}

.key-row code {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.key-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.key-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf7;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0 10px;
}

.key-row.is-revoked {
  opacity: 0.62;
}

.key-row span,
.usage-table strong {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.test-result {
  margin-top: 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  padding: 14px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
}

.usage-table div {
  grid-template-columns: minmax(220px, 1fr) 100px 90px 90px;
}

.usage-table div:first-child {
  background: #f8f8f3;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.data-list {
  display: grid;
  gap: 10px;
}

.data-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf7;
  padding: 13px 14px;
}

.data-list span {
  color: var(--muted);
}

.data-list strong {
  text-align: right;
}

.recharge-table div {
  grid-template-columns: minmax(120px, 0.8fr) minmax(100px, 0.7fr) minmax(140px, 1fr) minmax(120px, 0.8fr);
}

.admin-auth-page .auth-copy h1 {
  max-width: 820px;
}

.admin-shell {
  padding-top: clamp(34px, 5vw, 64px);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.82fr);
  gap: 18px;
  margin-bottom: 18px;
}

.admin-card {
  overflow: hidden;
}

.admin-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table [role="row"] {
  display: grid;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.admin-table [role="row"]:last-child {
  border-bottom: 0;
}

.admin-table [role="row"]:first-child {
  background: #f8f8f3;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.user-table [role="row"] {
  grid-template-columns: minmax(170px, 1.2fr) 90px 80px 60px 86px 110px;
}

.recharge-admin-table [role="row"] {
  grid-template-columns: 86px minmax(150px, 1fr) 76px 90px 92px 150px;
}

.provider-table [role="row"] {
  grid-template-columns: minmax(180px, 1.1fr) minmax(140px, 1fr) minmax(130px, 1fr) 86px 100px 90px;
}

.provider-status-table {
  margin-bottom: 18px;
}

.provider-status-table [role="row"] {
  grid-template-columns: 150px 86px 110px minmax(150px, 1fr);
}

.model-table [role="row"] {
  grid-template-columns: minmax(180px, 1.1fr) minmax(120px, 0.8fr) 86px minmax(120px, 0.8fr);
}

.admin-table button,
.admin-action-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf7;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  padding: 0 10px;
  white-space: nowrap;
}

.admin-table button:disabled {
  cursor: default;
  opacity: 0.58;
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill.is-live {
  background: #e8f2ec;
  color: var(--accent);
}

.status-pill.is-warn {
  background: #fff3d6;
  color: #7a5600;
}

.status-pill.is-muted {
  background: #eeeeea;
  color: var(--muted);
}

.provider-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.provider-live-console {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-access-details,
.advanced-route-config {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf7;
  margin-bottom: 14px;
}

.admin-access-details summary,
.advanced-route-config summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 0 16px;
  color: var(--text);
  font-weight: 820;
  list-style: none;
}

.admin-access-details summary::-webkit-details-marker,
.advanced-route-config summary::-webkit-details-marker {
  display: none;
}

.admin-access-details summary b {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  padding: 5px 9px;
  text-transform: uppercase;
}

.admin-access-details summary b.is-live {
  border-color: #cfe3d7;
  background: #e8f2ec;
  color: var(--accent);
}

.admin-token-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.advanced-route-config[open] {
  padding-bottom: 16px;
}

.advanced-route-config[open] summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.advanced-route-config .provider-form,
.advanced-route-config .provider-table {
  margin-right: 16px;
  margin-left: 16px;
}

.provider-console-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf7;
  padding: 16px;
}

.provider-console-panel-wide {
  grid-column: 1 / -1;
}

.console-heading {
  margin-bottom: 14px;
}

.console-heading h3 {
  margin-bottom: 6px;
  font-size: 1.08rem;
}

.console-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.console-heading code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.provider-secret-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.provider-secret-form .wide-field {
  grid-column: 1 / -1;
}

.provider-preset-summary {
  border: 1px solid #dfe6dd;
  border-radius: var(--radius);
  background: #f4f8f1;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.45;
  margin: 0;
  padding: 10px 12px;
}

.provider-secret-form label {
  color: #3e3e39;
  font-size: 0.82rem;
  font-weight: 750;
}

.provider-secret-form input,
.provider-secret-form select,
.provider-secret-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  padding: 0 10px;
}

.provider-secret-form textarea {
  min-height: 86px;
  resize: vertical;
  padding: 10px;
}

.provider-form-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
}

.provider-form-actions .primary-action,
.provider-form-actions .secondary-action {
  min-height: 40px;
}

.credit-console-form {
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 1fr) 120px minmax(180px, 1fr) auto;
}

.admin-result {
  min-height: 86px;
  max-height: 260px;
  overflow: auto;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111111;
  color: #f4f4ee;
  padding: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.admin-result.is-error {
  border-color: #8b5a2b;
  color: #fff3d6;
}

.form-field {
  display: grid;
  gap: 7px;
}

.provider-form label {
  color: #3e3e39;
  font-size: 0.82rem;
  font-weight: 750;
}

.provider-form input,
.provider-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbf7;
  color: var(--text);
  font: inherit;
  padding: 0 10px;
}

.provider-form .form-submit {
  grid-column: 1 / -1;
  margin-top: 6px;
}

.admin-risk-list {
  margin-bottom: 16px;
}

.admin-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
  }

  .nav {
    display: none;
  }

  .hero,
  .workflow,
  .setup-steps {
    grid-template-columns: 1fr;
  }

  .auth-shell,
  .dashboard-hero,
  .dashboard-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid-wide,
  .key-create-form,
  .provider-form,
  .provider-live-console,
  .provider-secret-form,
  .admin-token-form,
  .credit-console-form {
    grid-template-columns: 1fr;
  }

  .provider-console-panel-wide,
  .provider-secret-form .wide-field {
    grid-column: auto;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    max-width: 720px;
    font-size: 4rem;
  }

  .hero-subtitle {
    font-size: 1.24rem;
  }

  .section-heading h2,
  .workflow-copy h2,
  .final-cta h2 {
    font-size: 2.85rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-card:nth-child(2) {
    border-right: 0;
  }

  .feature-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .trust-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-strip span:nth-child(3n) {
    border-right: 0;
  }

  .trust-strip span:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand span {
    display: none;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 12px;
  }

  h1 {
    font-size: 2.62rem;
    line-height: 1.03;
  }

  h1 span {
    white-space: normal;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero,
  .section,
  .workflow,
  .setup-steps {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .terminal-panel pre {
    font-size: 0.75rem;
  }

  .section-heading h2,
  .workflow-copy h2,
  .final-cta h2 {
    font-size: 2.05rem;
  }

  .metric-row strong {
    font-size: 2rem;
  }

  .feature-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card:nth-child(2),
  .metric-row div {
    border-right: 0;
  }

  .feature-card {
    min-height: 254px;
    border-bottom: 1px solid var(--line);
  }

  .feature-card:last-child {
    border-bottom: 0;
  }

  .feature-icon {
    margin-bottom: 42px;
  }

  .step-heading {
    gap: 14px;
    margin-bottom: 20px;
  }

  .step-number {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 1.2rem;
  }

  .step-heading h2 {
    font-size: 1.65rem;
  }

  .setup-step p {
    min-height: 0;
    margin-bottom: 24px;
    font-size: 1rem;
  }

  .metric-row div {
    border-bottom: 1px solid var(--line);
  }

  .metric-row div:last-child {
    border-bottom: 0;
  }

  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-strip span {
    min-height: 64px;
  }

  .trust-strip span:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .trust-strip span:nth-child(2n) {
    border-right: 0;
  }

  .trust-strip span:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .site-footer {
    flex-direction: column;
  }

  .auth-shell,
  .dashboard-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .auth-copy h1,
  .dashboard-hero h1 {
    font-size: 2.35rem;
  }

  .auth-panel,
  .dashboard-card,
  .dashboard-metrics article {
    padding: 18px;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-compact h1 {
    font-size: 2.35rem;
  }

  .key-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .card-header {
    display: grid;
  }

  .usage-table {
    overflow-x: auto;
  }

  .usage-table div {
    min-width: 620px;
  }

  .admin-table {
    overflow-x: auto;
  }

  .admin-table [role="row"] {
    min-width: 760px;
  }
}
