/*
 * Partnerprogramm -- eigenes Stylesheet fuer die drei Seiten (Landing,
 * Dashboard, Adminuebersicht).
 *
 * Bewusst OHNE Bootstrap und ohne die Editor-Stylesheets: die drei Seiten
 * haben mit dem Editor nichts zu tun, und `bootstrap_limitless.min.Vorlage4`
 * bringt Fallen mit, die hier nichts zu suchen haben -- allen voran das nackte
 * `input { display: none }`, an dem der LinkedIn-Import-Dialog schon einmal
 * unsichtbar geworden ist (siehe CLAUDE.md).
 *
 * Ausgeliefert wird die Datei ueber `asset()`, es gibt also keine Versionsnummer
 * zu zaehlen -- nginx setzt `expires 1h` auf jedes .css, und ein vergessener
 * Zaehler sieht aus wie ein Fix, der nicht deployt wurde.
 */

:root {
  --aff-blau: #4d90fe;
  --aff-blau-dunkel: #2f6fd0;
  --aff-tinte: #1d2733;
  --aff-grau: #5b6875;
  --aff-linie: #e3e8ee;
  --aff-flaeche: #f6f8fb;
  --aff-gruen: #17915d;
  --aff-rot: #c0392b;
  --aff-radius: 14px;
  --aff-schatten: 0 1px 2px rgba(29, 39, 51, .06), 0 8px 24px rgba(29, 39, 51, .06);
}

* { box-sizing: border-box; }

body.aff {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--aff-tinte);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.aff-wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.aff-schmal { max-width: 760px; }

/* ---------- Kopfleiste ---------- */

.aff-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--aff-linie);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  z-index: 20;
}
.aff-kopf img { max-height: 40px; display: block; }
.aff-kopf-rechts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Knoepfe ---------- */

.aff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .05s ease;
  font-family: inherit;
}
.aff-btn:active { transform: translateY(1px); }
.aff-btn:disabled { opacity: .55; cursor: default; }

.aff-btn-primaer { background: var(--aff-blau); color: #fff; }
.aff-btn-primaer:hover:not(:disabled) { background: var(--aff-blau-dunkel); }

.aff-btn-still {
  background: #fff;
  color: var(--aff-tinte);
  border-color: var(--aff-linie);
}
.aff-btn-still:hover:not(:disabled) { background: var(--aff-flaeche); }

.aff-btn-klein { padding: 8px 16px; font-size: 14px; }
.aff-btn-block { width: 100%; }

/* ---------- Hero ---------- */

.aff-hero { padding: 72px 0 56px; text-align: center; }
.aff-badge {
  display: inline-block;
  background: rgba(77, 144, 254, .1);
  color: var(--aff-blau-dunkel);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 18px;
}
.aff-hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  font-weight: 800;
}
.aff-hero p.aff-lead {
  font-size: 1.15rem;
  color: var(--aff-grau);
  max-width: 620px;
  margin: 0 auto 28px;
}
.aff-hero p.aff-lead strong { color: var(--aff-tinte); }
.aff-klein { font-size: 14px; color: var(--aff-grau); }

/* Die grosse Zahl */
.aff-zahl {
  font-size: clamp(3.4rem, 11vw, 5.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--aff-blau);
  display: block;
}

/* ---------- Abschnitte ---------- */

.aff-abschnitt { padding: 56px 0; border-top: 1px solid var(--aff-linie); }
.aff-abschnitt h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0 0 32px;
  text-align: center;
}

.aff-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.aff-karte {
  background: #fff;
  border: 1px solid var(--aff-linie);
  border-radius: var(--aff-radius);
  padding: 24px;
}
.aff-karte h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.aff-karte p { margin: 0; color: var(--aff-grau); font-size: 15px; }

.aff-schritt-nr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--aff-blau);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}

/* ---------- FAQ ---------- */

.aff-faq { border-top: 1px solid var(--aff-linie); }
.aff-faq details {
  border-bottom: 1px solid var(--aff-linie);
  padding: 18px 0;
}
.aff-faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.aff-faq summary::-webkit-details-marker { display: none; }
.aff-faq summary::after {
  content: "+";
  color: var(--aff-grau);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
}
.aff-faq details[open] summary::after { content: "–"; }
.aff-faq details p { margin: 12px 0 0; color: var(--aff-grau); }

/* ---------- Formular ---------- */

.aff-formkarte {
  background: #fff;
  border: 1px solid var(--aff-linie);
  border-radius: 18px;
  box-shadow: var(--aff-schatten);
  padding: 28px;
  max-width: 520px;
  margin: 0 auto;
}

/*
 * Der Umschalter Registrieren / Anmelden ist ein Segmented Control und KEIN
 * <select>: zwei Moeglichkeiten, beide sofort sichtbar.
 */
.aff-tabs {
  display: flex;
  background: var(--aff-flaeche);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 24px;
}
.aff-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 15px;
  font-weight: 650;
  color: var(--aff-grau);
  cursor: pointer;
  font-family: inherit;
}
.aff-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--aff-tinte);
  box-shadow: 0 1px 3px rgba(29, 39, 51, .12);
}

.aff-feld { margin-bottom: 16px; }
.aff-feld label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 6px;
  color: var(--aff-tinte);
}

/*
 * `display: block` steht hier ausdruecklich, obwohl es der Standard ist.
 * In dieser Anwendung gibt es ein Stylesheet mit einem nackten
 * `input { display: none }` -- eine Regel, die einen Input gestaltet, ohne
 * `display` zu setzen, laesst das stehen, und das Feld ist WEG, waehrend alles
 * drumherum richtig aussieht. Genau das ist dem Profil-Import passiert.
 */
.aff-feld input,
.aff-feld textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--aff-linie);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--aff-tinte);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.aff-feld input:focus,
.aff-feld textarea:focus {
  outline: 0;
  border-color: var(--aff-blau);
  box-shadow: 0 0 0 3px rgba(77, 144, 254, .18);
}
.aff-feld textarea { min-height: 76px; resize: vertical; }
.aff-hinweis { font-size: 12.5px; color: var(--aff-grau); margin-top: 6px; }

.aff-zeile { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.aff-meldung {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.aff-meldung.aff-sichtbar { display: block; }
.aff-meldung.aff-fehler { background: #fdecea; color: var(--aff-rot); }
.aff-meldung.aff-ok { background: #e7f6ee; color: var(--aff-gruen); }

/* ---------- Dashboard ---------- */

.aff-dash { background: var(--aff-flaeche); min-height: 100vh; }
.aff-dash .aff-kopf { background: #fff; }
.aff-dash-inhalt { padding: 32px 0 64px; }
.aff-dash h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 4px; letter-spacing: -.015em; }
.aff-dash h2 { font-size: 1.1rem; font-weight: 750; margin: 32px 0 14px; }

.aff-linkbox {
  background: #fff;
  border: 1px solid var(--aff-linie);
  border-radius: var(--aff-radius);
  padding: 20px;
  margin-top: 20px;
}
.aff-linkzeile { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.aff-linkzeile input {
  flex: 1 1 260px;
  display: block;
  border: 1px solid var(--aff-linie);
  border-radius: 10px;
  padding: 10px 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--aff-flaeche);
  color: var(--aff-tinte);
}
.aff-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: .08em;
  background: var(--aff-flaeche);
  border-radius: 8px;
  padding: 3px 9px;
}

.aff-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.aff-kachel {
  background: #fff;
  border: 1px solid var(--aff-linie);
  border-radius: var(--aff-radius);
  padding: 20px;
}
.aff-kachel .aff-kachel-titel {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--aff-grau);
  margin-bottom: 14px;
}
.aff-kachel dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; }
.aff-kachel dt { color: var(--aff-grau); font-size: 14px; }
.aff-kachel dd { margin: 0; font-weight: 700; font-size: 15px; text-align: right; }
.aff-kachel dd.aff-geld { color: var(--aff-gruen); }

.aff-saldo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.aff-saldo .aff-kachel .aff-betrag {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.aff-saldo .aff-kachel .aff-betrag.aff-offen { color: var(--aff-blau); }

.aff-tabelle { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--aff-radius); overflow: hidden; border: 1px solid var(--aff-linie); }
.aff-tabelle th, .aff-tabelle td { text-align: left; padding: 11px 14px; font-size: 14px; border-bottom: 1px solid var(--aff-linie); }
.aff-tabelle th { background: var(--aff-flaeche); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--aff-grau); }
.aff-tabelle tr:last-child td { border-bottom: 0; }
.aff-tabelle td.aff-rechts, .aff-tabelle th.aff-rechts { text-align: right; }
.aff-tabellen-huelle { overflow-x: auto; }

.aff-leer { color: var(--aff-grau); font-size: 15px; }

/* ---------- Dialog (kein window.confirm) ---------- */

.aff-dialog-grund {
  position: fixed;
  inset: 0;
  background: rgba(29, 39, 51, .45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}
.aff-dialog-grund.aff-sichtbar { display: flex; }
.aff-dialog {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(29, 39, 51, .28);
  padding: 26px;
  width: 100%;
  max-width: 460px;
}
.aff-dialog h3 { margin: 0 0 10px; font-size: 1.2rem; font-weight: 750; }
.aff-dialog p { margin: 0 0 18px; color: var(--aff-grau); font-size: 15px; }
.aff-dialog-knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Fusszeile ---------- */

.aff-fuss {
  border-top: 1px solid var(--aff-linie);
  padding: 28px 0 48px;
  text-align: center;
  color: var(--aff-grau);
  font-size: 14px;
}
.aff-fuss a { color: var(--aff-grau); }

/* ---------- Kleine Schirme ---------- */

@media (max-width: 560px) {
  .aff-zeile { grid-template-columns: 1fr; }
  .aff-hero { padding: 48px 0 40px; }
  .aff-abschnitt { padding: 40px 0; }
  .aff-kopf { padding: 12px 16px; }
  .aff-wrap { padding: 0 16px; }
}
