/* fitbymarc Verwaltung – dieselben Farben und Schriften wie die Website */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/instrument-sans.woff2") format("woff2");
}

:root {
  --grund: #F7F8F3;
  --flaeche: #FFFFFF;
  --tinte: #182B21;
  --tinte-2: #4C5F53;
  --kiefer: #1F513C;
  --kiefer-tief: #143B2B;
  --limette: #C5E44E;
  --limette-hell: #E6F3B4;
  --salbei: #E9F0DF;
  --linie: #DCE3D4;
  --warn: #FFF4D6;
  --warn-linie: #E8C96A;
  --rot: #A03030;
  --rot-hell: #FBECEA;
  --ok-hell: #E8F4E1;
  --anzeige: "Bricolage Grotesque", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  color: var(--tinte);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--anzeige); line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 .8em; }
a { color: var(--kiefer); text-underline-offset: 2px; }
a:hover { color: var(--kiefer-tief); }
code, kbd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95em; }
kbd { background: var(--salbei); border: 1px solid var(--linie); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
:focus-visible { outline: 3px solid var(--kiefer); outline-offset: 2px; border-radius: 6px; }

.gedimmt { color: var(--tinte-2); }
.klein { font-size: .88rem; }
.leer { color: var(--tinte-2); padding: 12px 0; margin: 0; }
.keinumbruch { white-space: nowrap; }
.text-block { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.nur-vorleser {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.sprung { position: absolute; left: -9999px; }
.sprung:focus { left: 12px; top: 12px; z-index: 10; background: var(--flaeche); padding: 8px 12px; }

/* ---------- Kopf und Navigation ---------- */
.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-innen {
  max-width: 1100px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.marke {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--anzeige); font-weight: 800; font-size: 1.15rem;
  color: var(--kiefer); text-decoration: none;
}
.marke small {
  display: block; font-family: var(--text); font-weight: 600; font-size: .7rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--tinte-2);
}
.marke-zeichen { width: 32px; height: 32px; flex: none; color: var(--kiefer); }
.marke-gross { margin-bottom: 22px; }
.abmelden { display: flex; align-items: center; gap: 10px; margin: 0; }
.konto-link { font-weight: 600; text-decoration: none; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.navigation {
  max-width: 1100px; margin: 0 auto; padding: 0 8px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.navigation::-webkit-scrollbar { display: none; }
.navigation a {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 10px 12px; font-weight: 600; color: var(--tinte-2); text-decoration: none;
  border-bottom: 3px solid transparent;
}
.navigation a:hover { color: var(--tinte); }
.navigation a.active { color: var(--kiefer); border-bottom-color: var(--limette); }
.zaehler {
  background: var(--limette); color: var(--kiefer-tief); border-radius: 999px;
  font-size: .75rem; font-weight: 700; padding: 0 7px; line-height: 1.5;
}

.inhalt { max-width: 1100px; margin: 0 auto; padding: 22px 16px 60px; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem var(--text); line-height: 1.2; text-decoration: none; text-align: center;
  padding: 10px 16px; min-height: 44px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--linie); background: var(--flaeche); color: var(--tinte);
}
.knopf:hover { border-color: var(--kiefer); color: var(--tinte); }
.knopf-primaer { background: var(--kiefer); border-color: var(--kiefer); color: #fff; }
.knopf-primaer:hover { background: var(--kiefer-tief); border-color: var(--kiefer-tief); color: #fff; }
.knopf-gefahr { color: var(--rot); }
.knopf-gefahr:hover { border-color: var(--rot); color: var(--rot); }
.knopf-klein { min-height: 36px; padding: 6px 12px; font-size: .86rem; border-radius: 10px; }
.knopf-breit { width: 100%; }
.knopf-text {
  background: none; border: 0; padding: 4px 6px; margin-left: auto; cursor: pointer;
  font: 600 .85rem var(--text); color: var(--rot);
}
.knopf-text:hover { text-decoration: underline; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.knopf-reihe form { margin: 0; }

/* ---------- Bausteine ---------- */
.seitenkopf {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.seitenkopf h1 { margin-bottom: 6px; }
.zurueck { margin: 0 0 10px; font-size: .92rem; }
.zurueck a { text-decoration: none; font-weight: 600; }

.karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px;
}
.karte > :last-child { margin-bottom: 0; }
.karte-hervor { border-color: var(--limette); box-shadow: 0 0 0 3px var(--limette-hell); }
.gefahr-zone { border-color: #EBC9C4; }
.raster-2 { display: grid; gap: 0 16px; }
@media (min-width: 860px) { .raster-2 { grid-template-columns: 1fr 1fr; } }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kachel {
  display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--tinte);
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 18px;
}
.kachel b { font-family: var(--anzeige); font-size: 2rem; line-height: 1; }
.kachel span { color: var(--tinte-2); font-weight: 600; }
.kachel:hover { border-color: var(--kiefer); color: var(--tinte); }
.kachel-hervor { background: var(--limette-hell); border-color: var(--limette); }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li + li { border-top: 1px solid var(--linie); }
.karte .liste { margin: 0 -18px -18px; }
.zeile {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px;
  padding: 12px 18px; color: var(--tinte); text-decoration: none;
}
a.zeile:hover { background: var(--salbei); color: var(--tinte); }
.liste:not(.karte .liste) { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.zeile-haupt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.zeile-haupt b { font-weight: 700; }
.zeile-neben { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .9rem; }
.zeile-statisch select { min-height: 36px; padding: 4px 8px; width: auto; }
.ziele { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status, .typ {
  display: inline-block; border-radius: 999px; padding: 1px 10px;
  font-size: .78rem; font-weight: 700; line-height: 1.6; white-space: nowrap;
  background: var(--salbei); color: var(--tinte-2); text-decoration: none;
}
.status[data-s="Anfrage"] { background: #E4EEF8; color: #1F4A73; }
.status[data-s="Aktiv"], .status[data-t="Aktiv"] { background: var(--limette-hell); color: var(--kiefer-tief); }
.status[data-s="Pausiert"], .status[data-t="ZweiFaktorFehlt"], .status[data-t="EinladungOffen"] { background: var(--warn); color: #6B5310; }
.status[data-s="Abgeschlossen"] { background: #ECEEEA; color: #5A625C; }
.status[data-t="Gesperrt"], .status[data-t="VoruebergehendGesperrt"] { background: var(--rot-hell); color: var(--rot); }
.typ[data-typ="Termin"] { background: #EFE6FA; color: #4B2E73; }
.typ[data-typ="Kontakt"] { background: #E4EEF8; color: #1F4A73; }

.felder { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 12px; }
.felder dt { color: var(--tinte-2); font-weight: 600; }
.felder dd { margin: 0; overflow-wrap: anywhere; }

.filter, .zahlen { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.filter a, .zahlen a {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--linie); background: var(--flaeche); color: var(--tinte);
  text-decoration: none; font-weight: 600; font-size: .9rem;
}
.filter a.aktiv, .zahlen a.aktiv { border-color: var(--kiefer); background: var(--kiefer); color: #fff; }
.zahlen a.aktiv .status { background: rgba(255, 255, 255, .85); }

.suche { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.suche input { flex: 1 1 220px; }
.suche select { flex: 0 1 180px; }

.notiz { padding: 12px 0; border-top: 1px solid var(--linie); }
.notiz:first-of-type { border-top: 0; padding-top: 0; }
.notiz-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 6px; }

.loesch-bereich { margin-top: 8px; }

.tabelle-rahmen { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.tabelle { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabelle th, .tabelle td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle th { font-weight: 700; color: var(--tinte-2); background: var(--salbei); }
.tabelle tr:last-child td { border-bottom: 0; }

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; min-width: 0; }
.feld label, .feld legend { font-weight: 600; font-size: .92rem; }
fieldset.feld { border: 0; padding: 0; }
fieldset.feld legend { margin-bottom: 6px; padding: 0; }
.feld-raster { display: grid; gap: 0 16px; }
@media (min-width: 700px) { .feld-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; font: 400 1rem var(--text); color: var(--tinte);
  background: var(--flaeche); border: 1.5px solid var(--linie); border-radius: 10px;
  padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--kiefer); outline: none; box-shadow: 0 0 0 3px var(--limette-hell); }
input:disabled { background: var(--salbei); color: var(--tinte-2); }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--kiefer); flex: none; margin: 0; }
.code-feld { font-family: ui-monospace, Consolas, monospace; font-size: 1.3rem !important; letter-spacing: .2em; max-width: 14ch; }

.kaestchen { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.kaestchen-eintrag { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; margin: 0 0 14px; }
.kaestchen .kaestchen-eintrag {
  margin: 0; padding: 9px 12px; border: 1.5px solid var(--linie); border-radius: 10px; background: var(--flaeche);
}
.kaestchen .kaestchen-eintrag:has(input:checked) { border-color: var(--kiefer); background: var(--salbei); }

.validation-message { color: var(--rot); font-size: .88rem; font-weight: 600; }
.validation-errors { color: var(--rot); padding-left: 18px; }
.invalid { border-color: var(--rot) !important; }

.link-box { display: flex; gap: 8px; flex-wrap: wrap; }
.link-box input { flex: 1 1 260px; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }

/* ---------- Hinweise ---------- */
.hinweis { border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; border: 1px solid var(--linie); background: var(--salbei); }
.hinweis > :last-child { margin-bottom: 0; }
.hinweis p { margin: 0 0 .4em; }
.hinweis-ok { background: var(--ok-hell); border-color: #BFDDB0; }
.hinweis-warn { background: var(--warn); border-color: var(--warn-linie); }
.hinweis-fehler { background: var(--rot-hell); border-color: #E7B9B2; color: #6E1F1F; }

/* ---------- Konto & Anmeldung ---------- */
.konto-seite { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.konto-karte {
  width: 100%; max-width: 440px; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 18px; padding: 28px 24px;
  box-shadow: 0 10px 30px rgba(24, 43, 33, .06);
}
.konto-karte h1 { font-size: 1.6rem; }
.unter-formular { margin: 16px 0 0; text-align: center; font-size: .93rem; }

.konto-raster { display: grid; gap: 16px; align-items: start; }
@media (min-width: 800px) { .konto-raster { grid-template-columns: 220px 1fr; } }
.unter-navigation { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 800px) { .unter-navigation { flex-direction: column; } }
.unter-navigation a {
  padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--tinte-2);
  background: var(--flaeche); border: 1px solid var(--linie);
}
.unter-navigation a.active { color: #fff; background: var(--kiefer); border-color: var(--kiefer); }

.schritte { padding-left: 20px; }
.schritte > li { margin-bottom: 16px; }
.qr { display: block; width: 220px; height: 220px; image-rendering: pixelated; border: 1px solid var(--linie); border-radius: 12px; margin: 6px 0 10px; }
.code-liste {
  list-style: none; padding: 0; margin: 0 0 16px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.code-liste code {
  display: block; text-align: center; padding: 8px; border-radius: 8px;
  background: var(--salbei); border: 1px solid var(--linie); letter-spacing: .05em;
}

@media print {
  .kopf, .knopf, form button { display: none !important; }
  body { background: #fff; }
}
