/* =========================
   Login Page
========================= */

.login-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 30px 18px;

  display: grid;
  place-items: center;

  background:
    radial-gradient(circle at top right, rgba(199, 154, 69, 0.16), transparent 34%),
    radial-gradient(circle at bottom left, rgba(74, 43, 18, 0.1), transparent 38%), var(--cream);
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
  animation: glowMove 6s ease-in-out infinite;
}

.glow-one {
  width: 260px;
  height: 260px;
  top: 12%;
  right: 12%;
  background: rgba(199, 154, 69, 0.16);
}

.glow-two {
  width: 320px;
  height: 320px;
  bottom: 8%;
  left: 10%;
  background: rgba(74, 43, 18, 0.1);
  animation-delay: 1.4s;
}

@keyframes glowMove {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-18px) scale(1.06);
  }
}

.login-card {
  width: 100%;
  max-width: 465px;
  position: relative;
  z-index: 2;
  background:
    radial-gradient(circle at top right, rgba(199, 154, 69, 0.14), transparent 42%),
    rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(74, 43, 18, 0.08);
  border-radius: 34px;
  padding: 36px;
  box-shadow:
    0 28px 90px rgba(43, 23, 8, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  animation: cardEnter 0.75s ease both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(241, 215, 155, 0.45),
    transparent,
    rgba(74, 43, 18, 0.1)
  );
  z-index: -1;
  opacity: 0.8;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-logo {
  width: fit-content;
  margin: 0 auto 28px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-logo img {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
  box-shadow: 0 14px 34px rgba(43, 23, 8, 0.1);
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.login-logo strong {
  display: block;
  color: var(--brown-dark);
  font-size: 22px;
  line-height: 1;
}

.login-logo span {
  display: block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.4px;
  margin-top: 6px;
  direction: ltr;
}

.login-head {
  text-align: center;
  margin-bottom: 26px;
}

.login-head .eyebrow {
  margin-bottom: 12px;
}

.login-head h1 {
  color: var(--brown-dark);
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 10px;
}

.login-head p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  font-size: 15px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-group label {
  display: block;
  color: var(--brown-dark);
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 14px;
}

.login-input-box {
  min-height: 58px;
  border-radius: 20px;
  border: 1px solid rgba(74, 43, 18, 0.11);
  background: rgba(255, 255, 255, 0.74);
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.login-input-box i {
  color: var(--gold);
  font-size: 20px;
}

.login-input-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--brown-dark);
  font-family: inherit;
  font-size: 15px;
}

.login-input-box input::placeholder {
  color: rgba(74, 43, 18, 0.42);
}

.login-input-box:focus-within {
  border-color: rgba(199, 154, 69, 0.7);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(199, 154, 69, 0.12);
  transform: translateY(-2px);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 2px;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}

.login-options input {
  accent-color: var(--gold);
}

.login-options a {
  color: var(--brown-dark);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  transition: 0.25s ease;
}

.login-options a:hover {
  color: var(--gold);
}

.login-btn {
  width: 100%;
  min-height: 60px;
  margin-top: 6px;
  border: 0;
  border-radius: 21px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: var(--gold-soft);
  font-family: inherit;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 18px 45px rgba(43, 23, 8, 0.18);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.login-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 65px rgba(43, 23, 8, 0.25);
}

.login-btn i {
  transition: 0.3s ease;
}

.login-btn:hover i {
  transform: translateX(-5px);
}

.login-switch {
  color: var(--muted);
  text-align: center;
  margin: 8px 0 0;
  line-height: 1.7;
}

.login-switch a {
  color: var(--brown-dark);
  text-decoration: none;
  font-weight: 900;
  transition: 0.25s ease;
}

.login-switch a:hover {
  color: var(--gold);
}

/* Responsive */

@media (max-width: 620px) {
  .login-page {
    padding: 20px 14px;
  }

  .login-card {
    padding: 28px 22px;
    border-radius: 30px;
  }

  .login-logo img {
    width: 54px;
    height: 54px;
  }

  .login-logo strong {
    font-size: 20px;
  }

  .login-head h1 {
    font-size: 31px;
  }

  .login-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-input-box,
  .login-btn {
    min-height: 56px;
  }
  .login-home-btn {
    top: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .login-home-btn i {
    font-size: 21px;
  }
}

.login-card {
  position: relative;
}

.login-home-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 5;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(241, 215, 155, 0.22), transparent 45%),
    linear-gradient(135deg, var(--brown-dark), var(--brown));
  color: var(--gold-soft);
  text-decoration: none;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 38px rgba(43, 23, 8, 0.2);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease,
    color 0.3s ease;
}

.login-home-btn i {
  font-size: 24px;
  line-height: 1;
}

.login-home-btn:hover {
  transform: translateY(-4px) rotate(-4deg);
  background: var(--gold-soft);
  color: var(--brown-dark);
  box-shadow: 0 22px 52px rgba(43, 23, 8, 0.26);
}

.toast-message {
  position: fixed;
  top: 104px;
  left: 24px;
  z-index: 99999;
  min-width: 280px;
  max-width: calc(100% - 48px);
  padding: 15px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  box-shadow: 0 18px 55px rgba(43, 23, 8, 0.22);
  animation: toastIn 0.35s ease forwards;
}

.toast-message i {
  font-size: 20px;
}

.toast-success {
  background: linear-gradient(135deg, #176b42, #22a66a);
  color: #ffffff;
}

.toast-error {
  background: linear-gradient(135deg, #7a1f1f, #c0392b);
  color: #ffffff;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 620px) {
  .toast-message {
    top: 88px;
    left: 12px;
    right: 12px;
    min-width: auto;
    max-width: none;
  }
}

.auth-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.7;
}

.auth-alert.error {
  background: #fff1f1;
  color: #b42318;
  border: 1px solid #ffc9c9;
}

.auth-alert.success {
  background: #eaf8ef;
  color: #16803c;
  border: 1px solid #bfe8cc;
}

.toast-message {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 9999;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 18px 45px rgba(43, 23, 8, 0.18);
  transition: 0.35s ease;
}

.toast-message.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.toast-message.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.toast-message i {
  font-size: 18px;
}

@media (max-width: 520px) {
  .toast-message {
    left: 14px;
    right: 14px;
    max-width: none;
    min-width: 0;
  }
}
