:root {
  --pm-bg: #1a1a1a;
  --pm-surface: #252525;
  --pm-surface2: #2e2e2e;
  --pm-border: rgba(255, 255, 255, 0.08);
  --pm-text: #f2f2f2;
  --pm-muted: #a3a3a3;
  --pm-orange: #ff6c37;
  --pm-orange-dim: #e85d2d;
  --pm-orange-glow: rgba(255, 108, 55, 0.25);
  --danger: #f87171;
  --radius: 8px;
  --radius-lg: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--pm-bg);
  color: var(--pm-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ——— Global scrollbar (dark theme) ——— */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.24) rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.3));
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

a {
  color: var(--pm-orange);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ——— App shell (Postman-like) ——— */
.logo {
  font-weight: 700;
  color: var(--pm-text);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark,
.auth-brand-mark {
  width: 34px;
  height: 34px;
  display: inline-block;
  object-fit: contain;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--pm-text);
  letter-spacing: 0.01em;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--pm-surface);
  border-bottom: 1px solid var(--pm-border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.nav-user {
  color: var(--pm-muted);
  font-size: 0.85rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav a {
  color: var(--pm-muted);
}

.nav a:hover {
  color: var(--pm-text);
}

.btn-nav {
  background: var(--pm-orange);
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.875rem;
}

.btn-nav:hover {
  background: var(--pm-orange-dim);
  text-decoration: none !important;
}

.link-btn {
  background: none;
  border: none;
  color: var(--pm-muted);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  color: var(--pm-text);
  text-decoration: underline;
}

.main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.hero-pm .hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pm-orange);
  margin-bottom: 0.75rem;
}

.hero-pm h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.hero-lead {
  color: var(--pm-muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.muted {
  color: var(--pm-muted);
}

.muted.small {
  font-size: 0.875rem;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--pm-border);
  background: transparent;
  color: var(--pm-text);
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.btn.primary {
  background: var(--pm-orange);
  border-color: var(--pm-orange);
  color: #fff;
  font-weight: 600;
}

.btn.primary:hover {
  background: var(--pm-orange-dim);
  border-color: var(--pm-orange-dim);
  text-decoration: none;
}

.btn.primary.pm {
  padding: 0.65rem 1.35rem;
}

.btn.full {
  width: 100%;
}

.card {
  background: var(--pm-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--pm-border);
}

.pm-card-head h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.pm-outline {
  margin-top: 1rem;
  border-color: var(--pm-orange);
  color: var(--pm-orange);
}

.pm-outline:hover {
  background: rgba(255, 108, 55, 0.1);
}

.code {
  background: var(--pm-bg);
  padding: 1rem;
  border-radius: var(--radius);
  overflow: auto;
  font-size: 0.8rem;
  border: 1px solid var(--pm-border);
}

code {
  font-size: 0.9em;
  color: var(--pm-orange);
}

/* ——— Auth (login) full-page ——— */
.auth-body {
  min-height: 100vh;
  position: relative;
}

.auth-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--pm-orange-glow), transparent),
    var(--pm-bg);
  pointer-events: none;
  z-index: 0;
}

.auth-frame {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--pm-text);
  font-weight: 700;
  text-decoration: none;
}

.auth-brand:hover {
  text-decoration: none;
  opacity: 0.9;
}

.auth-brand-text {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.auth-back-link {
  font-size: 0.85rem;
  color: var(--pm-muted);
}

.auth-back-link:hover {
  color: var(--pm-text);
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.5rem;
}

.auth-card {
  width: 100%;
  background: var(--pm-surface);
  border: 1px solid var(--pm-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.auth-card-head {
  margin-bottom: 1.75rem;
}

.auth-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--pm-muted);
  line-height: 1.45;
}

.auth-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.auth-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pm-surface2);
  border: 1px solid var(--pm-border);
}

.auth-step-dot.is-active {
  background: var(--pm-orange);
  border-color: var(--pm-orange);
  box-shadow: 0 0 10px var(--pm-orange-glow);
}

.auth-step-line {
  flex: 1;
  max-width: 48px;
  height: 2px;
  background: var(--pm-border);
  border-radius: 1px;
}

.auth-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pm-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--pm-border);
  background: var(--pm-bg);
  color: var(--pm-text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--pm-orange);
  box-shadow: 0 0 0 3px var(--pm-orange-glow);
}

.auth-input-mono {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.95rem;
}

.auth-input-code {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  font-weight: 600;
}

.auth-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--pm-muted);
}

.auth-error {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--danger);
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.05s;
}

.auth-btn:active {
  transform: scale(0.99);
}

.auth-btn-primary {
  background: var(--pm-orange);
  color: #fff;
}

.auth-btn-primary:hover {
  background: var(--pm-orange-dim);
}

.auth-btn-telegram {
  background: #2aabee;
  color: #fff;
  text-decoration: none;
  margin-top: 0.75rem;
}

.auth-btn-telegram:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.auth-btn-ghost {
  background: var(--pm-surface2);
  color: var(--pm-text);
  border: 1px solid var(--pm-border);
}

.auth-btn-ghost:hover {
  background: #363636;
}

.auth-btn-text {
  background: transparent;
  color: var(--pm-muted);
  font-weight: 500;
  margin-top: 0.5rem;
}

.auth-btn-text:hover {
  color: var(--pm-text);
}

.auth-telegram-block {
  text-align: center;
  padding: 0.25rem 0 0.5rem;
}

.auth-telegram-icon {
  color: #2aabee;
  margin: 0 auto 1rem;
  display: flex;
  justify-content: center;
}

.auth-telegram-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.auth-telegram-text {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--pm-muted);
  line-height: 1.5;
}

.auth-warn {
  font-size: 0.85rem;
  color: var(--danger);
}

.auth-panel {
  margin-top: 0.25rem;
}

/* ——— App layout (workspace full bleed) ——— */
body.layout-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main.main--full {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ——— Workspace (VS Code–style explorer + Postman) ——— */
.ws-app {
  --ws-sidebar-pct: 15;
  display: flex;
  flex: 1;
  min-height: calc(100vh - 57px);
  background: var(--pm-bg);
}

.ws-sidebar {
  width: calc(var(--ws-sidebar-pct) * 1%);
  min-width: 15%;
  max-width: 70%;
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  border-right: 1px solid var(--pm-border);
  color: #ccc;
}

.ws-sidebar-resizer {
  flex: 0 0 6px;
  cursor: col-resize;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 2;
}

.ws-sidebar-resizer:hover,
.ws-sidebar-resizer.is-dragging {
  background: rgba(255, 108, 55, 0.45);
}

.ws-sidebar-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--pm-border);
}

.ws-sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ws-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.ws-toolbar {
  display: flex;
  gap: 2px;
}

.ws-toolbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #aaa;
  cursor: pointer;
}

.ws-toolbtn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--pm-text);
}

.ws-toolbtn svg {
  transition: transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.15s ease;
  opacity: 0.92;
}

.ws-toolbtn:hover svg {
  transform: scale(1.08);
  opacity: 1;
}

.ws-toolbtn:active svg {
  transform: scale(0.94);
}

.ws-sidebar-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #666;
}

.ws-drop-root {
  margin: 0 8px;
  padding: 6px 8px;
  font-size: 11px;
  text-align: center;
  color: var(--pm-orange);
  border: 1px dashed rgba(255, 108, 55, 0.45);
  border-radius: 4px;
  background: rgba(255, 108, 55, 0.06);
}

.ws-drop-root--active {
  background: rgba(255, 108, 55, 0.15);
}

.ws-tree-scroll {
  flex: 1;
  overflow: auto;
  padding: 4px 0 8px;
  min-height: 120px;
  position: relative;
}

.ws-tree {
  user-select: none;
  font-size: 13px;
}

.ws-tree-loading {
  position: absolute;
  left: 12px;
  top: 12px;
  font-size: 12px;
  color: #888;
}

.ws-tree-empty {
  padding: 24px 16px;
  text-align: center;
  color: #888;
}

.ws-tree-empty p {
  margin: 0 0 6px;
  font-weight: 600;
  color: #aaa;
}

.ws-tree-empty-hint {
  font-size: 12px;
  line-height: 1.4;
}

.ws-sidebar-footer {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--pm-border);
  font-size: 11px;
  color: #777;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ws-selection-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  line-height: 1.3;
}

.ws-selection-label .ws-sel-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.95;
}

.ws-selection-label .ws-sel-icon .ws-svg-icon {
  display: block;
}

.ws-selection-label .ws-sel-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-clipboard-hint {
  font-size: 10px;
  color: var(--pm-orange);
  opacity: 0.95;
  line-height: 1.35;
}

.ws-shortcuts-hint {
  font-size: 10px;
  color: #555;
  line-height: 1.35;
}

.ws-node {
  position: relative;
}

.ws-node--expanded>.ws-children {
  animation: wsChildrenReveal 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes wsChildrenReveal {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ws-children {
  position: relative;
}

.ws-row {
  --d: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 8px 2px calc(8px + var(--d) * 12px);
  margin: 0 4px;
  border-radius: 4px;
  cursor: pointer;
  color: #ccc;
}

.ws-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ws-row.is-selected {
  background: rgba(255, 108, 55, 0.12);
  color: var(--pm-text);
}

.ws-row.is-dragging {
  opacity: 0.45;
}

.ws-row.ws-drop-target {
  box-shadow: inset 0 0 0 1px var(--pm-orange);
  background: rgba(255, 108, 55, 0.08);
}

.ws-row.is-cut {
  opacity: 0.62;
  outline: 1px dashed rgba(255, 108, 55, 0.45);
  outline-offset: -1px;
}

.ws-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8f8f8f;
  border-radius: 3px;
}

.ws-chevron:hover {
  color: #ccc;
  background: rgba(255, 255, 255, 0.06);
}

.ws-chevron-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(0deg);
}

.ws-chevron-inner.is-expanded {
  transform: rotate(90deg);
}

.ws-chevron-svg {
  display: block;
}

.ws-chevron--hidden {
  visibility: hidden;
  pointer-events: none;
}

.ws-icon-wrap {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ws-row--folder.is-open .ws-icon-wrap {
  transform: scale(1.04);
  filter: drop-shadow(0 1px 3px rgba(240, 176, 74, 0.25));
}

.ws-svg-icon {
  display: block;
  flex-shrink: 0;
}

.ws-icon-wrap--folder {
  color: #e8a040;
}

.ws-icon-wrap--file {
  width: 48px;
  justify-content: flex-start;
}

.ws-method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 42px;
  height: 18px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: transparent;
  border: none;
}

.ws-method-get {
  color: #7ee2a8;
}

.ws-method-post {
  color: #ffd27d;
}

.ws-method-put {
  color: #93c5fd;
}

.ws-method-patch {
  color: #c4b5fd;
}

.ws-method-delete {
  color: #fca5a5;
}

.ws-method-head,
.ws-method-options {
  color: #d1d5db;
}

.ws-placeholder--min {
  min-height: min(50vh, 320px);
  width: 100%;
  max-width: 400px;
}

.auth-topbar--min {
  justify-content: center;
  margin-bottom: 1rem;
}

.auth-card-head--min .auth-title {
  text-align: center;
}

.auth-card-head--min .auth-steps {
  justify-content: center;
}

.ws-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.12s;
}

.ws-row:hover .ws-actions {
  opacity: 1;
}

.ws-action {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: #888;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-action svg {
  display: block;
  opacity: 0.9;
}

.ws-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--pm-text);
}

.ws-action--danger:hover {
  color: var(--danger);
}

.ws-action--lock,
.ws-action--lock:disabled {
  color: #fbbf24;
  opacity: 0.95;
  cursor: not-allowed;
}

.ws-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--pm-bg);
  position: relative;
}

/* Bir vaqtda faqat bittasi ko‘rinadi; oralig‘da hammasi yashirinib qolmaydi */
.ws-main>.ws-main-inner {
  position: absolute;
  inset: 0;
  min-height: 0;
  overflow: auto;
  padding: 2rem;
}

.ws-main>.ws-main-inner[hidden] {
  display: none !important;
  pointer-events: none;
}

#ws-main-empty:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

#ws-main-empty:not([hidden]) .ws-placeholder {
  margin: 0 auto;
}

#ws-main-folder:not([hidden]) {
  display: block;
  z-index: 2;
}

#ws-request-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.ws-placeholder {
  max-width: 400px;
  margin: 10vh auto 0;
  text-align: center;
}

.ws-placeholder-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 108, 55, 0.2), rgba(255, 108, 55, 0.05));
  border: 1px solid rgba(255, 108, 55, 0.25);
}

.ws-placeholder-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pm-text);
}

.ws-placeholder-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--pm-muted);
  line-height: 1.5;
}

.ws-main-detail {
  max-width: 560px;
}

.ws-detail-head {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--pm-border);
}

.ws-detail-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pm-orange);
}

.ws-detail-name {
  margin: 0.35rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ws-detail-meta {
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.ws-detail-meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pm-muted);
  margin-bottom: 0.2rem;
}

.ws-detail-meta dd {
  margin: 0;
  font-size: 0.9rem;
}

.ws-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  word-break: break-all;
}

.ws-dialog {
  border: 1px solid var(--pm-border);
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--pm-surface);
  color: var(--pm-text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  max-width: 400px;
  width: calc(100vw - 2rem);
}

.ws-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.ws-dialog-form {
  padding: 1.25rem 1.35rem;
}

.ws-dialog-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.ws-dialog-context {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--pm-muted);
}

.ws-dialog-context:empty {
  display: none;
  margin: 0;
}

.ws-dialog-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pm-muted);
  margin-bottom: 0.35rem;
}

.ws-dialog-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--pm-border);
  background: var(--pm-bg);
  color: var(--pm-text);
  font: inherit;
  margin-bottom: 1rem;
}

.ws-dialog-input:focus {
  outline: none;
  border-color: var(--pm-orange);
  box-shadow: 0 0 0 2px var(--pm-orange-glow);
}

.ws-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ws-dialog-btn {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--pm-border);
  background: transparent;
  color: var(--pm-text);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.ws-dialog-btn-primary {
  background: var(--pm-orange);
  border-color: var(--pm-orange);
  color: #fff;
  font-weight: 600;
}

.ws-dialog-btn-primary:hover {
  background: var(--pm-orange-dim);
}

.ws-dialog-btn-danger {
  border-color: rgba(248, 113, 113, 0.5);
  color: var(--danger);
}

.ws-dialog-btn-danger:hover {
  background: rgba(248, 113, 113, 0.12);
}

.ws-dialog-warning {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--pm-muted);
  line-height: 1.45;
}

.ws-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  background: var(--pm-surface2);
  border: 1px solid var(--pm-border);
  color: var(--pm-text);
  font-size: 0.875rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ws-toast--err {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--danger);
}

.ws-context-menu {
  position: fixed;
  z-index: 1200;
  min-width: 170px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--pm-border);
  background: #262626;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ws-context-menu[hidden] {
  display: none !important;
}

.ws-context-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #ddd;
  text-align: left;
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ws-context-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ws-context-item--danger:hover {
  background: rgba(248, 113, 113, 0.14);
  color: var(--danger);
}

/* ——— Postman-style request builder ——— */
.ws-request-root.ws-main-inner {
  flex: unset;
  padding: 0;
  overflow: hidden;
}

.pm-req-top {
  flex-shrink: 0;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--pm-border);
  background: var(--pm-surface);
}

.pm-req-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pm-req-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--pm-orange);
  opacity: 0.9;
}

.pm-req-filename {
  font-size: 14px;
  font-weight: 600;
  color: var(--pm-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-url-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--pm-border);
  background: var(--pm-bg);
}

.pm-method {
  flex-shrink: 0;
  width: 108px;
  padding: 0 8px;
  border: none;
  border-right: 1px solid var(--pm-border);
  background: var(--pm-surface2);
  color: #c4e88d;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pm-method option {
  background: #1f1f1f;
  color: #d4d4d4;
  font-weight: 700;
}

.pm-method option[value='GET'] {
  color: #7ee2a8;
}

.pm-method option[value='POST'] {
  color: #ffd27d;
}

.pm-method option[value='PUT'] {
  color: #93c5fd;
}

.pm-method option[value='PATCH'] {
  color: #c4b5fd;
}

.pm-method option[value='DELETE'] {
  color: #fca5a5;
}

.pm-method.pm-method-get {
  color: #7ee2a8;
}

.pm-method.pm-method-post {
  color: #ffd27d;
}

.pm-method.pm-method-put {
  color: #93c5fd;
}

.pm-method.pm-method-patch {
  color: #c4b5fd;
}

.pm-method.pm-method-delete {
  color: #fca5a5;
}

.pm-method:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--pm-orange);
}

.pm-url-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: transparent;
  caret-color: var(--pm-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: inherit;
  line-height: 1.2;
  letter-spacing: inherit;
  font-size: 13px;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  display: block;
}

.pm-url-input:focus {
  outline: none;
}

.pm-url-input::placeholder {
  color: transparent;
}

.pm-url-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.pm-url-preview {
  position: absolute;
  inset: 0;
  padding: 10px 12px;
  pointer-events: none;
  z-index: 1;
  color: var(--pm-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: inherit;
  line-height: 1.2;
  letter-spacing: inherit;
  white-space: pre;
  overflow: hidden;
  text-overflow: clip;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.pm-url-var-ok {
  color: #60a5fa;
}

.pm-url-var-miss {
  color: #f87171;
}

.pm-send {
  flex-shrink: 0;
  padding: 0 22px;
  border: none;
  background: var(--pm-orange);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pm-send:hover {
  background: var(--pm-orange-dim);
}

.pm-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pm-body-split {
  --pm-left-pct: 52;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pm-splitter {
  display: none;
  flex: 0 0 6px;
  cursor: col-resize;
  background: rgba(255, 255, 255, 0.06);
  align-self: stretch;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.pm-splitter:hover,
.pm-splitter.is-dragging {
  background: rgba(255, 108, 55, 0.45);
}

@media (min-width: 960px) {
  .pm-body-split {
    flex-direction: row;
    align-items: stretch;
  }

  .pm-splitter {
    display: block;
  }

  #pm-editor {
    flex: 0 0 calc(var(--pm-left-pct) * 1%);
    width: calc(var(--pm-left-pct) * 1%);
    min-width: 160px;
    max-width: calc(100% - 166px);
    border-right: none;
    border-bottom: none;
  }

  #pm-response {
    flex: 1 1 auto;
    min-width: 160px;
  }
}

.pm-editor {
  flex: 1 1 50%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--pm-border);
  background: var(--pm-bg);
}

.pm-subtabs {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--pm-border);
  background: var(--pm-surface);
}

.pm-subtab {
  padding: 10px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--pm-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pm-subtab:hover {
  color: var(--pm-text);
}

.pm-subtab.is-active {
  color: var(--pm-orange);
  border-bottom-color: var(--pm-orange);
}

.pm-subpane {
  flex: 1;
  min-height: 140px;
  overflow: auto;
  padding: 12px 16px 16px;
}

.pm-subpane[hidden] {
  display: none !important;
}

.pm-kv-head {
  display: grid;
  grid-template-columns: 28px 1fr 1fr 32px;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 6px;
  padding: 0 2px;
}

.pm-kv-row {
  display: grid;
  grid-template-columns: 28px 1fr 1fr 32px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

/* O'chirilgan (unchecked) query/header row biroz xira ko'rinsin */
.pm-kv-row:has(.pm-kv-en:not(:checked)) {
  opacity: 0.52;
}

.pm-kv-row:has(.pm-kv-en:not(:checked)) input[type='text'] {
  color: #8b8b8b;
  border-color: rgba(255, 255, 255, 0.08);
}

.pm-kv-row input[type='text'] {
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--pm-border);
  background: var(--pm-surface2);
  color: var(--pm-text);
  font: inherit;
  font-size: 12px;
}

.pm-kv-row input[type='text']:focus {
  outline: none;
  border-color: rgba(255, 108, 55, 0.45);
}

.pm-kv-en {
  width: 16px;
  height: 16px;
  margin: 0 auto;
  cursor: pointer;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  background: transparent;
  position: relative;
}

.pm-kv-en:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--pm-orange);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.pm-kv-en:focus-visible {
  outline: 1px solid rgba(255, 108, 55, 0.55);
  outline-offset: 1px;
}

.pm-kv-del {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #888;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.pm-kv-del:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.08);
}

.pm-add-row {
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px dashed var(--pm-border);
  background: transparent;
  color: var(--pm-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pm-add-row:hover {
  color: var(--pm-orange);
  border-color: rgba(255, 108, 55, 0.35);
}

.pm-body-types {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--pm-muted);
}

.pm-body-types .pm-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.pm-body-types input {
  accent-color: var(--pm-orange);
}

.pm-json-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 8px;
}

.pm-json-toolbar[hidden] {
  display: none !important;
}

.pm-json-tool {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--pm-border);
  background: var(--pm-surface2);
  color: var(--pm-text, #e4e4e7);
  cursor: pointer;
}

.pm-json-tool:hover {
  border-color: rgba(255, 108, 55, 0.45);
}

.pm-joi-dialog {
  width: min(980px, 98vw);
  max-width: 98vw;
}

.pm-joi-form {
  width: min(940px, 95vw);
  min-width: min(940px, 95vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-joi-input {
  width: 100%;
  min-height: 420px;
  max-height: 70vh;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--pm-border);
  background: #161616;
  color: #d4d4d4;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.pm-vars-dialog {
  width: min(820px, 98vw);
  max-width: 98vw;
}

.pm-vars-form {
  width: min(780px, 95vw);
  min-width: min(780px, 95vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-vars-list {
  max-height: 48vh;
  overflow: auto;
}

.pm-query-tools {
  margin: 0 0 8px;
}

.pm-json-toolbar-hint {
  font-size: 11px;
  color: #777;
  margin-left: 4px;
}

.pm-body-raw {
  width: 100%;
  min-height: 160px;
  flex: 1;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--pm-border);
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.pm-body-raw:focus {
  outline: none;
  border-color: rgba(255, 108, 55, 0.45);
}

.pm-body-raw.pm-body-raw--invalid {
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.pm-pane-hint {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #777;
}

.pm-json-error {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  font-size: 12px;
  font-family: ui-monospace, monospace;
  line-height: 1.45;
}

.pm-body-raw--json {
  tab-size: 2;
}

.pm-body-raw.pm-body-raw--hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
  resize: none;
}

.pm-json-editor-mount:not([hidden]) {
  display: block;
  width: 100%;
  margin-top: 0;
}

.pm-json-editor-mount .CodeMirror {
  min-height: 220px;
  height: auto;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 6px;
  border: 1px solid var(--pm-border);
}

.pm-json-editor-mount .CodeMirror-scroll {
  min-height: 220px;
}

.pm-cm-wrap--invalid .CodeMirror {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.pm-multipart-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-mp-row {
  display: grid;
  grid-template-columns: 1fr 100px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--pm-border);
  background: var(--pm-surface2);
}

@media (max-width: 700px) {
  .pm-mp-row {
    grid-template-columns: 1fr;
  }
}

.pm-mp-row input[type='text'],
.pm-mp-row select {
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--pm-border);
  background: var(--pm-bg);
  color: var(--pm-text);
  font: inherit;
  font-size: 12px;
}

.pm-mp-file {
  font-size: 11px;
}

.pm-mp-fname {
  font-size: 11px;
  color: var(--pm-muted);
  margin-top: 4px;
  word-break: break-all;
}

.pm-response {
  flex: 1 1 50%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #141414;
}

.pm-res-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11.5px 16px;
  border-bottom: 1px solid var(--pm-border);
  background: var(--pm-surface);
}

.pm-res-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #888;
}

.pm-res-meta {
  font-size: 12px;
  color: var(--pm-muted);
  text-align: right;
}

.pm-res-meta strong {
  color: #89d185;
  font-weight: 600;
}

.pm-res-meta strong.pm-status-bad {
  color: var(--danger);
}

.pm-restabs {
  display: flex;
  flex-shrink: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--pm-border);
  gap: 0;
}

.pm-restab {
  padding: 8px 12px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--pm-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.pm-restab.is-active {
  color: var(--pm-text);
  border-bottom-color: var(--pm-orange);
}

.pm-res-pre {
  flex: 1;
  margin: 0;
  min-height: 120px;
  padding: 12px 16px;
  overflow: auto;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #ccc;
  white-space: pre-wrap;
  word-break: break-word;
  background: #141414;
}

.pm-res-pre[hidden] {
  display: none !important;
}

.pm-res-json {
  flex: 1;
  margin: 0;
  min-height: 120px;
  padding: 12px 16px;
  overflow: auto;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  background: #141414;
}

.pm-res-json[hidden] {
  display: none !important;
}

.pm-res-json .j-key {
  color: #9cdcfe;
}

.pm-res-json .j-str {
  color: #ce9178;
}

.pm-res-json .j-num {
  color: #b5cea8;
}

.pm-res-json .j-bool,
.pm-res-json .j-null {
  color: #569cd6;
}

.pm-jtree {
  counter-reset: pmjline;
  white-space: pre;
}

.pm-jline {
  display: grid;
  grid-template-columns: 42px 14px 1fr;
  align-items: start;
}

.pm-jnum {
  color: #5f6368;
  user-select: none;
  text-align: right;
  padding-right: 8px;
  display: block;
}

.pm-jnum::before {
  counter-increment: pmjline;
  content: counter(pmjline);
}

.pm-jtgl-col {
  width: 12px;
  color: #8a8a8a;
  text-align: center;
  user-select: none;
  line-height: 1.2;
}

.pm-jtgl {
  cursor: pointer;
}

.pm-jline:not(.pm-jsummary) .pm-jtgl-col {
  color: transparent;
}

.pm-jsummary .pm-jtgl-col {
  color: #8a8a8a;
}

.pm-jsummary .pm-jtgl {
  display: inline-block;
}

.pm-jsummary .pm-jtgl::before {
  content: '▾';
}

.pm-jnode:not([open]) > .pm-jsummary .pm-jtgl::before {
  content: '▸';
}

.pm-jtgl::before {
  font-size: 11px;
}

.pm-jline .pm-jcode {
  min-width: 0;
}

.pm-jcode {
  color: #d4d4d4;
  display: block;
  padding-left: calc(var(--d, 0) * 16px);
  white-space: nowrap;
}

.pm-jnode {
  display: block;
}

.pm-jnode > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.pm-jnode > summary::-webkit-details-marker {
  display: none;
}

.pm-jnode[open] > .pm-jsummary .pm-j-closed {
  display: none;
}

.pm-jnode:not([open]) > .pm-jsummary .pm-j-open {
  display: none;
}

.pm-jchildren {
  display: block;
}

.pm-jnode:not([open]) > .pm-jchildren {
  display: none;
}

.pm-jsummary .pm-jcode {
  white-space: nowrap;
}

.pm-jsummary .j-key {
  display: inline;
}

.pm-jcount {
  color: #8b949e;
}

.pm-res-headers-wrap {
  flex: 1;
  min-height: 120px;
  overflow: auto;
  padding: 8px 12px;
}

.pm-res-headers-wrap[hidden] {
  display: none !important;
}

.pm-res-h-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pm-res-h-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--pm-border);
  vertical-align: top;
}

.pm-res-h-table td:first-child {
  color: #9cdcfe;
  width: 38%;
  font-weight: 600;
}

.pm-res-h-table td:last-child {
  color: #ce9178;
  word-break: break-all;
}