/* V2 Auth — shared across /session/new, /registrations/new, /passwords/new, /passwords/:token/edit */

/* ── Page shell ────────────────────────────────────────────────────────── */
.v2-auth-page {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 56px 20px 80px;
  background: var(--v2-soft-bg);
  min-height: calc(100vh - var(--v2-nav-height));
  overflow: hidden;
}

.v2-auth-page__dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse at top, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at top, #000 0%, transparent 70%);
}

.v2-auth-page__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ── Brand mark above the card ─────────────────────────────────────────── */
.v2-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  text-align: center;
}

.v2-auth-brand__logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--v2-font-ui);
  font-weight: 700;
  font-size: 18px;
  color: var(--v2-navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.v2-auth-brand__logo span { color: var(--v2-gray); font-weight: 500; }

/* ── Card ──────────────────────────────────────────────────────────────── */
.v2-auth-card {
  background: var(--v2-white);
  border: 1.5px solid var(--v2-border);
  border-radius: 18px;
  box-shadow: var(--v2-shadow-card);
  padding: 36px 36px 32px;
}

@media (max-width: 480px) {
  .v2-auth-card { padding: 28px 22px 26px; border-radius: 14px; }
  .v2-auth-page { padding: 32px 14px 56px; }
}

.v2-auth-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--v2-blue);
  background: var(--v2-blue-light);
  border: 1px solid var(--v2-blue-light-border);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.v2-auth-card__title {
  font-family: var(--v2-font-ui);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--v2-navy);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.v2-auth-card__subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--v2-gray);
  margin: 0 0 24px;
}

/* ── Flash + form-level errors ─────────────────────────────────────────── */
.v2-auth-flash {
  border-radius: var(--v2-radius-sm);
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.45;
  margin-bottom: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.v2-auth-flash--alert {
  background: var(--v2-error-bg);
  border: 1px solid var(--v2-error-border);
  color: #8a2727;
}

.v2-auth-flash--notice {
  background: var(--v2-success-bg);
  border: 1px solid var(--v2-success-border);
  color: #1a6e44;
}

.v2-auth-flash__list {
  margin: 6px 0 0;
  padding-left: 20px;
}

/* ── Form fields ───────────────────────────────────────────────────────── */
.v2-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.v2-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.v2-form-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.v2-form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--v2-navy);
  letter-spacing: -0.005em;
}

.v2-form-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--v2-border);
  border-radius: var(--v2-radius-sm);
  font-size: 14.5px;
  font-family: var(--v2-font-ui);
  background: var(--v2-white);
  color: var(--v2-navy);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.v2-form-input::placeholder { color: var(--v2-gray-mid); }
.v2-form-input:focus {
  border-color: var(--v2-blue);
  box-shadow: 0 0 0 3px rgba(47, 107, 239, 0.12);
}
.v2-form-input--valid { border-color: var(--v2-success); }
.v2-form-input--invalid {
  border-color: var(--v2-error);
  box-shadow: 0 0 0 3px rgba(224, 82, 82, 0.10);
}

.v2-form-error {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--v2-error);
}
.v2-form-error:empty { display: none; }

.v2-form-inline-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--v2-blue);
  text-decoration: none;
}
.v2-form-inline-link:hover { text-decoration: underline; }

/* ── Submit ────────────────────────────────────────────────────────────── */
.v2-auth-form .v2-btn--block {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.v2-auth-form .v2-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.v2-auth-form__spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: var(--v2-white);
  border-radius: 50%;
  margin-right: 8px;
  animation: v2-auth-spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes v2-auth-spin { to { transform: rotate(360deg); } }

/* ── Footer link + terms ───────────────────────────────────────────────── */
.v2-auth-card__footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--v2-border);
  text-align: center;
  font-size: 13.5px;
  color: var(--v2-gray);
}

.v2-auth-card__footer a {
  color: var(--v2-blue);
  font-weight: 600;
  text-decoration: none;
}
.v2-auth-card__footer a:hover { text-decoration: underline; }

.v2-auth-card__terms {
  margin: 14px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--v2-gray-mid);
}

.v2-auth-card__terms a {
  color: var(--v2-gray);
  text-decoration: underline;
}

/* ── Trust strip below card (desktop only) ─────────────────────────────── */
.v2-auth-trust {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.v2-auth-trust__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--v2-gray);
}

.v2-auth-trust__item-icon {
  display: inline-flex;
  color: var(--v2-success);
}

@media (max-width: 480px) {
  .v2-auth-trust { display: none; }
}
