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

/* ===== KEYFRAMES ===== */
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(3deg);
  }
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes bubble {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6);
  }
  20% {
    opacity: 0.55;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-130px) scale(1.1);
  }
}
@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}
@keyframes softPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(200, 120, 58, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(200, 120, 58, 0.12);
  }
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}
@keyframes pawPop {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-25deg);
  }
  65% {
    transform: scale(1.18) rotate(6deg);
  }
  100% {
    opacity: 0.25;
    transform: scale(1) rotate(0deg);
  }
}
@keyframes logoAppear {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(-15deg);
  }
  70% {
    transform: scale(1.12) rotate(4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}
@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1.08);
  }
}

:root {
  --cream: #fff5e4;
  --caramel: #c8783a;
  --mocha: #5c2e0e;
  --latte: #e8a87c;
  --cappuccino: #a0522d;
  --cream-dark: #f0d9b5;
  --cream-mid: #fae8cc;
  --cream-light: #fffbf4;
  --cream-bg: #fff8ee;
  --brown: #5c2e0e;
  --brown-mid: #8b5a3c;
  --brown-muted: #c4956a;
  --brown-hover: #3e1a08;
  --border: #f0d9b5;
}

body {
  font-family: "Nunito", "Inter", Arial, sans-serif;
  background: linear-gradient(135deg, #2c1203 0%, #5c2e0e 45%, #8b4513 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* ===== CARD ===== */
.login-card {
  width: 100%;
  max-width: 940px;
  min-height: 580px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 32px;
  overflow: hidden;
  box-shadow:
    0 32px 80px rgba(44, 18, 3, 0.6),
    0 0 0 1.5px rgba(200, 120, 58, 0.2);
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ===== POSTER ===== */
.poster {
  position: relative;
  background: linear-gradient(180deg, #3e1a08 0%, #5c2e0e 100%);
  overflow: hidden;
  animation: slideLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  opacity: 0.85;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(44, 18, 3, 0.05) 0%,
    rgba(44, 18, 3, 0.65) 100%
  );
}

.poster-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 38px;
}

.poster-logo {
  position: absolute;
  top: 32px;
  left: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: logoAppear 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.poster-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  animation: float 3.5s ease-in-out 1.2s infinite;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.poster-logo span {
  font-size: 22px;
  font-weight: 900;
  color: var(--cream);
  font-family: "Nunito", sans-serif;
  letter-spacing: -0.3px;
}

.poster-tagline {
  font-size: 30px;
  font-weight: 900;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 12px;
  animation: fadeUp 0.7s ease 0.7s both;
  font-family: "Nunito", sans-serif;
  letter-spacing: -0.5px;
}

.poster-tagline::after {
  font-size: 24px;
}

.poster-sub {
  font-size: 14px;
  color: rgba(255, 245, 228, 0.8);
  line-height: 1.65;
  animation: fadeUp 0.7s ease 0.9s both;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
}

/* ===== BOLHAS DE CAFÉ ===== */
.bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 245, 228, 0.5);
  pointer-events: none;
  animation: bubble var(--dur, 4s) ease-in var(--delay, 0s) infinite;
}

/* ===== PATINHA NO POSTER ===== */
.paw-poster {
  position: absolute;
  width: 56px;
  opacity: 0;
  pointer-events: none;
  filter: brightness(10);
  animation: pawPop 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 1s)
    forwards;
}

/* ===== FORM SIDE ===== */
.form-side {
  background: var(--cream-light);
  padding: 52px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  animation: slideRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
  position: relative;
  overflow: hidden;
}

/* Decoração fofa de fundo */
.form-side::before {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 80px;
  opacity: 0.04;
  pointer-events: none;
  transform: rotate(-15deg);
}

.form-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--mocha);
  margin-bottom: 6px;
  animation: fadeUp 0.6s ease 0.4s both;
  font-family: "Nunito", sans-serif;
  letter-spacing: -0.5px;
}

.form-title::before {
  font-size: 22px;
}

.form-subtitle {
  font-size: 13.5px;
  color: var(--brown-muted);
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease 0.5s both;
  font-family: "Nunito", sans-serif;
  font-weight: 600;
}

/* ===== FORM GROUPS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  animation: fadeUp 0.5s ease var(--delay, 0.6s) both;
}

.form-group:nth-child(1) {
  --delay: 0.55s;
}
.form-group:nth-child(2) {
  --delay: 0.65s;
}

label {
  font-size: 13px;
  font-weight: 800;
  color: var(--mocha);
  font-family: "Nunito", sans-serif;
}

/* ===== INPUT WRAP ===== */
.input-wrap {
  position: relative;
}

.icon-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--brown-muted);
  pointer-events: none;
  line-height: 1;
}

.input-wrap input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  border-radius: 50px;
  border: 2px solid var(--cream-dark);
  background: var(--cream);
  font-size: 14px;
  color: var(--mocha);
  font-family: "Nunito", sans-serif;
  font-weight: 600;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.input-wrap input:focus {
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(200, 120, 58, 0.12);
  transform: scale(1.01);
}

.input-wrap input::placeholder {
  color: var(--brown-muted);
  font-weight: 500;
}

.input-wrap input.shake {
  animation: shake 0.4s ease;
}

/* ===== TOGGLE SENHA ===== */
.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--brown-muted);
  display: flex;
  align-items: center;
  line-height: 1;
  transition: color 0.15s;
}
.toggle-pw:hover {
  color: var(--caramel);
}
.toggle-pw svg {
  width: 17px;
  height: 17px;
}

/* ===== FORGOT ===== */
.forgot {
  text-align: right;
  margin-top: -8px;
  margin-bottom: 12px;
}
.forgot a {
  font-size: 12.5px;
  color: var(--brown-mid);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
}
.forgot a:hover {
  color: var(--caramel);
}

/* ===== BTN LOGIN ===== */
.btn-login {
  width: 100%;
  padding: 15px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(
    135deg,
    var(--caramel) 0%,
    var(--cappuccino) 100%
  );
  color: var(--cream);
  font-size: 15px;
  font-weight: 900;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  margin-top: 4px;
  letter-spacing: 0.3px;
  animation: fadeUp 0.5s ease 0.75s both;
  box-shadow: 0 6px 20px rgba(200, 120, 58, 0.4);
}

.btn-login:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(200, 120, 58, 0.55);
}
.btn-login:active {
  transform: translateY(0) scale(0.98);
}

/* ===== DIVIDER ===== */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--brown-muted);
  font-size: 12px;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1.5px;
  background: var(--cream-dark);
}

/* ===== BTN GOOGLE ===== */
.btn-google {
  width: 100%;
  padding: 12px 16px;
  border-radius: 50px;
  border: 2px solid var(--cream-dark);
  background: var(--cream-light);
  color: var(--mocha);
  font-size: 14px;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    all 0.2s,
    transform 0.15s;
  margin-bottom: 10px;
  animation:
    fadeUp 0.5s ease 0.85s both,
    softPulse 2.5s ease 1.8s infinite;
}
.btn-google:hover {
  border-color: var(--caramel);
  background: #fff1e0;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(200, 120, 58, 0.2);
}
.btn-google:active {
  transform: translateY(0) scale(0.98);
}
.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ===== BTN GUEST ===== */
.btn-guest {
  width: 100%;
  padding: 12px;
  border-radius: 50px;
  border: 2px solid var(--cream-dark);
  background: transparent;
  color: var(--brown-mid);
  font-size: 14px;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
  cursor: pointer;
  transition:
    all 0.2s,
    transform 0.15s;
  animation: fadeUp 0.5s ease 0.95s both;
}
.btn-guest:hover {
  border-color: var(--caramel);
  color: var(--caramel);
  background: #fff1e0;
  transform: translateY(-2px);
}
.btn-guest:active {
  transform: translateY(0) scale(0.98);
}

/* ===== SIGNUP ROW ===== */
.signup-row {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--brown-muted);
  font-family: "Nunito", sans-serif;
  font-weight: 600;
}
.signup-row a {
  color: var(--caramel);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.signup-row a:hover {
  text-decoration: underline;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: linear-gradient(135deg, var(--mocha), var(--brown-hover));
  color: var(--cream);
  padding: 14px 22px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(44, 18, 3, 0.45);
  z-index: 9999;
  opacity: 0;
  transform: translateY(14px) scale(0.95);
  transition:
    opacity 0.28s,
    transform 0.28s;
  pointer-events: none;
  font-family: "Nunito", sans-serif;
  border: 1.5px solid rgba(200, 120, 58, 0.3);
}
.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 660px) {
  .login-card {
    grid-template-columns: 1fr;
  }
  .poster {
    display: none;
  }
  .form-side {
    padding: 40px 28px;
  }
}
