/* Auth v3 — вход и регистрация */

.auth-v3 {
  --a3-ink: #0b1220;
  --a3-muted: #5a6a85;
  --a3-line: #e2e8f0;
  --a3-accent: #2b6bff;
  margin: 0;
  min-height: 100vh;
  font-family: "Onest", system-ui, sans-serif;
  color: var(--a3-ink);
  background: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

.auth-v3-wrap {
  max-width: 440px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}

.auth-v3-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.5rem 0.35rem 0.15rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--a3-muted);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.auth-v3-back:hover {
  color: var(--a3-ink);
  background: rgba(15, 23, 42, 0.05);
}
.auth-v3-back__icon {
  display: block;
  flex-shrink: 0;
}

.auth-v3-card {
  background: #fff;
  border: 1px solid var(--a3-line);
  border-radius: 16px;
  padding: 1.75rem 1.5rem 1.35rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.auth-v3-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.35rem;
  text-decoration: none;
}
.auth-v3-logo img {
  display: block;
  height: 32px;
  width: auto;
}

.auth-v3-head h1 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  text-align: center;
}
.auth-v3-head p {
  margin: 0 0 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--a3-muted);
}

.auth-v3-field {
  margin-bottom: 0.85rem;
}
.auth-v3-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.auth-v3-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--a3-line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
}
.auth-v3-input:focus {
  outline: none;
  border-color: rgba(43, 107, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(43, 107, 255, 0.12);
}

.auth-v3-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}
.auth-v3-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--a3-muted);
  cursor: pointer;
  margin: 0;
}
.auth-v3-check input {
  margin: 0;
}
.auth-v3-link {
  color: var(--a3-accent);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.auth-v3-link:hover {
  text-decoration: underline;
}

.auth-v3-submit {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #2b6bff, #1f55df);
  cursor: pointer;
  margin-top: 0.25rem;
}

.auth-v3-oauth {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--a3-line);
}
.auth-v3-oauth__label {
  font-size: 0.78rem;
  color: var(--a3-muted);
  text-align: center;
  margin: 0 0 0.65rem;
}
.auth-v3-oauth__grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.auth-v3-oauth__pair {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
}
.auth-v3-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-radius: 12px;
  padding: 0.82rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-v3-oauth__pair .auth-v3-oauth-btn {
  flex: 1 1 0;
  width: auto;
  font-size: 0.78rem;
  padding: 0.78rem 0.55rem;
  gap: 0.4rem;
}
.auth-v3-oauth__pair .auth-v3-oauth__icon--vk,
.auth-v3-oauth__pair .auth-v3-oauth__icon--mailru {
  width: 24px;
  height: 24px;
}
.auth-v3-oauth__pair .auth-v3-oauth__icon--vk svg,
.auth-v3-oauth__pair .auth-v3-oauth__icon--mailru svg {
  width: 24px;
  height: 24px;
}
.auth-v3-oauth--yandex {
  background: #000;
  border-color: #000;
  color: #fff;
}
.auth-v3-oauth--yandex:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
}
.auth-v3-oauth__icon--yandex,
.auth-v3-oauth__icon--vk,
.auth-v3-oauth__icon--mailru {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.auth-v3-oauth--vk {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}
.auth-v3-oauth--vk:hover {
  background: #0066dd;
  border-color: #0066dd;
}
.auth-v3-oauth--mailru {
  background: #005ff9;
  border-color: #005ff9;
  color: #fff;
}
.auth-v3-oauth--mailru:hover {
  background: #004ed0;
  border-color: #004ed0;
}
.auth-v3-oauth__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-v3-oauth-btn.is-muted {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}
.auth-v3-oauth.is-disabled .auth-v3-oauth-btn {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 420px) {
  .auth-v3-oauth__pair {
    flex-direction: column;
  }
  .auth-v3-oauth__pair .auth-v3-oauth-btn {
    width: 100%;
    font-size: 0.88rem;
    padding: 0.82rem 0.75rem;
  }
}

.auth-v3-switch {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--a3-muted);
}
.auth-v3-switch a {
  color: var(--a3-accent);
  font-weight: 600;
  text-decoration: none;
}
.auth-v3-switch a:hover {
  text-decoration: underline;
}

.auth-v3-hint {
  font-size: 0.78rem;
  color: var(--a3-muted);
  margin-top: 0.75rem;
  text-align: center;
}
.auth-v3-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}
.auth-v3-flash .alert {
  font-size: 0.85rem;
  border-radius: 10px;
  margin-bottom: 0.65rem;
}

.auth-v3-foot {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}
.auth-v3-foot a {
  color: var(--a3-muted);
}

.auth-v3-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--a3-muted);
  cursor: pointer;
}
.auth-v3-consent input {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  accent-color: var(--a3-accent);
}
.auth-v3-consent a {
  color: var(--a3-accent);
  text-decoration: underline;
}

.auth-v3-legal-note {
  margin: 0.85rem 0 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #94a3b8;
  text-align: center;
}
.auth-v3-legal-note a {
  color: var(--a3-muted);
  text-decoration: underline;
}

.auth-v3-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--a3-muted);
}

.auth-v3-secondary-form {
  margin-top: 0.75rem;
}

.auth-v3-secondary {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--a3-line);
  border-radius: 12px;
  background: #fff;
  color: var(--a3-ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-v3-secondary:hover {
  background: var(--a3-bg);
  border-color: #cbd5e1;
}

@media (max-width: 480px) {
  .auth-v3-oauth__pair {
    flex-direction: column;
  }
}
