:root {
  --bs-primary:       #0b72eb !important;
  --bs-primary-rgb:   11, 114, 235 !important;
  --bs-secondary:     #f4f1e8 !important;
  --bs-secondary-rgb: 244, 241, 232 !important;
  --bs-success:       #2BBA4C !important;
  --bs-success-rgb:   43, 186, 76 !important;
  --bs-info:          #007312 !important;
  --bs-info-rgb:      0, 115, 18 !important;
  --bs-warning:       #FFDD33 !important;
  --bs-warning-rgb:   255, 221, 51 !important;
  --bs-danger:        #CC0000 !important;
  --bs-danger-rgb:    204, 0, 0 !important;
  --bs-light:         #f4f1e8 !important;
  --bs-light-rgb:     244, 241, 232 !important;
  --bs-dark:          #081b2b !important;
  --bs-dark-rgb:      8, 27, 43 !important;
  --bs-body-bg:       #081b2b !important;
  --bs-body-bg-rgb:   8, 27, 43 !important;
  --ts-accent-purple: #a16eff !important;
  --ts-op-dark-blue:  #0a2a66 !important;
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bs-body-bg);
  color: var(--bs-light);
  color-scheme: dark;
  line-height: 1.7;
}

/* ——— Swagger / documentation shared styling ——— */
.swagger-ui .topbar {
  background: rgba(var(--bs-dark-rgb), 0.9);
  border-bottom: 1px solid rgba(var(--bs-primary-rgb), .35);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

.swagger-ui .topbar a span { color: var(--bs-light); }

.swagger-ui .topbar .download-url-wrapper .select-label select,
.swagger-ui .topbar .download-url-wrapper input {
  background: rgba(255,255,255,.05);
  color: var(--bs-light);
  border-color: rgba(var(--bs-primary-rgb), .35);
}

.swagger-ui .info .title,
.swagger-ui .info p,
.swagger-ui .markdown p,
.swagger-ui .scheme-container section.models h4,
.swagger-ui .opblock .opblock-summary-description,
.swagger-ui .line { color: var(--bs-light); }

.swagger-ui a,
.swagger-ui .tab li { color: color-mix(in srgb, var(--bs-primary) 85%, white); }

.swagger-ui .markdown code,
.swagger-ui code,
.swagger-ui pre {
  background: rgba(255,255,255,.06);
  color: var(--bs-secondary);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
}

.swagger-ui .info,
.swagger-ui .scheme-container,
.swagger-ui .models,
.swagger-ui .wrapper,
.swagger-ui section { background: transparent; }

.swagger-ui .opblock {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  border-radius: 12px;
}

.swagger-ui .opblock .opblock-summary {
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.20) !important;
}

.swagger-ui .opblock-get,
.swagger-ui .opblock-post,
.swagger-ui .opblock-put,
.swagger-ui .opblock-delete,
.swagger-ui .opblock-patch {
  border-color: var(--ts-op-dark-blue) !important;
  background: color-mix(in srgb, var(--bs-primary) 12%, transparent) !important;
}

.swagger-ui .opblock .opblock-summary-method {
  background: rgb(var(--bs-primary-rgb));
  color: #fff;
  border-radius: 6px;
}

.swagger-ui .opblock .opblock-summary-path,
.swagger-ui .opblock .opblock-summary-path a,
.swagger-ui .opblock .opblock-summary-path span,
.swagger-ui .opblock .opblock-summary-path__deprecated { color: var(--bs-primary) !important; }

.swagger-ui .content-type,
.swagger-ui .content-type label,
.swagger-ui .content-type .content-type__title,
.swagger-ui .content-type .opblock-content-type,
.swagger-ui .opblock .content-type,
.swagger-ui .opblock .content-type label { color: var(--ts-accent-purple) !important; }

.swagger-ui .btn,
.swagger-ui .authorization__btn {
  background: rgb(var(--bs-primary-rgb));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.swagger-ui .btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
}

.swagger-ui .btn[disabled] {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.45);
}

.swagger-ui .execute-wrapper .btn,
.swagger-ui .btn.execute { background: rgb(var(--bs-success-rgb)); }

.swagger-ui .btn.cancel { background: rgb(var(--bs-danger-rgb)); color: #fff; }

.swagger-ui .btn.authorize { background: rgb(var(--bs-info-rgb)); }

.swagger-ui input[type=text],
.swagger-ui input[type=search],
.swagger-ui input[type=url],
.swagger-ui input[type=email],
.swagger-ui input[type=password],
.swagger-ui textarea,
.swagger-ui select {
  background: rgba(255,255,255,.06);
  color: var(--bs-light);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  border-radius: 8px;
}

.swagger-ui label,
.swagger-ui .parameters-col_description,
.swagger-ui .response-col_description,
.swagger-ui .model-title__text,
.swagger-ui .model { color: var(--bs-light); }

.swagger-ui table thead tr th,
.swagger-ui table tbody tr td { color: var(--bs-light); border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.03); }

.swagger-ui .opblock-tag {
  color: var(--bs-secondary);
  border-color: rgba(255,255,255,.12);
  background: color-mix(in srgb, var(--bs-primary) 35%, var(--bs-dark)) !important;
  border-radius: 12px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,.05); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.32); }

/* Version badge */
.swagger-ui .version,
.swagger-ui .info .title small pre,
.swagger-ui .info .title small pre span,
.swagger-ui .info .title small pre code {
  border: none !important;
  box-shadow: none !important;
  background-clip: padding-box !important;
}

.swagger-ui .info .title small pre {
  background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
  color: var(--bs-secondary) !important;
  border-radius: 6px !important;
}

/* Tables (docs + global) */
.swagger-ui .info .markdown table,
.swagger-ui table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  background: color-mix(in srgb, var(--bs-primary) 12%, transparent) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.swagger-ui .info .markdown table th,
.swagger-ui .info .markdown table td { padding: 14px 20px !important; border: 0 !important; text-align: left; vertical-align: middle; color: var(--bs-light); }

.swagger-ui .info .markdown table tr + tr td { border-top: 1px solid rgba(255,255,255,0.10) !important; }

.swagger-ui .info .markdown table thead th,
.swagger-ui table thead tr th { font-weight: 600; color: var(--bs-secondary); background: rgba(255,255,255,.04) !important; }

.swagger-ui .info .markdown table td:first-child code { background: rgba(var(--bs-primary-rgb), 0.15); padding: 4px 8px; border-radius: 6px; }

/* Models panel (merged + final background) */
.swagger-ui section.models {
  color: var(--bs-light) !important;
  background: #081b2b !important; /* final override retained */
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.swagger-ui section.models .model,
.swagger-ui section.models .model *,
.swagger-ui section.models .model-box .model-title * { background: transparent !important; border: none !important; box-shadow: none !important; }

.swagger-ui section.models .model-box {
  background: #000 !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  color: var(--bs-light) !important;
}

.swagger-ui section.models .model-box .model-title,
.swagger-ui section.models .model-title__text,
.swagger-ui section.models .property-name,
.swagger-ui section.models .model-toggle,
.swagger-ui section.models .model-toggle .expand-operation,
.swagger-ui section.models .model-toggle .collapse-operation { color: var(--bs-light) !important; }

.swagger-ui section.models .prop-type,
.swagger-ui section.models .prop-format,
.swagger-ui section.models code.type,
.swagger-ui section.models .model-title__type { color: color-mix(in srgb, var(--bs-primary) 85%, white) !important; font-weight: 600; }

.swagger-ui section.models .property-name.required::after { color: var(--bs-danger) !important; }

.swagger-ui section.models .model-toggle,
.swagger-ui section.models .model-toggle:hover { background: transparent !important; color: color-mix(in srgb, var(--bs-primary) 85%, white) !important; border: none !important; }

.swagger-ui section.models .markdown,
.swagger-ui section.models .markdown p { color: var(--bs-light) !important; }

/* General opblock text/colors */
.swagger-ui .opblock,
.swagger-ui .opblock .opblock-summary-description,
.swagger-ui .opblock .opblock-description-wrapper,
.swagger-ui .opblock .opblock-description-wrapper p,
.swagger-ui .opblock label,
.swagger-ui .opblock .parameters-col_description,
.swagger-ui .opblock .response-col_description,
.swagger-ui .opblock .response-col_status,
.swagger-ui .opblock table thead th,
.swagger-ui .opblock table tbody td,
.swagger-ui .opblock .parameter__name,
.swagger-ui .opblock .parameter__type,
.swagger-ui .opblock .tab li,
.swagger-ui .opblock .model,
.swagger-ui .opblock .markdown p { color: var(--bs-light) !important; }

.swagger-ui .opblock .opblock-section-header { border-bottom: 1px solid rgba(255,255,255,.20) !important; background: var(--bs-light); }
.swagger-ui .opblock .opblock-section-header h4 { color: var(--bs-dark) !important; }

.swagger-ui .content-type { color: var(--bs-dark) !important; }

.swagger-ui .response-col_links { color: var(--bs-light) !important; }

.swagger-ui .response-control-media-type--accept-controller select,
.swagger-ui select { border-color: var(--bs-dark) !important; }

.swagger-ui .response-control-media-type__accept-message { color: var(--bs-light) !important; }

.swagger-ui input[type=text].invalid { background: #1e3953 !important; }

/* JSON Schema 2020-12 */
.swagger-ui .json-schema-2020-12-accordion { background: #0e2841 !important; color: var(--bs-light) !important; }
.swagger-ui .json-schema-2020-12,
.swagger-ui .json-schema-2020-12-expand-deep-button { background-color: #0e2841 !important; }
.swagger-ui .json-schema-2020-12-expand-deep-button { color: grey !important; }
.swagger-ui .json-schema-2020-12__title,
.swagger-ui .json-schema-2020-12-keyword__name--primary,
.swagger-ui .models-control { color: var(--bs-light) !important; }

/* ——— Admin docs specifics ——— */
#logout-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
  background: rgb(var(--bs-danger-rgb));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

#logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  filter: brightness(1.05);
  background: color-mix(in srgb, var(--bs-danger) 80%, white);
}

#logout-btn svg { width: 18px; height: 18px; stroke: currentColor; }

/* Admin login page */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.login-page .card {
  background: var(--bs-body-bg);
  border: 1px solid color-mix(in srgb, var(--bs-primary) 35%, transparent);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  width: 100%;
  max-width: 420px;
}

.login-page h1 { font-size: 20px; margin: 0 0 12px 0; color: var(--bs-secondary); }

.login-page p { opacity: .85; margin: 0 0 16px 0; color: color-mix(in srgb, var(--bs-light) 85%, white); }

.login-page .field { display: flex; align-items: center; }

.login-page .input {
  flex: 1;
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--bs-primary) 45%, white 5%);
  background: var(--bs-body-bg);
  color: var(--bs-light);
  outline: none;
  line-height: 1.3;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.login-page .input:focus { border-color: rgb(var(--bs-primary-rgb)); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .25); }

.login-page .toggle {
  margin-left: 6px;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--bs-primary) 45%, white 5%);
  color: color-mix(in srgb, var(--bs-light) 70%, white 0%);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  height: 40px;
  min-width: 40px;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.login-page .toggle:hover { color: var(--bs-light); background: rgba(var(--bs-primary-rgb), 0.08); border-color: rgb(var(--bs-primary-rgb)); }

.login-page .toggle svg { width: 18px; height: 18px; }

.login-page .icon-eye-open { display: none; }

.login-page .toggle.visible .icon-eye-open { display: inline; }
.login-page .toggle.visible .icon-eye-closed { display: none; }

.login-page button[type="submit"] {
  margin-top: 14px;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 0;
  background: rgb(var(--bs-primary-rgb));
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 6px 18px rgba(var(--bs-primary-rgb), .35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.login-page button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(var(--bs-primary-rgb), .45); filter: brightness(1.05); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.swagger-ui .info .markdown table thead th,
.swagger-ui table thead tr th {
  background: rgba(255,255,255,.04) !important;
}

.swagger-ui .info .markdown code,
.swagger-ui code,
.swagger-ui pre,
.swagger-ui .opblock .opblock-summary-path span {
  color: var(--bs-primary) !important;
}

/* ——— Fix: media-type pill (application/json) uses primary blue text + border ——— */
/* Override earlier purple text for content-type labels */
.swagger-ui .opblock .content-type,
.swagger-ui .opblock .content-type label,
.swagger-ui .content-type,
.swagger-ui .content-type label,
.swagger-ui .content-type .content-type__title,
.swagger-ui .content-type .opblock-content-type,
.swagger-ui .response-control-media-type__accept-message {
color: var(--bs-primary) !important;
}


/* Ensure the pill/selector itself gets a blue border (some themes render it as a pill) */
.swagger-ui .content-type .opblock-content-type,
.swagger-ui .response-control-media-type__accept-message {
border: 1px solid rgb(var(--bs-primary-rgb)) !important;
border-radius: 999px !important; /* keep pill shape if present */
}
