/*
 * FusionFitness Werbematerial-Portal - helles Kundendesign
 * Markenfarben uebernommen von fusionulmen.de: Gelb #ffcc00 (Primaer),
 * Tuerkis #00d4aa (Sekundaer), Schriften Montserrat/Raleway (lokal gehostet).
 * Bewusst HELL (im Gegensatz zur dunklen Hauptseite), weil es fuer Kunden
 * freundlicher und auf Mobilgeraeten besser lesbar ist.
 */

:root {
  --brand: #ffcc00;          /* Marken-Gelb: Buttons, Akzente */
  --brand-hover: #ffd633;
  --brand-soft: #fff8dd;     /* sehr helles Gelb fuer Flaechen */
  --teal: #00d4aa;           /* Marken-Tuerkis: Flaechen/Rahmen */
  --teal-text: #00755f;      /* abgedunkelt, damit Text auf Weiss lesbar ist */
  --teal-soft: #e6faf5;

  --bg: #f4f6f8;
  --card: #ffffff;
  --line: #e2e6ea;
  --text: #1a1a1a;
  --muted: #6b7280;

  --ok: var(--teal-text);
  --warn-text: #8a6100;
  --warn-soft: #fff4e0;
  --err: #c0392b;
  --err-soft: #fdeceb;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Zielgeraet ist der stationaere PC der Firmen -> breiteres Layout, mehrspaltig.
   Bleibt per Media-Query auch auf kleinen Schirmen benutzbar. */
.wrap { max-width: 1040px; margin: 0 auto; padding: 32px 20px 64px; }
.wrap.schmal { max-width: 620px; }   /* Formular-/Statusseiten mittig und kompakt */

/* Zweispaltiges Dashboard ab Tablet-Breite aufwaerts */
.grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; align-items: start; }
.grid > div { min-width: 0; }
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------- Kopf ---------- */
.head { text-align: center; margin: 8px 0 26px; }
.brand {
  font-family: 'Raleway', sans-serif;
  font-size: 1.9rem; font-weight: 800; letter-spacing: .02em; color: var(--text);
  display: inline-block; padding-bottom: 6px;
  border-bottom: 4px solid var(--brand);   /* Markenakzent statt gelber Schrift (Kontrast) */
}
.sub { color: var(--muted); font-size: .95rem; margin-top: 8px; }

/* ---------- Karten ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
}
.card.center { text-align: center; }

h1 { font-family: 'Raleway', sans-serif; font-size: 1.4rem; font-weight: 700; margin: 0 0 10px; }
h2 { font-family: 'Raleway', sans-serif; font-size: 1.1rem; font-weight: 700; margin: 0 0 14px; }
.muted { color: var(--muted); }
a { color: var(--teal-text); }

/* ---------- Upload-Feld ---------- */
.drop {
  display: flex; align-items: center; justify-content: center;
  min-height: 128px; margin: 6px 0 4px; padding: 18px;
  border: 2px dashed #cfd5dc; border-radius: var(--radius);
  background: #fafbfc; cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s;
}
.drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop input { display: none; }
.drop-text { color: var(--muted); word-break: break-word; }

/* ---------- Formular ---------- */
.field { display: block; margin: 16px 0; }
.field span { display: block; margin-bottom: 6px; color: var(--text); font-size: .9rem; font-weight: 600; }
textarea, input[type="text"], input[type="email"] {
  width: 100%; background: #fff; color: var(--text);
  border: 1px solid #cfd5dc; border-radius: 10px; padding: 11px 12px;
  font: inherit; resize: vertical;
}
textarea:focus, input[type="text"]:focus, input[type="email"]:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 204, 0, .25);
}

/* ---------- Buttons ---------- */
button, .btn {
  display: inline-block; width: auto; min-width: 240px; margin-top: 12px;
  background: var(--brand); color: #1a1a1a;   /* dunkle Schrift auf Gelb = hoher Kontrast */
  border: 0; border-radius: 10px; padding: 13px 26px;
  font: inherit; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none;
  transition: background .15s, transform .05s;
}
@media (max-width: 520px) { button, .btn { width: 100%; min-width: 0; } }
button:hover, .btn:hover { background: var(--brand-hover); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn { width: auto; padding: 11px 22px; margin-top: 20px; }

.mini {
  width: auto; min-width: 0;   /* min-width des Haupt-Buttons zuruecksetzen */
  margin: 0 0 0 8px; padding: 5px 14px; font-size: .82rem; font-weight: 600;
  background: #fff; border: 1px solid var(--line); color: var(--muted); border-radius: 8px;
}
.mini:hover { background: #f3f5f7; border-color: #c9d0d8; color: var(--text); }
.mini.danger { border-color: #f0c3bd; color: var(--err); background: #fff; }
.mini.danger:hover { background: var(--err-soft); }

/* ---------- Listen / Status ---------- */
.err { color: var(--err); background: var(--err-soft); border: 1px solid #f4cdc8;
       border-radius: 8px; padding: 9px 12px; font-size: .9rem; margin: 8px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li {
  padding: 13px 0; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.list li:last-child { border-bottom: 0; }
.name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }

.badge {
  font-size: .76rem; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: #f6f8fa;
}
.badge.ok { color: var(--teal-text); background: var(--teal-soft); border-color: #b9ece0; }
.badge.warten { color: var(--warn-text); background: var(--warn-soft); border-color: #f3dcb0; }
.badge.fehler { color: var(--err); background: var(--err-soft); border-color: #f4cdc8; }
.grund { flex-basis: 100%; color: var(--muted); font-size: .85rem; }

/* ---------- Zustandsseiten ---------- */
.icon {
  width: 58px; height: 58px; line-height: 58px; margin: 4px auto 14px;
  border-radius: 50%; font-size: 1.7rem; font-weight: 700;
}
.icon.ok { background: var(--teal-soft); color: var(--teal-text); }
.icon.err { background: var(--err-soft); color: var(--err); }
.ref { color: var(--muted); font-size: .9rem; }

.ersetzt-box {
  background: var(--brand-soft); border: 1px solid #f2e0a0;
  border-radius: 10px; padding: 11px 13px; margin-bottom: 14px; font-size: .92rem;
}

.foot {
  text-align: center; color: var(--muted); font-size: .82rem;
  margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line);
}

/* ---------- Medienliste mit Vorschau ---------- */
.list.medien li { align-items: flex-start; gap: 14px; padding: 14px 0; }
.vorschau {
  position: relative; flex: 0 0 auto;
  width: 92px; height: 62px; border-radius: 8px; overflow: hidden;
  background: #eef1f4; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.vorschau img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vorschau .platzhalter { font-size: 1.5rem; opacity: .55; }
.vorschau .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; text-shadow: 0 1px 6px rgba(0,0,0,.6);
  background: rgba(0,0,0,.22);
}
.medieninfo { flex: 1; min-width: 0; }
.medieninfo .name { white-space: normal; word-break: break-word; margin-bottom: 6px; }
.medienzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.medienzeile .mini { margin-left: 0; }

/* ---------- Kopfzeile mit Aktion ---------- */
.kopfzeile { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.kopfzeile .mini { margin: 0; flex: 0 0 auto; }

/* ---------- Datenliste (Vertrag) ---------- */
.daten { list-style: none; padding: 0; margin: 0 0 14px; }
.daten li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem;
}
.daten li:last-child { border-bottom: 0; }
.daten span { color: var(--muted); }
.daten strong { text-align: right; word-break: break-word; }

.hinweis {
  background: var(--warn-soft); border: 1px solid #f3dcb0; color: var(--warn-text);
  border-radius: 8px; padding: 9px 12px; font-size: .9rem; margin-bottom: 12px;
}

select {
  width: 100%; background: #fff; color: var(--text);
  border: 1px solid #cfd5dc; border-radius: 10px; padding: 10px 12px; font: inherit;
}
select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,204,0,.25); }

/* Hilfsklassen */
.mb-0 { margin-bottom: 0; }

/* ---------- Upload-Fortschritt ---------- */
#fortschritt { margin: 14px 0 4px; }
.balken {
  height: 10px; background: #e8ebee; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line);
}
.balken-fuellung {
  height: 100%; width: 0; background: var(--brand);
  transition: width .2s ease;
}
#fortschritt-text { font-size: .85rem; margin-top: 6px; }

/* Schrittanleitung auf der Hilfeseite */
.anleitung { margin: 0; padding-left: 1.3rem; color: var(--text); line-height: 1.75; }
.anleitung li { margin-bottom: .45rem; }
.anleitung li::marker { color: var(--teal-text); font-weight: 700; }

/* Kontingent-Kasten: soll auffallen, ohne wie eine Warnung zu wirken */
.card.kontingent { border-left: 4px solid var(--brand); }
.card.kontingent .daten { margin-bottom: .75rem; }

/* ---------- Anzeigezeit (Nachweis fuer den Kunden) ---------- */
.card.auswertung { border-left: 4px solid var(--teal); }

.zeitraum-wahl { display: flex; gap: 8px; margin: 0 0 14px; }
.zeitraum-wahl a {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .88rem; text-decoration: none; color: var(--muted); background: #fff;
}
.zeitraum-wahl a.aktiv {
  background: var(--teal-soft); border-color: var(--teal); color: var(--teal-text);
  font-weight: 600;
}

.auswertung-tabelle { width: 100%; border-collapse: collapse; font-size: .92rem; }
.auswertung-tabelle th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: .82rem;
  padding: 0 10px 6px 0; border-bottom: 1px solid var(--line);
}
.auswertung-tabelle td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.auswertung-tabelle tr:last-child td { border-bottom: 0; }
.auswertung-tabelle .zahl { text-align: right; white-space: nowrap; }
.auswertung-tabelle .klein { font-size: .78rem; display: block; }

/* Balken traegt KEINE eigene Aussage - er macht die Zahl daneben nur schneller
   vergleichbar. Deshalb schmal und ohne Beschriftung. */
.balkenspalte { width: 40%; }
.balken {
  display: block; height: 8px; border-radius: 4px; background: var(--teal);
  min-width: 2px;
}
.auswertung-tabelle tr.ohne-messung td { background: #fafbfc; font-style: italic; }

@media (max-width: 560px) {
  .balkenspalte { display: none; }
}
