/* SoundMap Suite – Geteiltes Stylesheet
 * CSS-Variablen + Header- + Sidebar-Komponenten + gemeinsame Komponenten.
 * Wird in jede Seite via <link rel="stylesheet" href="shared/styles.css"> eingebunden.
 */

/* ============================================================
   THEME-SYSTEM (2026-06)
   Dark  = "Graphite + Lime"  (Default)
   Light = "Daylight FOH"     (body.theme-light)
   Umschalter im Header (ui-mode.js). Plots behalten bewusst ihren
   dunklen Stil in BEIDEN Themes (Profi-Standard wie Smaart/REW).
   ============================================================ */
:root {
  --bg: #0E0F12;
  --surface: #17181C;
  --surface2: #222329;
  --surface3: #2A2C33;
  --input-bg: #1B1C21;
  --plot-bg: #0B0C0F;            /* bleibt in beiden Themes dunkel */
  --accent: #C8F542;
  --accent-soft: rgba(200, 245, 66, 0.16);
  --accent-contrast: #1A1F08;    /* Text AUF Akzent-Flaechen */
  --text: #F2F3F5;
  --text-muted: #8B8F98;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.16);
  --danger: #FF5C5C;
  --danger-soft: rgba(255, 92, 92, 0.18);
  --success: #4ADE80;
  --warning: #FFB454;
  --radius: 8px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.55);

  /* Festes Farb-Set — neue Styles bitte NUR Tokens, keine Hex-Werte: */
  --info: #B9C2CF;      /* Beschriftungen / Sektionstitel */
  --ok: #4ADE80;        /* positiv / verbunden / fertig */
  --warn: #FFB454;      /* Achtung / Sub-Kurven / Bypass */
  --phase: #6ec8ff;     /* Top-/Phase-Kurven (Plot-Welt) */

  /* Schrift-Raster: 11 Hinweise · 13 Standard · 15 Werte · 20 Titel */
  --fs-hint: 11px;
  --fs-base: 13px;
  --fs-value: 15px;
  --fs-title: 20px;

  --suite-header-h: 72px;
  --suite-sidebar-w: 240px;
}

/* ---------- LIGHT: "Daylight FOH" — fuers Arbeiten bei Tageslicht ---------- */
body.theme-light {
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --surface2: #EAEEF3;
  --surface3: #DDE3EA;
  --input-bg: #FFFFFF;
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-contrast: #FFFFFF;
  --text: #1A2230;
  --text-muted: #5A6675;
  --border: rgba(16, 24, 40, 0.08);
  --border-strong: rgba(16, 24, 40, 0.20);
  --danger: #DC2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --success: #16A34A;
  --warning: #D97706;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.14);
  --info: #3B4A63;
  --ok: #16A34A;
  --warn: #D97706;
}

/* ------------------------------------------------------------------ Header */

#suite-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--suite-header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border-strong);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  user-select: none;
}

#suite-header .suite-row1 {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 16px;
  gap: 24px;
}

#suite-header .suite-brand {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
  flex-shrink: 0;
}

#suite-header .suite-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}

#suite-header .suite-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;              /* iPad-Touch-Mindestmass */
  padding: 0 14px 0 6px;
  border-radius: 22px;            /* Pill-Look */
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms, transform 120ms;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#suite-header .suite-tab__step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.10);
  font-variant-numeric: tabular-nums;
}
#suite-header .suite-tab__step--done {
  background: rgba(54,211,153,0.15);
  border-color: rgba(54,211,153,0.55);
  color: #36d399;
}
#suite-header .suite-tab__step--active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
#suite-header .suite-tab__label {
  font-weight: 600;
  letter-spacing: 0.02em;
}
#suite-header .suite-tab:hover:not(.disabled):not(.active) {
  background: var(--surface2);
  color: var(--text);
}
#suite-header .suite-tab.active {
  background: var(--accent-soft);
  color: var(--text);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(200,245,66,0.15);
}
#suite-header .suite-tab.done:not(.active) .suite-tab__label {
  color: var(--text);
}
#suite-header .suite-tab.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Auf engen Bildschirmen: Labels weglassen, nur Step-Nummer */
@media (max-width: 880px) {
  #suite-header .suite-tab__label { display: none; }
  #suite-header .suite-tab { padding: 0 6px; }
}

/* ============================================================
   EDGE-TAB — wiederverwendbare Pfeil-Lasche am Panel-Rand
   ============================================================
   Verwendung:
     <button class="edge-tab left">  <svg-chevron-rechts>  </button>
     <button class="edge-tab right"> <svg-chevron-links>   </button>
   Wenn die Parent-Klasse `.collapsed` traegt, dreht sich der Pfeil.
   ============================================================ */
.edge-tab {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  z-index: 11;
  box-shadow: 0 4px 12px rgba(0,0,0,0.30);
  padding: 0;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 120ms, background 120ms, border-color 120ms;
}
.edge-tab:hover { color: var(--accent); border-color: var(--accent); background: var(--surface2); }
.edge-tab:active { background: var(--surface3); }

.edge-tab.left {
  left: -26px;
  border-right: none;
  border-radius: 9px 0 0 9px;
}
.edge-tab.right {
  right: -26px;
  border-left: none;
  border-radius: 0 9px 9px 0;
}
.edge-tab svg { transition: transform 0.22s; display: block; }
/* Wenn parent collapsed: Pfeil dreht 180° */
.collapsed > .edge-tab svg,
.is-collapsed > .edge-tab svg,
.tun-settings--collapsed > .edge-tab svg,
.sidebar-collapsed .edge-tab svg { transform: rotate(180deg); }

/* Touch-Variante: groesserer Tap-Bereich */
@media (pointer: coarse) {
  .edge-tab { width: 32px; height: 72px; }
  .edge-tab.left  { left: -32px; }
  .edge-tab.right { right: -32px; }
}

/* ============================================================
   GENERIC RIGHT-COLLAPSABLE PANEL (per edge-tabs.js attached)
   Schrumpft bei .is-collapsed auf 30px, verbirgt allen Inhalt
   ausser der Edge-Tab-Lasche.
   ============================================================ */
.right-collapsable {
  position: relative;
  overflow: visible !important;
  transition: width 0.22s ease, min-width 0.22s ease;
}
.right-collapsable.is-collapsed {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  flex: 0 0 30px !important;
}
.right-collapsable.is-collapsed > :not(.edge-tab) { display: none !important; }
/* Wenn collapsed: Pfeil dreht — zeigt jetzt "wieder aufklappen" Richtung */
.right-collapsable.is-collapsed > .edge-tab svg { transform: rotate(180deg); }
@media (pointer: coarse) {
  .right-collapsable.is-collapsed {
    width: 36px !important; min-width: 36px !important; max-width: 36px !important; flex-basis: 36px !important;
  }
}

/* ============================================================
   EASY/PRO-MODUS (suite-weit, shared/ui-mode.js)
   Easy blendet alles mit .pro-only aus und zeigt Next-Step-Banner.
   ============================================================ */
body.ui-easy .pro-only { display: none !important; }

.suite-mode-toggle {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  margin: 0 6px;
  flex-shrink: 0;
}
.suite-mode-btn {
  border: 0; background: transparent;
  color: var(--text-muted);
  font-family: inherit; font-size: 11px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 0 12px; min-height: 30px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 120ms, color 120ms;
}
.suite-mode-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
}
.suite-mode-btn:not(.active):hover { color: var(--text); }
@media (pointer: coarse) {
  .suite-mode-btn { min-height: 40px; padding: 0 14px; }
}

/* Next-Step-Banner als volle Leiste unter dem Header (Easy-Modus) */
.next-step-hint--bar {
  display: flex;
  margin: 0;
  border-radius: 0;
  border-left: 0; border-right: 0;
  padding: 8px 18px;
  font-size: 13px;
}

/* Theme-Umschalter (Hell/Dunkel) im Header */
.suite-theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  font-size: 15px; line-height: 1;
  cursor: pointer;
  margin: 0 2px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color 120ms, background 120ms;
}
.suite-theme-btn:hover { border-color: var(--accent); background: var(--surface2); }
@media (pointer: coarse) { .suite-theme-btn { width: 44px; height: 44px; font-size: 17px; } }

/* Build-Badge: zeigt aktuelle Version — hilft bei Cache-Problemen */
#suite-header .suite-build {
  display: inline-flex; align-items: center;
  padding: 2px 8px; margin: 0 6px;
  border-radius: 10px;
  font-size: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
/* SSL-Link oben im Header (ersetzt den Build-Badge): aktuelle Seite per HTTPS */
#suite-header .suite-ssl {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; margin: 0 6px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text-muted); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong); text-decoration: none; flex-shrink: 0;
  transition: color .13s, border-color .13s, background .13s;
}
#suite-header a.suite-ssl:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
#suite-header .suite-ssl .ico { font-size: 13px; }
#suite-header .suite-ssl.is-secure { color: var(--ok); border-color: rgba(74,222,128,0.4); }

#suite-header .suite-save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border-strong);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  user-select: none;
}
#suite-header .suite-save-indicator .dot {
  font-size: 10px;
  line-height: 1;
}
#suite-header .suite-save-indicator[data-status="clean"] .dot { color: var(--success); }
#suite-header .suite-save-indicator[data-status="clean"] .label { color: var(--text-muted); }
#suite-header .suite-save-indicator[data-status="dirty"] {
  border-color: var(--warning);
  background: rgba(245, 166, 35, 0.08);
}
#suite-header .suite-save-indicator[data-status="dirty"] .dot,
#suite-header .suite-save-indicator[data-status="dirty"] .label { color: var(--warning); }
#suite-header .suite-save-indicator[data-status="saving"] {
  border-color: var(--warning);
  background: rgba(245, 166, 35, 0.08);
}
#suite-header .suite-save-indicator[data-status="saving"] .dot {
  color: var(--warning);
  animation: suite-pulse 0.8s ease-in-out infinite;
}
#suite-header .suite-save-indicator[data-status="saving"] .label { color: var(--warning); }
#suite-header .suite-save-indicator[data-status="saved"] {
  border-color: var(--success);
  background: rgba(54, 211, 153, 0.10);
}
#suite-header .suite-save-indicator[data-status="saved"] .dot,
#suite-header .suite-save-indicator[data-status="saved"] .label { color: var(--success); }
#suite-header .suite-save-indicator[data-status="error"] {
  border-color: var(--danger);
  background: rgba(229, 84, 102, 0.12);
}
#suite-header .suite-save-indicator[data-status="error"] .dot,
#suite-header .suite-save-indicator[data-status="error"] .label { color: var(--danger); }
#suite-header .suite-save-indicator[data-status="recording"] {
  border-color: var(--danger);
  background: rgba(229, 84, 102, 0.10);
}
#suite-header .suite-save-indicator[data-status="recording"] .dot {
  color: var(--danger);
  animation: suite-pulse 0.6s ease-in-out infinite;
}
#suite-header .suite-save-indicator[data-status="recording"] .label { color: var(--danger); }
@keyframes suite-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

#suite-header .suite-lang {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
#suite-header .lang-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.04em;
}
#suite-header .lang-btn:hover { color: var(--text); }
#suite-header .lang-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}

#suite-header .suite-row2 {
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
#suite-header .suite-crumb .crumb-label { opacity: 0.7; }
#suite-header .suite-crumb .crumb-name {
  color: var(--text);
  font-weight: 500;
}
#suite-header .suite-crumb .crumb-empty {
  font-style: italic;
  opacity: 0.6;
}

/* ------------------------------------------------------------------ Sidebar */

#suite-sidebar {
  width: var(--suite-sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border-strong);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  overflow: visible;             /* damit edge-tab rausragen kann */
  order: 0;
  position: relative;
  transition: width .2s ease;
}
#suite-sidebar > .sidebar-inner {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
}

/* Alter Toggle-Button war oben rechts — wird nicht mehr genutzt, edge-tab ist neu.
   Klasse bleibt fuer Backward-Compat unsichtbar. */
.sidebar-collapse-toggle { display: none; }

/* Eingeklappte Variante: schmal, nur Icons */
#suite-sidebar.collapsed {
  width: 50px;
  align-items: center;
  gap: 8px;
}
#suite-sidebar.collapsed > .sidebar-inner {
  padding: 8px 4px;
  align-items: center;
  gap: 8px;
}
#suite-sidebar.collapsed .ico-row {
  width: 42px; height: 42px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}
#suite-sidebar.collapsed .ico-row span {
  font-size: 9px; opacity: 0.7; margin-top: 1px;
}
#suite-sidebar.collapsed .ico-row:hover { background: rgba(255,255,255,0.08); }
#suite-sidebar.collapsed .ico-save {
  width: 42px; height: 42px;
  border-radius: 6px;
  background: var(--accent, #1d6ddc);
  border: none; color: #fff;
  cursor: pointer; font-size: 18px;
  margin-top: auto;
}

/* Body-Klasse: Hauptbereich rueckt nach links */
body.sidebar-collapsed { /* Hook fuer Suite-Layouts */ }

#suite-sidebar.empty .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 12px 18px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
#suite-sidebar .empty-msg {
  color: var(--text-muted);
  font-style: italic;
}

#suite-sidebar .proj-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
  word-break: break-word;
}
#suite-sidebar .proj-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
  word-break: break-word;
}
#suite-sidebar hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0;
}

#suite-sidebar .ctx-section {
  margin-bottom: 4px;
}
#suite-sidebar .ctx-section h3 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 6px;
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
  min-height: 36px;
  display: flex; align-items: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#suite-sidebar .ctx-section h3:hover {
  background: var(--surface2);
  color: var(--text);
}
@media (max-width: 1024px), (pointer: coarse) {
  #suite-sidebar .ctx-section h3 { min-height: 44px; font-size: 12px; }
  #suite-sidebar .ctx-section li { min-height: 36px; padding: 6px 4px; }
}
#suite-sidebar .ctx-section ul {
  list-style: none;
  padding: 0 0 4px 8px;
  margin: 0;
  display: none;
}
#suite-sidebar .ctx-section.open ul { display: block; }
#suite-sidebar .ctx-section .ctx-section__body { display: none; padding: 6px 4px 8px; }
#suite-sidebar .ctx-section.open .ctx-section__body { display: block; }

/* Projects section (kollabierbare Projekt-Auswahl in der Sidebar) */
#suite-sidebar .ctx-section--projects .proj-list { padding: 0 0 4px 4px; }
#suite-sidebar .proj-list__item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  word-break: break-word;
  border-left: 2px solid transparent;
}
#suite-sidebar .proj-list__item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
#suite-sidebar .proj-list__item.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
  cursor: default;
}
#suite-sidebar .proj-list__name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}
#suite-sidebar .proj-list__badge {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
}
#suite-sidebar .proj-list__link {
  list-style: none;
  margin-top: 4px;
  padding: 4px 8px;
  font-size: 11px;
}
#suite-sidebar .proj-list__link a {
  color: var(--text-muted);
  text-decoration: none;
}
#suite-sidebar .proj-list__link a:hover {
  color: var(--accent);
  text-decoration: underline;
}
#suite-sidebar .ctx-section li {
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text);
  word-break: break-word;
}
#suite-sidebar .ctx-section li:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
#suite-sidebar .ctx-section li.empty {
  font-style: italic;
  color: var(--text-muted);
  cursor: default;
}
#suite-sidebar .ctx-section li.empty:hover { background: transparent; color: var(--text-muted); }

#suite-sidebar .btn-save {
  width: 100%;
  padding: 14px 12px;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.04em;
  margin-top: 12px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: filter 120ms, transform 80ms, box-shadow 120ms;
  box-shadow: 0 2px 8px rgba(200,245,66,0.20);
}
#suite-sidebar .btn-save:hover { filter: brightness(1.1); box-shadow: 0 4px 14px rgba(200,245,66,0.35); }
#suite-sidebar .btn-save:active { transform: scale(0.97); }
@media (max-width: 1024px), (pointer: coarse) {
  #suite-sidebar .btn-save { min-height: 56px; font-size: 15px; }
}
#suite-sidebar .btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#suite-sidebar .save-status {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  min-height: 14px;
}
#suite-sidebar .save-status.error { color: var(--danger); }
#suite-sidebar .save-status.ok { color: var(--success); }

/* ------------------------------------------------------------------ Layout-Anpassung */

/* Wird per JS aktiviert: <body class="suite-active"> */
body.suite-active {
  padding-top: var(--suite-header-h);
}
body.suite-active #suite-content {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  height: calc(100dvh - var(--suite-header-h));
  overflow: hidden;
}

/* ------------------------------------------------------------------ Gemeinsame Komponenten */

/* Legacy-Klassen — Geometrie identisch zum neuen .btn-System, damit
   ALLE Buttons der Suite gleich aussehen (eine Optik, ein Raster). */
.btn-primary, .btn-secondary, .btn-danger, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: var(--fs-base, 13px);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: filter 120ms, background 120ms, border-color 120ms, transform 80ms;
  font-family: inherit;
  line-height: 1;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.btn-primary:active, .btn-secondary:active, .btn-danger:active, .btn-ghost:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface3); }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { filter: brightness(1.1); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }

.btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled, .btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================
   UNIFIED BUTTON SYSTEM (NEU 2026-05-07)
   ----------------------------------------------------------------
   .btn               Base
   .btn--primary      Hervorgehobene Aktion
   .btn--ghost        Sekundär (transparent)
   .btn--ok           Bestätigung (Akzent)
   .btn--danger       Gefahr
   .btn--big          Größere Touch-Variante
   .btn--small        Kleinere Variante
   .btn--icon         Quadratisch, nur Icon
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
  transition: filter 120ms, background 120ms, border-color 120ms, color 120ms, transform 80ms;
  font-family: inherit;
  line-height: 1;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.btn:hover { background: var(--surface3); border-color: var(--accent); }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn--primary:hover { filter: brightness(1.1); border-color: var(--accent); }
.btn--ok      { background: rgba(78,201,176,0.18); color: #4ec9b0; border-color: rgba(78,201,176,0.4); }
.btn--ok:hover { background: rgba(78,201,176,0.28); }
.btn--danger  { background: var(--danger, #c0392b); color: #fff; border-color: rgba(231,76,60,0.7); }
.btn--danger:hover { filter: brightness(1.1); }
.btn--ghost   { background: transparent; color: var(--text-muted); border-color: var(--border-strong); }
.btn--ghost:hover { color: var(--text); border-color: var(--accent); background: rgba(255,255,255,0.04); }
.btn--big     { padding: 12px 20px; font-size: 14px; min-height: 48px; }
.btn--small   { padding: 5px 10px; font-size: 11px; min-height: 28px; gap: 4px; }
.btn--icon    { padding: 0; width: 36px; min-width: 36px; height: 36px; }
.btn--full    { width: 100%; }
.btn--active  { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.btn--push-right { margin-right: auto; }
.btn--danger-text { color: var(--danger, #c0392b); }
.btn--danger-text:hover { color: #ff6b6b; border-color: var(--danger, #c0392b); }

/* mini-btn = Alias zu btn--ghost btn--small (Bestand) */
.mini-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 5px 10px; border-radius: 4px;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-strong);
  font-size: 11px; font-weight: 600; cursor: pointer;
  font-family: inherit; line-height: 1; min-height: 28px;
  transition: color 120ms, border-color 120ms, background 120ms, transform 80ms;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.mini-btn:hover { color: var(--text); border-color: var(--accent); background: rgba(255,255,255,0.04); }
.mini-btn:active { transform: scale(0.96); }
.mini-btn.active, .mini-btn--active { color: var(--text); background: rgba(78,201,176,0.18); border-color: var(--accent); }
.mini-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* mode-btn (Mess-Modus-Wahl Zeit/Tonalitaet) */
.mode-btn {
  padding: 12px 10px; border-radius: 6px;
  border: 2px solid var(--border-strong);
  background: rgba(255,255,255,0.04);
  color: var(--text); cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 600;
  transition: background 120ms, border-color 120ms, color 120ms, transform 80ms;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  text-align: center;
}
.mode-btn:hover { border-color: var(--accent); }
.mode-btn:active { transform: scale(0.97); }
.mode-btn--active {
  border-color: var(--accent); background: rgba(78,201,176,0.15); color: var(--accent);
}
.mode-btn--accent2 { /* z.B. Tonalitaets-Modus aktiv */
  border-color: #7fd9d9; background: rgba(127,217,217,0.15); color: var(--info);
}

/* tun-mode-seg = Container fuer Easy/Profi Toggle */
.tun-mode-seg {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  font-size: 11px;
}

/* tun-mode-btn (Easy/Profi Schalter im Tuning) */
.tun-mode-btn {
  padding: 5px 12px; background: transparent; color: var(--text);
  border: none; cursor: pointer; font-family: inherit; font-size: 11px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  min-height: 30px; transition: background 120ms, color 120ms;
}
.tun-mode-btn.active { background: var(--accent); color: var(--accent-contrast); font-weight: 700; }

.align-subtabs { display: flex; gap: 4px; margin: 0 12px; }
/* align-subtab (Time / Bass im Alignment) */
.align-subtab {
  background: transparent; border: 1px solid var(--border);
  border-radius: 4px; padding: 5px 12px; font-size: 11px;
  color: var(--text-muted); cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  min-height: 30px; transition: color 120ms, border-color 120ms, background 120ms;
}
.align-subtab:hover { color: var(--text); border-color: var(--accent); }
.align-subtab.active {
  color: var(--accent); border-color: var(--accent);
  background: rgba(78,201,176,0.10);
}

/* seg__btn (Segmented-Control) */
.seg__btn, .target-bar__btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); padding: 5px 10px; font-size: 11px;
  cursor: pointer; font-family: inherit; min-height: 28px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: color 120ms, background 120ms, border-color 120ms;
}
.seg__btn:hover, .target-bar__btn:hover { color: var(--text); border-color: var(--accent); }
.seg__btn.active, .target-bar__btn.active {
  color: var(--accent); border-color: var(--accent);
  background: rgba(78,201,176,0.12);
}

/* tab__btn (Tab-Navigation in measurement) */
.tab__btn {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); padding: 8px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; min-height: 36px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: color 120ms, border-color 120ms;
}
.tab__btn:hover { color: var(--text); }
.tab__btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* phase-tab (Tuning-Sub-Phasen) */
.phase-tab {
  background: transparent; border: none; border-bottom: 3px solid transparent;
  color: var(--text-muted); padding: 10px 18px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; min-height: 40px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: color 120ms, border-color 120ms;
}
.phase-tab:hover { color: var(--text); }
.phase-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.ib-del { margin-left: 14px; }

/* ============================================================
   TUNING-SETTINGS-PANEL (rechtes Side-Drawer im Tuning-Modul)
   ============================================================ */
.phase-tabs--center {
  /* Phase-Tabs zentriert ohne Profil-Block links */
  justify-content: center;
}
.phase-tabs--center .phase-tabs__nav { flex: 1 1 auto; justify-content: center; }
.phase-tabs--center .phase-tabs__actions { flex: 0 0 auto; }

.tun-settings {
  position: fixed;
  top: var(--suite-header-h, 56px);
  right: 0;
  bottom: 0;
  width: 320px; max-width: 92vw;
  background: var(--input-bg);
  border-left: 1px solid var(--border-strong);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.4);
  z-index: 60;
  display: flex; flex-direction: column;
  transition: transform 220ms ease;
  font-size: 12px;
}
/* Collapsed: nur die Edge-Tab-Lasche (26px) ragt am rechten Rand raus */
.tun-settings--collapsed { transform: translateX(calc(100% - 26px)); }
@media (pointer: coarse) {
  .tun-settings--collapsed { transform: translateX(calc(100% - 32px)); }
}
.tun-settings__hd {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--accent);
}
.tun-settings__close {
  min-height: 32px; min-width: 32px; padding: 0;
  font-size: 18px; line-height: 1;
}
.tun-settings__body {
  flex: 1; overflow: auto; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.tun-settings__group {
  display: flex; flex-direction: column; gap: 6px;
}
.tun-settings__lbl {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  font-weight: 600;
}
.tun-settings__select {
  background: var(--surface2, #1a1f28);
  color: var(--text); border: 1px solid var(--border-strong);
  padding: 8px 10px; border-radius: 4px;
  font-size: 13px; font-family: inherit;
  min-height: 40px;
}
.tun-profile-readonly {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2, #1a1f28);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 13px; color: var(--accent);
  font-weight: 600;
}
.tun-profile-readonly .mini-btn { font-size: 10px; padding: 4px 8px; min-height: 26px; }
.tun-settings__badge {
  font-size: 11px; opacity: 0.8;
  padding: 4px 0; color: var(--text-muted);
  line-height: 1.4;
}
.tun-settings__hint {
  font-size: 11px; opacity: 0.75;
  padding: 6px 8px; border-radius: 4px;
  background: rgba(78,201,176,0.10);
  color: #9ee0c6; border-left: 2px solid var(--accent);
}
.tun-settings__hint--profi {
  background: rgba(246,173,85,0.10);
  color: #f6ad55;
  border-left-color: #f6ad55;
}
.tun-settings__constraints {
  font-size: 11px; line-height: 1.55;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 4px; padding: 8px 10px;
}
.cstr-row { padding: 2px 0; }
.cstr-row:not(:last-child) { border-bottom: 1px dashed rgba(255,255,255,0.05); }

/* ============================================================
   EQ-Plot: Floating Plus/Minus rechts unten + Empty-Hint
   ============================================================ */
.eq-fab-stack {
  position: absolute; right: 12px; bottom: 12px;
  display: flex; flex-direction: column; gap: 8px; z-index: 10;
}
.eq-fab {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--accent);
  background: rgba(0, 24, 47, 0.85);
  color: var(--text);
  font-size: 22px; font-weight: 700; line-height: 1;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 80ms, background 120ms;
}
.eq-fab:hover { background: var(--accent); color: var(--accent-contrast); }
.eq-fab:active { transform: scale(0.95); }
.eq-fab--minus { border-color: var(--danger, #e55466); }
.eq-fab--minus:hover { background: var(--danger, #e55466); color: #fff; }
@media (max-width: 1024px), (pointer: coarse) {
  .eq-fab { width: 56px; height: 56px; font-size: 26px; }
  .eq-fab-stack { right: 16px; bottom: 16px; gap: 12px; }
}
.eq-empty-hint {
  position: absolute; bottom: 14px; left: 14px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(246, 173, 85, 0.20);
  color: #ffd28a;
  border: 1px solid rgba(246, 173, 85, 0.4);
  font-size: 12px; pointer-events: none;
  opacity: 0; transition: opacity 250ms;
  z-index: 9;
}
.cstr-key {
  display: inline-block; min-width: 110px;
  color: var(--text-muted); font-weight: 600;
}

/* iPad / Tablet: Drawer voll-breiter */
@media (max-width: 1024px), (pointer: coarse) {
  .tun-settings { width: 380px; }
  .tun-settings__close { min-height: 44px; min-width: 44px; }
  .tun-settings__select { min-height: 44px; }
}
@media (max-width: 600px) {
  .tun-settings { width: 100%; max-width: 100%; }
}

/* ============================================================
   TOUCH / TABLET — globale Mindestmasse, gilt fuer alle Module
   ============================================================ */
@media (pointer: coarse), (max-width: 1024px) {
  /* Generelle Button-Mindesthoehe */
  .btn,
  .mini-btn {
    min-height: 44px;
    padding-left: 14px;
    padding-right: 14px;
  }
  /* Icon-Buttons (✕ Schliessen etc.) brauchen 44x44 Tap-Target */
  button.icon-btn,
  .close-btn,
  .info-modal__close {
    min-height: 44px; min-width: 44px;
  }
  /* Checkboxen sind oft viel zu klein auf iPad */
  input[type="checkbox"],
  input[type="radio"] {
    min-width: 22px; min-height: 22px;
    accent-color: var(--accent);
  }
  /* Listen-Items mit angenehmer Klickflaeche */
  .session-item, .speaker-row, .meas-row, .ch-row, .proj-row {
    min-height: 44px;
  }
}

/* ============================================================
   PRIMARY-ACTION (Push in DSP, Speichern) deutlich abheben
   ============================================================ */
.btn.btn--dsp,
button.btn--dsp {
  background: linear-gradient(180deg, #ffb547 0%, #f6ad55 100%);
  color: #1a0d00;
  border: 1px solid #ffae57;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(246, 173, 85, 0.35);
  min-height: 48px;
  padding: 0 22px;
  position: relative;
}
.btn.btn--dsp::before {
  content: '⚠';
  margin-right: 8px;
  font-size: 16px;
}
.btn.btn--dsp:hover {
  filter: brightness(1.08);
  box-shadow: 0 3px 12px rgba(246, 173, 85, 0.5);
}
.btn.btn--dsp:active { transform: translateY(1px); }

/* Sekundäre Aktionen ruhiger (kein Hover-Confusion) */
.btn--secondary {
  background: transparent;
  border: 1px solid var(--border-strong, rgba(255,255,255,0.18));
  color: var(--text-muted);
}
.btn--secondary:hover { color: var(--text); border-color: var(--accent); }

/* ============================================================
   EMPTY-STATE — wenn kein Projekt / keine Messung / keine Daten
   ============================================================ */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.10);
  border-radius: 12px;
  margin: 16px;
}
.empty-state__icon {
  font-size: 42px;
  opacity: 0.5;
  line-height: 1;
}
.empty-state__title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.empty-state__desc {
  font-size: 13px;
  max-width: 420px;
  line-height: 1.5;
}
.empty-state__action {
  margin-top: 6px;
}
.empty-state__action .btn { min-height: 44px; padding: 0 18px; }

/* ============================================================
   NEXT-STEP HINT — kleiner Banner-Pill der den naechsten Schritt zeigt
   ============================================================ */
.next-step-hint {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(90deg, rgba(200,245,66,0.15), rgba(200,245,66,0.04));
  border: 1px solid rgba(200,245,66,0.35);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text);
  margin: 8px;
}
.next-step-hint__arrow {
  color: var(--accent);
  font-weight: 700;
}
.next-step-hint a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.next-step-hint a:hover { text-decoration: underline; }

/* ============================================================
   GLOBALE DESIGN-HARMONISIERUNG (2026-06)
   Ein Button-Raster, eine Pill-Optik, ein Schrift-Minimum —
   gilt fuer ALLE Module (liegt bewusst am Datei-Ende).
   ============================================================ */

/* mini-btn: einheitliche Basis in allen Modulen */
.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: var(--fs-hint, 11px);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface2);
  color: var(--text);
  transition: background 120ms, border-color 120ms, color 120ms, transform 80ms;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.mini-btn:hover { border-color: var(--accent); }
.mini-btn:active { transform: scale(0.96); }
.mini-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

/* Segment-Gruppen (seg__btn + target-bar__btn): gleiche Geometrie */
.seg__btn, .target-bar__btn {
  min-height: 32px;
  border-radius: 5px;
  font-size: var(--fs-hint, 11px);
  font-weight: 700;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Pills: status-pill / sb-pill / stage-pill — eine Form, vier Farben */
.status-pill, .sb-pill, .stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.status-pill.ok,     .sb-pill--ok     { background: rgba(78,201,176,0.14); color: var(--ok);     border: 1px solid rgba(78,201,176,0.4); }
.status-pill.warn,   .sb-pill--warn   { background: rgba(246,173,85,0.14); color: var(--warn);   border: 1px solid rgba(246,173,85,0.4); }
.status-pill.danger, .sb-pill--danger { background: rgba(229,84,102,0.14); color: var(--danger);  border: 1px solid rgba(229,84,102,0.4); }
.status-pill.acc,    .sb-pill--accent { background: var(--accent-soft);    color: var(--text);    border: 1px solid var(--accent); }

/* Touch: alle vereinheitlichten Bedienelemente auf 44px */
@media (pointer: coarse), (max-width: 1024px) {
  .mini-btn, .seg__btn, .target-bar__btn,
  .btn-primary, .btn-secondary, .btn-danger, .btn-ghost {
    min-height: 44px;
  }
}

/* ============================================================
   EASY-MODUS: Mess-Modul radikal vereinfachen
   Profi-Detail-Controls verschwinden, Kern bleibt:
   Modus · Geraete · Pegel · Start · Fortschritt · Speichern
   ============================================================ */
body.ui-easy .meter-trim-row,
body.ui-easy .ballistics-field,
body.ui-easy .bal-input-wrap,
body.ui-easy .bal-suffix,
body.ui-easy .eternal-toggle {
  display: none !important;
}

/* ============================================================
   CORPORATE DESIGN: AKTIV = VOLLFLAECHIG AKZENT (2026-06-12)
   Sven: "alle, alle, alle gleich" — kein umrandet-mit-grauer-
   Flaeche mehr. Aktiver Zustand ist IMMER volle Akzentfarbe mit
   Kontrast-Text. !important uebersteuert bewusst alle lokalen
   Modul-Definitionen.
   ============================================================ */
.suite-tab.active,
.suite-mode-btn.active,
.mini-btn.active,
.seg__btn.active,
.target-bar__btn.active,
.tab__btn.active,
.phase-tab.active,
.live-tab.active,
.eq-tab.active,
.align-subtab.active,
.tun-mode-btn.active,
.lang-btn.active,
.btn--active,
.mode-btn--active,
.freq-preset-btn--active,
.side-view-btn--active,
.abb__type-pill.active,
.proj-list__item.active {
  background: var(--accent) !important;
  color: var(--accent-contrast) !important;
  border-color: var(--accent) !important;
  box-shadow: none !important;
}

/* Kind-Elemente in aktiven Buttons muessen mit-invertieren */
.suite-tab.active .suite-tab__label { color: var(--accent-contrast) !important; }
.suite-tab.active .suite-tab__step {
  background: var(--accent-contrast) !important;
  border-color: transparent !important;
  color: var(--accent) !important;
}
.mode-btn--active .mode-btn__title,
.mode-btn--active .mode-btn__title--alt,
.mode-btn--active .mode-btn__sub,
.mode-btn--active .mode-btn__hint {
  color: var(--accent-contrast) !important;
  opacity: 1;
}
.abb__type-pill.active .abb__type-pill__lbl { color: var(--accent-contrast) !important; }
.abb__type-pill.active svg path { stroke: var(--accent-contrast) !important; }

/* sys-modal (System-Setup Dialog in Planning) */
.sys-modal-back {
  position: fixed; inset: 0;
  background: rgba(0, 8, 16, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.sys-modal-box {
  background: var(--surface, #1a2332);
  border: 1px solid var(--accent);
  border-radius: 8px;
  max-width: 480px; width: 100%;
  padding: 20px;
  color: var(--text);
  font-family: Montserrat, system-ui, sans-serif;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.sys-modal-title {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 16px;
}
.sys-modal-actions {
  margin-top: 16px;
  display: flex; gap: 8px;
  justify-content: flex-end;
}

/* sys-pill-x (X-Loeschen-Button auf Pill) */
.sys-empty { opacity: 0.45; font-size: 11px; }
.sys-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; margin: 2px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--pill-color, #888) 14%, transparent);
  color: var(--pill-color, #888);
  border: 1px solid color-mix(in srgb, var(--pill-color, #888) 35%, transparent);
  font-size: 11px;
}
.sys-pill-x {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  padding: 0 4px;
  color: inherit; opacity: 0.7;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 24px; min-height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
}
.sys-pill-x:hover { opacity: 1; color: var(--danger, #c0392b); }
.sys-pill-x--right { margin-left: auto; }

/* System-Setup-Card im DSP-Modul */
.sys-section-title {
  font-size: 11px; color: var(--info); font-weight: 700;
  margin: 12px 0 6px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.sys-group {
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 5px;
  border-left: 3px solid var(--accent);
}
.sys-group__hd {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
}
.sys-group__hd strong { color: var(--accent); }
.sys-group__link {
  font-size: 10px; opacity: 0.8;
  display: flex; align-items: center; gap: 4px;
}
.sys-group__members { margin-top: 4px; }
.sys-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; padding: 3px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.sys-row:last-child { border-bottom: none; }
.sys-row__chan {
  display: inline-block; min-width: 56px;
  font-size: 10px; padding: 2px 6px;
  background: rgba(78,201,176,0.15); color: #9ee0c6;
  border: 1px solid rgba(78,201,176,0.4);
  border-radius: 3px; text-align: center;
  font-family: monospace;
}
.sys-row__chan--in {
  background: rgba(127,217,217,0.15); color: var(--info);
  border-color: rgba(127,217,217,0.4);
}
.sys-row__plan {
  font-size: 10px; color: var(--text-muted);
  margin-left: 8px; padding: 2px 6px;
  background: rgba(166,127,255,0.12);
  border: 1px solid rgba(166,127,255,0.3);
  border-radius: 3px;
  font-style: italic;
}
.sys-row__ch-edit {
  width: 40px; padding: 1px 4px;
  background: rgba(0,0,0,0.25); color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px; font-size: 10px;
  font-family: monospace; text-align: center;
}
.sys-row__ch-edit:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.sys-row__lbl-edit {
  flex: 1; min-width: 80px; padding: 2px 6px;
  background: transparent; color: var(--text);
  border: 1px solid transparent;
  border-radius: 3px; font-size: 12px; font-weight: 700;
  font-family: inherit;
}
.sys-row__lbl-edit:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
.sys-row__lbl-edit:focus { outline: none; background: rgba(0,0,0,0.25); border-color: var(--accent); }
.sys-row__plan-sel {
  font-size: 10px; color: #d6c6ff;
  margin-left: 8px; padding: 3px 6px;
  background-color: #1a2332;          /* solider Hintergrund — sonst Browser-Default weiss */
  border: 1px solid rgba(166,127,255,0.35);
  border-radius: 3px;
  font-family: inherit;
  max-width: 140px;
}
.sys-row__plan-sel:hover { background-color: #243040; }
.sys-row__plan-sel option {
  background-color: #1a2332;
  color: #d6c6ff;
}

/* ============================================================
   GLOBALES SELECT-STYLING — verhindert weiss-auf-weiss in nativen
   Browser-Dropdowns (Safari Mac, Chrome Light-Mode). Greift fuer
   alle <select> + <option> innerhalb der Suite.
   ============================================================ */
body select,
body select.ed-select,
body select.tun-settings__select {
  background-color: var(--input-bg);
  color: var(--text, #f5f8fb);
  border: 1px solid var(--border-strong, #2a3140);
  font-family: inherit;
  color-scheme: dark;          /* Browser nimmt dunkles UI-Theme fuer Dropdown */
}
body select:focus { outline: 1px solid var(--accent, #C8F542); }
body select option {
  background-color: var(--input-bg);
  color: var(--text, #f5f8fb);
}
body select option:disabled {
  color: #6a7a8d;
}
body select option:checked,
body select option[selected] {
  background-color: rgba(200,245,66,0.20);
  color: var(--text, #f5f8fb);
}

/* Sidebar Pills + System-Setup-Listing */
.proj-pills {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 6px 0 4px;
}
.sb-pill {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface2, rgba(255,255,255,0.06));
  color: var(--text);
}
.sb-pill--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.sb-pill--ok     { background: rgba(78,201,176,0.18); color: #4ec9b0; border-color: rgba(78,201,176,0.4); }
.sb-pill--warn   { background: rgba(246,173,85,0.18); color: #f6ad55; border-color: rgba(246,173,85,0.4); }
.sys-grp { color: var(--info); padding: 6px 0 2px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.sys-grp em { color: var(--text-muted); font-style: normal; }
.meas-sub  { color: var(--text-muted); font-size: 10px; }

/* ============================================================
   Sidebar grafisch: Project-Card, Stats-Grid, Channel-Boxen
   ============================================================ */
.proj-card {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 12px 10px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  margin: 0 -12px 8px;  /* full-bleed */
}
.proj-card__avatar {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  letter-spacing: -0.5px;
}
.proj-card__body { flex: 1; min-width: 0; }
.proj-card__body .proj-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.proj-card__body .proj-desc {
  font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.proj-card__venue {
  font-size: 10px; color: var(--text-muted);
  margin-top: 2px;
}

/* Quick-Stats-Grid: 2x2 Touch-Tiles */
.proj-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0 12px;
}
.proj-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 6px;
  background: var(--surface2, rgba(255,255,255,0.04));
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  min-height: 70px;
  cursor: pointer;
  transition: background 120ms, border-color 120ms, transform 80ms;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.proj-stat:hover { background: var(--surface3, rgba(255,255,255,0.08)); border-color: var(--accent); }
.proj-stat:active { transform: scale(0.97); }
.proj-stat__ico { font-size: 18px; line-height: 1; margin-bottom: 2px; }
.proj-stat__num { font-size: 18px; font-weight: 800; color: var(--accent); line-height: 1; }
.proj-stat__lbl { font-size: 10px; color: var(--text-muted); margin-top: 2px; text-align: center; }

/* Channel-Boxen für System-Setup */
.ch-row-lbl {
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 4px 0 4px; font-weight: 600;
}
.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 4px;
  margin-bottom: 8px;
}
.ch-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 4px; border-radius: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 120ms, border-color 120ms, transform 80ms;
}
.ch-box:hover { background: rgba(255,255,255,0.10); border-color: var(--accent); }
.ch-box:active { transform: scale(0.96); }
.ch-box__num {
  font-size: 13px; font-weight: 800; line-height: 1; color: var(--accent);
  font-family: monospace;
}
.ch-box__lbl {
  font-size: 9px; color: var(--text-muted);
  margin-top: 2px; text-align: center;
  line-height: 1.1; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ch-box--top   { border-color: rgba(127,217,217,0.5); background: rgba(127,217,217,0.10); }
.ch-box--top   .ch-box__num { color: #7fd9d9; }
.ch-box--sub   { border-color: rgba(246,173,85,0.5); background: rgba(246,173,85,0.10); }
.ch-box--sub   .ch-box__num { color: #f6ad55; }
.ch-box--fill  { border-color: rgba(166,127,255,0.5); background: rgba(166,127,255,0.10); }
.ch-box--fill  .ch-box__num { color: #a78bfa; }
.ch-box--delay { border-color: rgba(54,211,153,0.4);  background: rgba(54,211,153,0.08); }
.ch-box--delay .ch-box__num { color: #36d399; }
.ch-box--mon   { border-color: rgba(229,84,102,0.4);  background: rgba(229,84,102,0.08); }
.ch-box--mon   .ch-box__num { color: #e55466; }
.ch-box--in    { border-color: rgba(189,226,255,0.4); background: rgba(189,226,255,0.08); }
.ch-box--in    .ch-box__num { color: var(--info); }
.ch-empty {
  padding: 12px; text-align: center;
  font-size: 11px; color: var(--text-muted);
}
.ch-empty a { color: var(--accent); text-decoration: none; }

/* Touch: groessere Stats + Channel-Boxen */
@media (max-width: 1024px), (pointer: coarse) {
  .proj-stat       { min-height: 80px; }
  .proj-stat__ico  { font-size: 22px; }
  .proj-stat__num  { font-size: 22px; }
  .ch-box          { min-height: 56px; padding: 8px 4px; }
  .ch-grid         { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
  .proj-card__avatar { width: 52px; height: 52px; font-size: 18px; }
}

/* card-collapse-btn (kleines ▼-Icon-Button) */
.card-collapse-btn {
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; padding: 2px 6px; font-size: 13px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.card-collapse-btn:hover { color: var(--accent); }

/* wiz-tpl (Projekt-Wizard Template-Card) */
.wiz-tpl {
  text-align: left; padding: 14px; border-radius: 8px;
  border: 2px solid var(--border-strong);
  background: rgba(255,255,255,0.03); color: var(--text);
  cursor: pointer; font-family: inherit; width: 100%;
  display: block; margin-bottom: 8px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background 120ms, border-color 120ms, transform 80ms;
}
.wiz-tpl:hover { border-color: var(--accent); }
.wiz-tpl:active { transform: scale(0.99); }
.wiz-tpl.active {
  border-color: var(--accent); background: rgba(200,245,66,0.12);
}
.wiz-tpl.disabled {
  opacity: 0.45; cursor: not-allowed;
  border-color: var(--border-strong);
}
.wiz-tpl.disabled:hover { border-color: var(--border-strong); }
.wiz-progress {
  font-size: 11px; opacity: 0.65;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Touch-Optimierung: ab Tablet/Touch alle Buttons mind. 44px */
@media (max-width: 1024px), (pointer: coarse) {
  .btn, .mini-btn, .seg__btn, .target-bar__btn, .tab__btn, .phase-tab,
  .align-subtab, .tun-mode-btn, .mode-btn, .lang-btn, .info-btn,
  .btn-primary, .btn-secondary, .btn-danger, .btn-ghost {
    min-height: 44px;
  }
  .btn--small, .mini-btn { min-height: 36px; padding: 6px 12px; font-size: 12px; }
  .btn--icon { width: 44px; height: 44px; min-width: 44px; }
}

/* Modal / Dialog */
.suite-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 8, 16, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.suite-modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 600px;
  width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
}
.suite-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.suite-modal-header h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}
.suite-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.suite-modal-close:hover { color: var(--text); }
.suite-modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}
.suite-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-strong);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Form */
.suite-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.suite-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.suite-field input, .suite-field textarea, .suite-field select {
  background: var(--surface2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
}
.suite-field input:focus, .suite-field textarea:focus, .suite-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.suite-field textarea {
  resize: vertical;
  min-height: 60px;
}

/* Suite-Flash – kurzes Hervorheben eines Items im Modul nach Sidebar-Klick */
.suite-flash {
  animation: suite-flash-anim 1.5s ease-out;
}
@keyframes suite-flash-anim {
  0% { box-shadow: 0 0 0 0 var(--accent), inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
  100% { box-shadow: 0 0 0 0 transparent, inset 0 0 0 0 transparent; background: transparent; }
}

/* Toast / Notification */
.suite-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  z-index: 3000;
  font-size: 13px;
  animation: suite-toast-in 200ms ease-out;
}
.suite-toast.error { border-color: var(--danger); }
.suite-toast.success { border-color: var(--success); }
@keyframes suite-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Step-Badge (Reihenfolge der Bedienung) — wiederverwendbar */
.sec-step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #000;
  font-size: 10px; font-weight: 800; flex-shrink: 0;
  font-family: inherit;
}

/* Info-Button + Info-Modal (Pattern aus planning.html, hier zentral wiederverwendbar) */
.info-btn {
  position: relative;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(200, 245, 66, 0.5);
  background: rgba(200, 245, 66, 0.10);
  color: var(--accent); font-size: 12px; font-weight: 600;
  line-height: 1; text-align: center; cursor: pointer;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
  font-family: inherit;
}
.info-btn::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
}
.info-btn:hover { background: rgba(200, 245, 66, 0.28); border-color: var(--accent); }

.info-modal {
  display: none; position: fixed; inset: 0; z-index: 2500;
  background: rgba(0, 8, 20, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.info-modal.open { display: flex; }
.info-modal__box {
  background: linear-gradient(145deg, rgba(0,24,47,0.98), rgba(0,14,30,0.99));
  border: 1px solid rgba(200, 245, 66, 0.25);
  border-radius: 10px; box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  width: min(560px, 92vw); max-height: 82vh;
  overflow-y: auto; padding: 22px 24px 20px;
  position: relative;
  color: var(--text);
}
.info-modal__close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-muted);
  font-size: 22px; cursor: pointer; line-height: 1;
}
.info-modal__close:hover { color: var(--text); }
.info-modal__title {
  font-size: 14px; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.info-modal__section { margin-bottom: 16px; }
.info-modal__section h3 {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text); margin: 0 0 6px;
  padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.info-modal__section p {
  font-size: 12px; color: var(--text-muted); line-height: 1.65; margin: 0 0 6px;
}
.info-modal__section p:last-child { margin-bottom: 0; }
.info-modal__section ul {
  margin: 4px 0 0 18px; padding: 0;
  font-size: 12px; color: var(--text-muted); line-height: 1.6;
}
.info-modal__section ul li { margin-bottom: 3px; }
.info-modal__section code {
  background: rgba(0,0,0,0.4); padding: 1px 6px; border-radius: 3px;
  color: var(--text); font-size: 11px;
}
.info-modal__hint {
  font-size: 11px; color: var(--text-muted); margin-top: 14px; padding: 8px 10px;
  background: rgba(255,255,255,0.03); border-radius: 6px;
  border-left: 2px solid var(--accent); line-height: 1.6;
}
.info-modal__hint--warn {
  border-left-color: var(--warning);
  background: rgba(245, 166, 35, 0.06);
}

/* Scrollbar */
#suite-sidebar::-webkit-scrollbar,
.suite-modal-body::-webkit-scrollbar {
  width: 8px;
}
#suite-sidebar::-webkit-scrollbar-thumb,
.suite-modal-body::-webkit-scrollbar-thumb {
  background: var(--surface3);
  border-radius: 4px;
}
#suite-sidebar::-webkit-scrollbar-track,
.suite-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
