/* MailsByte modern auth — Clerk/Linear-style card on Voidglass aurora */

html.light-theme .auth-body,
html[data-theme='light'] .auth-body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124, 92, 255, 0.12), transparent 55%),
    radial-gradient(900px 500px at 110% 10%, rgba(232, 74, 138, 0.1), transparent 50%),
    #f3eef8;
  color: #161022;
}
html.light-theme .auth-brand,
html.light-theme .auth-card h1,
html.light-theme .auth-kicker,
html[data-theme='light'] .auth-brand,
html[data-theme='light'] .auth-card h1 { color: #161022; }
html.light-theme .auth-card,
html[data-theme='light'] .auth-card {
  background: #fff;
  color: #161022;
}
html.light-theme .auth-input input,
html[data-theme='light'] .auth-input input {
  background: #fff;
  color: #161022;
  border-color: rgba(60, 30, 90, 0.18);
}

.auth-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124, 92, 255, 0.22), transparent 55%),
    radial-gradient(900px 500px at 110% 10%, rgba(232, 74, 138, 0.18), transparent 50%),
    radial-gradient(800px 500px at 50% 120%, rgba(240, 180, 41, 0.1), transparent 50%),
    #07050e;
  font-family: var(--font);
  display: flex;
  flex-direction: column;
}

.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  z-index: 0;
}

.auth-nav,
.auth-main,
.auth-foot {
  position: relative;
  z-index: 1;
}

.auth-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.auth-brand img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.auth-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.auth-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 0.5rem 1rem 2.5rem;
}

.auth-shell {
  width: min(440px, 100%);
}

.auth-card {
  background: linear-gradient(180deg, rgba(22, 16, 38, 0.86), rgba(10, 7, 18, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.4rem;
  padding: 1.7rem 1.45rem 1.45rem;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.7rem;
}

.auth-kicker i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 99px;
  background: #5ee9a8;
  box-shadow: 0 0 10px #5ee9a8;
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: #fff;
}

.auth-card .lede {
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-social {
  display: grid;
  gap: 0.55rem;
}

.auth-social-btn {
  appearance: none;
  width: 100%;
  height: 2.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease), background 0.18s ease, border-color 0.18s ease;
}

.auth-social-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
}

.auth-social-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.auth-social-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.95rem;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.25rem;
  margin-bottom: 0.95rem;
  border-radius: 0.85rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-tab {
  height: 2.15rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.auth-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(246, 241, 255, 0.78);
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold-soft);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

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

.auth-input {
  position: relative;
}

.auth-input input,
.auth-input select {
  width: 100%;
  box-sizing: border-box;
  height: 2.9rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  padding: 0 2.6rem 0 2.55rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input input::placeholder { color: rgba(246, 241, 255, 0.32); }

.auth-input input:focus {
  border-color: rgba(240, 180, 41, 0.55);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.14);
}

.auth-input .ico-left,
.auth-input .ico-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.auth-input .ico-left { left: 0.8rem; pointer-events: none; }
.auth-input .ico-right {
  right: 0.45rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  color: var(--muted);
}

.auth-input .ico-right:hover { color: #fff; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.15rem 0 1rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  user-select: none;
}

.auth-check input {
  accent-color: #f0b429;
}

.auth-submit {
  width: 100%;
  height: 2.95rem;
  border: 0;
  border-radius: 0.85rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.94rem;
  color: #120b1c;
  cursor: pointer;
  background: linear-gradient(135deg, #ffe08a 0%, #f0b429 42%, #e84a8a 140%);
  box-shadow: 0 10px 24px rgba(232, 74, 138, 0.28);
  transition: transform 0.18s var(--ease), filter 0.18s ease;
}

.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.05); }
.auth-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }

.auth-guest {
  width: 100%;
  margin-top: 0.55rem;
  height: 2.7rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-guest:hover { background: rgba(255, 255, 255, 0.04); }

.auth-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.auth-trust {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.95rem;
  color: var(--faint);
  font-size: 0.72rem;
  text-align: center;
}

.auth-strength {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.auth-strength span {
  height: 0.28rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-strength span.on:nth-child(1) { background: #ff6b7a; }
.auth-strength span.on:nth-child(2) { background: #f0b429; }
.auth-strength span.on:nth-child(3) { background: #ffd978; }
.auth-strength span.on:nth-child(4) { background: #5ee9a8; }

.auth-hint {
  font-size: 0.74rem;
  color: var(--faint);
}

.auth-panel[hidden] { display: none !important; }

.auth-foot {
  padding: 1.1rem;
  text-align: center;
  color: var(--faint);
  font-size: 0.76rem;
}

.auth-error-banner {
  display: none;
  margin-bottom: 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  background: rgba(255, 107, 122, 0.12);
  border: 1px solid rgba(255, 107, 122, 0.28);
  color: #ffb3bb;
  font-size: 0.82rem;
}

.auth-error-banner.is-on { display: block; }

@media (max-width: 640px) {
  .auth-card { padding: 1.4rem 1.05rem 1.15rem; border-radius: 1.15rem; }
  .auth-nav { padding: 0.95rem 1rem; }
}
