/*!
 * VEXOCAR – Design-System
 * Hersteller: ROSE IT Management
 *
 * Klassenpräfix: vx-
 * Regeln: Ecken 8px (Flächen) / 6px (Knöpfe, Felder) / 4px (Badges),
 * feine 1px-Linien, kaum Schatten, keine Pillenformen, keine Verläufe,
 * keine farbigen Linksränder.
 * Die Variablen auf :root werden von der dynamischen Theme-Datei
 * (?r=theme.css) überschrieben – Namen nicht ändern.
 */

/* ------------------------------------------------------------------ */
/* Schriften (lokal, Latin-Teilmenge, SIL OFL 1.1 – siehe fonts/OFL.txt) */
/* ------------------------------------------------------------------ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-400.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-500.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-600.woff2) format("woff2");
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/sora-500.woff2) format("woff2");
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/sora-600.woff2) format("woff2");
}
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/sora-700.woff2) format("woff2");
}

/* ------------------------------------------------------------------ */
/* Variablen                                                           */
/* ------------------------------------------------------------------ */
:root {
  /* Feste Namen – werden von theme.css überschrieben */
  --vx-accent: #0e7c7b;
  --vx-accent-hover: #0a5f5e;
  --vx-accent-soft: #e2f0ef;
  --vx-on-accent: #ffffff;
  --vx-side: #15181d;
  --vx-side-2: #23272e;
  --vx-side-ink: #e6e8eb;
  --vx-side-muted: #aab0b8;

  /* Seitenleiste – Ergänzungen */
  --vx-side-line: #2a2e35;
  --vx-side-dim: #8b919a;

  /* Flächen und Linien */
  --vx-bg: #f4f4f1;
  --vx-surface: #ffffff;
  --vx-surface-2: #fafaf7;
  --vx-surface-3: #f1f1ed;
  --vx-line: #e3e3de;
  --vx-line-2: #ecece7;
  --vx-line-3: #f0f0ec;
  --vx-line-strong: #d6d6cf;
  --vx-line-input: #c4c4bc;

  /* Text */
  --vx-ink: #15181d;
  --vx-ink-2: #3b3d42;
  --vx-muted: #5b5f66;
  --vx-muted-2: #4a4e55;
  --vx-placeholder: #6b6f76;

  /* Status (Text / Fläche / Rand) */
  --vx-ok: #1d5e34;
  --vx-ok-bg: #e3f1e7;
  --vx-ok-line: #c7e3d0;
  --vx-warn: #7a4300;
  --vx-warn-bg: #fdf0dc;
  --vx-warn-line: #f3dcb6;
  --vx-bad: #9c2a1f;
  --vx-bad-bg: #fbe8e5;
  --vx-bad-line: #f1cbc5;
  --vx-info: #1e3f8f;
  --vx-info-bg: #e6edfb;
  --vx-info-line: #cbd8f4;
  --vx-neutral: #3b3d42;
  --vx-neutral-bg: #efeee9;
  --vx-neutral-line: #dcdbd4;
  --vx-signal: #b4232c;     /* Zähler an der Glocke */
  --vx-live: #3fb27f;       /* Status-Punkt auf Graphit */

  /* Radien */
  --vx-r-lg: 8px;
  --vx-r: 6px;
  --vx-r-sm: 4px;

  /* Schriften */
  --vx-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --vx-font-head: "Sora", "Inter", system-ui, sans-serif;
  --vx-font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Maße */
  --vx-side-w: 248px;
  --vx-pad-x: 32px;
  --vx-content-max: 1480px;
  --vx-shadow-pop: 0 6px 18px rgba(21, 24, 29, 0.08);
  --vx-side-chip: rgba(255, 255, 255, 0.09);
  --vx-on-accent-chip: rgba(255, 255, 255, 0.2);
}

/* Abgeleitete Graphit-Töne folgen einer hellen oder dunklen Kundenfarbe */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --vx-side-line: color-mix(in srgb, var(--vx-side-ink) 11%, var(--vx-side));
    --vx-side-dim: color-mix(in srgb, var(--vx-side-muted) 76%, var(--vx-side));
    --vx-side-chip: color-mix(in srgb, var(--vx-side-ink) 10%, transparent);
    --vx-on-accent-chip: color-mix(in srgb, var(--vx-on-accent) 20%, transparent);
  }
}

/* ------------------------------------------------------------------ */
/* Grundlagen                                                          */
/* ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--vx-bg);
  color: var(--vx-ink);
  font-family: var(--vx-font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--vx-font-head);
  font-weight: 600;
  line-height: 1.25;
}

p {
  margin: 0;
}

img, svg {
  max-width: 100%;
}

svg {
  flex: none;
}

/* Symbole aus icon() */
.vx-icon {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}

a {
  color: var(--vx-accent);
  text-decoration: none;
}

a:hover {
  color: var(--vx-accent-hover);
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

hr {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--vx-line-2);
}

code,
kbd,
samp {
  font-family: var(--vx-font-mono);
  font-size: 0.92em;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--vx-accent-soft);
  color: var(--vx-ink);
}

:focus-visible {
  outline: 2px solid var(--vx-accent);
  outline-offset: 2px;
}

/* Sprunglink „Zum Inhalt“ */
.vx-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: var(--vx-r);
  background: var(--vx-ink);
  color: #ffffff;
  font-weight: 600;
}

.vx-skip:focus {
  top: 12px;
  color: #ffffff;
}

/* ------------------------------------------------------------------ */
/* Grundlayout                                                         */
/* ------------------------------------------------------------------ */
.vx-app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--vx-bg);
}

.vx-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.vx-content {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--vx-content-max);
  margin: 0 auto;
  padding: 26px var(--vx-pad-x) 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vx-content:focus {
  outline: none;
}

.vx-content > * {
  min-width: 0;
}

.vx-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px var(--vx-pad-x);
  border-top: 1px solid var(--vx-line);
  background: var(--vx-bg);
  color: var(--vx-muted);
  font-size: 12px;
}

.vx-foot a {
  color: var(--vx-ink-2);
}

.vx-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

/* ------------------------------------------------------------------ */
/* Seitenleiste                                                        */
/* ------------------------------------------------------------------ */
.vx-side {
  flex: none;
  width: var(--vx-side-w);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px 18px;
  background: var(--vx-side);
  color: var(--vx-side-ink);
  scrollbar-width: thin;
  scrollbar-color: var(--vx-side-line) transparent;
}

.vx-side :focus-visible {
  outline-color: var(--vx-side-ink);
}

.vx-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
  color: var(--vx-side-ink);
  text-decoration: none;
}

.vx-brand:hover {
  color: var(--vx-side-ink);
  text-decoration: none;
}

.vx-brand-logo {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--vx-r);
  background: #ffffff;
  overflow: hidden;
}

.vx-brand-logo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Platzhalter, solange kein Logo hochgeladen ist */
.vx-brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--vx-side-dim);
  border-radius: var(--vx-r);
  color: var(--vx-side-muted);
  font-family: var(--vx-font-head);
  font-size: 18px;
  font-weight: 700;
}

.vx-brand-text {
  min-width: 0;
}

.vx-brand-name {
  display: block;
  font-family: var(--vx-font-head);
  font-weight: 700;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--vx-side-ink);
}

.vx-brand-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--vx-side-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vx-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vx-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vx-nav-group + .vx-nav-group {
  padding-top: 16px;
  border-top: 1px solid var(--vx-side-line);
}

.vx-nav-title {
  padding: 0 10px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--vx-side-muted);
}

.vx-nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vx-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--vx-r);
  background: transparent;
  color: var(--vx-side-ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
}

.vx-nav-link:hover {
  background: var(--vx-side-2);
  color: var(--vx-side-ink);
  text-decoration: none;
}

.vx-nav-link svg {
  flex: none;
}

.vx-nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vx-nav-link[aria-current="page"],
.vx-nav-link.is-active {
  background: var(--vx-accent);
  color: var(--vx-on-accent);
}

.vx-nav-link[aria-current="page"]:hover,
.vx-nav-link.is-active:hover {
  background: var(--vx-accent);
  color: var(--vx-on-accent);
}

.vx-nav-link[aria-current="page"]:focus-visible {
  outline-color: var(--vx-side-ink);
}

/* Geplantes Modul: gedimmt, nicht klickbar */
.vx-nav-link.is-planned {
  color: var(--vx-side-dim);
  cursor: default;
  pointer-events: none;
}

.vx-nav-tag {
  flex: none;
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vx-nav-count {
  flex: none;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: var(--vx-r-sm);
  background: var(--vx-side-chip);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.vx-nav-link[aria-current="page"] .vx-nav-count,
.vx-nav-link.is-active .vx-nav-count {
  background: var(--vx-on-accent-chip);
}

.vx-side-foot {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--vx-side-line);
  border-radius: var(--vx-r-lg);
  font-size: 12px;
  color: var(--vx-side-muted);
}

.vx-side-foot-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--vx-side-ink);
  overflow-wrap: anywhere;
}

.vx-side-foot-line {
  margin-top: 2px;
}

.vx-side-foot-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--vx-side-ink);
}

/* Hintergrund-Abdunklung für die mobile Schublade */
.vx-scrim {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Kopfleiste                                                          */
/* ------------------------------------------------------------------ */
.vx-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px var(--vx-pad-x);
  background: var(--vx-surface);
  border-bottom: 1px solid var(--vx-line);
}

.vx-top .vx-menu-toggle {
  display: none;
}

.vx-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 560px;
  min-width: 0;
  margin: 0;
}

.vx-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--vx-muted);
  pointer-events: none;
}

.vx-search input {
  width: 100%;
  height: 38px;
  padding: 0 70px 0 40px;
  border: 1px solid var(--vx-line-strong);
  border-radius: var(--vx-r);
  background: #f9f9f7;
  color: var(--vx-ink);
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

.vx-search input::placeholder {
  color: var(--vx-placeholder);
}

.vx-search input:focus {
  background: var(--vx-surface);
  border-color: var(--vx-accent);
  outline: 2px solid var(--vx-accent);
  outline-offset: -1px;
}

.vx-search input::-webkit-search-cancel-button {
  margin-right: 4px;
}

.vx-search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 6px;
  border: 1px solid var(--vx-line-strong);
  border-radius: var(--vx-r-sm);
  background: var(--vx-surface);
  color: var(--vx-muted-2);
  font-family: var(--vx-font);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: none;
}

.vx-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vx-iconbtn {
  position: relative;
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-r);
  background: var(--vx-surface);
  color: #2b2f36;
  text-decoration: none;
}

.vx-iconbtn:hover {
  background: var(--vx-surface-3);
  color: var(--vx-ink);
  text-decoration: none;
}

.vx-iconbtn-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--vx-r-sm);
  background: var(--vx-signal);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.vx-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 8px 0 4px;
  border: 1px solid transparent;
  border-radius: var(--vx-r);
  background: var(--vx-surface);
  color: var(--vx-ink);
  text-align: left;
}

.vx-profile:hover,
.vx-profile[aria-expanded="true"] {
  background: var(--vx-surface-3);
}

.vx-profile-text {
  line-height: 1.2;
  min-width: 0;
}

.vx-profile-name {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.vx-profile-role {
  display: block;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-profile > svg {
  color: var(--vx-muted);
}

/* ------------------------------------------------------------------ */
/* Seitenkopf und Überschriften                                        */
/* ------------------------------------------------------------------ */
.vx-pagehead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
}

.vx-pagehead-text {
  min-width: 0;
}

.vx-pagehead h1 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.vx-pagehead-sub {
  margin-top: 6px;
  color: var(--vx-muted);
  font-size: 14px;
}

.vx-pagehead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vx-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--vx-line-input);
}

.vx-crumbs a {
  color: var(--vx-muted-2);
}

.vx-h2 {
  font-family: var(--vx-font-head);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.vx-h3 {
  font-family: var(--vx-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

/* ------------------------------------------------------------------ */
/* Knöpfe                                                              */
/* ------------------------------------------------------------------ */
.vx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--vx-line-strong);
  border-radius: var(--vx-r);
  background: var(--vx-surface);
  color: var(--vx-ink);
  font-family: var(--vx-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  vertical-align: middle;
  -webkit-user-select: none;
  user-select: none;
}

.vx-btn:hover {
  background: var(--vx-surface-3);
  color: var(--vx-ink);
  text-decoration: none;
}

.vx-btn svg {
  flex: none;
}

.vx-btn--primary {
  border-color: var(--vx-accent);
  background: var(--vx-accent);
  color: var(--vx-on-accent);
  font-weight: 600;
}

.vx-btn--primary:hover {
  border-color: var(--vx-accent-hover);
  background: var(--vx-accent-hover);
  color: var(--vx-on-accent);
}

.vx-btn--ghost {
  border-color: transparent;
  background: transparent;
}

.vx-btn--ghost:hover {
  background: var(--vx-surface-3);
}

.vx-btn--danger {
  border-color: var(--vx-signal);
  background: var(--vx-signal);
  color: #ffffff;
  font-weight: 600;
}

.vx-btn--danger:hover {
  border-color: #931c24;
  background: #931c24;
  color: #ffffff;
}

/* Zurückhaltende Gefahr (z. B. „Entfernen“ in Tabellen) */
.vx-btn--danger-ghost {
  border-color: var(--vx-line-strong);
  background: var(--vx-surface);
  color: var(--vx-bad);
}

.vx-btn--danger-ghost:hover {
  border-color: var(--vx-bad-line);
  background: var(--vx-bad-bg);
  color: var(--vx-bad);
}

.vx-btn--sm {
  height: 30px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
}

.vx-btn--lg {
  height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

.vx-btn--block {
  display: flex;
  width: 100%;
}

/* Nur Symbol (immer mit aria-label!) */
.vx-btn--icon {
  width: 36px;
  padding: 0;
}

.vx-btn--icon.vx-btn--sm {
  width: 30px;
}

.vx-btn:disabled,
.vx-btn[aria-disabled="true"],
.vx-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.vx-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vx-btns--end {
  justify-content: flex-end;
}

/* Knopf als reiner Textlink */
.vx-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--vx-accent);
  font-size: inherit;
  font-weight: 500;
  text-decoration: none;
}

.vx-link:hover {
  color: var(--vx-accent-hover);
  text-decoration: underline;
}

/* Segment-Umschalter (Filter wie im Entwurf) */
.vx-segment {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--vx-line-strong);
  border-radius: var(--vx-r);
  background: var(--vx-surface);
}

.vx-segment > a,
.vx-segment > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--vx-r-sm);
  background: transparent;
  color: var(--vx-ink-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.vx-segment > a:hover,
.vx-segment > button:hover {
  background: var(--vx-surface-3);
  color: var(--vx-ink);
  text-decoration: none;
}

.vx-segment > [aria-pressed="true"],
.vx-segment > [aria-current="page"],
.vx-segment > .is-active {
  background: var(--vx-accent);
  color: var(--vx-on-accent);
}

.vx-segment > [aria-pressed="true"]:hover,
.vx-segment > [aria-current="page"]:hover,
.vx-segment > .is-active:hover {
  background: var(--vx-accent);
  color: var(--vx-on-accent);
}

/* ------------------------------------------------------------------ */
/* Formulare                                                           */
/* ------------------------------------------------------------------ */
.vx-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vx-form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vx-form-section + .vx-form-section {
  padding-top: 20px;
  border-top: 1px solid var(--vx-line-2);
}

.vx-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.vx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.vx-field > label,
.vx-field > legend,
.vx-label {
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--vx-ink-2);
}

.vx-req {
  color: var(--vx-bad);
  font-weight: 600;
}

.vx-opt {
  color: var(--vx-muted);
  font-weight: 400;
}

.vx-input,
.vx-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="range"]),
.vx-field select,
.vx-field textarea,
.vx-inputgroup input,
.vx-inputgroup select,
.vx-matrix select {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--vx-line-input);
  border-radius: var(--vx-r);
  background-color: var(--vx-surface);
  color: var(--vx-ink);
  font-family: var(--vx-font);
  font-size: 14px;
  line-height: 1.3;
}

.vx-field textarea,
textarea.vx-input {
  height: auto;
  min-height: 96px;
  padding: 9px 11px;
  line-height: 1.45;
  resize: vertical;
}

.vx-field select,
select.vx-input,
.vx-inputgroup select,
.vx-matrix select {
  padding-right: 32px;
  -webkit-appearance: none;
  appearance: none;
  /* Pfeil aus zwei Dreiecken – CSP-sicher ohne Bild-URL */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--vx-muted) 50%),
    linear-gradient(135deg, var(--vx-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.vx-field select[multiple],
select.vx-input[multiple] {
  height: auto;
  min-height: 96px;
  padding: 6px;
  background-image: none;
}

.vx-input::placeholder,
.vx-field input::placeholder,
.vx-field textarea::placeholder,
.vx-inputgroup input::placeholder {
  color: var(--vx-placeholder);
}

.vx-input:hover,
.vx-field input:hover,
.vx-field select:hover,
.vx-field textarea:hover,
.vx-inputgroup input:hover {
  border-color: #a9a9a1;
}

.vx-input:focus,
.vx-field input:focus,
.vx-field select:focus,
.vx-field textarea:focus,
.vx-inputgroup input:focus,
.vx-inputgroup select:focus,
.vx-matrix select:focus {
  border-color: var(--vx-accent);
  outline: 2px solid var(--vx-accent);
  outline-offset: -1px;
}

.vx-input:disabled,
.vx-field input:disabled,
.vx-field select:disabled,
.vx-field textarea:disabled,
.vx-input[readonly],
.vx-field input[readonly],
.vx-field textarea[readonly] {
  background-color: var(--vx-surface-2);
  color: var(--vx-muted-2);
}

.vx-input:disabled,
.vx-field input:disabled,
.vx-field select:disabled,
.vx-field textarea:disabled {
  cursor: not-allowed;
}

.vx-hint {
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-error {
  font-size: 12px;
  font-weight: 500;
  color: var(--vx-bad);
}

.vx-field.has-error > label {
  color: var(--vx-bad);
}

.vx-field.has-error input,
.vx-field.has-error select,
.vx-field.has-error textarea,
.vx-input[aria-invalid="true"],
.vx-field [aria-invalid="true"] {
  border-color: var(--vx-bad);
  background-color: #fffafa;
}

/* Felder nebeneinander, umbrechend */
.vx-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.vx-row > * {
  flex: 1 1 220px;
  min-width: 0;
}

.vx-row > .vx-field--sm {
  flex: 0 1 140px;
}

.vx-row > .vx-field--lg {
  flex: 2 1 320px;
}

/* Checkbox / Radio mit Label */
.vx-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  color: var(--vx-ink);
  cursor: pointer;
}

.vx-check input {
  width: 18px;
  height: 18px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--vx-accent);
  cursor: pointer;
}

.vx-check-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vx-check-text small,
.vx-check .vx-hint {
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vx-checks--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 20px;
}

/* Schalter (eckig) */
.vx-switch {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--vx-ink);
  cursor: pointer;
}

.vx-switch input {
  position: absolute;
  width: 36px;
  height: 20px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.vx-switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  flex: none;
  border-radius: var(--vx-r-sm);
  background: #9a9a93;
  transition: background-color 0.15s ease;
}

.vx-switch-track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #ffffff;
  transition: transform 0.15s ease;
}

.vx-switch input:checked + .vx-switch-track {
  background: var(--vx-accent);
}

.vx-switch input:checked + .vx-switch-track::after {
  transform: translateX(16px);
}

.vx-switch input:focus-visible + .vx-switch-track {
  outline: 2px solid var(--vx-accent);
  outline-offset: 2px;
}

.vx-switch input:disabled + .vx-switch-track {
  opacity: 0.5;
}

.vx-switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 1px;
}

.vx-switch-text small {
  font-size: 12px;
  color: var(--vx-muted);
}

/* Feld mit Knopf */
.vx-inputgroup {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.vx-inputgroup > input,
.vx-inputgroup > select {
  flex: 1 1 auto;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.vx-inputgroup > .vx-btn,
.vx-inputgroup > .vx-inputgroup-addon {
  height: 38px;
  margin-left: -1px;
  border-color: var(--vx-line-input);
  border-radius: 0 var(--vx-r) var(--vx-r) 0;
}

.vx-inputgroup > .vx-btn:not(:last-child),
.vx-inputgroup > .vx-inputgroup-addon:not(:last-child) {
  border-radius: 0;
}

.vx-inputgroup > .vx-inputgroup-addon {
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--vx-line-input);
  background: var(--vx-surface-2);
  color: var(--vx-muted-2);
  font-size: 13px;
  white-space: nowrap;
}

.vx-inputgroup > :focus {
  position: relative;
  z-index: 1;
}

/* Passwort anzeigen: Symbole tauschen */
[data-vx-reveal] .vx-reveal-hide,
[data-vx-reveal][aria-pressed="true"] .vx-reveal-show {
  display: none;
}

[data-vx-reveal][aria-pressed="true"] .vx-reveal-hide {
  display: inline;
}

/* Farbfeld */
input[type="color"],
.vx-field input[type="color"] {
  width: 44px;
  height: 38px;
  flex: none;
  padding: 3px;
  border: 1px solid var(--vx-line-input);
  border-radius: var(--vx-r);
  background: var(--vx-surface);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 3px;
}

input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 3px;
}

.vx-colorfield {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vx-colorfield input[type="text"] {
  max-width: 130px;
  font-family: var(--vx-font-mono);
  text-transform: lowercase;
}

/* Datei-Upload-Fläche */
.vx-filebox {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  border: 1px dashed var(--vx-line-input);
  border-radius: var(--vx-r-lg);
  background: var(--vx-surface-2);
  color: var(--vx-ink-2);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.vx-filebox:hover,
.vx-filebox.is-dragover {
  border-color: var(--vx-accent);
  background: var(--vx-accent-soft);
}

.vx-filebox:focus-within {
  outline: 2px solid var(--vx-accent);
  outline-offset: 2px;
}

.vx-filebox input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.vx-filebox-icon {
  display: flex;
  color: var(--vx-accent);
  margin-bottom: 2px;
}

.vx-filebox strong {
  color: var(--vx-ink);
  font-weight: 600;
}

.vx-filebox-hint {
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-filebox-name {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vx-ink);
  overflow-wrap: anywhere;
}

.vx-filebox-name:empty {
  display: none;
}

.vx-filebox.has-file {
  border-style: solid;
  border-color: var(--vx-accent);
}

/* ------------------------------------------------------------------ */
/* Flächen, Raster, Stapel                                             */
/* ------------------------------------------------------------------ */
.vx-card {
  min-width: 0;
  background: var(--vx-surface);
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-r-lg);
}

.vx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--vx-line-2);
}

.vx-card-head > div {
  min-width: 0;
}

.vx-card-head h2,
.vx-card-head h3 {
  margin: 0;
  font-family: var(--vx-font-head);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.vx-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.vx-card-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-card-head a:not(.vx-btn) {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.vx-card-body {
  padding: 18px;
}

.vx-card-body > * + * {
  margin-top: 12px;
}

.vx-card-body.vx-form > * + *,
.vx-card-body.vx-stack > * + * {
  margin-top: 0;
}

.vx-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--vx-line-2);
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-card-foot--end {
  justify-content: flex-end;
}

/* Abgerundete untere Ecken für Inhalte, die bis an den Rand gehen */
.vx-card > .vx-table-wrap:last-child,
.vx-card > .vx-list:last-child,
.vx-card > .vx-matrix-wrap:last-child {
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
}

.vx-card > .vx-list:last-child {
  overflow: hidden;
}

.vx-card > .vx-table-wrap:first-child,
.vx-card > .vx-matrix-wrap:first-child {
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
}

.vx-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

.vx-grid > * {
  min-width: 0;
}

.vx-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vx-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Hauptspalte + schmale Spalte (wie „Werkstatt“ + „Anfragen“ im Entwurf) */
.vx-grid--main {
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
}

.vx-grid--stretch {
  align-items: stretch;
}

.vx-span-all {
  grid-column: 1 / -1;
}

.vx-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vx-stack--sm {
  gap: 12px;
}

.vx-stack--xs {
  gap: 6px;
}

.vx-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vx-between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

/* ------------------------------------------------------------------ */
/* Kennzahlen-Leiste                                                   */
/* ------------------------------------------------------------------ */
.vx-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-r-lg);
  background: var(--vx-line);
}

.vx-kpi {
  flex: 1 1 170px;
  min-width: 0;
  padding: 16px 20px 14px;
  background: var(--vx-surface);
}

.vx-kpi-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--vx-muted-2);
}

.vx-kpi-label svg {
  color: var(--vx-accent);
}

.vx-kpi-figure {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.vx-kpi-value {
  font-family: var(--vx-font-head);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--vx-ink);
  font-variant-numeric: tabular-nums;
}

.vx-kpi-unit {
  font-family: var(--vx-font-head);
  font-size: 15px;
  font-weight: 500;
  color: var(--vx-muted-2);
}

.vx-kpi-bar {
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--vx-line-2);
}

.vx-kpi-bar > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--vx-accent);
}

.vx-kpi-bar.is-warn > span { background: #b8770f; }
.vx-kpi-bar.is-bad > span { background: var(--vx-bad); }
.vx-kpi-bar.is-ok > span { background: var(--vx-ok); }

.vx-kpi-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--vx-muted-2);
}

.vx-kpi-trend.is-up { color: var(--vx-ok); }
.vx-kpi-trend.is-down { color: var(--vx-bad); }
.vx-kpi-trend.is-flat { color: var(--vx-muted-2); }
/* Richtung ≠ Bewertung: z. B. sinkende Standtage sind gut */
.vx-kpi-trend.is-good { color: var(--vx-ok); }
.vx-kpi-trend.is-bad { color: var(--vx-bad); }
.vx-kpi-trend.is-neutral { color: var(--vx-muted-2); }

/* ------------------------------------------------------------------ */
/* Tabellen                                                            */
/* ------------------------------------------------------------------ */
.vx-table-wrap {
  position: relative; /* hält absolut positionierte .vx-sr-Texte im Scrollbereich */
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.vx-table caption {
  padding: 0 0 8px;
  text-align: left;
  font-weight: 600;
}

.vx-table th,
.vx-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.vx-table th:first-child,
.vx-table td:first-child {
  padding-left: 18px;
}

.vx-table th:last-child,
.vx-table td:last-child {
  padding-right: 18px;
}

.vx-table thead th {
  padding-top: 9px;
  padding-bottom: 9px;
  background: var(--vx-surface-2);
  border-bottom: 1px solid var(--vx-line-2);
  color: var(--vx-muted-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.vx-table thead th a {
  color: inherit;
}

.vx-table tbody td,
.vx-table tbody th {
  border-bottom: 1px solid var(--vx-line-3);
}

.vx-table tbody th {
  font-weight: 600;
}

.vx-table tbody tr:last-child > td,
.vx-table tbody tr:last-child > th {
  border-bottom: 0;
}

.vx-table tbody tr:hover > td,
.vx-table tbody tr:hover > th {
  background: var(--vx-surface-2);
}

.vx-table .is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vx-table .is-time {
  font-family: var(--vx-font-head);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.vx-table .is-actions {
  text-align: right;
  white-space: nowrap;
}

.vx-table .is-actions .vx-btn + .vx-btn,
.vx-table .is-actions form + form,
.vx-table .is-actions .vx-btn + form,
.vx-table .is-actions form + .vx-btn {
  margin-left: 6px;
}

.vx-table .is-actions form {
  display: inline;
}

.vx-table .is-check {
  width: 1%;
}

.vx-table tfoot td {
  border-top: 1px solid var(--vx-line-2);
  background: var(--vx-surface-2);
  font-weight: 600;
}

.vx-table a:not(.vx-btn) {
  font-weight: 500;
}

.vx-cell-title {
  display: block;
  font-weight: 600;
  color: var(--vx-ink);
}

.vx-cell-sub {
  display: block;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-table--compact th,
.vx-table--compact td {
  padding: 6px 10px;
}

.vx-table--compact th:first-child,
.vx-table--compact td:first-child {
  padding-left: 14px;
}

.vx-table--compact th:last-child,
.vx-table--compact td:last-child {
  padding-right: 14px;
}

.vx-table--compact thead th {
  padding-top: 7px;
  padding-bottom: 7px;
}

/* Tabelle ohne Karte, mit eigenem Rahmen */
.vx-table-wrap--framed {
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-r-lg);
  background: var(--vx-surface);
}

/* Leerer Zustand */
.vx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 20px;
  text-align: center;
  color: var(--vx-muted-2);
}

.vx-empty-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border-radius: var(--vx-r-lg);
  background: var(--vx-surface-3);
  color: var(--vx-muted);
}

.vx-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--vx-ink);
}

.vx-empty-text {
  max-width: 420px;
  font-size: 14px;
}

.vx-empty-action {
  margin-top: 10px;
}

.vx-empty--sm {
  padding: 18px 16px;
}

/* ------------------------------------------------------------------ */
/* Badges, Punkte                                                      */
/* ------------------------------------------------------------------ */
.vx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border: 1px solid var(--vx-neutral-line);
  border-radius: var(--vx-r-sm);
  background: var(--vx-neutral-bg);
  color: var(--vx-neutral);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}

.vx-badge svg {
  flex: none;
}

.vx-badge--ok { border-color: var(--vx-ok-line); background: var(--vx-ok-bg); color: var(--vx-ok); }
.vx-badge--warn { border-color: var(--vx-warn-line); background: var(--vx-warn-bg); color: var(--vx-warn); }
.vx-badge--bad { border-color: var(--vx-bad-line); background: var(--vx-bad-bg); color: var(--vx-bad); }
.vx-badge--info { border-color: var(--vx-info-line); background: var(--vx-info-bg); color: var(--vx-info); }
.vx-badge--muted { border-color: var(--vx-neutral-line); background: var(--vx-neutral-bg); color: var(--vx-neutral); }
.vx-badge--accent { border-color: transparent; background: var(--vx-accent-soft); color: var(--vx-ink); }
.vx-badge--outline { border-color: #cfcfc8; background: var(--vx-surface); color: var(--vx-neutral); }
.vx-badge--solid { border-color: var(--vx-accent); background: var(--vx-accent); color: var(--vx-on-accent); }

.vx-badge--sm {
  padding: 1px 5px;
  font-size: 11px;
}

.vx-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 2px;
  background: currentColor;
  vertical-align: middle;
}

.vx-badge .vx-dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
}

.vx-dot--ok { background: var(--vx-ok); }
.vx-dot--warn { background: #b8770f; }
.vx-dot--bad { background: var(--vx-bad); }
.vx-dot--info { background: var(--vx-info); }
.vx-dot--muted { background: #8a8e95; }
.vx-dot--accent { background: var(--vx-accent); }
.vx-dot--live { background: var(--vx-live); }

/* Auf Graphit hellere Statuspunkte */
.vx-side .vx-dot--ok { background: var(--vx-live); }
.vx-side .vx-dot--warn { background: #e0a43a; }
.vx-side .vx-dot--bad { background: #e5645b; }

/* ------------------------------------------------------------------ */
/* Kennzeichen                                                         */
/* ------------------------------------------------------------------ */
.vx-plate {
  display: inline-flex;
  align-items: stretch;
  height: 24px;
  overflow: hidden;
  border: 1.5px solid #1a1a1a;
  border-radius: var(--vx-r-sm);
  background: #ffffff;
  white-space: nowrap;
  vertical-align: middle;
}

.vx-plate-eu {
  width: 13px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 1px;
  background: #003399;
  color: #ffffff;
  font-family: var(--vx-font);
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
}

/* Sternkreis */
.vx-plate-stars {
  display: block;
  width: 7px;
  height: 7px;
  border: 1.2px dotted #ffcc00;
  border-radius: 50%;
}

.vx-plate-text {
  display: flex;
  align-items: center;
  padding: 0 7px;
  color: #111111;
  font-family: var(--vx-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.vx-plate--lg {
  height: 34px;
  border-width: 2px;
}

.vx-plate--lg .vx-plate-eu {
  width: 18px;
  padding: 3px 0 2px;
  font-size: 11px;
}

.vx-plate--lg .vx-plate-stars {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}

.vx-plate--lg .vx-plate-text {
  padding: 0 10px;
  font-size: 18px;
}

/* ------------------------------------------------------------------ */
/* Meldungen                                                           */
/* ------------------------------------------------------------------ */
.vx-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px 11px 14px;
  border: 1px solid var(--vx-neutral-line);
  border-radius: var(--vx-r);
  background: var(--vx-neutral-bg);
  color: var(--vx-neutral);
  font-size: 14px;
  transition: opacity 0.2s ease;
}

.vx-alert > svg,
.vx-alert-icon {
  flex: none;
  margin-top: 1px;
}

.vx-alert-body {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--vx-ink);
}

.vx-alert-body strong:first-child {
  display: block;
  margin-bottom: 2px;
}

.vx-alert-body a {
  font-weight: 500;
}

.vx-alert-close {
  width: 26px;
  height: 26px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -3px -2px -3px 0;
  padding: 0;
  border: 0;
  border-radius: var(--vx-r-sm);
  background: transparent;
  color: inherit;
}

.vx-alert-close:hover {
  background: rgba(21, 24, 29, 0.07);
}

.vx-alert--ok { border-color: var(--vx-ok-line); background: var(--vx-ok-bg); color: var(--vx-ok); }
.vx-alert--warn { border-color: var(--vx-warn-line); background: var(--vx-warn-bg); color: var(--vx-warn); }
.vx-alert--bad { border-color: var(--vx-bad-line); background: var(--vx-bad-bg); color: var(--vx-bad); }
.vx-alert--info { border-color: var(--vx-info-line); background: var(--vx-info-bg); color: var(--vx-info); }

.vx-alert.is-leaving {
  opacity: 0;
}

.vx-flash-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vx-flash-stack:empty {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Reiter                                                              */
/* ------------------------------------------------------------------ */
.vx-tabs {
  position: relative;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  box-shadow: inset 0 -1px 0 var(--vx-line);
  -webkit-overflow-scrolling: touch;
}

.vx-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--vx-muted-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}

.vx-tab:hover {
  color: var(--vx-ink);
  border-bottom-color: var(--vx-line-strong);
  text-decoration: none;
}

.vx-tab:focus-visible {
  outline-offset: -2px;
}

.vx-tab[aria-selected="true"],
.vx-tab[aria-current="page"],
.vx-tab.is-active {
  color: var(--vx-ink);
  font-weight: 600;
  border-bottom-color: var(--vx-accent);
}

.vx-tab .vx-badge {
  font-size: 11px;
  padding: 0 5px;
}

.vx-tabpanel {
  padding-top: 20px;
}

.vx-tabpanel:focus {
  outline: none;
}

/* ------------------------------------------------------------------ */
/* Aufklappmenü, Avatar                                                */
/* ------------------------------------------------------------------ */
.vx-menu {
  position: relative;
  display: inline-block;
}

.vx-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  display: none;
  min-width: 232px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  border: 1px solid var(--vx-line-strong);
  border-radius: var(--vx-r-lg);
  background: var(--vx-surface);
  box-shadow: var(--vx-shadow-pop);
  text-align: left;
}

.vx-menu-panel.is-open {
  display: block;
}

.vx-menu-panel--left {
  left: 0;
  right: auto;
}

.vx-menu-panel--up {
  top: auto;
  bottom: calc(100% + 6px);
}

.vx-menu-head {
  padding: 8px 10px 10px;
  margin: 0 0 6px;
  border-bottom: 1px solid var(--vx-line-2);
  font-size: 12px;
  color: var(--vx-muted);
  overflow-wrap: anywhere;
}

.vx-menu-head strong {
  display: block;
  color: var(--vx-ink);
  font-size: 13px;
}

.vx-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--vx-r-sm);
  background: transparent;
  color: var(--vx-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.vx-menu-item:hover,
.vx-menu-item:focus-visible {
  background: var(--vx-surface-3);
  color: var(--vx-ink);
  text-decoration: none;
}

.vx-menu-item:focus-visible {
  outline-offset: -2px;
}

.vx-menu-item > svg {
  color: var(--vx-muted);
}

.vx-menu-item > span:first-of-type {
  flex: 1 1 auto;
}

.vx-menu-hint {
  margin-left: auto;
  padding-left: 12px;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-menu-item--danger,
.vx-menu-item--danger > svg {
  color: var(--vx-bad);
}

.vx-menu-panel form {
  margin: 0;
}

.vx-menu-sep {
  height: 1px;
  margin: 6px -6px;
  background: var(--vx-line-2);
}

.vx-avatar {
  width: 30px;
  height: 30px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--vx-r);
  background: #2b2f36;
  color: #ffffff;
  font-family: var(--vx-font-head);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.vx-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vx-avatar--sm {
  width: 24px;
  height: 24px;
  border-radius: var(--vx-r-sm);
  font-size: 10px;
}

.vx-avatar--lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.vx-avatar--accent {
  background: var(--vx-accent);
  color: var(--vx-on-accent);
}

/* ------------------------------------------------------------------ */
/* Dialog                                                              */
/* ------------------------------------------------------------------ */
.vx-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-r-lg);
  background: var(--vx-surface);
  color: var(--vx-ink);
  box-shadow: 0 12px 32px rgba(21, 24, 29, 0.16);
}

.vx-dialog--wide {
  width: min(680px, calc(100vw - 32px));
}

.vx-dialog::backdrop {
  background: rgba(21, 24, 29, 0.45);
}

.vx-dialog-body {
  padding: 20px 20px 18px;
}

.vx-dialog-title {
  margin: 0 0 8px;
  font-family: var(--vx-font-head);
  font-size: 17px;
  font-weight: 600;
}

.vx-dialog-text {
  color: var(--vx-ink-2);
  white-space: pre-line;
}

.vx-dialog-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--vx-line-2);
  background: var(--vx-surface-2);
  border-radius: 0 0 var(--vx-r-lg) var(--vx-r-lg);
}

/* ------------------------------------------------------------------ */
/* Rechte-Matrix                                                       */
/* ------------------------------------------------------------------ */
.vx-matrix-wrap {
  position: relative;
  overflow: auto;
  max-height: min(72vh, 760px);
  -webkit-overflow-scrolling: touch;
}

.vx-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.vx-matrix th,
.vx-matrix td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--vx-line-3);
  text-align: center;
  vertical-align: middle;
  background: var(--vx-surface);
}

.vx-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--vx-line-2);
  background: var(--vx-surface-2);
  color: var(--vx-muted-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.vx-matrix th:first-child,
.vx-matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 200px;
  padding-left: 18px;
  text-align: left;
}

.vx-matrix thead th:first-child {
  z-index: 3;
}

.vx-matrix tbody th {
  font-weight: 600;
  color: var(--vx-ink);
}

.vx-matrix tbody th small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--vx-muted);
}

.vx-matrix tbody tr:hover > * {
  background: var(--vx-surface-2);
}

.vx-matrix-group > th,
.vx-matrix-group > td,
.vx-matrix tbody tr.vx-matrix-group:hover > * {
  padding-top: 12px;
  padding-bottom: 6px;
  background: #f6f6f3;
  color: var(--vx-muted-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

.vx-matrix select {
  width: auto;
  min-width: 92px;
  height: 30px;
  padding: 0 28px 0 8px;
  font-size: 12px;
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
}

.vx-matrix .is-na {
  color: var(--vx-line-input);
}

/* Segment-Auswahl „–“ / „Eigene“ / „Alle“ (Radio-Gruppe) */
.vx-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--vx-line-input);
  border-radius: var(--vx-r);
  background: var(--vx-surface);
  vertical-align: middle;
}

.vx-seg label {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.vx-seg input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.vx-seg span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 3px;
  color: var(--vx-muted-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.vx-seg label:hover span {
  background: var(--vx-surface-3);
  color: var(--vx-ink);
}

.vx-seg input:checked + span {
  background: var(--vx-accent);
  color: var(--vx-on-accent);
}

/* Erste Option („–“ = kein Recht) neutral statt Akzent */
.vx-seg label:first-child input:checked + span {
  background: var(--vx-neutral-bg);
  color: var(--vx-ink);
}

.vx-seg input:focus-visible + span {
  outline: 2px solid var(--vx-accent);
  outline-offset: 1px;
}

.vx-seg input:disabled + span {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/* Schritte, Systemprüfung                                             */
/* ------------------------------------------------------------------ */
.vx-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: vx-step;
}

.vx-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--vx-muted);
  font-size: 13px;
  font-weight: 500;
  counter-increment: vx-step;
}

.vx-steps li + li::before {
  content: "";
  width: 24px;
  height: 1px;
  flex: none;
  margin-right: 0;
  background: var(--vx-line-input);
}

.vx-step-num {
  width: 24px;
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--vx-line-input);
  border-radius: var(--vx-r);
  background: var(--vx-surface);
  color: var(--vx-muted-2);
  font-family: var(--vx-font-head);
  font-size: 12px;
  font-weight: 600;
}

.vx-step-num:empty::before {
  content: counter(vx-step);
}

.vx-steps li.is-done {
  color: var(--vx-ink-2);
}

.vx-steps li.is-done .vx-step-num {
  border-color: transparent;
  background: var(--vx-accent-soft);
  color: var(--vx-accent-hover);
}

.vx-steps li.is-done + li::before {
  background: var(--vx-accent);
}

.vx-steps li.is-current,
.vx-steps li[aria-current="step"] {
  color: var(--vx-ink);
  font-weight: 600;
}

.vx-steps li.is-current .vx-step-num,
.vx-steps li[aria-current="step"] .vx-step-num {
  border-color: var(--vx-accent);
  background: var(--vx-accent);
  color: var(--vx-on-accent);
}

.vx-step-label {
  white-space: nowrap;
}

.vx-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vx-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--vx-line-2);
}

.vx-checklist li:last-child {
  border-bottom: 0;
}

.vx-checklist-icon {
  width: 22px;
  height: 22px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--vx-r-sm);
  background: var(--vx-neutral-bg);
  color: var(--vx-neutral);
}

.vx-checklist li.is-ok .vx-checklist-icon { background: var(--vx-ok-bg); color: var(--vx-ok); }
.vx-checklist li.is-warn .vx-checklist-icon { background: var(--vx-warn-bg); color: var(--vx-warn); }
.vx-checklist li.is-bad .vx-checklist-icon { background: var(--vx-bad-bg); color: var(--vx-bad); }

.vx-checklist-main {
  flex: 1 1 auto;
  min-width: 0;
}

.vx-checklist-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
}

.vx-checklist-detail {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-checklist li.is-bad .vx-checklist-detail { color: var(--vx-bad); }
.vx-checklist li.is-warn .vx-checklist-detail { color: var(--vx-warn); }

.vx-checklist-value {
  flex: none;
  max-width: 45%;
  font-family: var(--vx-font-mono);
  font-size: 12px;
  color: var(--vx-ink-2);
  text-align: right;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ */
/* Anmeldeseiten                                                       */
/* ------------------------------------------------------------------ */
.vx-auth {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--vx-surface);
}

.vx-auth--wide {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.vx-auth-side {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 40px 48px 32px;
  background: var(--vx-side);
  color: var(--vx-side-ink);
}

.vx-auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vx-auth-brand .vx-brand-logo,
.vx-auth-brand .vx-brand-mark {
  width: 52px;
  height: 52px;
}

.vx-auth-company {
  font-family: var(--vx-font-head);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--vx-side-ink);
  overflow-wrap: anywhere;
}

.vx-auth-product {
  margin-top: 3px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--vx-side-muted);
}

.vx-auth-claim {
  margin-top: auto;
  max-width: 420px;
}

.vx-auth-claim-text {
  font-family: var(--vx-font-head);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--vx-side-ink);
}

.vx-auth-claim-line {
  width: 40px;
  height: 3px;
  margin-bottom: 18px;
  background: var(--vx-accent);
}

.vx-auth-side-foot {
  font-size: 12px;
  color: var(--vx-side-muted);
}

.vx-auth-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 40px 32px 24px;
}

.vx-auth-center {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vx-auth-box {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.vx-auth--wide .vx-auth-box {
  max-width: 760px;
}

.vx-auth-mobilebrand {
  display: none;
}

.vx-auth-title {
  font-family: var(--vx-font-head);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.vx-auth-sub {
  margin-top: 6px;
  color: var(--vx-muted);
}

.vx-auth-foot {
  padding-top: 24px;
  font-size: 12px;
  color: var(--vx-muted);
  text-align: center;
}

.vx-auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

/* 6-stelliges Code-Feld */
.vx-otp,
.vx-field input.vx-otp {
  width: 100%;
  max-width: 280px;
  height: 56px;
  padding: 0 0 0 0.45em;
  border: 1px solid var(--vx-line-input);
  border-radius: var(--vx-r);
  background: var(--vx-surface);
  color: var(--vx-ink);
  font-family: var(--vx-font-mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.45em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vx-otp::placeholder {
  color: var(--vx-placeholder);
}

.vx-otp:focus {
  border-color: var(--vx-accent);
  outline: 2px solid var(--vx-accent);
  outline-offset: -1px;
}

/* Ersatzcodes */
.vx-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vx-codes li {
  padding: 8px 10px;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-r);
  background: var(--vx-surface-2);
  font-family: var(--vx-font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-align: center;
}

.vx-codes li.is-used {
  color: var(--vx-muted);
  text-decoration: line-through;
}

/* QR-Code-Fläche */
.vx-qr {
  display: inline-flex;
  align-self: flex-start;
  justify-self: start;
  padding: 8px;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-r-lg);
  background: #ffffff;
  line-height: 0;
}

.vx-qr svg,
.vx-qr canvas {
  display: block;
}

/* ------------------------------------------------------------------ */
/* Verlauf, Listen, Schlüssel/Wert, Fortschritt                        */
/* ------------------------------------------------------------------ */
.vx-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vx-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 52px 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 0;
}

.vx-timeline li::before {
  content: "";
  position: absolute;
  left: 76px;
  top: 40px;
  bottom: -4px;
  width: 1px;
  background: var(--vx-line-2);
}

.vx-timeline li:last-child::before {
  display: none;
}

.vx-timeline-time {
  padding-top: 5px;
  font-size: 12px;
  color: var(--vx-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vx-timeline-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--vx-r);
  background: var(--vx-surface-3);
  color: var(--vx-muted-2);
}

.vx-timeline-icon.is-accent { background: var(--vx-accent-soft); color: var(--vx-accent-hover); }
.vx-timeline-icon.is-ok { background: var(--vx-ok-bg); color: var(--vx-ok); }
.vx-timeline-icon.is-warn { background: var(--vx-warn-bg); color: var(--vx-warn); }
.vx-timeline-icon.is-bad { background: var(--vx-bad-bg); color: var(--vx-bad); }

.vx-timeline-text {
  padding-top: 4px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.vx-timeline-meta {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vx-list > li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--vx-line-2);
}

.vx-list > li:last-child {
  border-bottom: 0;
}

.vx-list--hover > li:hover {
  background: var(--vx-surface-2);
}

.vx-list--flush > li {
  padding-left: 0;
  padding-right: 0;
}

.vx-list-main {
  flex: 1 1 auto;
  min-width: 0;
}

.vx-list-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--vx-ink);
}

.vx-list-sub {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-list-side {
  flex: none;
  text-align: right;
  font-size: 12px;
  color: var(--vx-muted);
}

.vx-kv {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  margin: 0;
  font-size: 13px;
}

.vx-kv dt,
.vx-kv dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--vx-line-2);
}

.vx-kv dt {
  padding-right: 16px;
  color: var(--vx-muted);
}

.vx-kv dd {
  color: var(--vx-ink);
  overflow-wrap: anywhere;
}

.vx-kv dt:last-of-type,
.vx-kv dd:last-of-type {
  border-bottom: 0;
}

.vx-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--vx-line-2);
}

.vx-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--vx-accent);
  transition: width 0.3s ease;
}

.vx-progress--ok > span { background: var(--vx-ok); }
.vx-progress--warn > span { background: #b8770f; }
.vx-progress--bad > span { background: var(--vx-bad); }

.vx-progress--lg {
  height: 10px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------ */
/* Gestaltung: Farbvorschläge und Mini-Vorschau                        */
/* ------------------------------------------------------------------ */
.vx-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vx-swatch {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(21, 24, 29, 0.15);
  border-radius: var(--vx-r);
  background: var(--vx-accent);
}

.vx-swatch:hover {
  border-color: var(--vx-ink);
}

.vx-swatch[aria-pressed="true"] {
  outline: 2px solid var(--vx-ink);
  outline-offset: 2px;
}

.vx-preview {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 176px;
  overflow: hidden;
  border: 1px solid var(--vx-line);
  border-radius: var(--vx-r-lg);
  background: var(--vx-bg);
  font-size: 11px;
  -webkit-user-select: none;
  user-select: none;
}

.vx-preview-side {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 8px;
  background: var(--vx-side);
  color: var(--vx-side-ink);
}

.vx-preview-brand {
  margin: 0 4px 8px;
  font-family: var(--vx-font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.vx-preview-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: var(--vx-r-sm);
  color: var(--vx-side-ink);
  white-space: nowrap;
  overflow: hidden;
}

.vx-preview-link::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.vx-preview-link.is-active {
  background: var(--vx-accent);
  color: var(--vx-on-accent);
}

.vx-preview-title {
  margin: 4px 4px 2px;
  color: var(--vx-side-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.vx-preview-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.vx-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--vx-line);
  background: var(--vx-surface);
}

.vx-preview-search {
  flex: 1 1 auto;
  max-width: 140px;
  height: 18px;
  border: 1px solid var(--vx-line-strong);
  border-radius: 3px;
  background: #f9f9f7;
}

.vx-preview-btn {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 3px;
  background: var(--vx-accent);
  color: var(--vx-on-accent);
  font-weight: 600;
}

.vx-preview-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 10px 10px;
}

.vx-preview-h {
  font-family: var(--vx-font-head);
  font-size: 13px;
  font-weight: 600;
  color: var(--vx-ink);
}

.vx-preview-card {
  padding: 8px;
  border: 1px solid var(--vx-line);
  border-radius: 4px;
  background: var(--vx-surface);
  color: var(--vx-muted-2);
}

.vx-preview-card a,
.vx-preview-link-text {
  color: var(--vx-accent);
  font-weight: 500;
}

.vx-preview-bar {
  height: 3px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--vx-line-2);
  overflow: hidden;
}

.vx-preview-bar::after {
  content: "";
  display: block;
  width: 62%;
  height: 100%;
  background: var(--vx-accent);
}

/* ------------------------------------------------------------------ */
/* Kopieren-Rückmeldung                                                */
/* ------------------------------------------------------------------ */
[data-vx-copy] {
  position: relative;
}

[data-vx-copy].is-copied::after {
  content: "Kopiert";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: 50;
  padding: 3px 7px;
  border-radius: var(--vx-r-sm);
  background: var(--vx-ink);
  color: #ffffff;
  font-family: var(--vx-font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Hilfsklassen (sparsam verwenden)                                    */
/* ------------------------------------------------------------------ */
.vx-muted { color: var(--vx-muted); }
.vx-ink { color: var(--vx-ink); }
.vx-ok-text { color: var(--vx-ok); }
.vx-warn-text { color: var(--vx-warn); }
.vx-bad-text { color: var(--vx-bad); }
.vx-small { font-size: 12px; }
.vx-strong { font-weight: 600; }
.vx-mono { font-family: var(--vx-font-mono); font-size: 0.95em; }
.vx-num { font-family: var(--vx-font-head); font-weight: 600; font-variant-numeric: tabular-nums; }
.vx-right { text-align: right; }
.vx-center { text-align: center; }
.vx-nowrap { white-space: nowrap; }
.vx-break { overflow-wrap: anywhere; }
.vx-block { display: block; }
.vx-w-full { width: 100%; }

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

.vx-mt-0 { margin-top: 0 !important; }
.vx-mt-1 { margin-top: 4px !important; }
.vx-mt-2 { margin-top: 8px !important; }
.vx-mt-3 { margin-top: 12px !important; }
.vx-mt-4 { margin-top: 16px !important; }
.vx-mt-5 { margin-top: 24px !important; }

.vx-gap-1 { gap: 4px !important; }
.vx-gap-2 { gap: 8px !important; }
.vx-gap-3 { gap: 12px !important; }
.vx-gap-4 { gap: 16px !important; }
.vx-gap-5 { gap: 24px !important; }

.vx-only-mobile { display: none !important; }

/* ------------------------------------------------------------------ */
/* Responsiv                                                           */
/* ------------------------------------------------------------------ */
@media (max-width: 1279px) {
  .vx-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  .vx-grid--main {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1099px) {
  .vx-grid--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Schublade statt fester Seitenleiste */
@media (max-width: 959px) {
  :root {
    --vx-pad-x: 16px;
  }

  .vx-side {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 60;
    width: min(300px, 86vw);
    height: auto;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .vx-app.is-nav-open .vx-side {
    transform: none;
    visibility: visible;
    transition: transform 0.2s ease, visibility 0s;
  }

  .vx-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(21, 24, 29, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  }

  .vx-app.is-nav-open .vx-scrim {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0s;
  }

  html.vx-lock,
  html.vx-lock body {
    overflow: hidden;
  }

  .vx-top .vx-menu-toggle {
    display: inline-flex;
  }

  .vx-top {
    gap: 8px;
    padding: 8px var(--vx-pad-x);
  }

  .vx-search {
    flex: 1 1 auto;
  }

  .vx-search input {
    padding-right: 10px;
    font-size: 16px; /* verhindert Zoom auf iOS */
  }

  .vx-search-kbd,
  .vx-profile-text,
  .vx-profile > svg,
  .vx-btn-label {
    display: none;
  }

  .vx-top-actions {
    gap: 6px;
  }

  .vx-top-actions > .vx-menu > .vx-btn {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .vx-top-actions > .vx-menu > .vx-btn > svg:last-child:not(:first-child) {
    display: none;
  }

  .vx-profile {
    padding: 0;
    width: 38px;
    justify-content: center;
  }

  .vx-content {
    padding: 18px var(--vx-pad-x) 20px;
    gap: 16px;
  }

  .vx-pagehead h1 {
    font-size: 22px;
  }

  .vx-pagehead-sub {
    font-size: 13px;
  }

  .vx-foot {
    justify-content: center;
    text-align: center;
  }

  /* Tabellen scrollen waagerecht statt umzubrechen */
  .vx-table th,
  .vx-table td {
    white-space: nowrap;
  }

  .vx-table td.is-wrap {
    white-space: normal;
    min-width: 200px;
  }

  .vx-card-head {
    padding: 12px 14px;
  }

  .vx-card-body {
    padding: 14px;
  }

  .vx-card-foot {
    padding: 10px 14px;
  }

  .vx-list > li {
    padding: 11px 14px;
  }

  .vx-table th:first-child,
  .vx-table td:first-child {
    padding-left: 14px;
  }

  .vx-table th:last-child,
  .vx-table td:last-child {
    padding-right: 14px;
  }

  .vx-kpi {
    flex-basis: 140px;
    padding: 12px 14px 12px;
  }

  .vx-kpi-value {
    font-size: 26px;
  }

  .vx-kpi-unit {
    font-size: 13px;
  }

  .vx-kpi-bar {
    margin-top: 10px;
  }

  .vx-steps .vx-step-label {
    display: none;
  }

  .vx-steps li.is-current .vx-step-label,
  .vx-steps li[aria-current="step"] .vx-step-label {
    display: inline;
  }

  .vx-steps li + li::before {
    width: 12px;
  }

  .vx-matrix th:first-child,
  .vx-matrix td:first-child {
    min-width: 150px;
    padding-left: 14px;
  }

  .vx-only-mobile { display: revert !important; }
  .vx-hide-mobile { display: none !important; }

  /* Anmeldung: nur Formular */
  .vx-auth,
  .vx-auth--wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .vx-auth-side {
    display: none;
  }

  .vx-auth-main {
    padding: 24px 16px 16px;
  }

  .vx-auth-center {
    align-items: flex-start;
  }

  .vx-auth-mobilebrand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--vx-line-2);
  }

  .vx-auth-mobilebrand .vx-brand-mark {
    border-color: var(--vx-line-input);
    color: var(--vx-muted);
  }

  .vx-auth-mobilebrand .vx-brand-logo {
    border: 1px solid var(--vx-line);
  }

  .vx-auth-mobilebrand .vx-auth-company {
    color: var(--vx-ink);
    font-size: 16px;
  }

  .vx-auth-mobilebrand .vx-auth-product {
    color: var(--vx-muted);
  }
}

@media (max-width: 599px) {
  .vx-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .vx-kv {
    grid-template-columns: minmax(0, 1fr);
  }

  .vx-kv dt {
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 12px;
  }

  .vx-kv dd {
    padding-top: 2px;
  }

  .vx-pagehead-actions {
    width: 100%;
  }

  .vx-timeline li {
    grid-template-columns: 44px 28px minmax(0, 1fr);
  }

  .vx-timeline li::before {
    left: 68px;
  }

  .vx-dialog-foot .vx-btn {
    flex: 1 1 auto;
  }

  .vx-preview {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}

/* Feiner Zeiger (Maus): kein großer Tippbereich nötig */
@media (hover: none) {
  .vx-table tbody tr:hover > td,
  .vx-table tbody tr:hover > th {
    background: transparent;
  }
}

/* ------------------------------------------------------------------ */
/* Bewegung reduzieren                                                 */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------------------ */
/* Druckansicht                                                        */
/* ------------------------------------------------------------------ */
@media print {
  :root {
    --vx-pad-x: 0;
  }

  body,
  .vx-app,
  .vx-main {
    background: #ffffff;
  }

  .vx-side,
  .vx-top,
  .vx-scrim,
  .vx-menu-toggle,
  .vx-skip,
  .vx-flash-stack,
  .vx-pagehead-actions,
  .vx-alert-close,
  .vx-no-print {
    display: none !important;
  }

  .vx-app {
    display: block;
  }

  .vx-content {
    max-width: none;
    padding: 0;
  }

  .vx-foot {
    border-top: 1px solid #cccccc;
    background: #ffffff;
    padding: 8px 0 0;
  }

  .vx-card,
  .vx-kpis,
  .vx-table tr,
  .vx-list > li {
    break-inside: avoid;
  }

  .vx-grid--2,
  .vx-grid--3,
  .vx-grid--main {
    grid-template-columns: minmax(0, 1fr);
  }

  .vx-table-wrap,
  .vx-matrix-wrap {
    overflow: visible;
    max-height: none;
  }

  .vx-table tbody tr:hover > td {
    background: transparent;
  }

  a {
    color: inherit;
  }

  .vx-plate,
  .vx-plate-eu,
  .vx-badge,
  .vx-kpi-bar > span,
  .vx-progress > span {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ---------------------------------------------------------------- Aufklappbare Details (z. B. Änderungen im Protokoll) */
.vx-table details > summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:6px}
.vx-table details > summary::-webkit-details-marker{display:none}
.vx-table details > summary::before{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .15s;flex:none}
.vx-table details[open] > summary::before{transform:rotate(45deg)}
.vx-table details > :not(summary){margin-top:8px;white-space:normal}

/* ---------------------------------------------------------------- Blättern */
.vx-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:13px;color:var(--vx-muted)}
.vx-pager-links{display:flex;gap:6px}

/* Links und Texte in der Werte-Spalte der Checkliste in normaler Schrift */
.vx-checklist-value a,.vx-checklist-value .vx-muted{font-family:var(--vx-font);font-size:13px}
.vx-card > .vx-checklist > li{padding-right:18px}
