  .developer-portal {
    --primary: #cc0000;
    --primary-dark: #990000;
    --primary-light: #ff3333;
    --navy: #132F4A;
    --navy-light: #1a3d5c;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f9fafb;
    --sidebar-bg: #132F4A;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #ffffff;
    --sidebar-hover: rgba(255,255,255,0.08);
    --code-bg: #0f172a;
    --code-text: #e2e8f0;
    --tag-get: #16a34a;
    --tag-get-bg: #dcfce7;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --radius: 8px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

body.developer-portal-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
  }

  /* ── TOP HEADER ── */
  .site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
  }
  .header-left { display: flex; align-items: center; gap: 16px; }
  .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
  .logo-icon {
    width: 42px; height: 42px;
    background: var(--primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 800; font-size: 17px; letter-spacing: -0.5px;
    line-height: 1;
  }
  .logo-text { font-size: 17px; font-weight: 700; color: var(--navy); }
  .logo-badge {
    display: inline-flex; align-items: center;
    font-size: 13px; font-weight: 700; line-height: 1;
    color: var(--primary); background: #fee2e2;
    padding: 5px 12px; border-radius: 6px; letter-spacing: 0.2px;
  }
  .header-nav { display: flex; align-items: center; gap: 4px; }
  .header-nav a {
    text-decoration: none; font-size: 14px; color: var(--text-muted);
    padding: 6px 12px; border-radius: 6px; transition: all 0.15s;
  }
  .header-nav a:hover { color: var(--text); background: var(--bg); }
  .mobile-header-links { display: none; }
  .btn-access {
    background: var(--primary); color: white !important;
    padding: 7px 16px !important; border-radius: 6px;
    font-weight: 600 !important; font-size: 13px !important;
    cursor: pointer; transition: background 0.15s !important;
  }
  .btn-access:hover { background: var(--primary-dark) !important; }

  /* ── LAYOUT ── */
  .layout { display: flex; flex: 1; }

  /* ── SIDEBAR ── */
  .sidebar {
    width: 260px; min-width: 260px;
    background: var(--sidebar-bg);
    position: sticky; top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 20px 0 40px;
  }
  .sidebar::-webkit-scrollbar { width: 4px; }
  .sidebar::-webkit-scrollbar-track { background: transparent; }
  .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

  .nav-section { margin-bottom: 4px; }
  .nav-section-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
    color: rgba(255,255,255,0.35); text-transform: uppercase;
    padding: 16px 20px 6px;
  }
  .nav-group { margin-bottom: 2px; }
  .nav-group-title {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 20px; cursor: pointer;
    color: var(--sidebar-text); font-size: 13px; font-weight: 600;
    border-left: 3px solid transparent;
    transition: all 0.15s; user-select: none;
  }
  .nav-group-title:hover { color: white; background: var(--sidebar-hover); }
  .nav-group-title.active { color: white; border-left-color: var(--primary); background: var(--sidebar-hover); }
  .nav-group-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s;
    display: inline-block;
    margin-left: 6px;
  }
  .nav-group-title.open .nav-group-arrow { transform: rotate(45deg); }

  .nav-group-items { display: none; }
  .nav-group-items.open { display: block; }

  .nav-item {
    display: block; padding: 5px 20px 5px 32px;
    color: rgba(203,213,225,0.75); font-size: 13px;
    cursor: pointer; border-left: 3px solid transparent;
    transition: all 0.15s; text-decoration: none;
  }
  .nav-item:hover { color: white; background: var(--sidebar-hover); }
  .nav-item.active {
    color: white; border-left-color: var(--primary);
    background: rgba(204,0,0,0.12); font-weight: 500;
  }
  .nav-sub-group { padding: 4px 20px 4px 28px; }
  .nav-sub-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
    color: rgba(255,255,255,0.25); text-transform: uppercase;
    padding: 8px 0 4px 4px;
  }

  /* ── CONTENT ── */
  .content {
    flex: 1; padding: 48px 56px;
    max-width: 900px;
    min-height: calc(100vh - 60px);
  }

  /* PAGE (hidden by default) */
  .page { display: none; }
  .page.active { display: block; }

  /* ── TYPOGRAPHY ── */
  .page-breadcrumb {
    font-size: 12px; color: var(--text-muted); margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
  }
  .page-breadcrumb span { color: var(--primary); }
  h1 {
    font-size: 32px; font-weight: 800; color: var(--navy);
    margin-bottom: 16px; line-height: 1.2;
  }
  h2 {
    font-size: 22px; font-weight: 700; color: var(--navy);
    margin: 40px 0 12px; padding-top: 24px;
    border-top: 1px solid var(--border);
  }
  h2:first-of-type { margin-top: 32px; border-top: none; padding-top: 0; }
  h3 {
    font-size: 17px; font-weight: 700; color: var(--navy);
    margin: 28px 0 10px;
  }
  h4 {
    font-size: 14px; font-weight: 700; color: var(--text);
    margin: 20px 0 8px; text-transform: uppercase; letter-spacing: 0.5px;
  }
  p { margin-bottom: 14px; color: #374151; }
  ul, ol { padding-left: 20px; margin-bottom: 14px; }
  li { margin-bottom: 5px; color: #374151; }
  a { color: var(--primary); text-decoration: none; }
  a:hover { text-decoration: underline; }

  /* ── LEAD TEXT ── */
  .lead {
    font-size: 17px; color: var(--text-muted); margin-bottom: 32px;
    border-left: 4px solid var(--primary); padding-left: 16px;
    background: #fff9f9; padding: 14px 16px; border-radius: 0 6px 6px 0;
  }

  /* ── INFO CARDS ── */
  .card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0 32px; }
  .card {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    cursor: pointer; transition: all 0.2s;
    box-shadow: var(--shadow);
  }
  .card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(204,0,0,0.1); transform: translateY(-1px); }
  .card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    font-size: 31px;
    line-height: 1;
    margin-bottom: 12px;
  }
  .card-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
  .card-desc { font-size: 13px; color: var(--text-muted); }

  /* ── STEPS ── */
  .steps { margin: 20px 0 28px; }
  .step {
    display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start;
  }
  .step-num {
    width: 28px; height: 28px; min-width: 28px;
    background: var(--primary); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
  }
  .step-content { padding-top: 3px; }
  .step-content strong { display: block; font-size: 14px; color: var(--navy); margin-bottom: 3px; }
  .step-content p { margin: 0; font-size: 14px; color: var(--text-muted); }

  /* ── CODE ── */
  .code-block {
    background: var(--code-bg); border-radius: var(--radius);
    margin: 16px 0; overflow: hidden; box-shadow: var(--shadow);
  }
  .code-header {
    background: rgba(255,255,255,0.06);
    padding: 8px 16px; display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .code-lang { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; }
  .code-copy {
    margin-left: auto; font-size: 11px; color: rgba(255,255,255,0.35);
    cursor: pointer; padding: 2px 8px; border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    background: none; transition: all 0.15s;
  }
  .code-copy:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.3); }
  pre { padding: 20px; overflow-x: auto; }
  code {
    font-family: 'SF Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 13px; line-height: 1.7; color: var(--code-text);
  }
  p code, li code, td code {
    background: #f1f5f9; color: #dc2626; padding: 2px 6px;
    border-radius: 4px; font-size: 12px; font-family: 'SF Mono', monospace;
  }

  /* ── ENDPOINT BADGE ── */
  .endpoint-box {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px 20px;
    display: flex; align-items: center; gap: 12px;
    margin: 16px 0; font-family: monospace;
    box-shadow: var(--shadow);
  }
  .method-badge {
    font-size: 12px; font-weight: 700; padding: 4px 10px;
    border-radius: 4px; letter-spacing: 0.3px;
  }
  .method-get { background: var(--tag-get-bg); color: var(--tag-get); }
  .endpoint-url { font-size: 14px; color: var(--navy); font-family: monospace; }

  /* ── TABLES ── */
  .table-wrap { overflow-x: auto; margin: 16px 0 24px; border-radius: var(--radius); border: 1px solid var(--border); }
  table { width: 100%; border-collapse: collapse; background: white; }
  thead { background: var(--navy); }
  thead th {
    padding: 10px 16px; text-align: left;
    font-size: 12px; font-weight: 700; color: white;
    letter-spacing: 0.5px; text-transform: uppercase;
  }
  tbody tr { border-bottom: 1px solid var(--border); }
  tbody tr:last-child { border-bottom: none; }
  tbody tr:hover { background: #fafafa; }
  tbody td { padding: 10px 16px; font-size: 13px; color: var(--text); vertical-align: top; }
  td:first-child { font-family: monospace; color: #dc2626; font-size: 13px; }
  .req-yes { color: #16a34a; font-weight: 600; font-family: sans-serif !important; font-size: 12px; }
  .req-no { color: var(--text-muted); font-family: sans-serif !important; font-size: 12px; }

  /* HTTP status table — first col is number */
  .status-code { font-family: monospace; font-weight: 700; }
  .status-code-success { color: #16a34a; }
  .status-code-warning { color: #d97706; }
  .status-code-danger { color: #dc2626; }
  .status-table td:first-child { font-family: monospace; font-weight: 700; }
  .status-200 td:first-child { color: #16a34a; }
  .status-401 td:first-child { color: #d97706; }
  .status-405 td:first-child { color: #d97706; }
  .status-500 td:first-child { color: #dc2626; }

  /* ── NOTES / CALLOUTS ── */
  .callout {
    border-radius: var(--radius); padding: 14px 18px;
    margin: 20px 0; display: flex; gap: 12px; align-items: flex-start;
  }
  .callout-info { background: #eff6ff; border-left: 4px solid #3b82f6; }
  .callout-warn { background: #fffbeb; border-left: 4px solid #f59e0b; }
  .callout-note { background: #f0fdf4; border-left: 4px solid #22c55e; }
  .callout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    font-size: 22px;
    line-height: 1;
    margin-top: 1px;
  }
  .callout-body { font-size: 13px; color: var(--text); }
  .callout-body strong { display: block; font-size: 13px; margin-bottom: 4px; color: var(--navy); }
  .callout ul { margin: 6px 0 0; }

  /* ── DIVIDER ── */
  .divider { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

  /* ── SUPPORT FORM ── */
  .contact-card {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow); margin: 24px 0;
  }
  .contact-card h3 { margin-top: 0; margin-bottom: 16px; }
  .email-link {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fee2e2; color: var(--primary);
    padding: 10px 20px; border-radius: 6px; font-weight: 600; font-size: 14px;
    text-decoration: none; transition: background 0.15s;
  }
  .email-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
  }
  .email-link-label {
    display: inline-flex;
    align-items: center;
  }
  .email-link:hover { background: #fecaca; text-decoration: none; }

  /* ── HOME PAGE ── */
  .hero {
    background: linear-gradient(135deg, var(--navy) 0%, #1d4a6e 100%);
    border-radius: 12px; padding: 48px;
    color: white; margin-bottom: 40px;
    position: relative; overflow: hidden;
  }
  .hero::before {
    content: ''; position: absolute; right: -40px; top: -40px;
    width: 240px; height: 240px; border-radius: 50%;
    background: rgba(204,0,0,0.15);
  }
  .hero::after {
    content: ''; position: absolute; right: 60px; bottom: -60px;
    width: 160px; height: 160px; border-radius: 50%;
    background: rgba(255,255,255,0.04);
  }
  .hero-badge {
    display: inline-block; background: rgba(204,0,0,0.3);
    color: #fca5a5; font-size: 12px; font-weight: 600;
    padding: 4px 12px; border-radius: 20px; margin-bottom: 16px;
    letter-spacing: 0.5px;
  }
  .hero h1 { color: white; font-size: 36px; margin-bottom: 12px; }
  .hero p { color: rgba(255,255,255,0.75); font-size: 16px; max-width: 520px; margin-bottom: 28px; }
  .hero-buttons { display: flex; gap: 12px; }
  .btn-primary {
    background: var(--primary); color: white; padding: 11px 24px;
    border-radius: 7px; font-weight: 600; font-size: 14px;
    cursor: pointer; border: none; transition: background 0.15s; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: white; }
  .btn-outline {
    background: rgba(255,255,255,0.1); color: white; padding: 11px 24px;
    border-radius: 7px; font-weight: 600; font-size: 14px;
    cursor: pointer; border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.15s; text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .btn-outline:hover { background: rgba(255,255,255,0.18); text-decoration: none; color: white; }

  .section-title { font-size: 18px; font-weight: 700; color: var(--navy); margin: 40px 0 16px; }

  .endpoint-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
  .endpoint-item {
    background: white; border: 1px solid var(--border);
    border-radius: 6px; padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
    cursor: pointer; transition: all 0.15s;
    box-shadow: var(--shadow);
  }
  .endpoint-item:hover { border-color: var(--primary); transform: translateX(2px); }
  .endpoint-item-url { font-family: monospace; font-size: 13px; color: var(--navy); }
  .endpoint-item-desc { font-size: 13px; color: var(--text-muted); margin-left: auto; }

  /* ── RESPONSIVE ── */
  @media (max-width: 768px) {
    .sidebar { display: none; }
    .content { padding: 24px 20px; }
  }

.mobile-menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.mobile-menu-toggle:hover {
  border-color: rgba(19, 47, 74, 0.18);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.mobile-menu-toggle:focus-visible {
  outline: 2px solid rgba(204, 0, 0, 0.22);
  outline-offset: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.mobile-menu-toggle-icon {
  width: 18px;
  height: 14px;
  position: relative;
  display: inline-flex;
}

.mobile-menu-toggle-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.18s ease, top 0.18s ease;
}

.mobile-menu-toggle-icon span:nth-child(1) {
  top: 0;
}

.mobile-menu-toggle-icon span:nth-child(2) {
  top: 6px;
}

.mobile-menu-toggle-icon span:nth-child(3) {
  top: 12px;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-icon span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-toggle-icon span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

.mobile-menu-toggle-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.method-post { background: #dbeafe; color: #1d4ed8; }
.method-put { background: #fef3c7; color: #b45309; }
.method-delete { background: #fee2e2; color: #b91c1c; }

.nav-item,
.endpoint-item,
.card,
.hero-buttons a,
.btn-primary,
.btn-outline,
.header-nav a,
.logo {
  outline: none;
}

body.admin-bar .site-header {
  top: 32px;
}

body.admin-bar .sidebar {
  top: 92px;
  height: calc(100vh - 92px);
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  body.admin-bar .sidebar {
    top: 106px;
    height: calc(100vh - 106px);
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0 14px;
    gap: 10px;
  }

  .header-left {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .logo-text,
  .logo-badge {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
  }

  .header-nav {
    display: none;
  }

  .sidebar {
    display: none;
    position: fixed;
    left: 0;
    top: 60px;
    width: min(84vw, 320px);
    min-width: 0;
    height: calc(100vh - 60px);
    z-index: 150;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }

  .mobile-header-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
  }

  .mobile-header-link {
    display: block;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
  }

  .mobile-header-link:hover,
  .mobile-header-link.active {
    color: white;
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.14);
    text-decoration: none;
  }

  .mobile-header-link-button {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
  }

  .mobile-header-link-button:hover,
  .mobile-header-link-button.active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
  }

  .sidebar.open {
    display: block;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 60px 0 0 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 120;
  }

  .sidebar-overlay.open {
    display: block;
  }

  .content {
    max-width: 100%;
  }

  .hero {
    padding: 32px 20px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-buttons {
    flex-wrap: wrap;
  }

  .endpoint-item {
    flex-wrap: wrap;
  }

  .endpoint-item-desc {
    margin-left: 0;
  }
}
