/* ==========================================================================
   استایل‌های اختصاصی صفحه ورود کاربران (Login CSS)
   فروشگاه صنایع غذایی رشته آش آردیم
   ========================================================================== */

/* بدنه صفحه ورود */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-page);
    color: var(--text-main);
}

/* هدر بالای صفحه ورود */
.auth-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    width: 100%;
}

.auth-page-header .logo-box {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* ظرف مرکزی صفحه */
.auth-card-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

/* کارت فرم ورود */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
}

.auth-card-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.4rem;
    text-align: center;
}

.auth-card-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.8rem;
}

/* فیلدهای ورودی فرم ورود */
.auth-card .form-group {
    margin-bottom: 1.2rem;
}

.auth-card .form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

.auth-card .form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-card .form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15);
}

/* دکمه ارسال فرم ورود */
.auth-submit-btn {
    width: 100%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.88rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 1.2rem;
}

.auth-submit-btn:hover {
    background: var(--primary-hover);
}

.auth-submit-btn:active {
    transform: scale(0.98);
}

/* فوتر کارت ورود */
.auth-card-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.auth-card-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-card-footer a:hover {
    text-decoration: underline;
}

/* پیام‌های خطا و موفقیت */
.auth-error-box {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: none;
}

[data-theme="dark"] .auth-error-box {
    background: #450a0a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

.auth-success-box {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: none;
}

[data-theme="dark"] .auth-success-box {
    background: #052e16;
    color: #86efac;
    border-color: #14532d;
}

/* رسپانسیو موبایل */
@media (max-width: 600px) {
    .auth-page-header {
        padding: 0.75rem 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .auth-page-header .logo-box {
        position: static;
        transform: none;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .auth-page-header .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1.05rem;
    }

    .auth-page-header .brand-name {
        font-size: 1.12rem;
    }

    .auth-page-header .auth-header-actions {
        display: flex;
        align-items: center;
    }

    .auth-page-header .auth-link-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }

    .auth-card-container {
        padding: 1.2rem 0.75rem;
    }

    .auth-card {
        padding: 1.5rem 1.1rem;
        border-radius: 16px;
    }

    .auth-card-title {
        font-size: 1.4rem;
    }

    .auth-card-desc {
        font-size: 0.85rem;
        margin-bottom: 1.4rem;
    }

    .auth-card .form-group input {
        font-size: 16px; /* جلوگیری از زوم خودکار سافاری آیفون */
        min-height: 46px;
    }

    .auth-submit-btn {
        min-height: 48px;
        font-size: 0.98rem;
    }
}

/* تب‌های انتخاب روش ورود (OTP پیامکی یا رمز عبور) */
.auth-tabs {
    display: flex;
    background: var(--bg-page);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    gap: 4px;
}

.auth-tab-btn {
    flex: 1;
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: center;
}

.auth-tab-btn.active {
    background: var(--bg-surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.otp-countdown-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
}

.otp-demo-badge {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    margin-top: 0.8rem;
    text-align: center;
    line-height: 1.4;
}

[data-theme="dark"] .otp-demo-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

@media (max-width: 400px) {
    .brand-tagline {
        display: none;
    }

    .auth-page-header .auth-link-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.76rem;
    }
}
