/* ============================================================
   havelo — Auth & Onboarding  ·  nutzt havelo-tokens.css
   Vor-Login: Split-Screen Markenpanel + Formular.
   ============================================================ */

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

.auth { display: grid; grid-template-columns: 460px 1fr; min-height: 100vh; }

/* ---------- brand panel ---------- */
.brand-panel {
  background: var(--slate); color: var(--cream);
  padding: 48px 46px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.brand-panel .bp-arc { position: absolute; border-radius: 50%; border: 3px solid var(--gold); opacity: 0.18; }
.brand-panel .bp-arc.a1 { width: 360px; height: 360px; right: -150px; top: -120px; }
.brand-panel .bp-arc.a2 { width: 220px; height: 220px; left: -110px; bottom: 60px; opacity: 0.1; }
.bp-brand { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.bp-brand img { width: 48px; height: 48px; border-radius: 13px; }
.bp-brand .wm { font-family: var(--font-display); font-weight: 700; font-size: 30px; }
.bp-mid { margin-top: auto; margin-bottom: auto; position: relative; z-index: 1; padding: 40px 0; }
.bp-claim { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.24; }
.bp-claim em { font-style: italic; color: var(--gold); }
.bp-sub { font-size: 15.5px; color: rgba(251, 246, 237, 0.8); margin-top: 22px; max-width: 30em; line-height: 1.6; }
.bp-archie { display: flex; align-items: center; gap: 14px; margin-top: 30px; background: rgba(251, 246, 237, 0.08); border-radius: var(--radius-lg); padding: 16px 18px; max-width: 27em; }
.bp-archie img { width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0; }
.bp-archie .ba-t { font-size: 14px; color: rgba(251, 246, 237, 0.9); line-height: 1.5; }
.bp-trust { display: flex; gap: 18px; position: relative; z-index: 1; flex-wrap: wrap; }
.bp-trust .bt { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(251, 246, 237, 0.65); }
.bp-trust .bt svg { width: 16px; height: 16px; color: var(--sage); }

/* ---------- form side ---------- */
.form-side { display: grid; place-items: center; padding: 40px; }
.form-card { width: 100%; max-width: 400px; }
.fc-head { margin-bottom: 26px; }
.fc-head h1 { font-family: var(--font-display); font-weight: 600; font-size: 30px; }
.fc-head p { font-size: 14.5px; color: var(--slate-55); margin-top: 6px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--slate-70); }
.field .inp {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--slate-12); border-radius: var(--radius-md);
  padding: 0 14px; height: 48px; transition: border-color var(--transition-fast);
}
.field .inp:focus-within { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(200, 92, 36, 0.12); }
.field .inp svg { width: 18px; height: 18px; color: var(--slate-40); flex-shrink: 0; }
.field .inp input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 15px; color: var(--slate); width: 100%; }
.field .inp .eye { color: var(--slate-40); cursor: pointer; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.strength { display: flex; gap: 5px; margin-top: 9px; }
.strength i { height: 4px; flex: 1; border-radius: 2px; background: var(--slate-12); }
.strength i.on { background: var(--sage); }
.strength-l { font-size: 11.5px; color: var(--slate-55); margin-top: 6px; font-family: var(--font-mono); }

.row-between { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--slate-70); cursor: pointer; line-height: 1.4; }
.check .box { width: 19px; height: 19px; border-radius: 5px; border: 1.7px solid var(--slate-40); flex-shrink: 0; display: grid; place-items: center; margin-top: 1px; transition: all var(--transition-fast); }
.check.on .box { background: var(--ember); border-color: var(--ember); }
.check.on .box::after { content: "✓"; color: #fff; font-size: 11px; font-weight: 800; }
.link { color: var(--ember); font-weight: 700; font-size: 13px; text-decoration: none; }
.link:hover { color: var(--ember-d); }

.btn-primary {
  width: 100%; height: 50px; border: none; border-radius: var(--radius-md);
  background: var(--ember); color: #fff; font-family: inherit; font-weight: 700; font-size: 15.5px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  box-shadow: var(--shadow-sm); transition: background var(--transition-fast);
}
.btn-primary:hover { background: var(--ember-d); }
.btn-primary svg { width: 18px; height: 18px; }

.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--slate-40); font-size: 12.5px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--slate-12); }

.btn-oauth {
  width: 100%; height: 48px; border: 1.5px solid var(--slate-12); border-radius: var(--radius-md);
  background: #fff; font-family: inherit; font-weight: 700; font-size: 14.5px; color: var(--slate);
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 11px;
  transition: border-color var(--transition-fast);
}
.btn-oauth:hover { border-color: var(--slate-40); }
.btn-oauth svg { width: 19px; height: 19px; }

/* ---------- Social SSO ---------- */
.sso-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.btn-sso {
  height: 48px; border: 1.5px solid var(--control-border); border-radius: var(--radius-md);
  background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: border-color var(--transition-fast), background var(--transition-fast); position: relative;
}
.btn-sso:hover { border-color: var(--slate-40); background: var(--slate-06); }
.btn-sso:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.btn-sso svg { width: 22px; height: 22px; display: block; }
/* Hover-Tooltip */
.btn-sso::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--slate); color: var(--cream); font-size: 11.5px; font-weight: 600; padding: 5px 9px;
  border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 10; display: none; box-shadow: var(--shadow-md);
}
.btn-sso:hover::after, .btn-sso:focus-visible::after { display: block; }

.fc-foot { text-align: center; font-size: 14px; color: var(--slate-55); margin-top: 24px; }

/* state switching */
[data-auth] { display: none; }
[data-auth].show { display: block; }

/* ============================================================
   ONBOARDING-WIZARD
   ============================================================ */
.wiz { max-width: 720px; margin: 0 auto; padding: 40px 32px 64px; }
.wiz-brand { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 30px; }
.wiz-brand img { width: 40px; height: 40px; border-radius: 11px; }
.wiz-brand .wm { font-family: var(--font-display); font-weight: 700; font-size: 25px; color: var(--slate); }

.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 34px; }
.stepper .step { display: flex; align-items: center; gap: 11px; flex: 1; }
.stepper .step:last-child { flex: 0; }
.stepper .sdot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex-shrink: 0; background: #fff; border: 1.5px solid var(--slate-12); color: var(--slate-40); font-family: var(--font-mono); }
.stepper .step.done .sdot { background: var(--sage); border-color: var(--sage); color: #fff; }
.stepper .step.active .sdot { background: var(--ember); border-color: var(--ember); color: #fff; }
.stepper .sname { font-size: 13px; font-weight: 700; color: var(--slate-40); white-space: nowrap; }
.stepper .step.active .sname, .stepper .step.done .sname { color: var(--slate); }
.stepper .sline { flex: 1; height: 2px; background: var(--slate-12); margin: 0 12px; border-radius: 2px; }
.stepper .step.done .sline { background: var(--sage); }

.wiz-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 34px 36px; }
.wiz-archie { display: flex; align-items: center; gap: 13px; background: var(--sand); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 26px; }
.wiz-archie img { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; }
.wiz-archie .wa-t { font-size: 14px; color: var(--slate-70); line-height: 1.45; }
.wiz-card h2 { font-family: var(--font-display); font-weight: 600; font-size: 25px; margin-bottom: 6px; }
.wiz-card .wc-sub { font-size: 14px; color: var(--slate-55); margin-bottom: 24px; }

.wiz-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; }
.btn-back { background: none; border: none; font-family: inherit; font-weight: 700; font-size: 14.5px; color: var(--slate-55); display: flex; align-items: center; gap: 7px; }
.btn-back svg { width: 16px; height: 16px; }
.btn-next {
  height: 48px; padding: 0 26px; border: none; border-radius: var(--radius-md);
  background: var(--ember); color: #fff; font-family: inherit; font-weight: 700; font-size: 15px;
  display: flex; align-items: center; gap: 9px; box-shadow: var(--shadow-sm); transition: background var(--transition-fast);
}
.btn-next:hover { background: var(--ember-d); }
.btn-next svg { width: 17px; height: 17px; }

[data-step] { display: none; }
[data-step].show { display: block; }

/* add-member / add-pet rows in wizard */
.add-line { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1.5px solid var(--slate-06); border-radius: var(--radius-md); margin-bottom: 11px; }
.add-line .al-tx { flex: 1; min-width: 0; }
.add-line .al-name { font-weight: 700; font-size: 14.5px; }
.add-line .al-meta { font-size: 12.5px; color: var(--slate-55); }
.add-line .al-tags { display: flex; gap: 6px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 11px; }
.choice { border: 1.5px solid var(--slate-12); border-radius: var(--radius-md); padding: 16px 12px; text-align: center; cursor: pointer; transition: all var(--transition-fast); background: #fff; }
.choice:hover { border-color: var(--slate-40); }
.choice.on { border-color: var(--mod-haushalt); background: rgba(90, 140, 140, 0.08); }
.choice svg { width: 26px; height: 26px; color: var(--mod-haushalt); margin-bottom: 8px; }
.choice .ch-n { font-weight: 700; font-size: 13.5px; }

/* ============================================================
   BFSG / WCAG 2.1 AA — Auth & Onboarding
   ============================================================ */
/* 1.4.11 — Rahmen interaktiver Elemente ≥3:1 */
.field .inp, .btn-oauth, .choice, .check .box, .add-line, .add-line, .add-row {
  border-color: var(--control-border);
}
/* 1.4.1 — Links nicht nur über Farbe */
.link, .fc-foot a { text-decoration: underline; text-underline-offset: 2px; }
/* Pflichtfeld-Markierung */
.field label .req { color: var(--field-error); font-weight: 700; margin-left: 3px; }
.field label .req::after { content: "*"; }
/* Fehlerzustand sichtbar (Symbol + Text, nicht nur Farbe) */
.field.has-error .inp { border-color: var(--field-error); background: var(--field-error-bg); }
.field .err { display: none; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--field-error); }
.field .err svg { width: 14px; height: 14px; }
.field.has-error .err { display: flex; }
/* Passwortstärke nicht nur über Farbe: Label benennt die Stufe (schon vorhanden) */
.strength i { box-shadow: inset 0 0 0 1px var(--control-border); }

/* ============================================================
   BFSG / WCAG 1.4.10 — Reflow (Zoom 400% ≈ 320px), Auth
   ============================================================ */
@media (max-width: 820px) {
  /* Markenpanel ausblenden, Formular volle Breite */
  .auth { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-side { padding: 32px 22px; align-items: flex-start; }
  .form-card { margin: 0 auto; }
}
@media (max-width: 480px) {
  .form-side { padding: 24px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .stepper .step .sname { display: none; }   /* nur Punkte im Stepper */
  .row-between { flex-wrap: wrap; gap: 10px; }
}
