/* ============================================================
   Fremdeshof Academy -- Auth Pages Shared CSS (Plugin 02)
   plugins/auth/auth.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #0d0d0e;
  --ink-2:      #1a1a1c;
  --cream:      #faf8f3;
  --mist:       #f5f2ec;
  --mist-2:     #ede9e0;
  --gold:       #c8983a;
  --gold-l:     #e8b85a;
  --text-sec:   #4a4a52;
  --text-muted: #8a8a96;
  --red:        #c0392b;
  --green:      #1a8a5a;
  --font-d:     'Cormorant Garamond', Georgia, serif;
  --font-b:     'DM Sans', sans-serif;
  --ease:       cubic-bezier(.25,.46,.45,.94);
  --ease-s:     cubic-bezier(.34,1.56,.64,1);
  --r:          8px;
}

html { height: 100%; }

body {
  font-family: var(--font-b);
  background: var(--ink);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
}

/* ── Two-panel layout ────────────────────────────────────── */
.auth-wrap {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Left decorative panel */
.auth-panel {
  flex: 0 0 420px;
  background: var(--ink-2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem;
}
.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,152,58,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,152,58,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.auth-panel__orb {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,152,58,.18) 0%, transparent 65%);
  bottom: -180px; left: -100px;
  pointer-events: none;
}

.panel-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  position: relative;
  z-index: 1;
}
.panel-logo__mark {
  width: 36px; height: 36px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 600;
}
.panel-logo__text {
  font-family: var(--font-d);
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.15;
}
.panel-logo__text em {
  display: block;
  font-weight: 300;
  font-style: italic;
  font-size: .85em;
  color: rgba(250,248,243,.5);
}

.panel-quote {
  position: relative;
  z-index: 1;
}
.panel-quote blockquote {
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--cream);
  line-height: 1.4;
  margin-bottom: 1rem;
}
.panel-quote blockquote em { color: var(--gold); }
.panel-quote cite {
  font-size: .78rem;
  color: rgba(250,248,243,.4);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-style: normal;
}

.panel-langs {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  position: relative;
  z-index: 1;
}
.panel-lang {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  padding: .625rem .875rem;
}
.panel-lang__flag { font-size: 1.2rem; }
.panel-lang__name { flex: 1; font-size: .85rem; color: rgba(250,248,243,.7); }
.panel-lang__bar  { width: 60px; height: 3px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.panel-lang__prog { height: 100%; background: var(--gold); border-radius: 99px; }

/* Right form panel */
.auth-form-area {
  flex: 1;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  animation: authIn .5s var(--ease) both;
}

.auth-card__eyebrow {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}
.auth-card__title {
  font-family: var(--font-d);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: .5rem;
}
.auth-card__title em { font-style: italic; color: var(--gold); }
.auth-card__sub {
  font-size: .9rem;
  color: var(--text-sec);
  margin-bottom: 2rem;
}

/* ── Form elements ───────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 1.125rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.field { display: flex; flex-direction: column; gap: .375rem; }

label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .02em;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: .875rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: .95rem;
  line-height: 1;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: .7rem .875rem .7rem 2.5rem;
  font-family: var(--font-b);
  font-size: .9rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--mist);
  border: 1.5px solid var(--mist-2);
  border-radius: var(--r);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus {
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(13,13,14,.06);
}
input.is-error { border-color: var(--red); }

.field-hint {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Password toggle */
.pw-toggle {
  position: absolute;
  right: .875rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .85rem;
  padding: 0;
  line-height: 1;
  transition: color .2s;
}
.pw-toggle:hover { color: var(--ink); }

/* Password strength meter */
.pw-strength {
  margin-top: .375rem;
  display: flex;
  gap: .25rem;
}
.pw-strength__bar {
  height: 3px;
  flex: 1;
  border-radius: 99px;
  background: var(--mist-2);
  transition: background .3s;
}
.pw-strength[data-level="1"] .pw-strength__bar:nth-child(1) { background: var(--red); }
.pw-strength[data-level="2"] .pw-strength__bar:nth-child(-n+2) { background: var(--gold); }
.pw-strength[data-level="3"] .pw-strength__bar:nth-child(-n+3) { background: var(--gold-l); }
.pw-strength[data-level="4"] .pw-strength__bar { background: var(--green); }
.pw-strength__label { font-size: .7rem; color: var(--text-muted); align-self: center; }

/* ── Checkbox ─────────────────────────────────────────────── */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-sec);
}
.check-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--ink);
  margin-top: .15rem;
  flex-shrink: 0;
  padding: 0;
}
.check-row a { color: var(--ink); border-bottom: 1px solid var(--mist-2); }
.check-row a:hover { border-color: var(--ink); }

/* ── Submit button ───────────────────────────────────────── */
.btn-submit {
  width: 100%;
  padding: .8rem 1.5rem;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-b);
  font-size: .95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
  margin-top: .25rem;
}
.btn-submit:hover {
  background: #222226;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13,13,14,.22);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Divider ─────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: .875rem;
  color: var(--text-muted);
  font-size: .78rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mist-2);
}

/* ── Links ───────────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: .85rem;
  color: var(--text-sec);
  margin-top: 1.25rem;
}
.auth-switch a {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--mist-2);
  transition: border-color .2s;
}
.auth-switch a:hover { border-color: var(--ink); }

.auth-forgot {
  text-align: right;
  font-size: .78rem;
}
.auth-forgot a { color: var(--text-muted); }
.auth-forgot a:hover { color: var(--ink); }

/* ── Flash messages ─────────────────────────────────────── */
.flash {
  padding: .75rem 1rem;
  border-radius: var(--r);
  font-size: .88rem;
  border: 1px solid transparent;
  margin-bottom: 1.25rem;
  animation: authIn .3s var(--ease) both;
}
.flash--error   { background: #fdf0ef; color: var(--red);   border-color: #f5c6c3; }
.flash--success { background: #edf8f2; color: var(--green); border-color: #a8dfc1; }
.flash--info    { background: #f0f4ff; color: #2456b0;      border-color: #b8c9f0; }

/* Error list */
.error-list {
  padding: .75rem 1rem;
  background: #fdf0ef;
  color: var(--red);
  border: 1px solid #f5c6c3;
  border-radius: var(--r);
  font-size: .85rem;
  margin-bottom: 1.25rem;
}
.error-list ul { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.error-list li::before { content: '· '; font-weight: 700; }

/* ── Confirmation pages ──────────────────────────────────── */
.auth-confirm {
  text-align: center;
  padding: 1.5rem 0;
}
.auth-confirm__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.auth-confirm p { font-size: .92rem; color: var(--text-sec); margin-top: .5rem; }

/* ── Animation ───────────────────────────────────────────── */
@keyframes authIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .auth-panel { display: none; }
  .auth-form-area { padding: 2rem 1.25rem; }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .auth-card__title { font-size: 1.8rem; }
}
