:root {
  --auth-ink: #30286f;
  --auth-muted: #7e75a8;
  --auth-purple: #7957ef;
  --auth-purple-dark: #5c3fce;
  --auth-pink: #ff7897;
  --auth-pink-soft: #ffd7e3;
  --auth-lilac: #c5adff;
  --auth-white: #fffaff;
  --auth-line: rgba(111, 83, 188, 0.14);
  --auth-shadow: 0 30px 80px rgba(79, 52, 155, 0.22);
}

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

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow-x: hidden;
  color: var(--auth-ink);
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 13% 12%, rgba(255, 255, 255, 0.88), transparent 24%),
    radial-gradient(circle at 88% 86%, rgba(255, 229, 236, 0.86), transparent 28%),
    linear-gradient(145deg, #a895fb 0%, #d2b2fa 44%, #ffc3d0 100%);
}

button,
input {
  font: inherit;
}

.auth-shell {
  position: relative;
  width: min(100%, 440px);
  min-height: 810px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 34px;
  background:
    radial-gradient(circle at 14% 17%, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(155deg, #a892fb 0%, #c3a7f6 38%, #ffc1ce 100%);
  box-shadow: var(--auth-shadow);
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
}

.auth-shell::before {
  width: 190px;
  height: 190px;
  top: -88px;
  right: -68px;
  background: rgba(255, 255, 255, 0.22);
}

.auth-shell::after {
  width: 220px;
  height: 220px;
  bottom: -115px;
  left: -90px;
  background: rgba(113, 76, 221, 0.18);
}

.auth-hero {
  position: relative;
  height: 276px;
  padding: 18px 22px 0;
}

.brand-pill {
  position: absolute;
  top: 17px;
  left: 50%;
  z-index: 5;
  display: grid;
  width: 132px;
  height: 48px;
  padding: 7px 14px;
  place-items: center;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 24px rgba(87, 55, 169, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-pill img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hen-hero {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: -8px;
  width: 244px;
  max-height: 225px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 18px rgba(73, 48, 145, 0.22));
  user-select: none;
  -webkit-user-drag: none;
}

.hero-orb {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 59px;
  height: 59px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 21px;
  color: #fff;
  font-size: 24px;
  background: linear-gradient(145deg, rgba(154, 115, 243, 0.94), rgba(111, 76, 211, 0.9));
  box-shadow:
    0 16px 26px rgba(83, 50, 159, 0.24),
    inset 0 2px 3px rgba(255, 255, 255, 0.38);
}

.hero-orb--user {
  top: 91px;
  left: 29px;
  transform: rotate(-8deg);
}

.hero-orb--lock {
  top: 82px;
  right: 28px;
  transform: rotate(8deg);
}

.hero-check {
  position: absolute;
  right: 38px;
  bottom: 12px;
  z-index: 5;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.54);
  border-radius: 50%;
  color: #fff;
  font-size: 19px;
  background: linear-gradient(145deg, #ff8fa6, #f5698c);
  box-shadow:
    0 12px 22px rgba(173, 73, 117, 0.24),
    inset 0 2px 4px rgba(255, 255, 255, 0.42);
}

.sparkle {
  position: absolute;
  z-index: 1;
  color: #ffe6a8;
  text-shadow: 0 3px 10px rgba(139, 96, 38, 0.15);
  animation: authTwinkle 2.8s ease-in-out infinite;
}

.sparkle--one {
  top: 76px;
  left: 115px;
  font-size: 22px;
}

.sparkle--two {
  top: 111px;
  right: 103px;
  font-size: 15px;
  animation-delay: 0.8s;
}

.sparkle--three {
  top: 154px;
  left: 44px;
  font-size: 15px;
  animation-delay: 1.35s;
}

@keyframes authTwinkle {
  0%,
  100% {
    opacity: 0.62;
    transform: scale(0.88);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

.auth-card {
  position: relative;
  z-index: 7;
  min-height: 555px;
  margin: -6px 24px 24px;
  padding: 30px 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 35px;
  background: linear-gradient(165deg, rgba(255, 250, 255, 0.94), rgba(255, 232, 241, 0.92));
  box-shadow:
    0 24px 42px rgba(81, 51, 159, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.auth-title {
  color: var(--auth-ink);
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  letter-spacing: -0.8px;
}

.auth-subtitle {
  margin-top: 7px;
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

.auth-form {
  margin-top: 28px;
}

.field {
  margin-bottom: 14px;
}

.input-wrap {
  position: relative;
  display: flex;
  height: 59px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  background: rgba(255, 250, 255, 0.82);
  box-shadow:
    0 11px 20px rgba(101, 69, 166, 0.1),
    inset 0 0 0 1px rgba(123, 89, 203, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-wrap:focus-within {
  border-color: rgba(125, 87, 230, 0.52);
  box-shadow:
    0 0 0 4px rgba(125, 87, 230, 0.11),
    0 13px 23px rgba(101, 69, 166, 0.12);
  transform: translateY(-1px);
}

.input-icon {
  display: grid;
  width: 56px;
  height: 100%;
  flex: 0 0 56px;
  place-items: center;
  color: #8170bc;
  font-size: 18px;
}

.phone-prefix {
  display: grid;
  height: 32px;
  padding: 0 10px 0 0;
  place-items: center;
  border-right: 1px solid var(--auth-line);
  color: #6f5da3;
  font-size: 13px;
  font-weight: 850;
}

.input-wrap input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 16px;
  border: 0;
  outline: 0;
  color: var(--auth-ink);
  font-size: 15px;
  font-weight: 650;
  background: transparent;
}

.input-wrap input::placeholder {
  color: #9a90ba;
  opacity: 1;
}

.input-wrap input[readonly] {
  cursor: default;
  color: #6f5da3;
}

.password-toggle {
  display: grid;
  width: 50px;
  height: 100%;
  flex: 0 0 50px;
  place-items: center;
  border: 0;
  color: #8170bc;
  font-size: 17px;
  cursor: pointer;
  background: transparent;
}

.password-toggle:focus-visible {
  outline: 3px solid rgba(125, 87, 230, 0.25);
  outline-offset: -5px;
  border-radius: 14px;
}

.saved-accounts {
  display: none;
  margin: -9px 0 14px;
  padding: 12px;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.saved-accounts.show {
  display: block;
}

.saved-title {
  margin-bottom: 8px;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 800;
}

.account-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.account-chip {
  padding: 8px 11px;
  border: 1px solid rgba(125, 87, 230, 0.2);
  border-radius: 999px;
  color: #685499;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  background: #fff9fc;
}

.account-chip:hover {
  border-color: rgba(125, 87, 230, 0.4);
  background: #fff;
}

.auth-submit {
  position: relative;
  width: 100%;
  min-height: 59px;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 21px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.2px;
  cursor: pointer;
  background: linear-gradient(105deg, var(--auth-pink) 0%, #b766e5 48%, var(--auth-purple) 100%);
  box-shadow:
    0 15px 25px rgba(116, 73, 205, 0.28),
    inset 0 2px 3px rgba(255, 255, 255, 0.24);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.auth-submit:hover {
  filter: saturate(1.08) brightness(1.02);
  transform: translateY(-1px);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.auth-submit > span {
  position: relative;
  z-index: 2;
}

.ripple {
  position: absolute;
  z-index: 1;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: authRipple 0.65s ease-out;
}

@keyframes authRipple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(19);
  }
}

.auth-switch {
  margin-top: 25px;
  color: #7f75a0;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.auth-switch a {
  color: var(--auth-purple-dark);
  font-weight: 900;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.decor-plant {
  position: absolute;
  z-index: 2;
  bottom: 0;
  width: 44px;
  height: 126px;
  opacity: 0.85;
  pointer-events: none;
}

.decor-plant--left {
  left: 0;
}

.decor-plant--right {
  right: 0;
  transform: scaleX(-1);
}

.decor-plant::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 6px;
  width: 37px;
  height: 45px;
  border-radius: 8px 8px 15px 15px;
  background: linear-gradient(145deg, #ee91b9, #bd75c8);
  box-shadow: 0 10px 18px rgba(75, 44, 130, 0.18);
}

.decor-plant::after {
  content: "";
  position: absolute;
  bottom: 36px;
  left: 21px;
  width: 3px;
  height: 73px;
  border-radius: 99px;
  background: #7f9a64;
  box-shadow:
    -9px 19px 0 6px #9db677,
    10px 33px 0 7px #718f61,
    -8px 49px 0 7px #7f9c67;
  transform: rotate(2deg);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 480px) {
  body {
    display: block;
    padding: 0;
    background: #b29cf8;
  }

  .auth-shell {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-card {
    margin-right: 16px;
    margin-left: 16px;
    padding-right: 23px;
    padding-left: 23px;
  }
}

@media (max-width: 365px) {
  .auth-card {
    margin-right: 10px;
    margin-left: 10px;
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-orb--user {
    left: 18px;
  }

  .hero-orb--lock {
    right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
