/* Parkplatzbuchung Havel-Spitze */
:root {
  --grund: #f6f5f1;
  --flaeche: #ffffff;
  --text: #1f2a2e;
  --leise: #5d6b70;
  --linie: #dcdfdc;
  --akzent: #1d5c63;
  --akzent-hell: #e3eeee;
  --akzent-dunkel: #14454b;
  --gut: #2f6f3e;
  --gut-hell: #e4f0e6;
  --warn: #8a5a00;
  --warn-hell: #fbf1dc;
  --fehler: #a33a2b;
  --fehler-hell: #f8e5e1;
  --belegt: #1d5c63;
  --reserviert: #c9a24a;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.eingebettet { background: transparent; }
a { color: var(--akzent); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 1.2rem 0 .6rem; font-weight: 650; }
h2 { font-size: 1.1rem; margin: 0 0 .7rem; font-weight: 650; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
.rahmen { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.rahmen.breit { max-width: 1280px; }
.rahmen.schmal { max-width: 420px; }
.eingebettet .rahmen { padding: 0 4px; }
.eingebettet h1 { margin-top: .2rem; }

.kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf .rahmen { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; flex-wrap: wrap; }
.marke { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.kopf-zusatz { color: var(--leise); font-weight: 400; font-size: .95rem; margin-left: .4rem; }
.fuss { color: var(--leise); font-size: .85rem; padding: 2rem 0; }
.fuss a { color: var(--leise); }

.einleitung { color: var(--leise); margin-top: 0; }
.testhinweis { background: var(--warn-hell); color: var(--warn); border-radius: var(--radius); padding: .5rem .8rem; font-size: .9rem; margin: 1rem 0 0; }
.meldung { padding: .7rem .9rem; border-radius: var(--radius); }
.meldung.warnung { background: var(--warn-hell); color: var(--warn); }
.meldung.erfolg { background: var(--gut-hell); color: var(--gut); }

/* Formulare */
.schritt, .karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 0 0 1rem; }
.schritt h2 { display: flex; align-items: center; gap: .55rem; }
.nr { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--akzent); color: #fff; font-size: .85rem; }
.optional { color: var(--leise); font-weight: 400; font-size: .85em; }
label { display: block; font-size: .9rem; font-weight: 600; margin: 0 0 .8rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .62rem .7rem; font: inherit; font-weight: 400;
  color: var(--text); background: #fff; border: 1px solid #b9c0bd; border-radius: 6px; min-height: 44px;
}
textarea { min-height: auto; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(29,92,99,.35); outline-offset: 1px; border-color: var(--akzent); }
.zeile { display: grid; gap: 0 1rem; }
.zeile.zwei { grid-template-columns: 1fr 1fr; }
.zeile.drei { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .zeile.zwei, .zeile.drei { grid-template-columns: 1fr; } }
.feldfehler { display: block; color: var(--fehler); font-size: .85rem; font-weight: 500; margin: .3rem 0 0; }
.hilfe { color: var(--leise); font-size: .85rem; font-weight: 400; margin: .3rem 0 .6rem; }
.haken { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.haken input { width: 1.2rem; height: 1.2rem; min-height: 0; margin: .2rem 0 0; flex: none; accent-color: var(--akzent); }
.unsichtbar { position: absolute; left: -9999px; }
details.firma { margin-top: .4rem; }
details.firma summary { cursor: pointer; color: var(--akzent); font-size: .95rem; margin-bottom: .8rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }

.verfuegbarkeit { margin: 0; font-size: .95rem; min-height: 1.4em; }
.verfuegbarkeit.ok { color: var(--gut); }
.verfuegbarkeit.fehler { color: var(--fehler); }

.plaetze { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .45rem; }
.platz { min-height: 46px; border: 1px solid #b9c0bd; background: #fff; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; color: var(--text); }
.platz.beliebig { grid-column: span 2; font-weight: 500; }
.platz:hover:not(:disabled) { border-color: var(--akzent); }
.platz.gewaehlt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.platz.belegt { background: repeating-linear-gradient(-45deg, #eef0ee, #eef0ee 4px, #e3e6e3 4px, #e3e6e3 8px); color: #9aa3a0; cursor: not-allowed; text-decoration: line-through; }

.summe { display: flex; justify-content: space-between; align-items: baseline; padding: .2rem 0 1rem; border-bottom: 1px solid var(--linie); margin-bottom: 1rem; }
.summe strong { font-size: 1.4rem; }

.knopf {
  display: inline-block; border: 0; border-radius: 6px; background: var(--akzent); color: #fff; font: inherit; font-weight: 600;
  padding: .7rem 1.2rem; min-height: 44px; cursor: pointer; text-decoration: none; text-align: center;
}
.knopf:hover { background: var(--akzent-dunkel); }
.knopf:disabled { opacity: .6; cursor: wait; }
.knopf.gross { width: 100%; font-size: 1.05rem; padding: .85rem; margin-top: .4rem; }
.knopf.leise { background: var(--flaeche); color: var(--akzent); border: 1px solid var(--akzent); }
.knopf.leise:hover { background: var(--akzent-hell); }
.knopf.gefahr { background: var(--fehler); }
.knopf.klein { padding: .4rem .8rem; min-height: 36px; font-size: .9rem; }
.knopfreihe { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.knopfreihe input { margin: 0; min-height: 36px; padding: .3rem .5rem; }
form.inline { display: inline; }

/* Bestätigung */
.bestaetigung { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; }
.platznummer { background: var(--akzent); color: #fff; border-radius: var(--radius); padding: .8rem 1.2rem; text-align: center; min-width: 120px; }
.platznummer span { display: block; font-size: .85rem; opacity: .85; }
.platznummer strong { font-size: 3rem; line-height: 1; }
.bestaetigung dl, .daten { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; }
dt { color: var(--leise); font-size: .9rem; }
dd { margin: 0; }
dd.code { font-size: 1.5rem; font-weight: 700; letter-spacing: .12em; }

/* Verwaltung */
.verwaltung .kopf .rahmen { min-height: 52px; }
.menue { display: flex; gap: .2rem; flex-wrap: wrap; }
.menue a { text-decoration: none; color: var(--text); padding: .45rem .7rem; border-radius: 6px; font-size: .95rem; }
.menue a:hover { background: var(--akzent-hell); }
.menue a.aktiv { background: var(--akzent); color: #fff; }
.menue a.abmelden { color: var(--leise); }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin: 0 0 1.2rem; }
.kennzahlen div { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: .8rem 1rem; }
.kennzahlen span { display: block; color: var(--leise); font-size: .85rem; }
.kennzahlen strong { font-size: 1.35rem; }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .zwei-spalten { grid-template-columns: 1fr; } }
.liste { list-style: none; padding: 0; margin: 0; }
.liste li { padding: .35rem 0; border-bottom: 1px solid var(--linie); }
.leer { color: var(--leise); }
.plan-kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0 .7rem; }
.plan-kopf h1, .plan-kopf h2 { margin: 0; }

.plan-huelle, .tabelle-huelle { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.plan { border-collapse: collapse; width: 100%; font-size: .82rem; }
.plan th, .plan td { border-right: 1px solid #eceeec; border-bottom: 1px solid #eceeec; height: 30px; }
.plan thead th { font-weight: 600; padding: .4rem .3rem; white-space: nowrap; background: #fafaf8; position: sticky; top: 0; }
.plan thead th.wochenende { color: var(--akzent); }
.plan thead th.heute { background: var(--akzent-hell); }
.plan tbody th { padding: 0 .6rem; text-align: left; white-space: nowrap; background: #fafaf8; position: sticky; left: 0; }
.plan td { min-width: 74px; padding: 0; }
.plan td.heute { background: #f2f7f7; }
.plan td.belegt { background: var(--belegt); }
.plan td.reserviert { background: var(--reserviert); }
.plan td.belegt, .plan td.reserviert { border-left: 3px solid #fff; border-radius: 4px; }
.plan td a { display: block; color: #fff; text-decoration: none; padding: 0 .5rem; line-height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; min-width: 100%; }
.plan td.reserviert a { color: #3b2c00; }
.plan tr.gesperrt th, .plan tr.gesperrt td.frei { background: #eef0ee; color: #9aa3a0; }
.legende { font-size: .85rem; color: var(--leise); display: flex; gap: .4rem 1rem; align-items: center; flex-wrap: wrap; }
.legende span { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: -.6rem; }
.legende .belegt { background: var(--belegt); }
.legende .reserviert { background: var(--reserviert); }

.tabelle { border-collapse: collapse; width: 100%; font-size: .92rem; }
.tabelle th, .tabelle td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid #eceeec; white-space: nowrap; }
.tabelle thead th { background: #fafaf8; font-weight: 600; }
.tabelle tbody tr { cursor: pointer; }
.tabelle tbody tr:hover { background: #f7faf9; }
.tabelle tfoot th { background: #fafaf8; }
.zahl { text-align: right !important; font-variant-numeric: tabular-nums; }
.status { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .5rem; border-radius: 99px; vertical-align: middle; }
h1 .status { font-size: .8rem; }
.status.bezahlt { background: var(--gut-hell); color: var(--gut); }
.status.offen { background: var(--warn-hell); color: var(--warn); }
.status.storniert { background: var(--fehler-hell); color: var(--fehler); }
.status.abgelaufen { background: #eceeec; color: var(--leise); }
.filter { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filter label { margin: 0; }
.filter input, .filter select { min-height: 40px; padding: .45rem .6rem; }
.aktionen { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
.aktionen .karte { margin: 0; }
.formular .karte { margin-bottom: 1rem; }
.platzwahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .2rem 1rem; }
pre.code { background: #f2f3f0; padding: .7rem; border-radius: 6px; overflow-x: auto; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }
.anmeldung main { padding-top: 3rem; }

/* Überweisung */
.ueberweisung { display: grid; grid-template-columns: 1fr 180px; gap: 1.5rem; align-items: start; }
@media (max-width: 600px) { .ueberweisung { grid-template-columns: 1fr; } }
.ueberweisung h2 { margin-bottom: .8rem; }
.ueberweisung dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; }
.ueberweisung dd.iban { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.girocode { margin: 0; text-align: center; }
.girocode #girocode { background: #fff; border: 1px solid var(--linie); border-radius: 6px; padding: 6px; }
.girocode svg { display: block; width: 100%; height: auto; }
.girocode figcaption { font-size: .8rem; color: var(--leise); margin-top: .4rem; }
@media (max-width: 600px) { .girocode { max-width: 200px; margin: 0 auto; } }

/* Verwaltung: offene Zahlungen */
.status.ueberfaellig { background: var(--fehler-hell); color: var(--fehler); }
.tabelle tr.ueberfaellig td { background: #fdf3f1; }
.offene { margin-bottom: 1.2rem; }
.offene .tabelle-huelle { border: 0; }
.offene .tabelle tbody tr { cursor: default; }
.zaehler { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 99px; background: var(--reserviert); color: #3b2c00; font-size: .75rem; font-weight: 700; text-align: center; line-height: 1.3rem; }
.karte.hervor { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent) inset; }
.haken.eingerueckt { margin-left: 1.8rem; }
.meldung a { color: inherit; }
.ueberweisung > * { min-width: 0; }
.ueberweisung dd { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .ueberweisung dl { grid-template-columns: 1fr; gap: 0; }
  .ueberweisung dd { margin-bottom: .5rem; }
  .bestaetigung dl { grid-template-columns: 1fr; gap: 0; }
  .bestaetigung dd { margin-bottom: .4rem; }
}
/* Kalender */
.flatpickr-input[readonly] { background: #fff; cursor: pointer; }
.flatpickr-calendar { font-family: inherit; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--akzent); border-color: var(--akzent); }
.flatpickr-calendar input, .flatpickr-calendar select { display: inline-block; width: auto; min-height: 0; margin: 0; padding: 0 0 0 .5ch; border: 0; border-radius: 0; background: transparent; font-weight: 600; }
.flatpickr-calendar input:focus, .flatpickr-calendar select:focus { outline: none; }
.flatpickr-current-month { display: flex; align-items: center; justify-content: center; gap: .3rem; padding-top: 6px; }
.flatpickr-current-month .numInputWrapper { width: 5.2ch; }
