  :root {
      --primary: #2563eb;
      --primary-hover: #1d4ed8;
      --bg-color: #fcf9f2;
      --text-main: #1e293b;
      --text-muted: #64748b;
      --input-bg: #f8fafc;
      --border-color: #e2e8f0;
      --error-color: #ef4444;
      --success-color: #22c55e;
  }

  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  }

  body {
      background-color: var(--bg-color);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 2rem;
  }

  .login-container {
      display: flex;
      width: 100%;
      max-width: 1050px;
      min-height: 600px;
      background: #ffffff;
      border-radius: 28px;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
      overflow: hidden;
  }

  /* === سیستم نوتیفیکیشن اختصاصی (Toast) === */
  .toast-container {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 9999;
      display: flex;
      flex-direction: column;
      gap: 10px;
  }

  .toast {
      background: #ffffff;
      box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
      padding: 14px 20px;
      border-radius: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--text-main);
      transform: translateX(150%);
      transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }

  .toast.show {
      transform: translateX(0);
  }

  .toast.error {
      border-right: 5px solid var(--error-color);
  }

  .toast.success {
      border-right: 5px solid var(--success-color);
  }

  /* === بخش فرم === */
  .form-section {
      flex: 1;
      padding: 3.5rem 4rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
  }

  .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 2.5rem;
  }

  .site-logo {
      width: 55px;
      height: 55px;
      /* استفاده از contain برای نمایش کامل و بدون برش لوگو */
      object-fit: contain;
      border-radius: 8px;
  }

  .brand-text h1 {
      font-size: 1.5rem;
      color: var(--text-main);
      font-weight: 800;
  }

  .input-group {
      margin-bottom: 1.5rem;
      position: relative;
  }

  .input-group label {
      display: block;
      margin-bottom: 0.5rem;
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--text-main);
  }

  .input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
  }

  .input-icon {
      position: absolute;
      right: 16px;
      color: #94a3b8;
      width: 20px;
      height: 20px;
      transition: color 0.3s ease;
  }

  .input-wrapper input {
      width: 100%;
      padding: 0.875rem 2.75rem 0.875rem 1rem;
      border: 2px solid var(--border-color);
      border-radius: 14px;
      background: var(--input-bg);
      font-size: 0.95rem;
      color: var(--text-main);
      transition: all 0.3s ease;
  }

  .input-wrapper input:focus {
      border-color: var(--primary);
      background: #ffffff;
      box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
      outline: none;
  }

  .input-wrapper input:focus+.input-icon {
      color: var(--primary);
  }

  .toggle-password {
      position: absolute;
      left: 16px;
      cursor: pointer;
      color: #94a3b8;
      background: none;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  /* === استایل‌های کپچا و دکمه رفرش === */
  .captcha-container {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 10px;
  }

  #captchaCanvas {
      border: 2px solid var(--border-color);
      border-radius: 12px;
      background: #ffffff;
  }

  .refresh-captcha {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      background: var(--input-bg);
      border: 2px solid var(--border-color);
      border-radius: 12px;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.3s ease;
  }

  .refresh-captcha svg {
      width: 22px;
      height: 22px;
      transition: transform 0.4s ease;
  }

  .refresh-captcha:hover {
      background: #e2e8f0;
      color: var(--primary);
      border-color: #cbd5e1;
  }

  .refresh-captcha:hover svg {
      transform: rotate(180deg);
  }

  .refresh-captcha.spinning svg {
      animation: spin 0.5s ease-in-out;
  }

  @keyframes spin {
      100% {
          transform: rotate(360deg);
      }
  }

  .form-options {
      display: flex;
      margin-bottom: 2rem;
      font-size: 0.875rem;
  }

  .forgot-pass {
      color: var(--primary);
      text-decoration: none;
      font-weight: 500;
      margin-right: auto;
  }

  .btn-submit {
      width: 100%;
      padding: 1rem;
      background: linear-gradient(to right, var(--primary), #3b82f6);
      color: white;
      border: none;
      border-radius: 14px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
  }

  .btn-submit:hover {
      box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
      transform: translateY(-1px);
  }

  /* === بخش تصویر === */
  /* === بخش تصویر === */
  /* === بخش تصویر === */
.image-section {
    flex: 1;
    display: flex; /* فعال کردن فلکس‌باکس */
    align-items: center; /* مرکز کردن عمودی */
    justify-content: center; /* مرکز کردن افقی */
    padding: 2rem;
    overflow: hidden; /* برای جلوگیری از سرریز شدن تصویر */
}

.static-image {
    width: 90%; /* تصویر کمی از لبه‌ها فاصله داشته باشد */
    height: auto; /* ارتفاع خودکار برای حفظ نسبت تصویر */
    max-height: 100%;
    object-fit: contain; /* تصویر بدون کشیده شدن، کامل نمایش داده شود */
    transition: transform 0.3s ease;
}



  @media (max-width: 992px) {
      .login-container {
          flex-direction: column;
      }

      .image-section {
          display: none;
      }

      .form-section {
          padding: 3rem 2rem;
      }
  }

  .form-options {
      display: flex;
      margin-bottom: 2rem;
  }

  .forgot-password-box {
      display: inline-flex;
      align-items: center;
      padding: 8px 16px;
      background-color: #eff6ff;
      color: var(--primary);
      text-decoration: none;
      font-size: 0.85rem;
      font-weight: 600;
      border-radius: 10px;
      border: 1px solid #bfdbfe;
      transition: all 0.3s ease;
      margin-right: auto;
  }

  .forgot-password-box:hover {
      background-color: #dbeafe;
      transform: translateY(-1px);
      box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
  }