/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.5.15,
* Autoprefixer: v10.5.0
* Browsers: last 4 version
*/

:root {
    --primary: #4060ef;
    --primary-hover: #306ebe;
    --bg-page: #0f1424;
    --surface: #141433;
    --text-main: #e3e3e6;
    --text-muted: #bcbec2;
    --border: #333350;
    --border-focus: #008eb2;
    --error: #d32f2f;
    --font: 'Vazirmatn', sans-serif;
}

* { margin: 0; padding: 0; -webkit-box-sizing: border-box; box-sizing: border-box; font-family: var(--font); }

body {
  background-color: var(--bg-page);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  min-height: 100vh;
  direction: rtl;
  color: var(--text-main);
}

.auth-wrapper {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.auth-card {
    background: #28283b;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.03);
          box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* Header */
.auth-header { text-align: center; margin-bottom: 24px; }
.logo { font-size: 28px; font-weight: bold; color: var(--primary); margin-bottom: 20px; }
.auth-header h1 { font-size: 18px; font-weight: 700; margin-bottom: 12px; -webkit-transition: 0.3s; transition: 0.3s; }
.auth-header p { font-size: 12px; color: var(--text-muted); -webkit-transition: 0.3s; transition: 0.3s; }

/* Form Slider */
.auth-slider { position: relative; min-height: 200px; overflow: hidden; }
.auth-step {
  position: absolute; top: 0; right: 0; width: 100%;
  -webkit-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0; visibility: hidden; pointer-events: none;
}
.auth-step.active { position: relative; opacity: 1; visibility: visible; pointer-events: auto; -webkit-transform: translateX(0); -ms-transform: translateX(0); transform: translateX(0); }
.auth-step.hidden-right { -webkit-transform: translateX(30px); -ms-transform: translateX(30px); transform: translateX(30px); }
.auth-step.hidden-left { -webkit-transform: translateX(-30px); -ms-transform: translateX(-30px); transform: translateX(-30px); }

/* Inputs */
.input-wrapper { position: relative; width: 100%; }
.ui-input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #8f929238;
    padding: 0 16px;
       font-size: 16px;
    color: #dedede;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
    outline: none;
}
/* ==========================================================================
   Trial Alert Box in Register Step
   ========================================================================== */
.trial-alert {
    background: rgba(251, 191, 36, 0.1);
    border: 1px dashed rgba(251, 191, 36, 0.5);
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: right;
}

.trial-alert i {
    font-size: 22px;
    color: #f59e0b;
    margin-top: 2px;
}

.trial-alert div strong {
    display: block;
    font-size: 13px;
    color: #d97706;
    margin-bottom: 5px;
}

.trial-alert div p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* هماهنگی با دارک مود سایت شما */
[data-theme="dark"] .trial-alert div strong {
    color: #fbbf24;
}
.secondary-btn {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.secondary-btn:hover:not(:disabled) {
  background: rgba(64, 96, 239, 0.08); /* افکت هاور ملایم همرنگ با تم */
}
.ui-input:focus { border-color: var(--border-focus); }
.ui-input.error { border-color: var(--error); }
.pr-icon { padding-left: 45px; }

.toggle-password {
  position: absolute; left: 12px; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%);
  background: none; border: none; font-size: 20px; color: var(--text-muted);
  cursor: pointer;
}

.error-msg {
  display: block; color: var(--error); font-size: 11px;
  margin-top: 6px; opacity: 0; height: 0; -webkit-transition: 0.2s; transition: 0.2s; overflow: hidden;
}
.error-msg.show { opacity: 1; height: 16px; margin-top: 6px; }

/* Buttons */
.ui-button {
  width: 100%; height: 48px;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: bold;
  cursor: pointer; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-transition: 0.2s;
  transition: 0.2s; margin-top: 24px;
}
.main-btn { background: var(--primary); color: #fff; }
.main-btn:hover:not(:disabled) { background: var(--primary-hover); }
.main-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.back-btn {
  background: none; border: none; font-size: 24px;
  color: var(--text-main); cursor: pointer;
  position: absolute; top: -50px; right: 0; z-index: 10;
}
/* Header Top Layout */
.header-top {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  position: relative;
  margin-bottom: 20px;
  width: 100%;
}
/* ==========================================================================
   Modern Minimalist Toast Notifications
   ========================================================================== */
   .toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
            transform: translateX(-50%);
    z-index: 9999;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    pointer-events: none; /* جلوگیری از مسدود کردن کلیک‌های کاربر روی المان‌های زیرین */
}

.toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 14px 18px;
    border-radius: 12px;
    -webkit-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 500;
    color:  #3d3d3e;
    direction: rtl;
    -webkit-animation: toastFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
            animation: toastFadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.toast.hide {
    -webkit-animation: toastFadeOut 0.3s ease forwards;
            animation: toastFadeOut 0.3s ease forwards;
}

/* انواع وضعیت‌های توست */
.toast-error {
    border-right: 4px solid var(--error);
}
.toast-error i {
    color: var(--error);
    font-size: 18px;
}

.toast-success {
    border-right: 4px solid #2e7d32;
}
.toast-success i {
    color: #2e7d32;
    font-size: 18px;
}

/* انیمیشن‌های ورود و خروج توست */
@-webkit-keyframes toastFadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(-20px) scale(0.95);
                transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0) scale(1);
                transform: translateY(0) scale(1);
    }
}
@keyframes toastFadeIn {
    from {
        opacity: 0;
        -webkit-transform: translateY(-20px) scale(0.95);
                transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0) scale(1);
                transform: translateY(0) scale(1);
    }
}

@-webkit-keyframes toastFadeOut {
    from {
        opacity: 1;
        -webkit-transform: translateY(0) scale(1);
                transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        -webkit-transform: translateY(-15px) scale(0.95);
                transform: translateY(-15px) scale(0.95);
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        -webkit-transform: translateY(0) scale(1);
                transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        -webkit-transform: translateY(-15px) scale(0.95);
                transform: translateY(-15px) scale(0.95);
    }
}
/* Adjust logo margin since it's now in a flex container */
.header-top .logo {
  margin-bottom: 0; 
}.header-top .logo img {
  width: 79%;
  height: 74%;
  -o-object-fit: contain;
     object-fit: contain;
}
/* New Back Button Style */
.header-back-btn {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-main);
  font-size: 22px;
  text-decoration: none;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  cursor: pointer;
}

.header-back-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary);
}
/* Links & Text */
.action-links { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; margin-top: 16px; }
.action-links.center { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
.text-btn { background: none; border: none; font-size: 12px; color: var(--border-focus); cursor: pointer; font-weight: 500; }
.terms-text { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 16px; line-height: 1.8; }
.terms-text a { color: var(--text-main); text-decoration: none; }

/* OTP */
.otp-container { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between; gap: 8px; }
.otp-input {
  width: 100%; height: 52px; border: 1px solid var(--border);
  border-radius: 8px; text-align: center; font-size: 20px; font-weight: bold;
  outline: none; -webkit-transition: 0.2s; transition: 0.2s;
}
.otp-input:focus { border-color: var(--border-focus); }
.timer { font-size: 12px; color: var(--text-muted); }
.hidden { display: none !important; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }

/* Loading */
.spinner { display: none; font-size: 24px; -webkit-animation: spin 1s linear infinite; animation: spin 1s linear infinite; }
@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }