:root {
  --bg-dark: #030712;
  --bg-card: rgba(8, 18, 38, 0.78);
  --cyan-glow: #00f2fe;
  --blue-glow: #3b82f6;
  --blue-vibrant: #2563eb;
  --indigo-dark: #1e1b4b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-subtle: rgba(56, 189, 248, 0.2);
  --border-focus: #38bdf8;
  --danger-color: #ef4444;
  --success-color: #10b981;
  --font-main: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Rajdhani", sans-serif;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
  perspective: 1000px;
}

/* =========================================
   WALLPAPER E EFEITOS DE FUNDO
========================================= */

.bg-wallpaper {
  position: fixed;
  inset: 0;
  background: url('../logo.png') center center no-repeat;
  background-size: cover;
  filter: blur(28px) brightness(0.22) saturate(1.4);
  opacity: 0.65;
  transform: scale(1.1);
  pointer-events: none;
  z-index: 0;
}

.bg-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  pointer-events: none;
  z-index: 1;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 1;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 70%);
  top: -100px;
  left: 15%;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.2), transparent 70%);
  bottom: -80px;
  right: 15%;
  animation: floatOrb 10s ease-in-out infinite alternate-reverse;
}

.orb-3 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.16), transparent 70%);
  top: 40%;
  left: 60%;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -25px) scale(1.08); }
  100% { transform: translate(-20px, 35px) scale(0.95); }
}

/* =========================================
   CONTAINER PRINCIPAL
========================================= */

.login-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =========================================
   LOGO E CABEÇALHO
========================================= */

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  width: 100%;
}

.main-logo-free {
  width: min(320px, 92vw);
  height: auto;
  max-height: 140px;
  object-fit: contain;
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 18px rgba(0, 242, 254, 0.35));
  transition: transform 0.3s ease, filter 0.3s ease;
  animation: logoFloat 4s ease-in-out infinite alternate;
}

.main-logo-free:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 28px rgba(0, 242, 254, 0.55));
}

@keyframes logoFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

/* =========================================
   CARD DE AUTENTICAÇÃO (GLASSMORPHISM)
========================================= */

.auth-card {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(14, 165, 233, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
}

/* =========================================
   TABS DE NAVEGAÇÃO
========================================= */

.nav-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(3, 10, 24, 0.7);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.12);
  margin-bottom: 22px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 14px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
}

/* =========================================
   ALERTAS
========================================= */

.alert-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.4;
  margin-bottom: 18px;
  animation: slideDown 0.3s ease;
}

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

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.alert-error i {
  color: #ef4444;
  font-size: 18px;
  flex-shrink: 0;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.alert-success i {
  color: #10b981;
  font-size: 18px;
  flex-shrink: 0;
}

/* =========================================
   PAINÉIS E INPUTS
========================================= */

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.input-field label {
  font-size: 12.5px;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.02em;
}

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

.input-control .input-icon {
  position: absolute;
  left: 15px;
  color: #64748b;
  font-size: 14px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-control input {
  width: 100%;
  padding: 13px 42px 13px 40px;
  background: rgba(4, 12, 28, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 14.5px;
  outline: none;
  transition: all 0.2s ease;
}

.input-control input::placeholder {
  color: #475569;
  font-size: 13.5px;
}

.input-control input:focus {
  border-color: var(--border-focus);
  background: rgba(4, 14, 34, 0.95);
  box-shadow: 
    0 0 0 3.5px rgba(56, 189, 248, 0.2),
    0 0 15px rgba(56, 189, 248, 0.15);
}

.input-control input:focus + .input-icon,
.input-control input:focus ~ .input-icon {
  color: #38bdf8;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: color 0.2s ease;
}

.toggle-pass:hover {
  color: #38bdf8;
}

/* =========================================
   BOTÕES DE SUBMIT
========================================= */

.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #2563eb 50%, #1d4ed8);
  color: #fff;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 
    0 8px 24px rgba(37, 99, 235, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 12px 30px rgba(37, 99, 235, 0.6),
    0 0 20px rgba(0, 242, 254, 0.35);
}

.btn-submit:hover::after {
  left: 100%;
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-register {
  background: linear-gradient(135deg, #059669, #0d9488 50%, #0284c7);
  box-shadow: 
    0 8px 24px rgba(13, 148, 136, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-register:hover {
  box-shadow: 
    0 12px 30px rgba(13, 148, 136, 0.6),
    0 0 20px rgba(20, 184, 166, 0.4);
}

/* =========================================
   RESPONSIVIDADE
========================================= */

@media (max-width: 480px) {
  .login-wrapper {
    max-width: 100%;
  }

  .auth-card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .brand-title {
    font-size: 28px;
  }

  .logo-container {
    width: 95px;
    height: 95px;
  }
}
