/* PowerSales – mobil zuerst, gut lesbar draußen. Schrift lokal (Manrope, SIL OFL). */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/manrope-normal-latin.woff2) format("woff2");
}

:root {
  --navy: #1f2a44;
  --navy-2: #2b3a5c;
  --blau: #2f6fe0;
  --blau-2: #4aa3f0;
  --verlauf: linear-gradient(90deg, #2f6fe0, #4aa3f0);
  --grund: #eef2f8;
  --karte: #ffffff;
  --text: #121a2c;
  --leise: #47536b;          /* 7,4:1 auf Weiß */
  --linie: #d5dcea;
  --rot: #b42318;
  --rot-grund: #fdecea;
  --gruen: #146c3c;
  --gruen-grund: #e5f5ec;
  --gelb-grund: #fff4d6;
  --radius: 14px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; color: var(--navy); }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .6rem; }
a { color: var(--blau); }

/* Kopf */
.kopf {
  background: var(--karte);
  border-bottom: 1px solid var(--linie);
  padding: 10px 16px 0;
}
.marke { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; }
.logo { width: 190px; height: auto; display: block; overflow: visible; }
.logo-power, .logo-sales { font-family: "Manrope", system-ui, sans-serif; font-weight: 700; font-size: 54px; }
.logo-power { fill: var(--navy); }
.unterzeile {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy-2); margin: -2px 0 6px 2px;
}
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px; }
.nav::-webkit-scrollbar { display: none; }
.nav a, .nav .link {
  flex: none; padding: 12px 10px; font-weight: 700; font-size: .95rem; color: var(--leise);
  text-decoration: none; border-bottom: 3px solid transparent;
}
.nav a[aria-current] { color: var(--navy); border-bottom-color: var(--blau); }
.abmelden { margin-left: auto; flex: none; }

/* Inhalt */
.inhalt { max-width: 760px; margin: 0 auto; padding: 16px 16px 24px; }
.karte {
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 18px 16px; margin: 0 0 16px;
}
.karte.schmal { max-width: 420px; margin: 24px auto; }
fieldset.karte { min-width: 0; }
legend { font-weight: 700; font-size: 1.1rem; color: var(--navy); padding: 0 6px; margin-left: -6px; }
.klein { font-size: .88rem; color: var(--leise); }

/* Formulare */
.formular { display: grid; gap: 14px; }
.feld { display: grid; gap: 6px; min-width: 0; }
.feld > span { font-weight: 700; font-size: .95rem; }
.feld b, .haken b { color: var(--rot); }
.feld small { color: var(--leise); font-size: .85rem; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; font: inherit; font-size: 17px; color: var(--text);
  background: #fff; border: 2px solid var(--linie); border-radius: 10px;
  transition: border-color 150ms ease;
}
textarea { min-height: 88px; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px rgba(47, 111, 224, .2);
}
input[readonly] { background: var(--grund); }
input[type=file] { font: inherit; min-height: 52px; }
.zeile2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: end; }
.zeile2.breit-schmal { grid-template-columns: 1fr 96px; }
.zeile2.schmal-breit { grid-template-columns: 110px 1fr; }
.formular .feld + .feld, fieldset .feld, fieldset .haken, fieldset .zeile2 { margin-top: 12px; }
fieldset .zeile2 .feld { margin-top: 0; }

.haken { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 4px 0; }
.haken input { width: 26px; height: 26px; flex: none; margin: 1px 0 0; accent-color: var(--blau); }

/* Umschalter (Strom/Gas usw.) */
.umschalter { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; border: 0; padding: 4px; margin: 0;
  background: var(--grund); border-radius: 12px; }
.umschalter label { position: relative; }
.umschalter input { position: absolute; opacity: 0; inset: 0; }
.umschalter span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 8px;
  border-radius: 9px; font-weight: 700; color: var(--leise); cursor: pointer; text-align: center;
  transition: background-color 150ms ease, color 150ms ease;
}
.umschalter input:checked + span { background: var(--navy); color: #fff; }
.umschalter input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 111, 224, .45); }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px;
  font: inherit; font-weight: 700; font-size: 1.02rem; border-radius: 12px; border: 2px solid var(--navy);
  background: #fff; color: var(--navy); text-decoration: none; cursor: pointer;
  transition: transform 140ms var(--ease-out), box-shadow 140ms ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.knopf:active { transform: scale(0.97); }
.knopf.haupt { background: var(--verlauf); border-color: transparent; color: #fff; width: 100%; }
.knopf.gross { min-height: 60px; font-size: 1.1rem; }
.knopf.leise { border-color: var(--linie); color: var(--leise); min-height: 44px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blau); cursor: pointer; text-decoration: underline; }
.nav .link { text-decoration: none; }

/* Meldungen */
.meldung { padding: 12px 14px; border-radius: 10px; background: var(--gelb-grund); margin: 0 0 14px; font-weight: 600; }
.meldung p { margin: 0; }
.meldung.fehler { background: var(--rot-grund); color: var(--rot); }
.meldung.ok { background: var(--gruen-grund); color: var(--gruen); }
.hat-fehler input:not([type=checkbox]):not([type=radio]) { border-color: var(--rot); }
.fehltext { color: var(--rot); font-style: normal; font-weight: 700; font-size: .9rem; }

/* Ergebnis */
.ergebnis h2 { margin: 4px 2px 8px; font-size: 1.05rem; }
.karten { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; }
.tarif {
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px;
  display: grid; gap: 4px;
}
.tarif.prima { border-color: #9dbcf3; box-shadow: inset 4px 0 0 var(--blau); }
.tarif-kopf { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; justify-content: space-between; }
.tarif h3 { margin: 0; }
.marke-hinweis { font-size: .8rem; font-weight: 700; background: var(--gelb-grund); color: #7a4b00; padding: 3px 8px; border-radius: 99px; }
.preis { margin: 6px 0 0; color: var(--navy); }
.preis strong { font-size: 1.9rem; letter-spacing: -.02em; }
.preis span { font-weight: 600; color: var(--leise); }
.preis.offen { font-size: 1.15rem; font-weight: 700; color: #7a4b00; }
.preis-jahr { font-weight: 600; margin: 0; }
.hinweise { margin: 6px 0; padding: 10px 12px 10px 30px; background: var(--gelb-grund); border-radius: 10px; font-size: .92rem; }
.prov { font-weight: 700; color: var(--gruen); margin: 4px 0; }
.tarif .knopf { margin-top: 10px; }

/* Auswahlkarte Aufnahme */
.gewaehlt { border-color: #9dbcf3; }
.gewaehlt h1 { font-size: 1.3rem; }
.aufnahme { gap: 0; }
.aufnahme:has(input[name=anlass][value=einzug]:checked) .nur-wechsel,
.aufnahme:has(input[name=anlass][value=wechsel]:checked) .nur-einzug,
.aufnahme:has(input[name=zahlungsart][value=ueberweisung]:checked) .nur-lastschrift { display: none; }
.umschalter.klein3 span { min-height: 44px; }

.unterschrift { position: relative; border: 2px dashed var(--linie); border-radius: 12px; background: #fbfcff; margin-top: 10px; }
.unterschrift.hat-fehler { border-color: var(--rot); }
.unterschrift canvas { display: block; width: 100%; height: 200px; touch-action: none; border-radius: 10px; }
.unterschrift::after { content: "Hier unterschreiben"; position: absolute; left: 14px; bottom: 34px; right: 120px;
  border-top: 1px solid #b9c3d8; padding-top: 4px; font-size: .8rem; color: var(--leise); pointer-events: none; }
.unterschrift .knopf { position: absolute; right: 8px; top: 8px; }

/* Listen */
.liste { list-style: none; padding: 0; margin: 0 0 14px; }
.liste li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.liste li > div { display: grid; gap: 2px; min-width: 0; }
.liste .zeilenlink { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; color: inherit; text-decoration: none; }
.liste .rechts { display: grid; justify-items: end; gap: 4px; flex: none; }
.status { font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--grund); color: var(--navy); white-space: nowrap; }
.s-neu { background: #e3ecfd; color: #1f4fb8; }
.s-im_portal { background: var(--gelb-grund); color: #7a4b00; }
.s-bestaetigt { background: var(--gruen-grund); color: var(--gruen); }
.s-abgelehnt, .s-storniert { background: var(--rot-grund); color: var(--rot); }
.filter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.filter a { flex: none; padding: 8px 12px; border-radius: 99px; background: var(--grund); color: var(--navy); text-decoration: none; font-weight: 700; font-size: .88rem; }
.filter a[aria-current] { background: var(--navy); color: #fff; }
.summe { font-size: .95rem; }

.daten { display: grid; grid-template-columns: 1fr; gap: 2px 14px; margin: 0; }
.daten dt { font-size: .85rem; color: var(--leise); font-weight: 700; margin-top: 8px; }
.daten dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.tabelle-rahmen { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.tabelle { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .92rem; }
.tabelle th, .tabelle td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle th { font-size: .8rem; color: var(--leise); }
.tabelle tr.prima td:nth-child(2) { font-weight: 700; }
.tabelle input.zahl { width: 64px; min-height: 44px; padding: 8px; }
.tabelle input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--blau); }
.tabelle td:last-child input { min-height: 44px; }
.aenderungen { padding-left: 20px; font-size: .9rem; }

.fuss { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; font-size: .82rem; color: var(--leise); }

@media (min-width: 720px) {
  .kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 12px 24px 0; }
  .nav { margin: 0; padding: 0; }
  .logo { width: 220px; }
  .inhalt { padding-top: 24px; }
  .karte { padding: 24px; }
  .karte.schmal { margin-top: 48px; }
  .karten { grid-template-columns: 1fr 1fr; }
  .daten { grid-template-columns: 220px 1fr; }
  .daten dt { margin-top: 0; padding: 6px 0; }
  .daten dd { padding: 6px 0; }
  .knopf.haupt { width: auto; }
  .tarif .knopf.haupt, .aufnahme .knopf.haupt, .seite-anmelden .knopf.haupt { width: 100%; }
}

@media (hover: hover) and (pointer: fine) {
  .knopf.haupt:hover { box-shadow: 0 6px 18px rgba(47, 111, 224, .28); }
  .nav a:hover { color: var(--navy); }
}

@media (prefers-reduced-motion: reduce) {
  .knopf { transition: none; }
  .knopf:active { transform: none; }
}
.zeile2.breit-schmal, .zeile2.schmal-breit { align-items: start; }
.zeilenlink > div:first-child { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 420px) { .nav a, .nav .link { padding: 12px 7px; font-size: .9rem; } }
.tabelle input.zahl:not([type=checkbox]):not([type=radio]):not([type=file]) { width: 68px; min-height: 44px; padding: 8px; }
.tabelle td:last-child input:not([type=checkbox]) { min-width: 160px; }

/* Runde 2 (Chef-Prüfung 10.11.) */
.geburt { border: 0; padding: 0; margin: 0; }
.geburt legend { font-weight: 700; font-size: .95rem; color: inherit; margin: 0 0 6px; padding: 0; }
.drei { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: .5rem; }
.drei input { text-align: center; }
.fehlerliste ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.fehlerliste a { color: inherit; text-decoration: underline; display: inline-block; padding: .35rem 0; }
.fehlerliste:focus { outline: 3px solid #c0392b; outline-offset: 2px; }
.warnung { color: #9a3412; font-weight: 600; }
.archiv-zeile { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .3rem 0; }
.text h2 { font-size: 1.05rem; margin: 1rem 0 .3rem; }

/* Fehlende Pflichtangabe (Impressum, Datenschutz): sichtbar rot bis zum Livegang */
.platz { color: var(--rot); font-weight: 700; }

/* Datenschutzhinweis an der Haustür (Aufnahme und Datenschutzseite) */
.kurzhinweis { border: 1px solid var(--linie, #d8dee9); border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px; font-size: .9rem; }
.kurzhinweis h3 { font-size: 1rem; margin: 0 0 6px; }
.kurzhinweis ul { margin: 0 0 6px; padding-left: 1.1rem; }
.kurzhinweis li { margin: 2px 0; }
.kurzhinweis p { margin: 0; }
