/* 
 * auth_login.css - Premium Dark Gold Theme
 * Shared by Login, Primeiro Acesso, and Cadastro pages
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

:root {
  --bg-dark: #050505;
  --card-bg: rgba(255, 255, 255, 0.025);
  --line: rgba(255, 255, 255, 0.08);
  --gold: #D4AF37;
  --gold-light: #f5d675;
  --gold-gradient: linear-gradient(135deg, #FFF 0%, #D4AF37 100%);
  --text-primary: #f5f5f7;
  --text-muted: #6e6e73;
  --danger: #ff453a;
  --success: #32d74b;
  --glass: blur(30px) saturate(200%);
  --swift: cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.login-wrapper {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ───── Background Effects ───── */
.background-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: -100%;
  width: 300%;
  height: 300%;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.15;
  pointer-events: none;
  z-index: 10;
  animation: grainShift 8s steps(10) infinite;
}

@keyframes grainShift {

  0%,
  100% {
    transform: translate(0, 0)
  }

  10% {
    transform: translate(-5%, -10%)
  }

  20% {
    transform: translate(-15%, 5%)
  }

  30% {
    transform: translate(7%, -25%)
  }

  40% {
    transform: translate(-5%, 25%)
  }

  50% {
    transform: translate(-15%, 10%)
  }

  60% {
    transform: translate(15%, 0%)
  }

  70% {
    transform: translate(0%, 15%)
  }

  80% {
    transform: translate(3%, 35%)
  }

  90% {
    transform: translate(-10%, 10%)
  }
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform, opacity;
}

.glow-1 {
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.12;
  animation: glowFloat1 15s ease-in-out infinite alternate;
}

.glow-2 {
  bottom: -20%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
  opacity: 0.08;
  animation: glowFloat2 18s ease-in-out infinite alternate;
}

.glow-3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30vw;
  height: 30vw;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.05;
  animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowFloat1 {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(-8%, 5%) scale(1.1);
  }
}

@keyframes glowFloat2 {
  from {
    transform: translate(0, 0) scale(1.1);
  }

  to {
    transform: translate(10%, -8%) scale(1.2);
  }
}

@keyframes glowDrift1 {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(-60px, 40px) scale(1.1);
  }
}

@keyframes glowDrift2 {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(40px, -60px) scale(1.15);
  }
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.02;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 0.06;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* ───── Floating Particles ───── */
.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s linear infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    transform: translateY(-20vh) scale(1);
  }
}

/* ───── Page Layout ───── */
.page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* ───── Card ───── */
.card {
  width: 100%;
  max-width: 420px;
  background: rgba(10, 10, 12, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 3.5rem 2.75rem;
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 40px 100px rgba(0, 0, 0, 0.9),
    0 0 80px rgba(212, 175, 55, 0.02);
  animation: cardReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: shimmerLine 4s ease-in-out infinite;
}

@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmerLine {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* ───── Brand ───── */
.brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo-container {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.logo-svg {
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
  animation: logoFloat 5s ease-in-out infinite;
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

.title-gradient,
.brand h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle,
.brand p {
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 5px;
  font-weight: 600;
}

/* ───── Content ───── */
.content {
  margin-top: 1rem;
}

/* ───── Form Elements ───── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label,
.label span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i,
.input-wrapper svg {
  position: absolute;
  right: 16px;
  color: rgba(255, 255, 255, 0.15);
  width: 16px;
  height: 16px;
  pointer-events: none;
  transition: color 0.3s;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s var(--swift);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.03);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.08), 0 0 20px rgba(212, 175, 55, 0.05);
}

input:focus~i,
input:focus~svg {
  color: var(--gold);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.12);
}

/* ───── Buttons ───── */
.btn,
button[type="submit"],
#submit-id-btn,
#submit-reg-btn {
  width: 100%;
  margin-top: 0.75rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: black;
  border: none;
  border-radius: 18px;
  padding: 1.1rem;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s var(--swift);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.2);
  position: relative;
  overflow: hidden;
}

.btn::after,
button[type="submit"]::after,
#submit-id-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn:hover::after,
button[type="submit"]:hover::after,
#submit-id-btn:hover::after {
  transform: translateX(100%);
}

.btn:hover,
button[type="submit"]:hover,
#submit-id-btn:hover,
#submit-reg-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
  filter: brightness(1.1);
}

.btn:active,
button[type="submit"]:active,
#submit-id-btn:active,
#submit-reg-btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ───── Messages ───── */
.msg {
  display: none;
  border-radius: 14px;
  padding: 1rem;
  font-size: 0.8rem;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.msg.show {
  display: block;
  animation: shake 0.4s var(--swift);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

.msg.error,
#id-error:not(.hidden),
#reg-error:not(.hidden) {
  background: rgba(255, 69, 58, 0.08);
  border: 1px solid rgba(255, 69, 58, 0.15);
  color: var(--danger);
}

.msg.ok {
  background: rgba(50, 215, 75, 0.08);
  border: 1px solid rgba(50, 215, 75, 0.15);
  color: var(--success);
}

/* ───── Footer Link ───── */
.footer-login {
  margin-top: 2rem;
  text-align: center;
}

.link,
.footer-login button {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.3s;
  background: none;
  border: none;
  cursor: pointer;
}

.link:hover,
.footer-login button:hover {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

/* ───── Loading ───── */
.loading {
  color: var(--gold);
  text-align: center;
  padding: 2rem 0;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: loadPulse 1.8s ease-in-out infinite;
}

@keyframes loadPulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

/* ───── Validation Overlay ───── */
#validation-overlay {
  backdrop-filter: blur(25px) saturate(200%);
}

#validation-overlay>div:last-child {
  background: rgba(10, 10, 12, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
}

/* ───── Tip Container ───── */
.tip-container {
  margin: 0.5rem 0 1rem;
}

.tip-container p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ───── Step transitions ───── */
#step-validar-id,
#step-cadastro,
#step-sucesso {
  animation: stepFade 0.5s var(--swift);
}

@keyframes stepFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ───── Gold text utility ───── */
.gold-text-gradient {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ───── Responsive ───── */
@media (max-width: 480px) {
  .card {
    padding: 2rem 1.5rem;
    border-radius: 24px;
    max-width: 100%;
  }

  .title-gradient,
  .brand h1 {
    font-size: 1.6rem;
  }
}