/* Transo Developers page */

.dev-main {
  padding: 24px clamp(16px, 2.5vw, 32px) 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: none;
}

.dev-center {
  text-align: center;
}

.dev-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
}

.dev-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.dev-hero-full {
  width: 100%;
}

/* ---- Buttons ----------------------------------------------------------- */

.dev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.dev-btn [data-lucide] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dev-btn-sm {
  padding: 9px 16px;
  font-size: 0.84rem;
}

.dev-btn-sm [data-lucide] {
  width: 15px;
  height: 15px;
}

.dev-btn-primary {
  color: #fff !important;
  background: linear-gradient(120deg, var(--transo-red), var(--transo-red-dark));
  box-shadow: 0 6px 18px -6px rgba(211, 47, 47, 0.5);
}

.dev-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(211, 47, 47, 0.55);
}

.dev-btn-outline {
  color: var(--text);
  background: #fff;
  border-color: var(--border);
}

.dev-btn-outline:hover {
  border-color: rgba(211, 47, 47, 0.3);
  color: var(--transo-red);
}

.dev-btn-ghost {
  color: #94a3b8;
  background: transparent;
  border-color: #334155;
}

.dev-btn-ghost:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.dev-quick-card .dev-btn {
  width: 100%;
  margin-top: auto;
}

/* ---- Right rail -------------------------------------------------------- */

.dev-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 76px;
}

.dev-rail-card {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.dev-rail-card.dev-rail-accent {
  background: linear-gradient(180deg, #fff 0%, #fffbfb 100%);
  border-color: rgba(211, 47, 47, 0.15);
}

.dev-rail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.dev-rail-label [data-lucide] {
  width: 14px;
  height: 14px;
  color: var(--transo-red);
}

.dev-rail-muted {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  text-align: center;
}

.dev-rail-text {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.dev-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dev-rail-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.dev-rail-nav a:hover {
  background: var(--transo-gray-50);
  color: var(--text);
}

.dev-rail-stat {
  text-align: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.dev-rail-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dev-rail-stat strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.dev-rail-stat span {
  font-size: 0.78rem;
  color: var(--muted);
}

.dev-rail-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dev-rail-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: var(--transo-gray-50);
  border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
}

.dev-rail-links a:hover {
  border-color: rgba(211, 47, 47, 0.25);
  color: var(--transo-red);
}

.dev-rail-links [data-lucide] {
  width: 15px;
  height: 15px;
}

/* ---- Hero -------------------------------------------------------------- */

.dev-hero {
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #f8faff 45%, #fff8f8 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.dev-hero-inner {
  padding: 28px 28px 24px;
}

.dev-hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 22px;
}

.dev-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--transo-red-soft);
  color: var(--transo-red);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.dev-hero-eyebrow [data-lucide] {
  width: 14px;
  height: 14px;
}

.dev-hero-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dev-hero-desc {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 0.94rem;
  max-width: 56ch;
  line-height: 1.55;
}

.dev-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.dev-usage {
  margin-bottom: 18px;
}

.dev-usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.dev-usage-head strong {
  color: var(--text);
  font-weight: 700;
}

.dev-usage-track {
  height: 10px;
  border-radius: 999px;
  background: #eef0f3;
  overflow: hidden;
}

.dev-usage-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--transo-red), #ef5350);
  transition: width 0.5s ease;
}

.dev-usage-fill.is-warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.dev-usage-fill.is-full {
  background: linear-gradient(90deg, #dc2626, #ef4444);
}

.dev-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.dev-stat {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
}

.dev-stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 6px;
}

.dev-stat-label [data-lucide] {
  width: 14px;
  height: 14px;
}

.dev-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ---- Quick start ------------------------------------------------------- */

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

.dev-quick {
  text-align: center;
}

.dev-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 22px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dev-quick-card:hover {
  border-color: rgba(211, 47, 47, 0.2);
  box-shadow: var(--shadow-card);
}

.dev-quick-step {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--transo-red);
  background: var(--transo-red-soft);
}

.dev-quick-card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.dev-quick-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

/* ---- Sections ---------------------------------------------------------- */

.dev-section {
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.dev-section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 22px 22px 0;
}

.dev-section-head h2 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dev-section-head p {
  margin: 0 auto;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 56ch;
}

.dev-section-body {
  padding: 18px 22px 22px;
}

.dev-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* ---- Auth callout ------------------------------------------------------ */

.dev-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

.dev-auth-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--transo-red);
  flex-shrink: 0;
}

.dev-auth-icon [data-lucide] {
  width: 18px;
  height: 18px;
}

.dev-auth code {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

/* ---- Endpoints --------------------------------------------------------- */

.dev-endpoints {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-endpoint {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--transo-gray-50);
  border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}

.dev-endpoint:hover {
  background: #fff;
  border-color: rgba(211, 47, 47, 0.18);
}

.dev-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: ui-monospace, monospace;
}

.dev-method.is-get {
  background: #e8f5e9;
  color: #2e7d32;
}

.dev-method.is-post {
  background: #e3f2fd;
  color: #1565c0;
}

.dev-endpoint-path {
  min-width: 0;
}

.dev-endpoint-path code {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text);
  word-break: break-all;
}

.dev-endpoint-desc {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.dev-endpoint .dev-btn {
  flex-shrink: 0;
}

.dev-btn.is-copied {
  color: #16a34a !important;
  border-color: rgba(22, 163, 74, 0.35) !important;
}

/* ---- Keys & webhooks --------------------------------------------------- */

.dev-keys-grid,
.dev-webhooks-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-key-card,
.dev-webhook-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--transo-gray-50);
  border: 1px solid var(--border);
  transition: border-color 0.15s, background 0.15s;
}

.dev-key-card:hover,
.dev-webhook-card:hover {
  background: #fff;
  border-color: rgba(211, 47, 47, 0.15);
}

.dev-key-main h3,
.dev-webhook-main h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 700;
}

.dev-key-meta,
.dev-webhook-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.dev-key-meta span,
.dev-webhook-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dev-key-meta [data-lucide],
.dev-webhook-meta [data-lucide] {
  width: 13px;
  height: 13px;
}

.dev-prefix {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.dev-scope-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
}

.dev-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.dev-empty {
  padding: 32px 20px;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--transo-gray-50);
}

.dev-empty-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
}

.dev-empty-icon [data-lucide] {
  width: 22px;
  height: 22px;
}

.dev-empty p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---- MCP --------------------------------------------------------------- */

.dev-mcp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
}

.dev-mcp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.dev-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: ui-monospace, monospace;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.dev-tool-chip [data-lucide] {
  width: 12px;
  height: 12px;
  color: var(--transo-red);
}

.dev-field {
  margin-bottom: 14px;
}

.dev-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.dev-input,
.dev-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: var(--text);
}

.dev-input:focus,
.dev-select:focus {
  outline: none;
  border-color: var(--transo-red);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.dev-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

.dev-key-input-wrap {
  position: relative;
}

.dev-key-input-wrap .dev-input {
  padding-right: 44px;
  font-family: ui-monospace, monospace;
  font-size: 0.84rem;
}

.dev-key-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.dev-key-toggle:hover {
  background: var(--transo-gray-50);
  color: var(--text);
}

.dev-key-toggle [data-lucide] {
  width: 16px;
  height: 16px;
}

.dev-code-panel {
  border-radius: 14px;
  background: #0f172a;
  border: 1px solid #1e293b;
  overflow: hidden;
}

.dev-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.dev-code-head span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
}

.dev-code-head [data-lucide] {
  width: 14px;
  height: 14px;
}

.dev-code-block {
  margin: 0;
  padding: 16px 18px;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
}

.dev-code-foot {
  padding: 12px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  background: var(--transo-gray-50);
}

.dev-code-foot code {
  font-family: ui-monospace, monospace;
  font-size: 0.76rem;
  padding: 2px 5px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--border);
}

/* ---- Modal ------------------------------------------------------------- */

.dev-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.dev-modal-backdrop[hidden] {
  display: none !important;
}

.dev-modal {
  width: min(480px, 100%);
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.dev-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 0;
}

.dev-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--transo-red-soft);
  color: var(--transo-red);
  margin-bottom: 12px;
}

.dev-modal-icon [data-lucide] {
  width: 22px;
  height: 22px;
}

.dev-modal-head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
}

.dev-modal-head p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.dev-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--transo-gray-50);
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.dev-modal-close:hover {
  background: #eee;
  color: var(--text);
}

.dev-modal-body {
  padding: 16px 22px;
}

.dev-secret {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  background: var(--transo-gray-50);
  border: 1px solid var(--border);
  word-break: break-all;
  white-space: pre-wrap;
}

.dev-secret-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.dev-modal-foot {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px 22px 22px;
}

.dev-modal-head {
  text-align: center;
}

.dev-modal-head > div:first-child {
  flex: 1;
  width: 100%;
}

.dev-modal-icon {
  margin-left: auto;
  margin-right: auto;
}

.dev-secret-actions {
  justify-content: center;
}

/* ---- Status pills (shared with billing) -------------------------------- */

.dev-main .status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.dev-main .status-pill.on {
  background: #e8f5e9;
  color: #2e7d32;
}

.dev-main .status-pill.off {
  background: var(--transo-gray-50);
  color: var(--muted);
}

/* ---- Responsive -------------------------------------------------------- */

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

  .dev-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
  }
}

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

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

  .dev-endpoint {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .dev-endpoint .dev-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .dev-hero-inner {
    padding: 20px;
  }

  .dev-section-head,
  .dev-section-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}
