:root {
  --primary: #8b5cf6;
  --primary-dark: #6d28d9;
  --primary-soft: #ede9fe;
  --text: #111827;
  --muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e5e7eb;
  --danger: #dc2626;
  --success: #16a34a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(
      circle at top right,
      rgba(139, 92, 246, 0.2),
      transparent 32%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(14, 165, 233, 0.14),
      transparent 32%
    ),
    linear-gradient(180deg, #ffffff, var(--bg));
  color: var(--text);
  overflow-x: hidden;
}

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px 18px;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before,
.auth-wrapper::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.55;
  animation: authFloat 7s ease-in-out infinite;
  z-index: 0;
}

.auth-wrapper::before {
  width: 280px;
  height: 280px;
  background: #ddd6fe;
  right: -90px;
  top: 100px;
}

.auth-wrapper::after {
  width: 190px;
  height: 190px;
  background: #bae6fd;
  left: -70px;
  bottom: 80px;
  animation-delay: 1.5s;
}

@keyframes authFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-22px);
  }
}

.auth-card {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
  animation: authFadeUp 0.55s ease both;
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-logo {
  text-align: center;
  margin-bottom: 22px;
}

.auth-logo-img {
  max-width: 230px;
  width: 78%;
  filter: drop-shadow(0 18px 30px rgba(139, 92, 246, 0.2));
}

.auth-title {
  margin: 0;
  text-align: center;
  font-size: 2rem;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: var(--text);
}

.auth-subtitle {
  margin: 10px auto 26px;
  text-align: center;
  color: var(--muted);
  line-height: 1.45;
}

.auth-alert {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 16px;
  padding: 13px 15px;
  margin-bottom: 18px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-alert.success {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: var(--text);
  font-weight: 850;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  border-radius: 16px;
  padding: 14px 15px;
  font-size: 1rem;
  outline: none;
  transition: 0.2s;
}

.form-group input::placeholder {
  color: #94a3b8;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
}

.form-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.auth-button {
  display: block;
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border-radius: 16px;
  padding: 15px 20px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(139, 92, 246, 0.28);
  transition: 0.25s;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
}

.auth-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(139, 92, 246, 0.38);
}

.auth-link {
  text-align: center;
  color: var(--muted);
  margin-top: 18px;
  font-weight: 650;
}

.auth-link a {
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

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

.install-link {
  display: block;
  margin: 22px auto 0;
  text-align: center;
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 900;
  background: var(--primary-soft);
  border: 1px solid #ddd6fe;
  padding: 12px 16px;
  border-radius: 16px;
}

.install-link:hover {
  background: #ddd6fe;
}

.auth-powered {
  margin-top: 25px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}

.auth-powered span {
  display: block;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 14px;
}

.auth-powered img {
  max-width: 70px;
  width: 100%;
  height: auto;
}

.auth-powered img:hover {
  opacity: 1;
}

@media (max-width: 520px) {
  .auth-card {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .auth-title {
    font-size: 1.7rem;
  }

  .auth-logo-img {
    max-width: 205px;
  }
}
