/* =====================================================================
   Darna | دارنا — صفحة تسجيل الدخول (المرحلة 4ج)
   تُحمَّل بعد style.css وتستعمل نفس المتغيرات (--navy و --sand ...).
   خاصة بصفحة login.html فقط.
   ===================================================================== */

.auth-page [hidden] {
    display: none !important;
}

.auth-page {
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 5% 80px;
    background: var(--sand-soft);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
    color: var(--ink);
    font-family: var(--font);
}

.auth-card h1 {
    color: var(--navy);
    font-size: 26px;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 22px;
}

.auth-subtitle:empty {
    display: none;
}

/* ---------- التبويبات ---------- */

.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 22px;
    background: var(--sand-soft);
    border-radius: 999px;
}

.auth-tabs button {
    flex: 1;
    min-height: 40px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.auth-tabs button[aria-selected="true"] {
    background: var(--bg);
    color: var(--navy);
    box-shadow: 0 2px 8px rgba(11, 61, 92, 0.12);
}

/* ---------- الحقول ---------- */

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.auth-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    color: var(--ink);
    background: var(--bg);
}

.auth-field input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(11, 61, 92, 0.12);
}

[dir="rtl"] .auth-field input[dir="ltr"] {
    text-align: right;
}

.password-row {
    position: relative;
}

.password-row input {
    padding-right: 84px;
}

/* بالعربية يكون زر "إظهار" على اليسار */
[dir="rtl"] .password-row input {
    padding-right: 14px;
    padding-left: 84px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 6px;
    transform: translateY(-50%);
    min-height: 34px;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--sand);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.auth-hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- الرسائل ---------- */

.auth-error,
.auth-success {
    font-size: 14px;
    line-height: 1.6;
    border-radius: 10px;
}

.auth-error:not(:empty) {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.auth-success:not(:empty) {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ---------- الأزرار ---------- */

.auth-primary {
    width: 100%;
    height: 48px;
    border: 1px solid var(--navy);
    border-radius: 999px;
    background: var(--navy);
    color: white;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.auth-primary:hover {
    background: var(--navy-dark);
}

.auth-primary:disabled {
    opacity: 0.6;
    cursor: wait;
}

.auth-secondary {
    width: 100%;
    height: 46px;
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--navy);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.auth-link {
    display: block;
    margin: 14px auto 0;
    min-height: 36px;
    border: none;
    background: none;
    color: var(--sand);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.auth-link:hover {
    text-decoration: underline;
}

/* ---------- مسجّل بالفعل ---------- */

.auth-signed-in {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 18px;
    overflow-wrap: anywhere;
}

#goBookingsLink {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ---------- الهاتف ---------- */

@media (max-width: 768px) {
    .auth-page {
        padding: 20px 12px 60px;
    }

    .auth-card {
        padding: 24px 18px;
    }

    .auth-card h1 {
        font-size: 22px;
    }
}
