.dev-header,
.dev-footer,
.developer-portal {
  --brand: #059669;
  --brand-dark: #047857;
  --accent: #0ea5e9;
}

:root {
  --ink: #111827;
  --paper: #f5f7fb;
  --card: #ffffff;
  --line: #dbe3ef;
  --lime: #059669;
  --purple: #059669;
  --muted: #64748b;
  --danger: #be123c;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dev-brand,
.dev-footer,
.hero h1,
.section h2,
.dark-section h2,
.cta h2,
.steps h3,
.vertical-grid h3,
.form-layout aside h1,
.auth-panel h1,
.panel-heading > span,
.console-title h1,
.metrics strong,
.section-title h2,
.production-card h2,
.app-top h3,
.portal-modal h2,
.docs-content h1,
.docs-content h2,
.docs-content h3,
.endpoint > .method {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dev-header {
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}

.dev-brand b,
.panel a,
.step-icon,
.auth-flow b,
.credential button,
.app-meta button,
.sandbox-note b { color: #059669; }

.button {
  border-radius: 10px;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.button-primary {
  border-color: #047857;
  background: #059669;
  color: #fff;
  box-shadow: 0 8px 20px rgba(5, 150, 105, .18);
}

.button-primary:hover {
  transform: translateY(-1px);
  background: #047857;
  box-shadow: 0 10px 24px rgba(5, 150, 105, .24);
}

.button-dark { background: #111827; }
.button-dark:hover { background: #1f2937; }

.panel,
.app-card,
.metrics,
.auth-flow > div,
.info-box {
  border-color: #dbe3ef;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .07);
}

.panel { box-shadow: 0 18px 50px rgba(15, 23, 42, .09); }
.form-page { background: linear-gradient(110deg, #f8fafc 0 44%, #eef3f8 44%); }
.console-sidebar { background: #eef3f8; }
.console-sidebar nav a.active { color: #047857; }
.eyebrow span { background: #059669; }

input:focus,
select:focus,
textarea:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .13);
}

.choice-card:has(input:checked) {
  border-color: #059669;
  background: #ecfdf5;
}

.choice-card input,
.terms input { accent-color: #059669; }
.env-sandbox { background: #e0f2fe; color: #0369a1; }
.state.active { background: #dcfce7; color: #047857; }
.tag-row span { background: #f1f5f9; }

.production-card {
  border-color: #a7f3d0;
  background: #ecfdf5;
  box-shadow: 0 12px 28px rgba(5, 150, 105, .10);
}

.code-window { box-shadow: 16px 16px 0 #059669; }
.code-block button { color: #86efac; }
.method.post { background: #059669; }
.info-box { border-left-color: #059669; }

.dev-brand-mark {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dedbd2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.dev-brand-mark img {
  position: absolute;
  width: 200%;
  height: 200%;
  max-width: none;
  left: -50%;
  top: -4%;
  object-fit: contain;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input { padding-right: 48px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 8px;
  transform: translateY(-50%);
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #f1f5f9;
  color: #047857;
  outline: 2px solid transparent;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open { display: none; }
.password-toggle.is-visible .eye-closed { display: block; }

.button-spinner {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: portal-spin .7s linear infinite;
}

.is-submitting button[type="submit"] { cursor: wait; }
.is-submitting button[type="submit"]:disabled { opacity: .78; }

@keyframes portal-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .button-spinner { animation-duration: 1.4s; }
  .button { transition: none; }
}

.app-meta > div { position: relative; }

.app-meta > div:first-child {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: start;
}

.app-meta > div:first-child > span { grid-column: 1; grid-row: 1; }
.app-meta > div:first-child > button {
  position: static;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  min-height: 28px;
  margin: -5px -7px 0 0;
  padding: 5px 7px;
  border-radius: 7px;
}
.app-meta > div:first-child > button:hover { background: #ecfdf5; }
.app-meta > div:first-child > code { grid-column: 1 / -1; grid-row: 2; }

.has-portal-modal { overflow: hidden; }

.portal-confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(5px);
}

.portal-confirm-layer[hidden] { display: none; }

.portal-confirm-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 18px;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid #dbe3ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
  animation: portal-modal-in .18s ease-out;
}

.portal-confirm-icon {
  display: grid;
  grid-column: 1;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #fff1f2;
  color: #be123c;
}

.portal-confirm-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.portal-confirm-copy { grid-column: 2; min-width: 0; }
.portal-confirm-copy h2 {
  margin: 9px 36px 8px 0;
  font-size: 23px;
  line-height: 1.2;
}
.portal-confirm-copy p { margin: 0; color: #64748b; }

.portal-confirm-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 25px;
  cursor: pointer;
}
.portal-confirm-close:hover { background: #f1f5f9; color: #111827; }

.portal-confirm-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.button-danger {
  border-color: #be123c;
  background: #be123c;
  color: #fff;
}
.button-danger:hover { border-color: #9f1239; background: #9f1239; }

@keyframes portal-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .portal-confirm-card { animation: none; }
}

@media (max-width: 600px) {
  .portal-confirm-card { grid-template-columns: 1fr; padding: 24px; }
  .portal-confirm-icon { grid-column: 1; margin-bottom: 16px; }
  .portal-confirm-copy { grid-column: 1; }
  .portal-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
