/* E-Rechnung Prüfportal – ein Stylesheet für Login, Portal und API-Doku */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --border: #dde3ec;
  --border-strong: #c3ccd9;
  --text: #1c2330;
  --muted: #5b6678;
  --accent: #2457d6;
  --accent-hover: #1c46b0;
  --accent-soft: #e8eefc;
  --ok: #1a7f37;
  --ok-soft: #e3f4e8;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --err: #c62828;
  --err-soft: #fde8e8;
  --info: #3b6bb5;
  --info-soft: #e7eff9;
  --neutral-soft: #eceff4;
  --focus: 0 0 0 3px rgba(36, 87, 214, .35);
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14);
  --radius: 10px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --code-tag: #1f5fbf;
  --code-attr: #8a3ffc;
  --code-val: #0f7b51;
  --code-comment: #7a8699;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141b;
    --surface: #161c25;
    --surface-2: #1c2430;
    --border: #2a3442;
    --border-strong: #3a4657;
    --text: #e4e9f0;
    --muted: #9aa6b6;
    --accent: #6b95ff;
    --accent-hover: #8aacff;
    --accent-soft: #1d2a47;
    --ok: #4cc174;
    --ok-soft: #15301f;
    --warn: #e3b341;
    --warn-soft: #33290f;
    --err: #ff6b6b;
    --err-soft: #3a1717;
    --info: #79a6ec;
    --info-soft: #172840;
    --neutral-soft: #222b37;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
    --code-tag: #7fb0ff;
    --code-attr: #c7a4ff;
    --code-val: #6ad3a1;
    --code-comment: #7d8899;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f141b;
  --surface: #161c25;
  --surface-2: #1c2430;
  --border: #2a3442;
  --border-strong: #3a4657;
  --text: #e4e9f0;
  --muted: #9aa6b6;
  --accent: #6b95ff;
  --accent-hover: #8aacff;
  --accent-soft: #1d2a47;
  --ok: #4cc174;
  --ok-soft: #15301f;
  --warn: #e3b341;
  --warn-soft: #33290f;
  --err: #ff6b6b;
  --err-soft: #3a1717;
  --info: #79a6ec;
  --info-soft: #172840;
  --neutral-soft: #222b37;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
  --code-tag: #7fb0ff;
  --code-attr: #c7a4ff;
  --code-val: #6ad3a1;
  --code-comment: #7d8899;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------------ Buttons & Felder */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 8px; padding: 9px 16px;
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
:root[data-theme="dark"] .btn-primary { color: #0b1020; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0b1020; } }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { background: none; border: none; color: var(--accent); padding: 4px 6px; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--muted);
}
.btn-icon:hover { color: var(--text); background: var(--surface-2); }
.btn .spinner { display: none; }
.btn.loading .spinner { display: inline-block; }

.field-label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; color: var(--text); }
.field-label:first-of-type { margin-top: 0; }
.input, .select, input[type=text], input[type=password] {
  width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); min-height: 40px;
}
.input:focus, .select:focus, input:focus { border-color: var(--accent); box-shadow: var(--focus); outline: none; }
.select { appearance: auto; cursor: pointer; }
.input-row { display: flex; gap: 8px; }
.input-with-button { position: relative; }
.input-with-button input { padding-right: 46px; }
.input-with-button .btn-icon { position: absolute; right: 4px; top: 3px; border: none; background: transparent; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.checks-fieldset { border: none; margin: 0; padding: 0; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite; display: inline-block; vertical-align: -3px; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; }
.badge-proto { background: var(--warn-soft); color: var(--warn); }
.chip {
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 11px;
  font-size: 13px; cursor: pointer; color: var(--text);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.alert { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.alert-error { background: var(--err-soft); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent); }

/* ------------------------------------------------------------------ Login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 28px; }
.login-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.login-brand h1 { font-size: 20px; }
.login-brand p { margin: 2px 0 0; font-size: 14px; }
.login-card form .btn-block { margin-top: 20px; min-height: 42px; }
.login-foot { font-size: 12px; margin: 18px 0 0; text-align: center; }

/* ------------------------------------------------------------------ Kopf */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.brand-name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: flex; align-items: center; gap: 10px; }
.navlink { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 8px; border-radius: 6px; }
.navlink:hover, .navlink[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.user { font-size: 13px; color: var(--muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-form { margin: 0; }

/* ------------------------------------------------------------------ Layout */
.layout { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; padding: 20px; max-width: 1680px; margin: 0 auto; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; padding: 2px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.panel-title .count { background: var(--neutral-soft); color: var(--muted); border-radius: 999px; padding: 0 7px; font-size: 12px; letter-spacing: 0; }
.state-line { font-size: 13px; margin-top: 8px; min-height: 20px; display: flex; gap: 6px; align-items: flex-start; color: var(--muted); }
.state-line.ready { color: var(--ok); }
.state-line.failed { color: var(--err); }
.state-line .log { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 4px; white-space: pre-wrap; word-break: break-all; max-height: 7.5em; overflow: auto; }
.advanced { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.advanced summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.advanced summary:hover { color: var(--text); }
.advanced-body { padding-top: 8px; }
.catalog-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12.5px; gap: 8px; }
.source-errors { list-style: none; padding: 0; margin: 6px 0 0; font-size: 12.5px; color: var(--warn); }

.dropzone {
  border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface);
  padding: 26px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
.drop-icon { color: var(--accent); }
.drop-title { font-weight: 700; font-size: 16px; margin: 8px 0 2px; }
.drop-sub { margin: 0; color: var(--muted); }
.linkish { color: var(--accent); text-decoration: underline; font-weight: 600; }
.drop-hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.samples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.privacy { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 0; align-items: flex-start; }
.privacy svg { flex: none; margin-top: 2px; color: var(--ok); }

.results-head { display: flex; justify-content: space-between; align-items: baseline; }
.result-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.result-btn {
  width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px 12px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.result-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.result-item.selected .result-btn { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
.result-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.result-main { min-width: 0; display: flex; flex-direction: column; }
.result-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.st-valid { background: var(--ok-soft); color: var(--ok); }
.st-warnings { background: var(--warn-soft); color: var(--warn); }
.st-invalid, .st-error { background: var(--err-soft); color: var(--err); }
.st-not_applicable, .st-pending { background: var(--neutral-soft); color: var(--muted); }

/* ------------------------------------------------------------------ Detail */
.detail { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); min-height: calc(100vh - 116px); outline: none; }
.empty-state { max-width: 620px; margin: 0 auto; padding: 70px 24px; text-align: center; }
.empty-state h1 { font-size: 22px; margin: 18px 0 18px; }
.illu-paper { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 2; }
.illu-line { fill: var(--border-strong); }
.illu-badge { fill: var(--ok); }
.steps { text-align: left; display: grid; gap: 12px; padding-left: 22px; color: var(--muted); }
.steps strong { color: var(--text); }

.detail-head { padding: 20px 22px 0; }
.status-banner { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 12px; }
.status-banner .status-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, currentColor 15%, transparent); flex: none; }
.status-banner h1 { font-size: 22px; }
.status-banner p { margin: 2px 0 0; color: var(--text); opacity: .85; font-size: 14px; }
.status-banner.st-pending h1 { color: var(--text); }
.detail-file { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; }
.detail-file h2 { font-size: 17px; word-break: break-all; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions .select { width: auto; max-width: 280px; min-height: 34px; padding: 5px 8px; font-size: 13px; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 18px; margin: 16px 0 0; padding: 14px 16px; background: var(--surface-2); border-radius: 10px; }
.facts div { min-width: 0; }
.facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }

.tabs { display: flex; gap: 2px; box-shadow: inset 0 -1px 0 var(--border); margin-top: 18px; padding: 0 22px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab {
  border: none; background: none; padding: 11px 14px; font-weight: 600; font-size: 14px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; border-radius: 6px 6px 0 0;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tab .pill { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; font-size: 12px; background: var(--neutral-soft); color: var(--muted); }
.tab .pill.err { background: var(--err-soft); color: var(--err); }
.tabpanel { padding: 18px 22px 24px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card h3 { font-size: 15px; }
.status-pill { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.card .lead { margin: 6px 0 10px; font-size: 14px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.count-badge { font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.notes { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.top-msgs { margin-top: 16px; }
.top-msgs h3 { font-size: 14px; margin-bottom: 8px; }

/* Meldungen */
.msg-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.segmented button { border: none; background: var(--surface); padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); border-right: 1px solid var(--border); }
.segmented button:last-child { border-right: none; }
.segmented button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.msg-toolbar .input { max-width: 260px; min-height: 34px; padding: 6px 10px; font-size: 13.5px; }
.msg-toolbar .select { width: auto; min-height: 34px; padding: 5px 8px; font-size: 13px; }
.msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg { border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 9px; padding: 10px 12px; background: var(--surface); }
.msg.lvl-error { border-left-color: var(--err); }
.msg.lvl-warning { border-left-color: var(--warn); }
.msg.lvl-information { border-left-color: var(--info); }
.msg.dimmed { opacity: .65; }
.msg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.code { font-family: var(--mono); font-size: 12.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--neutral-soft); }
.lvl-tag { font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 5px; }
.lvl-tag.error { background: var(--err-soft); color: var(--err); }
.lvl-tag.warning { background: var(--warn-soft); color: var(--warn); }
.lvl-tag.information { background: var(--info-soft); color: var(--info); }
.src-tag { color: var(--muted); }
.msg-text { margin: 6px 0 0; font-size: 14.5px; }
.msg-detail { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }
.msg-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.loc { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.empty-msgs { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 10px; }

/* Ansicht / PDF */
.frame-toolbar { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.frame-wrap { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.frame-wrap iframe { display: block; width: 100%; height: calc(100vh - 230px); min-height: 520px; border: 0; background: #fff; }
.frame-loading { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); gap: 8px; }
.att-list { margin: 12px 0 0; padding-left: 18px; font-size: 13.5px; }

/* XML */
.xml-toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; }
.xml-view { border: 1px solid var(--border); border-radius: 10px; overflow: auto; max-height: calc(100vh - 230px); background: var(--surface-2); font: 12.5px/1.6 var(--mono); }
.xml-view table { border-collapse: collapse; width: 100%; }
.xml-view td { padding: 0 10px; white-space: pre; vertical-align: top; }
.xml-view td.ln { text-align: right; color: var(--muted); user-select: none; width: 1%; border-right: 1px solid var(--border); position: sticky; left: 0; background: var(--surface-2); }
.xml-view tr.hl-error td.ln { background: var(--err-soft); color: var(--err); font-weight: 700; }
.xml-view tr.hl-warning td.ln { background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.xml-view tr.hl-information td.ln { background: var(--info-soft); color: var(--info); }
.xml-view tr.flash td { animation: flash 1.6s ease-out; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--accent) 35%, transparent); } 100% { background: transparent; } }
.x-tag { color: var(--code-tag); }
.x-attr { color: var(--code-attr); }
.x-val { color: var(--code-val); }
.x-com { color: var(--code-comment); font-style: italic; }

/* Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.toast.error { background: var(--err); color: #fff; }
.toast button { background: none; border: none; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 0 0 6px; margin-left: auto; }

/* Menü */
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 250px; z-index: 30; }
.menu-list button { display: block; width: 100%; text-align: left; border: none; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.menu-list button:hover:not(:disabled), .menu-list button:focus-visible { background: var(--surface-2); }
.menu-list button:disabled { color: var(--muted); cursor: not-allowed; }
.menu-list .sub { display: block; font-size: 12px; color: var(--muted); }

/* API-Doku */
.doc { max-width: 980px; margin: 0 auto; padding: 24px 20px 60px; }
.doc h1 { font-size: 26px; margin-bottom: 6px; }
.doc h2 { font-size: 19px; margin: 34px 0 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.doc h3 { font-size: 15px; margin: 20px 0 8px; }
.doc p, .doc li { font-size: 15px; }
.doc code { font-family: var(--mono); font-size: 13px; background: var(--neutral-soft); padding: 1px 5px; border-radius: 4px; }
.doc pre { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; overflow: auto; font: 13px/1.55 var(--mono); }
.doc pre code { background: none; padding: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.doc th, .doc td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.copy-btn { position: absolute; top: 8px; right: 8px; }
.method { font-family: var(--mono); font-weight: 700; font-size: 12px; padding: 2px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); }
.method.post { background: var(--ok-soft); color: var(--ok); }
.version-table td:first-child { font-family: var(--mono); font-size: 13px; }

/* ------------------------------------------------------------------ Schmal */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 12px 16px; }
  .sidebar { position: static; max-height: none; overflow: visible; }
  .detail { min-height: 0; }
  .frame-wrap iframe { height: 70vh; min-height: 420px; }
  .xml-view { max-height: 70vh; }
}
@media (max-width: 560px) {
  .topbar { padding: 8px 16px; }
  .brand-name { font-size: 15px; }
  .badge-proto, .user { display: none; }
  .detail-head, .tabpanel { padding-left: 14px; padding-right: 14px; }
  .tabs { padding: 0 8px; }
  .status-banner h1 { font-size: 19px; }
  .cards { grid-template-columns: 1fr; }
  .msg-toolbar .input { max-width: none; }
}
.att-title { font-size: 14px; margin: 16px 0 6px; }
#detail { scroll-margin-top: 70px; }
