/* ============================================================
   TELA DE LOGIN — CSS UNIFICADO (HTML puro)
   Convertido do React para HTML+CSS+JS vanilla
   ============================================================ */

/* ===================== CSS VARIABLES (Root) ===================== */
:root {
  --color-brand: #8b5cf6;
  --color-brand-light: #a78bfa;
  --color-brand-dark: #7c3aed;
  --color-error: #ef4444;
  --color-success: #10b981;

  --color-bg-page: #050505;
  --color-bg-card: rgba(255, 255, 255, 0.03);

  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.55);
  --color-text-muted: rgba(255, 255, 255, 0.4);
  --color-text-subtle: rgba(255, 255, 255, 0.4);
  --color-icon-muted: rgba(255, 255, 255, 0.4);

  --color-border: rgba(255, 255, 255, 0.07);

  --radius-card: 24px;
  --radius-input: 12px;
  --radius-button: 12px;
  --radius-pill: 999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
  --color-bg-page: #f5f5f7;
  --color-bg-card: rgba(255, 255, 255, 0.7);
  --color-text-primary: #1a1a2e;
  --color-text-secondary: rgba(0, 0, 0, 0.6);
  --color-text-muted: rgba(0, 0, 0, 0.5);
  --color-text-subtle: rgba(0, 0, 0, 0.45);
  --color-icon-muted: rgba(0, 0, 0, 0.5);
  --color-border: rgba(0, 0, 0, 0.1);
}

/* ===================== RESET ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  font-family: 'Inter', sans-serif;
  background: #000000;
  overflow-x: hidden;
  overflow-y: auto;
}

#root {
  height: 100%;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Animações sempre ativas nesta tela — decisão do produto: a identidade
 * visual (coroa flutuando, gradiente animado, frases alternadas) é parte
 * da experiência e não deve ser congelada pela configuração do Windows. */

/* ===================== SHARED ANIMATIONS ===================== */
@keyframes phraseSlide {
  0% { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  15% { opacity: 1; transform: translateY(0); filter: blur(0); }
  80% { opacity: 1; transform: translateY(0); filter: blur(0); }
  100% { opacity: 0; transform: translateY(-10px); filter: blur(4px); }
}

@keyframes cardSlideIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes successPop {
  from { opacity: 0; transform: scale(0.85) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes shakeIn {
  0% { transform: translateX(-6px); opacity: 0; }
  50% { transform: translateX(3px); }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes checkPop {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes decoPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

@keyframes decoFloat {
  0%, 100% { opacity: 0.2; transform: translateY(0) rotate(0deg); }
  50% { opacity: 0.5; transform: translateY(-15px) rotate(3deg); }
}

/* ===================== PAGE TRANSITIONS (App) ===================== */
.page-wrapper {
  animation: pageEnter 0.3s ease-out both;
}

.page-wrapper.page-exit {
  animation: pageExit 0.2s ease-in both;
}

@keyframes pageExit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== THEME TOGGLE ===================== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.theme-toggle-track {
  display: flex;
  align-items: center;
  width: 52px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px;
  transition: background 0.45s var(--ease-out-expo),
              border-color 0.45s var(--ease-out-expo),
              transform 0.3s var(--ease-spring);
}

.theme-toggle:hover .theme-toggle-track {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

.theme-toggle:active .theme-toggle-track {
  transform: scale(0.94);
}

.theme-toggle-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #8b5cf6;
  border-radius: 50%;
  color: #fff;
  will-change: transform;
  transition: background 0.45s var(--ease-out-expo),
              box-shadow 0.45s var(--ease-out-expo);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.6);
}

.theme-toggle:hover .theme-toggle-thumb {
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.85);
}

[data-theme="light"] .theme-toggle-track {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .theme-toggle:hover .theme-toggle-track {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .theme-toggle-thumb {
  background: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.55);
}

[data-theme="light"] .theme-toggle:hover .theme-toggle-thumb {
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.8);
}

html.theme-morphing .theme-toggle-track {
  animation: themePulse 0.85s var(--ease-out-expo) both;
}

html.theme-morphing .theme-toggle-thumb {
  animation: themeThumbPop 0.85s var(--ease-out-expo) both;
}

@keyframes themePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.45), 0 0 0 0 rgba(245, 158, 11, 0.28);
  }
  45% {
    box-shadow: 0 0 0 10px rgba(139, 92, 246, 0.16), 0 0 30px rgba(139, 92, 246, 0.25);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(139, 92, 246, 0), 0 0 0 rgba(139, 92, 246, 0);
  }
}

@keyframes themeThumbPop {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(1.35) saturate(1.35); }
}

/* ===================== LOGIN PAGE ===================== */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: safe center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 30% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 35%),
    radial-gradient(ellipse at 80% 30%, rgba(168, 85, 247, 0.06) 0%, transparent 35%),
    radial-gradient(ellipse at 90% 80%, rgba(88, 28, 135, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 60%),
    #050505;
}

[data-theme="light"] .login-page {
  background:
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.06) 0%, transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.04) 0%, transparent 30%),
    #f5f5f7;
}

.container {
  display: flex;
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

/* Brand Side */
.brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 40px;
  position: relative;
  overflow: hidden;
}

.crown {
  width: 130px;
  position: relative;
  z-index: 2;
  animation: crownEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5));
  transition: transform 0.2s, filter 0.2s, opacity 0.2s;
  will-change: transform, filter;
}

.crown.is-floating {
  animation: crownFloat 5s ease-in-out infinite, crownShimmer 4s ease-in-out infinite;
}

@keyframes crownShimmer {
  0%, 100% { filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.4)) brightness(1); }
  50%      { filter: drop-shadow(0 0 36px rgba(139, 92, 246, 0.5)) brightness(1.08); }
}

[data-theme="light"] .crown {
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.3));
}

@keyframes crownEntrance {
  0% { opacity: 0; transform: scale(0.7) translateY(20px); filter: drop-shadow(0 0 0 rgba(139, 92, 246, 0)); }
  60% { opacity: 1; transform: scale(1.05) translateY(-4px); }
  100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5)); }
}

.crown-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  position: relative;
}

.crown-trigger:hover .crown {
  transform: translateY(-4px);
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.7));
}

.crown-secret-box {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  will-change: opacity, transform;
}

.crown-secret-box.is-entering {
  animation: secretDrift 60s linear infinite, secretEnter 0.6s ease-out forwards;
}

.crown-secret-box.is-leaving {
  animation: secretDrift 60s linear infinite, secretLeave 0.5s ease-in forwards;
}

.crown-secret-text {
  font-family: 'Courier New', monospace;
  font-size: 0.7rem;
  color: rgba(139, 92, 246, 0.4);
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 96vw;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

[data-theme="light"] .crown-secret-text {
  color: rgba(139, 92, 246, 0.3);
}

@keyframes secretDrift {
  0% { transform: translateX(-60%) translateY(0); }
  50% { transform: translateX(-40%) translateY(-20px); }
  100% { transform: translateX(-60%) translateY(0); }
}

@keyframes secretEnter {
  0% { opacity: 0; filter: blur(4px); }
  100% { opacity: 0.15; filter: blur(0); }
}

@keyframes secretLeave {
  0% { opacity: 0.15; filter: blur(0); }
  100% { opacity: 0; filter: blur(4px); }
}

@keyframes crownFloat {
  0% { transform: translateY(0) rotate(0deg); filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5)); }
  50% { transform: translateY(-10px) rotate(-1.2deg); filter: drop-shadow(0 8px 42px rgba(168, 85, 247, 0.7)); }
  100% { transform: translateY(0) rotate(0deg); filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5)); }
}

.brand-text {
  text-align: center;
  z-index: 2;
  animation: fadeInUp 1.2s ease-out 0.5s both;
  width: 280px;
  height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.brand-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #c084fc 0%, #a78bfa 25%, #8b5cf6 50%, #a78bfa 75%, #c084fc 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

[data-theme="light"] .brand-title {
  color: #1a1a2e;
  text-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
}

.brand-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.brand-divider-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
}

.brand-divider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
  animation: dotPulse 3s ease-in-out infinite;
}

.brand-tagline {
  font-size: 0.82rem;
  color: rgba(167, 139, 250, 0.7);
  margin: 0;
  letter-spacing: 0.02em;
  width: 100%;
  line-height: 1.45;
  height: 3.2em;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

[data-theme="light"] .brand-tagline {
  color: rgba(88, 28, 135, 0.6);
}

.phrase-anim {
  position: absolute;
  left: 12px;
  right: 12px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  animation: phraseSlide 4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Footer */
.login-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 2;
  animation: fadeInUp 1.5s ease-out 1s both;
}

.login-footer p {
  font-size: 0.75rem;
  color: rgba(139, 92, 246, 0.35);
  margin: 0;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

[data-theme="light"] .login-footer p {
  color: rgba(124, 58, 237, 0.7);
}

.footer-line {
  width: 40px;
  height: 1px;
  background: rgba(139, 92, 246, 0.2);
}

[data-theme="light"] .footer-line {
  background: rgba(139, 92, 246, 0.15);
}

/* SVG decorations */
.bg-deco {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

[data-theme="light"] .bg-deco {
  opacity: 0.3;
}

.deco {
  fill: none;
  stroke: rgba(139, 92, 246, 0.08);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="light"] .deco {
  stroke: rgba(139, 92, 246, 0.06);
}

.deco-hex-1 {
  stroke: rgba(139, 92, 246, 0.1);
  animation: decoPulse 10s ease-in-out infinite;
}

.deco-hex-2 {
  stroke: rgba(168, 85, 247, 0.08);
  animation: decoPulse 12s ease-in-out infinite 3s;
}

.deco-tri {
  stroke: rgba(124, 58, 237, 0.08);
  animation: decoPulse 11s ease-in-out infinite 1.5s;
}

.deco-circle-1 {
  stroke: rgba(139, 92, 246, 0.08);
  animation: decoPulse 14s ease-in-out infinite 5s;
}

.deco-circle-2 {
  stroke: rgba(168, 85, 247, 0.08);
  animation: decoPulse 13s ease-in-out infinite 2s;
}

.deco-diamond {
  stroke: rgba(124, 58, 237, 0.08);
  animation: decoPulse 15s ease-in-out infinite 4s;
}

/* Form Side */
.form-side {
  width: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-card);
  padding: 24px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .login-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.card-header {
  margin-bottom: 24px;
}

.card-header h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

[data-theme="light"] .card-header h2 {
  color: #1a1a2e;
}

.card-header p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

[data-theme="light"] .card-header p {
  color: var(--color-text-secondary);
}

/* Fields */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

[data-theme="light"] .field label {
  color: rgba(0, 0, 0, 0.62);
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-icon-muted);
  pointer-events: none;
  transition: color 0.25s;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-input);
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

[data-theme="light"] .input-wrapper input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

.input-wrapper input::placeholder {
  color: var(--color-text-subtle);
}

[data-theme="light"] .input-wrapper input::placeholder {
  color: var(--color-text-subtle);
}

.input-wrapper input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .input-wrapper input:focus {
  background: rgba(0, 0, 0, 0.04);
  border-color: #8b5cf6;
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper input:focus + .input-icon {
  color: var(--color-brand-light);
}

.field.has-error .input-wrapper input {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field.has-error .input-icon {
  color: var(--color-error);
}

.field.is-valid .input-wrapper input {
  border-color: rgba(139, 92, 246, 0.35);
}

.valid-check {
  position: absolute;
  right: 12px;
  color: var(--color-brand);
  display: flex;
  align-items: center;
  animation: checkPop 0.3s var(--ease-spring);
}

[data-theme="light"] .valid-check {
  color: #10b981;
}

.error-msg {
  display: block;
  color: var(--color-error);
  font-size: 0.72rem;
  margin-top: 4px;
  min-height: 1.2em;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.field.has-error .error-msg {
  opacity: 1;
  animation: shakeIn 0.3s ease;
}

.toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

[data-theme="light"] .toggle-pw {
  color: var(--color-icon-muted);
}

.toggle-pw:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Row between */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.78rem;
  cursor: pointer;
  user-select: none;
}

[data-theme="light"] .checkbox-label {
  color: rgba(0, 0, 0, 0.62);
}

.checkbox-label input {
  display: none;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

[data-theme="light"] .checkmark {
  border-color: rgba(0, 0, 0, 0.15);
}

.checkbox-label input:checked + .checkmark {
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.checkmark::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s;
}

.checkbox-label input:checked + .checkmark::after {
  opacity: 1;
}

.forgot-link {
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.2s;
}

[data-theme="light"] .forgot-link {
  color: var(--color-text-secondary);
}

.forgot-link:hover {
  color: var(--color-brand-light);
}

/* Password strength */
.strength-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.strength-bar-track {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

[data-theme="light"] .strength-bar-track {
  background: rgba(0, 0, 0, 0.06);
}

.strength-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* Button login */
.btn-login {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-button);
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.3s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.btn-login:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.btn-login:active:not(:disabled) {
  transform: translateY(0);
}

.btn-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.divider span {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="light"] .divider span {
  color: var(--color-text-muted);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .divider::before,
[data-theme="light"] .divider::after {
  background: rgba(0, 0, 0, 0.08);
}

/* Social buttons */
.social-buttons {
  display: flex;
  gap: 10px;
}

.btn-social {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-button);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

[data-theme="light"] .btn-social {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.65);
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}

[data-theme="light"] .btn-social:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(139, 92, 246, 0.25);
}

/* Signup text */
.signup-text {
  text-align: center;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.82rem;
}

[data-theme="light"] .signup-text {
  color: var(--color-text-secondary);
}

.signup-text a {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.signup-text a:hover {
  color: var(--color-brand-light);
}

/* Success overlay */
/* ===================== SUCCESS OVERLAY (login / cadastro / recuperação)
 * Cena aberta na linguagem do hero do chat: coroa flutuando sobre halo
 * radial pulsante, nome em gradiente animado e ornamento de corte. ===================== */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(139, 92, 246, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse at 12% 88%, rgba(124, 58, 237, 0.1) 0%, transparent 45%),
    rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: overlayIn 0.45s ease-out;
}

[data-theme="light"] .success-overlay {
  background:
    radial-gradient(ellipse at 50% 28%, rgba(139, 92, 246, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 12% 88%, rgba(124, 58, 237, 0.05) 0%, transparent 45%),
    rgba(245, 245, 247, 0.92);
}

.success-scene {
  position: relative;
  text-align: center;
  width: min(92vw, 480px);
  animation: successPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

/* Coroa sobre o halo radial (mesma receita do .empty-crown do chat) */
.success-crown-slot {
  position: relative;
  width: 150px;
  height: 122px;
  margin: -30px auto 26px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.success-crown-slot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: 320px;
  height: 320px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22) 0%, rgba(139, 92, 246, 0.12) 35%, transparent 70%);
  filter: blur(36px);
  animation: brandHaloPulse 6s ease-in-out infinite;
  pointer-events: none;
}

[data-theme="light"] .success-crown-slot::before {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.14) 0%, rgba(139, 92, 246, 0.08) 35%, transparent 70%);
}

.success-crown {
  position: relative;
  z-index: 1;
  width: 128px;
  animation: crownFloat 3.5s ease-in-out infinite, crownShimmer 4s ease-in-out infinite;
}

/* Poeira mágica: partículas que sobem da base da coroa */
.success-mote {
  position: absolute;
  bottom: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(196, 168, 255, 0.9);
  box-shadow: 0 0 6px rgba(167, 139, 250, 0.9);
  opacity: 0;
  animation: moteRise 7s ease-in-out infinite;
  pointer-events: none;
}

.mote-1 { left: 24%; animation-delay: 0s; }
.mote-2 { left: 66%; width: 3px; height: 3px; animation-delay: 2.3s; }
.mote-3 { left: 46%; width: 2.5px; height: 2.5px; animation-delay: 4.6s; }

[data-theme="light"] .success-mote {
  background: rgba(139, 92, 246, 0.8);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

/* Selo do e-mail (recuperação de senha) */
.success-badge {
  position: relative;
  z-index: 1;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 0 34px rgba(139, 92, 246, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: crownFloat 4s ease-in-out infinite;
}

.success-badge svg {
  width: 36px;
  height: 36px;
  color: var(--color-brand-light);
}

[data-theme="light"] .success-badge {
  background: rgba(139, 92, 246, 0.07);
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.12);
}

[data-theme="light"] .success-badge svg {
  color: #7c3aed;
}

/* Eyebrow — chamada em caps com tracking largo */
.success-eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  animation: riseIn 0.5s var(--ease-out-expo) 0.18s both;
}

[data-theme="light"] .success-eyebrow {
  color: rgba(45, 27, 46, 0.5);
}

/* Nome — mesmo gradiente animado do título do hero */
.success-name {
  margin: 0 0 4px;
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
  background: linear-gradient(135deg, #c084fc 0%, #a78bfa 25%, #8b5cf6 50%, #a78bfa 75%, #c084fc 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(139, 92, 246, 0.28));
  animation: gradientShift 4s ease-in-out infinite, riseIn 0.5s var(--ease-out-expo) 0.24s both;
}

[data-theme="light"] .success-name {
  -webkit-text-fill-color: initial;
  background: none;
  color: #2d1b2e;
  filter: none;
}

/* Divisor ornamental — traço com gema central */
.success-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 240px;
  max-width: 70%;
  margin: 18px auto 20px;
  animation: riseIn 0.5s var(--ease-out-expo) 0.3s both;
}

.success-ornament i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5));
}

.success-ornament i:last-child {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.5), transparent);
}

.success-ornament .gem {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-radius: 1px;
  background: linear-gradient(135deg, #c084fc, #7c3aed);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
}

[data-theme="light"] .success-ornament i {
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.4));
}

[data-theme="light"] .success-ornament i:last-child {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.4), transparent);
}

/* Linha de status com ponto pulsante */
.success-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 30px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.55);
  animation: riseIn 0.5s var(--ease-out-expo) 0.36s both;
}

.success-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
  animation: dotPulse 2.2s ease-in-out infinite;
}

/* Frases alternadas — sai por cima, entra por baixo com blur */
.success-phrase {
  display: inline-block;
}

.success-phrase.is-animating {
  animation: phraseSwap 0.8s ease both;
}

@keyframes phraseSwap {
  0% { opacity: 1; transform: translateY(0); filter: blur(0); }
  35% { opacity: 0; transform: translateY(-8px); filter: blur(3px); }
  40% { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

[data-theme="light"] .success-line {
  color: rgba(45, 27, 46, 0.6);
}

/* Nota descritiva (recuperação de senha) */
.success-note {
  max-width: 320px;
  margin: 0 auto 30px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1.6;
  animation: riseIn 0.5s var(--ease-out-expo) 0.36s both;
}

[data-theme="light"] .success-note {
  color: rgba(45, 27, 46, 0.6);
}

/* Botão — vidro com borda fina, preenche no hover */
.btn-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 32px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.08);
  color: #ede9fe;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease,
    transform 0.18s var(--ease-spring);
  animation: riseIn 0.5s var(--ease-out-expo) 0.44s both;
}

.btn-continue:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(124, 58, 237, 0.2));
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 10px 36px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-continue:active {
  transform: translateY(0) scale(0.98);
}

.btn-continue .btn-arrow {
  color: var(--color-brand-light);
  transition: transform 0.2s var(--ease-out-expo);
}

.btn-continue:hover .btn-arrow {
  transform: translateX(4px);
}

[data-theme="light"] .btn-continue {
  color: #5b21b6;
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(124, 58, 237, 0.4);
}

[data-theme="light"] .btn-continue:hover {
  background: rgba(139, 92, 246, 0.14);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.18);
}

[data-theme="light"] .btn-continue .btn-arrow {
  color: #7c3aed;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes moteRise {
  0% { opacity: 0; transform: translateY(0) translateX(0); }
  15% { opacity: 0.9; }
  60% { opacity: 0.35; }
  100% { opacity: 0; transform: translateY(-92px) translateX(10px); }
}

/* ===================== REGISTER PAGE ===================== */
.register-alt-page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 16px 0;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 30% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 35%),
    radial-gradient(ellipse at 80% 30%, rgba(168, 85, 247, 0.06) 0%, transparent 35%),
    radial-gradient(ellipse at 90% 80%, rgba(88, 28, 135, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 60%),
    #050505;
}

[data-theme="light"] .register-alt-page {
  background:
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.06) 0%, transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.04) 0%, transparent 30%),
    #f5f5f7;
}

.register-alt-page::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  left: 10%;
  top: 20%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.register-alt-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
  mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .register-alt-page::after {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
}

.bg-deco-register {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

[data-theme="light"] .bg-deco-register {
  opacity: 0.3;
}

.deco-r {
  fill: none;
  stroke: rgba(139, 92, 246, 0.1);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.2));
}

[data-theme="light"] .deco-r {
  stroke: rgba(139, 92, 246, 0.06);
}

.deco-r-hex-1 { animation: decoFloat 12s ease-in-out infinite; }
.deco-r-hex-2 { animation: decoFloat 14s ease-in-out infinite 2s; }
.deco-r-tri { animation: decoFloat 11s ease-in-out infinite 1.5s; }
.deco-r-circle-1 { animation: decoFloat 13s ease-in-out infinite 3s; }
.deco-r-circle-2 { animation: decoFloat 15s ease-in-out infinite 2.5s; }
.deco-r-diamond { animation: decoFloat 10s ease-in-out infinite 0.5s; }

.register-alt-container {
  display: flex;
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 12px 20px;
  animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.register-alt-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 40px;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .register-alt-brand {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.04), rgba(0, 0, 0, 0.01));
  border-color: rgba(139, 92, 246, 0.1);
}

@media (min-width: 901px) {
  [data-theme="light"] .register-alt-brand {
    background: transparent;
    border: 0;
  }
}

.register-alt-brand::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  left: 50%;
  top: 32%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.22) 0%,
    rgba(139, 92, 246, 0.12) 35%,
    transparent 70%
  );
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  animation: brandHaloPulse 6s ease-in-out infinite;
}

[data-theme="light"] .register-alt-brand::before {
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.14) 0%,
    rgba(139, 92, 246, 0.08) 35%,
    transparent 70%
  );
}

@keyframes brandHaloPulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.register-alt-crown {
  width: 130px;
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5));
  animation: crownEntranceReg 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  z-index: 2;
  transition: transform 0.2s, filter 0.2s, opacity 0.2s;
  will-change: transform, filter;
}

.register-alt-crown.is-floating {
  animation: crownFloatReg 5s ease-in-out infinite, crownShimmer 4s ease-in-out infinite;
}

.crown-trigger:hover .register-alt-crown {
  transform: translateY(-4px);
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.7));
}

@keyframes crownFloatReg {
  0% { transform: translateY(0) rotate(0deg); filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5)); }
  50% { transform: translateY(-10px) rotate(-1.2deg); filter: drop-shadow(0 8px 42px rgba(168, 85, 247, 0.7)); }
  100% { transform: translateY(0) rotate(0deg); filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5)); }
}

@keyframes crownEntranceReg {
  0% { opacity: 0; transform: scale(0.7) translateY(20px); filter: drop-shadow(0 0 0 rgba(139, 92, 246, 0)); }
  60% { opacity: 1; transform: scale(1.05) translateY(-4px); }
  100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.5)); }
}

.register-alt-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  z-index: 2;
  animation: fadeInReg 1s ease-out 0.6s both;
}

@keyframes fadeInReg {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.register-alt-brand-text {
  text-align: center;
  z-index: 2;
  animation: fadeInUp 1.2s ease-out 0.5s both;
  width: 280px;
  height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
}

.register-alt-brand-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #c084fc 0%, #a78bfa 25%, #8b5cf6 50%, #a78bfa 75%, #c084fc 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease-in-out infinite;
}

[data-theme="light"] .register-alt-brand-title {
  color: #1a1a2e;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.register-alt-tagline {
  height: 3.2em;
  margin: 8px 0 0;
  position: relative;
  overflow: hidden;
  color: rgba(167, 139, 250, 0.7);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.02em;
  width: 100%;
}

[data-theme="light"] .register-alt-tagline {
  color: rgba(88, 28, 135, 0.6);
}

.register-alt-tagline .phrase-anim {
  position: absolute;
  left: 0;
  right: 0;
  padding: 0 16px;
  animation: phraseSlide 4s ease-in-out;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.register-alt-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.register-alt-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-card);
  padding: 24px 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .register-alt-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.register-alt-card-header {
  text-align: center;
  margin-bottom: 18px;
}

.register-alt-card-header h2 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 6px;
}

[data-theme="light"] .register-alt-card-header h2 {
  color: #1a1a2e;
}

.register-alt-card-header p {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
  margin: 0;
}

[data-theme="light"] .register-alt-card-header p {
  color: var(--color-text-secondary);
}

.register-alt-field {
  margin-bottom: 16px;
  position: relative;
}

.register-alt-field label {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

[data-theme="light"] .register-alt-field label {
  color: rgba(0, 0, 0, 0.62);
}

.register-alt-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.register-alt-input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-icon-muted);
  pointer-events: none;
  transition: color 0.25s;
}

[data-theme="light"] .register-alt-input-icon {
  color: var(--color-icon-muted);
}

.register-alt-input-wrapper input:focus ~ .register-alt-input-icon,
.register-alt-input-wrapper input:focus + .register-alt-input-icon {
  color: var(--color-brand-light);
}

.register-alt-input-wrapper input {
  width: 100%;
  padding: 12px 44px 12px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-input);
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

[data-theme="light"] .register-alt-input-wrapper input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

.register-alt-input-wrapper input::placeholder {
  color: var(--color-text-subtle);
}

[data-theme="light"] .register-alt-input-wrapper input::placeholder {
  color: var(--color-text-subtle);
}

.register-alt-input-wrapper input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .register-alt-input-wrapper input:focus {
  background: rgba(0, 0, 0, 0.04);
  border-color: #8b5cf6;
}

.register-alt-field.has-error .register-alt-input-wrapper input {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.register-alt-field.has-error .register-alt-input-icon {
  color: var(--color-error);
}

.register-alt-error-msg {
  display: block;
  color: var(--color-error);
  font-size: 0.72rem;
  margin-top: 4px;
  min-height: 1.2em;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.register-alt-field.has-error .register-alt-error-msg {
  opacity: 1;
  animation: shakeIn 0.3s ease;
}

.register-alt-valid-check {
  position: absolute;
  right: 42px;
  color: var(--color-brand);
  animation: checkPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
}

[data-theme="light"] .register-alt-valid-check {
  color: #10b981;
}

.register-alt-field.is-valid .register-alt-input-wrapper input {
  border-color: rgba(139, 92, 246, 0.35);
}

.register-alt-strength-meter {
  height: 4px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

[data-theme="light"] .register-alt-strength-meter {
  background: rgba(0, 0, 0, 0.06);
}

.register-alt-strength-bar {
  height: 100%;
  border-radius: inherit;
  transition: width var(--transition-normal), background-color var(--transition-normal);
}

.register-alt-toggle-pw {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: color 0.2s, transform 0.2s ease-out;
}

[data-theme="light"] .register-alt-toggle-pw {
  color: var(--color-icon-muted);
}

.register-alt-toggle-pw:hover {
  color: rgba(255, 255, 255, 0.6);
  transform: scale(1.15);
}

.register-alt-terms-notice {
  margin-top: 8px;
  margin-bottom: 10px;
}

.register-alt-terms-notice p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
  text-align: center;
  margin: 0;
}

[data-theme="light"] .register-alt-terms-notice p {
  color: var(--color-text-secondary);
}

.register-alt-link {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

[data-theme="light"] .register-alt-link {
  color: #7c3aed;
}

.register-alt-link:hover {
  color: var(--color-brand-light);
  text-decoration: underline;
}

.register-alt-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.3s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 10px;
}

.register-alt-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.register-alt-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.register-alt-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.register-alt-login-text {
  text-align: center;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
}

[data-theme="light"] .register-alt-login-text {
  color: var(--color-text-secondary);
}

.register-alt-login-text a {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.register-alt-login-text a:hover {
  color: var(--color-brand-light);
}

.register-alt-divider-text {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 10px;
}

.register-alt-divider-text span {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="light"] .register-alt-divider-text span {
  color: var(--color-text-muted);
}

.register-alt-divider-text::before,
.register-alt-divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .register-alt-divider-text::before,
[data-theme="light"] .register-alt-divider-text::after {
  background: rgba(0, 0, 0, 0.08);
}

.register-alt-social-buttons {
  display: flex;
  gap: 10px;
}

.register-alt-btn-social {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-button);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.83rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

[data-theme="light"] .register-alt-btn-social {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.65);
}

.register-alt-btn-social:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}

[data-theme="light"] .register-alt-btn-social:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(139, 92, 246, 0.25);
}

/* Success overlay (register) */
/* Overlay de sucesso do cadastro: unificado com .success-overlay acima */

/* ===================== FORGOT PASSWORD PAGE ===================== */
.forgot-page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 16px 0;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 30% 80%, rgba(124, 58, 237, 0.08) 0%, transparent 35%),
    radial-gradient(ellipse at 80% 30%, rgba(168, 85, 247, 0.06) 0%, transparent 35%),
    radial-gradient(ellipse at 90% 80%, rgba(88, 28, 135, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 60%),
    #050505;
}

[data-theme="light"] .forgot-page {
  background:
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.06) 0%, transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.04) 0%, transparent 30%),
    #f5f5f7;
}

.forgot-container {
  display: flex;
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 12px 20px;
  animation: cardSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.forgot-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 40px;
  position: relative;
  overflow: hidden;
}

.forgot-brand::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  left: 50%;
  top: 32%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.22) 0%,
    rgba(139, 92, 246, 0.12) 35%,
    transparent 70%
  );
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  animation: brandHaloPulse 6s ease-in-out infinite;
}

[data-theme="light"] .forgot-brand::before {
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.14) 0%,
    rgba(139, 92, 246, 0.08) 35%,
    transparent 70%
  );
}

.forgot-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.forgot-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-card);
  padding: 32px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .forgot-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.forgot-card-header {
  margin-bottom: 24px;
}

.forgot-card-header h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

[data-theme="light"] .forgot-card-header h2 {
  color: #1a1a2e;
}

.forgot-card-header p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

[data-theme="light"] .forgot-card-header p {
  color: var(--color-text-secondary);
}

.forgot-field {
  margin-bottom: 20px;
}

.forgot-field label {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

[data-theme="light"] .forgot-field label {
  color: rgba(0, 0, 0, 0.62);
}

.forgot-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.forgot-input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-icon-muted);
  pointer-events: none;
  transition: color 0.25s;
}

[data-theme="light"] .forgot-input-icon {
  color: var(--color-icon-muted);
}

.forgot-input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-input);
  color: #fff;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

[data-theme="light"] .forgot-input-wrapper input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}

.forgot-input-wrapper input::placeholder {
  color: var(--color-text-subtle);
}

[data-theme="light"] .forgot-input-wrapper input::placeholder {
  color: var(--color-text-subtle);
}

.forgot-input-wrapper input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .forgot-input-wrapper input:focus {
  background: rgba(0, 0, 0, 0.04);
  border-color: #8b5cf6;
}

.forgot-input-wrapper input:focus ~ .forgot-input-icon,
.forgot-input-wrapper input:focus + .forgot-input-icon {
  color: var(--color-brand-light);
}

.forgot-field.has-error .forgot-input-wrapper input {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.forgot-field.has-error .forgot-input-icon {
  color: var(--color-error);
}

.forgot-field.is-valid .forgot-input-wrapper input {
  border-color: rgba(139, 92, 246, 0.35);
}

.forgot-error-msg {
  display: block;
  color: var(--color-error);
  font-size: 0.72rem;
  margin-top: 4px;
  min-height: 1.2em;
  opacity: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.forgot-field.has-error .forgot-error-msg {
  opacity: 1;
  animation: shakeIn 0.3s ease;
}

.forgot-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-button);
  background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-dark) 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.3s, opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.forgot-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.forgot-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.forgot-back-link {
  text-align: center;
  margin-top: 20px;
}

.forgot-back-link p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.forgot-back-link a {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.forgot-back-link a:hover {
  color: var(--color-brand-light);
}

@media (max-width: 900px) {
  .forgot-container {
    flex-direction: column;
    max-width: 440px;
    height: auto;
    gap: 0;
  }
  .forgot-brand {
    flex: 0 0 auto;
    padding: 16px 20px 10px;
    gap: 4px;
  }
  .forgot-brand .register-alt-crown {
    width: 67px;
  }
  .forgot-form-side {
    flex: 1;
    width: 100%;
    padding: 8px 24px 16px;
  }
  .forgot-card {
    padding: 18px 20px;
    max-width: 100%;
  }
  .forgot-card-header h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .forgot-brand {
    padding: 10px 12px 4px;
  }
  .forgot-brand .register-alt-crown {
    width: 53px;
  }
  .forgot-card {
    padding: 14px 14px;
  }
}

/* ===================== LEGAL PAGES ===================== */
.legal-page-container {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.11) 0%, transparent 36%),
    radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.09) 0%, transparent 32%),
    radial-gradient(circle at 50% 75%, rgba(88, 28, 135, 0.07) 0%, transparent 44%),
    #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  box-sizing: border-box;
}

[data-theme="light"] .legal-page-container {
  background:
    radial-gradient(circle at 15% 15%, rgba(139, 92, 246, 0.06) 0%, transparent 36%),
    radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.04) 0%, transparent 32%),
    #f5f5f7;
}

.legal-page-header {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 36px 18px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.legal-page-back-button {
  appearance: none;
  border: none;
  background: none;
  color: #a78bfa;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 2px 0;
  transition: color 0.16s;
}

[data-theme="light"] .legal-page-back-button {
  color: #7c3aed;
}

.legal-page-back-button:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

[data-theme="light"] .legal-page-back-button:hover {
  color: #6d28d9;
}

.legal-page-title {
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px 0;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

[data-theme="light"] .legal-page-title {
  color: #1a1a2e;
}

.legal-page-subtitle {
  display: flex;
  gap: 18px;
  color: #a78bfa;
  font-size: 1.08rem;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

[data-theme="light"] .legal-page-subtitle {
  color: #7c3aed;
}

.legal-page-content {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  background: rgba(40, 8, 65, 0.23);
  border: 1.5px solid rgba(139,92,246,0.09);
  border-radius: 20px;
  box-shadow: 0 10px 44px 0 rgba(139,92,246,0.13);
  padding: 38px 22px 34px;
  color: #f7f7ff;
  font-size: 1.09rem;
  overflow-y: auto;
  max-height: calc(100vh - 68px);
  line-height: 1.67;
  font-family: 'Inter', sans-serif;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.4) transparent;
}

[data-theme="light"] .legal-page-content {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
  color: #1a1a2e;
  scrollbar-color: rgba(124, 58, 237, 0.35) transparent;
}

.legal-page-content::-webkit-scrollbar {
  width: 8px;
}

.legal-page-content::-webkit-scrollbar-track {
  background: transparent;
}

.legal-page-content::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.35);
  border-radius: 999px;
}

[data-theme="light"] .legal-page-content::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.3);
}

.legal-page-content::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.55);
}

[data-theme="light"] .legal-page-content::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.5);
}

.legal-page-content strong {
  color: #d1c4e9;
  font-weight: 700;
  font-size: 1.03em;
}

[data-theme="light"] .legal-page-content strong {
  color: #4c1d95;
}

.legal-page-content p {
  margin-bottom: 1.75em;
  margin-top: 0;
  word-break: break-word;
}

.legal-page-content ul,
.legal-page-content ol {
  padding-left: 22px;
  margin: 12px 0 20px 0;
  color: #e9ddff;
}

[data-theme="light"] .legal-page-content ul,
[data-theme="light"] .legal-page-content ol {
  color: rgba(0, 0, 0, 0.7);
}

.legal-page-content li {
  margin-bottom: 0.45em;
}

.legal-page-content table.legal-table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0 20px 0;
  background: rgba(55,14,99,0.13);
  border: 1.5px solid rgba(139,92,246,0.16);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.99em;
  color: #e0e7ff;
}

[data-theme="light"] .legal-page-content table.legal-table {
  background: rgba(139, 92, 246, 0.04);
  border-color: rgba(139, 92, 246, 0.16);
  color: #1a1a2e;
}

.legal-table th, .legal-table td {
  border: 1px solid rgba(139,92,246,0.09);
  padding: 7px 10px;
  text-align: left;
}

[data-theme="light"] .legal-table th,
[data-theme="light"] .legal-table td {
  border-color: rgba(139, 92, 246, 0.12);
}

.legal-table thead th {
  background: rgba(139,92,246,0.16);
  color: #fff;
  font-weight: 700;
}

[data-theme="light"] .legal-table thead th {
  background: rgba(139, 92, 246, 0.12);
  color: #1a1a2e;
}

.legal-table tr:nth-child(even) td {
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .legal-table tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.03);
}

.legal-page-footer-links {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: rgba(167, 139, 250, 0.7);
  font-size: 0.95rem;
}

[data-theme="light"] .legal-page-footer-links {
  color: rgba(124, 58, 237, 0.7);
  border-top-color: rgba(139, 92, 246, 0.2);
}

.legal-page-footer-links button {
  background: none;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0;
}

[data-theme="light"] .legal-page-footer-links button {
  color: #7c3aed;
}

.legal-page-footer-links button:hover {
  color: #c4b5fd;
  text-decoration: underline;
}

[data-theme="light"] .legal-page-footer-links button:hover {
  color: #6d28d9;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .login-page {
    min-height: 100vh;
    min-height: 100dvh;
    align-items: flex-start;
  }
  .container {
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .brand {
    flex: 0 0 auto;
    padding: 16px 24px 8px;
    gap: 6px;
  }
  .crown {
    width: 90px;
  }
  .crown-secret-box {
    top: 126px;
  }
  .brand-divider {
    display: none;
  }
  .brand-text {
    width: 240px;
    height: 60px;
  }
  .brand-title {
    font-size: 1.4rem;
    margin-bottom: 2px;
  }
  .brand-tagline {
    font-size: 0.7rem;
    height: 2.4em;
  }
  .bg-deco { opacity: 0.5; }
  .form-side {
    flex: 1;
    width: 100%;
    padding: 8px 24px 16px;
  }
  .login-card {
    padding: 18px 20px;
    max-width: 100%;
    border-radius: 20px;
  }
  .card-header { margin-bottom: 14px; }
  .card-header h2 { font-size: 1.2rem; }
  .card-header p { font-size: 0.78rem; }
  .field { margin-bottom: 10px; }
  .input-wrapper input { padding: 9px 12px 9px 38px; font-size: 0.82rem; }
  .row-between { margin-bottom: 10px; }
  .btn-login { padding: 10px; min-height: 36px; font-size: 0.85rem; }
  .strength-meter { margin-top: 3px; }
  .social-buttons { flex-direction: row; gap: 8px; }
  .btn-social { padding: 8px; font-size: 0.78rem; }
  .divider { margin: 12px 0; }
  .signup-text { margin-top: 10px; font-size: 0.76rem; }
  .login-footer { margin-top: 8px; }
  .login-footer p { font-size: 0.62rem; }
  .footer-line { width: 24px; }

  /* Register responsive */
  .register-alt-page { align-items: flex-start; }
  .register-alt-container {
    flex-direction: column;
    max-width: 440px;
    height: auto;
    gap: 0;
  }
  .register-alt-brand {
    flex: 0 0 auto;
    border-radius: 28px 28px 0 0;
    padding: 16px 20px 10px;
    border-right: 1px solid rgba(139, 92, 246, 0.12);
    border-bottom: none;
    gap: 4px;
  }
  .register-alt-crown { width: 60px; }
  .register-alt-divider { margin: 6px 0; }
  .register-alt-brand-title { font-size: 1.4rem; }
  .register-alt-brand-text { margin: 4px 0 10px; }
  .register-alt-tagline { font-size: 0.7rem; height: 2.2em; }
  .register-alt-form-side { flex: 1; min-height: 0; overflow: hidden; }
  .register-alt-card {
    border-radius: var(--radius-card);
    padding: 16px 20px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    max-width: 100%;
  }
  .register-alt-card-header { margin-bottom: 14px; }
  .register-alt-card-header h2 { font-size: 1.2rem; }
  .register-alt-field { margin-bottom: 8px; }
  .register-alt-input-wrapper input { padding: 9px 12px 9px 38px; font-size: 0.82rem; }
  .register-alt-btn { padding: 10px; min-height: 38px; font-size: 0.85rem; margin-top: 10px; }
  .register-alt-terms-notice { margin: 6px 0 8px; }
  .register-alt-divider-text { margin: 12px 0 10px; }
  .register-alt-social-buttons { gap: 8px; }
  .register-alt-btn-social { padding: 8px; font-size: 0.78rem; }
  .register-alt-login-text { margin-top: 10px; }
}

@media (max-width: 480px) {
  .brand { padding: 10px 12px 4px; gap: 4px; }
  .crown { width: 70px; }
  .crown-secret-box { top: 72px; padding: 10px 12px; gap: 4px; }
  .brand-text { width: 100%; height: 50px; }
  .brand-title { font-size: 1.2rem; }
  .brand-tagline { font-size: 0.62rem; height: 2em; padding: 0 8px; }
  .bg-deco { opacity: 0.2; }
  .form-side { padding: 6px 14px 12px; }
  .login-card { padding: 14px 14px; border-radius: 16px; }
  .card-header { margin-bottom: 10px; }
  .card-header h2 { font-size: 1.1rem; }
  .card-header p { font-size: 0.72rem; }
  .field { margin-bottom: 8px; }
  .input-wrapper input { padding: 8px 12px 8px 36px; font-size: 0.8rem; }
  .row-between { margin-bottom: 8px; }
  .btn-login { padding: 9px; min-height: 34px; font-size: 0.82rem; }
  .social-buttons { flex-direction: row; gap: 6px; }
  .btn-social { padding: 7px; font-size: 0.75rem; }
  .divider { margin: 8px 0; }
  .signup-text { margin-top: 8px; font-size: 0.72rem; }
  .login-footer { margin-top: 6px; }
  .login-footer p { font-size: 0.58rem; }
  .footer-line { width: 20px; }

  /* Register mobile */
  .register-alt-container { padding: 8px; max-width: 100%; }
  .register-alt-card { padding: 14px 14px; }
  .register-alt-brand { padding: 12px 14px 8px; }
  .register-alt-crown { width: 48px; }
  .register-alt-input-wrapper input { padding: 8px 12px 8px 36px; font-size: 0.8rem; }
  .register-alt-input-icon { left: 12px; width: 16px; height: 16px; }
  .register-alt-btn { padding: 9px; min-height: 36px; font-size: 0.82rem; }
  .register-alt-card-header h2 { font-size: 1.1rem; }
  .register-alt-card-header p { font-size: 0.72rem; }
  .register-alt-divider-text { margin: 8px 0 6px; }
}

@media (max-width: 820px) {
  .legal-page-header, .legal-page-content { max-width: 97vw; padding-left: 6vw; padding-right: 6vw; }
}

@media (max-width: 520px) {
  .legal-page-title, .legal-page-header { font-size: 1.18rem; padding-top: 19px; }
  .legal-page-content { padding: 17px 6vw 18px; font-size: 0.97rem; }
}

@media (min-width: 901px) {
  .register-alt-page { padding: 0; }
  .register-alt-container { max-width: 1100px; min-height: 100vh; min-height: 100dvh; padding: 0; }
  .register-alt-brand { flex: 1; padding: 32px 40px; background: transparent; border: 0; border-radius: 0; gap: 12px; }
  .register-alt-crown { width: 130px; filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.5)); }
  .register-alt-divider { margin: 0; }
  .register-alt-brand-text { width: 280px; height: 110px; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
  .register-alt-brand-title { font-size: 2.2rem; margin: 0 0 8px; }
  .register-alt-tagline { height: 3.2em; margin: 0; padding: 0 12px; font-size: 0.82rem; line-height: 1.45; }
  .register-alt-card { max-width: 400px; padding: 18px 32px; border-radius: var(--radius-card); border-color: rgba(255, 255, 255, 0.06); background: rgba(255, 255, 255, 0.03); box-shadow: none; }
  .register-alt-card-header { text-align: left; margin-bottom: 12px; }
  .register-alt-card-header h2 { font-size: 1.5rem; margin-bottom: 4px; }
  .register-alt-card-header p { font-size: 0.85rem; }
  .register-alt-field { margin-bottom: 8px; }
  .register-alt-field label { font-size: 0.68rem; margin-bottom: 4px; color: rgba(255, 255, 255, 0.4); }
  .register-alt-input-wrapper input { min-height: 34px; padding: 8px 40px 8px 44px; font-size: 0.82rem; border-radius: var(--radius-input); }
  .register-alt-terms-notice { margin: 6px 0 8px; }
  .register-alt-terms-notice p { font-size: 0.62rem; line-height: 1.25; }
  .register-alt-btn { min-height: 40px; padding: 8px; margin-top: 6px; font-size: 0.84rem; border-radius: var(--radius-button); }
  .register-alt-divider-text { margin: 10px 0 8px; }
  .register-alt-divider-text span { font-size: 0.6rem; }
  .register-alt-btn-social { min-height: 34px; padding: 8px; font-size: 0.76rem; border-radius: var(--radius-button); }
  .register-alt-login-text { margin-top: 10px; font-size: 0.74rem; }
  .register-alt-form-side { flex: 0 0 500px; padding: 24px; }
}

/* ===================== ALERTA DE ERRO (FIREBASE) ===================== */
.form-alert {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.form-alert[data-type="info"] {
  background: rgba(59, 130, 246, 0.10);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

[data-theme="light"] .form-alert {
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

[data-theme="light"] .form-alert[data-type="info"] {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
}
