﻿:root {
  --bg: #f8f8fc;
  --card: #ffffff;
  --text: #050505;
  --muted: rgba(5, 5, 5, 0.65);
  --border: rgba(5, 5, 5, 0.08);
  --accent: #a100ff;
  --accent2: #5b00b5;
  --danger: #cf335b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  width: 460px;
  height: 460px;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.22;
  z-index: 0;
}

body::before {
  top: -200px;
  left: -140px;
  background: var(--accent);
}

body::after {
  right: -140px;
  bottom: -220px;
  background: var(--accent2);
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(100%, 410px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(91, 0, 181, 0.09), 0 10px 24px rgba(5, 5, 5, 0.06);
  padding: 32px;
}

.auth-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

.auth-logo {
  height: 32px;
  width: auto;
  display: block;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
}

.auth-subtitle {
  margin: 10px 0 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: rgba(5, 5, 5, 0.48);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0 14px 0 42px;
  font-size: 14px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input::placeholder {
  color: rgba(5, 5, 5, 0.45);
}

input:focus {
  border-color: rgba(161, 0, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(161, 0, 255, 0.12);
}

.field-error {
  min-height: 14px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.2;
}

.checkbox-wrap {
  margin-top: 2px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.checkbox-wrap input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  margin: 0;
  width: 44px;
  min-width: 44px;
  height: 24px;
  border: 1px solid #5b00b5;
  border-radius: 999px;
  background: #0d0d12;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.checkbox-wrap input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ededed;
  transition: transform 180ms ease;
}

.checkbox-wrap input:checked {
  background: #a100ff;
  border-color: #a100ff;
}

.checkbox-wrap input:checked::before {
  transform: translateX(20px);
}

.checkbox-wrap input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(161, 0, 255, 0.35);
}

.btn-primary {
  margin-top: 4px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #EDEDED;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(161, 0, 255, 0.3);
  filter: brightness(1.02);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(161, 0, 255, 0.35), 0 10px 24px rgba(161, 0, 255, 0.3);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.global-error {
  min-height: 16px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.auth-switch {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-switch a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px;
    border-radius: 18px;
  }

  .auth-brand {
    margin-bottom: 12px;
  }

  .auth-logo {
    height: 28px;
  }

  h1 {
    font-size: 28px;
  }
}
