/* Auth pages — match site dark purple theme */
:root {
  --auth-bg: #0b0e1a;
  --auth-card: rgba(20, 24, 51, 0.85);
  --auth-border: rgba(168, 85, 247, 0.18);
  --auth-purple: #a855f7;
  --auth-purple-light: #c084fc;
  --auth-emerald: #34d399;
  --auth-text: #ffffff;
  --auth-muted: #9ca3af;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.auth-body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
  min-height: 100vh;
  overflow-x: hidden;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(168, 85, 247, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 80%, rgba(16, 185, 129, 0.12), transparent 50%),
    var(--auth-bg);
}

.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("./cdn/hero-bg.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  mix-blend-mode: lighten;
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  margin-bottom: 2rem;
}

.auth-brand img {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
}

.auth-brand span {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 26rem;
  padding: 2rem;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 1rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(88, 28, 135, 0.2);
}

.auth-card h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  background: linear-gradient(to right, #c084fc, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-card .auth-sub {
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
}

.auth-field {
  margin-bottom: 1.15rem;
}

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  color: #d1d5db;
  margin-bottom: 0.45rem;
  font-weight: 500;
}

.auth-field input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(168, 85, 247, 0.22);
  background: rgba(11, 14, 26, 0.65);
  color: #fff;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input::placeholder {
  color: #6b7280;
}

.auth-field input:focus {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.auth-sms {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}

.auth-sms input {
  flex: 1;
  min-width: 0;
}

.auth-sms-btn {
  flex-shrink: 0;
  min-width: 7.5rem;
  padding: 0 0.9rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.auth-sms-btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.22);
  color: #e9d5ff;
}

.auth-sms-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: #9ca3af;
  border-color: rgba(156, 163, 175, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.25rem 0 1.35rem;
  font-size: 0.8125rem;
}

.auth-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--auth-muted);
  cursor: pointer;
}

.auth-row a,
.auth-switch a {
  color: var(--auth-purple-light);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-row a:hover,
.auth-switch a:hover {
  color: #e9d5ff;
}

.auth-submit {
  width: 100%;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(to right, #9333ea, #a855f7);
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.28);
  transition: filter 0.2s, transform 0.15s;
}

.auth-submit:hover {
  filter: brightness(1.08);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-switch {
  margin-top: 1.35rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--auth-muted);
}

.auth-back {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: var(--auth-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.auth-back:hover {
  color: var(--auth-purple-light);
}

.auth-msg {
  display: none;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.auth-msg.show {
  display: block;
}

.auth-msg.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.auth-msg.ok {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

/* Navbar injected auth buttons */
.jw-auth-btns {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .jw-auth-btns {
    display: flex !important;
  }
}

.jw-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.jw-auth-btn.login {
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: transparent;
}

.jw-auth-btn.login:hover {
  background: rgba(168, 85, 247, 0.12);
  color: #e9d5ff;
}

.jw-auth-btn.register {
  color: #fff;
  background: linear-gradient(to right, #9333ea, #a855f7);
  box-shadow: 0 8px 18px rgba(168, 85, 247, 0.25);
  border: 1px solid transparent;
}

.jw-auth-btn.register:hover {
  filter: brightness(1.08);
}

.jw-auth-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(168, 85, 247, 0.12);
}

.jw-auth-mobile .jw-auth-btn {
  width: 100%;
  padding: 0.7rem 1rem;
}
