* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: Tahoma, Arial, sans-serif;
  direction: rtl;
  background:
    radial-gradient(circle at top right, rgba(2, 72, 44, 0.2), transparent 34%),
    radial-gradient(
      circle at bottom left,
      rgba(2, 72, 44, 0.13),
      transparent 32%
    ),
    linear-gradient(135deg, #f5faf7, #ffffff);
  color: #1f2933;
}

button,
input {
  font-family: inherit;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 980px;
  min-height: 610px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(2, 72, 44, 0.12);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.14);
  backdrop-filter: blur(16px);
}

.auth-visual {
  position: relative;
  background:
    linear-gradient(145deg, rgba(2, 72, 44, 0.95), rgba(3, 107, 64, 0.92)),
    url("auth-bg.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.auth-visual::before {
  width: 230px;
  height: 230px;
  top: -70px;
  left: -70px;
}

.auth-visual::after {
  width: 170px;
  height: 170px;
  bottom: -50px;
  right: -40px;
}

.brand-mark {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.brand-mark img {
  height: 50px;
  width: 50px;
}

.auth-visual h1 {
  font-size: 34px;
  line-height: 1.7;
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
}

.auth-visual p {
  font-size: 15px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  z-index: 2;
}

.visual-dots {
  display: flex;
  gap: 8px;
  margin-top: 36px;
  position: relative;
  z-index: 2;
}

.visual-dots span {
  width: 10px;
  height: 10px;
  background: #fff;
  opacity: 0.55;
  border-radius: 50%;
}

.visual-dots span:nth-child(2) {
  opacity: 0.85;
}

.visual-dots span:nth-child(3) {
  opacity: 0.35;
}

.auth-forms {
  position: relative;
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.form-panel {
  width: 100%;
  display: none;
  animation: formFade 0.42s ease;
}

.form-panel.active {
  display: block;
}

@keyframes formFade {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.form-title {
  color: #02482c;
  font-size: 25px;
  margin-bottom: 28px;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.input-group {
  display: grid;
  gap: 7px;
}

.input-group label {
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  padding-right: 4px;
}

.input-box {
  position: relative;
}

.input-box input {
  width: 100%;
  height: 52px;
  border: 1px solid #d6e6dd;
  border-radius: 16px;
  outline: none;
  background: #f8fbfa;
  color: #111827;
  font-size: 14px;
  padding: 0 48px 0 16px;
  transition: 0.25s ease;
}

.input-box input:focus {
  border-color: #02482c;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(2, 72, 44, 0.1);
}

.input-box span {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.72;
}

.error-text {
  min-height: 18px;
  color: #c62828;
  font-size: 12px;
  padding-right: 4px;
}

.input-group.error input {
  border-color: #c62828;
  background: #fffafa;
}

.submit-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #02482c, #036b40);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 16px 34px rgba(2, 72, 44, 0.24);
  transition: 0.25s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(2, 72, 44, 0.32);
}

.submit-btn:active {
  transform: scale(0.98);
}

.switch-form-text {
  margin-top: 20px;
  color: #4b5563;
  font-size: 13px;
  text-align: center;
}

.text-btn,
.forget-password {
  border: none;
  background: transparent;
  color: #02482c;
  font-weight: 900;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
}

.text-btn:hover,
.forget-password:hover {
  text-decoration: underline;
}

.forget-password {
  display: block;
  margin: 14px auto 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #111827;
  color: #fff;
  padding: 14px 20px;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 850px) {
  .auth-card {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .auth-visual {
    min-height: 250px;
    padding: 34px;
  }

  .auth-visual h1 {
    font-size: 26px;
  }

  .auth-forms {
    padding: 34px 24px;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 16px 10px;
  }

  .auth-card {
    border-radius: 22px;
  }

  .auth-visual {
    padding: 28px 22px;
  }

  .brand-mark {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .brand-mark span {
    font-size: 34px;
  }

  .auth-forms {
    padding: 28px 18px;
  }

  .form-title {
    font-size: 21px;
  }

  .input-box input,
  .submit-btn {
    height: 48px;
    border-radius: 14px;
  }

  .toast {
    right: 12px;
    left: 12px;
    bottom: 14px;
    text-align: center;
  }
}
.auth-alert {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 18px;
  text-align: center;
}

.auth-alert.success {
  background: #e9f7ef;
  color: #02482c;
  border: 1px solid #cdebd9;
}

.auth-alert.error {
  background: #fff0f0;
  color: #b42318;
  border: 1px solid #ffd0d0;
}
.auth-alert {
  width: 100%;
  max-width: 430px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
  margin-bottom: 8px;
}

.auth-alert.error {
  background: #fff0f0;
  color: #b42318;
  border: 1px solid #ffd0d0;
}

.auth-alert.success {
  background: #e9f7ef;
  color: #02482c;
  border: 1px solid #cdebd9;
}

.form-panel {
  width: 100%;
  max-width: 430px;
}