:root {
  --auth-bg: #050505;
  --auth-card: rgba(12, 12, 12, 0.85);
  --auth-text: #f5f5f7;
  --auth-text-muted: rgba(245, 245, 247, 0.58);
  --auth-border: rgba(255, 255, 255, 0.1);
  --auth-green: #20d466;
  --auth-green-dim: #18b857;
  --auth-green-glow: rgba(32, 212, 102, 0.35);
  --auth-link: #20d466;
  --auth-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--auth-font);
  background: var(--auth-bg);
  color: var(--auth-text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(32, 212, 102, 0.14), transparent 55%),
    radial-gradient(ellipse 45% 40% at 10% 85%, rgba(32, 212, 102, 0.07), transparent 50%);
}

body::after {
  content: "PRÓXIMO CRAQUE";
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.025);
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-align: center;
  padding: 24px;
  pointer-events: none;
  z-index: 0;
}

.auth-page {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 22px;
  box-shadow:
    0 32px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  overflow: hidden;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 0;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--auth-text);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.auth-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--auth-green) 0%, #0ea84e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px var(--auth-green-glow);
  line-height: 1;
}

.auth-logo em {
  font-style: normal;
  color: var(--auth-green);
}

.auth-logo:hover { color: var(--auth-text); }

.auth-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--auth-text-muted);
  text-decoration: none;
  font-size: 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--auth-border);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--auth-text);
  border-color: rgba(255, 255, 255, 0.16);
}

.auth-body { padding: 28px 24px 28px; }

.auth-title {
  margin: 0 0 8px;
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--auth-text);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-subtitle {
  margin: 0 0 28px;
  font-size: 0.92rem;
  color: var(--auth-text-muted);
  line-height: 1.5;
}

.auth-subtitle strong { color: var(--auth-green); font-weight: 700; }

.auth-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#googleAuthContainer {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-options.hidden { display: none; }

.auth-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s ease;
  border: 1px solid var(--auth-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--auth-text);
}

.auth-btn-google {
  background: rgba(255, 255, 255, 0.06);
}

.auth-btn-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.auth-btn-email {
  border: none;
  background: linear-gradient(135deg, var(--auth-green) 0%, #12c45a 100%);
  color: #041208;
  box-shadow: 0 12px 28px var(--auth-green-glow);
}

.auth-btn-email:hover {
  box-shadow: 0 16px 36px rgba(32, 212, 102, 0.45);
  transform: translateY(-1px);
  color: #041208;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.auth-divider span {
  font-size: 0.75rem;
  color: var(--auth-text-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.auth-email-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-email-form.hidden { display: none; }

.auth-email-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--auth-text-muted);
}

.auth-email-form input {
  padding: 14px 16px;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--auth-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-email-form input::placeholder { color: rgba(245, 245, 247, 0.35); }

.auth-email-form input:focus {
  outline: none;
  border-color: rgba(32, 212, 102, 0.55);
  box-shadow: 0 0 0 3px rgba(32, 212, 102, 0.15);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 48px;
  flex: 1;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--auth-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
  color: var(--auth-text);
  background: rgba(255, 255, 255, 0.08);
}

.auth-errors {
  margin: 0;
  font-size: 0.82rem;
  color: #ff6b6b;
  line-height: 1.4;
}

.auth-errors.hidden { display: none; }

.auth-btn-submit {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--auth-green) 0%, #12c45a 100%);
  color: #041208;
  border: none;
  border-radius: 14px;
  padding: 14px 24px;
  font-weight: 800;
  box-shadow: 0 12px 28px var(--auth-green-glow);
}

.auth-btn-submit:hover {
  box-shadow: 0 16px 36px rgba(32, 212, 102, 0.45);
  transform: translateY(-1px);
  color: #041208;
}

.auth-back {
  background: none;
  border: none;
  color: var(--auth-text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 8px 0;
  font-family: inherit;
  align-self: flex-start;
  transition: color 0.2s;
}

.auth-back:hover { color: var(--auth-green); }

.auth-legal {
  margin: 24px 0 0;
  font-size: 0.75rem;
  color: var(--auth-text-muted);
  line-height: 1.5;
}

.auth-legal a {
  color: var(--auth-green);
  text-decoration: none;
}

.auth-legal a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .auth-card { border-radius: 18px; }
  .auth-body { padding: 24px 20px; }
  .auth-title { font-size: 1.45rem; }
}
