/* Shared auth pages: login, register */

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f7fb;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 18%, rgba(49, 87, 231, 0.08), transparent 28%),
    #f4f7fb;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  padding: 34px 30px 28px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background:
    radial-gradient(circle at 50% 0%, rgba(49, 87, 231, 0.06), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.auth-card--tall {
  padding-bottom: 26px;
}

.auth-logo-wrap {
  width: 108px;
  height: 108px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.9), rgba(49, 87, 231, 0.95), rgba(6, 182, 212, 0.9));
  padding: 3px;
  box-shadow:
    0 16px 34px rgba(49, 87, 231, 0.18),
    0 0 0 1px rgba(49, 87, 231, 0.12);
}

.auth-logo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  display: grid;
  place-items: center;
}

.auth-logo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  color: #64748b;
  text-align: center;
}

.auth-field {
  margin-bottom: 12px;
}

.auth-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  line-height: 1.25;
}

.auth-field input {
  width: 100%;
  height: 40px;
  border-radius: 7px;
  border: 1px solid #dbe5f3;
  background: #ffffff;
  padding: 0 12px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: #3157e7;
  box-shadow: 0 0 0 3px rgba(49, 87, 231, 0.12);
}

.auth-field--optional label {
  color: #64748b;
}

.auth-submit,
.auth-form input[type="submit"] {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: #3157e7;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.12s ease;
  box-sizing: border-box;
  margin-top: 4px;
}

.auth-submit:hover,
.auth-form input[type="submit"]:hover {
  background: #2446c7;
}

.auth-submit:active,
.auth-form input[type="submit"]:active {
  transform: translateY(1px);
}

.auth-link,
.auth-card a {
  color: #3157e7;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover,
.auth-card a:hover {
  text-decoration: underline;
}

.auth-alerts {
  margin: 0 0 12px;
}

.auth-alert {
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
}

.auth-alert + .auth-alert {
  margin-top: 8px;
}

.auth-alert-error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  box-shadow: inset 3px 0 0 #ef4444;
}

.auth-alert-success {
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.auth-alert-info {
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 14px;
}

.auth-forgot-row a {
  font-size: 13px;
  font-weight: 700;
  color: #3157e7;
  text-decoration: none;
}

.auth-forgot-row a:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 18px;
  text-align: center;
}

.auth-footer p {
  margin: 0 0 10px;
  font-size: 14px;
  color: #64748b;
}

.auth-footer .auth-link--home {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
}

.auth-captcha {
  margin: 14px 0 16px;
  display: flex;
  justify-content: center;
  min-height: 78px;
  overflow: hidden;
}

.auth-captcha > div {
  max-width: 100%;
}

/* OAuth (login page only) */
.oauth-signin {
  margin-top: 18px;
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.oauth-divider::before,
.oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.oauth-buttons {
  display: grid;
  gap: 10px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid #dbe5f3;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-sizing: border-box;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.oauth-btn:hover {
  border-color: #c7d5ea;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.oauth-btn:active {
  transform: translateY(1px);
}

.oauth-btn-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  flex-shrink: 0;
}

.oauth-btn--google .oauth-btn-icon {
  background: #eff6ff;
  color: #2563eb;
}

.oauth-btn--yandex .oauth-btn-icon {
  background: #fff7ed;
  color: #ea580c;
}

@media (max-width: 480px) {
  .auth-card {
    max-width: 100%;
    padding: 28px 20px 24px;
  }

  .auth-logo-wrap {
    width: 92px;
    height: 92px;
    margin-bottom: 18px;
  }

  .auth-title {
    font-size: 22px;
  }

  .auth-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .auth-captcha {
    margin: 12px 0 14px;
  }
}
