/* وارد کردن فونت زیبای وزیرمتن */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --primary-color: #009b4c;
    --primary-hover: #007a3c;
    --bg-color: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --error-color: #ef4444;
    --error-bg: #fef2f2;
    --input-bg: #ffffff;
    --slider-bg-dark: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main); /* اعمال هوشمندانه فونت دانا روی همه‌چیز */
}

body {
    background-color: var(--bg-color);
    overflow: hidden;
    font-weight: normal; /* استفاده خودکار از Dana-Regular */
    -webkit-font-smoothing: antialiased;
}

/* تیترها به صورت خودکار از Dana-Bold استفاده می‌کنند */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
}


/* ====================================
   ساختار گرید اصلی (Split Screen)
==================================== */

/* ====================================
   تنظیمات لوگوی تصویری (وسط‌چین)
==================================== */
.brand-logo {
    display: flex;
    justify-content: center; /* قرار دادن لوگو دقیقاً در مرکز افقی */
    align-items: center;
    margin-bottom: 2.5rem;
    width: 100%;
}

.brand-logo .logo-img {
    max-width: 140px; /* عرض لوگو رو اینجا می‌تونی به دلخواه کم و زیاد کنی */
    height: auto;     /* حفظ تناسب ابعاد عکس */
    object-fit: contain;
    transition: transform 0.3s ease; /* یک افکت نرم برای هاور (اختیاری) */
}

/* اگه دوست داشتی وقتی موس میره رو لوگو یه ذره بزرگ بشه */
.brand-logo .logo-img:hover {
    transform: scale(1.05);
}


.oauth-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.oauth-form-panel {
    width: 40%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 3rem;
    position: relative;
    z-index: 10;
    box-shadow: -10px 0 30px rgba(0,0,0,0.06);
    overflow-y: auto;
}

.oauth-form-panel::-webkit-scrollbar {
    width: 6px;
}
.oauth-form-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.form-wrapper {
    width: 100%;
    max-width: 420px;
    margin: auto;
}

.brand-logo {
    text-align: right;
    margin-bottom: 2rem;
}

.brand-logo h2 {
    font-size: 2.2rem;
    color: var(--text-dark);
    font-weight: 800;
}

.brand-logo span {
    color: var(--primary-color);
}

.form-header {
    margin-bottom: 2.5rem;
    text-align: right;
}

.form-header h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.alert-danger {
    background-color: var(--error-bg);
    border-right: 4px solid var(--error-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: #b91c1c;
    font-size: 0.9rem;
    font-weight: 500;
}
.alert-danger p { margin: 0; }

/* ====================================
   استایل‌های فرم و اینپوت‌ها
==================================== */
.atra-form .input-group {
    margin-bottom: 1.3rem;
    text-align: right;
}

.atra-form label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.atra-form input {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--input-bg);
    color: var(--text-dark);
    direction: ltr;
    text-align: left;
}

.atra-form input[name="phone"], .atra-form input[name="username"] {
    letter-spacing: 1px;
    font-family: monospace;
    font-size: 1.05rem;
}

.atra-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 155, 76, 0.12);
    background-color: #ffffff;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-left: 2.5rem;
}

.password-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    z-index: 5;
}

.password-wrapper i:hover {
    color: var(--primary-color);
}

.error-text {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.4rem;
    display: block;
    font-weight: 500;
}

/* ====================================
   تنظیمات اختصاصی لاگین (فلکس و تراز)
==================================== */
.label-with-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
    z-index: 1; /* بالاتر از اینپوت نباشد */
}
.password-wrapper {
    position: relative;
    width: 100%;
    /* جلوگیری از هرگونه رفتار کلیکی اشتباه روی کل باکس */
    pointer-events: auto;
}
.label-with-link label {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
}

.forgot-password-link {
    font-size: 0.85rem !important;
    color: var(--primary-color) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    line-height: 1 !important;
}

.forgot-password-link:hover,
.forgot-password-link:focus,
.forgot-password-link:active {
    color: var(--primary-hover) !important;
    text-decoration: none !important;
    opacity: 0.8 !important;
}

.remember-me-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin-bottom: 1.5rem !important;
    margin-top: 1rem !important;
    width: 100% !important;
}

.remember-me-group input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    cursor: pointer !important;
    accent-color: var(--primary-color) !important;
}

.remember-me-group label {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    font-size: 0.9rem !important;
    color: var(--text-dark) !important;
    cursor: pointer !important;
    font-weight: normal !important;
    line-height: 1 !important;
}

/* دکمه سابمیت و فوتر */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 8px 20px rgba(0, 155, 76, 0.25);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
}

.form-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.form-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ====================================
   پنل سمت چپ (اسلایدر عکس و متن)
==================================== */
.oauth-slider-panel {
    width: 60%;
    background-color: var(--slider-bg-dark);
    background-image:
        linear-gradient(135deg, rgba(0, 155, 76, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%),
        url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.slider-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDUiLz4KPC9zdmc+');
    z-index: 1;
}

.slider-container {
    width: 80%;
    max-width: 650px;
    z-index: 2;
}

.slide {
    display: none;
    animation: fadeEffect 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
    display: block;
}

.slide-icon {
    font-size: 4.5rem;
    color: #4ade80;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 15px rgba(74, 222, 128, 0.4));
}

.slide h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: -1px;
}

.slide p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #e2e8f0;
    font-weight: 300;
}

.slider-dots {
    margin-top: 4rem;
}

.dot {
    height: 8px;
    width: 8px;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.dot.active, .dot:hover {
    background-color: #4ade80;
    width: 35px;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

@keyframes fadeEffect {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====================================
   طراحی واکنش‌گرا (Mobile & Tablet)
==================================== */
@media screen and (max-width: 992px) {
    body {
        overflow: auto;
    }
    .oauth-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .oauth-slider-panel {
        display: none;
    }
    .oauth-form-panel {
        width: 100%;
        height: 100vh;
        box-shadow: none;
        padding: 2rem 1.5rem;
        align-items: flex-start;
        padding-top: 3rem;
    }
    .form-wrapper {
        max-width: 100%;
    }
}
/* ====================================
   استایل‌های اختصاصی فرم ورود (Login)
   متفاوت با فرم ثبت‌نام
==================================== */


/* --- 1. ساختار کلی فرم و لیبل‌ها --- */
.atra-login-form .login-input-group {
    margin-bottom: 1.5rem;
    text-align: right;
    position: relative;
}

.atra-login-form label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* --- 2. محفظه نگهدارنده اینپوت و آیکون‌ها --- */
.atra-login-form .input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* --- 3. آیکون پیشوند (قفل/یوزر در سمت راست) --- */
.atra-login-form .input-prefix-icon {
    position: absolute;
    right: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.3s ease;
    /* این خط شاه‌کلید حل مشکل کلیک نشدن روی اینپوته! باعث میشه کلیک از آیکون رد بشه */
    pointer-events: none;
}

/* --- 4. تنظیمات اصلی فیلدهای ورودی (اینپوت‌ها) --- */
.atra-login-form .input-icon-wrapper input {
    width: 100%;
    /* فاصله 2.8rem در چپ و راست برای جلوگیری از رفتن متن زیر آیکون چشمک و قفل */
    padding: 1rem 2.8rem 1rem 2.8rem !important;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1.05rem;
    background-color: #f1f5f9;
    color: var(--text-dark);
    direction: ltr; /* برای نمایش درست پسورد انگلیسی */
    text-align: left;
    /* اجبار به نمایشگر متن به جای لینک */
    cursor: text !important;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- 5. حالت فوکوس (هنگام کلیک روی اینپوت) --- */
.atra-login-form .input-icon-wrapper input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #00b86b; /* رنگ حاشیه سبز */
    box-shadow: 0 4px 15px rgba(0, 155, 76, 0.08);
}

/* تغییر رنگ آیکون قفل وقتی روی اینپوت کلیک میشه */
.atra-login-form .input-icon-wrapper:focus-within .input-prefix-icon {
    color: var(--primary-color);
}

/* --- 6. آیکون چشمک (نمایش/مخفی کردن پسورد در سمت چپ) --- */
.atra-login-form .password-wrapper .toggle-password {
    position: absolute;
    left: 10px; /* قرارگیری دقیق در سمت چپ */
    right: auto;
    color: var(--text-muted);
    font-size: 1.1rem;
    /* z-index بالا برای اینکه حتما قابل کلیک باشه و زیر اینپوت نره */
    z-index: 10;
    padding: 5px; /* محدوده کلیک رو بزرگتر میکنه تا کاربر راحت‌تر کلیک کنه */
    cursor: pointer; /* نشانگر موس رو به شکل دست درمیاره */
    transition: color 0.3s ease, transform 0.2s ease;
}

.atra-login-form .password-wrapper .toggle-password:hover {
    color: var(--primary-color);
    transform: scale(1.1); /* یه افکت ریز و جذاب موقع هاور */
}

/* --- 7. دکمه سابمیت (ورود) --- */
.btn-login-submit {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #05c46b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s ease;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 155, 76, 0.2);
}

.btn-login-submit:hover {
    box-shadow: 0 10px 25px rgba(0, 155, 76, 0.4);
    transform: translateY(-3px) scale(1.01);
}

.btn-login-submit:active {
    transform: translateY(0) scale(1);
}

/* --- 8. استایل لینک‌ها (فراموشی رمز و فوتر) --- */
.atra-login-form a,
.forgot-password-link,
.form-footer a {
    text-decoration: none !important; /* حذف کامل خط زیر لینک تحت هر شرایطی */
    color: var(--primary-color);
    transition: opacity 0.2s ease;
}

.atra-login-form a:hover,
.forgot-password-link:hover,
.form-footer a:hover {
    text-decoration: none !important;
    opacity: 0.75; /* به جای خط زیر، لینک یکم محو میشه که خیلی مدرن‌تره */
}
/* ====================================
   استایل‌های اختصاصی صفحه تایید (Verify / OTP)
==================================== */

.verify-header p {
    font-size: 1.05rem;
    color: var(--text-dark);
}

.user-phone-mask {
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.edit-phone-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
    font-weight: 600;
}

.edit-phone-link i {
    font-size: 0.75rem;
    margin-left: 3px;
}

.edit-phone-link:hover {
    color: var(--primary-color) !important;
}

/* ساختار باکس‌های ۵ رقمی */
.otp-input-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.otp-box {
    width: 55px !important;
    height: 65px !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 1.8rem !important;
    font-weight: 800;
    font-family: monospace !important;
    color: var(--text-dark) !important;
    background-color: #f1f5f9 !important;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

/* افکت جذاب هنگام فوکوس روی هر باکس */
.otp-box:focus {
    outline: none;
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(0, 155, 76, 0.15) !important;
    transform: translateY(-2px);
}

/* وقتی داخل باکس عدد پر میشه */
.otp-box.filled {
    border-color: #cbd5e1 !important;
    background-color: #ffffff !important;
}

/* بخش تایمر و ارسال مجدد */
.resend-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 10px;
}

.timer-text {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-resend {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-resend.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-resend:not(.disabled):hover {
    text-decoration: underline;
    color: var(--primary-hover);
}
/* استایل برای لینک ویرایش شماره */
.edit-phone-link {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* فاصله بین آیکون و متن */
    color: #64748b; /* یک رنگ خاکستری متمایل به آبی ملایم */
    font-size: 0.9rem; /* اندازه فونت کمی کوچکتر از متن اصلی */
    text-decoration: none; /* حذف خط زیر لینک */
    margin-top: 10px; /* فاصله از متن بالایی */
    padding: 4px 8px; /* کمی پدینگ برای زیبایی در حالت هاور */
    border-radius: 6px; /* گرد کردن گوشه ها */
    transition: all 0.3s ease; /* انیمیشن نرم برای تغییر رنگ */
}

/* استایل هنگام رفتن ماوس روی لینک (هاور) */
.edit-phone-link:hover {
    color: #2563eb; /* تغییر رنگ به آبی جذاب هنگام هاور */
    background-color: #f1f5f9; /* یک پس‌زمینه خیلی محو و روشن */
}

/* تنظیم سایز دقیق آیکون قلم */
.edit-phone-link i {
    font-size: 0.85rem;
}
