/* ═══════════════════════════════════════════════════════════════════
   MacherPost — Auth-Pages (login, register, passwort-vergessen, reset)
   Modern Mobile-First, Glassmorphism, iOS Safe-Area, Dark-Mode-Aware
   ═══════════════════════════════════════════════════════════════════ */

html, body { height: 100%; margin: 0; padding: 0; }

body.auth-page {
  background: #FAFAF7;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.auth-page [data-mp="header"],
body.auth-page [data-mp="footer"] { display: none; }

/* ─── Animated Brand-Gradient Background ─── */
.auth-bg {
  position: fixed; inset: 0;
  z-index: 0; overflow: hidden;
  pointer-events: none;
}
.auth-bg::before {
  content: "";
  position: absolute;
  top: -30%; left: -20%;
  width: 80vw; height: 80vw;
  max-width: 800px; max-height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,16,46,0.18), rgba(200,16,46,0) 60%);
  filter: blur(60px);
  animation: float 18s ease-in-out infinite;
}
.auth-bg::after {
  content: "";
  position: absolute;
  bottom: -25%; right: -15%;
  width: 70vw; height: 70vw;
  max-width: 700px; max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 100, 0.15), rgba(255,200,100,0) 60%);
  filter: blur(60px);
  animation: float 22s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.05); }
  66%      { transform: translate(-30px, 40px) scale(0.95); }
}

/* ─── Main Container ─── */
.auth-stage {
  position: relative; z-index: 1;
  min-height: 100dvh; min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 20px;
  gap: 24px;
}

/* ─── Back-Link ─── */
.auth-back {
  position: absolute;
  top: max(env(safe-area-inset-top, 0px), 16px);
  left: 16px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(20, 17, 11, 0.05);
  border-radius: 999px;
  font-family: var(--f-ui);
  font-size: 13px; font-weight: 600;
  color: var(--ink-80);
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}
.auth-back:hover { background: rgba(255, 255, 255, 0.9); }
.auth-back:active { transform: scale(0.96); }
.auth-back svg { width: 14px; height: 14px; }

/* ─── Brand Mark ─── */
.brand-mark {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; margin-bottom: 8px;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.brand-mark svg {
  width: 56px; height: 56px;
  filter: drop-shadow(0 4px 12px rgba(200, 16, 46, 0.18));
}
.brand-mark .name {
  font-family: var(--f-display);
  font-size: 20px; font-weight: 600;
  color: var(--ink-90);
  letter-spacing: -0.01em; line-height: 1;
}
.brand-mark .name em {
  color: var(--accent);
  font-style: italic; font-weight: 500;
}

/* ─── Glassmorphism Card ─── */
.auth-card {
  width: 100%; max-width: 420px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  padding: 32px 24px 28px;
  box-shadow:
    0 1px 2px rgba(15, 12, 8, 0.04),
    0 8px 24px rgba(15, 12, 8, 0.05),
    0 24px 48px -16px rgba(200, 16, 46, 0.08);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Eyebrow Pill ─── */
.auth-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: rgba(200, 16, 46, 0.08);
  border-radius: 999px;
  font-family: var(--f-ui);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.auth-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
}

.auth-title {
  font-family: var(--f-display);
  font-size: 28px; font-weight: 600;
  color: var(--ink-90);
  line-height: 1.15; letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.auth-subtitle {
  font-family: var(--f-ui);
  font-size: 14px; line-height: 1.55;
  color: var(--muted);
  margin: 0 0 24px;
}

/* ─── Perks-List (für Register) ─── */
.auth-perks {
  list-style: none; padding: 0;
  margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--f-ui);
  font-size: 13px;
  color: var(--ink-80);
}
.auth-perks li {
  display: flex; align-items: center; gap: 10px;
  line-height: 1.4;
}
.auth-perks .dot {
  flex-shrink: 0;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.6;
}

/* ─── Alerts ─── */
.auth-alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-family: var(--f-ui);
  font-size: 13px; line-height: 1.45;
  margin-bottom: 16px;
  animation: rise 0.4s ease-out both;
}
.auth-alert--error {
  background: rgba(200, 16, 46, 0.08);
  color: var(--accent-deep);
  border: 1px solid rgba(200, 16, 46, 0.18);
}
.auth-alert--ok {
  background: rgba(10, 132, 84, 0.08);
  color: #0a8454;
  border: 1px solid rgba(10, 132, 84, 0.18);
}
.auth-alert svg {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 1px;
}

/* ─── Floating-Label Inputs ─── */
.auth-form { display: flex; flex-direction: column; gap: 12px; }

.field-float { position: relative; }
.field-float input {
  width: 100%;
  box-sizing: border-box;
  padding: 22px 16px 8px;
  font-family: var(--f-ui);
  font-size: 16px; /* min 16px → kein iOS Zoom-In */
  line-height: 1.3;
  color: var(--ink-90);
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid rgba(20, 17, 11, 0.08);
  border-radius: 16px;
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  min-height: 56px;
}
.field-float input::placeholder { color: transparent; }
.field-float label {
  position: absolute;
  left: 16px; top: 18px;
  pointer-events: none;
  font-family: var(--f-ui);
  font-size: 15px;
  color: var(--muted);
  background: transparent;
  transition: top 0.18s ease, font-size 0.18s ease, color 0.18s ease;
  line-height: 1;
}
.field-float input:focus,
.field-float input:not(:placeholder-shown) {
  background: rgba(255, 255, 255, 0.95);
}
.field-float input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.10);
}
.field-float input:focus + label,
.field-float input:not(:placeholder-shown) + label {
  top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ─── Row: Checkbox + Forgot Link ─── */
.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin: 6px 2px 2px;
  font-family: var(--f-ui); font-size: 13px;
}
.auth-check {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
  color: var(--ink-80);
}
.auth-check input { display: none; }
.auth-check .box {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid rgba(20, 17, 11, 0.18);
  background: rgba(255, 255, 255, 0.8);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.18s ease;
}
.auth-check input:checked + .box {
  background: var(--accent);
  border-color: var(--accent);
}
.auth-check .box svg {
  width: 12px; height: 12px;
  color: white;
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.18s, transform 0.18s;
}
.auth-check input:checked + .box svg {
  opacity: 1; transform: scale(1);
}
.auth-link {
  color: var(--accent);
  font-weight: 600; text-decoration: none;
  transition: opacity 0.15s;
}
.auth-link:hover { opacity: 0.7; }
.auth-link:active { transform: scale(0.97); }

/* ─── Submit Button ─── */
.auth-submit {
  width: 100%; margin-top: 12px;
  padding: 16px 24px;
  font-family: var(--f-ui);
  font-size: 16px; font-weight: 700;
  color: white; background: var(--accent);
  border: none; border-radius: 999px;
  cursor: pointer;
  min-height: 56px;
  box-shadow: 0 6px 16px -4px rgba(200, 16, 46, 0.4);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.auth-submit:hover {
  background: var(--accent-deep);
  box-shadow: 0 10px 24px -6px rgba(200, 16, 46, 0.5);
}
.auth-submit:active {
  transform: scale(0.98);
  box-shadow: 0 4px 10px -2px rgba(200, 16, 46, 0.3);
}

/* ─── Footer Below Form ─── */
.auth-foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 17, 11, 0.06);
  text-align: center;
  font-family: var(--f-ui);
  font-size: 14px;
  color: var(--muted);
}
.auth-foot a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ─── Legal Footnote (für Register) ─── */
.auth-legal {
  font-family: var(--f-ui);
  font-size: 12px; line-height: 1.5;
  color: var(--muted-2);
  margin: 12px 0 0;
  text-align: center;
}

/* ─── Trust Strip ─── */
.auth-trust {
  display: flex; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  font-family: var(--f-ui);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
  z-index: 1; position: relative;
}
.auth-trust span {
  display: inline-flex; align-items: center; gap: 5px;
}
.auth-trust svg {
  width: 12px; height: 12px;
  opacity: 0.7;
}

/* ─── Tablet/Desktop refinements ─── */
@media (min-width: 640px) {
  .auth-stage { padding: 48px 24px; }
  .auth-card { padding: 40px 36px 32px; }
  .auth-title { font-size: 32px; }
  .auth-subtitle { font-size: 15px; }
}

/* ─── Dark Mode — DEAKTIVIERT 21.05.2026 auf User-Wunsch ─── */
/* Anmeldeseite soll konstant hell sein, unabhängig von iOS/Browser Dark-Mode */
/* (Vorherige @media (prefers-color-scheme: dark) Regeln entfernt) */
