﻿
/* أساس ثابت */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --brand: #585892; /* اللون الأساسي الذي طلبته */
    --brand-dark: #4a4a7f; /* أغمق للهوفر */
    --bg-1: #7d7dd0; /* درجات فاتحة للخلفية */
    --bg-2: #4f4f94;
    --txt: #1a1a1a; /* نص الكارت */
    --muted: #6b6f86; /* نص ثانوي */
    --line: #e7e9f6; /* حدود خفيفة */
    --input-bg: #eef2ff; /* خلفية الحقول */
    --ring: rgba(88,88,146,.25);
    --shadow: 0 18px 40px rgba(31, 33, 68, .25);
}

/* خلفية بنفسجية فاتحة مع دوائر ناعمة */
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    background: radial-gradient(1200px 900px at 50% 12%, #ffffff24 0%, transparent 60%), radial-gradient(1100px 800px at 50% 88%, #00000014 0%, transparent 65%), linear-gradient(160deg, var(--bg-1), var(--bg-2));
}

.wrap {
    width: min(520px, 92vw);
    padding: 24px;
}

/* الكارت الأبيض */
.card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px 28px 24px;
    box-shadow: var(--shadow);
}

/* الهيدر / اللوجو */
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

    .brand .logo {
        width: 72px;
        height: 72px;
        border-radius: 16px;
        display: grid;
        place-items: center;
        background: linear-gradient(145deg, #6d6db3, var(--brand));
        color: #eef2ff;
        box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 10px 20px rgba(70,72,130,.35);
    }

    .brand h1 {
        margin: 0;
        font-size: 20px;
        font-weight: 800;
        color: #12131a;
    }

    .brand .hint {
        margin-top: -4px;
        font-size: 12px;
        color: var(--muted);
    }

/* الحقول */
.field {
    position: relative;
    margin-bottom: 14px;
}

    .field input {
        width: 100%;
        max-width: 100%;
        background: var(--input-bg);
        border: 1px solid #d5daf2;
        border-radius: 12px;
        padding: 12px 46px 12px 46px; /* مساحة للأيقونات يمين/يسار */
        font-size: 14px;
        color: #1f2233;
        outline: none;
        transition: box-shadow .2s, border-color .2s, background .2s;
    }

        .field input::placeholder {
            color: #8a90b6;
        }

        .field input:focus {
            border-color: var(--brand);
            box-shadow: 0 0 0 4px var(--ring);
            background: #fff;
        }

    .field .icon {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--brand);
        opacity: .9;
        pointer-events: none;
    }

.toggle-pass {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    color: var(--brand);
    opacity: .9;
}

/* زر الدخول */
.login-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    background: linear-gradient(180deg, var(--brand), var(--brand-dark));
    color: #fff;
    font-weight: 800;
    border-radius: 12px;
    padding: 12px;
    font-size: 15px;
    letter-spacing: .2px;
    box-shadow: 0 10px 20px rgba(88,88,146,.35);
    transition: filter .15s, transform .04s;
}

    .login-btn:hover {
        filter: brightness(1.04);
    }

    .login-btn:active {
        transform: translateY(1px);
    }

.error {
    display: block;
    min-height: 18px;
    margin-top: 10px;
    color: #e43d3d;
    font-size: 13px;
    text-align: center;
}

.footer {
    text-align: center;
    margin-top: 14px;
    color: #5c5f75;
    font-size: 11px;
}

.brand-logo {
    width: 150px;
    height: auto;
}

@media (max-width:480px) {
    .brand-logo {
        width: 150px;
    }
}
