/* Ebert-Service — Verwaltungsbereich. Ruhig, gross, ohne Schnickschnack.
   Gleiche Farben wie die Website, aber hell und sachlich. */

@font-face {
  font-family: 'Plex Sans';
  src: url('../fonts/plexsans-var-latin.woff2') format('woff2-variations'),
       url('../fonts/plexsans-var-latin.woff2') format('woff2');
  font-weight: 100 700; font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var-latin.woff2') format('woff2-variations'),
       url('../fonts/archivo-var-latin.woff2') format('woff2');
  font-weight: 100 900; font-display: swap;
}

:root {
  --papier: #f5f2ec; --flaeche: #fff; --tinte: #16181c; --tinte-2: #4b5360; --tinte-3: #6d7686;
  --linie: rgba(24,28,34,.14); --blau: #1f5fd8; --blau-knopf: #1a53c4; --nacht: #04070f;
  --gruen: #1c7a4a; --rot: #b3341f; --rad: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font: 400 1.0625rem/1.6 'Plex Sans', system-ui, sans-serif;
}
h1 { font: 800 clamp(1.8rem,4vw,2.4rem)/1.15 'Archivo', sans-serif; letter-spacing: -.02em; margin: 0 0 .4em; }
h2 { font: 700 1.35rem/1.25 'Archivo', sans-serif; letter-spacing: -.01em; margin: 2rem 0 .8rem; }
a { color: var(--blau); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }

/* --- Anmeldung ----------------------------------------------------------- */
.anmelde-kasten {
  max-width: 420px; margin: clamp(3rem,10vh,7rem) auto; padding: 2.5rem;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px;
  box-shadow: 0 24px 60px -40px rgba(10,20,40,.6);
}
.anmelde-kasten img { margin: 0 auto 1.2rem; border-radius: 50%; }
.anmelde-kasten h1 { font-size: 1.5rem; text-align: center; margin-bottom: 1.6rem; }
.anmelde-kasten label { display: block; margin: 1rem 0 .35rem; font-weight: 600; }
.anmelde-kasten input { width: 100%; }

/* --- Kopf ---------------------------------------------------------------- */
.admin-kopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem;
  padding: .9rem clamp(1rem,3vw,2rem); background: var(--nacht); color: #e9eefb;
}
.admin-marke { display: flex; align-items: center; gap: .7rem; color: #e9eefb; text-decoration: none; font-weight: 600; margin-right: auto; }
.admin-marke img { border-radius: 50%; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.admin-nav a { color: #b9c6dd; text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.admin-nav a:hover { color: #fff; }
.admin-nav a.hier { color: #fff; border-bottom-color: #2f7bff; }
.admin-rechts { display: flex; gap: 1.2rem; }
.admin-rechts a { color: #9dafcd; text-decoration: none; font-size: .95rem; }
.admin-rechts a:hover { color: #fff; }

.admin-inhalt { max-width: 900px; margin: 0 auto; padding: clamp(1.5rem,4vw,3rem) clamp(1rem,3vw,2rem) 4rem; }
.unter { color: var(--tinte-2); margin-top: -.3rem; }
.klein { font-size: .9rem; color: var(--tinte-3); }
.gross { font-size: 1.15rem; }

/* --- Hinweise ------------------------------------------------------------ */
.hinweis-ok, .hinweis-fehler {
  padding: .9rem 1.1rem; border-radius: var(--rad); margin: 0 0 1.6rem; border-left: 4px solid;
}
.hinweis-ok { background: #e8f4ec; border-color: var(--gruen); color: #14532d; }
.hinweis-fehler { background: #fbeceb; border-color: var(--rot); color: #7f1d1d; }

/* --- Übersicht ----------------------------------------------------------- */
.kachel-gross {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px;
  padding: clamp(1.5rem,4vw,2.5rem); margin-bottom: 1.5rem;
}
.fortschritt { height: 10px; background: #e3ddd2; border-radius: 999px; overflow: hidden; margin: 1.2rem 0 .5rem; }
/* Breite als Stufe statt Inline-Stil — die Sicherheitsregeln der Seite lassen
   kein style-Attribut zu. Fünf Angaben, also fünf Stufen. */
.fortschritt-balken { height: 100%; background: var(--blau); border-radius: 999px; transition: width .6s ease; }
/* Sechs Stufen — so viele Angaben kann der Verwaltungsbereich anmahnen.
   Feste Klassen statt Inline-Breite, weil die Sicherheitsregel (CSP)
   keine Stile im HTML erlaubt. */
.fortschritt-0 { width: 0; }
.fortschritt-1 { width: 16.6%; }
.fortschritt-2 { width: 33.3%; }
.fortschritt-3 { width: 50%; }
.fortschritt-4 { width: 66.6%; }
.fortschritt-5 { width: 83.3%; }
.fortschritt-6 { width: 100%; }

.schritte { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: .9rem; }
.schritte li { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; background: var(--papier); border-radius: var(--rad); }
.schritte li > div { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; flex: 1; }
.schritt-punkt { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--blau); flex: none; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.kachel {
  display: block; padding: 1.4rem; background: var(--flaeche); border: 1px solid var(--linie);
  border-radius: var(--rad); text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s;
}
.kachel:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -24px rgba(10,20,40,.5); }
.kachel h2 { margin: 0 0 .3rem; font-size: 1.15rem; }
.kachel p { margin: 0; color: var(--tinte-2); font-size: .95rem; }

/* --- Masken -------------------------------------------------------------- */
.maske { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: clamp(1.3rem,3vw,2rem); }
.maske.schmal { max-width: 460px; }
fieldset { border: none; border-top: 1px solid var(--linie); margin: 0 0 1.8rem; padding: 1.4rem 0 0; }
fieldset:first-of-type { border-top: none; padding-top: 0; }
legend { font: 700 1.1rem 'Archivo', sans-serif; padding: 0; margin-bottom: .8rem; }
.feld { margin-bottom: 1.1rem; }
.feld label, .maske > label { display: block; font-weight: 600; margin-bottom: .3rem; }
.feld .klein { display: block; margin-bottom: .4rem; }
input[type=text], input[type=password], input[type=file], textarea, select {
  width: 100%; padding: .85rem 1rem; font: 400 1.05rem/1.5 'Plex Sans', sans-serif;
  background: var(--papier); color: var(--tinte); border: 1px solid var(--linie); border-radius: var(--rad);
}
input:focus, textarea:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px rgba(31,95,216,.18); }
textarea { min-height: 130px; resize: vertical; }
.feld-offen input { border-color: var(--rot); background: #fff8f7; }
.fehlt { color: var(--rot); font-weight: 600; font-size: .85rem; }
.haken { display: flex; align-items: flex-start; gap: .6rem; margin: .8rem 0 0; font-weight: 400; }
.haken input { width: 20px; height: 20px; margin-top: .2rem; }

button {
  padding: .95rem 1.7rem; font: 600 1.05rem 'Plex Sans', sans-serif; cursor: pointer;
  background: var(--blau-knopf); color: #fff; border: none; border-radius: var(--rad);
}
button:hover { background: var(--blau); }
.knopf-klein { padding: .45rem .9rem; font-size: .9rem; background: var(--blau-knopf); color: #fff; border-radius: 6px; text-decoration: none; display: inline-block; border: none; cursor: pointer; }

/* --- Bilder -------------------------------------------------------------- */
.bild-plaetze { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.bild-platz { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 1.2rem; }
.bild-platz h2 { margin: 0 0 .8rem; font-size: 1.1rem; }
.bild-platz img { border-radius: var(--rad); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.bild-leer { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--papier); border: 1px dashed var(--linie); border-radius: var(--rad); color: var(--tinte-3); }
.bild-platz form { margin-top: .9rem; display: grid; gap: .7rem; }

/* --- Anfragen und Tabellen ----------------------------------------------- */
.anfragen { display: grid; gap: 1rem; }
.anfrage-eintrag { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 1.3rem 1.5rem; }
.anfrage-eintrag header { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.anfrage-eintrag header span { color: var(--tinte-3); font-size: .92rem; }
.anfrage-eintrag dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.2rem; margin: 0 0 .9rem; font-size: .96rem; }
.anfrage-eintrag dt { color: var(--tinte-3); }
.anfrage-eintrag dd { margin: 0; }
.anfrage-text { margin: 0; padding-top: .8rem; border-top: 1px solid var(--linie); }

.tabelle { width: 100%; border-collapse: collapse; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; overflow: hidden; }
.tabelle th, .tabelle td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--linie); font-size: .96rem; }
.tabelle th { background: var(--papier); font-weight: 600; }
.tabelle tr:last-child td { border-bottom: none; }

.admin-fuss { max-width: 900px; margin: 0 auto; padding: 0 clamp(1rem,3vw,2rem) 3rem; color: var(--tinte-3); font-size: .92rem; }

@media (max-width: 600px) {
  .admin-kopf { gap: .7rem 1rem; }
  .anfrage-eintrag dl { grid-template-columns: 1fr; gap: 0 0; }
  .anfrage-eintrag dt { margin-top: .5rem; }
}

/* --- Besucherzahlen ------------------------------------------------------- */
.zeitraum { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.zeitraum a {
  padding: .5rem 1rem; border-radius: 6px; text-decoration: none;
  background: var(--flaeche); border: 1px solid var(--linie); color: var(--tinte-2); font-size: .95rem;
}
.zeitraum a.hier { background: var(--blau-knopf); border-color: var(--blau-knopf); color: #fff; font-weight: 600; }

.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.zahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 1.3rem 1.5rem; }
.zahl strong { display: block; font: 800 2.2rem/1 'Archivo', sans-serif; letter-spacing: -.02em; color: var(--blau); }
.zahl span { display: block; margin-top: .4rem; color: var(--tinte-2); font-size: .95rem; }

.verlauf {
  display: flex; align-items: flex-end; gap: 2px; height: 140px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 1rem;
}
.verlauf-tag { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.verlauf-saeule { width: 100%; background: var(--blau); border-radius: 3px 3px 0 0; min-height: 2px; }
/* Höhe in 20 Stufen — kein Inline-Stil, damit die Sicherheitsregeln greifen */
.saeule-1{height:5%}.saeule-2{height:10%}.saeule-3{height:15%}.saeule-4{height:20%}
.saeule-5{height:25%}.saeule-6{height:30%}.saeule-7{height:35%}.saeule-8{height:40%}
.saeule-9{height:45%}.saeule-10{height:50%}.saeule-11{height:55%}.saeule-12{height:60%}
.saeule-13{height:65%}.saeule-14{height:70%}.saeule-15{height:75%}.saeule-16{height:80%}
.saeule-17{height:85%}.saeule-18{height:90%}.saeule-19{height:95%}.saeule-20{height:100%}

.statistik-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1rem; }
@media (max-width: 700px) { .statistik-spalten { grid-template-columns: 1fr; } }
