/* Portal do desenvolvedor — estilos isolados (não importa styles.css da landing) */

:root {
  --purple: #5a2dc4;
  --ink: #130d20;
  --slate: #5f6878;
  --line: #e5e2eb;
  --lavender: #f3f0f8;
  --wide: min(1344px, calc(100% - 48px));
  --dev-bg: #f8f6fc;
  --dev-panel: #fff;
  --dev-border: #e4ddf0;
  --dev-code: #1a1228;
  --dev-muted: #5c5470;
  --dev-accent: #7c5cff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body.dev-portal {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--dev-bg);
  color: var(--ink);
  font-family: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.wide-wrap {
  width: var(--wide);
  margin-inline: auto;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  color: #fff;
  background: var(--purple);
}

.button-primary:hover {
  background: #6b3fd8;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-actions .button {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.nav-actions .dd {
  position: relative;
}

.nav-actions .dd button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-actions .dd button:hover,
.nav-actions .dd:focus-within button {
  background: var(--lavender);
}

.nav-actions .dd button svg {
  width: 16px;
  height: 16px;
}

.nav-actions .dd button .chev {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}

.dd-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  width: 180px;
  display: grid;
  padding: 8px;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 18px 40px rgba(19, 13, 32, 0.18), 0 0 0 1px var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

.dd-panel::before {
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  content: '';
}

.dd:hover .dd-panel,
.dd:focus-within .dd-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dd-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.dd-panel a:hover,
.dd-panel a[aria-current] {
  background: var(--lavender);
}

.dev-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--dev-border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.dev-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.dev-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.dev-brand img {
  width: 94px;
  height: 31px;
  max-width: none;
  flex-shrink: 0;
  object-fit: contain;
}

/* Só o logo no topo — sem pill “Desenvolvedores” (HTML legado ou cache) */
.dev-topbar .dev-badge,
.dev-brand > :not(img) {
  display: none !important;
}

.dev-topbar-actions {
  flex-shrink: 0;
}

.dev-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px 56px;
  flex: 1 0 auto;
  padding: 36px 0 72px;
  align-items: start;
}

.dev-sidebar {
  position: sticky;
  top: 88px;
  min-width: 0;
}

.dev-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.dev-sidebar-title {
  margin: 0 0 10px;
  color: var(--dev-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dev-sidebar-group {
  margin: 0 0 6px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dev-sidebar nav a,
.dev-sidebar nav .dev-sidebar-link {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--dev-muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.dev-sidebar nav a:hover,
.dev-sidebar nav a.is-active,
.dev-sidebar nav .dev-sidebar-link:hover,
.dev-sidebar nav .dev-sidebar-link.is-active {
  color: var(--ink);
  background: var(--dev-panel);
  box-shadow: 0 0 0 1px var(--dev-border);
}

.dev-sidebar-card {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--dev-border);
  background: var(--dev-panel);
  font-size: 13px;
  line-height: 1.55;
}

.dev-sidebar-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.dev-sidebar-card p {
  margin: 0 0 10px;
  color: var(--dev-muted);
}

.dev-sidebar-card a {
  color: var(--dev-accent);
  font-weight: 600;
}

.dev-main {
  min-width: 0;
}

.dev-hero {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--dev-border);
  scroll-margin-top: 96px;
}

.dev-hero-compact {
  margin-bottom: 24px;
  padding-bottom: 14px;
}

.dev-list {
  margin: 0 0 1.25em;
  padding-left: 1.25em;
  color: var(--dev-muted);
  line-height: 1.65;
}

.dev-list li {
  margin-bottom: 0.45em;
}

.dev-list li strong,
.dev-steps li strong {
  color: var(--ink);
  font-weight: 600;
}

.dev-h3 {
  margin: 28px 0 12px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dev-callout-warn {
  border-color: #f5c451;
  background: #fff9eb;
}

.dev-kicker {
  margin: 0 0 12px;
  color: var(--dev-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dev-hero h1 {
  margin: 0 0 16px;
  max-width: none;
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.dev-lead {
  max-width: none;
  margin: 0;
  color: var(--dev-muted);
  font-size: 17px;
  line-height: 1.65;
}

.dev-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.dev-quick-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--dev-border);
  background: var(--dev-panel);
  font-size: 12px;
  color: var(--dev-muted);
}

.dev-quick-item code {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}

.dev-section {
  margin-bottom: 52px;
  scroll-margin-top: 96px;
}

.dev-section h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dev-section h3 {
  margin: 28px 0 10px;
  font-size: 17px;
  font-weight: 600;
}

.dev-section h4.dev-h4 {
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dev-muted);
}

.dev-lead-secondary {
  margin-top: -6px;
  color: var(--dev-muted);
}

.dev-section p {
  margin: 0 0 14px;
  max-width: none;
  color: var(--dev-muted);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.dev-list {
  margin: 12px 0 0;
  padding-left: 1.2em;
  max-width: none;
  color: var(--dev-muted);
  font-size: 15px;
  line-height: 1.7;
}

.dev-list li {
  margin-bottom: 6px;
}

.dev-tools code {
  color: var(--ink);
  font-weight: 600;
}

.dev-callout {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--dev-border);
  background: var(--dev-panel);
  font-size: 14px;
  line-height: 1.6;
}

.dev-callout strong {
  display: block;
  margin-bottom: 6px;
}

.dev-callout p {
  margin: 0;
  color: var(--dev-muted);
}

.dev-callout-accent {
  border-color: rgba(124, 92, 255, 0.35);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.08), rgba(255, 255, 255, 0.92));
}

.dev-table-scroll {
  overflow-x: auto;
  margin: 16px 0;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--dev-border);
}

.dev-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--dev-panel);
}

.dev-table th,
.dev-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--dev-border);
  vertical-align: top;
}

.dev-table th {
  background: var(--lavender);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dev-table tr:last-child td {
  border-bottom: 0;
}

.dev-table code {
  font-size: 13px;
  color: var(--dev-code);
}

.dev-table-methods .m {
  display: inline-block;
  min-width: 44px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.dev-table-methods .get {
  background: #e8f5ee;
  color: #0d7a45;
}

.dev-table-methods .post {
  background: #ebe8ff;
  color: #5b3fd4;
}

.code-wrap {
  margin: 16px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--dev-code);
  box-shadow: 0 12px 32px rgba(19, 13, 32, 0.14);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-copy {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.code-copy:hover {
  background: rgba(255, 255, 255, 0.12);
}

.code-wrap pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: #e8e4f4;
  font-size: 13px;
  line-height: 1.55;
}

.dev-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 22px 0 8px;
  padding: 20px 16px;
  border-radius: 12px;
  border: 1px solid var(--dev-border);
  background: linear-gradient(165deg, var(--dev-panel) 40%, rgba(124, 92, 255, 0.06));
}

.dev-flow-track {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 6px;
}

.dev-flow-node {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  border-radius: 10px;
  border: 1px solid var(--dev-border);
  background: var(--dev-panel);
  text-align: center;
}

.dev-flow-node-icon {
  display: flex;
  color: var(--purple);
}

.dev-flow-node-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.dev-flow-connector {
  position: relative;
  flex: 0 1 56px;
  min-width: 28px;
  align-self: center;
  height: 2px;
  margin-top: 26px;
  background: var(--dev-border);
}

.dev-flow-post {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dev-accent);
  white-space: nowrap;
}

.dev-flow-packet {
  position: absolute;
  top: 50%;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dev-accent);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.2);
  transform: translate(-50%, -50%);
  animation: dev-flow-run 2.6s ease-in-out infinite;
}

.dev-flow-packet-delay {
  animation-delay: 1.15s;
}

@keyframes dev-flow-run {
  0% {
    left: 0;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  42% {
    left: 100%;
    opacity: 1;
  }

  50%,
  100% {
    left: 100%;
    opacity: 0;
  }
}

.dev-flow-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
  color: var(--dev-muted);
}

.dev-section p.dev-flow-caption {
  margin: 0;
  max-width: none;
}

.dev-examples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.dev-example {
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--dev-border);
  background: var(--dev-panel);
}

.dev-example strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--ink);
}

.dev-example p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dev-muted);
}

.dev-steps-cards {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}

.dev-steps-cards li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--dev-border);
  background: var(--dev-panel);
}

.dev-steps-cards strong {
  font-size: 14px;
  color: var(--ink);
}

.dev-steps-cards span {
  font-size: 14px;
  line-height: 1.65;
  color: var(--dev-muted);
}

.dev-section-link {
  margin-top: 16px;
  font-size: 15px;
  color: var(--dev-muted);
}

.dev-section-link a {
  color: var(--dev-accent);
  font-weight: 600;
}

.dev-section-link a:hover {
  text-decoration: underline;
}

.dev-doc-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.dev-doc-links-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
}

.dev-sidebar-link-top {
  margin-bottom: 14px;
}

.dev-doc-links .dev-link-card {
  max-width: none;
  margin: 0;
}

.dev-link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 480px;
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--dev-border);
  background: var(--dev-panel);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dev-link-card:hover {
  border-color: var(--dev-accent);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.12);
}

.dev-link-card span {
  font-size: 14px;
  font-weight: 600;
}

.dev-link-card code {
  font-size: 13px;
  color: var(--dev-muted);
}

.dev-steps {
  margin: 12px 0 0;
  padding-left: 1.3em;
  max-width: none;
  color: var(--dev-muted);
  font-size: 15px;
  line-height: 1.7;
}

.dev-steps li {
  margin-bottom: 8px;
}

.dev-steps li p {
  margin: 8px 0 0;
  max-width: none;
  font-size: 15px;
  line-height: 1.7;
  color: var(--dev-muted);
}

.dev-note {
  margin-top: 12px;
  max-width: none;
  font-size: 13px !important;
  font-style: italic;
}

.dev-sdk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.dev-sdk {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed var(--dev-border);
  background: var(--dev-panel);
  font-weight: 600;
  pointer-events: none;
  opacity: 0.75;
}

.dev-sdk em {
  color: var(--dev-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.dev-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--dev-border);
}

.dev-pager-placeholder {
  display: block;
}

.dev-pager-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--dev-border);
  background: var(--dev-panel);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dev-pager-link:hover {
  border-color: var(--dev-accent);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.1);
}

.dev-pager-link svg {
  flex-shrink: 0;
  color: var(--dev-accent);
}

.dev-pager-prev {
  justify-content: flex-start;
  text-align: left;
}

.dev-pager-next {
  justify-content: flex-end;
  text-align: right;
}

.dev-pager-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dev-pager-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dev-muted);
}

.dev-pager-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.dev-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--dev-border);
  background: var(--dev-panel);
  font-size: 13px;
  color: var(--dev-muted);
}

.dev-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dev-footer a:first-of-type {
  color: var(--ink);
  font-weight: 600;
}

.footer-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
}

.footer-lang a {
  opacity: 0.75;
}

.footer-lang a:hover,
.footer-lang a[aria-current] {
  opacity: 1;
  color: var(--ink);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .dev-flow-packet {
    animation: none;
    display: none;
  }
}

@media (max-width: 1024px) {
  .dev-quick {
    grid-template-columns: 1fr;
  }

  .dev-examples {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dev-pager {
    grid-template-columns: 1fr;
  }

  .dev-pager-next {
    justify-content: flex-start;
    text-align: left;
  }

  .dev-flow-track {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .dev-flow-connector {
    flex: none;
    width: 2px;
    height: 28px;
    min-width: 0;
    margin: 4px auto;
    background: var(--dev-border);
  }

  .dev-flow-connector .dev-flow-post {
    left: calc(100% + 10px);
    bottom: 50%;
    transform: translateY(50%);
  }

  .dev-flow-packet {
    animation-name: dev-flow-run-vertical;
  }

  .dev-doc-links {
    grid-template-columns: 1fr;
  }
}

@keyframes dev-flow-run-vertical {
  0% {
    top: 0;
    left: 50%;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  42% {
    top: 100%;
    opacity: 1;
  }

  50%,
  100% {
    top: 100%;
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .dev-shell {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 20px;
  }

  .dev-sidebar {
    position: static;
  }

  .dev-sidebar nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .dev-sidebar nav a {
    flex: none;
    white-space: nowrap;
  }

  .dev-sidebar-card {
    display: none;
  }

  .nav-actions .dd button span {
    display: none;
  }
}

@media (max-width: 520px) {
  :root {
    --wide: calc(100% - 32px);
  }

  .dev-cta {
    display: none;
  }

  .dev-table {
    min-width: 0;
    font-size: 12px;
  }

  .dev-table th,
  .dev-table td {
    padding: 10px;
  }
}
