
* {
    box-sizing: border-box;
}

.login-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px 20px;
    background:
        radial-gradient(
            circle at top right,
            rgba(99, 102, 241, .10),
            transparent 30%
        ),
        radial-gradient(
            circle at bottom left,
            rgba(59, 130, 246, .08),
            transparent 30%
        ),
        #f8fafc;
}

.login-wrapper {
    width: 100%;
    max-width: 1050px;
    min-height: 620px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(15, 23, 42, .10);
    border: 1px solid #eef2f7;
}

/* =========================
   الجانب التعريفي
========================= */

.login-intro {
    position: relative;
    padding: 55px;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(255,255,255,.16),
            transparent 25%
        ),
        radial-gradient(
            circle at 10% 90%,
            rgba(255,255,255,.10),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #111827,
            #1e293b 55%,
            #312e81
        );
}

.login-intro::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.10);
    right: -100px;
    top: -80px;
}

.login-intro::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08);
    left: -80px;
    bottom: -70px;
}

.intro-content {
    position: relative;
    z-index: 2;
    max-width: 430px;
}

.intro-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 55px;
    font-size: 21px;
}

.intro-logo span {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    font-size: 22px;
}

.intro-logo strong {
    font-size: 22px;
}

.login-intro h1 {
    margin: 0 0 18px;
    font-size: 40px;
    line-height: 1.3;
    font-weight: 800;
}

.login-intro h1 span {
    font-size: 32px;
}

.login-intro > .intro-content > p {
    margin: 0;
    color: rgba(255,255,255,.72);
    font-size: 16px;
    line-height: 2;
}

.intro-features {
    margin-top: 45px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.intro-feature {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.08);
    font-size: 20px;
}

.intro-feature div:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.intro-feature strong {
    font-size: 14px;
}

.intro-feature span {
    font-size: 12px;
    color: rgba(255,255,255,.58);
}

/* =========================
   بطاقة الدخول
========================= */

.login-card {
    padding: 55px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    margin-bottom: 35px;
}

.mobile-logo {
    display: none;
}

.login-header h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 30px;
    font-weight: 800;
}

.login-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* =========================
   Form
========================= */

.form-group {
    margin-bottom: 22px;
}

.form-group label,
.password-label-row label {
    display: block;
    margin-bottom: 9px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    pointer-events: none;
    opacity: .7;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    outline: none;
    padding: 0 46px 0 45px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    transition: .2s ease;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.input-wrapper input:focus {
    background: white;
    border-color: #6366f1;
    box-shadow:
        0 0 0 4px rgba(99,102,241,.08);
}

.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-label-row label {
    margin-bottom: 9px;
}

.password-label-row a {
    color: #6366f1;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.password-label-row a:hover {
    text-decoration: underline;
}

.password-toggle {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 5px;
    opacity: .7;
    font-size: 16px;
}

.password-toggle:hover {
    opacity: 1;
}

.error-message {
    display: block;
    min-height: 17px;
    margin-top: 5px;
    color: #dc2626;
    font-size: 11px;
}

/* =========================
   تذكرني
========================= */

.remember-row {
    margin: -2px 0 24px;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
}

.remember-label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: white;
    position: relative;
    transition: .2s;
}

.remember-label input:checked + .custom-checkbox {
    background: #6366f1;
    border-color: #6366f1;
}

.remember-label input:checked + .custom-checkbox::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    left: 3px;
    top: -1px;
}

/* =========================
   زر الدخول
========================= */

.login-button {
    width: 100%;
    height: 53px;
    border: none;
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            #6366f1,
            #4f46e5
        );
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: .2s ease;
    box-shadow:
        0 8px 20px rgba(79,70,229,.20);
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 12px 25px rgba(79,70,229,.28);
}

.login-button:active {
    transform: translateY(0);
}

.login-button.loading {
    pointer-events: none;
    opacity: .8;
}

.button-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.login-button.loading .button-text {
    visibility: hidden;
}

.login-button.loading .button-loader {
    display: block;
}

@keyframes spin {
    to {
        transform:
            translate(-50%, -50%)
            rotate(360deg);
    }
}

/* =========================
   الرسالة
========================= */

.form-message {
    margin-bottom: 20px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.7;
}

.form-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* =========================
   Google
========================= */

.google-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 18px;
    color: #94a3b8;
    font-size: 12px;
}

.google-divider::before,
.google-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.google-button {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #dbe2ea;
    border-radius: 13px;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: .2s ease;
}

.google-button:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 5px 15px rgba(15,23,42,.06);
    transform: translateY(-1px);
}

.google-button:active {
    transform: translateY(0);
}

/* =========================
   إنشاء حساب
========================= */

.register-link {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eef2f7;
    display: flex;
    justify-content: center;
    gap: 5px;
    color: #64748b;
    font-size: 13px;
}

.register-link a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 700;
}

.register-link a:hover {
    text-decoration: underline;
}

/* =========================
   Responsive
========================= */

@media (max-width: 850px) {

    .login-wrapper {
        max-width: 560px;
        grid-template-columns: 1fr;
    }

    .login-intro {
        display: none;
    }

    .login-card {
        padding: 45px;
    }

}

@media (max-width: 500px) {

    .login-page {
        min-height: calc(100vh - 65px);
        padding: 20px 12px;
    }

    .login-wrapper {
        border-radius: 20px;
        min-height: auto;
    }

    .login-card {
        padding: 30px 20px;
    }

    .login-header {
        margin-bottom: 28px;
    }

    .login-header h2 {
        font-size: 25px;
    }

    .register-link {
        flex-direction: column;
        align-items: center;
    }

}

