/* ============================================================================
   FOXSOLUTION DESIGN SYSTEM — LAYER 2: HELLES PRODUKT-UI
   ----------------------------------------------------------------------------
   Für Anwendungen / Tools / Admin-Oberflächen: warmes Off-White, Petrol als
   Markenfarbe, ruhige Flächen, Mono für alles Technische.

   Setzt foxsolution-tokens.css voraus.
   ========================================================================= */

/* ─────────────────────────────────────────────────────────────────────────
   RESET + BASIS
   ───────────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body, #root { height: 100%; }

html {
  /* Scrollbar-Platz immer reservieren, sonst springt das Layout beim
     Seitenwechsel um ~15px horizontal. */
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';   /* Inter: einstöckiges a/g — Marken-Detail */
  overflow-y: scroll;                      /* Fallback für scrollbar-gutter */
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--ls-headline);
  color: var(--color-ink);
}

::selection { background: rgba(14, 79, 107, 0.22); color: var(--color-ink); }

/* ─────────────────────────────────────────────────────────────────────────
   FOCUS + DISABLED — global, nicht pro Komponente
   ───────────────────────────────────────────────────────────────────────── */
*:focus { outline: none; }
*:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  box-shadow: var(--focus-ring);
  border-color: var(--color-primary);
}

button:disabled, .btn:disabled, input:disabled, select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: saturate(0.7);
}

/* ─────────────────────────────────────────────────────────────────────────
   SHELL: Topbar + Page
   ───────────────────────────────────────────────────────────────────────── */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.top-bar-wrap {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  background: rgba(250, 251, 252, 0.85);
  -webkit-backdrop-filter: saturate(1.8) blur(10px);
  backdrop-filter: saturate(1.8) blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  max-width: var(--shell-max);
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 1600px) {
  .top-bar { padding-left: 48px; padding-right: 48px; }
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 15px;
  letter-spacing: -0.01em;
  flex: 0 0 auto;
}
.brand .brand-mark { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.brand .brand-sub  { color: var(--color-primary); font-weight: 600; }

/* Zentrierte Pill-Navigation: nimmt den Rest der Zeile, zentriert sich selbst.
   Nie position:absolute — kollidiert auf schmalen Viewports mit der Marke. */
.top-bar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--color-surface);
  padding: 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.top-bar-nav::-webkit-scrollbar { display: none; }

.nav-item {
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--color-muted);
  transition: all 180ms var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.nav-item:hover { color: var(--color-ink); }
.nav-item.is-active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(14, 79, 107, 0.25);
}

/* Wortmarke statt Navigation (z. B. auf Übersichtsseiten) */
.top-bar-wordmark {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: var(--ls-headline);
  color: var(--color-primary);
  user-select: none;
  pointer-events: none;
  min-width: 0;
}

.top-bar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: var(--fs-label);
  color: var(--color-muted);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  gap: 2px;
}
.top-bar-meta strong {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--color-ink);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.page {
  flex: 1;
  padding: 24px 40px 48px;
  max-width: var(--shell-max);
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 1600px) {
  .page { padding-left: 56px; padding-right: 56px; }
}

/* ─────────────────────────────────────────────────────────────────────────
   SEITENKOPF — Eyebrow-Punkt, XXL-Headline, Badge-Zeile
   ───────────────────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  gap: 32px;
}
.page-header-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.page-header-label::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(14, 79, 107, 0.15);
}
.page-header h1 {
  font-size: var(--fs-page-h1);
  line-height: var(--lh-tight);
  font-weight: 700;
  letter-spacing: var(--ls-hero);
  margin-bottom: 14px;
}
.page-header-sub { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-header-sub .section-label {
  color: var(--color-primary);
  font-weight: 600;
  font-size: var(--fs-body);
}

.section + .section { margin-top: 32px; }

/* ─────────────────────────────────────────────────────────────────────────
   BADGES — immer Mono, uppercase, Pill
   ───────────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-success  { background: var(--color-success-bg);      color: var(--color-success); }
.badge-warn     { background: var(--color-warn-bg);         color: var(--color-warn); }
.badge-pending  { background: var(--color-accent-amber-bg); color: var(--color-accent-amber); }
.badge-integrity{ background: var(--color-accent-amber-bg); color: var(--color-accent-amber); }
.badge-neutral  { background: var(--color-surface-2);       color: var(--color-muted); }

/* ─────────────────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-body);
  transition: all var(--dur-base) var(--ease);
  letter-spacing: -0.005em;
}
.btn:focus-visible { box-shadow: var(--focus-ring); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  background: var(--color-primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary-hover);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border: 1px solid var(--color-border-strong);
}
.btn-secondary:hover { border-color: var(--color-ink); }

.btn-danger {
  background: var(--color-danger);
  color: #fff;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.25);
}
.btn-danger:hover {
  background: var(--color-danger-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.btn-ghost { color: var(--color-muted); padding: 8px 14px; }
.btn-ghost:hover { color: var(--color-ink); }

.btn:disabled:hover { transform: none; box-shadow: 0 2px 10px rgba(14, 79, 107, 0.15); }

/* Inline-Textbutton — sieht wie ein Link aus, ist aber ein <button> */
.link-btn {
  background: none;
  border: none;
  padding: 1px 4px;
  font: inherit;
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  border-radius: 3px;
  transition: background-color var(--dur-fast) var(--ease);
}
.link-btn:hover {
  background-color: rgba(14, 79, 107, 0.08);
  text-decoration-thickness: 2px;
}

/* Schließen-Button — 32×32 Trefferfläche, × wirkt trotzdem nicht dominant */
.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 18px;
  line-height: 1;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.close-btn:hover { background: var(--color-surface-2); color: var(--color-ink); }

/* ─────────────────────────────────────────────────────────────────────────
   CARDS + GRID
   ───────────────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 24px;
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-card-title);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
}
.card-subtitle {
  color: var(--color-muted);
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: var(--ls-label);
  font-weight: 600;
}

/* Kanonisches Zwei-Spalten-Layout: Inhalt 2fr, Seitenleiste 1fr */
.grid-main {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* ─────────────────────────────────────────────────────────────────────────
   METRIKEN — Display-Font, Petrol, große Zahl
   ───────────────────────────────────────────────────────────────────────── */
.metric {
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.metric:first-of-type { border-top: none; }
.metric-label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  color: var(--color-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.metric-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: var(--ls-headline);
  line-height: 1;
}
.metric-delta { font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.04em; }
.metric-delta.positive { color: var(--color-primary); }
.metric-delta.negative { color: var(--color-accent-red); }
.metric-delta.neutral  { color: var(--color-muted); }

/* ─────────────────────────────────────────────────────────────────────────
   TABELLEN
   ───────────────────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px 16px;
  gap: 16px;
  flex-wrap: wrap;
}
.table-head h2 {
  font-size: var(--fs-card-title);
  color: var(--color-primary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--color-surface-2); }
th {
  text-align: left;
  padding: 12px 24px;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  color: var(--color-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
}
td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-body);
  color: var(--color-ink);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr {
  transition: background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  position: relative;
}
tbody tr:hover { background: rgba(14, 79, 107, 0.025); }
tbody tr[data-clickable="true"] { cursor: pointer; }
tbody tr[data-clickable="true"]:hover { background-color: rgba(14, 79, 107, 0.04); }
tbody tr[data-selected="true"] {
  background-color: var(--color-primary-100) !important;
  box-shadow: inset 3px 0 0 var(--color-primary);
}
tbody tr:focus-visible {
  background-color: rgba(14, 79, 107, 0.06);
  box-shadow: inset 3px 0 0 var(--color-primary), var(--focus-ring);
}
td.mono { font-family: var(--font-mono); font-size: var(--fs-body-sm); color: var(--color-muted); }
td.num  { font-family: var(--font-mono); font-weight: 600; color: var(--color-primary); }

/* ─────────────────────────────────────────────────────────────────────────
   FORMULARE
   ───────────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-body);
  font-family: var(--font-body);
  color: var(--color-ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
}
.input:hover:not(:disabled) { border-color: var(--color-border-strong); }
.input:focus {
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
  background: var(--color-surface);
}
.input:disabled { background: var(--color-surface-2); color: var(--color-muted); cursor: not-allowed; }
textarea.input { resize: vertical; min-height: 80px; line-height: var(--lh-relaxed); }

/* Placeholder: --color-muted (5.20:1) statt muted-2 (4.13:1 → fällt durch).
   opacity:1 pinnen, sonst dimmen manche Browser zusätzlich um 50 %. */
input::placeholder, textarea::placeholder { color: var(--color-muted); opacity: 1; }

/* Suchfeld — gefüllte Fläche, wird beim Fokus weiß */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-surface-2);
  padding: 9px 14px;
  border-radius: var(--radius-md);
  min-width: 280px;
  border: 1px solid transparent;
}
.search:focus-within { border-color: var(--color-primary); background: var(--color-surface); }
.search svg { width: 14px; height: 14px; color: var(--color-muted); flex-shrink: 0; }
.search input { flex: 1; border: none; background: transparent; outline: none; font-size: var(--fs-body-sm); }

/* ─────────────────────────────────────────────────────────────────────────
   CHIPS / PILLS
   ───────────────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  /* 14px statt 999px: bei mehrzeiligem Inhalt werden Pills sonst zu
     unlesbaren "Bögen". Einzeilig sieht 14px identisch aus. */
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: var(--fs-meta);
  color: var(--color-ink);
  cursor: pointer;
  transition: all 140ms var(--ease);
  font-family: inherit;
  max-width: 100%;
  text-align: left;
}
.chip:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-100);
  transform: translateY(-1px);
}
.chip:active { transform: translateY(0); }
.chip-prefix {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-100);
  letter-spacing: 0.04em;
  padding: 2px 5px;
  border-radius: 3px;
  margin-right: 6px;
}

/* Technische ID — überall gleich: Mono, Petrol auf Primary-100 */
.id-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--color-primary);
  background: var(--color-primary-100);
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* Abschnittslabel innerhalb einer Card */
.sec-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted-2);
  margin: 14px 0 6px;
}

/* ─────────────────────────────────────────────────────────────────────────
   FORTSCHRITT
   ───────────────────────────────────────────────────────────────────────── */
.cov { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cov-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted-2);
  white-space: nowrap;
}
.cov-bar {
  flex: 1;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-border);
  overflow: hidden;
}
.cov-fill {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #0E4F6B 0%, #2F7A7A 100%);
  transition: width 0.5s var(--ease);
}
.cov-count {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}
.cov-count.is-full { color: var(--color-success); }

/* Verteilungsbalken (Anteile in einer Leiste) */
.distribution-bar {
  display: flex;
  height: 10px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 4px 0 8px;
}
.distribution-bar > div { height: 100%; }
.distribution-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-label);
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────────────────────────────────────
   HINWEIS-BOXEN
   ───────────────────────────────────────────────────────────────────────── */
.note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.55;
}
.note svg { margin-top: 3px; flex-shrink: 0; }
.note-success { background: #E9F3EC; border: 1px solid #BFDCC9; color: var(--color-success); }
.note-warn    { background: var(--color-warn-bg); border: 1px solid #EFC3BB; color: var(--color-warn); }
.note-info    { background: var(--color-primary-100); border: 1px solid #C9DEE7; color: var(--color-primary); }

/* Platzhalter für unbefüllte Werte ([TBD], leere Slots) */
.placeholder-token {
  color: var(--color-accent-amber);
  background: rgba(184, 112, 42, 0.10);
  border-radius: 4px;
  padding: 0 3px;
  font-style: normal;
}

/* ─────────────────────────────────────────────────────────────────────────
   LEERZUSTAND — gestrichelte Kontur, nie leere weiße Fläche
   ───────────────────────────────────────────────────────────────────────── */
.placeholder-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border-strong);
  padding: 48px;
  text-align: center;
  color: var(--color-muted);
}
.placeholder-panel .placeholder-mark {
  font-family: var(--font-display);
  font-size: var(--fs-body);
  color: var(--color-primary);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 12px;
}
.placeholder-panel h3 { font-size: 24px; color: var(--color-ink); margin-bottom: 8px; }
.placeholder-panel p {
  max-width: 480px;
  margin: 0 auto 20px;
  font-size: var(--fs-body);
  color: var(--color-muted);
  line-height: 1.6;
}
.placeholder-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
  text-align: left;
}
.placeholder-step {
  background: var(--color-surface-2);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.placeholder-step-num {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  margin-bottom: 6px;
}
.placeholder-step-title { font-weight: 600; font-size: var(--fs-body); color: var(--color-ink); margin-bottom: 4px; }
.placeholder-step-desc  { font-size: var(--fs-meta); color: var(--color-muted); line-height: 1.5; }

/* ─────────────────────────────────────────────────────────────────────────
   MODAL
   ───────────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: rgba(10, 31, 46, 0.42);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  animation: fox-overlay-fade 180ms var(--ease-out);
}
@keyframes fox-overlay-fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: min(1600px, 97vw);
  max-height: 92vh;
  /* Flex-Spalte: Kopf flex:0, Scroll-Body flex:1 — vermeidet
     Sticky-Header-Fehlverhalten. */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fox-modal-appear var(--dur-slow) var(--ease-out);
}
.modal-header { flex: 0 0 auto; }
.modal-body   { flex: 1; overflow-y: auto; }
@keyframes fox-modal-appear {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─────────────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 48px;
  color: var(--color-muted);
  font-size: var(--fs-meta);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}
.footer-links { display: flex; gap: 28px; }
.footer-links a:hover { color: var(--color-ink); }

/* ─────────────────────────────────────────────────────────────────────────
   LADEZUSTÄNDE — Shimmer-Skeleton statt grauer Block
   ───────────────────────────────────────────────────────────────────────── */
.skel {
  border-radius: 8px;
  background: linear-gradient(90deg,
    rgba(14, 79, 107, 0.08) 25%,
    rgba(14, 79, 107, 0.16) 37%,
    rgba(14, 79, 107, 0.08) 63%);
  background-size: 400% 100%;
  animation: fox-skel-shimmer 1.3s var(--ease) infinite;
}
@keyframes fox-skel-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
.skel-eyebrow { width: 120px; height: 12px; margin-bottom: 10px; }
.skel-title   { width: min(320px, 60%); height: 28px; margin-bottom: 18px; }
.skel-bar     { width: 100%; max-width: 560px; height: 38px; margin-bottom: 18px; }
.skel-block   { width: 100%; height: 260px; }

.spinner {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(14, 79, 107, 0.25);
  border-top-color: var(--color-primary);
  animation: fox-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes fox-spin { to { transform: rotate(360deg); } }

/* Inhalt nach dem Laden einblenden */
.appear { animation: fox-appear var(--dur-xslow) var(--ease-out) both; }
@keyframes fox-appear {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────────────────
   SCROLLBARS
   ───────────────────────────────────────────────────────────────────────── */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--color-bg); }
*::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-bg);
}
*::-webkit-scrollbar-thumb:hover { background: var(--color-muted-2); }

/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE — ein Hauptbruch bei 1100px
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid-main { grid-template-columns: 1fr; }
  .page { padding: 20px 24px 40px; }
  .top-bar { padding: 16px 24px; flex-wrap: wrap; gap: 12px; }
  /* Marke links, Nutzer-Cluster rechts, Navigation in eigene Zeile.
     `order` entkoppelt visuelle von DOM-Reihenfolge. */
  .top-bar .brand         { order: 1; flex: 0 0 auto; }
  .top-bar .top-bar-right { order: 2; margin-left: auto; }
  .top-bar .top-bar-nav,
  .top-bar .top-bar-wordmark { order: 3; flex: 1 0 100%; margin-top: 4px; }
}

/* ─────────────────────────────────────────────────────────────────────────
   REDUCED MOTION — Pflicht, nicht optional
   ───────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .skel, .spinner { animation: none !important; }
}
