/**
 * auth.css - أنماط صفحات المصادقة المستقلة (Login, Register, Forgot Password, Reset Password)
 *
 * هذا الملف يحتوي على جميع الأنماط الخاصة بصفحات المصادقة فقط.
 * يمكنك استبدال هذا الملف بالكامل بقالب جاهز دون التأثير على باقي المتجر.
 *
 * الملفات التي تعتمد عليه:
 *   - login.html
 *   - register.html
 *   - forgot-password.html
 *   - reset-password-form.html
 *
 * المتغيرات الأساسية (يمكنك تغييرها لتعديل الألوان):
 */

:root {
    --auth-primary: #2d6a4f;
    --auth-primary-dark: #1b4332;
    --auth-primary-light: #40916c;
    --auth-accent: #52b788;
    --auth-accent-light: #d8f3dc;
    --auth-bg: #f8fafc;
    --auth-card-bg: #ffffff;
    --auth-text: #1e293b;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-radius: 14px;
    --auth-radius-sm: 8px;
    --auth-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    --auth-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======== Base ======== */
body.auth-page {
    font-family: 'Tajawal', system-ui, -apple-system, sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--auth-bg);
    color: var(--auth-text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

body.auth-page *,
body.auth-page *::before,
body.auth-page *::after {
    box-sizing: border-box;
}

body.auth-page a {
    text-decoration: none;
    color: inherit;
    transition: var(--auth-transition);
}

/* ======== Auth Container ======== */
.auth-container {
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    margin: auto;
}

/* ======== Auth Brand (Logo) ======== */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--auth-primary);
    margin-bottom: 2rem;
}

.auth-brand i {
    font-size: 2rem;
    color: var(--auth-accent);
}

.auth-brand-text {
    text-align: center;
}

.auth-brand-name {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--auth-primary-dark);
    line-height: 1.3;
}

.auth-brand-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--auth-muted);
}

/* ======== Auth Card ======== */
.auth-card {
    background-color: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 2rem;
}

.auth-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--auth-text);
    text-align: center;
    margin-bottom: 0.25rem;
}

.auth-card-subtitle {
    font-size: 0.875rem;
    color: var(--auth-muted);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ======== Auth Form ======== */
.auth-form .form-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--auth-text);
}

.auth-form .form-control,
.auth-form .form-select {
    border-radius: var(--auth-radius-sm);
    border-color: var(--auth-border);
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    transition: var(--auth-transition);
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 0.2rem rgba(82, 183, 136, 0.15);
}

.auth-form .form-text,
.auth-form .text-muted {
    font-size: 0.8rem;
    color: var(--auth-muted) !important;
}

/* ======== Auth Button ======== */
.btn-auth-primary {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: var(--auth-radius-sm);
    font-weight: 600;
    transition: var(--auth-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    width: 100%;
    font-size: 1rem;
}

.btn-auth-primary:hover {
    background: linear-gradient(135deg, var(--auth-primary-light) 0%, var(--auth-primary) 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(45, 106, 79, 0.3);
    transform: translateY(-2px);
}

.btn-auth-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ======== Auth Links / Footer ======== */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

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

.auth-footer a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-link {
    color: var(--auth-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* ======== Auth Tabs (login/register) ======== */
.auth-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--auth-border);
    margin-bottom: 1.5rem;
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--auth-muted);
    cursor: pointer;
    transition: var(--auth-transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.auth-tab-btn.active {
    color: var(--auth-primary);
    border-bottom-color: var(--auth-primary);
}

.auth-tab-btn:hover:not(.active) {
    color: var(--auth-text);
}

/* ======== Auth Alerts / Toast ======== */
.auth-alert {
    border-radius: var(--auth-radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ======== Auth Password Toggle ======== */
.auth-password-toggle {
    position: relative;
}

.auth-password-toggle .btn-toggle-password {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    z-index: 2;
}

.auth-password-toggle .btn-toggle-password:hover {
    color: var(--auth-primary);
}

/* ======== Auth Divider ======== */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.8rem;
    margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--auth-border);
}

.auth-divider span {
    padding: 0 0.75rem;
}

/* ======== Auth Success / Info Icons ======== */
.auth-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--auth-accent-light);
    color: var(--auth-primary);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

/* ======== Responsive ======== */
@media (max-width: 576px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .auth-brand-name {
        font-size: 1.25rem;
    }
}
