/* ============================================================
   feva — Konto- und Profilseiten
   Eigenständiges Stylesheet: setzt styles.css NICHT voraus.
   Farbwelt, Radien, Schatten und Typografie sind 1:1 aus
   landing/styles.css übernommen (.lead-col, .btn-dark, .fvcard).
   Mobile-first, Desktop ab 720px.
   ============================================================ */

:root {
  /* Flächen (helle Sektion der Startseite) */
  --fv-page:        #ece7f7;
  --fv-surface:     #faf8fe;            /* wie .lead-col */
  --fv-surface-2:   #ffffff;            /* Eingabefelder */
  --fv-surface-3:   #f1ecfa;            /* Umschalter, leere Bildfelder */

  /* Linien */
  --fv-border:      #e3daf3;            /* wie .lead-col */
  --fv-border-2:    #ece7f3;
  --fv-border-hov:  #d7cbf0;

  /* Schrift */
  --fv-ink:         #14101c;
  --fv-ink-soft:    #5f5680;
  --fv-ink-muted:   #8a83a3;
  --fv-ink-faint:   #a49dbb;

  /* Marke */
  --fv-pink:        #ff2d72;
  --fv-pink-soft:   #ff4d8d;
  --fv-purple:      #7b2ff7;
  --fv-plum:        #a31a6b;

  /* Signalfarben */
  --fv-red:         #dc2743;
  --fv-red-dark:    #b81f36;
  --fv-green:       #0d7a5f;

  /* Radien */
  --fv-r-card:      24px;
  --fv-r-field:     14px;
  --fv-r-tile:      16px;
  --fv-r-pill:      999px;

  /* Schatten (wie .lead-col / .btn-dark) */
  --fv-shadow-card: 0 24px 56px rgba(70,50,110,.11);
  --fv-shadow-soft: 0 6px 16px rgba(70,50,110,.10);

  /* Schriftfamilien */
  --fv-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  --fv-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* ---------- Seitengrund ----------
   Doppelselektor `html body`, damit die helle Fläche unabhängig von der
   Ladereihenfolge gewinnt (styles.css setzt `body` auf den dunklen App-Look). */
html body {
  /* Der 8px-Standardrand von <body> muss weg: sonst sitzt die Seite in einem
     hellen Rahmen und alles ausserhalb von .fv-shell rutscht nach rechts.
     konto.html und auth-callback.html bringen denselben Reset selbst mit —
     doppelt gesetzt schadet nicht, profil.html braucht ihn von hier. */
  margin: 0;
  padding: 0;
  background-color: var(--fv-page);
  background-image: url("/assets/section-bg-v2.jpg");
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: top center;
  background-attachment: scroll;
  color: var(--fv-ink);
  font-family: var(--fv-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ============================================================
   .fv-shell — Seitenrahmen
   ============================================================ */
.fv-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px max(16px, env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.fv-shell,
.fv-shell *,
.fv-shell *::before,
.fv-shell *::after { box-sizing: border-box; }
.fv-shell img { max-width: 100%; }

/* ============================================================
   .fv-card — weiße Karte
   ============================================================ */
.fv-card {
  position: relative;
  z-index: 0;
  background: var(--fv-surface);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-r-card);
  box-shadow: var(--fv-shadow-card);
  padding: 22px 18px;
}
/* dezente Doodle-Textur wie bei den Karten der Startseite */
.fv-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: url("/assets/doodle-tex.png") top left / 300px 300px repeat;
  opacity: .16;                  /* dezenter als auf der Startseite — Formulare bleiben ruhig */
  pointer-events: none;
}
.fv-card + .fv-card { margin-top: 16px; }

/* ============================================================
   .fv-h1 — Seitenüberschrift
   ============================================================ */
.fv-h1 {
  font-family: var(--fv-serif);
  font-weight: 600;
  font-size: clamp(28px, 7.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -.014em;
  color: var(--fv-ink);
  margin: 0 0 20px;
}

/* ============================================================
   .fv-field / .fv-label / .fv-input
   ============================================================ */
.fv-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.fv-field:last-child { margin-bottom: 0; }

.fv-label {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--fv-ink-soft);
}

.fv-input {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  font-family: inherit;
  font-size: 16px;               /* 16px verhindert das iOS-Zoom-Springen */
  line-height: 1.45;
  color: var(--fv-ink);
  background: var(--fv-surface-2);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-r-field);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fv-input::placeholder { color: var(--fv-ink-faint); }
.fv-input:hover { border-color: var(--fv-border-hov); }
.fv-input:focus,
.fv-input:focus-visible {
  outline: none;
  border-color: var(--fv-pink);
  box-shadow: 0 0 0 3px rgba(255,45,114,.18);
}
.fv-input:disabled {
  background: var(--fv-surface-3);
  color: var(--fv-ink-muted);
  cursor: not-allowed;
}
/* Autofill nicht gelb einfärben */
.fv-input:-webkit-autofill,
.fv-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fv-ink);
  box-shadow: 0 0 0 1000px var(--fv-surface-2) inset;
}
textarea.fv-input {
  min-height: 120px;
  resize: vertical;
}
select.fv-input {
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235f5680' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
}
/* Modifikator: 6-stelliger Anmeldecode */
.fv-input.fv-code {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .42em;
  text-indent: .42em;            /* gleicht den Abstand hinter der letzten Ziffer aus */
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   .fv-row — zwei Spalten ab Desktop
   ============================================================ */
.fv-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}
.fv-row > * { min-width: 0; }

/* ============================================================
   .fv-chips / .fv-chip
   ============================================================ */
.fv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.fv-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  color: var(--fv-ink-soft);
  background: var(--fv-surface-2);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-r-pill);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.fv-chip:hover { border-color: var(--fv-border-hov); }
.fv-chip:focus-visible {
  outline: none;
  border-color: var(--fv-pink);
  box-shadow: 0 0 0 3px rgba(255,45,114,.18);
}
.fv-chip.on {
  background: linear-gradient(135deg, rgba(255,77,141,.16), rgba(123,47,247,.14));
  border-color: var(--fv-pink);
  color: var(--fv-plum);
  box-shadow: 0 6px 16px rgba(255,45,114,.16);
}

/* ============================================================
   .fv-btn / .fv-btn-ghost / .fv-btn-danger
   Jede Klasse funktioniert allein; kombiniert gewinnen
   Ghost/Danger, weil sie später stehen.
   ============================================================ */
.fv-btn,
.fv-btn-ghost,
.fv-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;                   /* Handy: volle Breite */
  min-height: 50px;
  padding: 15px 34px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border-radius: var(--fv-r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.fv-btn:focus-visible,
.fv-btn-ghost:focus-visible,
.fv-btn-danger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,45,114,.30);
}
.fv-btn:disabled,
.fv-btn-ghost:disabled,
.fv-btn-danger:disabled,
.fv-btn[aria-disabled="true"],
.fv-btn-ghost[aria-disabled="true"],
.fv-btn-danger[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

/* Hauptknopf — wie .btn-dark */
.fv-btn {
  background: var(--fv-ink);
  color: #fff;
}
.fv-btn:hover { background: #2a2436; transform: translateY(-2px); }
.fv-btn:active { transform: translateY(0); }

/* Sekundär */
.fv-btn-ghost {
  background: transparent;
  color: var(--fv-ink);
  border-color: var(--fv-border-hov);
}
.fv-btn-ghost:hover {
  background: rgba(255,255,255,.72);
  border-color: #c9bbef;
  transform: translateY(-2px);
}
.fv-btn-ghost:active { transform: translateY(0); }

/* Löschen */
.fv-btn-danger {
  background: var(--fv-red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(220,39,67,.22);
}
.fv-btn-danger:hover { background: var(--fv-red-dark); transform: translateY(-2px); }
.fv-btn-danger:active { transform: translateY(0); }
.fv-btn-danger:focus-visible { box-shadow: 0 0 0 3px rgba(220,39,67,.34); }

/* ============================================================
   .fv-photos / .fv-photo
   ============================================================ */
.fv-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.fv-photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--fv-r-tile);
  background: var(--fv-surface-3);
  border: 1px solid var(--fv-border);
  color: var(--fv-ink-faint);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fv-photo:hover { border-color: var(--fv-border-hov); }
.fv-photo:focus-within {
  border-color: var(--fv-pink);
  box-shadow: 0 0 0 3px rgba(255,45,114,.18);
}
.fv-photo img,
.fv-photo video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* verstecktes Datei-Feld deckt die ganze Kachel ab */
.fv-photo input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
/* Entfernen-Knopf in der Ecke */
.fv-photo > button {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(20,16,28,.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.fv-photo > button:hover { background: rgba(20,16,28,.85); }

/* ============================================================
   .fv-note / .fv-error / .fv-ok
   ============================================================ */
.fv-note {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--fv-ink-muted);
}
.fv-error,
.fv-ok {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.fv-error:empty,
.fv-ok:empty { display: none; }
.fv-error {
  color: #c81f3c;
  background: rgba(220,39,67,.08);
  border-color: rgba(220,39,67,.24);
}
.fv-ok {
  color: var(--fv-green);
  background: rgba(22,214,166,.12);
  border-color: rgba(22,214,166,.34);
}

/* ============================================================
   .fv-tabs / .fv-tab
   ============================================================ */
.fv-tabs {
  display: flex;
  gap: 4px;
  width: 100%;
  padding: 4px;
  background: var(--fv-surface-3);
  border: 1px solid var(--fv-border);
  border-radius: var(--fv-r-pill);
}
.fv-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--fv-ink-soft);
  background: transparent;
  border: 0;
  border-radius: var(--fv-r-pill);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.fv-tab:hover { color: var(--fv-ink); }
.fv-tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,45,114,.22);
}
.fv-tab.on {
  background: var(--fv-surface-2);
  color: var(--fv-ink);
  box-shadow: var(--fv-shadow-soft);
}

/* ============================================================
   .fv-spinner
   ============================================================ */
.fv-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  border: 2.5px solid rgba(20,16,28,.14);
  border-top-color: var(--fv-pink);
  border-radius: 50%;
  animation: fv-spin .7s linear infinite;
}
@keyframes fv-spin { to { transform: rotate(360deg); } }

/* ============================================================
   Desktop
   ============================================================ */
@media (min-width: 720px) {
  .fv-shell { padding: 40px 24px 80px; }
  .fv-card  { padding: 34px 32px; }
  .fv-card + .fv-card { margin-top: 20px; }
  .fv-h1    { margin-bottom: 26px; }

  .fv-row { grid-template-columns: 1fr 1fr; gap: 0 18px; }

  /* auf dem Desktop nur so breit wie nötig */
  .fv-btn,
  .fv-btn-ghost,
  .fv-btn-danger { width: auto; }

  .fv-photos { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

/* ============================================================
   Bewegung reduzieren
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .fv-input,
  .fv-chip,
  .fv-btn,
  .fv-btn-ghost,
  .fv-btn-danger,
  .fv-photo,
  .fv-tab { transition: none; }

  .fv-btn:hover,
  .fv-btn-ghost:hover,
  .fv-btn-danger:hover { transform: none; }

  .fv-spinner { animation-duration: 1.8s; }
}
