/* Büro · DJ Nick Burmeister
   Farben und Schriften wie nickburmeister.de (css/dj-design.css): Deep Purple & Pink, Cormorant Garamond + Inter.
   Radius-System: Flächen 16px, Eingaben 10px, Knöpfe und Chips voll rund. */

:root {
  --bg: #0D001A;
  --bg-alt: #140024;
  --flaeche: rgba(255, 255, 255, 0.035);
  --flaeche-stark: rgba(168, 85, 247, 0.09);
  --lila: #A855F7;
  --lila-hell: #C084FC;
  --pink: #EC4899;
  --pink-hell: #F472B6;
  --verlauf: linear-gradient(135deg, #A855F7 0%, #EC4899 100%);
  --text: #FAF5FF;
  --text-2: #C9B3E0;
  --text-3: #8E78A6;
  --linie: rgba(168, 85, 247, 0.16);
  --linie-stark: rgba(168, 85, 247, 0.38);
  --gruen: #5EEAD4;
  --rot: #FB7185;
  --r: 16px;
  --r-klein: 10px;
  --nav-h: 68px;
  --t: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(120% 60% at 100% 0%, rgba(168, 85, 247, 0.14), transparent 60%),
                    radial-gradient(80% 40% at 0% 100%, rgba(236, 72, 153, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }

.seite { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- Kopf ---------- */
.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 10px; max-width: 760px; margin: 0 auto;
}
.kopf img { height: 34px; width: auto; }
.kopf .rechts { display: flex; gap: 8px; align-items: center; }

h1 {
  font-family: 'Cormorant Garamond', serif; font-weight: 700; letter-spacing: -0.01em;
  font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.1; margin: 10px 0 4px;
}
h2 {
  font-family: 'Cormorant Garamond', serif; font-weight: 700;
  font-size: 1.55rem; line-height: 1.15; margin: 32px 0 12px;
  display: flex; align-items: baseline; gap: 10px;
}
h2 .zahl {
  font-family: 'Inter', sans-serif; font-size: 0.8rem; font-weight: 600; color: var(--bg);
  background: var(--verlauf); border-radius: 999px; padding: 1px 9px; line-height: 1.6;
}
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 6px; }
.unter { color: var(--text-2); font-size: 0.95rem; }
.leise { color: var(--text-3); font-size: 0.85rem; }
.verlauf-text { background: var(--verlauf); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Event-Liste ---------- */
.liste { display: grid; gap: 10px; }
.zeile {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r);
  padding: 12px 14px; transition: border-color var(--t), background var(--t), transform var(--t);
}
a.zeile:hover { border-color: var(--linie-stark); background: var(--flaeche-stark); }
a.zeile:active { transform: scale(0.985); }
.datum-block { text-align: center; line-height: 1; }
.datum-block .t { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; font-weight: 700; display: block; }
.datum-block .m { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); }
.datum-block .j { font-size: 0.68rem; color: var(--text-3); display: block; margin-top: 3px; }
.zeile .titel { font-weight: 600; line-height: 1.3; }
.zeile .info { color: var(--text-2); font-size: 0.86rem; margin-top: 2px; }
.zeile .pfeil { color: var(--text-3); font-size: 1.2rem; }
.zeile.dringend { border-color: rgba(236, 72, 153, 0.55); background: rgba(236, 72, 153, 0.07); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 1px 9px;
  font-size: 0.75rem; font-weight: 600; border: 1px solid var(--linie-stark); color: var(--lila-hell); white-space: nowrap;
}
.chip.gebucht { border-color: rgba(94, 234, 212, 0.45); color: var(--gruen); }
.chip.abgerechnet { border-color: var(--linie); color: var(--text-3); }
.chip.offen { border-color: rgba(192, 132, 252, 0.5); color: var(--lila-hell); }
.chip.abgesagt, .chip.ausgefallen { border-color: rgba(251, 113, 133, 0.45); color: var(--rot); }
.chip.pink { border-color: rgba(236, 72, 153, 0.6); color: var(--pink-hell); }

.leer {
  border: 1px dashed var(--linie-stark); border-radius: var(--r); padding: 22px 18px; color: var(--text-2);
  text-align: center; font-size: 0.95rem;
}

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--verlauf); color: #fff; font-weight: 600; font-size: 0.98rem; white-space: nowrap;
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.28); transition: transform var(--t), box-shadow var(--t), opacity var(--t);
}
.knopf:hover { box-shadow: 0 10px 34px rgba(236, 72, 153, 0.34); }
.knopf:active { transform: scale(0.97); }
.knopf.zweit { background: transparent; border: 1px solid var(--linie-stark); color: var(--text); box-shadow: none; }
.knopf.zweit:hover { border-color: var(--lila-hell); background: var(--flaeche-stark); }
.knopf.klein { min-height: 36px; padding: 0 14px; font-size: 0.88rem; }
.knopf.leise { background: transparent; box-shadow: none; color: var(--text-2); padding: 0 10px; }
.knopf.voll { width: 100%; }
.knopf[disabled] { opacity: 0.5; pointer-events: none; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
form.inline { display: inline; }

/* ---------- Karten / Abschnitte ---------- */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); padding: 16px; }
.karte + .karte { margin-top: 12px; }
.trenner { height: 1px; background: var(--linie); margin: 16px 0; border: 0; }
details.karte summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.karte summary::-webkit-details-marker { display: none; }
details.karte summary::after { content: "+"; color: var(--lila-hell); font-weight: 400; font-size: 1.3rem; line-height: 1; }
details.karte[open] summary::after { content: "−"; }
details.karte[open] summary { margin-bottom: 12px; }

/* ---------- Formulare ---------- */
.feld { display: grid; gap: 6px; margin-bottom: 12px; }
.feld label, .label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.feld .hilfe { font-size: 0.78rem; color: var(--text-3); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-klein);
  background: rgba(13, 0, 26, 0.65); border: 1px solid var(--linie-stark); color: var(--text);
  transition: border-color var(--t), box-shadow var(--t);
}
textarea { min-height: 200px; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.22); }
::placeholder { color: var(--text-3); }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drei { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
@media (max-width: 420px) { .zwei { grid-template-columns: 1fr; } }

/* Schalter */
.schalter { position: relative; width: 46px; height: 28px; flex: none; }
.schalter input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; }
.schalter span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid var(--linie-stark); transition: background var(--t); }
.schalter span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-2); transition: transform var(--t), background var(--t); }
.schalter input:checked + span { background: var(--verlauf); border-color: transparent; }
.schalter input:checked + span::after { transform: translateX(18px); background: #fff; }
.schalter input:focus-visible + span { box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.35); }

/* ---------- Rechnungs-Editor ---------- */
.pos { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--linie); }
.pos:first-child { border-top: 0; padding-top: 0; }
.pos .felder { display: grid; grid-template-columns: 1fr 112px; gap: 8px; }
.pos.aus .felder input { opacity: 0.45; text-decoration: line-through; }
.pos .betrag { text-align: right; font-variant-numeric: tabular-nums; }
.pos .weg { grid-column: 2; justify-self: start; }
@media (max-width: 560px) {
  .pos { align-items: start; }
  .pos .schalter { margin-top: 8px; }
  .pos .felder { grid-template-columns: 1fr; }
  .pos .felder .betrag { justify-self: end; width: 130px; }
}

.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--linie-stark); border-radius: 999px; overflow: hidden; width: max-content; }
.stepper button { width: 46px; height: 44px; border: 0; background: transparent; color: var(--text); font-size: 1.3rem; cursor: pointer; }
.stepper button:active { background: var(--flaeche-stark); }
.stepper output { min-width: 64px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.summe-leiste {
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 5;
  margin-top: 18px; padding: 14px 16px; border-radius: var(--r);
  background: rgba(20, 0, 36, 0.92); border: 1px solid var(--linie-stark); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center;
}
.summe-leiste .betrag { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.45rem, 6vw, 1.9rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summe-leiste .knopf { padding: 0 18px; }

.vorschau { font-size: 0.88rem; color: var(--text-2); }
.vorschau li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 4px 0; list-style: none; }
.vorschau li span:last-child { font-variant-numeric: tabular-nums; color: var(--text); }
.vorschau li.summe { border-top: 1px solid var(--linie); margin-top: 6px; padding-top: 8px; font-weight: 700; color: var(--text); }

/* ---------- Meldungen ---------- */
.meldung { border-radius: var(--r); padding: 12px 14px; margin: 10px 0; font-size: 0.93rem; border: 1px solid; }
.meldung.ok { border-color: rgba(94, 234, 212, 0.4); background: rgba(94, 234, 212, 0.07); }
.meldung.fehler { border-color: rgba(251, 113, 133, 0.5); background: rgba(251, 113, 133, 0.08); }

/* ---------- Kalender ---------- */
.kal-kopf { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; }
.kal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.kal .wt { text-align: center; font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 4px; }
.kal a, .kal span.tag { aspect-ratio: 1 / 1.1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 7px; gap: 4px; font-size: 0.92rem; border: 1px solid transparent; }
.kal .fremd { color: var(--text-3); opacity: 0.45; }
.kal .heute { border-color: var(--pink); }
.kal .hat { background: var(--flaeche); border-color: var(--linie); }
.kal .gewaehlt { background: var(--flaeche-stark); border-color: var(--lila); }
.punkte { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 80%; }
.punkt { width: 7px; height: 7px; border-radius: 50%; }
.punkt.gebucht, .punkt.abgerechnet, .punkt.kalender { background: var(--verlauf); }
.punkt.offen, .punkt.anfrage { border: 1.5px solid var(--lila-hell); }
.punkt.alt { background: var(--text-3); }
.legende { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 0.8rem; color: var(--text-2); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Belege ---------- */
.filter { display: flex; gap: 8px; margin: 6px 0 14px; flex-wrap: wrap; }
.filter a { border: 1px solid var(--linie-stark); border-radius: 999px; padding: 6px 14px; font-size: 0.88rem; color: var(--text-2); }
.filter a.an { background: var(--verlauf); color: #fff; border-color: transparent; }
.beleg { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--linie); }
.beleg:first-child { border-top: 0; }
.beleg .betrag { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }

/* ---------- Untere Navigation ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(13, 0, 26, 0.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--linie);
}
.nav ul { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 600px; margin: 0 auto; height: var(--nav-h); }
.nav a { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 0.68rem; color: var(--text-3); position: relative; }
.nav a i { font-size: 1.45rem; }
.nav a.an { color: var(--text); }
.nav a.an i { background: var(--verlauf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a .badge { position: absolute; top: 9px; left: calc(50% + 8px); min-width: 18px; height: 18px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 0.68rem; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login .karte { width: 100%; max-width: 380px; padding: 28px 22px; }
.login img { width: 170px; margin: 0 auto 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Einnahmen ---------- */
.held { margin-top: 6px; }
.held .zahl-gross { font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: clamp(2.6rem, 11vw, 3.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.held .plus { color: var(--gruen); font-weight: 600; }
.held .minus { color: var(--rot); font-weight: 600; }

/* Jahre: waagrechte Balken, ein Farbton, aktuelles Jahr in Pink */
.jahre { display: grid; gap: 6px; }
.jahr { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; }
.jahr .j { font-size: 0.85rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.jahr .spur { position: relative; height: 30px; }
.jahr .balken { height: 100%; min-width: 4px; background: var(--lila); border-radius: 0 4px 4px 0; opacity: 0.85; }
.jahr.jetzt .balken { background: var(--pink); opacity: 1; }
.jahr .wert { position: absolute; top: 50%; transform: translateY(-50%); font-size: 0.82rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.jahr .wert small { font-weight: 400; color: var(--text-3); margin-left: 6px; }

/* Monate: senkrechte Balken */
.monate { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; align-items: end; height: 150px; padding-top: 18px; }
.monat { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.monat .balken { width: 100%; max-width: 22px; min-height: 0; background: var(--lila); border-radius: 4px 4px 0 0; opacity: 0.85; }
.monat.max .balken { background: var(--pink); opacity: 1; }
.monat .lbl { position: absolute; bottom: 100%; font-size: 0.66rem; font-weight: 600; white-space: nowrap; color: var(--text); margin-bottom: 2px; }
.monats-achse { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; border-top: 1px solid var(--linie-stark); padding-top: 4px; }
.monats-achse span { text-align: center; font-size: 0.64rem; color: var(--text-3); }
.monats-achse span.zukunft { opacity: 0.45; }

.arten { display: grid; gap: 14px; }
.art .kopfzeile { display: flex; justify-content: space-between; gap: 10px; font-size: 0.92rem; }
.art .kopfzeile b { font-variant-numeric: tabular-nums; }
.art .spur { height: 6px; margin-top: 6px; }
.art .balken { height: 100%; background: var(--lila); border-radius: 0 4px 4px 0; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.tabelle th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 0.78rem; padding: 0 0 6px; }
.tabelle td { padding: 7px 0; border-top: 1px solid var(--linie); }
.tabelle .r { text-align: right; }

/* ---------- Ankreuzliste "Was wird gebucht?" ---------- */
.wahlliste { display: grid; gap: 8px; }
.wahl {
  display: grid; grid-template-columns: 28px 1fr 104px; gap: 12px; align-items: center;
  padding: 12px; border-radius: 12px; border: 1px solid var(--linie); background: rgba(13, 0, 26, 0.35);
  cursor: pointer; transition: border-color var(--t), background var(--t), transform var(--t);
  -webkit-tap-highlight-color: transparent;
}
.wahl:active { transform: scale(0.99); }
.wahl > input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wahl .haken {
  width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--linie-stark);
  display: grid; place-items: center; color: transparent; transition: background var(--t), border-color var(--t), color var(--t);
}
.wahl .name { line-height: 1.3; color: var(--text-2); }
.wahl .name small { display: block; font-size: 0.74rem; color: var(--text-3); margin-top: 2px; }
.wahl .betrag { min-height: 40px; text-align: right; font-variant-numeric: tabular-nums; padding: 8px 10px; }
.wahl.an { border-color: rgba(236, 72, 153, 0.55); background: rgba(236, 72, 153, 0.08); }
.wahl.an .haken { background: var(--verlauf); border-color: transparent; color: #fff; }
.wahl.an .name { color: var(--text); font-weight: 600; }
.wahl:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3); }
.wahl-summe { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linie); }
.wahl-summe span { color: var(--text-2); }
.wahl-summe b { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
@media (max-width: 380px) { .wahl { grid-template-columns: 26px 1fr 92px; gap: 10px; } }
