/* Dark theme for Swagger UI, applied when <html> has class "theme-dark"
   (driven by the shared localStorage['theme'] preference). Scoped so it only
   affects the /docs page when dark is active. */

html.theme-dark,
html.theme-dark body { background: #0b0f17; }

html.theme-dark .swagger-ui,
html.theme-dark .swagger-ui .info .title,
html.theme-dark .swagger-ui .info li,
html.theme-dark .swagger-ui .info p,
html.theme-dark .swagger-ui .info a,
html.theme-dark .swagger-ui label,
html.theme-dark .swagger-ui .opblock-tag,
html.theme-dark .swagger-ui .opblock-tag small,
html.theme-dark .swagger-ui .opblock .opblock-summary-operation-id,
html.theme-dark .swagger-ui .opblock .opblock-summary-path,
html.theme-dark .swagger-ui .opblock .opblock-summary-path__deprecated,
html.theme-dark .swagger-ui .opblock .opblock-summary-description,
html.theme-dark .swagger-ui .opblock-description-wrapper p,
html.theme-dark .swagger-ui .opblock-external-docs-wrapper p,
html.theme-dark .swagger-ui .parameter__name,
html.theme-dark .swagger-ui .parameter__type,
html.theme-dark .swagger-ui .parameter__in,
html.theme-dark .swagger-ui table thead tr td,
html.theme-dark .swagger-ui table thead tr th,
html.theme-dark .swagger-ui .response-col_status,
html.theme-dark .swagger-ui .response-col_description,
html.theme-dark .swagger-ui .responses-inner h4,
html.theme-dark .swagger-ui .responses-inner h5,
html.theme-dark .swagger-ui .model-title,
html.theme-dark .swagger-ui .model,
html.theme-dark .swagger-ui .prop-type,
html.theme-dark .swagger-ui .tab li,
html.theme-dark .swagger-ui .markdown p,
html.theme-dark .swagger-ui h1,
html.theme-dark .swagger-ui h2,
html.theme-dark .swagger-ui h3,
html.theme-dark .swagger-ui h4,
html.theme-dark .swagger-ui h5 { color: #e5e7eb; }

html.theme-dark .swagger-ui .opblock-tag { border-bottom-color: #1f2937; }

html.theme-dark .swagger-ui .scheme-container,
html.theme-dark .swagger-ui section.models,
html.theme-dark .swagger-ui .opblock .opblock-section-header {
  background: #111827;
  box-shadow: none;
  border-color: #1f2937;
}

html.theme-dark .swagger-ui .opblock {
  background: rgba(255, 255, 255, .02);
  border-color: #1f2937;
}
html.theme-dark .swagger-ui .opblock .opblock-summary { border-color: #1f2937; }
html.theme-dark .swagger-ui section.models .model-container { background: rgba(255, 255, 255, .02); }
html.theme-dark .swagger-ui section.models .model-container:hover { background: rgba(255, 255, 255, .05); }

html.theme-dark .swagger-ui input[type=text],
html.theme-dark .swagger-ui input[type=password],
html.theme-dark .swagger-ui input[type=email],
html.theme-dark .swagger-ui input[type=search],
html.theme-dark .swagger-ui input[type=number],
html.theme-dark .swagger-ui textarea,
html.theme-dark .swagger-ui select {
  background: #0b0f17;
  color: #e5e7eb;
  border-color: #374151;
}

html.theme-dark .swagger-ui .topbar { background: #111827; }
html.theme-dark .swagger-ui .btn { color: #e5e7eb; border-color: #374151; }
html.theme-dark .swagger-ui .btn.cancel { color: #f87171; border-color: #f87171; }
html.theme-dark .swagger-ui .markdown code,
html.theme-dark .swagger-ui .renderedMarkdown code { background: #1f2937; color: #e5e7eb; }
html.theme-dark .swagger-ui .microlight { filter: brightness(1.4); }

/* Authorization / dialog modal (was left white) */
html.theme-dark .swagger-ui .dialog-ux .modal-ux { background: #111827; border-color: #1f2937; }
html.theme-dark .swagger-ui .dialog-ux .backdrop-ux { background: rgba(0, 0, 0, .6); }
html.theme-dark .swagger-ui .dialog-ux .modal-ux-header { border-bottom-color: #1f2937; }
html.theme-dark .swagger-ui .dialog-ux .modal-ux-header h3,
html.theme-dark .swagger-ui .dialog-ux .modal-ux-content h4,
html.theme-dark .swagger-ui .dialog-ux .modal-ux-content p,
html.theme-dark .swagger-ui .dialog-ux .modal-ux-content label,
html.theme-dark .swagger-ui .dialog-ux .modal-ux-content code,
html.theme-dark .swagger-ui .dialog-ux .modal-ux-content .scope-def,
html.theme-dark .swagger-ui .auth-container h4,
html.theme-dark .swagger-ui .auth-container .wrapper label,
html.theme-dark .swagger-ui .auth-container .scopes h2 { color: #e5e7eb; }
html.theme-dark .swagger-ui .auth-container { border-bottom-color: #1f2937; }
html.theme-dark .swagger-ui .modal-ux-header .close-modal svg { fill: #e5e7eb; }
html.theme-dark .swagger-ui .dialog-ux .modal-ux-content code { background: #1f2937; }
