/* ======================================================
   RESET / BASE
====================================================== */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Roboto", Arial, sans-serif;
  background: #f6f6f6;
}

/* ======================================================
   CONTAINER LOGIN
====================================================== */
.ml-auth-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 28px;
}

.ml-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -1px;
}

/* ======================================================
   ERRO
====================================================== */
.ml-error-box {
  background: #ffe4e6;
  color: #9f1239;
  border: 3px solid #000;
  padding: 14px 18px;
  font-weight: bold;
  box-shadow: 6px 6px 0 #000;
}

/* ======================================================
   FORM
====================================================== */
.ml-form {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
  align-items: center;
}

/* ======================================================
   INPUT 3D CONTAINER
====================================================== */
.input__container {
  position: relative;
  background: #f0f0f0;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 4px solid #000;
  width: 100%;
  max-width: 360px;
  transition: all 400ms cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  transform: rotateX(10deg) rotateY(-10deg);
  perspective: 1000px;
  box-shadow: 10px 10px 0 #000;
}

.input__container:hover {
  transform: rotateX(5deg) rotateY(1deg) scale(1.05);
  box-shadow:
    25px 25px 0 -5px #e9b50b,
    25px 25px 0 0 #000;
}

/* ======================================================
   SHADOW
====================================================== */
.shadow__input {
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateZ(-50px);
  background: linear-gradient(
    45deg,
    rgba(255, 107, 107, 0.4) 0%,
    rgba(255, 107, 107, 0.1) 100%
  );
  filter: blur(20px);
}

/* ======================================================
   BOTÃO ÍCONE
====================================================== */
.input__button__shadow {
  cursor: pointer;
  border: 3px solid #000;
  background: #e9b50b;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  transform: translateZ(20px);
  transition: all 400ms cubic-bezier(0.23, 1, 0.32, 1);
}

.input__button__shadow:hover {
  transform: translateZ(10px) translateX(-5px) translateY(-5px);
  box-shadow: 5px 5px 0 #000;
}

.input__button__shadow svg {
  fill: #000;
  width: 24px;
  height: 24px;
}

/* ======================================================
   INPUT
====================================================== */
.input__search {
  flex: 1;
  outline: none;
  border: 3px solid #000;
  padding: 15px;
  font-size: 18px;
  background: #fff;
  color: #000;
  transform: translateZ(10px);
  transition: all 400ms cubic-bezier(0.23, 1, 0.32, 1);
  font-weight: bold;
  letter-spacing: -0.5px;
}

.input__search::placeholder {
  color: #666;
  text-transform: uppercase;
}

.input__search:hover,
.input__search:focus {
  background: #f0f0f0;
  transform: translateZ(20px) translateX(-5px) translateY(-5px);
  box-shadow: 5px 5px 0 #000;
}

/* ======================================================
   LABEL 3D (USERNAME / PASSWORD)
====================================================== */
.input__container::before {
  content: attr(data-label);
  position: absolute;
  top: -16px;
  left: 18px;
  background: #e9b50b;
  color: #000;
  font-weight: 900;
  padding: 6px 12px;
  font-size: 13px;
  letter-spacing: 1px;
  border: 3px solid #000;
  transform: translateZ(50px);
}

/* ======================================================
   BOTÃO LOGIN
====================================================== */
.ml-form-actions {
  margin-top: 12px;
}

.ml-btn.primary {
  background: #000;
  color: #fff;
  border: 3px solid #000;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 6px 6px 0 #e9b50b;
  transition: all 0.25s ease;
}

.ml-btn.primary:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0 #e9b50b;
}

/* ======================================================
   RESPONSIVO
====================================================== */
@media (max-width: 480px) {
  .input__container {
    transform: none;
  }

  .input__container:hover {
    transform: scale(1.02);
  }
}
.ml-subtitle {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.75;
}
/* ======================================================
   TÍTULO ANIMADO
====================================================== */

.ml-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -1px;
  position: relative;
  animation: titleEnter 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.ml-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 0;
  height: 4px;
  background: #e9b50b;
  transform: translateX(-50%);
  animation: underlineGrow 0.6s ease forwards;
  animation-delay: 0.6s;
}

/* brilho sutil */
.ml-title:hover {
  text-shadow:
    0 0 0 #000,
    0 0 12px rgba(233, 181, 11, 0.6);
}

/* ======================================================
   SUBTÍTULO
====================================================== */

.ml-subtitle {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.9s;
}

/* ======================================================
   KEYFRAMES
====================================================== */

@keyframes titleEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes underlineGrow {
  from {
    width: 0;
  }
  to {
    width: 120px;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ======================================================
   BOTÃO LOGIN — LOADING READY
====================================================== */

.ml-btn.primary {
  position: relative;
  overflow: hidden;
}

.ml-btn.primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

.ml-btn.primary.loading::after {
  content: "";
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  position: absolute;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ======================================================
   TOGGLE PASSWORD
====================================================== */

.input__container.password-visible .input__search {
  letter-spacing: 2px;
}

.input__container.password-visible .input__button__shadow {
  background: #000;
}

.input__container.password-visible svg {
  fill: #e9b50b;
}
