/* static/css/pages/login.css */

/* ریست کلی برای جلوگیری از بهم ریختگی */
.login-wrapper * {
    box-sizing: border-box;
}

:root {
    --brand-color: #4A5A8D;
    --brand-hover: #1f427c;
    --brand-focus: rgba(74, 90, 141, 0.15);
    --bg-color: #f8f9fa;
    --text-main: #212529;
    --text-muted: #868e96;
}

.login-wrapper {
    width: 100%;
    min-height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    font-family: inherit;
}

/* --- تعریف انیمیشن Fade In Up --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px); /* شروع از 40 پیکسل پایین‌تر */
    }
    to {
        opacity: 1;
        transform: translateY(0); /* پایان در جای اصلی */
    }
}

.login-card {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    border: 1px solid rgba(74, 90, 141, 0.05);
    position: relative;
    overflow: hidden;
    text-align: center;

    /* --- اعمال انیمیشن هنگام لود صفحه --- */
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    /* این باعث می‌شود کارت با افکت نرم و زیبا بالا بیاید */
}

.login-header {
    margin-bottom: 30px;
}
.login-header h3 {
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    font-size: 1.6rem;
}
.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 20px;
    position: relative;
    width: 100%;
}

.form-control-custom {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 20px;
    padding-left: 45px;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    background-color: #fcfcfc;
    font-size: 0.95rem;
    color: #495057;
    transition: all 0.2s ease;
}

.form-control-custom:focus {
    border-color: var(--brand-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px var(--brand-focus);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 1.2rem;
    pointer-events: none;
}

.form-control-custom:focus + .input-icon {
    color: var(--brand-color);
}

/* --- Buttons --- */
.btn-login-submit {
    width: 100%;
    height: 54px;
    border-radius: 14px;
    background-color: var(--brand-color);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}
.btn-login-submit:hover {
    background-color: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 90, 141, 0.25);
}

/* --- Tabs --- */
.segmented-control {
    display: flex;
    background: #f1f3f5;
    padding: 5px;
    border-radius: 14px;
    margin-bottom: 25px;
    user-select: none;
}

.segmented-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    color: #868e96;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.segmented-option.active {
    color: var(--brand-color);
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* --- Verify Page Elements --- */
.verify-icon-large {
    font-size: 3.5rem;
    color: var(--brand-color);
    margin-bottom: 15px;
    opacity: 0.9;
    display: block;
}
.mobile-display {
    background-color: #eef1ff;
    border-radius: 12px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 25px 0;
    color: var(--brand-color);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(74, 90, 141, 0.1);
}
.otp-input {
    text-align: center;
    letter-spacing: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-color);
    padding-left: 20px;
}
.otp-input::placeholder {
    letter-spacing: 2px;
    font-size: 1.2rem;
    font-weight: normal;
}
.timer-container {
    margin-top: 25px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 12px;
    color: #495057;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* --- Tab Animation (برای تغییر تب‌ها) --- */
.animate-slide-up {
    animation: slideUpTab 0.4s ease forwards;
}
@keyframes slideUpTab {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 500px) {
    .login-card { padding: 30px 20px; }
    .segmented-control { flex-direction: column; }
    .otp-input { font-size: 1.5rem; letter-spacing: 8px; }
}

.fa-num { font-family: "Vazir", "Yekan", sans-serif; }

/* --- استایل اختصاصی برای بولد کردن شماره موبایل --- */
#mobileInput,#passwordInput {
    font-weight: 800 !important;
    color: #000000 !important;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

#mobileInput::placeholder,#passwordInput::placeholder {
    font-weight: 400 !important;
    color: #adb5bd !important;
    font-size: 0.95rem;
    letter-spacing: normal;
}
/* --- Register Page Specific Styles --- */

/* کارت در حالت ثبت‌نام باید عریض‌تر باشد تا دو ستون جا شود */
.login-card.register-mode {
    max-width: 850px;
}

/* کانتینر اصلی فرم ثبت‌نام: اجبار به راست‌چین بودن */
.register-form {
    text-align: right !important;
    direction: rtl !important;
}

/* استایل لیبل‌ها در صفحه ثبت‌نام */
.register-form label,
.register-form .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    font-weight: 600;
    text-align: right !important; /* مهم: راست‌چین */
}

/* متن‌های خطا */
.register-form .text-danger {
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
    text-align: right;
}

/* لینک قوانین */
.register-form .link {
    color: var(--brand-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--brand-color);
}
/* --- اصلاح ارتفاع فیلد آدرس (Textarea) --- */
textarea.form-control-custom {
    height: auto !important;       /* ارتفاع ثابت 54px را حذف می‌کند */
    min-height: 120px;             /* حداقل ارتفاع برای نمایش 5 خط */
    padding-top: 15px;             /* فاصله از بالا برای خوانایی بهتر */
    padding-bottom: 15px;          /* فاصله از پایین */
    line-height: 1.6;              /* فاصله بین خطوط متن */
    resize: vertical;              /* اجازه تغییر سایز عمودی به کاربر */
}
/* استایل متن راهنمای زیر پسورد */
.password-hint {
    font-size: 0.85rem;       /* سایز فونت ریز و مناسب توضیحات */
    color: #6c757d;           /* رنگ خاکستری ملایم */
    margin-top: 8px;          /* فاصله از اینپوت بالا */
    line-height: 1.6;         /* ارتفاع خطوط برای خوانایی بهتر */
    text-align: right;        /* راست‌چین */
    display: flex;
    align-items: flex-start;
}

.password-hint i {
    color: var(--brand-color); /* رنگ آیکون (هماهنگ با تم سایت) */
    margin-left: 6px;          /* فاصله آیکون از متن */
    position: relative;
    top: 3px;                  /* تنظیم دقیق تراز عمودی آیکون */
}


