/* Kundenkonto-Bereich (konto/) -- eigenständiges, schlankes Stylesheet für die
   öffentlichen Konto-Seiten (Login/Registrierung/Dashboard/Profil), nutzt dieselben
   CSS-Variablen wie styles.css (--paper/--ink/--line/--accent/--radius/--shadow), damit es
   sich nahtlos einfügt, ohne den riesigen Marketing-Header jeder Seite erneut einzubinden.

   UI-Umbau 2026-09-27: Kopfleiste wie der Hauptheader (klebend, Glas-Effekt, Akzentfaden),
   Karten/Felder/Meldungen auf die neuen Tokens umgestellt. Die Fehler-/Erfolgsmeldungen hatten
   fest verdrahtete helle Farben (#fdecec/#e3f3e6) und leuchteten im Dark Mode als grelle
   Kaesten -- jetzt aus den Theme-Farben gemischt. */

.konto-topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 2.6vw, 40px);
  margin: 0;
  max-width: none;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.konto-topbar::before{
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 30%, color-mix(in srgb, var(--accent) 40%, transparent) 100%);
  pointer-events: none;
}
/* Logo als Inline-SVG (siehe HTML) statt <img src="logo.svg">: Zug/Zahnrad nutzen
   fill:currentColor und folgen damit --ink (schwarz im Hellmodus, weiß im Darkmode), der
   "mobawerk"-Schriftzug bleibt fest rot -- identisches Muster wie im Hauptseiten-Header
   (siehe .logo-img in styles.css). Als <img> eingebundenes SVG wird von manchen Browsern beim
   Verkleinern/Vergrößern gerastert statt vektoriell skaliert, was auf normal auflösenden
   Desktop-Bildschirmen bei der recht kleinen 34px-Höhe von vorher besonders auffiel (Rückmeldung:
   Logo unscharf, kleiner Schriftzug "Modellbahnzubehör & Umbauten" darunter nicht lesbar) --
   als Inline-SVG bleibt es bei jeder Größe gestochen scharf. Deutlich größer als vorher (jetzt
   84px, Rückmeldung war weiterhin "deutlich größer"). */
.konto-topbar-logo{ display: block; height: 84px; width: auto; color: var(--ink); }
.konto-topbar-actions{ display: flex; align-items: center; gap: 10px; }

/* Zentrierte Karte für Login/Registrierung/Passwort vergessen/zurücksetzen. */
.konto-auth-wrap{
  min-height: calc(100vh - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 64px;
  background:
    radial-gradient(700px 420px at 85% 0%, var(--accent-soft) 0%, transparent 60%),
    radial-gradient(600px 400px at 0% 100%, color-mix(in srgb, var(--accent-soft) 55%, transparent) 0%, transparent 60%),
    var(--paper);
}
.konto-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 38px 36px 34px;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Zweispaltiges Layout für Login/Registrierung: Formular links, Vorteile eines
   Kundenkontos rechts daneben (siehe .konto-benefits) -- soll die Registrierung fördern,
   nicht nur nüchtern das Formular zeigen. Auf schmalen Bildschirmen untereinander. */
.konto-auth-layout{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  width: 100%;
  max-width: 900px;
}
.konto-benefits{ flex: 1 1 320px; max-width: 360px; }
.konto-benefits h2{ font-size: 1.15rem; margin: 0 0 18px; }
.konto-benefits ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.konto-benefits li{
  display: flex; align-items: flex-start; gap: 14px;
  font-size: 0.93rem; color: var(--ink-soft); line-height: 1.45;
}
.konto-benefits li svg{
  flex: none;
  box-sizing: content-box;
  width: 20px; height: 20px;
  padding: 8px;
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
}
@media (max-width: 860px){
  .konto-auth-layout{ flex-direction: column; gap: 32px; }
  .konto-benefits{ max-width: 440px; width: 100%; }
  .konto-benefits ul{ flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 14px 20px; }
  .konto-benefits li{ flex: 1 1 220px; }
}
.konto-card h1{ font-size: 1.65rem; margin: 0; letter-spacing: -0.025em; }
.konto-card .btn{ width: 100%; }
.konto-card-links{ display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.konto-card-links a{ color: var(--accent); font-weight: 600; }
.konto-card-links a:hover{ text-decoration: underline; }

/* "Neu hier? Konto erstellen" -- bewusst unten im Login-Formular statt oben in der Topbar
   (Rückmeldung: dort ging der Hinweis zu leicht unter). Eigene Trennlinie, damit es sich vom
   "Passwort vergessen?"-Link darüber klar als eigener, wichtiger Hinweis abhebt. */
.konto-signup-hint{
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  text-align: center;
  color: var(--ink-soft);
}
.konto-signup-hint a{ color: var(--accent); font-weight: 700; }

/* Breiterer Bereich für Dashboard/Profil. */
.konto-wrap{ max-width: 960px; margin: 0 auto; padding: 36px 24px 88px; }
.konto-page-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.konto-page-header h1{ margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; }

.konto-section{ margin-bottom: 36px; }
.konto-section h2{
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.18rem;
  margin: 0 0 14px;
}
.konto-section h2::before{
  content: "";
  width: 4px;
  height: 1.1em;
  border-radius: 4px;
  background: var(--accent);
  flex-shrink: 0;
}

.konto-summary-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}
.konto-summary-item{
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
.konto-summary-item::after{
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-tint), transparent);
  pointer-events: none;
}
.konto-summary-value{ display: block; font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.konto-summary-label{ display: block; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }

.konto-order-list{ display: flex; flex-direction: column; gap: 12px; }
.konto-order-card{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-xs);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.konto-order-card:hover{ border-color: color-mix(in srgb, var(--ink) 16%, var(--line)); box-shadow: var(--shadow-sm); }
.konto-order-card strong{ font-size: 1rem; }
.konto-order-meta{ font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
/* Kleinunternehmer-Hinweis an Beträgen (§ 19 UStG) -- kleiner als der Betrag selbst, wie .cart-vat-note im Shop. */
.konto-vat-note{ font-size: 0.75rem; font-weight: 400; color: var(--ink-soft); }
.konto-order-items{ font-size: 0.9rem; margin-top: 8px; }
.konto-order-card .btn{ margin-top: 10px; }

.konto-form{ display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.konto-form-row{ display: flex; flex-direction: column; }
.konto-form-row label{ font-weight: 650; font-size: 0.9rem; margin-bottom: 7px; }
.konto-form-row input[type="text"],
.konto-form-row input[type="email"],
.konto-form-row input[type="password"]{
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.konto-form-row input[type="text"]:hover,
.konto-form-row input[type="email"]:hover,
.konto-form-row input[type="password"]:hover{ border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.konto-form-row input[type="text"]:focus,
.konto-form-row input[type="email"]:focus,
.konto-form-row input[type="password"]:focus{ outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.konto-form-row-checkbox{ display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.konto-form-row-checkbox input{ width: 18px; height: 18px; accent-color: var(--accent); }
.konto-form-row-inline{ display: flex; gap: 14px; flex-wrap: wrap; }
.konto-form-row-inline .konto-form-row{ flex: 1; min-width: 180px; }

.konto-hint{ font-size: 0.82rem; color: var(--ink-soft); margin: 0; }
/* Bewusst KEIN display:flex -- die Meldungen enthalten teils Fliesstext mit Links, Flex wuerde
   den Satz in einzelne Stuecke zerlegen. */
.konto-error,
.konto-success{
  display: block;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
}
.konto-error{
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
}
.konto-success{
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  color: color-mix(in srgb, var(--success) 80%, var(--ink));
}
/* Hinweis mit Handlung (2026-10-05: "Bitte bestaetige deine E-Mail-Adresse" in konto/index.php) --
   wie .konto-error gefaerbt, aber mit Platz fuer Ueberschrift, Fliesstext und einen Knopf. */
.konto-notice{
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 24px;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.konto-notice strong{ display: block; margin-bottom: 6px; }
.konto-notice p{ margin: 0 0 12px; font-size: 0.9rem; line-height: 1.5; }
.konto-notice a:not(.btn){ color: var(--accent); font-weight: 600; }
.konto-badge{
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Honeypot-Feld für Formular-Bots (siehe reservierung.php-Muster). */
.konto-hp{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Status-Verlauf auf der Bestelldetail-Seite (konto/bestellung.php) -- einfache
   Punkt-Kette statt einer starren Fortschrittsleiste, damit sie bei 2 oder 3 Schritten
   gleich gut aussieht und auf schmalen Screens zeilenweise umbricht statt zu überlaufen. */
.konto-timeline{
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 0 28px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.konto-timeline-step{
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.konto-timeline-step--done{ color: var(--ink); font-weight: 650; }
.konto-timeline-dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.konto-timeline-step--done .konto-timeline-dot{ background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .15); }
.konto-timeline-date{ color: var(--ink-soft); font-weight: 400; font-size: 0.8rem; }

/* Live-Updates: Fortschrittsfotos einer Bestellung (konto/bestellung.php, 2026-10-10). */
.konto-live{ border-left: 3px solid var(--accent); }
.konto-live h2{ margin-top: 0; }
.konto-photos{ display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; margin: 14px 0; }
.konto-photo{ margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.konto-photo img{ display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-alt); }
.konto-photo figcaption{ padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 0.88rem; color: var(--ink-soft); }
.konto-photo figcaption strong{ color: var(--ink); font-size: 0.95rem; }
.konto-photo-date{ font-size: 0.8rem; }
.konto-photo-caption{ color: var(--ink); }
.konto-photo-dl{ font-size: 0.8rem; margin-top: 4px; }
.konto-live-toggle{ margin-top: 10px; }

/* Treuestufen-Fortschrittsbalken im Dashboard. */
.konto-progress{
  height: 10px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin: 10px 0;
}
.konto-progress-bar{
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff));
}

@media (max-width: 480px){
  .konto-timeline{ gap: 12px 18px; padding: 14px 16px; }
}

@media (max-width: 640px){
  .konto-wrap{ padding: 24px 16px 60px; }
  .konto-page-header h1{ font-size: 1.45rem; }
  .konto-card{ padding: 28px 22px 24px; }
}

/* Das Logo (.konto-topbar-logo, 84px hoch/~197px breit -- siehe konto/_logo.php) schrumpft
   von sich aus nicht (Bild behaelt sein Seitenverhaeltnis), und die Topbar hat kein
   Umbruch-/Burger-Menue wie der grosse Marketing-Header -- auf schmalen Handys blieb dadurch
   zu wenig Platz fuer Logo + Aktionen (Zurueck/Anmelden-Link + Theme-Toggle) nebeneinander,
   sichtbares horizontales Ueberlaufen (Rueckmeldung: "auf alle Geraete anpassen"). Gleiches
   Muster wie .logo-img im Marketing-Header (siehe styles.css @media max-width:640px).

   Schwelle 2026-09-19 von 480px auf 640px angehoben: .konto-topbar hat -- anders als
   .header-inner im Marketing-Header -- gar KEIN flex-wrap, sie muss also IMMER in eine
   Zeile passen, sonst laeuft sie wirklich ueber (nicht nur ein haesslicher Umbruch).
   Nicht alle konto/-Seiten haben dieselben Buttons in .konto-topbar-actions:
   registrieren.php zeigt bis 640px den vollen Text "Bereits ein Konto? Anmelden" (erst
   die .btn-label-short-Kurzform "Anmelden" ist kurz) -- grob gerechnet allein schon
   rund 270px für diesen einen Button; bestellung.php/profil.php haben stattdessen DREI
   Elemente ("← Mein Konto" + Theme-Toggle + "Abmelden", ganz ohne Kurzform) und kommen
   mit Logo zusammen auf ähnlich viel. Beides zusammen mit dem Logo braucht grob 560-570px. */
@media (max-width: 640px){
  .konto-topbar{ padding: 10px 16px; gap: 10px; }
  .konto-topbar-logo{ height: 48px; }
  .konto-topbar-actions{ gap: 6px; }
  .konto-topbar-actions .btn{ min-height: 40px; padding: 8px 14px; font-size: 0.85rem; }
}


/* ============================================================
   Produktions-Warteschlange (Kundenwunsch 2026-09-25)
   ============================================================
   Zeigt dem Kunden in der Bestellansicht, an welcher Stelle er steht und wann sein
   Bahnsteig voraussichtlich fertig ist. Siehe production-queue.php fuer die Rechnung
   und konto/bestellung.php fuer die drei Zustaende (wartend / im Druck / fertig). */
.konto-queue{
  border-left: 3px solid var(--line);
}
.konto-queue h2{ margin-top: 0; }
.konto-queue-position{
  font-size: 1.15rem;
  margin: 0 0 10px;
}
.konto-queue-position strong{ font-size: 1.4rem; }

/* Im Druck: akzentuiert, das ist die gute Nachricht "du bist dran". */
.konto-queue--active{ border-left-color: var(--accent); }
/* Fertig gedruckt: gruen wie andere Erfolgsmeldungen im Konto. */
.konto-queue--done{ border-left-color: var(--success); }
