/* ===========================================================================
   projekt.css — Ergänzungen für die Werbeflächen-Verwaltung
   Wird zuletzt geladen. Nur Variablen der Farbwelt, keine festen Farben.
   ========================================================================= */

/* --- Inhaltsbereich ------------------------------------------------------ */
.inhalt { padding: 16px 18px 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.inhalt--schmal { max-width: 720px; }
.inhalt > .karte, .inhalt > section { margin: 0; }
.karte h2 { margin-top: 2px; }
.karte__kopf { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.karte__kopf h2 { margin-bottom: 0; }
.klein { font-size: .88rem; }
.warn-text { color: var(--warn); font-weight: 600; }

/* --- Kopfzeile ----------------------------------------------------------- */
.kopf-titel { font-size: 1.25rem; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kopf-luecke { flex: 1; }
.kopf-zurueck { padding-left: 8px; padding-right: 8px; }
.konsole__kopf .knopfreihe, .konsole__kopf .inline-form { margin: 0; }
.konsole__zahlen b .von { font-size: .8rem; color: var(--schwach); font-weight: 500; }
.zahl-pille .pille { font-size: .85rem; vertical-align: middle; }
.seiten-reiter { padding: 0 18px; border-bottom: 1px solid var(--rand-fein); }

/* --- Seitenleiste: Abmelden und Kontoangabe ------------------------------ */
.nav-seitlich__abmelden { margin: 14px 0 0; }
.nav-seitlich__abmelden button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 15px; min-height: 44px; background: none; border: 0;
  border-left: 3px solid transparent; color: var(--dunkel-schwach);
  font: inherit; font-size: .87rem; cursor: pointer; text-align: left;
}
.nav-seitlich__abmelden button:hover { color: var(--dunkel-text); }
.nav-seitlich__abmelden svg { width: 17px; height: 17px; }
.nav-seitlich__wer { padding: 10px 15px; font-size: .8rem; color: var(--dunkel-schwach); overflow-wrap: anywhere; }

/* --- Einzelseiten (Anmeldung, Installer) --------------------------------- */
.einzel { max-width: 440px; margin: 0 auto; padding: 32px 16px 40px; }
.einzel--breit { max-width: 640px; }
.einzel__marke { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.05rem; margin-bottom: 16px; }
.einzel__marke .zeichen, .nav-seitlich__logo .zeichen {
  width: 28px; height: 28px; border-radius: var(--radius); display: grid; place-items: center;
  background: var(--akzent); color: var(--akzent-text); font-size: .85rem;
}
.einzel .karte h1 { font-size: 1.45rem; }
.einzel__sprache { text-align: center; font-size: .85rem; color: var(--schwach); }
.einzel__sprache a { color: var(--schwach); }
.einzel__sprache a[aria-current] { color: var(--text); font-weight: 600; }
.einzel > .hinweis { margin-bottom: 12px; }

/* --- Formulare ----------------------------------------------------------- */
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .zwei-spalten { grid-template-columns: 1fr; } }
.haken-zeile { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.haken-zeile input { width: 20px; height: 20px; flex: none; accent-color: var(--akzent); }
.haken-zeile--fehler { color: var(--fehler); }
.feldgruppe--fehler { border-color: var(--fehler); }
.feldgruppe .uz { margin: 10px 0 0; }
.inline-form { display: inline-block; margin: 0; }
.gefahrzone { border-top: 1px solid var(--rand); padding-top: 14px; }
.gefahrzone p { margin: 0 0 10px; }
.zeile-formular { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 12px; }
.zeile-formular .feld { min-width: 160px; flex: 1; }
.zeile-formular > .knopf { margin-bottom: var(--luft); }
.filterzeile .feld { max-width: 320px; }
textarea.code, input.code, pre.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px;
  background: var(--flaeche2); width: 100%; min-height: 0; white-space: pre-wrap; word-break: break-all;
}
pre.code { padding: 10px 12px; border: 1px solid var(--rand); border-radius: var(--radius); font-size: .85rem; }
.karte textarea.code, .karte input.code { margin-bottom: 10px; }
.hinweisliste { padding-left: 18px; color: var(--schwach); font-size: .9rem; }
.hinweisliste li { margin-bottom: 4px; }

/* --- Erste Schritte ------------------------------------------------------ */
.schrittliste { list-style: none; margin: 0; padding: 0; counter-reset: schritt; }
.schrittliste li { display: flex; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--rand-fein); color: var(--schwach); }
.schrittliste li:last-child { border-bottom: 0; }
.schrittliste__punkt {
  width: 24px; height: 24px; flex: none; border-radius: 50%;
  border: 2px solid var(--rand); display: grid; place-items: center;
}
.schrittliste li.erledigt { color: var(--text); }
.schrittliste li.erledigt span:last-child { text-decoration: line-through; color: var(--schwach); }
.schrittliste li.erledigt .schrittliste__punkt { background: var(--erfolg); border-color: var(--erfolg); color: var(--akzent-text); }
.schrittliste li.jetzt .schrittliste__punkt { border-color: var(--akzent); }
.schrittliste li.jetzt a { font-weight: 700; color: var(--akzent); }

/* --- Diagramm ------------------------------------------------------------ */
.diagramm { display: block; width: 100%; height: auto; }
.diagramm__linie { stroke: var(--rand-fein); stroke-width: 1; }
.diagramm__achse { fill: var(--schwach); font-size: 11px; font-family: var(--schrift); }
.diagramm__views { fill: var(--rand); }
.diagramm__sichtbar { fill: var(--akzent); }
.legende { font-size: .85rem; color: var(--schwach); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.legende span { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 8px; }
.legende span:first-child { margin-left: 0; }
.legende__views { background: var(--rand); }
.legende__sichtbar { background: var(--akzent); }
@media (max-width: 640px) { .diagramm__achse { font-size: 15px; } }

/* --- Fortschrittsbalken (Limit) ------------------------------------------ */
.fortschritt { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--rand-fein); vertical-align: middle; overflow: hidden; }
.fortschritt i { display: block; height: 100%; background: var(--akzent); }

/* --- Schlüssel/Wert-Liste ------------------------------------------------ */
.schluessel-werte { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 8px 18px; margin: 0 0 12px; }
.schluessel-werte dt { color: var(--schwach); font-size: .9rem; }
.schluessel-werte dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
/* Lange Statuspillen (z. B. Französisch) dürfen hier umbrechen */
.schluessel-werte .pille { white-space: normal; }
@media (max-width: 520px) {
  .schluessel-werte { grid-template-columns: 1fr; gap: 2px; }
  .schluessel-werte dd { margin-bottom: 10px; }
}

/* --- Werbemittel --------------------------------------------------------- */
.mittel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mittel { border: 1px solid var(--rand); border-radius: var(--radius-gross); padding: 12px; display: grid; gap: 10px; align-content: start; background: var(--flaeche); min-width: 0; }
.mittel--aus { opacity: .6; }
.mittel__vorschau {
  background: var(--flaeche2); border-radius: var(--radius); padding: 8px;
  display: flex; align-items: center; justify-content: center; min-height: 90px; overflow: hidden;
}
.mittel__vorschau img { max-height: 220px; width: auto; max-width: 100%; }
.mittel__vorschau--gross { margin-bottom: 14px; }
.mittel__vorschau--gross img { max-height: 320px; }
.mittel__info { display: grid; gap: 3px; min-width: 0; }
.mittel__info small { overflow-wrap: anywhere; }
.mittel__ziel { color: var(--schwach); display: flex; gap: 4px; align-items: center; }
.mittel__ziel svg { flex: none; }
.mittel .knopfreihe .knopf { min-height: 40px; padding-top: 6px; padding-bottom: 6px; }
.textanzeige { width: 100%; border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px 12px; background: var(--flaeche); }
.textanzeige small { float: right; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: var(--schwach); }
.textanzeige b { display: block; margin-bottom: 3px; }
.textanzeige span { font-size: .9rem; color: var(--schwach); }
.mini-vorschau { display: flex; align-items: center; gap: 8px; }
.mini-vorschau img { width: 56px; height: 32px; object-fit: contain; background: var(--flaeche2); border-radius: 2px; flex: none; }

/* --- Vorschau-Iframe der Fläche ------------------------------------------ */
.vorschau-rahmen { background: var(--flaeche2); border: 1px dashed var(--rand); border-radius: var(--radius); padding: 12px; overflow: auto; }
.vorschau-iframe { display: block; border: 0; max-width: 100%; margin: 0 auto; background: transparent; }

/* --- Bericht für Werbekunden --------------------------------------------- */
.bericht { max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; display: grid; gap: 16px; }
.bericht__kopf h1 { margin-bottom: 4px; }
.bericht .kacheln { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 760px) { .bericht .kacheln { grid-template-columns: 1fr 1fr; } }
.bericht__fuss { text-align: center; }

/* --- Installer ----------------------------------------------------------- */
.pruefliste { list-style: none; padding: 0; margin: 0; }
.pruefliste li { padding: 6px 0; border-bottom: 1px solid var(--rand-fein); }
.pruefliste li.ok { color: var(--erfolg); }
.pruefliste li.fehlt { color: var(--fehler); font-weight: 600; }

/* --- Telefon ------------------------------------------------------------- */
@media (max-width: 860px) {
  .inhalt { padding: 12px 12px 24px; }
  .seiten-reiter { padding: 0 12px; }
  .konsole__kopf { padding: 10px 12px; }
  .konsole__kopf .knopf { padding-left: 12px; padding-right: 12px; }
}
@media print {
  .reiter, .ausklapper, .knopf { display: none !important; }
  .bericht { padding: 0; }
}

/* --- Meldung oben im Inhaltsbereich -------------------------------------- */
.seiten-meldung { margin: 12px 18px 0; }
@media (max-width: 860px) { .seiten-meldung { margin: 10px 12px 0; } }
table.liste th.zahl, table.liste td.zahl { text-align: right; }
@media (max-width: 640px) { table.liste td.zahl { text-align: right; } }

/* --- Tarife -------------------------------------------------------------- */
.tarif-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tarif {
  border: 1px solid var(--rand); border-radius: var(--radius-gross); background: var(--flaeche);
  padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.tarif--aktuell { border-color: var(--akzent); box-shadow: inset 0 0 0 1px var(--akzent); }
.tarif__kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tarif__kopf h2 { margin: 0; }
.tarif__preis { margin: 0; }
.tarif__preis b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.tarif__liste { margin: 0; padding-left: 18px; color: var(--schwach); font-size: .92rem; flex: 1; }
.tarif__liste li { margin-bottom: 4px; }
.tarif__kaufen { display: grid; gap: 8px; }
.tarif__kaufen form { margin: 0; }
.tarif__kaufen p { margin: 0; }
.fortschritt--breit { display: block; width: 100%; max-width: 160px; margin-top: 6px; }
.tarif-tabelle input { min-width: 0; width: 100%; }
@media (max-width: 640px) { .tarif-tabelle td { display: block; } }

/* --- Rechtliche Seiten --------------------------------------------------- */
.recht .karte h2 { font-size: 1.1rem; margin-top: 20px; }
.recht .karte ul { padding-left: 18px; }
.recht-links { text-align: center; font-size: .85rem; color: var(--schwach); }
.recht-links a { color: var(--schwach); }
.rechtstext-feld { width: 100%; font-size: 16px; line-height: 1.5; min-height: 360px; }
a.einzel__marke { color: var(--text); text-decoration: none; }

/* Team: Rollenwahl direkt in der Liste (Auswahl und Knopf nebeneinander) */
.rolle-wahl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rolle-wahl select { min-height: 40px; font-size: 16px; padding: 0 10px; border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche); color: inherit; }
/* Lange Adressen dürfen umbrechen, sonst wird die Karte am Handy zu breit */
.team-wer { overflow-wrap: anywhere; min-width: 0; }

/* Protokolle unter Plattform > System (Cronjob, Fehlerprotokoll): lange
   Zeilen umbrechen statt seitlich überlaufen, Höhe begrenzen */
pre.protokoll { margin: 0; padding: 10px 12px; border: 1px solid var(--rand); border-radius: var(--radius); background: var(--flaeche2);
  font-size: .8rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; }

/* Breite Tabellen zwischen Handy- und Grossbild-Ansicht (etwa 860 bis 1200 px):
   innerhalb der Karte seitlich scrollen statt die ganze Seite zu verbreitern */
.karte:has(> table.liste), .inhalt:has(> table.liste) { overflow-x: auto; }

/* --- Plattform: Kennzahlen, Aufgaben, Kontenliste ------------------------ */
.konsole__zahlen b a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--rand); }
.konsole__zahlen b a:hover, .konsole__zahlen b a:focus-visible { border-bottom-color: var(--akzent); }
.pille--warn { color: var(--warn-schrift, var(--warn)); }
.aufgaben { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aufgaben__eintrag { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--rand-fein); border-left-width: 3px; border-radius: var(--radius); }
.aufgaben__eintrag--fehler { border-left-color: var(--fehler); }
.aufgaben__eintrag--warn { border-left-color: var(--warn); }
.aufgaben__eintrag .pille { flex: none; }
.aufgaben__eintrag a { overflow-wrap: anywhere; }
.konten-suche { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.konten-suche .feld { flex: 1 1 240px; margin: 0; }
.konten-suche .knopf { flex: none; }
/* Zelle mit Haupttext und Zusatzzeile: bleibt auch in der Kartenansicht
   (Handy, td als flex) beisammen statt in Spalten zu zerfallen */
.zelle-stapel { display: grid; justify-items: start; gap: 1px; min-width: 0; }
@media (max-width: 860px) { .zelle-stapel { justify-items: end; text-align: right; } }
