*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(124, 58, 237, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(200, 168, 75, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #1a1228 0%, #0d0d12 100%);
  color: #e8e0d0;
  font-family: Inter, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.auth-logo-img {
  max-width: 260px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  filter: drop-shadow(0 4px 18px rgba(200, 168, 75, 0.3));
}

.auth-logo {
  font-family: Cinzel, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #c8a84b;
  text-decoration: none;
  text-shadow: 0 0 24px rgba(200, 168, 75, 0.4);
}

.auth-card {
  width: 100%;
  background: rgba(19, 18, 26, 0.85);
  border: 1px solid #2a2438;
  border-radius: 14px;
  padding: 26px 28px 30px;
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 8px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #9b91b3;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.auth-tab.active {
  background: rgba(124, 58, 237, 0.22);
  color: #e8e0d0;
}
.auth-tab:not(.active):hover { color: #e8e0d0; }

.auth-field {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9b91b3;
}
.auth-field input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #3a2f5a;
  color: #e8e0d0;
  border-radius: 7px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
.auth-hint {
  font-size: 0.72rem;
  color: #7a6f94;
}

.auth-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-pw-wrap input {
  flex: 1;
  padding-right: 42px !important;
}
.auth-pw-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #7a6f94;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.auth-pw-toggle:hover { color: #c8a84b; }
.auth-pw-toggle svg { width: 18px; height: 18px; pointer-events: none; }

.auth-pw-match {
  font-size: 0.72rem;
  margin-top: -8px;
  margin-bottom: 6px;
}
.auth-pw-match.ok  { color: #6ee07a; }
.auth-pw-match.bad { color: #f08080; }

.auth-error {
  margin: 4px 0 10px;
  padding: 8px 10px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 6px;
  color: #f8a4a4;
  font-size: 0.82rem;
}

.auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 11px 0;
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  border: 1px solid rgba(200, 168, 75, 0.35);
  color: #fff;
  font-family: Cinzel, serif;
  font-size: 0.92rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: filter 0.15s, transform 0.08s;
}
.auth-submit:hover  { filter: brightness(1.12); }
.auth-submit:active { transform: scale(0.99); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-footnote {
  font-size: 0.78rem;
  color: #7a6f94;
  text-align: center;
}

.auth-forgot {
  text-align: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2a2438;
}
.auth-forgot-btn {
  background: transparent;
  border: none;
  color: #9b91b3;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-forgot-btn:hover { color: #c8a84b; }
.auth-forgot-btn:disabled { opacity: 0.5; cursor: not-allowed; }
