/* ============================
   Login
   ============================ */

.auth-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at top, rgba(124, 92, 255, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(11, 14, 20, 0.98), rgba(5, 5, 7, 0.98));
}

.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 2.2rem;
  background: rgba(18, 24, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
}

.auth-subtitle {
  margin-top: -8px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.5;
}

.auth-highlight {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.08);
  color: #d8d9ff;
  font-size: 0.9rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.auth-logo img {
  height: 72px;
  width: auto;
  filter:
    drop-shadow(0 0 18px rgba(124, 92, 255, 0.45))
    drop-shadow(0 0 32px rgba(124, 92, 255, 0.25));
}

.auth-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.form-footer {
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-footer a,
.form-footer button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-card .auth-body-copy {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-card .button.button-primary {
  margin-top: 8px;
  width: 100%;
}

.auth-google-button {
  width: 100%;
  margin-bottom: 10px;
}

.auth-separator {
  margin: 10px 0 14px;
  position: relative;
  text-align: center;
}

.auth-separator::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-separator span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 10px;
  font-size: 0.78rem;
  color: rgba(154, 160, 179, 0.9);
  background: rgba(18, 24, 38, 0.9);
}

.password-rules {
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.password-rules strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.password-rules ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.password-rules li {
  position: relative;
  padding-left: 16px;
}

.password-rules li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.auth-card input {
  background: rgba(18, 24, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 48px;
  font-size: 16px;
}

.auth-card input:focus {
  background: rgba(18, 24, 38, 0.95);
}

.auth-card form {
  width: 100%;
}

.auth-inline-form {
  margin: 0;
}

.button-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (hover: hover) {
  .button-link:hover {
    color: var(--color-primary-hover);
  }
}

@media (max-width: 600px) {
  .auth-wrapper {
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    align-items: flex-start;
  }

  .auth-card {
    max-width: 100%;
    padding: 1.4rem 1rem 1.2rem;
    min-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
  }

  .auth-logo {
    margin-bottom: 0.8rem;
  }

  .auth-title {
    margin-bottom: 1rem;
    font-size: 1.32rem;
  }

  .auth-subtitle,
  .auth-card .auth-body-copy {
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
  }

  .form-footer {
    margin-top: auto;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    font-size: 0.82rem;
    padding-top: 0.7rem;
  }

  .auth-card .button {
    min-height: 50px;
  }

  .password-rules {
    font-size: 0.82rem;
  }

  .password-rules ul {
    gap: 5px;
  }
}
