/* =========================================================
   YAML Viewer & API-Tester – Styles (Basis: assets/css/tool-ui.css)
   ========================================================= */
.yv { display: grid; gap: 18px; }
.yv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; }
.yv-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yv-samples .tu-label { margin: 0 4px 0 0; }
.yv-toolbar__end { margin-left: auto; }
.yv-file { position: relative; cursor: pointer; }
.yv-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.yv-file:focus-within { outline: 2px solid #8fa8ff; outline-offset: 2px; }

.yv-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.yv-pane { display: flex; flex-direction: column; min-width: 0; }
.yv-pane + .yv-pane { margin-top: 0; }
.yv-meta { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Editor mit Zeilennummern */
.yv-editor { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); height: 560px; border-radius: 14px; overflow: hidden; background: #fff; border: 1.5px solid rgba(15,19,48,.12); transition: border-color .25s, box-shadow .25s; }
.yv-editor:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(91,140,255,.15); }
.yv-editor.is-drop { border-color: var(--violet); border-style: dashed; background: rgba(155,123,255,.05); }
.yv-gutter, .yv-editor textarea { font-family: var(--mono); font-size: 13.5px; line-height: 1.6; padding: 14px 0; }
.yv-gutter { padding-top: 0; padding-bottom: 0; }
.yv-gutter { overflow: hidden; white-space: pre; text-align: right; min-width: 46px; padding-left: 10px; padding-right: 10px; color: #a3a8c3; background: #f7f8fc; border-right: 1px solid rgba(15,19,48,.06); user-select: none; }
.yv-gutter b { display: inline-block; margin: 0 -10px; padding: 0 10px; color: #fff; background: var(--err); border-radius: 0 6px 6px 0; font-weight: 700; }
.yv-gutter i { font-style: normal; display: inline-block; margin: 0 -10px; padding: 0 10px; color: #8a4a12; background: rgba(232,150,72,.22); border-radius: 0 6px 6px 0; }
.yv-editor textarea { width: 100%; height: 100%; padding-left: 14px; padding-right: 14px; border: 0; outline: 0; resize: none; white-space: pre; overflow: auto; color: var(--ink); background: transparent; tab-size: 2; }

/* Status */
.yv-status { margin-top: 14px; }
.yv-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yv-ok .tu-checks { flex-basis: 100%; margin-top: 4px; }
.yv-badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: rgba(15,19,48,.06); text-decoration: none; }
.yv-badge--ok { color: #0f7a52; background: rgba(34,192,140,.14); }
.yv-badge--err { color: #fff; background: var(--err); }
.yv-badge--warn { color: #a8561a; background: rgba(240,160,75,.18); }
.yv-badge--api { color: #fff; background: var(--grad); }
.yv-error { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: rgba(209,52,56,.06); border: 1px solid rgba(209,52,56,.25); }
.yv-error__head { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.yv-error p { margin: 0; font-size: 14px; color: var(--text); }
.yv-error .yv-hint { font-size: 13.5px; color: var(--muted); }
.yv-snippet { margin: 0; padding: 10px 12px; border-radius: 10px; overflow-x: auto; font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--ink); background: #fff; border: 1px solid rgba(209,52,56,.2); }
.yv-snippet b { color: var(--err); }
.yv-link { padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--blue); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.yv-warns li[hidden] { display: none; }
.yv.is-stale .yv-pane:last-child .tu-pre, .yv.is-stale .yv-tree { opacity: .5; }

/* Ansicht */
.yv-outhead { margin-bottom: 12px; flex-wrap: wrap; }
.yv-tabs { margin: 0; padding: 0; border: 0; }
.yv-doc .tu-select { width: auto; padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.yv-doc[hidden] { display: none; }
.yv-outbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.yv-pre { height: 470px; max-height: none; }
.yv-outnote { margin: 8px 0 0; }
.yv-empty { color: #8f96b8; font-style: italic; font-size: 13.5px; }
.tu-pre .j-key { color: #82aaff; } .tu-pre .j-str { color: #c3e88d; } .tu-pre .j-num { color: #f78c6c; }
.tu-pre .j-bool { color: #c792ea; } .tu-pre .j-null { color: #ff9aa8; }
.tu-pre .y-anchor { color: #ffcb6b; } .tu-pre .y-alias { color: #ffcb6b; font-style: italic; } .tu-pre .y-tag { color: #89ddff; }
.tu-pre .y-ind, .tu-pre .y-dash, .tu-pre .y-doc { color: #89ddff; }
.yv-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.yv-stats b { color: var(--ink); }

/* Baum */
.yv-path { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 10px 8px 14px; border-radius: 12px; background: rgba(15,19,48,.04); }
.yv-path code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13px; color: var(--violet); }
.yv-mini { padding: 5px 10px; font-size: 12px; }
.yv-mini[hidden] { display: none; }
.yv-tree { height: 510px; overflow: auto; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1px solid rgba(15,19,48,.08); font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.yv-tree summary { cursor: pointer; list-style: none; border-radius: 6px; padding: 0 4px; }
.yv-tree summary::-webkit-details-marker { display: none; }
.yv-tree summary::before { content: "▸"; display: inline-block; width: 14px; color: var(--muted); transition: transform .2s; }
.yv-tree details[open] > summary::before { transform: rotate(90deg); }
.yt-kids { margin-left: 9px; padding-left: 12px; border-left: 1px dashed rgba(15,19,48,.15); }
.yt-leaf { padding: 0 4px 0 18px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.yt-leaf:hover, .yv-tree summary:hover { background: rgba(91,140,255,.07); }
.yt-leaf.is-sel, .yv-tree summary.is-sel { background: rgba(91,140,255,.16); }
.yt-key { color: #3b5bdb; font-weight: 600; }
.yt-root { color: var(--violet); }
.yt-merge { color: #b45309; }
.yt-idx { color: var(--muted); }
.yt-colon { color: var(--muted); }
.yt-badge { margin-left: 8px; padding: 1px 7px; border-radius: 6px; font-family: Inter, sans-serif; font-size: 11px; font-weight: 600; color: var(--muted); background: rgba(15,19,48,.05); white-space: nowrap; }
.yt-anchor, .yt-alias { color: #a16207; background: rgba(234,179,8,.14); }
.yt-tag { color: #0e7490; background: rgba(6,182,212,.12); }
.yt-empty { margin-left: 6px; color: var(--muted); font-style: italic; font-family: Inter, sans-serif; font-size: 12px; }
.yv-tree .j-str { color: #2f7d32; } .yv-tree .j-num { color: #c2410c; } .yv-tree .j-bool { color: #7c3aed; } .yv-tree .j-null { color: #be123c; }
.yt-more { margin: 4px 0 4px 18px; padding: 4px 10px; border: 1px dashed rgba(15,19,48,.2); border-radius: 8px; background: none; font: 600 12px Inter, sans-serif; color: var(--blue); cursor: pointer; }

/* ---------- API-Tester ---------- */
.yv-api .tu-card__head { flex-wrap: wrap; }
.yv-apiinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.yv-apidesc { margin: 0 0 14px; font-size: 14px; }
.yv-apidesc summary, .yv-opdesc summary, .yv-more > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--blue); }
.yv-text { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.yv-text p { margin: 0 0 8px; }
.yv-text code, .yv-param code, .tu-hint code { font-family: var(--mono); font-size: .92em; padding: 1px 5px; border-radius: 5px; background: rgba(15,19,48,.06); }
.yv-conn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.yv-server { margin: 0; }
.yv-conn:has(> .yv-auth[hidden]) { grid-template-columns: minmax(0, 1fr); }
.yv-conn:has(> .yv-auth[hidden]) .yv-server { max-width: 640px; }
.yv-serverrow { display: grid; gap: 8px; }
.yv-serverrow select[hidden] { display: none; }
.yv-vars { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.yv-vars[hidden] { display: none; }
.yv-var { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.yv-var .tu-input, .yv-var .tu-select { width: auto; min-width: 120px; padding-top: 6px; padding-bottom: 6px; }
#yvBaseHint { margin: 6px 0 0; color: #a8561a; }
#yvBaseHint[hidden] { display: none; }
.yv-auth { padding: 12px 14px; border-radius: 14px; background: rgba(15,19,48,.03); border: 1px solid rgba(15,19,48,.07); }
.yv-auth[hidden] { display: none; }
.yv-auth .tu-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.yv-auth .tu-label .i { width: 15px; height: 15px; }
.yv-auth small { font-weight: 500; color: var(--muted); }
.yv-authgrid { display: grid; gap: 12px; }
.yv-scheme { margin: 0; padding: 10px 12px; border: 1px solid rgba(15,19,48,.08); border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 12px; background: #fff; }
.yv-scheme legend { padding: 0 4px; font-size: 13px; color: var(--ink); }
.yv-scheme legend small { font-weight: 500; color: var(--muted); }
.yv-scheme .tu-field { margin: 0; }
.yv-scheme .tu-hint { grid-column: 1 / -1; margin: 0; }

.yv-apilayout { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: 18px; align-items: start; }
.yv-ops { display: grid; gap: 8px; position: sticky; top: 90px; }
.yv-oplist { max-height: 640px; overflow: auto; padding-right: 4px; display: grid; gap: 12px; align-content: start; }
.yv-grouphead { position: sticky; top: 0; z-index: 1; padding: 4px 2px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #fcfcfe; }
.yv-grouphead small { font-weight: 600; opacity: .7; }
.yv-group { display: grid; gap: 4px; }
.yv-opbtn { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 8px; align-items: start; width: 100%; padding: 7px 8px; border: 1px solid transparent; border-radius: 10px; background: none; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.yv-opbtn:hover { background: rgba(91,140,255,.06); }
.yv-opbtn.is-sel { background: rgba(91,140,255,.1); border-color: rgba(91,140,255,.35); }
.yv-opbtn.is-old code { text-decoration: line-through; opacity: .7; }
.yv-opbtn__text { min-width: 0; display: grid; gap: 1px; }
.yv-opbtn code { font-family: var(--mono); font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }
.yv-opbtn small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yv-m { display: inline-block; min-width: 58px; padding: 3px 0; border-radius: 6px; text-align: center; font: 800 11px/1.3 var(--mono); letter-spacing: .02em; color: #fff; background: #8f96b8; }
.yv-m--get { background: #3b82f6; } .yv-m--post { background: #16a34a; } .yv-m--put { background: #d97706; } .yv-m--patch { background: #0d9488; } .yv-m--delete { background: #dc2626; } .yv-m--head, .yv-m--options, .yv-m--trace { background: #6b7280; }

.yv-op { min-width: 0; padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid rgba(15,19,48,.08); }
.yv-ophead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yv-oppath { font-family: var(--mono); font-size: 15px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.yv-opsum { margin: 10px 0 0; font-size: 17px; color: var(--ink); }
.yv-opdesc { margin-top: 8px; }
.yv-h { margin: 18px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.yv-req { margin-left: 3px; color: var(--err); font-weight: 800; }
.yv-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 14px; }
.yv-param { margin: 0; min-width: 0; }
.yv-param .tu-label { display: block; }
.yv-param .tu-label small { margin-left: 4px; font-weight: 500; color: var(--muted); }
.yv-param .tu-hint { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.yv-ct { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.yv-ct .tu-label { margin: 0; }
.yv-ct .tu-select { width: auto; }
.yv-body { width: 100%; font-family: var(--mono); font-size: 13px; line-height: 1.55; white-space: pre; tab-size: 2; }
.yv-bodyacts { margin-top: 6px; gap: 16px; }
.yv-filebtn { position: relative; cursor: pointer; }
.yv-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.yv-more { margin-top: 14px; }
.yv-more > summary { margin-bottom: 8px; }
.yv-more textarea { width: 100%; font-family: var(--mono); font-size: 13px; }
.yv-sendrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.yv-send:disabled { opacity: .65; cursor: progress; }
.yv-problems { margin-top: 12px; }
.yv-problems[hidden] { display: none; }
.yv-curl { max-height: 260px; font-size: 12.5px; white-space: pre-wrap; word-break: break-all; }

.yv-resp { margin-top: 16px; }
.yv-resp:empty { display: none; }
.yv-response, .yv-resperr { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: rgba(15,19,48,.03); border: 1px solid rgba(15,19,48,.08); }
.yv-resperr { background: rgba(209,52,56,.05); border-color: rgba(209,52,56,.22); }
.yv-resperr p { margin: 0; font-size: 14px; }
.yv-why { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.yv-resphead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.yv-resphead code { font-family: var(--mono); }
.yv-code { display: inline-block; padding: 3px 10px; border-radius: 8px; font: 700 13px var(--mono); color: #fff; background: #6b7280; }
.yv-code--2 { background: #16a34a; } .yv-code--3 { background: #3b82f6; } .yv-code--4 { background: #d97706; } .yv-code--5, .yv-code--x { background: #dc2626; }
.yv-code--d { background: #6b7280; }
.yv-respseg { justify-self: start; }
.yv-respview[hidden] { display: none; }
.yv-response > *, .yv-resperr > * { min-width: 0; }
.yv-respbody { max-height: 460px; white-space: pre-wrap; overflow-wrap: anywhere; }
.yv-img { max-width: 100%; max-height: 360px; border-radius: 10px; background: repeating-conic-gradient(#eef0fa 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.yv-headers { width: 100%; border-collapse: collapse; font-size: 13px; }
.yv-headers th, .yv-headers td { padding: 6px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(15,19,48,.06); overflow-wrap: anywhere; }
.yv-headers th { width: 34%; font: 600 12.5px var(--mono); color: var(--ink); }
.yv-headers td { font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.yv-resplist { display: grid; gap: 6px; }
.yv-respdoc > summary { cursor: pointer; font-size: 13.5px; color: var(--text); }
.yv-respdoc small { color: var(--muted); font-family: var(--mono); }
.yv-respex { margin: 8px 0 4px; }
.yv-exam { max-height: 300px; font-size: 12.5px; }
.yv-apinote { margin-top: 16px; }

@media (max-width: 1000px) {
  .yv-panes, .yv-conn, .yv-apilayout { grid-template-columns: minmax(0, 1fr); }
  .yv-editor, .yv-pre { height: 420px; }
  .yv-tree { height: 400px; }
  .yv-toolbar__end { margin-left: 0; }
  .yv-ops { position: static; }
  .yv-oplist { max-height: 320px; }
}
@media (max-width: 560px) {
  .yv-op { padding: 14px 12px; }
  .yv-params { grid-template-columns: minmax(0, 1fr); }
  .yv-samples .tu-btn { padding-left: 10px; padding-right: 10px; }
}
