@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');

:root {
  --red-alert: #e74c3c;
  --gray-medium: #ccc;
  --gold: #D4AF37;
  --indigo-dye: #194B7D;
  --orange-peel: #ffbd20;
  --orange-peell: #FEA845;
  --black: #000000;
  --black-2: #000000;
  --black-3: #000000;
  --white: #ffffff;
  --gray-light: #F5F5F5;
  --gray-dark: #424040;
  --blue: #007BFF;
  --shadow-color: rgba(0, 0, 0, 0.1);

  --shadow-light: 0 2px 5px var(--shadow-color);
  --shadow-medium: 0 4px 8px var(--shadow-color);
  --shadow-heavy: inset 0 0 10px var(--shadow-color);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  direction: rtl;
  font-family: 'Vazir', sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../image/reg-log.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}


.wrapper {
  position: relative;
  max-width: 90%;
  width: 45%;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: saturate(150%);
  -webkit-backdrop-filter: saturate(150%);
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  box-shadow: 0px 5px 10px 5px rgba(0, 0, 0, 0.212);
  padding: 34px;
  text-align: left;
}


.panel-logo-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
}

.panel-logo {
  height: 180px;
  width: auto;
  object-fit: contain;
}

.wrapper h2 {
  position: relative;
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
  text-align: center;
}


.panel-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  /* هم‌ارتفاع شدن دو ستون */
  min-height: 500px;
}

.form-wrapper {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* وسط عمودی */
  align-items: center;
  /* وسط افقی */
  height: 100%;
  /* این کلید تراز با لوگو هست */
}

.form-title {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 24px;
  color: #4CAF50;
}

.panel-logo-wrapper {
  width: 40%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.wrapper form {
  width: 100%;
}

.wrapper form .input-box {
  width: 100%;
  margin: 12px 0;

}

.login-wrapper .panel-content {
  position: relative;
  min-height: 500px;
  /* برابر با لوگو */
}

.login-form-wrapper {
  width: 50%;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-form-wrapper form {
  width: 100%;
  max-width: 340px;
}

form .input-box input {
  width: 100%;
  padding: 0 15px;
  height: 52px;
  font-size: 17px;
  border: 1.5px solid #C7BEBE;
  border-bottom-width: 2.5px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

form .input-box input:focus,
form .input-box input:valid {
  border-color: #4CAF50;
}

.policy {
  display: flex;
  align-items: center;
  margin: 12px 0;
}

form h3 {
  color: #333;
  font-size: 14px;
  font-weight: 500;
  margin-left: 10px;
}


form .text h3 {
  color: #000000;
  width: 100%;
  text-align: center;
  margin-top: 20px;

}

form .text h3 a {
  color: var(--blue);
  text-decoration: none;
}

form .text h3 a:hover {
  text-decoration: none;
}


.messages {
  list-style: none;
  padding: 10px;
  text-align: center;
}

.messages li {
  padding: 10px;
  margin: 5px 0;
  border-radius: 5px;
  font-size: 14px;
}

.messages .success {
  background-color: #4CAF50;
  color: white;
}

.messages .error {
  background-color: #f44336;
  color: white;
}

/* استایل برای پیام‌های ارور */
.error {
  color: #000000;
  /* رنگ قرمز جذاب */
  font-size: 14px;
  padding: 10px;
  font-weight: bold;
  background-color: transparent;
  display: flex;
  align-items: center;
  opacity: 0;
  animation: fadeIn 0.5s forwards;
  margin-top: -12px;
  text-align: right;
}

/* انیمیشن برای ظاهر شدن ارور */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* زمانی که فرم در فیلد ارور دارد */
.input-box input:invalid {
  border-color: #dc3545 !important;
  background-color: #fff5f5;
}

/* استایل‌های دیگر فیلدها و دکمه‌ها مانند قبل */
.input-box input:focus {
  border-color: #4CAF50;
  background-color: #f1f9f1;
}


 
.input-box.button input {
  background-color: var(--gray-dark);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  padding: 0px;
  border-radius: 10px;
  width: 100%;
}

.input-box.button input:hover {
  background-color: var(--black);
}

@media (max-width: 991px) {
  .wrapper {
    width: 90%;
    padding: 24px;
  }

  .panel-content {
    flex-direction: column;
    /* لوگو و فرم زیر هم */
    align-items: center;
  }

  .panel-logo-wrapper {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
  }

  .form-wrapper {
    width: 100%;
    padding: 0 10px;
  }

  .form-title {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .wrapper form {
    width: 100%;
  }

  .wrapper form .input-box {
    margin: 10px 0;
  }

  .input-box input {
    height: 48px;
    font-size: 16px;
    border-radius: 40px;
  }

  .input-box.button input {
    height: 48px;
    font-size: 16px;
    border-radius: 40px;
  }

  form .text h3 {
    font-size: 13px;
  }

  .panel-logo {
    height: 140px;
  }
}

@media (max-width: 576px) {
  .form-title {
    font-size: 18px;
  }

  .input-box input,
  .input-box.button input {
    height: 44px;
    font-size: 15px;
  }

  form .text h3 {
    font-size: 12px;
  }

  .panel-logo {
    height: 120px;
  }
}

@media (max-width: 991px) {
  .login-wrapper {
    width: 90%;
    padding: 24px;
  }

  .login-wrapper .panel-content {
    flex-direction: column;
    align-items: center;
    min-height: auto;
    position: static;
  }

  .login-form-wrapper {
    position: static;
    width: 100%;
    transform: none;
    padding: 0 20px;
    margin-top: 20px;
  }

  .login-form-wrapper form {
    width: 100%;
    max-width: 100%;
  }

  .panel-logo-wrapper {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
  }

  .panel-logo {
    height: 140px;
  }

  .form-title {
    font-size: 20px;
    text-align: center;
  }

  .input-box input,
  .input-box.button input {
    height: 48px;
    font-size: 16px;
    border-radius: 40px;
  }

  form .text h3 {
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .form-title {
    font-size: 18px;
  }

  .input-box input,
  .input-box.button input {
    height: 44px;
    font-size: 15px;
  }

  form .text h3 {
    font-size: 12px;
  }

  .panel-logo {
    height: 120px;
  }
}