﻿/* =========================================================
   Global Arabic UI (Bootstrap override + Force Cairo)
   ========================================================= */

:root {
    --bs-body-font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

html, body {
    font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

*, *::before, *::after {
    font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

body {
    margin: 0;
}

/* =========================================================
   Identity Login Page (ANIMATION STRONG + TITLE CENTERED)
   ========================================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(1200px 600px at 50% 0%, #eef2ff 0%, #ffffff 55%);
}

.login-shell {
    width: min(520px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    /* Visual center */
    transform: translateY(18px);
}

/* Header */
.login-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ===== Title wrapper
   نخلي العرض يتحدد على أوسع سطر (السطر الأوسط غالبًا)
   وبكده السطر 1 و3 يبقوا متوسطنين على نفس العرض
*/
.login-title-wrap {
    display: inline-block; /* عرضه = عرض المحتوى الأطول */
    text-align: center; /* يوسّط السطور القصيرة بالنسبة للأطول */
    line-height: 1.15;
    padding: 0 6px;
}

    /* Lines */
    .login-title-wrap .line {
        font-weight: 900;
        letter-spacing: 0;
        color: #0f172a;
        opacity: 0;
        transform: translateX(320px); /* ✅ أقصى اليمين (حركة كبيرة) */
        animation: titleSlideIn .85s cubic-bezier(.18,.89,.22,1) forwards;
        will-change: transform, opacity;
    }

    /* ✅ ستاجر واضح: ورا بعض مش مع بعض */
    .login-title-wrap .line-1 {
        font-size: 30px;
        animation-delay: .05s;
    }

    .login-title-wrap .line-2 {
        font-size: 28px;
        animation-delay: .28s;
    }

    .login-title-wrap .line-3 {
        font-size: 28px;
        animation-delay: .52s;
    }

@media (max-width: 420px) {
    .login-title-wrap .line-1 {
        font-size: 24px;
    }

    .login-title-wrap .line-2,
    .login-title-wrap .line-3 {
        font-size: 22px;
    }
}

@keyframes titleSlideIn {
    0% {
        opacity: 0;
        transform: translateX(320px);
    }

    60% {
        opacity: 1;
        transform: translateX(-10px);
    }
    /* overshoot */
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo */
.login-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    opacity: 0;
    transform: translateY(18px);
    animation: logoIn .55s ease-out forwards;
    animation-delay: .78s; /* بعد العناوين */
}

@keyframes logoIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card */
.login-card {
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 22px 22px 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
    opacity: 0;
    transform: translateY(22px);
    animation: cardIn .60s ease-out forwards;
    animation-delay: .88s;
}

@keyframes cardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-title {
    margin: 0 0 14px 0;
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
    text-align: center;
}

.login-form .form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
    color: #334155;
}

.form-control {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 11px 12px;
    outline: none;
    background: #fbfdff;
}

    .form-control:focus {
        border-color: #94a3b8;
        box-shadow: 0 0 0 4px rgba(148, 163, 184, .25);
    }

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 10px;
}

.remember {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #334155;
    font-weight: 700;
    font-size: 14px;
}

.link {
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
}

.btn-login {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 12px 12px;
    margin-top: 14px;
    font-weight: 900;
    cursor: pointer;
    background: #0f172a;
    color: #fff;
}

    .btn-login:hover {
        filter: brightness(1.05);
    }

.login-footer {
    margin-top: 4px;
    text-align: center;
    color: #64748b;
}

/* احترام تقليل الحركة لو المستخدم مفعّلها */
@media (prefers-reduced-motion: reduce) {
    .login-title-wrap .line,
    .login-logo,
    .login-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* محتوى الموقع */
main {
    flex: 1 0 auto;
}

/* الفوتر */
footer.footer {
    flex-shrink: 0;
    margin-top: auto;
    position: static !important;
    width: 100%;
}