/* KamTeswa API — cycle-first Swagger workspace. Presentation-only. */

.kt-cycle-workspace {
  --kt-cycle-ink: #122039;
  --kt-cycle-muted: #687792;
  --kt-cycle-navy: #172944;
  --kt-cycle-navy-deep: #0f1c31;
  --kt-cycle-blue: #355c91;
  --kt-cycle-orange: #f3a14b;
  --kt-cycle-green: #16996b;
  --kt-cycle-line: #dbe3ee;
  width: 100%;
  max-width: 1180px;
  margin: 10px auto 8px;
  padding: 0 26px;
  color: var(--kt-cycle-ink);
  font-family: var(--sans, "Segoe UI", system-ui, sans-serif);
}

.kt-cycle-shell {
  overflow: hidden;
  border: 1px solid rgba(32, 57, 89, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 24px 60px -38px rgba(15, 28, 49, .55), 0 3px 10px rgba(15, 28, 49, .05);
}

.kt-cycle-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  align-items: center;
  gap: 22px;
  min-height: 96px;
  padding: 16px 20px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(243, 161, 75, .24), transparent 18rem),
    linear-gradient(118deg, var(--kt-cycle-navy-deep), var(--kt-cycle-navy) 58%, #25476e);
}

.kt-cycle-hero::before,
.kt-cycle-hero::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.kt-cycle-hero::before { top: -110px; right: 8%; width: 250px; height: 250px; }
.kt-cycle-hero::after { right: -72px; bottom: -136px; width: 310px; height: 310px; }

.kt-cycle-hero__copy,
.kt-cycle-hero__tools,
.kt-cycle-search { position: relative; z-index: 1; }

.kt-cycle-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(231, 238, 248, .72);
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.kt-cycle-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--kt-cycle-green);
  box-shadow: 0 0 0 4px rgba(22, 153, 107, .15), 0 0 16px rgba(22, 153, 107, .62);
}

.kt-cycle-hero__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.kt-cycle-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 820;
  letter-spacing: -.035em;
}

.kt-cycle-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(225, 234, 246, .72);
  font-size: .83rem;
  line-height: 1.55;
}

.kt-cycle-hero__tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.kt-cycle-search {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 10px 0 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 12px 28px rgba(5, 14, 26, .16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.kt-cycle-search:focus-within {
  border-color: rgba(243, 161, 75, .8);
  background: rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 4px rgba(243, 161, 75, .1), 0 14px 32px rgba(5, 14, 26, .2);
}

.kt-cycle-search svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: rgba(230, 238, 248, .72);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.kt-cycle-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 600 .82rem var(--sans, "Segoe UI", system-ui, sans-serif);
}

.kt-cycle-search input::placeholder { color: rgba(224, 233, 245, .55); }

.kt-cycle-search kbd {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .68);
  font: 700 .72rem var(--mono, monospace);
}

.kt-cycle-tabs {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  align-items: stretch;
  gap: 3px;
  min-height: 56px;
  padding: 6px 8px;
  overflow: visible;
  border-bottom: 1px solid var(--kt-cycle-line);
  background: linear-gradient(180deg, #fff, #fbfcfe);
  scrollbar-width: thin;
  scrollbar-color: #c8d3e2 transparent;
}

.kt-cycle-tab {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--kt-cycle-muted);
  cursor: pointer;
  font: 750 .75rem var(--sans, "Segoe UI", system-ui, sans-serif);
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.kt-cycle-tab:hover {
  border-color: #e0e7f0;
  background: #f6f9fc;
  color: var(--kt-cycle-ink);
  transform: translateY(-1px);
}

.kt-cycle-tab.is-active {
  border-color: rgba(53, 92, 145, .2);
  background: linear-gradient(145deg, #edf3fa, #f8fbff);
  color: #24466f;
  box-shadow: inset 0 -2px 0 var(--kt-cycle-orange), 0 7px 18px -16px rgba(24, 49, 80, .5);
}

.kt-cycle-tab:focus-visible,
.kt-cycle-segment:focus-visible,
.kt-cycle-stage:focus-visible,
.kt-cycle-reset:focus-visible {
  outline: 3px solid rgba(53, 92, 145, .22);
  outline-offset: 2px;
}

.kt-cycle-tab__icon,
.kt-cycle-context__icon {
  display: grid;
  place-items: center;
  color: #41638c;
}

.kt-cycle-tab__icon {
  width: 27px;
  height: 27px;
  border: 1px solid #dde5ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 13px -10px rgba(20, 39, 64, .7);
}

.kt-cycle-tab__icon svg,
.kt-cycle-context__icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.kt-cycle-tab__label {
  min-width: 0;
  padding-right: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kt-cycle-tab:first-child .kt-cycle-tab__icon svg { fill: currentColor; stroke: none; }
.kt-cycle-tab__count {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #eef2f7;
  color: #78869a;
  font-size: .56rem;
}

.kt-cycle-tab.is-active .kt-cycle-tab__count { background: #fff; color: #294d79; }

.kt-cycle-body { padding: 10px 14px 12px; }

.kt-cycle-context {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(245, 248, 252, .88), rgba(255, 255, 255, .92)),
    radial-gradient(circle at 90% 50%, rgba(243, 161, 75, .12), transparent 18rem);
}

.kt-cycle-context__icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.kt-cycle-context__icon svg { width: 18px; height: 18px; }
.kt-cycle-context__copy { min-width: 0; }
.kt-cycle-context__eyebrow {
  color: #c1772f;
  font-size: .61rem;
  font-weight: 850;
  letter-spacing: .13em;
}

.kt-cycle-context h2 {
  margin: 2px 0 1px;
  color: var(--kt-cycle-ink);
  font-size: 1rem;
  font-weight: 820;
  letter-spacing: -.018em;
}

.kt-cycle-context p {
  margin: 0;
  color: var(--kt-cycle-muted);
  font-size: .75rem;
  line-height: 1.5;
}

.kt-cycle-context__metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 66px;
  padding: 3px 0 3px 10px;
  border-left: 1px solid rgba(255, 255, 255, .16);
}

.kt-cycle-context__metric strong { color: #fff; font-size: 1.08rem; line-height: 1; }
.kt-cycle-context__metric span { margin-top: 3px; color: rgba(225, 234, 246, .6); font-size: .55rem; text-transform: uppercase; letter-spacing: .07em; }

.kt-cycle-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 14px;
  margin-top: 0;
}

.kt-cycle-control-label {
  display: block;
  margin: 0 0 6px 2px;
  color: #7a879a;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kt-cycle-actors {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dce4ee;
  border-radius: 12px;
  background: #f1f5f9;
}

.kt-cycle-segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 35px;
  padding: 6px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #68778d;
  cursor: pointer;
  font: 750 .72rem var(--sans, "Segoe UI", system-ui, sans-serif);
  transition: color .16s ease, background .16s ease, box-shadow .16s ease;
}

.kt-cycle-segment:hover { color: #25496f; background: rgba(255, 255, 255, .68); }
.kt-cycle-segment.is-active {
  background: #fff;
  color: #234b79;
  box-shadow: 0 5px 14px -11px rgba(19, 42, 70, .85), inset 0 -2px 0 var(--kt-cycle-orange);
}

.kt-cycle-segment strong {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e5ebf2;
  color: #6f7e92;
  font-size: .61rem;
}

.kt-cycle-segment.is-active strong { background: #edf4fb; color: #315a88; }

.kt-cycle-results {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 35px;
  color: #77859a;
  font-size: .69rem;
  white-space: nowrap;
}

.kt-cycle-results strong { color: #244d7b; }
.kt-cycle-results__pulse {
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--kt-cycle-green);
  box-shadow: 0 0 0 4px rgba(22, 153, 107, .1);
}

.kt-cycle-reset {
  min-height: 35px;
  padding: 7px 12px;
  border: 1px solid #d5dfeb;
  border-radius: 10px;
  background: #fff;
  color: #3e5878;
  cursor: pointer;
  font: 750 .7rem var(--sans, "Segoe UI", system-ui, sans-serif);
}

.kt-cycle-reset:hover { border-color: #9fb1c8; background: #f7faff; }

.kt-cycle-stage-area {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #e7ecf2;
}

.kt-cycle-stage-area[hidden] { display: none; }
.kt-cycle-stages {
  display: flex;
  gap: 7px;
  padding: 1px 1px 3px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd6e3 transparent;
}

.kt-cycle-stage {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 5px 9px 5px 6px;
  border: 1px solid #dde5ef;
  border-radius: 10px;
  background: #fff;
  color: #5f6f85;
  cursor: pointer;
  font: 720 .69rem var(--sans, "Segoe UI", system-ui, sans-serif);
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.kt-cycle-stage:hover { border-color: #b5c5d8; color: #274d78; transform: translateY(-1px); }
.kt-cycle-stage.is-active { border-color: #365d8e; background: #edf4fb; color: #234a76; }
.kt-cycle-stage__step {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #eef2f7;
  color: #8190a4;
  font: 760 .61rem var(--mono, monospace);
}

.kt-cycle-stage.is-active .kt-cycle-stage__step { background: #355d8e; color: #fff; }
.kt-cycle-stage strong {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f0f3f7;
  color: #8190a4;
  font-size: .58rem;
}

.kt-cycle-empty-state {
  margin-top: 13px;
  padding: 18px;
  border: 1px dashed #cfdae7;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.kt-cycle-empty-state[hidden] { display: none; }
.kt-cycle-empty-state strong { display: block; color: var(--kt-cycle-ink); font-size: .82rem; }
.kt-cycle-empty-state span { color: var(--kt-cycle-muted); font-size: .72rem; }

.kt-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Operation visibility is controlled without changing Swagger's summary UI. */
.swagger-ui .opblock.kt-cycle-hidden,
.swagger-ui .opblock-tag-section.kt-cycle-empty { display: none !important; }

/* The workspace already owns discovery and search. Remove duplicated Swagger
   chrome, while keeping server selection and authorization fully available. */
#swagger-ui .information-container,
#swagger-ui .filter-container { display: none !important; }

#swagger-ui .swagger-ui .scheme-container {
  width: calc(100% - 52px);
  max-width: 1128px;
  margin: 8px auto 12px !important;
  padding: 8px 12px !important;
  border-radius: 12px;
}

#swagger-ui .swagger-ui .scheme-container .schemes.wrapper {
  width: 100%;
  max-width: none;
  padding: 0;
}

@media (max-width: 1100px) {
  .kt-cycle-tabs {
    display: flex;
    overflow-x: auto;
  }

  .kt-cycle-tab { flex: 0 0 122px; }
}

@media (max-width: 900px) {
  .kt-cycle-hero { grid-template-columns: 1fr; gap: 16px; }
  .kt-cycle-toolbar { grid-template-columns: 1fr auto; }
  .kt-cycle-toolbar > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .kt-cycle-workspace { margin-top: 10px; padding: 0 12px; }
  .kt-cycle-shell { border-radius: 17px; }
  .kt-cycle-hero { min-height: 0; padding: 20px 17px; }
  .kt-cycle-hero h1 { font-size: 1.35rem; }
  .kt-cycle-tabs { min-height: 58px; padding: 6px 7px; }
  .kt-cycle-tab { grid-template-columns: 27px minmax(0, 1fr); padding: 6px 7px; }
  .kt-cycle-tab__icon { width: 28px; height: 28px; }
  .kt-cycle-body { padding: 12px; }
  .kt-cycle-context { grid-template-columns: 42px minmax(0, 1fr); }
  .kt-cycle-context__icon { width: 42px; height: 42px; }
  .kt-cycle-context__metric { display: none; }
  .kt-cycle-context p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .kt-cycle-actors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .kt-cycle-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .kt-cycle-results { justify-content: center; }
  .kt-cycle-reset { width: 100%; }
  #swagger-ui .swagger-ui .scheme-container { width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  .kt-cycle-workspace *,
  .kt-cycle-workspace *::before,
  .kt-cycle-workspace *::after { scroll-behavior: auto !important; transition: none !important; }
}
