/* DepotCharge — Swagger UI Theme
   Rule: only override colors, fonts, radius, shadows.
   Never override padding, margins, or display that could break Swagger layout. */

/* ═══ Theme transition ═══ */
html.dc-transitioning,
html.dc-transitioning *,
html.dc-transitioning *::before,
html.dc-transitioning *::after {
  transition: background-color 0.3s ease, color 0.2s ease, border-color 0.3s ease,
              box-shadow 0.3s ease, fill 0.2s ease !important;
}

/* ═══ Loading Spinner ═══ */
.swagger-ui .loading-container { display: none !important; }

#depotcharge-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: #f7f9fb;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease;
}
#depotcharge-loader.fade-out { opacity: 0; pointer-events: none; }

#depotcharge-loader .spinner-wrap {
  position: relative; width: 80px; height: 80px;
}
#depotcharge-loader .spinner-ring {
  position: absolute; inset: 0;
  border: 3px solid rgba(4, 255, 195, 0.15);
  border-top-color: #04FFC3;
  border-radius: 50%;
  animation: dc-spin 0.9s linear infinite;
}
#depotcharge-loader .spinner-logo {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
#depotcharge-loader .spinner-logo svg { width: 28px; height: 40px; }

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

html, body { background: #f7f9fb !important; }

/* ═══ Topbar ═══ */
.swagger-ui .topbar {
  background: #00102E !important;
  padding: 8px 20px !important;
}
.swagger-ui .topbar-wrapper .link {
  font-size: 0 !important;
  background: url('https://depotcharge.com/logo_white.svg') no-repeat left center !important;
  background-size: contain !important;
  height: 28px !important;
  min-width: 140px !important;
  display: block !important;
}
.swagger-ui .topbar-wrapper .link img,
.swagger-ui .topbar-wrapper .link svg,
.swagger-ui .topbar-wrapper .link span { display: none !important; }
.swagger-ui .topbar .download-url-wrapper .select-label { color: #8aaab8 !important; }
.swagger-ui .topbar .download-url-wrapper select {
  background: rgba(255,255,255,0.08) !important; color: #c4d5e0 !important;
  border: 1px solid rgba(255,255,255,0.12) !important; border-radius: 6px !important;
}
.swagger-ui .topbar .download-url-wrapper input[type=text] {
  background: rgba(255,255,255,0.08) !important; color: #c4d5e0 !important;
  border: 1px solid rgba(255,255,255,0.12) !important; border-radius: 6px !important;
}

/* ═══ Title ═══ */
.swagger-ui .info .title { color: #00102E !important; font-weight: 700 !important; }
.swagger-ui .info .description p { color: #4a5a66 !important; }

/* ═══ Version badges ═══ */
.swagger-ui .info .title small {
  background: #e8f8f5 !important; color: #0e8a78 !important;
  border: 1px solid #c4ede4 !important;
  border-radius: 4px !important; font-weight: 600 !important;
  padding: 3px 10px !important; margin-left: 6px !important;
  vertical-align: middle !important; font-size: 12px !important;
}
.swagger-ui .info .title small pre {
  background: transparent !important; color: inherit !important; padding: 0 !important;
}

/* ═══ Authorize button ═══ */
.swagger-ui .btn.authorize {
  background: #00102E !important; color: #fff !important;
  border: none !important; border-radius: 6px !important;
  font-weight: 600 !important;
}
.swagger-ui .btn.authorize:hover { background: #001a40 !important; }
.swagger-ui .btn.authorize svg { fill: #48CCB9 !important; }
.swagger-ui .authorization__btn.locked svg { fill: #48CCB9 !important; }

/* ═══ Tag section headers ═══ */
.swagger-ui .opblock-tag {
  color: #00102E !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #0e8a78 !important;
}
.swagger-ui .opblock-tag:hover { background: rgba(14,138,120,0.02) !important; }
.swagger-ui .opblock-tag small { color: #6a7a86 !important; }
.swagger-ui .opblock-tag svg.arrow { fill: #0e8a78 !important; }

/* ═══ Method badges ═══ */
.swagger-ui .opblock.opblock-get .opblock-summary-method { background: #0e8a78 !important; }
.swagger-ui .opblock.opblock-post .opblock-summary-method { background: #3b82c4 !important; }
.swagger-ui .opblock.opblock-put .opblock-summary-method { background: #c08a2e !important; }
.swagger-ui .opblock.opblock-delete .opblock-summary-method { background: #c44040 !important; }
.swagger-ui .opblock.opblock-patch .opblock-summary-method { background: #7c5ebf !important; }

/* ═══ Operation blocks — spacious cards ═══ */
.swagger-ui .opblock {
  border-radius: 8px !important;
  background: #fff !important;
  border: 1px solid #e4e8ec !important;
  box-shadow: 0 1px 3px rgba(0,16,46,0.04) !important;
  margin-bottom: 10px !important;
}
.swagger-ui .opblock .opblock-summary {
  border-radius: 8px !important;
  padding: 10px 16px !important;
}
.swagger-ui .opblock.is-open .opblock-summary { border-radius: 8px 8px 0 0 !important; }
.swagger-ui .opblock-summary-method {
  border-radius: 4px !important;
  font-size: 12px !important; font-weight: 700 !important; letter-spacing: 0.3px !important;
}
.swagger-ui .opblock-summary-description { color: #6a7a86 !important; font-size: 13px !important; }
.swagger-ui .opblock .opblock-body { background: #f8f9fb !important; }

/* ═══ Tag descriptions — refined markdown ═══ */
.swagger-ui .opblock-tag-section .renderedMarkdown p {
  color: #5a6a76 !important; font-size: 13px !important; line-height: 1.6 !important;
}
.swagger-ui .opblock-tag-section .renderedMarkdown li {
  color: #5a6a76 !important; font-size: 13px !important; line-height: 1.6 !important;
}
.swagger-ui .opblock-tag-section .renderedMarkdown code {
  background: #edf2f7 !important; color: #00102E !important;
  font-size: 12px !important; padding: 1px 5px !important; border-radius: 3px !important;
}

/* ═══ Parameters ═══ */
.swagger-ui .parameter__name { font-weight: 600 !important; color: #00102E !important; }
.swagger-ui .parameter__name.required::after { color: #c44040 !important; }
.swagger-ui .parameter__type { color: #0e8a78 !important; font-size: 12px !important; }
.swagger-ui .parameter__in { color: #7a8a96 !important; }

/* ═══ Execute button ═══ */
.swagger-ui .btn.execute {
  background: #00102E !important; color: #48CCB9 !important;
  border: none !important; border-radius: 6px !important;
  font-weight: 600 !important;
}
.swagger-ui .btn.execute:hover { background: #001a40 !important; }

/* ═══ Try-it-out / Cancel ═══ */
.swagger-ui .btn.try-out__btn {
  border-color: #0e8a78 !important; color: #0e8a78 !important;
  border-radius: 6px !important; font-weight: 600 !important;
}
.swagger-ui .btn.try-out__btn:hover { background: rgba(14,138,120,0.06) !important; }
.swagger-ui .btn.cancel { border-radius: 6px !important; }

/* ═══ Links ═══ */
.swagger-ui .info .base-url { color: #0e8a78 !important; }
.swagger-ui .info .description a { color: #0e8a78 !important; }

/* ═══ Inline code ═══ */
.swagger-ui .info .description code,
.swagger-ui .renderedMarkdown code {
  background: #e8f8f5 !important; color: #0e8a78 !important;
  border-radius: 3px !important; padding: 2px 6px !important;
}

/* ═══ Code blocks ═══ */
.swagger-ui .info .description pre,
.swagger-ui .renderedMarkdown pre {
  background: #00102E !important; color: #c4d5e0 !important;
  border-radius: 6px !important; border: none !important;
}

/* ═══ Scheme container ═══ */
.swagger-ui .scheme-container {
  background: #f0f3f6 !important; border: 1px solid #e4e8ec !important;
  border-radius: 8px !important; box-shadow: none !important;
}
.swagger-ui .scheme-container select {
  border: 1px solid #d4dae0 !important; border-radius: 5px !important;
  background: #fff !important; color: #333 !important;
}

/* ═══ Response status ═══ */
.swagger-ui .response-col_status { font-weight: 700 !important; }

/* ═══ Models section ═══ */
.swagger-ui section.models { border-radius: 8px !important; }
.swagger-ui section.models h4 { color: #00102E !important; }
.swagger-ui section.models h4 svg { fill: #0e8a78 !important; }
.swagger-ui .model-box { border-radius: 6px !important; }

/* ═══ Modals ═══ */
.swagger-ui .dialog-ux .modal-ux {
  border-radius: 10px !important;
  box-shadow: 0 16px 48px rgba(0,16,46,0.15) !important;
}

/* ═══ Markdown tables ═══ */
.swagger-ui .renderedMarkdown table th { background: #f0f3f6 !important; }

/* ═══ Example dropdown ═══ */
.swagger-ui .body-param-options select {
  border: 1px solid #d4dae0 !important; border-radius: 6px !important;
  background: #fff !important; color: #333 !important;
}

/* ═══ All code blocks — unified navy ═══ */
.swagger-ui .highlight-code pre,
.swagger-ui .curl-command pre,
.swagger-ui .request-url pre,
.swagger-ui .microlight {
  background: #00102E !important;
  color: #c4d5e0 !important;
  border-radius: 6px !important;
  border: none !important;
}
.swagger-ui .curl-command .copy-to-clipboard { border-radius: 4px !important; }
.swagger-ui .response-col_links .microlight { background: #00102E !important; }

/* ═══ Theme toggle buttons ═══ */
.dc-theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; margin-left: 8px;
  font-size: 12px; font-weight: 600; font-family: inherit;
  color: #8aaab8 !important; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 6px;
  cursor: pointer; transition: all 0.15s; line-height: 1;
  white-space: nowrap;
}
.dc-theme-toggle:hover { background: rgba(255,255,255,0.14); color: #c4d5e0 !important; }
.dc-theme-toggle svg { width: 14px; height: 14px; flex-shrink: 0; stroke: currentColor; }
.dc-theme-toggle span { color: inherit !important; }
.dc-classic-active { background: rgba(4,255,195,0.15) !important; border-color: rgba(4,255,195,0.3) !important; color: #04FFC3 !important; }
/* Prevent dark mode global rules from overriding topbar button colors */
html.dark .dc-theme-toggle { color: #8aaab8 !important; border-color: rgba(255,255,255,0.12) !important; background: rgba(255,255,255,0.08) !important; }
html.dark .dc-theme-toggle:hover { color: #c4d5e0 !important; background: rgba(255,255,255,0.14) !important; }
html.dark .dc-theme-toggle span { color: inherit !important; }
html.dark .dc-classic-active { background: rgba(4,255,195,0.15) !important; border-color: rgba(4,255,195,0.3) !important; color: #04FFC3 !important; }
html.dark .dc-classic-active span { color: #04FFC3 !important; }

/* ═══════════════════════════════════════════════════════════════
   DARK MODE — activated by html.dark class

   Higher-contrast palette — wider elevation steps:
   base #0d1117 → surface #161b22 → card #1c2736
   → raised #263548 → input #2d3f56
   Text: bright #f0f6fc → body #d0dce8 → muted #8b9eb5
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Foundation ── */
html.dark,
html.dark body { background: #0d1117 !important; }
html.dark #depotcharge-loader { background: #0d1117 !important; }
html.dark #depotcharge-loader .spinner-logo svg path:last-child { fill: #d0dce8 !important; }

html.dark .swagger-ui,
html.dark .swagger-ui .wrapper,
html.dark .swagger-ui .information-container { background: transparent !important; color: #d0dce8 !important; }

/* ── 2. Global typography ── */
html.dark .swagger-ui,
html.dark .swagger-ui p,
html.dark .swagger-ui li,
html.dark .swagger-ui label,
html.dark .swagger-ui td,
html.dark .swagger-ui th,
html.dark .swagger-ui .renderedMarkdown p,
html.dark .swagger-ui .renderedMarkdown li { color: #d0dce8 !important; }
/* Spans — scoped to avoid killing Monaco editor token colors.
   Monaco lives inside .opblock-body .opblock-description-wrapper,
   so we only target sub-sections that definitely have NO Monaco editors. */
html.dark .swagger-ui .info span,
html.dark .swagger-ui .opblock-tag span,
html.dark .swagger-ui .opblock-summary span:not(.opblock-summary-method),
html.dark .swagger-ui .opblock-section-header span,
html.dark .swagger-ui .parameters span,
html.dark .swagger-ui .tab-header span,
html.dark .swagger-ui .responses-wrapper span,
html.dark .swagger-ui .response-col_description span,
html.dark .swagger-ui section.models span { color: #d0dce8 !important; }

html.dark .swagger-ui h1,
html.dark .swagger-ui h2,
html.dark .swagger-ui h3,
html.dark .swagger-ui h4,
html.dark .swagger-ui h5 { color: #f0f6fc !important; }

html.dark .swagger-ui a { color: #58d5b3 !important; }
html.dark .swagger-ui a:hover { color: #04FFC3 !important; }

html.dark .swagger-ui .expand-methods svg,
html.dark .swagger-ui .expand-operation svg { fill: #8b9eb5 !important; }
html.dark .swagger-ui .expand-methods:hover svg,
html.dark .swagger-ui .expand-operation:hover svg { fill: #d0dce8 !important; }

/* ── 3. Info section ── */
html.dark .swagger-ui .info .title { color: #f0f6fc !important; }
html.dark .swagger-ui .info .description p { color: #d0dce8 !important; }
html.dark .swagger-ui .info .base-url { color: #58d5b3 !important; }
html.dark .swagger-ui .info .description a { color: #58d5b3 !important; }

html.dark .swagger-ui .info .title small {
  background: rgba(4,255,195,0.15) !important; color: #04FFC3 !important;
  border-color: rgba(4,255,195,0.3) !important;
}

/* ── 4. Scheme container ── */
html.dark .swagger-ui .scheme-container {
  background: #161b22 !important;
  border-color: #30363d !important;
}

/* ── 5. Authorize button ── */
html.dark .swagger-ui .btn.authorize {
  background: transparent !important; color: #48CCB9 !important;
  border: 1px solid #48CCB9 !important;
}
html.dark .swagger-ui .btn.authorize:hover {
  background: rgba(72,204,185,0.1) !important; color: #04FFC3 !important;
  border-color: #04FFC3 !important;
}
html.dark .swagger-ui .btn.authorize svg { fill: #48CCB9 !important; }
html.dark .swagger-ui .btn.authorize:hover svg { fill: #04FFC3 !important; }
html.dark .swagger-ui .authorization__btn svg { fill: #48CCB9 !important; }
html.dark .swagger-ui .authorization__btn.locked svg { fill: #04FFC3 !important; }

/* ── 6. Tag headers ── */
html.dark .swagger-ui .opblock-tag {
  color: #f0f6fc !important;
  border-bottom-color: #30363d !important;
}
html.dark .swagger-ui .opblock-tag:hover { background: rgba(255,255,255,0.03) !important; }
html.dark .swagger-ui .opblock-tag small { color: #8b9eb5 !important; }
html.dark .swagger-ui .opblock-tag svg.arrow { fill: #48CCB9 !important; }

/* ── 7. Operation blocks ── */
html.dark .swagger-ui .opblock {
  background: #1c2736 !important;
  border: 1px solid #30363d !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
}

html.dark .swagger-ui .opblock .opblock-summary {
  background: transparent !important;
  border-color: transparent !important;
}
html.dark .swagger-ui .opblock.is-open .opblock-summary {
  border-bottom: 1px solid #30363d !important;
}
html.dark .swagger-ui .opblock-summary-path,
html.dark .swagger-ui .opblock-summary-path span,
html.dark .swagger-ui .opblock-summary-path a { color: #f0f6fc !important; }
html.dark .swagger-ui .opblock-summary-description { color: #8b9eb5 !important; }

html.dark .swagger-ui .opblock .opblock-body { background: #161b22 !important; }

/* Per-method left accent */
html.dark .swagger-ui .opblock.opblock-get {
  background: #1c2736 !important; border-color: #30363d !important;
  border-left: 3px solid #0e8a78 !important;
}
html.dark .swagger-ui .opblock.opblock-post {
  background: #1c2736 !important; border-color: #30363d !important;
  border-left: 3px solid #3b82c4 !important;
}
html.dark .swagger-ui .opblock.opblock-put {
  background: #1c2736 !important; border-color: #30363d !important;
  border-left: 3px solid #c08a2e !important;
}
html.dark .swagger-ui .opblock.opblock-delete {
  background: #1c2736 !important; border-color: #30363d !important;
  border-left: 3px solid #c44040 !important;
}
html.dark .swagger-ui .opblock.opblock-patch {
  background: #1c2736 !important; border-color: #30363d !important;
  border-left: 3px solid #7c5ebf !important;
}
html.dark .swagger-ui .opblock.opblock-head {
  background: #1c2736 !important; border-color: #30363d !important;
  border-left: 3px solid #9012fe !important;
}
html.dark .swagger-ui .opblock.opblock-options {
  background: #1c2736 !important; border-color: #30363d !important;
  border-left: 3px solid #0d5aa7 !important;
}
html.dark .swagger-ui .opblock.opblock-deprecated {
  background: #161b22 !important; border-color: #30363d !important;
  border-left: 3px solid #555 !important; opacity: 0.6 !important;
}

/* Section headers inside expanded ops */
html.dark .swagger-ui .opblock .opblock-section-header {
  background: #263548 !important;
  border-bottom: 1px solid #30363d !important;
  box-shadow: none !important;
}
html.dark .swagger-ui .opblock-section-header h4 { color: #f0f6fc !important; }
html.dark .swagger-ui .opblock-section-header > label { color: #8b9eb5 !important; }
html.dark .swagger-ui .opblock-section-header > label > span { color: #8b9eb5 !important; }

/* Tabs */
html.dark .swagger-ui .tab-header { border-bottom-color: #30363d !important; }
html.dark .swagger-ui .tab-header .tab-item { color: #8b9eb5 !important; }
html.dark .swagger-ui .tab-header .tab-item.active { color: #f0f6fc !important; }

/* Descriptions */
html.dark .swagger-ui .opblock-description-wrapper p,
html.dark .swagger-ui .opblock-external-docs-wrapper p { color: #d0dce8 !important; }

/* ── 8. Parameters ── */
html.dark .swagger-ui .parameter__name { color: #f0f6fc !important; }
html.dark .swagger-ui .parameter__name.required::after { color: #f87171 !important; }
html.dark .swagger-ui .parameter__type { color: #48CCB9 !important; }
html.dark .swagger-ui .parameter__in { color: #8b9eb5 !important; }
html.dark .swagger-ui .parameter__deprecated { color: #f87171 !important; }

/* ── 9. Tables ── */
html.dark .swagger-ui table thead tr th,
html.dark .swagger-ui table thead tr td {
  color: #8b9eb5 !important; border-bottom-color: #30363d !important;
}
html.dark .swagger-ui table tbody tr td { border-bottom-color: #21262d !important; }

html.dark .swagger-ui .renderedMarkdown table th { background: #161b22 !important; color: #8b9eb5 !important; }
html.dark .swagger-ui .renderedMarkdown table td { border-color: #21262d !important; }

/* ── 10. Markdown / code ── */
html.dark .swagger-ui .opblock-tag-section .renderedMarkdown p,
html.dark .swagger-ui .opblock-tag-section .renderedMarkdown li { color: #d0dce8 !important; }

html.dark .swagger-ui .info .description code,
html.dark .swagger-ui .renderedMarkdown code,
html.dark .swagger-ui .opblock-tag-section .renderedMarkdown code {
  background: rgba(4,255,195,0.1) !important; color: #48CCB9 !important;
}

html.dark .swagger-ui .info .description pre,
html.dark .swagger-ui .renderedMarkdown pre { background: #0d1117 !important; }
html.dark .swagger-ui .highlight-code pre,
html.dark .swagger-ui .curl-command pre,
html.dark .swagger-ui .request-url pre,
html.dark .swagger-ui .microlight,
html.dark .swagger-ui .response-col_links .microlight,
html.dark .swagger-ui .opblock-body pre.microlight { background: #0d1117 !important; color: #e6edf3 !important; }

/* Microlight syntax highlighting — the library sets inline style="color:..."
   on spans. !important CSS overrides inline styles. Apply JSON-friendly colors. */
html.dark .swagger-ui .microlight code { color: #e6edf3 !important; }
html.dark .swagger-ui .microlight .headerline { color: #e6edf3 !important; }
html.dark .swagger-ui .microlight span { color: #e6edf3 !important; }
html.dark .swagger-ui .opblock-body pre.microlight span[style] { color: #79c0ff !important; }

/* ── 10b. Example values — ensure readable text in dark mode ── */
html.dark .swagger-ui .example,
html.dark .swagger-ui .examples__section,
html.dark .swagger-ui .example__section { color: #d0dce8 !important; }
html.dark .swagger-ui .example pre,
html.dark .swagger-ui .model-example pre { background: #0d1117 !important; color: #e6edf3 !important; }
html.dark .swagger-ui .example textarea,
html.dark .swagger-ui .body-param textarea { background: #0d1117 !important; color: #e6edf3 !important; }
html.dark .swagger-ui .model-example .tab-header { border-bottom-color: #30363d !important; }

/* ── 11. Buttons ── */
html.dark .swagger-ui .btn { color: #d0dce8 !important; border-color: #30363d !important; }
html.dark .swagger-ui .btn:hover { color: #f0f6fc !important; background: rgba(255,255,255,0.04) !important; }

html.dark .swagger-ui .btn.execute {
  background: transparent !important; color: #48CCB9 !important;
  border: 1px solid #48CCB9 !important; font-weight: 700 !important;
}
html.dark .swagger-ui .btn.execute:hover {
  background: rgba(72,204,185,0.1) !important; color: #04FFC3 !important;
  border-color: #04FFC3 !important;
}

html.dark .swagger-ui .btn.try-out__btn { border-color: #48CCB9 !important; color: #48CCB9 !important; }
html.dark .swagger-ui .btn.try-out__btn:hover { background: rgba(4,255,195,0.08) !important; }

html.dark .swagger-ui .btn.cancel { color: #f87171 !important; border-color: rgba(248,113,113,0.3) !important; }

/* ── 12. Responses ── */
html.dark .swagger-ui .response-col_status { color: #f0f6fc !important; }
html.dark .swagger-ui .response-col_status .response-undocumented { color: #8b9eb5 !important; }
html.dark .swagger-ui .response-col_description__inner p,
html.dark .swagger-ui .response-col_description__inner span { color: #d0dce8 !important; }
html.dark .swagger-ui .responses-inner h4,
html.dark .swagger-ui .responses-inner h5 { color: #f0f6fc !important; }
html.dark .swagger-ui .response-control-media-type__title { color: #8b9eb5 !important; }
html.dark .swagger-ui .responses-table .response-col_description__inner div.markdown p { color: #d0dce8 !important; }
html.dark .swagger-ui .response-col_links { color: #d0dce8 !important; }

/* ── 13. Models & Schemas ── */
html.dark .swagger-ui section.models { background: #161b22 !important; border-color: #30363d !important; }
html.dark .swagger-ui section.models h4 { color: #f0f6fc !important; }
html.dark .swagger-ui section.models h4 svg { fill: #48CCB9 !important; }
html.dark .swagger-ui section.models h4:hover { background: rgba(255,255,255,0.03) !important; }
html.dark .swagger-ui .model-container { background: transparent !important; }
html.dark .swagger-ui .model-container:hover { background: rgba(255,255,255,0.03) !important; }
html.dark .swagger-ui section.models .model-container { background: transparent !important; }

/* model-box + model-box-control (all:inherit) — kill light bg */
html.dark .swagger-ui .model-box,
html.dark .swagger-ui .model-box * {
  background: transparent !important;
  background-color: transparent !important;
}
html.dark .swagger-ui .model-box-control,
html.dark .swagger-ui .model-box-control *,
html.dark .swagger-ui .models-control,
html.dark .swagger-ui .models-control * {
  background: transparent !important;
  background-color: transparent !important;
}

/* JSON Schema 2020-12 — THIS is what Swagger 5.x uses for schema rendering.
   Default has background-color:rgba(0,0,0,.05) which creates the light strips. */
html.dark .swagger-ui .json-schema-2020-12 {
  background-color: transparent !important;
}
html.dark .swagger-ui .json-schema-2020-12--embedded {
  background-color: transparent !important;
}
html.dark .swagger-ui .json-schema-2020-12-head {
  background-color: transparent !important;
}
html.dark .swagger-ui .json-schema-2020-12-body {
  background-color: transparent !important;
}
html.dark .swagger-ui .json-schema-2020-12-accordion {
  background-color: transparent !important;
}
html.dark .swagger-ui .json-schema-2020-12-expand-deep-button {
  background-color: transparent !important;
  color: #48CCB9 !important; border-color: #30363d !important;
}

/* Schema text colors */
html.dark .swagger-ui .json-schema-2020-12__title { color: #f0f6fc !important; }
html.dark .swagger-ui .json-schema-2020-12-property .json-schema-2020-12__title { color: #e6edf3 !important; }
html.dark .swagger-ui .json-schema-2020-12__attribute { color: #8b9eb5 !important; }
html.dark .swagger-ui .json-schema-2020-12-keyword__name--primary { color: #d0dce8 !important; }
html.dark .swagger-ui .json-schema-2020-12-keyword__name--secondary { color: #8b9eb5 !important; }
html.dark .swagger-ui .json-schema-2020-12-keyword__name--extension { color: #8b9eb5 !important; }
html.dark .swagger-ui .json-schema-2020-12-keyword__value { color: #8b9eb5 !important; }
html.dark .swagger-ui .json-schema-2020-12-keyword__value--primary { color: #d0dce8 !important; }
html.dark .swagger-ui .json-schema-2020-12-keyword__value--secondary { color: #8b9eb5 !important; }
html.dark .swagger-ui .json-schema-2020-12-keyword--description { color: #8b9eb5 !important; }

/* Constraint badges — softer colors for dark bg */
html.dark .swagger-ui .json-schema-2020-12__constraint {
  background-color: rgba(128,90,213,0.25) !important; color: #c4b5e0 !important;
}
html.dark .swagger-ui .json-schema-2020-12__constraint--string {
  background-color: rgba(214,158,46,0.25) !important; color: #f0d078 !important;
}
html.dark .swagger-ui .json-schema-2020-12-keyword__value--warning {
  color: #fca5a5 !important; border-color: rgba(248,113,113,0.4) !important;
}

/* Required asterisk */
html.dark .swagger-ui .json-schema-2020-12-property--required > .json-schema-2020-12:first-of-type > .json-schema-2020-12-head .json-schema-2020-12__title::after {
  color: #f87171 !important;
}

/* JSON viewer inside schemas */
html.dark .swagger-ui .json-schema-2020-12-json-viewer__name,
html.dark .swagger-ui .json-schema-2020-12-json-viewer__value { color: #d0dce8 !important; }

/* Legacy model classes */
html.dark .swagger-ui .model { color: #d0dce8 !important; }
html.dark .swagger-ui .model-title { color: #f0f6fc !important; }
html.dark .swagger-ui .prop-type { color: #48CCB9 !important; }
html.dark .swagger-ui .prop-format { color: #8b9eb5 !important; }
html.dark .swagger-ui .model .property { color: #d0dce8 !important; }
html.dark .swagger-ui .model-hint { background: rgba(0,0,0,0.7) !important; color: #d0dce8 !important; }
html.dark .swagger-ui .model span { color: #d0dce8 !important; }

/* Tachyons utility overrides */
html.dark .swagger-ui .bg-orange { background-color: rgba(255,99,0,0.2) !important; color: #ffb380 !important; }
html.dark .swagger-ui .bg-purple { background-color: rgba(128,90,213,0.25) !important; color: #c4b5e0 !important; }
html.dark .swagger-ui .bg-red { background-color: rgba(249,62,62,0.15) !important; color: #fca5a5 !important; }
html.dark .swagger-ui .bg-gray { background-color: rgba(255,255,255,0.08) !important; }
html.dark .swagger-ui .bg-white { background-color: transparent !important; }
html.dark .swagger-ui .bg-near-white { background-color: transparent !important; }
html.dark .swagger-ui .bg-light-gray { background-color: rgba(255,255,255,0.06) !important; }
html.dark .swagger-ui .bg-moon-gray { background-color: rgba(255,255,255,0.08) !important; }
html.dark .swagger-ui .bg-light-silver { background-color: rgba(255,255,255,0.1) !important; }
html.dark .swagger-ui .bg-black-05 { background-color: rgba(255,255,255,0.03) !important; }
html.dark .swagger-ui .bg-black-10 { background-color: rgba(255,255,255,0.06) !important; }
html.dark .swagger-ui .bg-white-10 { background-color: rgba(255,255,255,0.06) !important; }

/* ── 14. Inputs ── */
html.dark .swagger-ui input[type=text],
html.dark .swagger-ui input[type=password],
html.dark .swagger-ui input[type=search],
html.dark .swagger-ui input[type=email],
html.dark .swagger-ui input[type=file],
html.dark .swagger-ui textarea { background: #2d3f56 !important; color: #f0f6fc !important; border-color: #3d5068 !important; }
html.dark .swagger-ui select { background: #2d3f56 !important; color: #f0f6fc !important; border-color: #3d5068 !important; }
html.dark .swagger-ui input[disabled],
html.dark .swagger-ui select[disabled],
html.dark .swagger-ui textarea[disabled] { background: #1c2736 !important; color: #8b9eb5 !important; }
html.dark .swagger-ui input::placeholder,
html.dark .swagger-ui textarea::placeholder { color: #6a7d92 !important; }
html.dark .swagger-ui input.invalid { background: rgba(248,113,113,0.1) !important; border-color: #f87171 !important; }
html.dark .swagger-ui .checkbox .item { background: #2d3f56 !important; }

/* ── 15. Modals ── */
html.dark .swagger-ui .dialog-ux .backdrop-ux { background: rgba(0,0,0,0.7) !important; }
html.dark .swagger-ui .dialog-ux .modal-ux {
  background: #1c2736 !important; border: 1px solid #30363d !important;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5) !important;
}
html.dark .swagger-ui .dialog-ux .modal-ux-header { border-bottom-color: #30363d !important; }
html.dark .swagger-ui .dialog-ux .modal-ux-header h3 { color: #f0f6fc !important; }
html.dark .swagger-ui .dialog-ux .modal-ux-content p,
html.dark .swagger-ui .dialog-ux .modal-ux-content label { color: #d0dce8 !important; }
html.dark .swagger-ui .modal-ux .btn { color: #d0dce8 !important; border-color: #30363d !important; }
html.dark .swagger-ui .btn.modal-btn { background: #2d3f56 !important; color: #d0dce8 !important; border-color: #3d5068 !important; }
html.dark .swagger-ui .auth-container .errors { background: rgba(248,113,113,0.1) !important; }

/* ── 16. Errors ── */
html.dark .swagger-ui .errors-wrapper { background: rgba(249,62,62,0.1) !important; border-color: #f87171 !important; }
html.dark .swagger-ui .errors-wrapper h4 { color: #f87171 !important; }

/* ── 17. Loading ── */
html.dark .swagger-ui .loading-container .loading::after { color: #8b9eb5 !important; }

/* ── 18. Filter ── */
html.dark .swagger-ui .filter-container { background: transparent !important; }
html.dark .swagger-ui .filter-container .operation-filter-input { background: #2d3f56 !important; color: #f0f6fc !important; border-color: #3d5068 !important; }

/* ── 19. Copy to clipboard ── */
html.dark .swagger-ui .copy-to-clipboard { background: rgba(255,255,255,0.05) !important; }
html.dark .swagger-ui .copy-to-clipboard button { color: #8b9eb5 !important; }
html.dark .swagger-ui .copy-to-clipboard:hover { background: rgba(255,255,255,0.1) !important; }

/* ── 20. Monaco chrome ── */
html.dark .monaco-chrome { border-color: #30363d !important; box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important; }
html.dark .monaco-chrome:focus-within { border-color: #48CCB9 !important; box-shadow: 0 0 0 3px rgba(72,204,185,0.15) !important; }
html.dark .monaco-toolbar { background: #161b22 !important; border-bottom-color: #30363d !important; }
html.dark .monaco-toolbar-label { color: #8b9eb5 !important; }
html.dark .monaco-tb-btn { color: #8b9eb5 !important; }
html.dark .monaco-tb-btn:hover { background: rgba(255,255,255,0.08) !important; color: #f0f6fc !important; border-color: #30363d !important; }
html.dark .monaco-tb-btn--ok { color: #04FFC3 !important; }
