/* Login / sign-up screens: the bank's sky-blue hero, made friendlier with a piggy bank. */
body.auth {
  min-height: 100vh; min-height: 100dvh;
  background: linear-gradient(180deg, #3b9fe8 0%, #6fbdf2 30%, #b7e0fa 58%, #e4f3fd 72%, #f7f8fb 72.1%);
  display: flex; flex-direction: column;
}
.auth .hero {
  flex: 1 0 auto; display: flex; flex-direction: column; align-items: center;
  padding: calc(28px + env(safe-area-inset-top, 0px)) 24px 0; position: relative; overflow: hidden;
}
.auth .brand { font-family: "Nunito", var(--font); font-weight: 800; font-size: 17px; color: #0d3d73; letter-spacing: .02em; align-self: center; }
.auth .greet {
  font-family: "Nunito", var(--font); font-weight: 800; color: #14171c;
  font-size: clamp(34px, 9vw, 46px); line-height: 1.05; margin: 22px 0 6px; text-align: center;
}
.auth .sub { margin: 0; font-size: 16px; color: #16395f; text-align: center; max-width: 30ch; line-height: 1.4; }
.auth .piggy { width: min(78vw, 330px); height: auto; margin: 6px 0 -6px; }
.auth .hero.compact .piggy { width: min(46vw, 190px); }
.auth .hero.compact .greet { font-size: clamp(28px, 7.5vw, 36px); margin-top: 14px; }

/* sky dots, echoing the bank app's floating pixels */
.auth .hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(#ffffff 1.2px, transparent 1.6px), radial-gradient(#ffffff 1px, transparent 1.4px);
  background-size: 46px 46px, 73px 73px; background-position: 0 0, 20px 30px;
  mask-image: linear-gradient(#000, transparent 60%);
}

.auth .panel {
  position: relative; background: #f7f8fb; padding: 26px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  border-radius: 50% 50% 0 0 / 38px 38px 0 0; margin-top: -30px;
}
.auth .panel-inner { max-width: 400px; margin: 0 auto; }
.auth .panel h2 { font-family: "Nunito", var(--font); font-weight: 800; font-size: 22px; margin: 4px 0 4px; text-align: center; }
.auth .panel .lead { text-align: center; color: var(--slate); margin: 0 0 8px; line-height: 1.45; font-size: 15px; }

.auth .text-input { height: 54px; font-size: 17px; border-radius: 14px; background: #fff; }
.auth .pin-input {
  width: 100%; height: 62px; border: 1.5px solid var(--border); border-radius: 14px; background: #fff;
  text-align: center; font-size: 30px; letter-spacing: .7em; text-indent: .7em; font-weight: 700; color: var(--ink);
}
.auth .pin-input.wide { letter-spacing: .08em; text-indent: 0; font-size: 18px; font-weight: 500; text-align: left; padding: 0 16px; }
.auth .pin-input:focus { border-color: var(--blue-btn); outline: 0; }
.auth .pin-input::placeholder { color: #c9ccd2; letter-spacing: .35em; }
.auth .pin-input.wide::placeholder { letter-spacing: normal; }

.auth .btn-primary { height: 58px; font-size: 20px; margin-top: 22px; box-shadow: 0 6px 16px rgba(22, 100, 184, .28); }
.auth .subtle {
  display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap;
}
.auth .subtle a, .auth .subtle button {
  font-size: 15px; color: var(--slate); background: none; border: 0; padding: 8px 10px; border-radius: 10px;
  text-decoration: none; cursor: pointer;
}
.auth .subtle a:hover, .auth .subtle button:hover { background: #eceef2; }
.auth .subtle .dot { color: #c2c5cc; align-self: center; }
.auth .parent-toggle { display: block; margin: 8px auto 0; font-size: 13.5px; color: var(--muted); background: none; border: 0; padding: 6px 10px; cursor: pointer; border-radius: 8px; }
.auth .parent-toggle:hover { background: #eceef2; }

/* ---------- the piggy bank animation ---------- */
.piggy .coin { animation: coin-drop 3.2s cubic-bezier(.55, 0, .75, .4) infinite; transform-box: fill-box; transform-origin: center; }
.piggy .pig { animation: pig-bounce 3.2s ease-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.piggy .spark { animation: spark 3.2s ease-out infinite; transform-box: fill-box; transform-origin: center; opacity: 0; }
.piggy .spark.s2 { animation-delay: .06s; }
.piggy .spark.s3 { animation-delay: .12s; }
.piggy .tail { animation: tail-wag 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 100% 50%; }
.piggy .blink { animation: blink 6.4s infinite; transform-box: fill-box; transform-origin: center; }

@keyframes coin-drop {
  0% { transform: translateY(-120px) rotate(-20deg); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translateY(0) rotate(0deg); opacity: 1; }
  60% { transform: translateY(26px) scale(.9, .7); opacity: 1; }
  64%, 100% { transform: translateY(34px) scale(.8, .5); opacity: 0; }
}
@keyframes pig-bounce {
  0%, 52% { transform: translateY(0) scale(1, 1); }
  58% { transform: translateY(3px) scale(1.03, .96); }
  66% { transform: translateY(-8px) scale(.98, 1.03); }
  74% { transform: translateY(0) scale(1.01, .99); }
  80%, 100% { transform: translateY(0) scale(1, 1); }
}
@keyframes spark {
  0%, 56% { opacity: 0; transform: scale(.2); }
  64% { opacity: 1; transform: scale(1.1); }
  80%, 100% { opacity: 0; transform: scale(.6) translateY(-12px); }
}
@keyframes tail-wag {
  0%, 56%, 100% { transform: rotate(0deg); }
  62% { transform: rotate(18deg); }
  68% { transform: rotate(-12deg); }
  74% { transform: rotate(8deg); }
}
@keyframes blink {
  0%, 46%, 50%, 100% { transform: scaleY(1); }
  48% { transform: scaleY(.1); }
}
@media (prefers-reduced-motion: reduce) {
  .piggy .coin, .piggy .pig, .piggy .spark, .piggy .tail, .piggy .blink { animation: none; }
  .piggy .coin { opacity: 0; }
}
