/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --white-color: hsl(0, 0%, 100%);
  --black-color: hsl(0, 0%, 0%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: 'Montserrat', sans-serif;
  --h1-font-size: 2rem;
  --normal-font-size: 1rem;
  --small-font-size: .813rem;
}

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

body,
input,
button {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/*=============== LOGIN ===============*/
.login {
  position: relative;
  height: 100vh;
  display: grid;
  align-items: center;
}

.login__bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login__form {
  position: relative;
  margin-inline: 1.5rem;
  background-color: hsla(0, 0%, 100%, .01);
  border: 2px solid hsla(0, 0%, 100%, .7);
  padding: 2.5rem 1rem;
  color: var(--white-color);
  border-radius: 1rem;
  backdrop-filter: blur(16px);
}

.login__title {
  text-align: center;
  font-size: var(--h1-font-size);
  margin-bottom: 1.25rem;
}

.login__inputs, 
.login__box {
  display: grid;
}

.login__inputs {
  row-gap: 1.25rem;
  margin-bottom: 1rem;
}

.login__box {
  grid-template-columns: 1fr max-content;
  column-gap: .75rem;
  align-items: center;
  border: 2px solid hsla(0, 0%, 100%, .7);
  padding-inline: 1.25rem;
  border-radius: 4rem;
}

.login__input, 
.login__button {
  border: none;
  outline: none;
}

.login__input {
  width: 100%;
  background: none;
  color: var(--white-color);
  padding-block: 1rem;
}

.login__input::placeholder {
  color: var(--white-color);
}

.login__box i {
  font-size: 1.25rem;
}

.login__check, 
.login__check-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login__check {
  margin-bottom: 1rem;
  font-size: var(--small-font-size);
}

.login__check-box {
  column-gap: .5rem;
}

.login__check-input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--white-color);
}

.login__forgot {
  color: var(--white-color);
}

.login__forgot:hover {
  text-decoration: underline;
}

.login__button {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  background-color: var(--white-color);
  border-radius: 4rem;
  color: var(--black-color);
  font-weight: 500;
  cursor: pointer;
}

.login__register {
  font-size: var(--small-font-size);
  text-align: center;
}

.login__register a {
  color: var(--white-color);
  font-weight: 500;
}

.login__register a:hover {
  text-decoration: underline;
}

/*=============== BREAKPOINTS ===============*/
/* For medium devices */
@media screen and (min-width: 576px) {
  .login {
    justify-content: center;
  }
  .login__form {
    width: 420px;
    padding-inline: 2.5rem;
  }
  .login__title {
    margin-bottom: 2rem;
  }
}

/*=============== RESPONSIVE ===============*/
/* Tablet */
@media (max-width: 768px) {
  .login__form {
    padding: 2rem 1.5rem;
    margin-inline: 1rem;
  }
  
  .login__title {
    font-size: 1.75rem;
  }
  
  .login__box {
    padding-inline: 1rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .login {
    height: 100vh;
    padding: 1rem;
  }

  .login__form {
    padding: 1.5rem 1rem;
    margin-inline: 0.5rem;
    border-radius: 0.75rem;
  }

  .login__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .login__inputs {
    row-gap: 1rem;
    margin-bottom: 0.75rem;
  }

  .login__box {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .login__box i {
    display: none;
  }

  .login__input {
    padding-block: 0.75rem;
    text-align: center;
  }

  .login__check {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .login__button {
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
  }

  .login__register {
    font-size: 0.75rem;
  }
}

/* Small Mobile */
@media (max-width: 360px) {
  .login__form {
    padding: 1.25rem 0.75rem;
  }

  .login__title {
    font-size: 1.35rem;
  }

  .login__input {
    font-size: 0.9rem;
  }

  .login__button {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
}

.login__error {
   color: #ff3b30;
   font-size: 0.9rem;
   margin-top: 1rem;
   text-align: center;
   display: none;
}

/*=============== OTP MODAL ===============*/
.otp__modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.otp__modal.active {
  opacity: 1;
  visibility: visible;
}

.otp__card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-radius: 1.5rem;
  padding: 2rem 2.25rem;
  width: 90%;
  max-width: 440px;
  color: var(--white-color);
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.otp__modal.active .otp__card {
  transform: translateY(0) scale(1);
}

.otp__title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.otp__title i {
  color: #38bdf8;
  font-size: 1.75rem;
}

.otp__subtitle {
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.otp__subtitle strong {
  color: #f1f5f9;
}

.otp__inputs {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.otp__field {
  width: 48px;
  height: 56px;
  border-radius: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

.otp__field:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  background: rgba(15, 23, 42, 0.9);
}

.otp__field.is-invalid {
  border-color: #ef4444;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.otp__error {
  color: #f87171;
  font-size: 0.825rem;
  min-height: 1.25rem;
  margin-bottom: 0.75rem;
}

.otp__timer-box {
  font-size: 0.85rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-inline: 0.5rem;
}

.otp__timer-box strong {
  color: #38bdf8;
}

.otp__resend-btn {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.otp__resend-btn:disabled {
  color: #64748b;
  cursor: not-allowed;
  text-decoration: none;
  opacity: 0.6;
}

.otp__actions {
  display: flex;
  gap: 0.75rem;
}

.otp__btn {
  flex: 1;
  padding: 0.875rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.otp__btn--cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.otp__btn--cancel:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.otp__btn--submit {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.otp__btn--submit:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
}

/*=============== DEMO TOAST ===============*/
.otp__toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-left: 4px solid #38bdf8;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.otp__toast.show {
  transform: translateY(0);
  opacity: 1;
}

.otp__toast-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.otp__toast-body {
  font-size: 0.9rem;
  color: #e2e8f0;
}

.otp__toast-body strong {
  font-size: 1.1rem;
  color: #fef08a;
  letter-spacing: 2px;
}

