/* ==========================================================================
   Sign in — shares base.css tokens; only the auth layout lives here.
   ========================================================================== */

.auth-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(700px 380px at 50% -8%, rgba(216, 90, 48, 0.16) 0%, transparent 62%),
    var(--bg);
}

.auth {
  width: 100%;
  max-width: 400px;
}

.auth__head { text-align: center; margin-bottom: 26px; }

.auth__logo {
  display: inline-grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 26px;
  background: var(--neutral);
  border: 3px solid var(--primary);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(216, 90, 48, 0.26);
  margin-bottom: 12px;
}

.auth__logo img { width: 100%; height: 100%; object-fit: cover; }

.auth__wordmark {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  letter-spacing: -0.03em;
}

.auth__tagline { color: var(--text-muted); font-size: 0.92rem; margin: 2px 0 0; }

.auth__form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  box-shadow: var(--shadow-md);
}

.auth__switch { text-align: center; margin: 18px 0 0; font-size: 0.9rem; color: var(--text-muted); }
.auth__switch a { font-weight: 700; }

.auth__note {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-faint);
  margin-top: 18px;
  line-height: 1.55;
}

/* "Powered by Ember" — the badge carries its own pill background, so it only
   needs centring and enough breathing room to read as a footer rather than
   part of the note above it. */
.auth__badge {
  display: flex;
  justify-content: center;
  margin: 24px 0 0;
  opacity: 0.8;
  transition: opacity 0.18s var(--ease-out);
}

.auth__badge:hover { opacity: 1; }
.auth__badge img { width: 170px; height: auto; }

/* Password reveal */
.password-wrap { position: relative; }

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  border-radius: 8px;
}

.password-toggle svg { width: 19px; height: 19px; }
.password-toggle:hover { color: var(--text-muted); }
.password-wrap input { padding-right: 48px; }

/* --- Register-only ------------------------------------------------------- */

.auth__optional {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.auth__optional summary {
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
  list-style: none;
}

.auth__optional summary::-webkit-details-marker { display: none; }

.auth__optional summary::before {
  content: '＋ ';
  color: var(--primary);
  font-weight: 800;
}

.auth__optional[open] summary::before { content: '－ '; }

/* Password strength meter */
.strength {
  height: 5px;
  margin-top: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.strength__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--danger);
  transition: width 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.strength[data-level='2'] .strength__fill { width: 45%; background: var(--secondary); }
.strength[data-level='3'] .strength__fill { width: 72%; background: var(--secondary); }
.strength[data-level='4'] .strength__fill { width: 100%; background: var(--success); }
.strength[data-level='1'] .strength__fill { width: 22%; }
