/* ==========================================================================
   STITCHLAB — gemeinsames Design (Website + Panel), angelehnt an die App:
   neutrale Dunkelgrau-Flächen, weißer Akzent, Koralle als Zweitfarbe, runde Karten, Pill-Navigation
   ========================================================================== */

:root {
  --bg: #0e0f11;
  --panel: #1a1d22;
  --panel2: #22262c;
  --hover: #2b3038;
  --line: #2e333b;
  --card-line: #272b32;
  --text: #eceef2;
  --muted: #8a919d;
  --accent: #f2f3f5;
  --accent-fg: #0e0f11;
  --coral: #e5605a;
  --info: #6e9bef;
  --good: #34c38f;
  --danger: #e5484d;
  --field: #121418;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--hover); }

.wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* Logo */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 650; font-size: 1.08rem; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); text-decoration: none; font-weight: 550; font-size: 0.92rem; cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.2s; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.btn--primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn--primary:hover { background: #d8dadf; }
.btn--ghost { background: transparent; }
.btn--danger { color: #ff8a85; border-color: rgba(229, 72, 77, 0.4); background: rgba(229, 72, 77, 0.08); }
.btn--danger:hover { background: rgba(229, 72, 77, 0.16); }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: 0.82rem; }
.btn--lg { min-height: 48px; padding: 0 24px; font-size: 1rem; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* Karten */
.card { background: var(--panel); border: 1px solid var(--card-line); border-radius: var(--r-l); padding: 22px; }
.card--inset { background: var(--field); border-radius: var(--r-m); }
.card h2, .card h3 { margin: 0 0 4px; font-family: var(--font-display); letter-spacing: -0.01em; }
.card h2 { font-size: 1.15rem; }
.card h3 { font-size: 1rem; }

/* Pill-Navigation */
.pills { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--card-line); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 550; font-size: 0.88rem; cursor: pointer; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.pill:hover { color: var(--text); }
.pill.is-on { background: var(--accent); color: var(--accent-fg); }

/* Formulare */
.field { display: grid; gap: 6px; }
.field > span { font-size: 0.78rem; color: var(--muted); }
.input, select.input { min-height: 42px; width: 100%; padding: 0 14px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--field); color: var(--text); outline: none; transition: border-color 0.2s; }
.input:focus { border-color: #4a515c; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--hover); transition: background 0.2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform 0.2s, background 0.2s; }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(18px); background: #fff; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; background: var(--hover); color: var(--muted); white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--good { color: var(--good); background: rgba(52, 195, 143, 0.12); }
.badge--info { color: var(--info); background: rgba(110, 155, 239, 0.12); }
.badge--warn { color: #f5b301; background: rgba(245, 179, 1, 0.12); }
.badge--bad { color: #ff8a85; background: rgba(229, 72, 77, 0.12); }
.badge--coral { color: var(--coral); background: rgba(229, 96, 90, 0.12); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-weight: 550; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.toast.is-bad { background: var(--danger); color: #fff; }
