.home-login {
  width: min(28rem, 100%);
  margin: clamp(2.5rem, 8vh, 5rem) auto 2rem;
  position: relative;
  animation: home-login-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-login__card {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3.5vw, 1.85rem);
  border-radius: 1.35rem;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(247, 244, 237, 0.9));
  border: 1px solid rgba(15, 42, 46, 0.1);
  box-shadow:
    0 22px 48px rgba(15, 42, 46, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
  overflow: hidden;
}

.home-login__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-deep), transparent);
}

.home-login__glow {
  position: absolute;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 92, 38, 0.16), transparent 70%);
  top: -4rem;
  left: -3rem;
  pointer-events: none;
}

.home-login__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-deep);
  background: rgba(196, 92, 38, 0.1);
}

.home-login__badge svg {
  flex-shrink: 0;
}

.home-login__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 3.2vw, 1.65rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.home-login__lead {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}

.home-login__field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}

.home-login__field span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.home-login__input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 42, 46, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-login__input::placeholder {
  color: rgba(74, 99, 104, 0.55);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-align: center;
}

.home-login__input:focus {
  outline: none;
  border-color: rgba(196, 92, 38, 0.45);
  box-shadow: 0 0 0 4px rgba(196, 92, 38, 0.12);
}

.home-login__field--otp {
  margin-bottom: 1.15rem;
}

.home-login__field--otp > span {
  display: block;
  text-align: center;
  margin-bottom: 0.65rem;
}

.home-otp-wrap {
  position: relative;
  direction: ltr;
}

.home-otp-autofill {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0.02;
  color: transparent;
  caret-color: transparent;
  background: transparent;
  font-size: 2rem;
  letter-spacing: 1.6rem;
  text-align: left;
  -webkit-text-fill-color: transparent;
}

.home-otp-autofill:focus {
  outline: none;
}

.home-otp {
  position: relative;
  z-index: 1;
  direction: ltr;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.35rem;
  pointer-events: none;
}

.home-otp__digit {
  width: 2.85rem;
  height: 3.35rem;
  border: 1.5px solid rgba(15, 42, 46, 0.14);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 1.45rem;
  font-weight: 800;
  text-align: center;
  caret-color: transparent;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.home-otp-wrap:focus-within .home-otp__digit:not(.is-filled) {
  border-color: rgba(196, 92, 38, 0.35);
}

.home-otp-wrap:focus-within .home-otp__digit.is-active {
  border-color: rgba(196, 92, 38, 0.55);
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 4px rgba(196, 92, 38, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.home-otp__digit.is-filled {
  border-color: rgba(196, 92, 38, 0.4);
  background: rgba(255, 255, 255, 0.92);
}

.home-otp__dash {
  width: 0.7rem;
  height: 2px;
  border-radius: 999px;
  background: rgba(15, 42, 46, 0.28);
  flex-shrink: 0;
}

.home-otp__hint {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.home-login__submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.1rem;
  border: 0;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, var(--accent), var(--accent-deep));
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(196, 92, 38, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.home-login__submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(196, 92, 38, 0.34);
}

.home-login__submit:active:not(:disabled) {
  transform: translateY(0);
}

.home-login__submit:disabled {
  opacity: 0.65;
  cursor: wait;
  box-shadow: none;
}

.home-login__hint {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.home-login__sent {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(15, 42, 46, 0.05);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 600;
}

.home-login__otp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.home-login__otp-actions .home-login__ghost {
  width: 100%;
  margin: 0;
}

.home-login__ghost {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(15, 42, 46, 0.12);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.home-login__ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 42, 46, 0.2);
}

.home-login__ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.home-login__linkish {
  margin-top: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.home-login__error {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(180, 45, 45, 0.08);
  border: 1px solid rgba(180, 45, 45, 0.18);
  color: #8b1e1e;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.5;
}

.home-login__error[hidden] {
  display: none !important;
}

.home-login__card.is-flash-highlight {
  animation: home-login-flash 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes home-login-flash {
  0%, 100% {
    box-shadow:
      0 22px 48px rgba(15, 42, 46, 0.1),
      0 1px 0 rgba(255, 255, 255, 0.7) inset,
      0 0 0 0 rgba(196, 92, 38, 0);
    border-color: rgba(15, 42, 46, 0.1);
    transform: scale(1);
  }

  10%, 24% {
    box-shadow:
      0 28px 58px rgba(196, 92, 38, 0.24),
      0 1px 0 rgba(255, 255, 255, 0.7) inset,
      0 0 0 4px rgba(196, 92, 38, 0.26),
      0 0 36px rgba(232, 196, 72, 0.34);
    border-color: rgba(196, 92, 38, 0.58);
    transform: scale(1.018);
  }

  17%, 31% {
    box-shadow:
      0 22px 48px rgba(15, 42, 46, 0.1),
      0 1px 0 rgba(255, 255, 255, 0.7) inset,
      0 0 0 0 rgba(196, 92, 38, 0);
    border-color: rgba(15, 42, 46, 0.1);
    transform: scale(1);
  }

  41%, 55% {
    box-shadow:
      0 28px 58px rgba(196, 92, 38, 0.24),
      0 1px 0 rgba(255, 255, 255, 0.7) inset,
      0 0 0 4px rgba(196, 92, 38, 0.26),
      0 0 36px rgba(232, 196, 72, 0.34);
    border-color: rgba(196, 92, 38, 0.58);
    transform: scale(1.018);
  }

  48%, 62% {
    box-shadow:
      0 22px 48px rgba(15, 42, 46, 0.1),
      0 1px 0 rgba(255, 255, 255, 0.7) inset,
      0 0 0 0 rgba(196, 92, 38, 0);
    border-color: rgba(15, 42, 46, 0.1);
    transform: scale(1);
  }
}

@keyframes home-login-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 420px) {
  .home-otp {
    gap: 0.22rem;
  }

  .home-otp__digit {
    width: 2.45rem;
    height: 3rem;
    font-size: 1.25rem;
    border-radius: 0.75rem;
  }

  .home-otp__dash {
    width: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-login {
    animation: none;
  }

  .home-login__card.is-flash-highlight {
    animation: none;
    box-shadow:
      0 22px 48px rgba(15, 42, 46, 0.1),
      0 0 0 3px rgba(196, 92, 38, 0.35);
    border-color: rgba(196, 92, 38, 0.55);
  }

  .home-login__submit,
  .home-otp__digit {
    transition: none;
  }
}
