/* Cosmie – gemeinsame Marken-Grundlagen für Webseite, App und Dashboard */
:root {
  --violett: #5B3DF5;
  --violett-dunkel: #4A2EE0;
  --violett-hell: #7B61FF;
  --violett-zart: #EFEAFF;
  --violett-text: #A99BFF;
  --koralle: #FF7A59;
  --koralle-zart: #FFEDE7;
  --nacht: #0F1222;
  --nacht-2: #1B1F36;
  --nacht-3: #2A2F4D;
  --creme: #FBFAF8;
  --weiss: #FFFFFF;
  --text: #0F1222;
  --text-2: #4A4D63;
  --text-3: #6B6E85;
  --text-4: #8A8DA3;
  --linie: #EEEBF5;
  --linie-2: #E0DCEC;
  --gruen: #12A37A;
  --gruen-zart: #E3F6EF;
  --gelb: #F5C04A;
  --gelb-zart: #FDF3DC;
  --rot: #E0473B;
  --rot-zart: #FDE8E6;
  --radius: 14px;
  --radius-l: 24px;
  --schatten: 0 1px 2px rgba(15,18,34,.04), 0 8px 24px rgba(15,18,34,.06);
  --schatten-l: 0 24px 60px rgba(15,18,34,.16);
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--creme); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--violett-hell); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: .2em; font-weight: 700; letter-spacing: -.05em; text-decoration: none; color: inherit; line-height: 1; }
.logo svg { height: .78em; width: auto; flex: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .12s ease, background .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--violett); color: #fff; }
.btn-primary:hover { background: var(--violett-dunkel); }
.btn-dark { background: var(--nacht); color: #fff; }
.btn-dark:hover { background: #22263d; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--linie-2); }
.btn-ghost:hover { border-color: var(--violett-hell); color: var(--violett); }
.btn-koralle { background: var(--koralle); color: var(--nacht); }
.btn-danger { background: var(--rot-zart); color: var(--rot); }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* Chips & Badges */
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linie-2); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; white-space: nowrap; }
button.chip.is-active, .chip.is-active { background: var(--nacht); border-color: var(--nacht); color: #fff; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-violett { background: var(--violett-zart); color: var(--violett); }
.badge-gruen { background: var(--gruen-zart); color: #0B7A5A; }
.badge-gelb { background: var(--gelb-zart); color: #8A5D00; }
.badge-rot { background: var(--rot-zart); color: #B3261E; }
.badge-grau { background: #F1F0F5; color: var(--text-3); }
.badge-koralle { background: var(--koralle-zart); color: #C2462A; }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld > span, .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--linie-2); background: #fff; border-radius: 12px; padding: 11px 13px; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--violett); box-shadow: 0 0 0 4px rgba(91,61,245,.12); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.hint { font-size: 12px; color: var(--text-3); }

/* Schalter */
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: #D9D6E4; border-radius: 999px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--violett); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--violett-hell); outline-offset: 2px; }

/* Wallet-Pass (Stempelkarte) */
.pass { border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 8px 24px rgba(15,18,34,.14); position: relative; overflow: hidden; }
.pass-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pass-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; line-height: 1.15; display: flex; align-items: center; gap: 9px; }
.pass-mono { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.pass-label { font-size: 9px; font-weight: 700; letter-spacing: .06em; opacity: .75; text-transform: uppercase; }
.pass-wert { font-size: 14px; font-weight: 700; }
.pass-stempel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.pass-stempel i { aspect-ratio: 1; border-radius: 50%; display: block; }
.pass-fuss { display: flex; justify-content: space-between; gap: 10px; }
.pass-qr { background: #fff; border-radius: 10px; padding: 8px; align-self: center; width: 116px; }

/* Toast */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; pointer-events: none; width: min(92vw, 420px); }
.toast { background: var(--nacht); color: #fff; border-radius: 14px; padding: 13px 16px; font-size: 14px; font-weight: 500; box-shadow: var(--schatten-l); display: flex; gap: 10px; align-items: center; animation: toastIn .25s ease; pointer-events: auto; }
.toast::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--koralle); flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,18,34,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 900; animation: fadeIn .15s ease; }
.modal { background: #fff; border-radius: 22px; width: min(100%, 520px); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--schatten-l); animation: popIn .2s ease; }
.modal-kopf { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 0; gap: 12px; }
.modal-kopf h3 { font-size: 20px; letter-spacing: -.02em; }
.modal-inhalt { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.x-btn { border: 0; background: #F3F2F7; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; line-height: 1; display: grid; place-items: center; flex: none; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.pass-name { min-width: 0; }
.pass-kopf > span:last-child { flex: none; }
.pass-stempel i.pass-motiv { border-radius: 0; background: none; display: grid; place-items: center; }
.pass-stempel i.pass-motiv svg { width: 88%; height: 88%; }
