/*
 * Edgeable Syncer — auth pages (login / signup)
 * Theme toggle + light/dark tokens: edgeable-landing.css (load first).
 */

/* Scrollbar (same as main app) */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

body.page-auth {
  min-height: 100vh;
}

/* ── Background: subtle, no motion ── */
.eb-auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(165deg, var(--card) 0%, var(--surface) 45%, var(--card) 100%);
  opacity: 0.9;
}
html[data-theme="light"] .eb-auth-bg {
  opacity: 1;
}

.eb-auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.eb-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

/* ── Card ── */
.eb-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow);
  position: relative;
}

.eb-auth-logo {
  font-family: var(--display);
  font-size: clamp(2.4rem, 10vw, 3.35rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.eb-auth-logo span {
  color: var(--gold);
}

.eb-auth-tagline {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.eb-auth-lede {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
  margin: 0 0 1.35rem;
}
.eb-auth-lede a {
  color: var(--gold);
  text-decoration: none;
}
.eb-auth-lede a:hover {
  text-decoration: underline;
}

/* ── Form ── */
.eb-auth-card .eb-form-group {
  margin-bottom: 1.25rem;
}
.eb-auth-card .eb-form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}
.eb-auth-card .eb-form-group input {
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: 6px;
  border: 1.5px solid var(--border2);
  background: var(--card);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.eb-auth-card .eb-form-group input::placeholder {
  color: var(--muted);
  opacity: 0.45;
}
.eb-auth-card .eb-form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 184, 75, 0.12);
  transform: translateY(-1px);
}

/* Password + eye toggle */
.eb-field-pw {
  position: relative;
  display: flex;
  align-items: stretch;
}
.eb-field-pw input {
  padding-right: 2.75rem !important;
}
.eb-pw-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.eb-pw-toggle:hover {
  color: var(--text);
  background: var(--border);
}
.eb-pw-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* One visible icon at a time (avoid double SVG in some browsers) */
.eb-pw-toggle .eb-pw-ico-hide {
  display: none;
}
.eb-pw-toggle.is-revealed .eb-pw-ico-show {
  display: none;
}
.eb-pw-toggle.is-revealed .eb-pw-ico-hide {
  display: block;
}

.eb-auth-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.88rem 1.25rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--display);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold);
  color: #0d0d0f;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.15s ease;
  box-shadow: 0 6px 24px rgba(232, 184, 75, 0.38);
}
.eb-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(232, 184, 75, 0.48);
}
.eb-auth-submit:active {
  transform: translateY(0);
}
.eb-auth-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.eb-auth-submit:hover::after {
  opacity: 1;
}

.eb-auth-footer {
  text-align: center;
  margin-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.eb-auth-footer a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
.eb-auth-footer a:hover {
  border-bottom-color: rgba(232, 184, 75, 0.45);
  opacity: 0.92;
}

.eb-auth-msg {
  display: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.7rem 0.9rem;
  border-radius: 6px;
  margin-top: 1rem;
  text-align: center;
  line-height: 1.45;
}
.eb-auth-msg.is-visible {
  display: block;
  animation: eb-auth-shake 0.45s ease;
}
.eb-auth-msg--err {
  background: var(--red-bg);
  border: 1px solid rgba(255, 77, 94, 0.32);
  color: var(--red);
}
@keyframes eb-auth-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .eb-auth-submit::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .eb-auth-card {
    padding: 2.25rem 1.35rem;
  }
}
