/* ── 전체 배경 ── */
body { background: #0d1117 !important; }

/* ── 상단 topbar ── */
.swagger-ui .topbar {
  background: #010409 !important;
  border-bottom: 1px solid #21262d;
  padding: .5rem 0;
}
.swagger-ui .topbar .download-url-wrapper input[type=text] {
  background: #161b22;
  border: 1px solid #30363d;
  color: #c9d1d9;
}
.swagger-ui .topbar .download-url-wrapper .download-url-button {
  background: #238636;
  border-color: #238636;
}
/* 기본 Swagger 로고 숨기고 텍스트로 교체 */
.swagger-ui .topbar-wrapper img[alt="Swagger UI"] { display: none; }
.swagger-ui .topbar-wrapper a::after {
  content: '뱅크레일';
  color: #58a6ff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.02em;
}

/* ── 기본 텍스트 색상 ── */
.swagger-ui,
.swagger-ui .opblock-tag,
.swagger-ui .opblock-tag small,
.swagger-ui section.models h4,
.swagger-ui .info .title,
.swagger-ui .info li,
.swagger-ui .info p,
.swagger-ui table thead tr th,
.swagger-ui table thead tr td,
.swagger-ui .parameter__name,
.swagger-ui label {
  color: #c9d1d9 !important;
}

/* ── info 영역 ── */
.swagger-ui .info {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}
.swagger-ui .info .title { color: #e6edf3 !important; }
.swagger-ui .info a { color: #58a6ff !important; }
.swagger-ui .info code {
  background: #21262d !important;
  color: #79c0ff !important;
  padding: .1em .35em;
  border-radius: 4px;
}
.swagger-ui .info pre {
  background: #0d1117 !important;
  border: 1px solid #30363d;
  border-radius: 6px;
}
.swagger-ui .info table th { background: #21262d; }
.swagger-ui .info table td { border-bottom: 1px solid #21262d; }
.swagger-ui .info hr { border-color: #21262d !important; }

/* ── scheme 선택 영역 ── */
.swagger-ui .scheme-container {
  background: #161b22 !important;
  border: 1px solid #21262d;
  box-shadow: none;
}
.swagger-ui .servers > label select {
  background: #0d1117;
  color: #c9d1d9;
  border-color: #30363d;
}

/* ── 태그(그룹) 헤더 ── */
.swagger-ui .opblock-tag {
  background: transparent !important;
  border-bottom: 1px solid #21262d !important;
}
.swagger-ui .opblock-tag:hover { background: #161b22 !important; }

/* ── 엔드포인트 블록 배경 ── */
.swagger-ui .opblock {
  background: #161b22 !important;
  border: 1px solid #21262d !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
.swagger-ui .opblock .opblock-summary-description {
  color: #8b949e !important;
}

/* ── GET 메서드 ── */
.swagger-ui .opblock.opblock-get { border-color: #1f3a5c !important; }
.swagger-ui .opblock.opblock-get .opblock-summary-method {
  background: #1f3a5c !important;
  color: #79c0ff !important;
}
/* ── POST 메서드 ── */
.swagger-ui .opblock.opblock-post { border-color: #1a3d26 !important; }
.swagger-ui .opblock.opblock-post .opblock-summary-method {
  background: #1a3d26 !important;
  color: #3fb950 !important;
}
/* ── PUT 메서드 ── */
.swagger-ui .opblock.opblock-put { border-color: #3d2f0d !important; }
.swagger-ui .opblock.opblock-put .opblock-summary-method {
  background: #3d2f0d !important;
  color: #e3b341 !important;
}
/* ── PATCH 메서드 ── */
.swagger-ui .opblock.opblock-patch { border-color: #2d1f4e !important; }
.swagger-ui .opblock.opblock-patch .opblock-summary-method {
  background: #2d1f4e !important;
  color: #bc8cff !important;
}
/* ── DELETE 메서드 ── */
.swagger-ui .opblock.opblock-delete { border-color: #3d1515 !important; }
.swagger-ui .opblock.opblock-delete .opblock-summary-method {
  background: #3d1515 !important;
  color: #f85149 !important;
}

/* ── 펼쳐진 블록 바디 ── */
.swagger-ui .opblock .opblock-body,
.swagger-ui .opblock-description-wrapper,
.swagger-ui .opblock-section-header {
  background: #0d1117 !important;
}
.swagger-ui .opblock-section-header h4 { color: #8b949e !important; }

/* ── 입력 폼 ── */
.swagger-ui input[type=text],
.swagger-ui input[type=password],
.swagger-ui input[type=email],
.swagger-ui textarea,
.swagger-ui select {
  background: #0d1117 !important;
  border: 1px solid #30363d !important;
  color: #c9d1d9 !important;
  border-radius: 4px !important;
}
.swagger-ui .parameter__type { color: #8b949e !important; }

/* ── 테이블 ── */
.swagger-ui table { background: transparent !important; }
.swagger-ui table tbody tr td { border-bottom: 1px solid #21262d !important; color: #c9d1d9 !important; }
.swagger-ui table thead tr th,
.swagger-ui table thead tr td { border-bottom: 1px solid #30363d !important; color: #8b949e !important; }

/* ── 버튼 ── */
.swagger-ui .btn.execute {
  background: #238636 !important;
  border-color: #238636 !important;
  color: #fff !important;
}
.swagger-ui .btn.execute:hover { background: #2ea043 !important; }
.swagger-ui .btn.cancel {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #c9d1d9 !important;
}
.swagger-ui .btn.try-out__btn {
  background: #21262d !important;
  border-color: #30363d !important;
  color: #c9d1d9 !important;
}
.swagger-ui .authorize {
  background: transparent !important;
  border-color: #58a6ff !important;
  color: #58a6ff !important;
}

/* ── 응답/코드 영역 ── */
.swagger-ui .highlight-code,
.swagger-ui .microlight,
.swagger-ui .response-col_links { background: #161b22 !important; }
.swagger-ui .response-col_status { color: #3fb950 !important; }

/* ── 모달 ── */
.swagger-ui .dialog-ux .modal-ux {
  background: #161b22 !important;
  border: 1px solid #30363d !important;
}
.swagger-ui .dialog-ux .modal-ux-header {
  background: #0d1117 !important;
  border-bottom: 1px solid #21262d !important;
}
.swagger-ui .dialog-ux .modal-ux-header h3 { color: #e6edf3 !important; }

/* ── 모델/스키마 ── */
.swagger-ui section.models {
  background: #161b22 !important;
  border: 1px solid #21262d !important;
}
.swagger-ui .model-box { background: #0d1117 !important; }

/* ── 스크롤바 ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }
